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.
- package/0.js +56 -56
- package/README.md +48 -63
- package/chunks/{adapt-loop-IGBRQAXO.js → adapt-loop-J6QCZZTB.js} +4 -4
- package/chunks/{artifact-scraper-LNQJUORS.js → artifact-scraper-MFKT6OI4.js} +2 -2
- package/chunks/{assumption-mining-4MJTP6H5.js → assumption-mining-646LYSJY.js} +16 -16
- package/chunks/{chunk-Z3IKZX3X.js → chunk-23DG5YKS.js} +1 -1
- package/chunks/{chunk-2WSXFFJZ.js → chunk-3E2KALZ5.js} +2 -2
- package/chunks/{chunk-TF46UWFU.js → chunk-4G7OVYJX.js} +1 -1
- package/chunks/{chunk-E2UOY5PJ.js → chunk-5BTJMINS.js} +12 -70
- package/chunks/{chunk-QZVG3BG4.js → chunk-5IBCBQEH.js} +1 -2
- package/chunks/{chunk-YA4PUM4H.js → chunk-7XCKYNLO.js} +1 -1
- package/chunks/{chunk-BACXRTQ4.js → chunk-AV2LG2L7.js} +87 -767
- package/chunks/{chunk-IMGWPNQM.js → chunk-BCSRRQG5.js} +76 -593
- package/chunks/{chunk-NOPBXZUV.js → chunk-BOUGKEKA.js} +1 -1
- package/chunks/{chunk-RF5QGKLR.js → chunk-CPWA6RWE.js} +3 -3
- package/chunks/{chunk-P6YG6TEZ.js → chunk-DKSCN2AB.js} +1 -1
- package/chunks/{chunk-YPOA3W4O.js → chunk-GOEA3NW6.js} +877 -110
- package/chunks/{chunk-ANDKY54G.js → chunk-HHPWRY2M.js} +4019 -7299
- package/chunks/{chunk-NDJU5ZZ7.js → chunk-IFME676H.js} +3 -3
- package/chunks/{chunk-HBKCGJAV.js → chunk-IVQV574Y.js} +1 -1
- package/chunks/{chunk-W4JOXE4N.js → chunk-IXT64DV5.js} +709 -1929
- package/chunks/{chunk-PC6RCKQV.js → chunk-KAU6NLGP.js} +59 -26
- package/chunks/{chunk-FAH6V4QM.js → chunk-LGCASF2C.js} +1117 -2291
- package/chunks/{chunk-CAJJRUTV.js → chunk-NLH4LMWH.js} +1 -1
- package/chunks/chunk-OHHCGDJ2.js +5523 -0
- package/chunks/{chunk-YHWWF4QY.js → chunk-OSBPGWTE.js} +3 -3
- package/chunks/{chunk-G34QP2XW.js → chunk-TM74SSHC.js} +1 -1
- package/chunks/{chunk-VOAXLO4A.js → chunk-TO35Y326.js} +5 -721
- package/chunks/{chunk-FWAYJ2IV.js → chunk-TV27OWIW.js} +8 -8
- package/chunks/chunk-UELXHK2Y.js +1950 -0
- package/chunks/{chunk-CL5KAUM6.js → chunk-V6GHX34G.js} +274 -8
- package/chunks/{chunk-WZISK5VC.js → chunk-VWITLWXB.js} +53 -7
- package/chunks/{chunk-ER3SUMYJ.js → chunk-W6UWZFKL.js} +0 -195
- package/chunks/chunk-WSDDGFA6.js +114 -0
- package/chunks/{chunk-5T6D5BVY.js → chunk-WZRVS7SB.js} +1 -1
- package/chunks/chunk-X7LAEEUW.js +2143 -0
- package/chunks/chunk-XA2O4WXA.js +1228 -0
- package/chunks/{chunk-Y5H6E24H.js → chunk-XCISCI4T.js} +1 -1
- package/chunks/{chunk-WPQLBN4S.js → chunk-XDKB2P5X.js} +1 -1
- package/chunks/{chunk-SBMB4OL3.js → chunk-YL6YAGLL.js} +62 -8
- package/chunks/{chunk-O6SD4A36.js → chunk-ZKQ2I3S2.js} +1 -1
- package/chunks/{codex-models-TYYV4JNN.js → codex-models-NHQW45SO.js} +5 -3
- package/chunks/{commands-WF5RG4I2.js → commands-N6GN5SBF.js} +2152 -3643
- package/chunks/{db-U3WQZVAO.js → db-5IWEJUYV.js} +3 -3
- package/chunks/{disclose-67GZCDBO.js → disclose-LDNKAVRH.js} +10 -8
- package/chunks/{dist-ACC3DZUZ.js → dist-BS4CY4RG.js} +3 -1
- package/chunks/{dist-EVTN3UTT.js → dist-FSS7MBDF.js} +2 -2
- package/chunks/{dist-F6X62TQK.js → dist-L3XJWWZ6.js} +225 -192
- package/chunks/{eval-runner-SA6OUGHZ.js → eval-runner-EMEGF24P.js} +11 -11
- package/chunks/{exploit-agent-36Q7XQFP.js → exploit-agent-KW4EB7BE.js} +1 -1
- package/chunks/{exploit-autoclimb-J4OTSTZ6.js → exploit-autoclimb-CXJ2ERRO.js} +1 -1
- package/chunks/{exploit-climb-PYEJDIC4.js → exploit-climb-TJWLY4XC.js} +2 -2
- package/chunks/fix-UUKPXCFB.js +26 -0
- package/chunks/{harness-GDUMKGSE.js → harness-C5HOKIEV.js} +3 -3
- package/chunks/{hunt-scan-UDJSCISU.js → hunt-scan-KZZ444V2.js} +14 -14
- package/chunks/{identity-JTIVJSV7.js → identity-62SVRW4H.js} +1 -1
- package/chunks/{kernel-primitive-F2IXUFAX.js → kernel-primitive-Z77IR7YS.js} +2 -2
- package/chunks/{kernel-vm-runner-276LHIOV.js → kernel-vm-runner-JW77P276.js} +2 -2
- package/chunks/{memsafety-scan-NHUOGTEX.js → memsafety-scan-FCPAXIZE.js} +2 -2
- package/chunks/{native-loop-3BSYVDUI.js → native-loop-P6P5GYVJ.js} +10 -10
- package/chunks/{npm-detectors-VIYJXKFQ.js → npm-detectors-Z2ZIQCN4.js} +2 -2
- package/chunks/orchestrate-DWWUT5RC.js +58 -0
- package/chunks/{process-PNMC36JI.js → process-N245QIQG.js} +1 -4
- package/chunks/{run-CBGE6DRQ.js → run-GAFKBCTN.js} +14935 -17598
- package/chunks/{runtime-PXO5G6UV.js → runtime-H7YBR5IZ.js} +4 -5
- package/chunks/{scope-NJHIDDTN.js → scope-QWY4VQZ7.js} +4 -1
- package/chunks/{session-store-46WBZM22.js → session-store-XIDFGG7K.js} +2 -2
- package/chunks/{variant-candidates-UH2WC2HA.js → variant-candidates-7D4F5E4H.js} +3 -3
- package/chunks/{web-recon-prepass-SFXU44SS.js → web-recon-prepass-VXXBPDAV.js} +3 -3
- package/cli-path-traversal-fixture.js +352 -0
- package/dashboard/assets/bot-Bg1Tp9_d.js +1 -0
- package/dashboard/assets/dist-B_dDCPbu.js +1 -0
- package/dashboard/assets/findings-page-mayGhNx6.js +5 -0
- package/dashboard/assets/format--susmHX7.js +1 -0
- package/dashboard/assets/input-TuVPR3Zl.js +1 -0
- package/dashboard/assets/jsx-runtime-MGseXjj5.js +3 -0
- package/dashboard/assets/live-page-HWWHX99U.js +1 -0
- package/dashboard/assets/meta-tile-ckHo-w7k.js +1 -0
- package/dashboard/assets/operations-BxZ0OoXO.js +10 -0
- package/dashboard/assets/operations-app-D3d35rgo.js +46 -0
- package/dashboard/assets/overview-page-W_4IteEr.js +1 -0
- package/dashboard/assets/page-header-Bw9AJgBV.js +1 -0
- package/dashboard/assets/scans-page-CgzVXHnn.js +1 -0
- package/dashboard/assets/siren-KQj8QAnJ.js +1 -0
- package/dashboard/assets/table-8EDklulN.js +1 -0
- package/dashboard/assets/tabs-CFHPOwg8.js +1 -0
- package/dashboard/index.html +2 -3
- package/node_modules/node-addon-api/LICENSE.md +9 -0
- package/node_modules/node-addon-api/README.md +95 -0
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +14 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/node-addon-api/napi-inl.h +7250 -0
- package/node_modules/node-addon-api/napi.h +3463 -0
- package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +481 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/README.md +90 -0
- package/node_modules/tree-sitter/binding.gyp +76 -0
- package/node_modules/tree-sitter/index.js +895 -0
- package/node_modules/tree-sitter/package.json +62 -0
- package/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/src/addon_data.h +47 -0
- package/node_modules/tree-sitter/src/binding.cc +35 -0
- package/node_modules/tree-sitter/src/conversions.cc +140 -0
- package/node_modules/tree-sitter/src/conversions.h +22 -0
- package/node_modules/tree-sitter/src/language.cc +106 -0
- package/node_modules/tree-sitter/src/language.h +17 -0
- package/node_modules/tree-sitter/src/logger.cc +70 -0
- package/node_modules/tree-sitter/src/logger.h +19 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
- package/node_modules/tree-sitter/src/node.cc +1056 -0
- package/node_modules/tree-sitter/src/node.h +30 -0
- package/node_modules/tree-sitter/src/parser.cc +298 -0
- package/node_modules/tree-sitter/src/parser.h +35 -0
- package/node_modules/tree-sitter/src/query.cc +383 -0
- package/node_modules/tree-sitter/src/query.h +39 -0
- package/node_modules/tree-sitter/src/tree.cc +307 -0
- package/node_modules/tree-sitter/src/tree.h +45 -0
- package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
- package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
- package/node_modules/tree-sitter/tree-sitter.d.ts +211 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/README.md +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/README.md +6 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1266 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +290 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +221 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +299 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +419 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +14 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +774 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2151 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +230 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4134 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1060 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +382 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +165 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +714 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +50 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +23 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1294 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1823 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/test/fixtures/grammars/.gitkeep +0 -0
- package/node_modules/tree-sitter-c/LICENSE +21 -0
- package/node_modules/tree-sitter-c/README.md +18 -0
- package/node_modules/tree-sitter-c/binding.gyp +20 -0
- package/node_modules/tree-sitter-c/bindings/node/binding.cc +20 -0
- package/node_modules/tree-sitter-c/bindings/node/index.d.ts +28 -0
- package/node_modules/tree-sitter-c/bindings/node/index.js +7 -0
- package/node_modules/tree-sitter-c/grammar.js +1463 -0
- package/node_modules/tree-sitter-c/package.json +108 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-arm64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/linux-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/win32-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/queries/highlights.scm +81 -0
- package/node_modules/tree-sitter-c/queries/tags.scm +9 -0
- package/node_modules/tree-sitter-c/src/grammar.json +9682 -0
- package/node_modules/tree-sitter-c/src/node-types.json +4556 -0
- package/node_modules/tree-sitter-c/src/parser.c +113852 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/alloc.h +54 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/array.h +290 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/parser.h +265 -0
- package/package.json +10 -3
- package/vendor/tree-sitter-0.21.1-node24.json +16 -0
- package/vendor/tree-sitter-0.21.1-node24.tgz +0 -0
- package/chunks/chunk-CGHCEN7W.js +0 -169
- package/chunks/chunk-CXKDWFNO.js +0 -102
- package/chunks/chunk-GIQKESMN.js +0 -687
- package/chunks/chunk-HPQZHOIU.js +0 -67
- package/chunks/chunk-PD2BBBKT.js +0 -245
- package/chunks/chunk-WF5W75WY.js +0 -1070
- package/chunks/fix-J2KBRJDV.js +0 -12
- package/chunks/orchestrate-DHBFRTSI.js +0 -59
- package/chunks/replay-runner-LK2XFIVG.js +0 -39
- package/dashboard/assets/bot-yILPnRgD.js +0 -1
- package/dashboard/assets/chevron-down-BeDJ-Vka.js +0 -1
- package/dashboard/assets/circle-alert-BEnMBMT-.js +0 -1
- package/dashboard/assets/client-DRYsuOGl.js +0 -9
- package/dashboard/assets/copy-Bi5vzoF9.js +0 -1
- package/dashboard/assets/desktop-BT7RkC4q.js +0 -32
- package/dashboard/assets/desktop-OaBI0E0e.css +0 -1
- package/dashboard/assets/dist-CmX-h7a4.js +0 -1
- package/dashboard/assets/dist-DAwYQmf_.js +0 -45
- package/dashboard/assets/findings-page-B4rwF6fZ.js +0 -5
- package/dashboard/assets/format-LNQSSpn6.js +0 -1
- package/dashboard/assets/jsx-runtime-C7oxC63R.js +0 -1
- package/dashboard/assets/live-page-DoNwpPAO.js +0 -1
- package/dashboard/assets/meta-tile-BMtBC-Qq.js +0 -1
- package/dashboard/assets/operations-app-ER0gg7GN.js +0 -2
- package/dashboard/assets/operations-e2CGYKB1.js +0 -4
- package/dashboard/assets/overview-page-CmeWH17A.js +0 -1
- package/dashboard/assets/page-header-CIJyycfz.js +0 -1
- package/dashboard/assets/play-Dwo-9xt6.js +0 -1
- package/dashboard/assets/scans-page-CuhzWhHx.js +0 -1
- package/dashboard/assets/search-CiooTLck.js +0 -1
- package/dashboard/assets/siren-CCBwTSuk.js +0 -1
- package/dashboard/assets/table-BgsSBdke.js +0 -1
- package/dashboard/assets/tabs-vn6v7Bk6.js +0 -1
- package/dashboard/desktop.html +0 -21
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/findings-page-mayGhNx6.js","assets/jsx-runtime-MGseXjj5.js","assets/format--susmHX7.js","assets/operations-BxZ0OoXO.js","assets/operations-CMFVrXEe.css","assets/input-TuVPR3Zl.js","assets/dist-B_dDCPbu.js","assets/bot-Bg1Tp9_d.js","assets/tabs-CFHPOwg8.js","assets/meta-tile-ckHo-w7k.js","assets/table-8EDklulN.js","assets/page-header-Bw9AJgBV.js","assets/live-page-HWWHX99U.js","assets/overview-page-W_4IteEr.js","assets/siren-KQj8QAnJ.js","assets/scans-page-CgzVXHnn.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,c as t,d as n,f as r,i,m as a,o,r as s,s as c,t as l}from"./jsx-runtime-MGseXjj5.js";import{E as u,O as d,a as f,c as p,d as m,f as h,g,h as _,i as v,l as y,m as b,n as x,o as S,p as C,s as w,u as T,y as ee}from"./format--susmHX7.js";import{n as E,r as te,t as ne}from"./dist-B_dDCPbu.js";import{t as re,y as ie}from"./operations-BxZ0OoXO.js";import{_ as D,a as O,c as ae,h as k,m as oe,n as A,o as se,r as ce,s as le,t as ue}from"./input-TuVPR3Zl.js";var de=D(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),fe=D(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),pe=D(`circle-play`,[[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),me=D(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),he=D(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),ge=D(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),_e=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ve=D(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),ye=D(`radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),be=D(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),xe=D(`shield-alert`,[[`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:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Se=D(`shield-check`,[[`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 12 2 2 4-4`,key:`dzmm74`}]]),Ce=D(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),we=D(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Te=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),j=a(r(),1),M=l(),Ee=(0,j.createContext)(null);function De({children:e}){let[t,n]=(0,j.useState)(null),r=(0,j.useRef)(null);(0,j.useEffect)(()=>{r.current=t},[t]);let i=(0,j.useCallback)(e=>{r.current=e,n(e)},[]),a=(0,j.useCallback)(()=>{r.current=null,n(null)},[]),o=(0,j.useCallback)(()=>{let e=r.current;r.current=null,n(null),e?.onClose?.()},[]),s=(0,j.useMemo)(()=>({panel:t,openPanel:i,clearPanel:a,dismissPanel:o}),[a,o,i,t]);return(0,M.jsx)(Ee.Provider,{value:s,children:e})}function Oe(){let e=(0,j.useContext)(Ee);if(!e)throw Error(`useDashboardPanel must be used within a DashboardPanelProvider.`);return e}var ke=a(ie(),1);function Ae({label:e}){return(0,M.jsx)(se,{className:`border border-border`,children:(0,M.jsxs)(le,{className:`flex min-h-[16rem] flex-col items-center justify-center gap-4 text-center`,children:[(0,M.jsx)(_e,{className:`size-8 animate-spin text-primary-text`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(oe,{children:e}),(0,M.jsx)(ae,{children:`Fetching the latest scan and triage state.`})]})]})})}function je({title:e,body:t}){return(0,M.jsx)(se,{className:`border border-dashed border-border bg-muted/20`,children:(0,M.jsx)(le,{className:`flex min-h-[16rem] flex-col items-center justify-center gap-4 text-center`,children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(oe,{children:e}),(0,M.jsx)(ae,{children:t})]})})})}function Me({error:e}){return(0,M.jsx)(se,{className:`border border-destructive/25`,children:(0,M.jsxs)(le,{className:`flex min-h-[16rem] flex-col items-center justify-center gap-4 text-center`,children:[(0,M.jsx)(we,{className:`size-8 text-destructive`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(oe,{children:`Dashboard error`}),(0,M.jsx)(ae,{children:e.message})]})]})})}function Ne(e,t=globalThis?.document){let n=S(e);j.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Pe=`DismissableLayer`,Fe=`dismissableLayer.update`,Ie=`dismissableLayer.pointerDownOutside`,Le=`dismissableLayer.focusOutside`,Re,ze=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Be=j.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=j.useContext(ze),[u,d]=j.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=j.useState({}),m=O(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Ue(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=We(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ne(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),j.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Re=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ge(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Re)}},[u,f,n,l]),j.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ge())},[u,l]),j.useEffect(()=>{let e=()=>p({});return document.addEventListener(Fe,e),()=>document.removeEventListener(Fe,e)},[]),(0,M.jsx)(w.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:C(e.onFocusCapture,S.onFocusCapture),onBlurCapture:C(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:C(e.onPointerDownCapture,x.onPointerDownCapture)})});Be.displayName=Pe;var Ve=`DismissableLayerBranch`,He=j.forwardRef((e,t)=>{let n=j.useContext(ze),r=j.useRef(null),i=O(t,r);return j.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,M.jsx)(w.div,{...e,ref:i})});He.displayName=Ve;function Ue(e,t=globalThis?.document){let n=S(e),r=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Ke(Ie,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function We(e,t=globalThis?.document){let n=S(e),r=j.useRef(!1);return j.useEffect(()=>{let e=e=>{e.target&&!r.current&&Ke(Le,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ge(){let e=new CustomEvent(Fe);document.dispatchEvent(e)}function Ke(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?p(i,a):i.dispatchEvent(a)}var qe=`focusScope.autoFocusOnMount`,Je=`focusScope.autoFocusOnUnmount`,Ye={bubbles:!1,cancelable:!0},Xe=`FocusScope`,Ze=j.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=j.useState(null),l=S(i),u=S(a),d=j.useRef(null),f=O(t,e=>c(e)),p=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:N(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||N(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&N(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),j.useEffect(()=>{if(s){it.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(qe,Ye);s.addEventListener(qe,l),s.dispatchEvent(t),t.defaultPrevented||(Qe(st(et(s)),{select:!0}),document.activeElement===e&&N(s))}return()=>{s.removeEventListener(qe,l),setTimeout(()=>{let t=new CustomEvent(Je,Ye);s.addEventListener(Je,u),s.dispatchEvent(t),t.defaultPrevented||N(e??document.body,{select:!0}),s.removeEventListener(Je,u),it.remove(p)},0)}}},[s,l,u,p]);let m=j.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=$e(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&N(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&N(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,M.jsx)(w.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Ze.displayName=Xe;function Qe(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(N(r,{select:t}),document.activeElement!==n)return}function $e(e){let t=et(e);return[tt(t,e),tt(t.reverse(),e)]}function et(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tt(e,t){for(let n of e)if(!nt(n,{upTo:t}))return n}function nt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function rt(e){return e instanceof HTMLInputElement&&`select`in e}function N(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&rt(e)&&t&&e.select()}}var it=at();function at(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ot(e,t),e.unshift(t)},remove(t){e=ot(e,t),e[0]?.resume()}}}function ot(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function st(e){return e.filter(e=>e.tagName!==`A`)}var ct=`Portal`,lt=j.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=j.useState(!1);y(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ke.createPortal((0,M.jsx)(w.div,{...r,ref:t}),o):null});lt.displayName=ct;var ut=0;function dt(){j.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??ft()),document.body.insertAdjacentElement(`beforeend`,e[1]??ft()),ut++,()=>{ut===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),ut--}},[])}function ft(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},P.apply(this,arguments)};function pt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function mt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var F=`right-scroll-bar-position`,I=`width-before-scroll-bar`,ht=`with-scroll-bars-hidden`,gt=`--removed-body-scroll-bar-size`;function _t(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function vt(e,t){var n=(0,j.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var yt=typeof window<`u`?j.useLayoutEffect:j.useEffect,bt=new WeakMap;function xt(e,t){var n=vt(t||null,function(t){return e.forEach(function(e){return _t(e,t)})});return yt(function(){var t=bt.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||_t(e,null)}),i.forEach(function(e){r.has(e)||_t(e,a)})}bt.set(n,e)},[e]),n}function St(e){return e}function Ct(e,t){t===void 0&&(t=St);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function wt(e){e===void 0&&(e={});var t=Ct(null);return t.options=P({async:!0,ssr:!1},e),t}var Tt=function(e){var t=e.sideCar,n=pt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return j.createElement(r,P({},n))};Tt.isSideCarExport=!0;function Et(e,t){return e.useMedium(t),Tt}var Dt=wt(),Ot=function(){},L=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:Ot,onWheelCapture:Ot,onTouchMoveCapture:Ot}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=pt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=xt([n,t]),C=P(P({},b),i);return j.createElement(j.Fragment,null,u&&j.createElement(x,{sideCar:Dt,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?j.cloneElement(j.Children.only(s),P(P({},C),{ref:S})):j.createElement(v,P({},C,{className:c,ref:S}),s))});L.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},L.classNames={fullWidth:I,zeroRight:F};var kt=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function At(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=kt();return t&&e.setAttribute(`nonce`,t),e}function jt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mt(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Nt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=At())&&(jt(t,n),Mt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pt=function(){var e=Nt();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ft=function(){var e=Pt();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},It={left:0,top:0,right:0,gap:0},Lt=function(e){return parseInt(e||``,10)||0},Rt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Lt(n),Lt(r),Lt(i)]},zt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return It;var t=Rt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Bt=Ft(),R=`data-scroll-locked`,Vt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
3
|
+
.${ht} {
|
|
4
|
+
overflow: hidden ${r};
|
|
5
|
+
padding-right: ${s}px ${r};
|
|
6
|
+
}
|
|
7
|
+
body[${R}] {
|
|
8
|
+
overflow: hidden ${r};
|
|
9
|
+
overscroll-behavior: contain;
|
|
10
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
11
|
+
padding-left: ${i}px;
|
|
12
|
+
padding-top: ${a}px;
|
|
13
|
+
padding-right: ${o}px;
|
|
14
|
+
margin-left:0;
|
|
15
|
+
margin-top:0;
|
|
16
|
+
margin-right: ${s}px ${r};
|
|
17
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.${F} {
|
|
21
|
+
right: ${s}px ${r};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.${I} {
|
|
25
|
+
margin-right: ${s}px ${r};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.${F} .${F} {
|
|
29
|
+
right: 0 ${r};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.${I} .${I} {
|
|
33
|
+
margin-right: 0 ${r};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body[${R}] {
|
|
37
|
+
${gt}: ${s}px;
|
|
38
|
+
}
|
|
39
|
+
`},Ht=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Ut=function(){j.useEffect(function(){return document.body.setAttribute(R,(Ht()+1).toString()),function(){var e=Ht()-1;e<=0?document.body.removeAttribute(R):document.body.setAttribute(R,e.toString())}},[])},Wt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Ut();var a=j.useMemo(function(){return zt(i)},[i]);return j.createElement(Bt,{styles:Vt(a,!t,i,n?``:`!important`)})},Gt=!1;if(typeof window<`u`)try{var z=Object.defineProperty({},"passive",{get:function(){return Gt=!0,!0}});window.addEventListener(`test`,z,z),window.removeEventListener(`test`,z,z)}catch{Gt=!1}var B=Gt?{passive:!1}:!1,Kt=function(e){return e.tagName===`TEXTAREA`},qt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Kt(e)&&n[t]===`visible`)},Jt=function(e){return qt(e,`overflowY`)},Yt=function(e){return qt(e,`overflowX`)},Xt=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),$t(e,r)){var i=en(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Qt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},$t=function(e,t){return e===`v`?Jt(t):Yt(t)},en=function(e,t){return e===`v`?Zt(t):Qt(t)},tn=function(e,t){return e===`h`&&t===`rtl`?-1:1},nn=function(e,t,n,r,i){var a=tn(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=en(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&$t(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},V=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rn=function(e){return[e.deltaX,e.deltaY]},an=function(e){return e&&`current`in e?e.current:e},on=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sn=function(e){return`
|
|
40
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
41
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
42
|
+
`},cn=0,H=[];function ln(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),i=j.useState(cn++)[0],a=j.useState(Ft)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=mt([e.lockRef.current],(e.shards||[]).map(an),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=j.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=V(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Xt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Xt(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return nn(h,t,e,h===`h`?s:c,!0)},[]),c=j.useCallback(function(e){var n=e;if(!(!H.length||H[H.length-1]!==a)){var r=`deltaY`in n?rn(n):V(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&on(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(an).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=j.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:un(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=j.useCallback(function(e){n.current=V(e),r.current=void 0},[]),d=j.useCallback(function(t){l(t.type,rn(t),t.target,s(t,e.lockRef.current))},[]),f=j.useCallback(function(t){l(t.type,V(t),t.target,s(t,e.lockRef.current))},[]);j.useEffect(function(){return H.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,B),document.addEventListener(`touchmove`,c,B),document.addEventListener(`touchstart`,u,B),function(){H=H.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,B),document.removeEventListener(`touchmove`,c,B),document.removeEventListener(`touchstart`,u,B)}},[]);var p=e.removeScrollBar,m=e.inert;return j.createElement(j.Fragment,null,m?j.createElement(a,{styles:sn(i)}):null,p?j.createElement(Wt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function un(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var dn=Et(Dt,ln),fn=j.forwardRef(function(e,t){return j.createElement(L,P({},e,{ref:t,sideCar:dn}))});fn.classNames=L.classNames;var pn=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},U=new WeakMap,W=new WeakMap,G={},mn=0,hn=function(e){return e&&(e.host||hn(e.parentNode))},gn=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=hn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},_n=function(e,t,n,r){var i=gn(t,Array.isArray(e)?e:[e]);G[n]||(G[n]=new WeakMap);var a=G[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(U.get(e)||0)+1,l=(a.get(e)||0)+1;U.set(e,c),a.set(e,l),o.push(e),c===1&&i&&W.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),mn++,function(){o.forEach(function(e){var t=U.get(e)-1,i=a.get(e)-1;U.set(e,t),a.set(e,i),t||(W.has(e)||e.removeAttribute(r),W.delete(e)),i||e.removeAttribute(n)}),mn--,mn||(U=new WeakMap,U=new WeakMap,W=new WeakMap,G={})}},vn=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||pn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),_n(r,i,n,`aria-hidden`)):function(){return null}},K=`Dialog`,[yn,bn]=h(K),[xn,q]=yn(K),Sn=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=j.useRef(null),c=j.useRef(null),[l,u]=ne({prop:r,defaultProp:i??!1,onChange:a,caller:K});return(0,M.jsx)(xn,{scope:t,triggerRef:s,contentRef:c,contentId:E(),titleId:E(),descriptionId:E(),open:l,onOpenChange:u,onOpenToggle:j.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Sn.displayName=K;var Cn=`DialogTrigger`,wn=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=q(Cn,n),a=O(t,i.triggerRef);return(0,M.jsx)(w.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Un(i.open),...r,ref:a,onClick:C(e.onClick,i.onOpenToggle)})});wn.displayName=Cn;var Tn=`DialogPortal`,[En,Dn]=yn(Tn,{forceMount:void 0}),On=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=q(Tn,t);return(0,M.jsx)(En,{scope:t,forceMount:n,children:j.Children.map(r,e=>(0,M.jsx)(v,{present:n||a.open,children:(0,M.jsx)(lt,{asChild:!0,container:i,children:e})}))})};On.displayName=Tn;var kn=`DialogOverlay`,An=j.forwardRef((e,t)=>{let n=Dn(kn,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=q(kn,e.__scopeDialog);return a.modal?(0,M.jsx)(v,{present:r||a.open,children:(0,M.jsx)(Mn,{...i,ref:t})}):null});An.displayName=kn;var jn=T(`DialogOverlay.RemoveScroll`),Mn=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=q(kn,n);return(0,M.jsx)(fn,{as:jn,allowPinchZoom:!0,shards:[i.contentRef],children:(0,M.jsx)(w.div,{"data-state":Un(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),J=`DialogContent`,Nn=j.forwardRef((e,t)=>{let n=Dn(J,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=q(J,e.__scopeDialog);return(0,M.jsx)(v,{present:r||a.open,children:a.modal?(0,M.jsx)(Pn,{...i,ref:t}):(0,M.jsx)(Fn,{...i,ref:t})})});Nn.displayName=J;var Pn=j.forwardRef((e,t)=>{let n=q(J,e.__scopeDialog),r=j.useRef(null),i=O(t,n.contentRef,r);return j.useEffect(()=>{let e=r.current;if(e)return vn(e)},[]),(0,M.jsx)(In,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:C(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:C(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:C(e.onFocusOutside,e=>e.preventDefault())})}),Fn=j.forwardRef((e,t)=>{let n=q(J,e.__scopeDialog),r=j.useRef(!1),i=j.useRef(!1);return(0,M.jsx)(In,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),In=j.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=q(J,n),c=j.useRef(null),l=O(t,c);return dt(),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Ze,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Be,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Un(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(qn,{titleId:s.titleId}),(0,M.jsx)(Yn,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Ln=`DialogTitle`,Rn=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=q(Ln,n);return(0,M.jsx)(w.h2,{id:i.titleId,...r,ref:t})});Rn.displayName=Ln;var zn=`DialogDescription`,Bn=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=q(zn,n);return(0,M.jsx)(w.p,{id:i.descriptionId,...r,ref:t})});Bn.displayName=zn;var Vn=`DialogClose`,Hn=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=q(Vn,n);return(0,M.jsx)(w.button,{type:`button`,...r,ref:t,onClick:C(e.onClick,()=>i.onOpenChange(!1))})});Hn.displayName=Vn;function Un(e){return e?`open`:`closed`}var Wn=`DialogTitleWarning`,[Gn,Kn]=m(Wn,{contentName:J,titleName:Ln,docsSlug:`dialog`}),qn=({titleId:e})=>{let t=Kn(Wn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
43
|
+
|
|
44
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
45
|
+
|
|
46
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Jn=`DialogDescriptionWarning`,Yn=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kn(Jn).contentName}}.`;return j.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Xn=Sn,Zn=wn,Qn=On,$n=An,er=Nn,tr=Rn,nr=Bn,rr=Hn;function ir({...e}){return(0,M.jsx)(Xn,{"data-slot":`sheet`,...e})}function ar({...e}){return(0,M.jsx)(Zn,{"data-slot":`sheet-trigger`,...e})}function or({...e}){return(0,M.jsx)(Qn,{"data-slot":`sheet-portal`,...e})}function sr({className:e,...t}){return(0,M.jsx)($n,{"data-slot":`sheet-overlay`,className:k(`fixed inset-0 z-50 bg-background/80 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function cr({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,M.jsxs)(or,{children:[(0,M.jsx)(sr,{}),(0,M.jsxs)(er,{"data-slot":`sheet-content`,"data-side":n,className:k(`fixed z-50 flex flex-col border-border bg-popover text-sm text-popover-foreground shadow-sm transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&(0,M.jsx)(rr,{"data-slot":`sheet-close`,asChild:!0,children:(0,M.jsxs)(A,{variant:`ghost`,className:`absolute top-4 right-4`,size:`icon-sm`,children:[(0,M.jsx)(Te,{className:`size-4`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function lr({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`sheet-header`,className:k(`flex flex-col gap-1.5 p-6`,e),...t})}function ur({className:e,...t}){return(0,M.jsx)(tr,{"data-slot":`sheet-title`,className:k(`font-heading text-base font-medium text-foreground`,e),...t})}function dr({className:e,...t}){return(0,M.jsx)(nr,{"data-slot":`sheet-description`,className:k(`text-sm text-muted-foreground`,e),...t})}function fr(e,[t,n]){return Math.min(n,Math.max(t,e))}function pr(e,t){return j.useReducer((e,n)=>t[e][n]??e,e)}var mr=`ScrollArea`,[hr,gr]=h(mr),[_r,Y]=hr(mr),vr=j.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=j.useState(null),[l,u]=j.useState(null),[d,p]=j.useState(null),[m,h]=j.useState(null),[g,_]=j.useState(null),[v,y]=j.useState(0),[b,x]=j.useState(0),[S,C]=j.useState(!1),[T,ee]=j.useState(!1),E=O(t,e=>c(e)),te=f(i);return(0,M.jsx)(_r,{scope:n,type:r,dir:te,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:p,scrollbarX:m,onScrollbarXChange:h,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:_,scrollbarYEnabled:T,onScrollbarYEnabledChange:ee,onCornerWidthChange:y,onCornerHeightChange:x,children:(0,M.jsx)(w.div,{dir:te,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":v+`px`,"--radix-scroll-area-corner-height":b+`px`,...e.style}})})});vr.displayName=mr;var yr=`ScrollAreaViewport`,br=j.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=Y(yr,n),s=j.useRef(null),c=O(t,s,o.onViewportChange);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,M.jsx)(w.div,{"data-radix-scroll-area-viewport":``,...a,ref:c,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,M.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});br.displayName=yr;var X=`ScrollAreaScrollbar`,xr=j.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Y(X,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return j.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,M.jsx)(Sr,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,M.jsx)(Cr,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,M.jsx)(wr,{...r,ref:t,forceMount:n}):i.type===`always`?(0,M.jsx)(Tr,{...r,ref:t}):null});xr.displayName=X;var Sr=j.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Y(X,e.__scopeScrollArea),[a,o]=j.useState(!1);return j.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,M.jsx)(v,{present:n||a,children:(0,M.jsx)(wr,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),Cr=j.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Y(X,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=Wr(()=>c(`SCROLL_END`),100),[s,c]=pr(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return j.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),j.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,M.jsx)(v,{present:n||s!==`hidden`,children:(0,M.jsx)(Tr,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:C(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:C(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),wr=j.forwardRef((e,t)=>{let n=Y(X,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=j.useState(!1),s=e.orientation===`horizontal`,c=Wr(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return Q(n.viewport,c),Q(n.content,c),(0,M.jsx)(v,{present:r||a,children:(0,M.jsx)(Tr,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),Tr=j.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=Y(X,e.__scopeScrollArea),a=j.useRef(null),o=j.useRef(0),[s,c]=j.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Lr(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return zr(e,o.current,s,t)}return n===`horizontal`?(0,M.jsx)(Er,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Br(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,M.jsx)(Dr,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Br(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),Er=j.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=Y(X,e.__scopeScrollArea),[o,s]=j.useState(),c=j.useRef(null),l=O(t,c,a.onScrollbarXChange);return j.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,M.jsx)(Ar,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":Rr(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Hr(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Ir(o.paddingLeft),paddingEnd:Ir(o.paddingRight)}})}})}),Dr=j.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=Y(X,e.__scopeScrollArea),[o,s]=j.useState(),c=j.useRef(null),l=O(t,c,a.onScrollbarYChange);return j.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,M.jsx)(Ar,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":Rr(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Hr(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Ir(o.paddingTop),paddingEnd:Ir(o.paddingBottom)}})}})}),[Or,kr]=hr(X),Ar=j.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=Y(X,n),[m,h]=j.useState(null),g=O(t,e=>h(e)),_=j.useRef(null),v=j.useRef(``),y=p.viewport,b=r.content-r.viewport,x=S(u),T=S(c),ee=Wr(d,10);function E(e){if(_.current){let t=e.clientX-_.current.left,n=e.clientY-_.current.top;l({x:t,y:n})}}return j.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&x(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b,x]),j.useEffect(T,[r,T]),Q(m,ee),Q(p.content,ee),(0,M.jsx)(Or,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:S(a),onThumbPointerUp:S(o),onThumbPositionChange:T,onThumbPointerDown:S(s),children:(0,M.jsx)(w.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:C(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),E(e))}),onPointerMove:C(e.onPointerMove,E),onPointerUp:C(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),Z=`ScrollAreaThumb`,jr=j.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=kr(Z,e.__scopeScrollArea);return(0,M.jsx)(v,{present:n||i.hasThumb,children:(0,M.jsx)(Mr,{ref:t,...r})})}),Mr=j.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=Y(Z,n),o=kr(Z,n),{onThumbPositionChange:s}=o,c=O(t,e=>o.onThumbChange(e)),l=j.useRef(void 0),u=Wr(()=>{l.current&&=(l.current(),void 0)},100);return j.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{if(u(),!l.current){let t=Ur(e,s);l.current=t,s()}};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,M.jsx)(w.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:C(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:C(e.onPointerUp,o.onThumbPointerUp)})});jr.displayName=Z;var Nr=`ScrollAreaCorner`,Pr=j.forwardRef((e,t)=>{let n=Y(Nr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,M.jsx)(Fr,{...e,ref:t}):null});Pr.displayName=Nr;var Fr=j.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=Y(Nr,n),[a,o]=j.useState(0),[s,c]=j.useState(0),l=!!(a&&s);return Q(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),Q(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,M.jsx)(w.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function Ir(e){return e?parseInt(e,10):0}function Lr(e,t){let n=e/t;return isNaN(n)?0:n}function Rr(e){let t=Lr(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function zr(e,t,n,r=`ltr`){let i=Rr(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Vr([c,l],d)(e)}function Br(e,t,n=`ltr`){let r=Rr(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=fr(e,n===`ltr`?[0,o]:[o*-1,0]);return Vr([0,o],[0,s])(c)}function Vr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Hr(e,t){return e>0&&e<t}var Ur=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function Wr(e,t){let n=S(e),r=j.useRef(0);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),j.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Q(e,t){let n=S(t);y(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var Gr=vr,Kr=br,qr=Pr;function Jr({className:e,children:t,...n}){return(0,M.jsxs)(Gr,{"data-slot":`scroll-area`,className:k(`relative`,e),...n,children:[(0,M.jsx)(Kr,{"data-slot":`scroll-area-viewport`,className:`size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`,children:t}),(0,M.jsx)(Yr,{}),(0,M.jsx)(qr,{})]})}function Yr({className:e,orientation:t=`vertical`,...n}){return(0,M.jsx)(xr,{"data-slot":`scroll-area-scrollbar`,"data-orientation":t,orientation:t,className:k(`flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,e),...n,children:(0,M.jsx)(jr,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}var Xr=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-2%20-2%20240%2024'%20fill='none'%20role='img'%20aria-label='0.security'%3e%3cpath%20fill='%23FD802E'%20d='M12.5%202%20H17.5%20L7.5%2018%20H2.5%20Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='evenodd'%20d='M4%200%20H16%20L20%204%20V16%20L16%2020%20H4%20L0%2016%20V4%20Z%20M4%205%20V15%20L5%2016%20H15%20L16%2015%20V5%20L15%204%20H5%20Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='nonzero'%20transform='translate(28,0)'%20d='M0%200%20H20%20V4%20H0%20Z%20M0%204%20H4%20V8%20H0%20Z%20M0%208%20H20%20V12%20H0%20Z%20M16%2012%20H20%20V16%20H16%20Z%20M0%2016%20H20%20V20%20H0%20Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='nonzero'%20transform='translate(56,0)'%20d='M0%200%20H20%20V4%20H0%20Z%20M0%200%20H4%20V20%20H0%20Z%20M0%208%20H16%20V12%20H0%20Z%20M0%2016%20H20%20V20%20H0%20Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='nonzero'%20transform='translate(84,0)'%20d='M0%200%20H20%20V4%20H0%20Z%20M0%200%20H4%20V20%20H0%20Z%20M0%2016%20H20%20V20%20H0%20Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='nonzero'%20transform='translate(112,0)'%20d='M0%200H4V16H16V0H20V20H0Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='evenodd'%20transform='translate(140,0)'%20d='M0%200H20V12H12L20%2020H14.4L6.4%2012H4V20H0Z%20M4%204V8H16V4Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='nonzero'%20transform='translate(168,0)'%20d='M0%200H12V4H8V16H12V20H0V16H4V4H0Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='nonzero'%20transform='translate(188,0)'%20d='M0%200H20V4H12V20H8V4H0Z'/%3e%3cpath%20fill='%23403D39'%20fill-rule='nonzero'%20transform='translate(216,0)'%20d='M0%200H4V8H16V0H20V12H12V20H8V12H0Z'/%3e%3c/svg%3e`,Zr=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-2%20-2%20240%2024'%20fill='none'%20role='img'%20aria-label='0.security'%3e%3cpath%20fill='%23FD802E'%20d='M12.5%202%20H17.5%20L7.5%2018%20H2.5%20Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='evenodd'%20d='M4%200%20H16%20L20%204%20V16%20L16%2020%20H4%20L0%2016%20V4%20Z%20M4%205%20V15%20L5%2016%20H15%20L16%2015%20V5%20L15%204%20H5%20Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='nonzero'%20transform='translate(28,0)'%20d='M0%200%20H20%20V4%20H0%20Z%20M0%204%20H4%20V8%20H0%20Z%20M0%208%20H20%20V12%20H0%20Z%20M16%2012%20H20%20V16%20H16%20Z%20M0%2016%20H20%20V20%20H0%20Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='nonzero'%20transform='translate(56,0)'%20d='M0%200%20H20%20V4%20H0%20Z%20M0%200%20H4%20V20%20H0%20Z%20M0%208%20H16%20V12%20H0%20Z%20M0%2016%20H20%20V20%20H0%20Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='nonzero'%20transform='translate(84,0)'%20d='M0%200%20H20%20V4%20H0%20Z%20M0%200%20H4%20V20%20H0%20Z%20M0%2016%20H20%20V20%20H0%20Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='nonzero'%20transform='translate(112,0)'%20d='M0%200H4V16H16V0H20V20H0Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='evenodd'%20transform='translate(140,0)'%20d='M0%200H20V12H12L20%2020H14.4L6.4%2012H4V20H0Z%20M4%204V8H16V4Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='nonzero'%20transform='translate(168,0)'%20d='M0%200H12V4H8V16H12V20H0V16H4V4H0Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='nonzero'%20transform='translate(188,0)'%20d='M0%200H20V4H12V20H8V4H0Z'/%3e%3cpath%20fill='%23FCFAF6'%20fill-rule='nonzero'%20transform='translate(216,0)'%20d='M0%200H4V8H16V0H20V12H12V20H8V12H0Z'/%3e%3c/svg%3e`;function Qr({compact:e=!1,className:t}){return e?(0,M.jsxs)(`svg`,{role:`img`,"aria-label":`0.security`,viewBox:`-2 -2 24 24`,className:k(`size-9 text-[#403D39] dark:text-[#FCFAF6]`,t),children:[(0,M.jsx)(`path`,{fill:`#FD802E`,d:`M12.5 2 H17.5 L7.5 18 H2.5 Z`}),(0,M.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M4 0 H16 L20 4 V16 L16 20 H4 L0 16 V4 Z M4 5 V15 L5 16 H15 L16 15 V5 L15 4 H5 Z`})]}):(0,M.jsxs)(`div`,{className:k(`space-y-2`,t),children:[(0,M.jsx)(`img`,{alt:`0.security`,src:Xr,width:240,height:24,className:`h-auto w-48 max-w-full dark:hidden`}),(0,M.jsx)(`img`,{alt:`0.security`,src:Zr,width:240,height:24,className:`hidden h-auto w-48 max-w-full dark:block`}),(0,M.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`0.security operator shell`})]})}function $r({className:e,...t}){return(0,M.jsx)(`nav`,{"aria-label":`breadcrumb`,"data-slot":`breadcrumb`,className:k(e),...t})}function ei({className:e,...t}){return(0,M.jsx)(`ol`,{"data-slot":`breadcrumb-list`,className:k(`flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5`,e),...t})}function ti({className:e,...t}){return(0,M.jsx)(`li`,{"data-slot":`breadcrumb-item`,className:k(`inline-flex items-center gap-1.5`,e),...t})}function ni({className:e,...t}){return(0,M.jsx)(`span`,{"data-slot":`breadcrumb-page`,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:k(`font-normal text-foreground`,e),...t})}function ri({children:e,className:t,...n}){return(0,M.jsx)(`li`,{"data-slot":`breadcrumb-separator`,role:`presentation`,"aria-hidden":`true`,className:k(`[&>svg]:size-3.5`,t),...n,children:e??(0,M.jsx)(fe,{})})}function ii(e){return e.startsWith(`/dashboard`)?`Operations center`:e.startsWith(`/threads`)||e.startsWith(`/findings`)?`Findings workspace`:e.startsWith(`/runs`)||e.startsWith(`/scans`)?`Run dossier`:`Operations center`}function ai(e){return e.startsWith(`/dashboard`)?`Operations`:e.startsWith(`/threads`)||e.startsWith(`/findings`)?`Findings`:e.startsWith(`/runs`)||e.startsWith(`/scans`)?`Runs`:`Control`}function oi(e=`default`){return e===`success`?`text-emerald-700 dark:text-emerald-300`:e===`warning`?`text-amber-700 dark:text-amber-300`:e===`danger`?`text-destructive`:`text-foreground`}function si(e,t){let n=new Map((t??[]).map(e=>[e.id,e.runtime]));return e.filter(e=>{if([`agent_error`,`scan_error`,`worker_failed`].includes(e.eventType))return!0;let t=e.payload??{},n=typeof t.summary==`string`&&t.summary.trim()?t.summary.trim():e.summary;return[`stage_complete`,`agent_complete`,`runtime_incompatible`].includes(e.eventType)&&/max turns|did not emit required tool_call/i.test(n)}).sort((e,t)=>t.timestamp-e.timestamp).map(e=>{let t=e.payload??{},r=n.get(e.scanId),i=typeof t.error==`string`&&t.error.trim()?t.error.trim():typeof t.summary==`string`&&t.summary.trim()?t.summary.trim():e.summary;return{scanId:e.scanId,scanTarget:e.scanTarget,stage:r?`${e.stage} · ${r}`:e.stage,actor:e.agentRole??null,headline:i,timestamp:e.timestamp}})}function ci({pathname:e,dashboard:t,scans:n,incidents:r}){let i=t?.groups??[],a=n??[],o=t?.workers.filter(e=>e.isActive&&e.status!==`stopped`).length??0,s=t?.queue.runnable??0,c=i.filter(e=>e.workflow.phase===`blocked`).length,l=i.filter(e=>e.workflow.reviewGate===`human_review`).length,u=i.filter(e=>e.workflow.reviewGate===`agent_review`).length,d=i.filter(e=>!e.workflow.assignee).length,f=i.filter(e=>e.latest.triageStatus===`new`).length,p=i.filter(e=>e.workflow.phase===`in_progress`||e.workflow.activeAgentRoles.length>0).length,m=i.filter(e=>e.workflow.consensus===`verified`).length,h=a.filter(e=>e.status===`running`).length,g=a.filter(e=>e.status===`completed`).length,_=new Set(a.map(e=>e.target)).size,v=[...new Set(a.map(e=>e.runtime))],y=[...a].sort((e,t)=>t.startedAt.localeCompare(e.startedAt))[0]??null,b=r[0]??null,S=r.filter(e=>/quota|provider|model|rate limit|openai|anthropic|gemini|claude/i.test(`${e.headline} ${e.stage} ${e.actor??``}`)).length;return e.startsWith(`/threads`)||e.startsWith(`/findings`)?{title:`Findings workspace`,summary:`Review deduplicated evidence, continue the cases that need judgment, and return to the scoped chat workspace when execution needs direction.`,sections:[{label:`Queue`,items:[{label:`Finding families`,value:String(i.length),meta:`deduplicated observations across runs`},{label:`New`,value:String(f),meta:`awaiting a first decision or investigation`},{label:`Human review`,value:String(l),meta:`ready for operator disposition`,tone:l>0?`warning`:`default`},{label:`Agent review`,value:String(u),meta:`needs another evidence pass`}]},{label:`Execution`,items:[{label:`In progress`,value:String(p),meta:`families with active worker movement`,tone:p>0?`success`:`default`},{label:`Blocked`,value:String(c),meta:`needs access, context, or stronger proof`,tone:c>0?`danger`:`default`},{label:`Unassigned`,value:String(d),meta:`no explicit owner attached yet`},{label:`Verified`,value:String(m),meta:`consensus supports a true positive`}],note:b?`Runtime pressure is visible elsewhere too: ${b.scanTarget} failed ${x(b.timestamp)}.`:`Open a finding to copy a context-preserving console handoff.`}]}:e.startsWith(`/runs`)||e.startsWith(`/scans`)?{title:`Run dossiers`,summary:`Inspect provenance by target, then drill into a selected execution and its output findings.`,sections:[{label:`Inventory`,items:[{label:`Targets`,value:String(_),meta:`unique targets in local history`},{label:`Runs`,value:String(a.length),meta:`persisted executions across all targets`},{label:`Active`,value:String(h),meta:`runs still executing now`,tone:h>0?`success`:`default`},{label:`Completed`,value:String(g),meta:`finished without staying in running state`}]},{label:`Runtime`,items:[{label:`Incidents`,value:String(r.length),meta:S>0?`${S} provider/runtime failures`:`no recent failures`,tone:r.length>0?`danger`:`success`},{label:`Workers`,value:String(o),meta:s>0?`${s} runnable work items queued`:`no runnable backlog`},{label:`Runtimes`,value:v.length>0?v.slice(0,3).join(`, `):`none`,meta:v.length>3?`${v.length} runtimes observed`:`runtime mix in run history`},{label:`Latest target`,value:y?.target??`none`,meta:y?x(y.startedAt):`launch a target to create the first dossier`}],note:b?`${b.scanTarget}: ${b.headline}`:`Provider and worker failures should surface here before you dive into a single run.`}]}:{title:`Operations control`,summary:`Run the autonomous control plane, watch queue health, and intervene only when automation hits a real boundary.`,sections:[{label:`Runtime`,items:[{label:`Daemon`,value:o>0?`live`:`offline`,meta:o>0?`${o} active workers heartbeating`:`launch a target or start a daemon`,tone:o>0?`success`:`warning`},{label:`Runnable`,value:String(s),meta:`work items ready to claim next`},{label:`Active runs`,value:String(h),meta:`pipeline executions still in flight`,tone:h>0?`success`:`default`},{label:`Incidents`,value:String(r.length),meta:S>0?`${S} provider/runtime failures`:`clean recent event window`,tone:r.length>0?`danger`:`success`}]},{label:`Review`,items:[{label:`Human review`,value:String(l),meta:`findings waiting on operator sign-off`,tone:l>0?`warning`:`default`},{label:`Blocked`,value:String(c),meta:`access or context gap in execution`,tone:c>0?`danger`:`default`},{label:`Unassigned`,value:String(d),meta:`findings without a named owner`},{label:`Targets`,value:String(_),meta:`real target history in this workspace`}],note:b?`${b.scanTarget}: ${b.headline}`:`No recent runtime failures. Launch the next target from operations.`}]}}function li({children:e,dashboard:t,scans:n,onOpenPalette:r}){let i=c(),{panel:a,dismissPanel:o}=Oe(),[s,l]=(0,j.useState)(()=>typeof window>`u`||window.matchMedia(`(min-width: 1280px)`).matches),u=t?.groups.filter(e=>e.latest.triageStatus===`new`).length??0,f=n?.filter(e=>e.status===`running`).length??0,p=t?.workers.filter(e=>e.isActive).length??0,m=t?.queue.runnable??0,h=d({queryKey:[`shell-recent-events`],queryFn:()=>g(18),refetchInterval:5e3}),_=(0,j.useMemo)(()=>si(h.data?.events??[],n).slice(0,6),[h.data?.events,n]),v=_[0]??null,y=(0,j.useMemo)(()=>ci({pathname:i.pathname,dashboard:t,scans:n,incidents:_}),[t,i.pathname,_,n]),b=_.filter(e=>/quota|provider|model|rate limit|openai|anthropic|gemini|claude/i.test(`${e.headline} ${e.stage} ${e.actor??``}`)).length;return(0,j.useEffect)(()=>{let e=window.matchMedia(`(min-width: 1280px)`),t=()=>l(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,M.jsxs)(`div`,{className:`min-h-screen bg-background text-foreground`,children:[(0,M.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,M.jsxs)(`aside`,{className:`sticky top-0 hidden h-screen w-[22rem] shrink-0 border-r border-border bg-background xl:grid xl:grid-cols-[4.5rem_minmax(0,1fr)]`,children:[(0,M.jsxs)(`div`,{className:`flex h-screen flex-col items-center border-r border-border px-2 py-3`,children:[(0,M.jsx)(Qr,{compact:!0,className:`size-9`}),(0,M.jsxs)(`nav`,{className:`mt-6 flex flex-1 flex-col items-center gap-2`,children:[!1,(0,M.jsx)(ui,{to:`/dashboard`,label:`Operations`,icon:ge}),(0,M.jsx)(ui,{to:`/findings`,label:`Findings`,icon:xe,badge:u}),(0,M.jsx)(ui,{to:`/runs`,label:`Runs`,icon:ye,badge:f}),(0,M.jsx)(ui,{to:`/live`,label:`Live workflow`,icon:be})]}),(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-1 text-center`,children:[(0,M.jsx)(A,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,onClick:r,"aria-label":`Open launchpad`,children:(0,M.jsx)(me,{className:`size-4`})}),(0,M.jsx)(`div`,{className:`text-[10px] uppercase tracking-[0.2em] text-muted-foreground`,children:`Cmd K`})]}),(0,M.jsxs)(`div`,{className:`w-full rounded-md bg-muted/40 px-2 py-2 text-center`,children:[(0,M.jsx)(`div`,{className:`text-[10px] uppercase tracking-[0.2em] text-muted-foreground`,children:`Queue`}),(0,M.jsx)(`div`,{className:`mt-1 text-sm font-medium text-foreground`,children:m})]})]})]}),(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-col`,children:[(0,M.jsxs)(`div`,{className:`border-b border-border px-4 py-4`,children:[(0,M.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:ai(i.pathname)}),(0,M.jsx)(`div`,{className:`mt-2 text-base font-medium text-foreground`,children:y.title}),(0,M.jsx)(`div`,{className:`mt-1 text-sm leading-6 text-muted-foreground`,children:y.summary})]}),(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:(0,M.jsxs)(`div`,{className:`space-y-5`,children:[y.sections.map(e=>(0,M.jsxs)(fi,{label:e.label,children:[e.items.map(e=>(0,M.jsx)(pi,{label:e.label,value:e.value,meta:e.meta,tone:e.tone},e.label)),e.note?(0,M.jsx)(hi,{text:e.note}):null]},e.label)),(0,M.jsxs)(fi,{label:`Hotkeys`,children:[(0,M.jsx)(mi,{text:`Cmd/Ctrl+K launchpad`}),(0,M.jsx)(mi,{text:`/ search`}),(0,M.jsx)(mi,{text:`Esc close overlays`})]})]})})]})]}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,M.jsx)(`header`,{className:`sticky top-0 z-20 border-b border-border bg-background/95 backdrop-blur`,children:(0,M.jsxs)(`div`,{className:`mx-auto flex max-w-[1800px] flex-col gap-3 px-4 py-3 sm:px-6 xl:flex-row xl:items-center xl:justify-between`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 xl:hidden`,children:[(0,M.jsxs)(ir,{children:[(0,M.jsx)(ar,{asChild:!0,children:(0,M.jsx)(A,{variant:`ghost`,size:`icon-sm`,"aria-label":`Open navigation`,children:(0,M.jsx)(ve,{className:`size-4`})})}),(0,M.jsxs)(cr,{side:`left`,className:`w-72 p-0`,children:[(0,M.jsxs)(lr,{className:`border-b border-border px-4 py-4 pr-12 text-left`,children:[(0,M.jsx)(`div`,{className:`mb-2`,children:(0,M.jsx)(Qr,{})}),(0,M.jsx)(ur,{className:`text-base font-semibold text-foreground`,children:`Operator shell`}),(0,M.jsx)(dr,{className:`text-sm text-muted-foreground`,children:`Navigation, runtime posture, and route-specific context.`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-5 px-3 py-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[!1,(0,M.jsx)(di,{to:`/dashboard`,label:`Operations`,meta:`Launch, queue, worker control`,icon:ge}),(0,M.jsx)(di,{to:`/findings`,label:`Findings`,meta:`Evidence, review, chat context`,icon:xe,badge:u}),(0,M.jsx)(di,{to:`/runs`,label:`Runs`,meta:`Runs, provenance, timelines`,icon:ye,badge:f}),(0,M.jsx)(di,{to:`/live`,label:`Live workflow`,meta:`GemmaForge probe → leads → hunt`,icon:be})]}),y.sections.map(e=>(0,M.jsxs)(fi,{label:e.label,children:[e.items.map(e=>(0,M.jsx)(pi,{label:e.label,value:e.value,meta:e.meta,tone:e.tone},e.label)),e.note?(0,M.jsx)(hi,{text:e.note}):null]},e.label))]})]})]}),(0,M.jsx)(Qr,{compact:!0,className:`size-8 rounded-sm`})]}),(0,M.jsx)($r,{children:(0,M.jsxs)(ei,{children:[(0,M.jsx)(ti,{children:(0,M.jsx)(ni,{children:ii(i.pathname)})}),(0,M.jsx)(ri,{}),(0,M.jsx)(ti,{children:(0,M.jsx)(ni,{children:ai(i.pathname)})})]})})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsxs)(`div`,{className:`hidden flex-wrap items-center gap-2 lg:flex`,children:[(0,M.jsxs)(gi,{tone:p>0?`success`:`warning`,children:[(0,M.jsx)(de,{className:`size-3.5`}),p>0?`${p} daemon live`:`daemon offline`]}),(0,M.jsx)(gi,{tone:_.length>0?`danger`:`success`,children:_.length>0?`${_.length} incidents`:`runtime clean`}),b>0?(0,M.jsxs)(gi,{tone:`danger`,children:[b,` provider`]}):null,v?(0,M.jsxs)(`div`,{className:`max-w-[24rem] truncate text-sm text-muted-foreground`,children:[v.scanTarget,`: `,v.headline]}):(0,M.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[t?.groups.length??0,` finding families tracked`]})]}),(0,M.jsxs)(A,{variant:`default`,onClick:r,children:[(0,M.jsx)(me,{className:`size-4`}),`Launchpad`]})]})]})}),(0,M.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1800px] flex-1 min-h-0`,children:[(0,M.jsx)(`main`,{className:`min-w-0 flex-1 px-4 py-5 sm:px-6`,children:(0,M.jsx)(`div`,{className:`flex min-h-full min-w-0 flex-col gap-5`,children:e})}),a?(0,M.jsx)(`aside`,{className:`hidden w-[32rem] shrink-0 border-l border-border bg-background xl:flex xl:flex-col`,children:(0,M.jsxs)(`div`,{className:`sticky top-[4.5625rem] flex h-[calc(100vh-4.5625rem)] flex-col`,children:[(0,M.jsxs)(`div`,{className:`border-b border-border px-6 py-6 pr-12`,children:[(0,M.jsx)(`div`,{className:`font-heading text-base font-medium text-foreground`,children:a.title}),(0,M.jsx)(`div`,{className:`mt-1 text-sm text-muted-foreground`,children:a.description})]}),(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:a.content}),(0,M.jsx)(`div`,{className:`border-t border-border p-4`,children:(0,M.jsx)(A,{variant:`outline`,size:`sm`,onClick:o,children:`Close panel`})})]})}):null]})]})]}),(0,M.jsx)(ir,{open:!!a&&!s,onOpenChange:e=>{e||o()},children:(0,M.jsx)(cr,{side:`right`,className:`w-full overflow-y-auto p-0 sm:max-w-2xl`,children:a?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(lr,{className:`border-b border-border pr-12`,children:[(0,M.jsx)(ur,{children:a.title}),(0,M.jsx)(dr,{children:a.description})]}),a.content]}):null})})]})}function ui({to:e,label:t,icon:n,badge:r=0,reloadDocument:i=!1}){return(0,M.jsx)(s,{to:e,"aria-label":t,reloadDocument:i,children:({isActive:e})=>(0,M.jsxs)(`div`,{className:k(`relative flex size-11 items-center justify-center rounded-md transition-colors`,e?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:[(0,M.jsx)(n,{className:`size-4`}),r>0?(0,M.jsx)(`span`,{className:`absolute right-1 top-1 min-w-4 rounded-sm bg-destructive px-1 text-center text-[9px] font-semibold leading-4 text-destructive-foreground`,children:r}):null,(0,M.jsx)(`span`,{className:`sr-only`,children:t})]})})}function di({to:e,label:t,meta:n,icon:r,badge:i=0,reloadDocument:a=!1}){return(0,M.jsx)(s,{to:e,reloadDocument:a,children:({isActive:e})=>(0,M.jsxs)(`div`,{className:k(`flex items-start gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium transition-colors`,e?`bg-primary/8 text-foreground`:`text-foreground/80 hover:bg-primary/6 hover:text-foreground`),children:[(0,M.jsx)(r,{className:k(`mt-0.5 size-4 shrink-0`,e&&`text-primary-text`)}),(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`div`,{className:`truncate`,children:t}),(0,M.jsx)(`div`,{className:k(`truncate text-xs`,e?`text-foreground/70`:`text-muted-foreground`),children:n})]}),i>0?(0,M.jsx)(`span`,{className:`mt-0.5 rounded-sm bg-primary px-1.5 py-0.5 text-[10px] leading-none text-primary-foreground`,children:i}):null]})})}function fi({label:e,children:t}){return(0,M.jsxs)(`section`,{className:`space-y-2`,children:[(0,M.jsx)(`div`,{className:`px-3 text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70`,children:e}),(0,M.jsx)(`div`,{className:`flex flex-col gap-1`,children:t})]})}function pi({label:e,value:t,meta:n,tone:r=`default`}){return(0,M.jsx)(`div`,{className:`rounded-md border border-border bg-muted/20 px-3 py-3`,children:(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`div`,{className:`text-sm text-foreground`,children:e}),(0,M.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:n})]}),(0,M.jsx)(`div`,{className:k(`shrink-0 text-sm font-medium`,oi(r)),children:t})]})})}function mi({text:e}){return(0,M.jsx)(`div`,{className:`px-3 py-2 text-sm text-muted-foreground`,children:e})}function hi({text:e}){return(0,M.jsx)(`div`,{className:`rounded-md border border-dashed border-border px-3 py-3 text-xs leading-5 text-muted-foreground`,children:e})}function gi({children:e,tone:t=`default`}){return(0,M.jsx)(ce,{variant:t===`success`?`success`:t===`warning`?`warning`:t===`danger`?`danger`:`neutral`,className:`gap-1.5`,children:e})}function _i({...e}){return(0,M.jsx)(Xn,{"data-slot":`dialog`,...e})}function vi({...e}){return(0,M.jsx)(Qn,{"data-slot":`dialog-portal`,...e})}function yi({className:e,...t}){return(0,M.jsx)($n,{"data-slot":`dialog-overlay`,className:k(`fixed inset-0 isolate z-50 bg-background/80 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function bi({className:e,children:t,showCloseButton:n=!0,...r}){return(0,M.jsxs)(vi,{children:[(0,M.jsx)(yi,{}),(0,M.jsxs)(er,{"data-slot":`dialog-content`,className:k(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl border border-border bg-popover p-6 text-sm text-popover-foreground shadow-sm duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,M.jsx)(rr,{"data-slot":`dialog-close`,asChild:!0,children:(0,M.jsxs)(A,{variant:`ghost`,className:`absolute top-4 right-4`,size:`icon-sm`,children:[(0,M.jsx)(Te,{className:`size-4`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function xi({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`dialog-header`,className:k(`flex flex-col gap-1.5`,e),...t})}function Si({className:e,...t}){return(0,M.jsx)(tr,{"data-slot":`dialog-title`,className:k(`font-heading text-base leading-none font-medium`,e),...t})}function Ci({className:e,...t}){return(0,M.jsx)(nr,{"data-slot":`dialog-description`,className:k(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}var wi=[`Actions`,`Pages`,`Findings`,`Runs`];function Ti({open:e,onOpenChange:n,dashboard:r,scans:i}){let a=t(),o=c(),s=re(),[l,f]=(0,j.useState)(``),p=(0,j.useDeferredValue)(l),m=o.pathname.match(/^\/(?:threads|findings)\/([^/]+)/)?.[1]??null,h=o.pathname.match(/^\/(?:runs|scans)\/([^/]+)/)?.[1]??null,g=d({queryKey:[`finding-family`,m],queryFn:()=>_(m),enabled:e&&!!m}),v=te({mutationFn:({triageStatus:e,triageNote:t})=>u(m,e,t),onSuccess:async()=>{await Promise.all([s.invalidateQueries({queryKey:[`dashboard`]}),s.invalidateQueries({queryKey:[`finding-family`,m]})])}}),y=(0,j.useMemo)(()=>{let e=[{id:`page-findings`,group:`Pages`,label:`Open findings workspace`,meta:`Evidence, chat handoff, disposition`,icon:he,keywords:[`findings families review evidence console handoff`],run:()=>a(`/findings`)},{id:`page-control`,group:`Pages`,label:`Open operations home`,meta:`Launch, queue, worker control`,icon:ge,keywords:[`operations dashboard overview launch workers queue`],run:()=>a(`/dashboard`)},{id:`page-scans`,group:`Pages`,label:`Open runs`,meta:`Run history and provenance`,icon:pe,keywords:[`scans runs timeline history`],run:()=>a(`/runs`)}];m&&e.unshift({id:`triage-accept`,group:`Actions`,label:`Accept selected finding`,meta:`Mark the finding family as accepted`,icon:Se,keywords:[`accept finding triage`],shortcut:`Enter`,run:()=>v.mutate({triageStatus:`accepted`,triageNote:g.data?.latest.triageNote??``})},{id:`triage-suppress`,group:`Actions`,label:`Suppress selected finding`,meta:`Suppress the finding family`,icon:Ce,keywords:[`suppress finding triage`],shortcut:`Shift+S`,run:()=>v.mutate({triageStatus:`suppressed`,triageNote:g.data?.latest.triageNote??``})}),h&&e.unshift({id:`scan-detail`,group:`Actions`,label:`Focus selected scan timeline`,meta:`Open current run detail`,icon:pe,keywords:[`scan timeline detail current`],run:()=>a(`/runs/${h}`)});for(let t of r?.groups.slice(0,14)??[])e.push({id:`finding-${t.fingerprint}`,group:`Findings`,label:t.latest.title,meta:`${t.latest.severity} · ${t.latest.triageStatus}`,icon:he,keywords:[t.latest.title,t.latest.category,t.latest.severity,t.latest.triageStatus],run:()=>a(`/findings/${t.fingerprint}`)});for(let t of i?.slice(0,14)??[])e.push({id:`scan-${t.id}`,group:`Runs`,label:t.target,meta:`${t.status} · ${t.depth} · ${t.runtime}`,icon:pe,keywords:[t.target,t.status,t.depth,t.runtime,t.mode],run:()=>a(`/runs/${t.id}`)});return e},[r?.groups,a,s,i,m,g.data?.latest.triageNote,h,v]),b=(0,j.useMemo)(()=>{let e=p.trim().toLowerCase();return e?y.filter(t=>[t.label,t.meta,...t.keywords].join(` `).toLowerCase().includes(e)):y},[p,y]);return(0,j.useEffect)(()=>{e||f(``)},[e]),(0,M.jsx)(_i,{open:e,onOpenChange:n,children:(0,M.jsxs)(bi,{className:`overflow-hidden p-0 sm:max-w-2xl`,showCloseButton:!1,children:[(0,M.jsxs)(xi,{className:`border-b border-border px-5 py-4 pr-12`,children:[(0,M.jsx)(Si,{className:`text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:`Mission command`}),(0,M.jsx)(Ci,{className:`pt-2 text-sm text-muted-foreground`,children:`Search operations views, findings, runs, and control actions.`})]}),(0,M.jsx)(`div`,{className:`border-b border-border px-4 py-3`,children:(0,M.jsx)(ue,{autoFocus:!0,value:l,onChange:e=>f(e.target.value),placeholder:`Jump to a page, run, finding, or action`})}),(0,M.jsx)(Jr,{className:`max-h-[60vh]`,children:(0,M.jsxs)(`div`,{className:`space-y-1 p-2`,children:[wi.map(e=>{let t=b.filter(t=>t.group===e);return t.length===0?null:(0,M.jsxs)(`section`,{className:`space-y-1`,children:[(0,M.jsx)(`div`,{className:`px-3 py-2 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:e}),t.map(e=>(0,M.jsxs)(`button`,{type:`button`,onClick:()=>{e.run(),n(!1)},className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left transition-colors hover:bg-accent`,children:[(0,M.jsx)(`div`,{className:`inline-flex size-9 items-center justify-center rounded-md border border-border bg-muted text-primary-text`,children:(0,M.jsx)(e.icon,{className:`size-4`})}),(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`div`,{className:`font-medium text-foreground`,children:e.label}),(0,M.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.meta})]}),e.shortcut?(0,M.jsx)(`div`,{className:`text-xs tracking-widest text-muted-foreground`,children:e.shortcut}):null]},e.id))]},e)}),b.length===0?(0,M.jsx)(`div`,{className:`px-4 py-8 text-center text-sm text-muted-foreground`,children:`No matching commands.`}):null]})})]})})}var Ei=(0,j.lazy)(async()=>({default:(await n(async()=>{let{FindingsPage:e}=await import(`./findings-page-mayGhNx6.js`);return{FindingsPage:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))).FindingsPage})),Di=(0,j.lazy)(async()=>({default:(await n(async()=>{let{LivePage:e}=await import(`./live-page-HWWHX99U.js`);return{LivePage:e}},__vite__mapDeps([12,1,5,7,11]))).LivePage})),Oi=(0,j.lazy)(async()=>({default:(await n(async()=>{let{OverviewPage:e}=await import(`./overview-page-W_4IteEr.js`);return{OverviewPage:e}},__vite__mapDeps([13,1,2,3,4,5,6,7,14,8,10,11]))).OverviewPage})),$=(0,j.lazy)(async()=>({default:(await n(async()=>{let{ScansPage:e}=await import(`./scans-page-CgzVXHnn.js`);return{ScansPage:e}},__vite__mapDeps([15,1,2,3,4,5,7,14,9,10]))).ScansPage}));function ki(e){let t=e;return t?[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.tagName)||t.isContentEditable:!1}function Ai({dashboard:t,scans:n}){return(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(Ae,{label:`Loading workspace`}),children:(0,M.jsxs)(o,{children:[(0,M.jsx)(e,{path:`/`,element:(0,M.jsx)(i,{to:`/dashboard`,replace:!0})}),(0,M.jsx)(e,{path:`/dashboard`,element:(0,M.jsx)(Oi,{data:t})}),(0,M.jsx)(e,{path:`/threads`,element:(0,M.jsx)(Ei,{dashboard:t})}),(0,M.jsx)(e,{path:`/threads/:fingerprint`,element:(0,M.jsx)(Ei,{dashboard:t})}),(0,M.jsx)(e,{path:`/runs`,element:(0,M.jsx)($,{scans:n})}),(0,M.jsx)(e,{path:`/runs/:scanId`,element:(0,M.jsx)($,{scans:n})}),(0,M.jsx)(e,{path:`/findings`,element:(0,M.jsx)(Ei,{dashboard:t})}),(0,M.jsx)(e,{path:`/findings/:fingerprint`,element:(0,M.jsx)(Ei,{dashboard:t})}),(0,M.jsx)(e,{path:`/scans`,element:(0,M.jsx)($,{scans:n})}),(0,M.jsx)(e,{path:`/scans/:scanId`,element:(0,M.jsx)($,{scans:n})}),(0,M.jsx)(e,{path:`/live`,element:(0,M.jsx)(Di,{})}),(0,M.jsx)(e,{path:`*`,element:(0,M.jsx)(je,{title:`Unknown route`,body:`This dashboard view does not exist yet.`})})]})})}function ji(){let[e,t]=(0,j.useState)(!1),n=d({queryKey:[`dashboard`],queryFn:b,refetchInterval:5e3}),r=d({queryKey:[`scans`],queryFn:ee,refetchInterval:5e3}),i=(0,j.useEffectEvent)(n=>{if((n.metaKey||n.ctrlKey)&&n.key.toLowerCase()===`k`){n.preventDefault(),t(e=>!e);return}!e&&n.key===`/`&&!ki(n.target)&&(n.preventDefault(),t(!0))});return(0,j.useEffect)(()=>{let e=e=>i(e);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i]),(0,M.jsx)(De,{children:(0,M.jsxs)(li,{dashboard:n.data,scans:r.data,onOpenPalette:()=>t(!0),children:[(0,M.jsx)(Ti,{open:e,onOpenChange:t,dashboard:n.data,scans:r.data}),n.isLoading||r.isLoading?(0,M.jsx)(Ae,{label:`Operations`}):n.error?(0,M.jsx)(Me,{error:n.error}):r.error?(0,M.jsx)(Me,{error:r.error}):n.data&&r.data?(0,M.jsx)(Ai,{dashboard:n.data,scans:r.data}):(0,M.jsx)(je,{title:`No scan data available`,body:`Run a scan first, then reopen Operations.`})]})})}export{ji as OperationsApp,he as _,lr as a,Me as c,we as d,Ce as f,ye as g,be as h,dr as i,Ae as l,xe as m,ir as n,ur as o,Se as p,cr as r,je as s,Jr as t,Oe as u,de as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e,m as t,r as n,t as r}from"./jsx-runtime-MGseXjj5.js";import{C as i,O as a,S as ee,T as te,b as ne,g as re,n as o,t as ie,w as ae,x as oe}from"./format--susmHX7.js";import{r as s}from"./dist-B_dDCPbu.js";import{t as se}from"./operations-BxZ0OoXO.js";import{_ as c,c as l,d as u,l as d,m as f,n as p,o as m,s as h,t as g,u as _}from"./input-TuVPR3Zl.js";import{t as ce}from"./bot-Bg1Tp9_d.js";import{n as v,t as le}from"./siren-KQj8QAnJ.js";import{a as ue,i as y,r as b,t as x}from"./tabs-CFHPOwg8.js";import{a as S,c as C,f as w,i as T,l as de,n as E,o as D,r as O,s as k,t as A,u as j}from"./table-8EDklulN.js";import{t as fe}from"./page-header-Bw9AJgBV.js";import{v as pe}from"./operations-app-D3d35rgo.js";var me=c(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),M=c(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),N=c(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),he=c(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),P=c(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ge=c(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),F=t(e(),1),I=r();function L({data:e}){let t=se(),[r,c]=(0,F.useState)(null),[y,b]=(0,F.useState)(``),[x,L]=(0,F.useState)(`deep`),[V,H]=(0,F.useState)(`default`),[U,W]=(0,F.useState)(`auto`),G=a({queryKey:[`recent-events`],queryFn:()=>re(12),refetchInterval:5e3}),_e=e.groups.filter(e=>e.workflow.reviewGate!==`none`),ve=e.groups.filter(e=>e.workflow.phase===`blocked`),ye=e.groups.filter(e=>e.workflow.phase===`in_progress`),be=e.groups.filter(e=>!e.workflow.assignee),xe=e.scans.filter(e=>e.status===`running`),K=e.workers.filter(e=>e.isActive&&e.status!==`stopped`),Se=e.workers.filter(e=>e.status===`stopped`),q=K.length>0,Ce=e.scans.length===0&&e.groups.length===0&&e.workers.length===0,J=async()=>{await Promise.all([t.invalidateQueries({queryKey:[`dashboard`]}),t.invalidateQueries({queryKey:[`scans`]}),t.invalidateQueries({queryKey:[`recent-events`]})])},we=s({mutationFn:()=>ee(),onSuccess:async e=>{c(e.recovered>0?`Recovered ${e.recovered} stale work item${e.recovered===1?``:`s`}.`:`No stale worker claims needed recovery.`),await J()},onError:e=>{c(e instanceof Error?e.message:String(e))}}),Te=s({mutationFn:()=>oe(),onSuccess:async e=>{c(e.deleted>0?`Pruned ${e.deleted} stopped worker row${e.deleted===1?``:`s`}.`:`No stopped worker rows were left to prune.`),await J()},onError:e=>{c(e instanceof Error?e.message:String(e))}}),Ee=s({mutationFn:()=>i(`empty`),onSuccess:async e=>{c(`Reset local state at ${e.path}.`),await J()},onError:e=>{c(e instanceof Error?e.message:String(e))}}),Y=s({mutationFn:()=>ae({label:`control-plane-1`,pollIntervalMs:2e3}),onSuccess:async()=>{c(`Started local control-plane daemon.`),await J()},onError:e=>{c(e instanceof Error?e.message:String(e))}}),X=s({mutationFn:()=>te(),onSuccess:async e=>{c(e.stopped>0?`Stopped ${e.stopped} local daemon process${e.stopped===1?``:`es`}.`:`No live local daemon process needed stopping.`),await J()},onError:e=>{c(e instanceof Error?e.message:String(e))}}),Z=s({mutationFn:()=>ne({target:y.trim(),depth:V,mode:x,runtime:U,ensureDaemon:!0}),onSuccess:async()=>{c(`Launched ${x} run for ${y.trim()}.`),b(``),await J()},onError:e=>{c(e instanceof Error?e.message:String(e))}}),Q=we.isPending||Te.isPending||Ee.isPending||Y.isPending||X.isPending||Z.isPending,De=[...e.groups].filter(e=>e.workflow.reviewGate!==`none`||e.workflow.phase===`blocked`||!e.workflow.assignee).sort((e,t)=>t.latest.timestamp-e.latest.timestamp).slice(0,8),Oe=[...e.groups].filter(e=>e.workflow.phase===`in_progress`||e.workflow.activeAgentRoles.length>0).sort((e,t)=>t.latest.timestamp-e.latest.timestamp).slice(0,8),ke=[...e.scans].sort((e,t)=>t.startedAt.localeCompare(e.startedAt)).slice(0,8),Ae=(0,F.useMemo)(()=>{let e=G.data?.events??[],t=new Map;for(let n of e){let e=n.payload??{},r=typeof e.summary==`string`&&e.summary.trim()?e.summary.trim():n.summary,i=[`stage_complete`,`agent_complete`,`runtime_incompatible`].includes(n.eventType)&&/max turns|did not emit required tool_call/i.test(r);if(![`agent_error`,`scan_error`,`worker_failed`].includes(n.eventType)&&!i||t.has(n.scanId))continue;let a=typeof e.error==`string`&&e.error.trim()?e.error.trim():typeof e.summary==`string`&&e.summary.trim()?e.summary.trim():n.summary;t.set(n.scanId,{scanId:n.scanId,scanTarget:n.scanTarget,stage:n.stage,actor:n.agentRole??null,headline:a,timestamp:n.timestamp})}return[...t.values()].slice(0,4)},[G.data?.events]),$=[...e.groups].sort((e,t)=>Number(new Date(t.workflow.updatedAt??t.latest.timestamp))-Number(new Date(e.workflow.updatedAt??e.latest.timestamp))).slice(0,8);return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(fe,{eyebrow:`Control`,title:`Operations control`,summary:`Launch new targets, watch the autonomous queue, and jump to the findings or runs that actually need intervention.`,actions:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(p,{asChild:!0,variant:`outline`,children:(0,I.jsx)(n,{to:`/runs`,children:`Open runs`})}),(0,I.jsx)(p,{asChild:!0,variant:`accent`,children:(0,I.jsx)(n,{to:`/findings`,children:`Open findings workspace`})})]})}),Ce?(0,I.jsxs)(`section`,{className:`grid gap-4 xl:grid-cols-[1.15fr_0.85fr]`,children:[(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsx)(u,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`First run`}),(0,I.jsx)(f,{className:`mt-2`,children:`Launch the first target`}),(0,I.jsx)(l,{children:`A finding family is the clustered underlying issue behind repeated observations across runs. Start a target, let the pipeline collect proof, then review only the families that survive automation.`})]})}),(0,I.jsxs)(h,{className:`space-y-5`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground`,children:`Target`}),(0,I.jsx)(g,{value:y,onChange:e=>b(e.target.value),placeholder:x===`mcp`?`mcp://assistant-endpoint`:x===`web`?`https://app.example.com`:`https://api.example.com`})]}),(0,I.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-3`,children:[(0,I.jsx)(B,{label:`Mode`,value:x,onValueChange:e=>L(e),options:[{value:`deep`,label:`API/URL`},{value:`web`,label:`Web app`},{value:`mcp`,label:`MCP`}]}),(0,I.jsx)(B,{label:`Depth`,value:V,onValueChange:e=>H(e),options:[{value:`quick`,label:`Quick`},{value:`default`,label:`Default`},{value:`deep`,label:`Deep`}]}),(0,I.jsx)(B,{label:`Runtime`,value:U,onValueChange:e=>W(e),options:[{value:`auto`,label:`Auto`},{value:`api`,label:`API`},{value:`codex`,label:`Codex`},{value:`claude`,label:`Claude`},{value:`gemini`,label:`Gemini`}]})]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,I.jsxs)(p,{variant:`accent`,onClick:()=>Z.mutate(),disabled:!y.trim()||Q,children:[(0,I.jsx)(M,{}),`Launch target`]}),(0,I.jsxs)(p,{variant:`outline`,onClick:()=>Y.mutate(),disabled:q||Q,children:[(0,I.jsx)(N,{}),`Start daemon`]}),(0,I.jsxs)(p,{variant:`outline`,onClick:()=>X.mutate(),disabled:!q||Q,children:[(0,I.jsx)(N,{}),`Stop daemon`]})]})]})]}),(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsx)(u,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Execution model`}),(0,I.jsx)(f,{className:`mt-2`,children:`How the system works`}),(0,I.jsx)(l,{children:`This is not meant to be a human-driven kanban first. The control plane should run autonomously until a thread needs review, override, or more access.`})]})}),(0,I.jsxs)(h,{className:`space-y-3 text-sm text-muted-foreground`,children:[(0,I.jsx)(`div`,{className:`rounded-md border border-border bg-background px-4 py-3`,children:"A `run` is one pipeline execution against a target."}),(0,I.jsx)(`div`,{className:`rounded-md border border-border bg-background px-4 py-3`,children:"A `thread` is one underlying issue clustered across repeated hits or follow-up evidence."}),(0,I.jsx)(`div`,{className:`rounded-md border border-border bg-background px-4 py-3`,children:"A `worker` is a local autonomous daemon claiming runnable stages from persisted state."}),(0,I.jsx)(`div`,{className:`rounded-md border border-border bg-background px-4 py-3`,children:`Humans should mostly work the review inbox, blocked access, and final disposition.`})]})]})]}):null,Ce?null:(0,I.jsxs)(`section`,{className:`grid gap-4 xl:grid-cols-[1.15fr_0.85fr]`,children:[(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsx)(u,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Launch`}),(0,I.jsx)(f,{className:`mt-2`,children:`Control strip`}),(0,I.jsx)(l,{children:`Launch a new target, keep the daemon healthy, and clear local state without dropping to the CLI.`})]})}),(0,I.jsxs)(h,{className:`space-y-5`,children:[(0,I.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,1.2fr)_repeat(3,minmax(0,0.8fr))]`,children:[(0,I.jsxs)(`label`,{className:`space-y-2`,children:[(0,I.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground`,children:`Target`}),(0,I.jsx)(g,{value:y,onChange:e=>b(e.target.value),placeholder:x===`mcp`?`mcp://assistant-endpoint`:x===`web`?`https://app.example.com`:`https://api.example.com`})]}),(0,I.jsx)(B,{label:`Mode`,value:x,onValueChange:e=>L(e),options:[{value:`deep`,label:`API/URL`},{value:`web`,label:`Web app`},{value:`mcp`,label:`MCP`}]}),(0,I.jsx)(B,{label:`Depth`,value:V,onValueChange:e=>H(e),options:[{value:`quick`,label:`Quick`},{value:`default`,label:`Default`},{value:`deep`,label:`Deep`}]}),(0,I.jsx)(B,{label:`Runtime`,value:U,onValueChange:e=>W(e),options:[{value:`auto`,label:`Auto`},{value:`api`,label:`API`},{value:`codex`,label:`Codex`},{value:`claude`,label:`Claude`},{value:`gemini`,label:`Gemini`}]})]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,I.jsxs)(p,{variant:`accent`,onClick:()=>Z.mutate(),disabled:!y.trim()||Q,children:[(0,I.jsx)(M,{}),`Launch target`]}),(0,I.jsxs)(p,{variant:q?`outline`:`default`,onClick:()=>q?X.mutate():Y.mutate(),disabled:Q,children:[(0,I.jsx)(N,{}),q?`Stop daemon`:`Start daemon`]}),(0,I.jsxs)(p,{variant:`outline`,onClick:()=>we.mutate(),disabled:Q,children:[(0,I.jsx)(he,{}),`Recover stale`]}),(0,I.jsxs)(p,{variant:`outline`,onClick:()=>Te.mutate(),disabled:Q,children:[(0,I.jsx)(P,{}),`Prune stopped`]}),(0,I.jsxs)(p,{variant:`warning`,onClick:()=>Ee.mutate(),disabled:Q||q,children:[(0,I.jsx)(me,{}),`Reset local state`]})]}),(0,I.jsx)(`div`,{className:`rounded-md border border-border bg-muted/20 px-4 py-3 text-sm text-muted-foreground`,children:r??`The daemon can be started from here. Local state reset stays guarded while a live daemon is heartbeating.`})]})]}),(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsx)(u,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Situation`}),(0,I.jsx)(f,{className:`mt-2`,children:`Live system state`}),(0,I.jsx)(l,{children:`Read the queue, worker fleet, and review backlog at a glance before drilling into findings or runs.`})]})}),(0,I.jsxs)(h,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,I.jsx)(R,{icon:ge,label:`Runnable now`,value:e.queue.runnable,hint:`Work items ready to claim.`}),(0,I.jsx)(R,{icon:pe,label:`Workers`,value:K.length,hint:`Live orchestration daemons.`}),(0,I.jsx)(R,{icon:v,label:`Review`,value:_e.length,hint:`Finding families waiting on sign-off.`}),(0,I.jsx)(R,{icon:le,label:`Blocked`,value:ve.length,hint:`Finding families outside the happy path.`}),(0,I.jsx)(R,{icon:ce,label:`Running findings`,value:ye.length,hint:`Finding families with live worker activity.`}),(0,I.jsx)(R,{icon:ue,label:`Unassigned`,value:be.length,hint:`Finding families without an owner.`}),(0,I.jsx)(R,{icon:M,label:`Active runs`,value:xe.length,hint:`Runs still executing.`}),(0,I.jsx)(R,{icon:P,label:`Stopped workers`,value:Se.length,hint:`Rows safe to prune.`})]})]})]}),(0,I.jsxs)(`section`,{className:`grid gap-4 xl:grid-cols-[1.05fr_0.95fr]`,children:[(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsxs)(u,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Findings`}),(0,I.jsx)(f,{className:`mt-2`,children:`Decision queue`}),(0,I.jsx)(l,{children:`Finding families that most likely need a human decision next: blocked execution, review gates, or ownership gaps.`})]}),(0,I.jsx)(p,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(n,{to:`/findings`,children:`Open findings`})})]}),(0,I.jsx)(h,{children:De.length===0?(0,I.jsx)(d,{className:`text-left`,children:`No findings currently need intervention.`}):(0,I.jsxs)(A,{children:[(0,I.jsx)(S,{children:(0,I.jsxs)(D,{className:`hover:bg-transparent`,children:[(0,I.jsx)(T,{children:`Finding`}),(0,I.jsx)(T,{children:`Ownership`}),(0,I.jsx)(T,{children:`Signal`}),(0,I.jsx)(T,{className:`w-[14rem]`,children:`State`})]})}),(0,I.jsx)(E,{children:De.map(e=>(0,I.jsxs)(D,{children:[(0,I.jsx)(O,{className:`font-medium`,children:(0,I.jsx)(n,{to:`/findings/${e.fingerprint}`,className:`text-foreground hover:text-primary-text`,children:e.latest.title})}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:e.workflow.assignee??`Unassigned`}),(0,I.jsx)(O,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(j,{severity:e.latest.severity}),(0,I.jsx)(k,{value:e.workflow.consensus})]})}),(0,I.jsx)(O,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(C,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,I.jsx)(de,{value:e.workflow.reviewGate}),(0,I.jsx)(w,{value:e.latest.triageStatus})]})})]},e.fingerprint))})]})})]}),(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsx)(u,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Execution`}),(0,I.jsx)(f,{className:`mt-2`,children:`Queue and daemons`}),(0,I.jsx)(l,{children:`Use this column to understand what automation is doing right now and where the queue is getting stuck.`})]})}),(0,I.jsxs)(h,{className:`space-y-6`,children:[Oe.length===0?(0,I.jsx)(d,{className:`text-left`,children:`No live worker activity right now.`}):(0,I.jsx)(`div`,{className:`space-y-3`,children:Oe.map(e=>(0,I.jsx)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-3`,children:(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(n,{to:`/findings/${e.fingerprint}`,className:`text-sm font-medium text-foreground hover:text-primary-text`,children:e.latest.title}),(0,I.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.workflow.activeAgentRoles.length>0?e.workflow.activeAgentRoles.join(`, `):`Waiting for worker activity`})]}),(0,I.jsx)(C,{value:e.workflow.phase})]})},e.fingerprint))}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Autonomous queue`}),(0,I.jsx)(f,{className:`mt-2`,children:`Worker-ready state`}),(0,I.jsx)(l,{children:`Real queue health from persisted work items, not inferred status labels.`})]}),(0,I.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,I.jsx)(z,{label:`Runnable now`,value:e.queue.runnable,hint:`Dependencies satisfied and no sibling claim is active.`}),(0,I.jsx)(z,{label:`Active claims`,value:e.queue.active,hint:`Currently held by a running case worker.`}),(0,I.jsx)(z,{label:`Blocked by deps`,value:e.queue.blockedByDependency,hint:`Waiting on an earlier stage to complete first.`}),(0,I.jsx)(z,{label:`Manual review`,value:e.queue.manualReview,hint:`Queued for operator sign-off, not autonomous execution.`}),(0,I.jsx)(z,{label:`Recovered claims`,value:e.queue.recoveredClaims,hint:`Requeued after a stale worker heartbeat expired.`}),(0,I.jsx)(z,{label:`Stale workers`,value:e.queue.staleWorkers,hint:`Workers marked errored after heartbeat expiry.`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Autonomous workers`}),(0,I.jsx)(f,{className:`mt-2`,children:`Daemon state`})]}),K.length===0?(0,I.jsx)(d,{className:`text-left`,children:`No orchestration daemons are heartbeating right now.`}):(0,I.jsx)(`div`,{className:`space-y-3`,children:K.slice(0,4).map(e=>(0,I.jsx)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-3`,children:(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e.label}),(0,I.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.currentWorkItemTitle??e.currentWorkItemId??`Idle`,e.currentCaseTarget?` · ${e.currentCaseTarget}`:``,` · heartbeat ${o(e.heartbeatAt)}`]}),e.lastError?(0,I.jsx)(`div`,{className:`mt-1 text-xs text-destructive`,children:e.lastError}):null]}),(0,I.jsx)(w,{value:e.status})]})},e.id))})]})]})]})]}),(0,I.jsxs)(`section`,{className:`grid gap-4 xl:grid-cols-[0.95fr_1.05fr]`,children:[(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsxs)(u,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Runs`}),(0,I.jsx)(f,{className:`mt-2`,children:`Recent execution`}),(0,I.jsx)(l,{children:`Recent and still-running runs. Use this to jump into provenance without leaving operations.`})]}),(0,I.jsx)(p,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(n,{to:`/runs`,children:`Open runs`})})]}),(0,I.jsx)(h,{children:ke.length===0?(0,I.jsx)(d,{className:`text-left`,children:`No runs recorded yet.`}):(0,I.jsxs)(A,{children:[(0,I.jsx)(S,{children:(0,I.jsxs)(D,{className:`hover:bg-transparent`,children:[(0,I.jsx)(T,{children:`Target`}),(0,I.jsx)(T,{children:`Started`}),(0,I.jsx)(T,{children:`Profile`}),(0,I.jsx)(T,{className:`w-[12rem]`,children:`State`})]})}),(0,I.jsx)(E,{children:ke.map(e=>(0,I.jsxs)(D,{children:[(0,I.jsx)(O,{className:`font-medium`,children:(0,I.jsx)(n,{to:`/runs/${e.id}`,className:`text-foreground hover:text-primary-text`,children:e.target})}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:o(e.startedAt)}),(0,I.jsxs)(O,{className:`text-muted-foreground`,children:[e.runtime,` · `,e.mode,` · `,e.depth]}),(0,I.jsx)(O,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(w,{value:e.status}),(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:ie(e.durationMs)})]})})]},e.id))})]})})]}),(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsxs)(u,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Findings`}),(0,I.jsx)(f,{className:`mt-2`,children:`Latest movement`}),(0,I.jsx)(l,{children:`Most recent finding-family changes across automation, triage, and review.`})]}),(0,I.jsx)(p,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(n,{to:`/findings`,children:`Open findings`})})]}),(0,I.jsx)(h,{children:$.length===0?(0,I.jsx)(d,{className:`text-left`,children:`No findings recorded yet.`}):(0,I.jsxs)(A,{children:[(0,I.jsx)(S,{children:(0,I.jsxs)(D,{className:`hover:bg-transparent`,children:[(0,I.jsx)(T,{children:`Finding`}),(0,I.jsx)(T,{children:`Updated`}),(0,I.jsx)(T,{children:`Coverage`}),(0,I.jsx)(T,{className:`w-[16rem]`,children:`State`})]})}),(0,I.jsx)(E,{children:$.map(e=>(0,I.jsxs)(D,{children:[(0,I.jsx)(O,{className:`font-medium`,children:(0,I.jsx)(n,{to:`/findings/${e.fingerprint}`,className:`text-foreground hover:text-primary-text`,children:e.latest.title})}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:o(e.workflow.updatedAt??e.latest.timestamp)}),(0,I.jsxs)(O,{className:`text-muted-foreground`,children:[e.count,` hits · `,e.scanCount,` scans`]}),(0,I.jsx)(O,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(C,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,I.jsx)(de,{value:e.workflow.reviewGate}),(0,I.jsx)(j,{severity:e.latest.severity}),(0,I.jsx)(k,{value:e.workflow.consensus})]})})]},e.fingerprint))})]})})]})]}),Ae.length>0?(0,I.jsxs)(m,{className:`overflow-hidden border-destructive/20`,children:[(0,I.jsx)(u,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Incidents`}),(0,I.jsx)(f,{className:`mt-2`,children:`Runtime incidents`}),(0,I.jsx)(l,{children:`Provider failures, worker crashes, and stalled agent executions that need operator attention.`})]})}),(0,I.jsx)(h,{className:`space-y-3`,children:Ae.map(e=>(0,I.jsx)(`div`,{className:`rounded-md border border-destructive/20 bg-destructive/5 px-4 py-3`,children:(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(n,{to:`/runs/${e.scanId}`,className:`text-sm font-medium text-foreground hover:text-primary-text`,children:e.scanTarget}),(0,I.jsx)(`div`,{className:`mt-1 text-sm leading-6 text-muted-foreground`,children:e.headline}),(0,I.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-muted-foreground`,children:[(0,I.jsx)(j,{severity:`high`}),(0,I.jsx)(`span`,{children:e.stage}),e.actor?(0,I.jsx)(`span`,{children:e.actor}):null,(0,I.jsx)(`span`,{children:o(e.timestamp)})]})]}),(0,I.jsx)(v,{className:`mt-0.5 size-5 shrink-0 text-destructive`})]})},`${e.scanId}:${e.timestamp}`))})]}):null,(0,I.jsxs)(m,{className:`overflow-hidden`,children:[(0,I.jsx)(u,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(_,{children:`Events`}),(0,I.jsx)(f,{className:`mt-2`,children:`Recent pipeline activity`}),(0,I.jsx)(l,{children:`Live audit events across runs, useful for seeing where the system is actually spending time.`})]})}),(0,I.jsx)(h,{children:G.isLoading?(0,I.jsx)(d,{children:`Loading recent events...`}):G.error?(0,I.jsx)(d,{children:G.error instanceof Error?G.error.message:`Failed to load recent events.`}):(G.data?.events.length??0)===0?(0,I.jsx)(d,{children:`No pipeline events recorded yet.`}):(0,I.jsxs)(A,{children:[(0,I.jsx)(S,{children:(0,I.jsxs)(D,{className:`hover:bg-transparent`,children:[(0,I.jsx)(T,{children:`Target`}),(0,I.jsx)(T,{children:`Summary`}),(0,I.jsx)(T,{children:`Stage`}),(0,I.jsx)(T,{children:`Event`}),(0,I.jsx)(T,{children:`Actor`}),(0,I.jsx)(T,{className:`w-[12rem]`,children:`Time`})]})}),(0,I.jsx)(E,{children:G.data?.events.map(e=>(0,I.jsxs)(D,{children:[(0,I.jsx)(O,{className:`font-medium`,children:(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(n,{to:`/runs/${e.scanId}`,className:`text-foreground hover:text-primary-text`,children:e.scanTarget}),e.findingFingerprint?(0,I.jsx)(`div`,{children:(0,I.jsx)(n,{to:`/findings/${e.findingFingerprint}`,className:`text-xs text-muted-foreground hover:text-primary-text`,children:`Open finding`})}):null]})}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:e.summary}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:e.stage}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:e.eventType}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:e.agentRole??`system`}),(0,I.jsx)(O,{className:`text-muted-foreground`,children:o(e.timestamp)})]},e.id))})]})})]})]})}function R({icon:e,label:t,value:n,hint:r}){return(0,I.jsxs)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70`,children:[(0,I.jsx)(e,{className:`size-3.5`}),t]}),(0,I.jsx)(`div`,{className:`mt-2 text-2xl font-semibold text-foreground`,children:n}),(0,I.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:r})]})}function z({label:e,value:t,hint:n}){return(0,I.jsxs)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-3`,children:[(0,I.jsx)(`div`,{className:`text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70`,children:e}),(0,I.jsx)(`div`,{className:`mt-2 text-2xl font-semibold text-foreground`,children:t}),(0,I.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:n})]})}function B({label:e,value:t,onValueChange:n,options:r}){return(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground`,children:e}),(0,I.jsx)(x,{value:t,onValueChange:n,children:(0,I.jsx)(b,{className:`w-full flex-wrap justify-start`,children:r.map(e=>(0,I.jsx)(y,{value:e.value,className:`flex-1`,children:e.label},e.value))})})]})}export{L as OverviewPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-MGseXjj5.js";import{h as t}from"./input-TuVPR3Zl.js";var n=e();function r({eyebrow:e,title:r,summary:i,actions:a,className:o}){return(0,n.jsxs)(`header`,{className:t(`flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between`,o),children:[(0,n.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,n.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground`,children:e}),(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`h1`,{className:`text-[2rem] font-bold tracking-tight text-foreground`,children:r}),(0,n.jsx)(`p`,{className:`mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground`,children:i})]})]}),a?(0,n.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:a}):null]})}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,f as t,l as n,m as r,r as i,t as a}from"./jsx-runtime-MGseXjj5.js";import{O as o,_ as s,n as c,r as l,t as u,v as d}from"./format--susmHX7.js";import{_ as f,c as p,d as m,f as h,h as g,l 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{n as D,t as O}from"./siren-KQj8QAnJ.js";import{n as k,r as ee,t as A}from"./meta-tile-ckHo-w7k.js";import{a as j,c as M,f as N,i as P,l as te,n as F,o as I,r as L,s as R,t as z,u as B}from"./table-8EDklulN.js";import{c as V,g as ne,l as re,m as ie,s as H,t as U,u as W,v as G}from"./operations-app-D3d35rgo.js";var K=f(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),q=f(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),J=r(t(),1),Y=a();function ae({title:e,description:t,searchValue:n,onSearchChange:r,searchPlaceholder:i,children:a}){return(0,Y.jsxs)(b,{className:`flex h-[36rem] min-h-0 max-h-[calc(100vh-8rem)] flex-col overflow-hidden`,children:[(0,Y.jsxs)(m,{className:`space-y-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(T,{children:`Queue`}),(0,Y.jsx)(v,{className:`mt-2`,children:e}),(0,Y.jsx)(p,{children:t})]}),(0,Y.jsxs)(`label`,{className:`flex items-center gap-3`,children:[(0,Y.jsx)(ee,{className:`size-4 text-muted-foreground`}),(0,Y.jsx)(w,{value:n,onChange:e=>r(e.target.value),placeholder:i,className:`h-9`})]})]}),(0,Y.jsx)(C,{className:`flex min-h-0 flex-1 flex-col pt-3`,children:(0,Y.jsx)(U,{className:`min-h-0 flex-1`,children:(0,Y.jsx)(h,{children:a})})})]})}function X({title:e,description:t,meta:n,badges:r,selected:i=!1}){return(0,Y.jsx)(x,{interactive:!0,selected:i,children:(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,Y.jsx)(`div`,{className:`text-sm font-semibold leading-5 text-foreground`,children:e}),(0,Y.jsx)(`div`,{className:`text-xs leading-5 text-muted-foreground`,children:t}),n?(0,Y.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n}):null]}),r?(0,Y.jsx)(`div`,{className:`flex max-w-[12rem] flex-wrap justify-end gap-2`,children:r}):null]})})}function oe({events:e}){return(0,Y.jsxs)(b,{className:`overflow-hidden`,children:[(0,Y.jsx)(m,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(T,{children:`Activity`}),(0,Y.jsx)(v,{className:`mt-2`,children:`Timeline`})]})}),(0,Y.jsx)(C,{className:`space-y-4`,children:e.length===0?(0,Y.jsx)(_,{children:`No pipeline events recorded.`}):(0,Y.jsxs)(z,{children:[(0,Y.jsx)(j,{children:(0,Y.jsxs)(I,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(P,{children:`Event`}),(0,Y.jsx)(P,{children:`Summary`}),(0,Y.jsx)(P,{className:`w-[10rem]`,children:`Time`}),(0,Y.jsx)(P,{className:`w-[14rem]`,children:`Payload`})]})}),(0,Y.jsx)(F,{children:e.map(e=>{let t=se(e.stage,e.eventType);return(0,Y.jsxs)(I,{children:[(0,Y.jsx)(L,{children:(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Y.jsx)(`div`,{className:`mt-0.5 inline-flex size-8 items-center justify-center rounded-md border border-border bg-muted text-primary-text`,children:(0,Y.jsx)(t,{className:`size-4`})}),(0,Y.jsxs)(`div`,{className:`space-y-1`,children:[(0,Y.jsxs)(`div`,{className:`font-medium text-foreground`,children:[e.stage,` · `,e.eventType]}),e.agentRole?(0,Y.jsx)(N,{value:e.agentRole}):null]})]})}),(0,Y.jsx)(L,{className:`text-muted-foreground`,children:(0,Y.jsxs)(`div`,{className:`space-y-1`,children:[(0,Y.jsx)(`div`,{children:l(e.payload)}),e.findingId?(0,Y.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[`finding `,e.findingId.slice(0,8)]}):null]})}),(0,Y.jsx)(L,{className:`text-xs text-muted-foreground`,children:c(e.timestamp)}),(0,Y.jsx)(L,{children:e.payload?(0,Y.jsxs)(`details`,{className:`rounded-md border border-border bg-muted/50 p-2 text-sm text-muted-foreground`,children:[(0,Y.jsx)(`summary`,{className:`cursor-pointer list-none font-medium text-foreground`,children:`View raw`}),(0,Y.jsx)(`pre`,{className:`mt-3 text-xs text-muted-foreground`,children:JSON.stringify(e.payload,null,2)})]}):(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`No payload`})})]},e.id)})})]})})]})}function se(e,t){let n=`${e}:${t}`.toLowerCase();return n.includes(`attack`)?ie:n.includes(`agent`)?E:n.includes(`verify`)?K:n.includes(`finding`)?D:n.includes(`scan`)?ne:n.includes(`analysis`)?q:G}function Z({icon:e,label:t,value:n,hint:r,tone:i=`neutral`}){return(0,Y.jsx)(b,{className:`overflow-hidden`,children:(0,Y.jsxs)(C,{className:`space-y-4 p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:t}),(0,Y.jsx)(`div`,{className:g(`inline-flex size-9 items-center justify-center rounded-md border border-border bg-muted text-muted-foreground`,i===`danger`&&`border-destructive/20 bg-destructive/10 text-destructive`,i===`warning`&&`border-amber-500/20 bg-amber-500/10 text-amber-300`,i===`success`&&`border-emerald-500/20 bg-emerald-500/10 text-emerald-300`,i===`accent`&&`border-primary/20 bg-primary/12 text-primary-text`),children:(0,Y.jsx)(e,{className:`size-5`})})]}),(0,Y.jsxs)(`div`,{className:`space-y-1`,children:[(0,Y.jsx)(`div`,{className:`text-3xl font-bold tracking-tight text-foreground`,children:n}),(0,Y.jsx)(`div`,{className:`text-xs leading-5 text-muted-foreground`,children:r})]})]})})}function Q({children:e,className:t}){return(0,Y.jsx)(`section`,{className:g(`grid gap-4 xl:grid-cols-[22rem_minmax(0,1fr)_20rem]`,t),children:e})}function ce({children:e,className:t}){return(0,Y.jsx)(`div`,{className:g(`min-w-0 min-h-0`,t),children:e})}function $({children:e,className:t,span:n=!1}){return(0,Y.jsx)(`div`,{className:g(`min-w-0 min-h-0`,n&&`xl:col-span-2`,t),children:e})}function le({scans:t}){let{scanId:r}=n(),a=e(),[l,u]=(0,J.useState)(``),f=(0,J.useDeferredValue)(l),p=(0,J.useMemo)(()=>{let e=new Map;for(let n of t){let t=e.get(n.target)??[];t.push(n),e.set(n.target,t)}return[...e.entries()].map(([e,t])=>{let n=[...t].sort((e,t)=>t.startedAt.localeCompare(e.startedAt));return{target:e,scans:n,latestScan:n[0],activeRunCount:n.filter(e=>e.status===`running`).length,totalFindings:n.reduce((e,t)=>e+t.summary.totalFindings,0)}}).sort((e,t)=>t.latestScan.startedAt.localeCompare(e.latestScan.startedAt))},[t]),m=(0,J.useMemo)(()=>{let e=f.trim().toLowerCase();return e?p.filter(t=>[t.target,...t.scans.flatMap(e=>[e.depth,e.runtime,e.mode,e.status,e.id])].join(` `).toLowerCase().includes(e)):p},[f,p]),h=(0,J.useMemo)(()=>t.find(e=>e.id===r)??m[0]?.latestScan??null,[m,r,t]),g=h?.id??null,v=(0,J.useMemo)(()=>h?p.find(e=>e.target===h.target)??null:null,[p,h]);(0,J.useEffect)(()=>{!r&&g&&a(`/runs/${g}`,{replace:!0})},[a,r,g]);let y=o({queryKey:[`scan-events`,g],queryFn:()=>s(g),enabled:!!g}),b=o({queryKey:[`scan-findings`,g],queryFn:()=>d(g),enabled:!!g});return(0,Y.jsx)(`div`,{className:`space-y-6`,children:(0,Y.jsxs)(Q,{className:`xl:grid-cols-[22rem_minmax(0,1fr)]`,children:[(0,Y.jsx)(ce,{children:(0,Y.jsx)(ae,{title:`${p.length} targets`,description:`Search by target, runtime, mode, depth, status, or run id.`,searchValue:l,onSearchChange:u,searchPlaceholder:`Filter targets and runs`,children:m.length===0?(0,Y.jsx)(_,{className:`py-8`,children:`No targets match the current filter.`}):m.map(e=>(0,Y.jsx)(i,{to:`/runs/${e.latestScan.id}`,children:({isActive:t})=>(0,Y.jsx)(X,{selected:t,title:e.target,description:`${e.scans.length} runs · latest ${e.latestScan.runtime} · ${e.latestScan.mode}`,meta:c(e.latestScan.startedAt),badges:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(N,{value:e.latestScan.status}),e.activeRunCount>0?(0,Y.jsxs)(S,{variant:`accent`,children:[e.activeRunCount,` active`]}):null,(0,Y.jsxs)(S,{children:[e.totalFindings,` findings`]})]})})},e.target))})}),g?y.isLoading||b.isLoading?(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(re,{label:`Scan detail`})}):y.error?(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(V,{error:y.error})}):b.error?(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(V,{error:b.error})}):y.data&&b.data?(0,Y.jsx)(ue,{events:y.data,findings:b.data,targetRuns:v?.scans??[]}):(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(H,{title:`Scan unavailable`,body:`The selected run could not be loaded from the local database.`})}):(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(H,{title:`No scan selected`,body:`Choose a run from the run history to inspect details.`})})]})})}function ue({events:t,findings:n,targetRuns:r}){let a=t.scan,o=e(),{openPanel:s,clearPanel:l}=W(),d=(0,J.useMemo)(()=>r.filter(e=>e.id!==a.id),[a.id,r]),f=(0,J.useMemo)(()=>r.filter(e=>e.status===`running`).length,[r]),g=(0,J.useMemo)(()=>de(t.events),[t.events]),x=(0,J.useMemo)(()=>(0,Y.jsxs)(`div`,{className:`space-y-4 p-6`,children:[(0,Y.jsx)(k,{eyebrow:`Target`,title:`Target dossier`,description:`Shared context for the selected run across the full target history.`,children:(0,Y.jsxs)(h,{children:[(0,Y.jsx)(A,{label:`Target`,value:a.target}),(0,Y.jsx)(A,{label:`Runs on target`,value:String(r.length)}),(0,Y.jsx)(A,{label:`Running now`,value:String(f)}),(0,Y.jsx)(A,{label:`Scan id`,value:a.id,mono:!0}),(0,Y.jsx)(A,{label:`Started`,value:c(a.startedAt)}),(0,Y.jsx)(A,{label:`Completed`,value:a.completedAt?c(a.completedAt):`In progress`}),(0,Y.jsx)(A,{label:`Mode`,value:`${a.mode} / ${a.depth}`}),(0,Y.jsx)(A,{label:`Runtime`,value:a.runtime})]})}),(0,Y.jsxs)(b,{className:`overflow-hidden`,children:[(0,Y.jsx)(m,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(T,{children:`Target history`}),(0,Y.jsx)(v,{className:`mt-2`,children:`Recent passes`}),(0,Y.jsx)(p,{children:`Open another run on the same target without leaving the current dossier.`})]})}),(0,Y.jsx)(C,{className:`px-0 pb-0`,children:d.length===0?(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(_,{children:`No other runs for this target yet.`})}):(0,Y.jsx)(h,{children:d.slice(0,5).map(e=>(0,Y.jsx)(`button`,{type:`button`,onClick:()=>o(`/runs/${e.id}`),className:`w-full text-left`,children:(0,Y.jsx)(X,{title:c(e.startedAt),description:`${e.runtime} · ${e.mode} · ${e.depth}`,meta:e.id.slice(0,8),badges:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(N,{value:e.status}),(0,Y.jsx)(S,{children:e.summary.totalFindings})]})})},e.id))})})]})]}),[f,o,d,a.completedAt,a.depth,a.id,a.mode,a.runtime,a.startedAt,a.target,r.length]);(0,J.useEffect)(()=>(l(),()=>l()),[l,a.id]);let w=(0,J.useCallback)(()=>{s({title:`${a.target} target dossier`,description:`Shared context for the selected run across the full target history.`,content:x})},[s,x,a.target]);return(0,Y.jsx)($,{span:!0,className:`space-y-4`,children:(0,Y.jsxs)(k,{eyebrow:`Run dossier`,title:a.target,description:`Started ${c(a.startedAt)} · ${a.runtime} runtime · ${a.mode} mode · ${r.length} total runs on this target`,actions:(0,Y.jsx)(y,{variant:`outline`,size:`sm`,onClick:w,children:`Open target dossier`}),children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsx)(N,{value:a.status}),(0,Y.jsx)(S,{children:a.depth}),(0,Y.jsx)(S,{children:a.runtime}),(0,Y.jsx)(S,{children:a.mode})]}),g?(0,Y.jsx)(b,{className:`border-destructive/25 bg-destructive/5`,children:(0,Y.jsx)(C,{className:`space-y-3 p-4`,children:(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Y.jsx)(D,{className:`mt-0.5 size-5 text-destructive`}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Execution incident`}),(0,Y.jsx)(`div`,{className:`mt-1 text-sm leading-6 text-muted-foreground`,children:g.headline}),(0,Y.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-muted-foreground`,children:[(0,Y.jsx)(S,{variant:`outline`,children:g.stage}),g.actor?(0,Y.jsx)(S,{variant:`outline`,children:g.actor}):null,(0,Y.jsx)(`span`,{children:c(g.timestamp)})]})]})]})})}):null,(0,Y.jsxs)(`section`,{className:`grid gap-4 lg:grid-cols-2 2xl:grid-cols-4`,children:[(0,Y.jsx)(Z,{icon:G,label:`Findings`,value:a.summary.totalFindings,hint:`Grouped and raw findings`,tone:`accent`}),(0,Y.jsx)(Z,{icon:O,label:`Critical`,value:a.summary.critical,hint:`Critical-severity findings`,tone:`danger`}),(0,Y.jsx)(Z,{icon:D,label:`High`,value:a.summary.high,hint:`High-severity findings`,tone:`warning`}),(0,Y.jsx)(Z,{icon:q,label:`Duration`,value:u(a.durationMs),hint:`Elapsed runtime`,tone:`success`})]}),(0,Y.jsxs)(b,{className:`overflow-hidden`,children:[(0,Y.jsx)(m,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(T,{children:`Run output`}),(0,Y.jsx)(v,{className:`mt-2`,children:`Finding families in this run`}),(0,Y.jsx)(p,{children:`Deduplicated finding families produced by the selected run.`})]})}),(0,Y.jsx)(C,{children:n.groups.length===0?(0,Y.jsx)(_,{children:`No finding families recorded for this run.`}):(0,Y.jsxs)(z,{children:[(0,Y.jsx)(j,{children:(0,Y.jsxs)(I,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(P,{children:`Finding`}),(0,Y.jsx)(P,{children:`Category`}),(0,Y.jsx)(P,{children:`Count`}),(0,Y.jsx)(P,{className:`w-[12rem]`,children:`Posture`})]})}),(0,Y.jsx)(F,{children:n.groups.map(e=>(0,Y.jsxs)(I,{children:[(0,Y.jsx)(L,{className:`font-medium text-foreground`,children:e.latest.title}),(0,Y.jsx)(L,{className:`text-muted-foreground`,children:e.latest.category}),(0,Y.jsx)(L,{className:`text-muted-foreground`,children:e.count}),(0,Y.jsx)(L,{children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsx)(B,{severity:e.latest.severity}),(0,Y.jsx)(M,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,Y.jsx)(te,{value:e.workflow.reviewGate}),(0,Y.jsx)(N,{value:e.latest.triageStatus}),(0,Y.jsx)(R,{value:e.workflow.consensus})]})})]},e.fingerprint))})]})})]}),(0,Y.jsxs)(b,{className:`overflow-hidden`,children:[(0,Y.jsx)(m,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(T,{children:`Target provenance`}),(0,Y.jsx)(v,{className:`mt-2`,children:`Other runs on this target`}),(0,Y.jsx)(p,{children:`Use neighboring runs to understand whether this run is the first hit, a regression, or another pass over the same surface.`})]})}),(0,Y.jsx)(C,{children:r.length<=1?(0,Y.jsx)(_,{children:`No adjacent runs recorded for this target yet.`}):(0,Y.jsxs)(z,{children:[(0,Y.jsx)(j,{children:(0,Y.jsxs)(I,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(P,{children:`Started`}),(0,Y.jsx)(P,{children:`Mode`}),(0,Y.jsx)(P,{children:`Runtime`}),(0,Y.jsx)(P,{children:`Findings`}),(0,Y.jsx)(P,{className:`w-[10rem]`,children:`Status`})]})}),(0,Y.jsx)(F,{children:r.slice(0,6).map(e=>(0,Y.jsxs)(I,{children:[(0,Y.jsx)(L,{className:`font-medium`,children:(0,Y.jsx)(i,{to:`/runs/${e.id}`,className:`text-foreground hover:text-primary-text`,children:c(e.startedAt)})}),(0,Y.jsxs)(L,{className:`text-muted-foreground`,children:[e.mode,` · `,e.depth]}),(0,Y.jsx)(L,{className:`text-muted-foreground`,children:e.runtime}),(0,Y.jsx)(L,{className:`text-muted-foreground`,children:e.summary.totalFindings}),(0,Y.jsx)(L,{children:(0,Y.jsx)(N,{value:e.status})})]},e.id))})]})})]}),(0,Y.jsx)(oe,{events:t.events})]})})}function de(e){let t=e=>{let t=e.payload??{},n=typeof t.summary==`string`&&t.summary.trim()?t.summary.trim():e.eventType;return/max turns|did not emit required tool_call/i.test(n)},n=[...e].reverse().find(e=>[`agent_error`,`scan_error`,`worker_failed`].includes(e.eventType)||(e.eventType===`stage_complete`||e.eventType===`agent_complete`)&&t(e));if(!n)return null;let r=n.payload??{},i=typeof r.error==`string`&&r.error.trim()?r.error.trim():typeof r.summary==`string`&&r.summary.trim()?r.summary.trim():`${n.stage} ${n.eventType}`.replaceAll(`_`,` `);return{stage:n.stage,actor:n.agentRole??null,headline:i,timestamp:n.timestamp}}export{le as ScansPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./input-TuVPR3Zl.js";var t=e(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),n=e(`siren`,[[`path`,{d:`M7 18v-6a5 5 0 1 1 10 0v6`,key:`pcx96s`}],[`path`,{d:`M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z`,key:`1b4s83`}],[`path`,{d:`M21 12h1`,key:`jtio3y`}],[`path`,{d:`M18.5 4.5 18 5`,key:`g5sp9y`}],[`path`,{d:`M2 12h1`,key:`1uaihz`}],[`path`,{d:`M12 2v1`,key:`11qlp1`}],[`path`,{d:`m4.929 4.929.707.707`,key:`1i51kw`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e,t}from"./jsx-runtime-MGseXjj5.js";import{h as n,r}from"./input-TuVPR3Zl.js";var i=t();function a(e){return e.replaceAll(`_`,` `)}function o({severity:e}){let t=e.toLowerCase();return(0,i.jsx)(r,{variant:t===`critical`||t===`high`?`danger`:t===`medium`?`warning`:t===`low`?`info`:`neutral`,children:e})}function s({value:e}){let t=e.toLowerCase();return(0,i.jsx)(r,{variant:t===`accepted`||t===`complete`||t===`completed`?`success`:t===`suppressed`?`warning`:t===`running`||t===`claiming`?`accent`:t===`failed`||t===`critical`||t===`error`?`danger`:t===`sleeping`?`warning`:`neutral`,children:e})}function c({value:e}){return(0,i.jsx)(r,{variant:e===`done`?`success`:e===`cancelled`||e===`blocked`?`danger`:e===`human_review`?`warning`:e===`agent_review`||e===`in_progress`?`accent`:`neutral`,children:a(e)})}function l({value:e}){return(0,i.jsx)(r,{variant:e===`done`?`success`:e===`cancelled`||e===`blocked`?`danger`:e===`in_progress`?`accent`:`neutral`,children:a(e)})}function u({value:e}){return e===`none`?(0,i.jsx)(r,{variant:`neutral`,children:`no review gate`}):(0,i.jsx)(r,{variant:e===`human_review`?`warning`:`accent`,children:a(e)})}function d({value:e}){return(0,i.jsx)(r,{variant:e===`verified`?`success`:e===`false-positive`?`danger`:e===`disputed`?`warning`:`neutral`,children:e.replaceAll(`-`,` `)})}function f({value:e}){return(0,i.jsxs)(r,{variant:e===`strong`?`success`:e===`medium`?`warning`:`neutral`,children:[e,` signal`]})}e();function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,i.jsx)(`table`,{"data-slot":`table`,className:n(`w-full caption-bottom text-sm`,e),...t})})}function m({className:e,...t}){return(0,i.jsx)(`thead`,{"data-slot":`table-header`,className:n(`[&_tr]:border-b`,e),...t})}function h({className:e,...t}){return(0,i.jsx)(`tbody`,{"data-slot":`table-body`,className:n(`[&_tr:last-child]:border-0`,e),...t})}function g({className:e,...t}){return(0,i.jsx)(`tr`,{"data-slot":`table-row`,className:n(`border-b transition-colors hover:bg-primary/5 has-aria-expanded:bg-primary/5 data-[state=selected]:bg-primary/8`,e),...t})}function _({className:e,...t}){return(0,i.jsx)(`th`,{"data-slot":`table-head`,className:n(`h-12 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function v({className:e,...t}){return(0,i.jsx)(`td`,{"data-slot":`table-cell`,className:n(`p-3 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}export{m as a,l as c,f as d,s as f,_ as i,u as l,h as n,g as o,c as p,v as r,d as s,p as t,o as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e,m as t,t as n}from"./jsx-runtime-MGseXjj5.js";import{a as r,f as i,i as a,o,p as s,s as c,u as l}from"./format--susmHX7.js";import{n as u,t as d}from"./dist-B_dDCPbu.js";import{_ as f,a as p,g as m,h}from"./input-TuVPR3Zl.js";var g=f(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),_=t(e(),1),v=n();function y(e){let t=e+`CollectionProvider`,[n,r]=i(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=_.useRef(null),i=_.useRef(new Map).current;return(0,v.jsx)(a,{scope:t,itemMap:i,collectionRef:r,children:n})};s.displayName=t;let c=e+`CollectionSlot`,u=l(c),d=_.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(c,n),a=p(t,i.collectionRef);return(0,v.jsx)(u,{ref:a,children:r})});d.displayName=c;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=l(f),g=_.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=_.useRef(null),s=p(t,a),c=o(f,n);return _.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),(0,v.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function y(t){let n=o(e+`CollectionConsumer`,t);return _.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:s,Slot:d,ItemSlot:g},y,r]}var b=`rovingFocusGroup.onEntryFocus`,x={bubbles:!1,cancelable:!0},S=`RovingFocusGroup`,[C,w,T]=y(S),[E,D]=i(S,[T]),[O,k]=E(S),A=_.forwardRef((e,t)=>(0,v.jsx)(C.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,v.jsx)(C.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,v.jsx)(j,{...e,ref:t})})}));A.displayName=S;var j=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:i,loop:a=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:m,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...y}=e,C=_.useRef(null),T=p(t,C),E=r(l),[D,k]=d({prop:u,defaultProp:f??null,onChange:m,caller:S}),[A,j]=_.useState(!1),M=o(h),N=w(n),P=_.useRef(!1),[F,I]=_.useState(0);return _.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(b,M),()=>e.removeEventListener(b,M)},[M]),(0,v.jsx)(O,{scope:n,orientation:i,dir:E,loop:a,currentTabStopId:D,onItemFocus:_.useCallback(e=>k(e),[k]),onItemShiftTab:_.useCallback(()=>j(!0),[]),onFocusableItemAdd:_.useCallback(()=>I(e=>e+1),[]),onFocusableItemRemove:_.useCallback(()=>I(e=>e-1),[]),children:(0,v.jsx)(c.div,{tabIndex:A||F===0?-1:0,"data-orientation":i,...y,ref:T,style:{outline:`none`,...e.style},onMouseDown:s(e.onMouseDown,()=>{P.current=!0}),onFocus:s(e.onFocus,e=>{let t=!P.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(b,x);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);L([e.find(e=>e.active),e.find(e=>e.id===D),...e].filter(Boolean).map(e=>e.ref.current),g)}}P.current=!1}),onBlur:s(e.onBlur,()=>j(!1))})})}),M=`RovingFocusGroupItem`,N=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...l}=e,d=u(),f=a||d,p=k(M,n),m=p.currentTabStopId===f,h=w(n),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:b}=p;return _.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),(0,v.jsx)(C.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:(0,v.jsx)(c.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:s(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:s(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:s(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=I(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?R(n,r+1):n.slice(r+1)}setTimeout(()=>L(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:b!=null}):o})})});N.displayName=M;var P={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function F(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function I(e,t,n){let r=F(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return P[r]}function L(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function R(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ee=A,te=N,z=`Tabs`,[B,ne]=i(z,[D]),V=D(),[H,U]=B(z),W=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:s=`horizontal`,dir:l,activationMode:f=`automatic`,...p}=e,m=r(l),[h,g]=d({prop:i,onChange:a,defaultProp:o??``,caller:z});return(0,v.jsx)(H,{scope:n,baseId:u(),value:h,onValueChange:g,orientation:s,dir:m,activationMode:f,children:(0,v.jsx)(c.div,{dir:m,"data-orientation":s,...p,ref:t})})});W.displayName=z;var G=`TabsList`,K=_.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=U(G,n),o=V(n);return(0,v.jsx)(ee,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,v.jsx)(c.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});K.displayName=G;var q=`TabsTrigger`,J=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=U(q,n),l=V(n),u=Z(o.baseId,r),d=Q(o.baseId,r),f=r===o.value;return(0,v.jsx)(te,{asChild:!0,...l,focusable:!i,active:f,children:(0,v.jsx)(c.button,{type:`button`,role:`tab`,"aria-selected":f,"aria-controls":d,"data-state":f?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:u,...a,ref:t,onMouseDown:s(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:s(e.onFocus,()=>{let e=o.activationMode!==`manual`;!f&&!i&&e&&o.onValueChange(r)})})})});J.displayName=q;var Y=`TabsContent`,X=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,l=U(Y,n),u=Z(l.baseId,r),d=Q(l.baseId,r),f=r===l.value,p=_.useRef(f);return _.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,v.jsx)(a,{present:i||f,children:({present:n})=>(0,v.jsx)(c.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&o})})});X.displayName=Y;function Z(e,t){return`${e}-trigger-${t}`}function Q(e,t){return`${e}-content-${t}`}var re=W,$=K,ie=J,ae=X;function oe({className:e,orientation:t=`horizontal`,...n}){return(0,v.jsx)(re,{"data-slot":`tabs`,"data-orientation":t,className:h(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var se=m(`group/tabs-list inline-flex w-fit items-center justify-center rounded-md border border-border bg-muted/40 p-1 text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col group-data-vertical/tabs:rounded-lg data-[variant=line]:rounded-none data-[variant=line]:border-0 data-[variant=line]:bg-transparent data-[variant=line]:p-0`,{variants:{variant:{default:``,line:`gap-1`}},defaultVariants:{variant:`default`}});function ce({className:e,variant:t=`default`,...n}){return(0,v.jsx)($,{"data-slot":`tabs-list`,"data-variant":t,className:h(se({variant:t}),e),...n})}function le({className:e,...t}){return(0,v.jsx)(ie,{"data-slot":`tabs-trigger`,className:h(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-2 rounded-md border border-transparent px-3 py-1 text-sm font-medium whitespace-nowrap text-foreground/70 transition-[background-color,border-color,color] group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:rounded-md group-data-vertical/tabs:px-3 group-data-vertical/tabs:py-1.5 hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:px-2 group-data-[variant=line]/tabs-list:py-2 group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:border-border data-active:bg-background data-active:text-foreground dark:data-active:bg-card`,`after:absolute after:bg-primary after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function ue({className:e,...t}){return(0,v.jsx)(ae,{"data-slot":`tabs-content`,className:h(`flex-1 text-sm outline-none`,e),...t})}export{g as a,le as i,ue as n,ce as r,oe as t};
|
package/dashboard/index.html
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>0.security</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/operations-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/client-DRYsuOGl.js">
|
|
7
|
+
<script type="module" crossorigin src="/assets/operations-BxZ0OoXO.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-MGseXjj5.js">
|
|
10
9
|
<link rel="stylesheet" crossorigin href="/assets/operations-CMFVrXEe.css">
|
|
11
10
|
</head>
|
|
12
11
|
<body>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 [Node.js API collaborators](https://github.com/nodejs/node-addon-api#collaborators)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# **node-addon-api module**
|
|
2
|
+
|
|
3
|
+
[](https://app.codecov.io/gh/nodejs/node-addon-api/tree/main)
|
|
4
|
+
|
|
5
|
+
[](https://nodei.co/npm/node-addon-api/) [](https://nodei.co/npm/node-addon-api/)
|
|
6
|
+
|
|
7
|
+
This module contains **header-only C++ wrapper classes** which simplify
|
|
8
|
+
the use of the C based [Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)
|
|
9
|
+
provided by Node.js when using C++. It provides a C++ object model
|
|
10
|
+
and exception handling semantics with low overhead.
|
|
11
|
+
|
|
12
|
+
- [API References](doc/README.md)
|
|
13
|
+
- [Badges](#badges)
|
|
14
|
+
- [Contributing](#contributing)
|
|
15
|
+
- [License](#license)
|
|
16
|
+
|
|
17
|
+
## API References
|
|
18
|
+
|
|
19
|
+
API references are available in the [doc](doc/README.md) directory.
|
|
20
|
+
|
|
21
|
+
<!-- x-release-please-start-version -->
|
|
22
|
+
## Current version: 8.9.2
|
|
23
|
+
<!-- x-release-please-end -->
|
|
24
|
+
|
|
25
|
+
(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
|
|
26
|
+
|
|
27
|
+
node-addon-api is based on [Node-API](https://nodejs.org/api/n-api.html) and supports using different Node-API versions.
|
|
28
|
+
This allows addons built with it to run with Node.js versions which support the targeted Node-API version.
|
|
29
|
+
**However** the node-addon-api support model is to support only the active LTS Node.js versions. This means that
|
|
30
|
+
every year there will be a new major which drops support for the Node.js LTS version which has gone out of service.
|
|
31
|
+
|
|
32
|
+
The oldest Node.js version supported by the current version of node-addon-api is Node.js 18.x.
|
|
33
|
+
|
|
34
|
+
## Badges
|
|
35
|
+
|
|
36
|
+
The use of badges is recommended to indicate the minimum version of Node-API
|
|
37
|
+
required for the module. This helps to determine which Node.js major versions are
|
|
38
|
+
supported. Addon maintainers can consult the [Node-API support matrix][] to determine
|
|
39
|
+
which Node.js versions provide a given Node-API version. The following badges are
|
|
40
|
+
available:
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+

|
|
44
|
+

|
|
45
|
+

|
|
46
|
+

|
|
47
|
+

|
|
48
|
+

|
|
49
|
+

|
|
50
|
+

|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
## Contributing
|
|
54
|
+
|
|
55
|
+
We love contributions from the community to **node-addon-api**!
|
|
56
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around extending this module.
|
|
57
|
+
|
|
58
|
+
## Team members
|
|
59
|
+
|
|
60
|
+
### Active
|
|
61
|
+
|
|
62
|
+
| Name | GitHub Link |
|
|
63
|
+
| ------------------- | ----------------------------------------------------- |
|
|
64
|
+
| Anna Henningsen | [addaleax](https://github.com/addaleax) |
|
|
65
|
+
| Chengzhong Wu | [legendecas](https://github.com/legendecas) |
|
|
66
|
+
| Jack Xia | [JckXia](https://github.com/JckXia) |
|
|
67
|
+
| Kevin Eady | [KevinEady](https://github.com/KevinEady) |
|
|
68
|
+
| Michael Dawson | [mhdawson](https://github.com/mhdawson) |
|
|
69
|
+
| Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) |
|
|
70
|
+
| Vladimir Morozov | [vmoroz](https://github.com/vmoroz) |
|
|
71
|
+
|
|
72
|
+
<details>
|
|
73
|
+
|
|
74
|
+
<summary>Emeritus</summary>
|
|
75
|
+
|
|
76
|
+
### Emeritus
|
|
77
|
+
|
|
78
|
+
| Name | GitHub Link |
|
|
79
|
+
| ------------------- | ----------------------------------------------------- |
|
|
80
|
+
| Arunesh Chandra | [aruneshchandra](https://github.com/aruneshchandra) |
|
|
81
|
+
| Benjamin Byholm | [kkoopa](https://github.com/kkoopa) |
|
|
82
|
+
| Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) |
|
|
83
|
+
| Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) |
|
|
84
|
+
| Jason Ginchereau | [jasongin](https://github.com/jasongin) |
|
|
85
|
+
| Jim Schlight | [jschlight](https://github.com/jschlight) |
|
|
86
|
+
| Sampson Gao | [sampsongao](https://github.com/sampsongao) |
|
|
87
|
+
| Taylor Woll | [boingoing](https://github.com/boingoing) |
|
|
88
|
+
|
|
89
|
+
</details>
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
Licensed under [MIT](./LICENSE.md)
|
|
94
|
+
|
|
95
|
+
[Node-API support matrix]: https://nodejs.org/dist/latest/docs/api/n-api.html#node-api-version-matrix
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
'variables': {
|
|
3
|
+
'NAPI_VERSION%': "<!(node -p \"process.env.NAPI_VERSION || process.versions.napi\")",
|
|
4
|
+
'disable_deprecated': "<!(node -p \"process.env['npm_config_disable_deprecated']\")"
|
|
5
|
+
},
|
|
6
|
+
'conditions': [
|
|
7
|
+
['NAPI_VERSION!=""', { 'defines': ['NAPI_VERSION=<@(NAPI_VERSION)'] } ],
|
|
8
|
+
['NAPI_VERSION==2147483647', { 'defines': ['NAPI_EXPERIMENTAL', 'NODE_API_EXPERIMENTAL_NO_WARNING'] } ],
|
|
9
|
+
['disable_deprecated=="true"', {
|
|
10
|
+
'defines': ['NODE_ADDON_API_DISABLE_DEPRECATED']
|
|
11
|
+
}],
|
|
12
|
+
['OS=="mac"', {
|
|
13
|
+
'cflags+': ['-fvisibility=hidden'],
|
|
14
|
+
'xcode_settings': {
|
|
15
|
+
'OTHER_CFLAGS': ['-fvisibility=hidden']
|
|
16
|
+
}
|
|
17
|
+
}]
|
|
18
|
+
],
|
|
19
|
+
'cflags': [ '-Werror', '-Wall', '-Wextra', '-Wpedantic', '-Wunused-parameter' ],
|
|
20
|
+
'cflags_cc': [ '-Werror', '-Wall', '-Wextra', '-Wpedantic', '-Wunused-parameter' ]
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
'defines': [ 'NAPI_CPP_EXCEPTIONS' ],
|
|
3
|
+
'cflags!': [ '-fno-exceptions' ],
|
|
4
|
+
'cflags_cc!': [ '-fno-exceptions' ],
|
|
5
|
+
'conditions': [
|
|
6
|
+
["OS=='win'", {
|
|
7
|
+
"defines": [
|
|
8
|
+
"_HAS_EXCEPTIONS=1"
|
|
9
|
+
],
|
|
10
|
+
"msvs_settings": {
|
|
11
|
+
"VCCLCompilerTool": {
|
|
12
|
+
"ExceptionHandling": 1,
|
|
13
|
+
'EnablePREfast': 'true',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
}],
|
|
17
|
+
["OS=='mac'", {
|
|
18
|
+
'xcode_settings': {
|
|
19
|
+
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
|
|
20
|
+
'CLANG_CXX_LIBRARY': 'libc++',
|
|
21
|
+
'MACOSX_DEPLOYMENT_TARGET': '10.7',
|
|
22
|
+
},
|
|
23
|
+
}],
|
|
24
|
+
],
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { version } = require('./package.json');
|
|
3
|
+
|
|
4
|
+
const includeDir = path.relative('.', __dirname);
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0
|
|
8
|
+
include_dir: includeDir,
|
|
9
|
+
gyp: path.join(includeDir, 'node_api.gyp:nothing'), // deprecated.
|
|
10
|
+
targets: path.join(includeDir, 'node_addon_api.gyp'),
|
|
11
|
+
version,
|
|
12
|
+
isNodeApiBuiltin: true,
|
|
13
|
+
needsFlag: false
|
|
14
|
+
};
|