0sec-cli 0.17.0 → 0.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/{0sec.js → 0.js} +92 -79
  2. package/LICENSE +1 -1
  3. package/README.md +77 -37
  4. package/chunks/adapt-loop-IGBRQAXO.js +18 -0
  5. package/chunks/{adgraph-JLGA6RYI.js → adgraph-AUDQTBYA.js} +5 -5
  6. package/chunks/agent/skills/frameworks/entra-id.yaml +2 -2
  7. package/chunks/agent/skills/techniques/assumption-mining.yaml +2 -2
  8. package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +2 -2
  9. package/chunks/agent/skills/techniques/entra-attack-paths.yaml +1 -1
  10. package/chunks/agent/skills/techniques/kernel-weaponization.yaml +1 -1
  11. package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +2 -2
  12. package/chunks/agent/skills/techniques/npm-ecosystem.yaml +1 -1
  13. package/chunks/agent/skills/techniques/poc-verification.yaml +1 -1
  14. package/chunks/agent/skills/techniques/seedless-depth-review.yaml +20 -38
  15. package/chunks/{artifact-scraper-GJEZMOHF.js → artifact-scraper-LNQJUORS.js} +6 -6
  16. package/chunks/{assumption-mining-BVMMUZHB.js → assumption-mining-4MJTP6H5.js} +24 -26
  17. package/chunks/{chunk-P6WKNFWX.js → chunk-2OQOQ2FZ.js} +8 -8
  18. package/chunks/{chunk-5G3ZXFBW.js → chunk-2WNCI664.js} +3 -3
  19. package/chunks/{chunk-HDWV7PGI.js → chunk-2WSXFFJZ.js} +4 -4
  20. package/chunks/{chunk-DW5UWPFY.js → chunk-4VGLO2YS.js} +6 -5
  21. package/chunks/{chunk-SNKTC4BP.js → chunk-5T6D5BVY.js} +88 -88
  22. package/chunks/{chunk-OEFNRYI2.js → chunk-6GHSR47F.js} +3 -6
  23. package/chunks/chunk-6YNKRUMC.js +4474 -0
  24. package/chunks/{chunk-O462Y7P2.js → chunk-ANDKY54G.js} +22317 -19616
  25. package/chunks/{chunk-53G27VPS.js → chunk-AZ7L3HFD.js} +7 -2
  26. package/chunks/{chunk-2SANI5RH.js → chunk-BACXRTQ4.js} +691 -318
  27. package/chunks/{chunk-SOG2U7B3.js → chunk-CAJJRUTV.js} +4 -4
  28. package/chunks/{chunk-57ZENEX2.js → chunk-CGHCEN7W.js} +3 -3
  29. package/chunks/{chunk-VGRDNSHA.js → chunk-CL5KAUM6.js} +17 -16
  30. package/chunks/{chunk-QOKTUOU2.js → chunk-CXKDWFNO.js} +6 -6
  31. package/chunks/{chunk-RWONANDA.js → chunk-DQTNI3KY.js} +5 -5
  32. package/chunks/{chunk-K26SZ37E.js → chunk-E2UOY5PJ.js} +288 -100
  33. package/chunks/{chunk-CLHCDHP4.js → chunk-ER3SUMYJ.js} +40 -18
  34. package/chunks/{chunk-IORC6MQX.js → chunk-FAH6V4QM.js} +31964 -32279
  35. package/chunks/{chunk-6LKRLK2R.js → chunk-FHC2B7LN.js} +3 -3
  36. package/chunks/{chunk-4Y4KQJXE.js → chunk-FWAYJ2IV.js} +16 -16
  37. package/chunks/{chunk-WVTBZEQO.js → chunk-G34QP2XW.js} +8 -8
  38. package/chunks/{chunk-MYVT64FN.js → chunk-GHWODZMR.js} +2 -2
  39. package/chunks/{chunk-F3WBKITT.js → chunk-GIQKESMN.js} +10 -10
  40. package/chunks/{chunk-2RMLOJVB.js → chunk-GVD6SJGH.js} +2 -2
  41. package/chunks/{chunk-RDZYQQLW.js → chunk-HBKCGJAV.js} +7 -7
  42. package/chunks/{chunk-SF4KZ4O3.js → chunk-HLFS6WV2.js} +2 -2
  43. package/chunks/chunk-HPQZHOIU.js +67 -0
  44. package/chunks/{chunk-3QFDYBZQ.js → chunk-IMGWPNQM.js} +231 -1308
  45. package/chunks/{chunk-3MOLBTLS.js → chunk-K2PWUPUI.js} +2 -2
  46. package/chunks/{chunk-MMLDQR4H.js → chunk-NDJU5ZZ7.js} +14 -14
  47. package/chunks/{chunk-H44E2CRN.js → chunk-NOPBXZUV.js} +3 -3
  48. package/chunks/{chunk-HE7LCA7G.js → chunk-O6SD4A36.js} +3 -3
  49. package/chunks/{chunk-SAFFWQW4.js → chunk-P6YG6TEZ.js} +6 -6
  50. package/chunks/{chunk-KKGE5RQE.js → chunk-PC6RCKQV.js} +198 -11
  51. package/chunks/{chunk-LP3HHYQU.js → chunk-PD2BBBKT.js} +2 -2
  52. package/chunks/{chunk-BKZFDZ23.js → chunk-QCUFBVIZ.js} +3 -3
  53. package/chunks/{chunk-KLTNTE2Z.js → chunk-QZVG3BG4.js} +14 -14
  54. package/chunks/{chunk-D6S3IIPG.js → chunk-RF5QGKLR.js} +9 -9
  55. package/chunks/{chunk-LOHTE223.js → chunk-SBMB4OL3.js} +9 -9
  56. package/chunks/{chunk-IOL7D5YV.js → chunk-SQCBHFWN.js} +3 -3
  57. package/chunks/{chunk-A6CLR72I.js → chunk-TF46UWFU.js} +3 -3
  58. package/chunks/chunk-TH2LW437.js +7829 -0
  59. package/chunks/chunk-TRH2PJSN.js +547 -0
  60. package/chunks/{chunk-RJWOYEOG.js → chunk-UEX7PFSE.js} +5 -5
  61. package/chunks/{chunk-VQG4FT5D.js → chunk-UFHN6RIU.js} +2 -2
  62. package/chunks/{chunk-WU6AFRAZ.js → chunk-V36HVTUL.js} +12 -12
  63. package/chunks/{chunk-IR537GON.js → chunk-VCSFCHAJ.js} +2 -2
  64. package/chunks/{chunk-YLMN3N25.js → chunk-VIT5ALXF.js} +3 -3
  65. package/chunks/{chunk-UJ4IK5PO.js → chunk-VOAXLO4A.js} +10 -10
  66. package/chunks/{chunk-UM3ZNQIM.js → chunk-W4JOXE4N.js} +100 -84
  67. package/chunks/{chunk-DN25OQQA.js → chunk-WF5W75WY.js} +25 -25
  68. package/chunks/{chunk-QKICO43A.js → chunk-WPQLBN4S.js} +5 -5
  69. package/chunks/{chunk-HT6P7RY3.js → chunk-WZISK5VC.js} +37 -35
  70. package/chunks/{chunk-QJQKHO7G.js → chunk-Y5H6E24H.js} +3 -3
  71. package/chunks/{chunk-KTQDLNSR.js → chunk-YA4PUM4H.js} +41 -41
  72. package/chunks/{chunk-47TQJWDH.js → chunk-YHWWF4QY.js} +9 -9
  73. package/chunks/{chunk-2CJ776PV.js → chunk-YPOA3W4O.js} +48 -39
  74. package/chunks/{chunk-7DQEV5QI.js → chunk-Z3IKZX3X.js} +4 -4
  75. package/chunks/codex-models-TYYV4JNN.js +15 -0
  76. package/chunks/{commands-U3AMV5ZU.js → commands-WF5RG4I2.js} +5620 -2513
  77. package/chunks/corpus-v1.json +2 -2
  78. package/chunks/data/appsec-archetypes.json +2 -2
  79. package/chunks/data/chromium-archetypes.json +1 -1
  80. package/chunks/data/freebsd-archetypes.json +1 -1
  81. package/chunks/data/kernel-archetypes.json +2 -2
  82. package/chunks/db-U3WQZVAO.js +16 -0
  83. package/chunks/{disclose-A6AEIEDA.js → disclose-67GZCDBO.js} +5 -5
  84. package/chunks/{dist-JR67XKYO.js → dist-ACC3DZUZ.js} +11 -5
  85. package/chunks/{dist-GL66KMUX.js → dist-EVTN3UTT.js} +6 -6
  86. package/chunks/{dist-FDKALV4R.js → dist-F6X62TQK.js} +290 -327
  87. package/chunks/dist-KEULE5IQ.js +21914 -0
  88. package/chunks/dist-XZB53PS5.js +53 -0
  89. package/chunks/eval-runner-SA6OUGHZ.js +26 -0
  90. package/chunks/example-manifest.json +2 -2
  91. package/chunks/{exploit-agent-XP23ISN7.js → exploit-agent-36Q7XQFP.js} +4 -4
  92. package/chunks/{exploit-autoclimb-E6T7RRSC.js → exploit-autoclimb-J4OTSTZ6.js} +6 -6
  93. package/chunks/{exploit-climb-2FAUP6XU.js → exploit-climb-PYEJDIC4.js} +12 -12
  94. package/chunks/fix-J2KBRJDV.js +12 -0
  95. package/chunks/{github-issues-MJ6OYOOU.js → github-issues-IGTTWM7V.js} +7 -7
  96. package/chunks/harness-GDUMKGSE.js +22 -0
  97. package/chunks/http-conformance-U5F6GKYG.js +11 -0
  98. package/chunks/http-sender-I5XFFY35.js +10 -0
  99. package/chunks/hunt-scan-UDJSCISU.js +36 -0
  100. package/chunks/{identity-6ZAIIWOR.js → identity-JTIVJSV7.js} +5 -5
  101. package/chunks/{kernel-primitive-TENE3R7T.js → kernel-primitive-F2IXUFAX.js} +6 -6
  102. package/chunks/{kernel-vm-runner-4F6QSNFY.js → kernel-vm-runner-276LHIOV.js} +6 -6
  103. package/chunks/memsafety-scan-NHUOGTEX.js +16 -0
  104. package/chunks/{native-loop-NTONUDP7.js → native-loop-3BSYVDUI.js} +17 -18
  105. package/chunks/{npm-detectors-KB5Y5ZFX.js → npm-detectors-VIYJXKFQ.js} +6 -6
  106. package/chunks/npm-dynamic-discovery-5J7FT3XM.js +13 -0
  107. package/chunks/orchestrate-DHBFRTSI.js +59 -0
  108. package/chunks/{pre-recon-cve-66EB6G4M.js → pre-recon-cve-X2K2P5YQ.js} +4 -4
  109. package/chunks/prepare-KYHGFWCJ.js +13 -0
  110. package/chunks/process-PNMC36JI.js +15 -0
  111. package/chunks/{replay-runner-RRR4E2A7.js → replay-runner-LK2XFIVG.js} +7 -7
  112. package/chunks/{run-ESNN4V5W.js → run-CBGE6DRQ.js} +2401 -1810
  113. package/chunks/{runtime-62ZQAH7H.js → runtime-PXO5G6UV.js} +11 -11
  114. package/chunks/runtime-XFWJTBUO.js +12 -0
  115. package/chunks/{scan-stream-FHI2FYZE.js → scan-stream-BMOCPKQX.js} +7 -7
  116. package/chunks/{scope-BI7BF4ZY.js → scope-NJHIDDTN.js} +4 -4
  117. package/chunks/{session-store-BCFQYDCE.js → session-store-46WBZM22.js} +6 -6
  118. package/chunks/source-files-REHOM44I.js +12 -0
  119. package/chunks/{specdrift-WCLH6TTQ.js → specdrift-AFS54WEJ.js} +5 -5
  120. package/chunks/token-KRWP5JYA.js +72 -0
  121. package/chunks/token-util-DWTL33S3.js +8 -0
  122. package/chunks/variant-candidates-UH2WC2HA.js +13 -0
  123. package/chunks/{web-recon-prepass-DPVCBRZA.js → web-recon-prepass-SFXU44SS.js} +9 -9
  124. package/dashboard/assets/desktop-BT7RkC4q.js +32 -0
  125. package/dashboard/assets/desktop-OaBI0E0e.css +1 -0
  126. package/dashboard/assets/{findings-page-CACW9nw2.js → findings-page-B4rwF6fZ.js} +2 -2
  127. package/dashboard/assets/{format-PoISqsES.js → format-LNQSSpn6.js} +1 -1
  128. package/dashboard/assets/live-page-DoNwpPAO.js +1 -0
  129. package/dashboard/assets/{meta-tile-CcskIV_o.js → meta-tile-BMtBC-Qq.js} +1 -1
  130. package/dashboard/assets/operations-CMFVrXEe.css +2 -0
  131. package/dashboard/assets/operations-app-ER0gg7GN.js +2 -0
  132. package/dashboard/assets/{operations-D8nUP5_m.js → operations-e2CGYKB1.js} +2 -2
  133. package/dashboard/assets/{overview-page-DTGS8dPo.js → overview-page-CmeWH17A.js} +1 -1
  134. package/dashboard/assets/{page-header-MFVvEtZW.js → page-header-CIJyycfz.js} +1 -1
  135. package/dashboard/assets/scans-page-CuhzWhHx.js +1 -0
  136. package/dashboard/assets/{table-BYS-nIVA.js → table-BgsSBdke.js} +1 -1
  137. package/dashboard/assets/{tabs-DivxbhQy.js → tabs-vn6v7Bk6.js} +1 -1
  138. package/dashboard/desktop.html +3 -3
  139. package/dashboard/index.html +3 -3
  140. package/package.json +11 -11
  141. package/chunks/adapt-loop-ECQG7454.js +0 -18
  142. package/chunks/appsec-catalog-CBWHGTEL.js +0 -24
  143. package/chunks/chunk-H2FFLZNK.js +0 -3
  144. package/chunks/chunk-QI233I24.js +0 -333
  145. package/chunks/chunk-RRMJC3ZE.js +0 -105
  146. package/chunks/chunk-SZJCPG2I.js +0 -110
  147. package/chunks/chunk-WKNNZVJS.js +0 -2798
  148. package/chunks/cost-ledger-ZCKMBJEN.js +0 -13
  149. package/chunks/db-26NGQFKO.js +0 -16
  150. package/chunks/eval-runner-DDLE5RQ3.js +0 -27
  151. package/chunks/fix-IG7LYXH3.js +0 -12
  152. package/chunks/harness-HWOYFKFY.js +0 -22
  153. package/chunks/http-conformance-DU66MZIU.js +0 -11
  154. package/chunks/http-sender-GWH2IYEA.js +0 -10
  155. package/chunks/hunt-scan-XPELSPQQ.js +0 -38
  156. package/chunks/memsafety-scan-J7SECV5W.js +0 -16
  157. package/chunks/npm-dynamic-discovery-AHROOZDB.js +0 -13
  158. package/chunks/orchestrate-ZUWAUWBC.js +0 -62
  159. package/chunks/pipeline-FCARFZU3.js +0 -14
  160. package/chunks/prepare-MYY743TK.js +0 -13
  161. package/chunks/process-3Q7QJIOZ.js +0 -13
  162. package/chunks/runtime-J7PLXZNM.js +0 -12
  163. package/chunks/source-files-PWRQR6LY.js +0 -12
  164. package/chunks/variant-candidates-6KM6F6MD.js +0 -13
  165. package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
  166. package/dashboard/assets/desktop-CXTQonNm.js +0 -32
  167. package/dashboard/assets/desktop-NOekk4QS.css +0 -1
  168. package/dashboard/assets/live-page-DrgQqQK5.js +0 -1
  169. package/dashboard/assets/operations-BKE8T-vY.css +0 -2
  170. package/dashboard/assets/operations-app-CQQhG54n.js +0 -2
  171. package/dashboard/assets/scans-page-ChVtq8Us.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/operations-app-CQQhG54n.js","assets/jsx-runtime-C7oxC63R.js","assets/format-PoISqsES.js","assets/dist-CmX-h7a4.js","assets/client-DRYsuOGl.js","assets/dist-DAwYQmf_.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/operations-app-ER0gg7GN.js","assets/jsx-runtime-C7oxC63R.js","assets/format-LNQSSpn6.js","assets/dist-CmX-h7a4.js","assets/client-DRYsuOGl.js","assets/dist-DAwYQmf_.js"])))=>i.map(i=>d[i]);
2
2
  import{a as e,n as t,t as n}from"./jsx-runtime-C7oxC63R.js";import{t as r}from"./client-DRYsuOGl.js";var i=e(t(),1),a=e(r(),1),o=`modulepreload`,s=function(e){return`/`+e},c={},l=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=l(t.map(t=>{if(t=s(t,n),t=u(t),t in c)return;c[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:o,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},u=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,d=/^[\\/]{2}/;function f(e,t){return t+e.replace(/\\/g,`/`)}var p=`popstate`;function m(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function h(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return b(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:x(t)}return C(t,n,null,e)}function g(e,t){if(e===!1||e==null)throw Error(t)}function _(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function v(){return Math.random().toString(36).substring(2,10)}function y(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function b(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?S(t):t,state:n,key:t&&t.key||r||v(),mask:i}}function x({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function S(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function C(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:_.location,delta:t})}function f(e,t){s=`PUSH`;let r=m(e)?e:b(_.location,e,t);n&&n(r,e),l=u()+1;let d=y(r,l),f=_.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:_.location,delta:1})}function h(e,t){s=`REPLACE`;let r=m(e)?e:b(_.location,e,t);n&&n(r,e),l=u();let i=y(r,l),d=_.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:_.location,delta:0})}function g(e){return w(i,e)}let _={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(p,d),c=e,()=>{i.removeEventListener(p,d),c=null}},createHref(e){return t(i,e)},createURL:g,encodeLocation(e){let t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:h,go(e){return o.go(e)}};return _}function w(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),g(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:x(t);return i=i.replace(/ $/,`%20`),!n&&d.test(i)&&(i=r+i),new URL(i,r)}function T(e,t,n=`/`){return ee(e,t,n,!1)}function ee(e,t,n,r,i){let a=D((typeof t==`string`?S(t):t).pathname||`/`,n);if(a==null)return null;let o=i??te(e),s=null,c=_e(a);for(let e=0;s==null&&e<o.length;++e)s=me(o[e],c,r);return s}function te(e){let t=ne(e);return ie(t),t}function ne(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;g(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=k([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(g(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ne(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:fe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=ge(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of re(e.path))a(e,t,!0,n)}),t}function re(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=re(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ie(e){e.sort((e,t)=>e.score===t.score?pe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ae=/^:[\w-]+$/,oe=3,se=2,ce=1,le=10,ue=-2,de=e=>e===`*`;function fe(e,t){let n=e.split(`/`),r=n.length;return n.some(de)&&(r+=ue),t&&(r+=se),n.filter(e=>!de(e)).reduce((e,t)=>e+(ae.test(t)?oe:t===``?ce:le),r)}function pe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function me(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?he(u,l,s.matcher,s.compiledParams):E(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:k([a,d.pathname]),pathnameBase:we(k([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=k([a,d.pathnameBase]))}return o}function E(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ge(e.path,e.caseSensitive,e.end);return he(e,t,n,r)}function he(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ge(e,t=!1,n=!0){_(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function _e(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return _(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function D(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ve(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?S(e):e,a;return n?(n=Ce(n),a=n.startsWith(`/`)?ye(n.substring(1),`/`):ye(n,t)):a=t,{pathname:a,search:Te(r),hash:Ee(i)}}function ye(e,t){let n=A(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function be(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function xe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Se(e){let t=xe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function O(e,t,n,r=!1){let i;typeof e==`string`?i=S(e):(i={...e},g(!i.pathname||!i.pathname.includes(`?`),be(`?`,`pathname`,`search`,i)),g(!i.pathname||!i.pathname.includes(`#`),be(`#`,`pathname`,`hash`,i)),g(!i.search||!i.search.includes(`#`),be(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ve(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ce=e=>e.replace(/[\\/]{2,}/g,`/`),k=e=>Ce(e.join(`/`)),A=e=>e.replace(/\/+$/,``),we=e=>A(e).replace(/^\/*/,`/`),Te=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ee=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,De=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Oe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ke(e){return k(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ae=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function je(e,t){let n=e;if(typeof n!=`string`||!u.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ae)try{let e=new URL(window.location.href),r=d.test(n)?new URL(f(n,e.protocol)):new URL(n),a=D(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{_(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Me=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Me);var Ne=[`GET`,...Me];new Set(Ne);var Pe=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Fe(e){try{return Pe.includes(new URL(e).protocol)}catch{return!1}}var j=i.createContext(null);j.displayName=`DataRouter`;var M=i.createContext(null);M.displayName=`DataRouterState`;var Ie=i.createContext(!1);function Le(){return i.useContext(Ie)}var Re=i.createContext({isTransitioning:!1});Re.displayName=`ViewTransition`;var ze=i.createContext(new Map);ze.displayName=`Fetchers`;var Be=i.createContext(null);Be.displayName=`Await`;var N=i.createContext(null);N.displayName=`Navigation`;var P=i.createContext(null);P.displayName=`Location`;var F=i.createContext({outlet:null,matches:[],isDataRoute:!1});F.displayName=`Route`;var Ve=i.createContext(null);Ve.displayName=`RouteError`;var He=`REACT_ROUTER_ERROR`,Ue=`REDIRECT`,We=`ROUTE_ERROR_RESPONSE`;function Ge(e){if(e.startsWith(`${He}:${Ue}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ke(e){if(e.startsWith(`${He}:${We}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new De(t.status,t.statusText,t.data)}catch{}}function qe(e,{relative:t}={}){g(I(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=i.useContext(N),{hash:a,pathname:o,search:s}=z(e,{relative:t}),c=o;return n!==`/`&&(c=o===`/`?n:k([n,o])),r.createHref({pathname:c,search:s,hash:a})}function I(){return i.useContext(P)!=null}function L(){return g(I(),`useLocation() may be used only in the context of a <Router> component.`),i.useContext(P).location}var Je=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ye(e){i.useContext(N).static||i.useLayoutEffect(e)}function R(){let{isDataRoute:e}=i.useContext(F);return e?mt():Xe()}function Xe(){g(I(),`useNavigate() may be used only in the context of a <Router> component.`);let e=i.useContext(j),{basename:t,navigator:n}=i.useContext(N),{matches:r}=i.useContext(F),{pathname:a}=L(),o=JSON.stringify(Se(r)),s=i.useRef(!1);return Ye(()=>{s.current=!0}),i.useCallback((r,i={})=>{if(_(s.current,Je),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=O(r,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:k([t,c.pathname])),(i.replace?n.replace:n.push)(c,i.state,i)},[t,n,o,a,e])}i.createContext(null);function Ze(){let{matches:e}=i.useContext(F);return e[e.length-1]?.params??{}}function z(e,{relative:t}={}){let{matches:n}=i.useContext(F),{pathname:r}=L(),a=JSON.stringify(Se(n));return i.useMemo(()=>O(e,JSON.parse(a),r,t===`path`),[e,a,r,t])}function Qe(e,t){return $e(e,t)}function $e(e,t,n){g(I(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=i.useContext(N),{matches:a}=i.useContext(F),o=a[a.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,u=o&&o.route;{let e=u&&u.path||``;gt(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
3
 
4
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=L(),f;if(t){let e=typeof t==`string`?S(t):t;g(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):T(e,{pathname:m});_(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),_(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=ot(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:k([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:k([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),a,n);return t&&v?i.createElement(P.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},v):v}function et(){let e=pt(),t=Oe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:r},o={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=i.createElement(i.Fragment,null,i.createElement(`p`,null,`💿 Hey developer 👋`),i.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,i.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,i.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),i.createElement(i.Fragment,null,i.createElement(`h2`,null,`Unexpected Application Error!`),i.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?i.createElement(`pre`,{style:a},n):null,s)}var tt=i.createElement(et,null),nt=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ke(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:i.createElement(F.Provider,{value:this.props.routeContext},i.createElement(Ve.Provider,{value:e,children:this.props.component}));return this.context?i.createElement(it,{error:e},t):t}};nt.contextType=Ie;var rt=new WeakMap;function it({children:e,error:t}){let{basename:n}=i.useContext(N);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ge(t.digest);if(e){let r=rt.get(t);if(r)throw r;let a=je(e.location,n),o=a.absoluteURL||a.to;if(Fe(o))throw Error(`Invalid redirect location`);if(Ae&&!rt.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw rt.set(t,n),n}}return i.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function at({routeContext:e,match:t,children:n}){let r=i.useContext(j);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(F.Provider,{value:e},n)}function ot(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,o=r?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);g(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:i}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!i||i[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),a=c>=0?a.slice(0,c+1):[a[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ke(r.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=o&&n.route.id?o[n.route.id]:void 0,p=n.route.errorElement||tt,s&&(c<0&&l===0?(gt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(at,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?i.createElement(nt,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function st(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ct(e){let t=i.useContext(j);return g(t,st(e)),t}function lt(e){let t=i.useContext(M);return g(t,st(e)),t}function ut(e){let t=i.useContext(F);return g(t,st(e)),t}function dt(e){let t=ut(e),n=t.matches[t.matches.length-1];return g(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ft(){return dt(`useRouteId`)}function pt(){let e=i.useContext(Ve),t=lt(`useRouteError`),n=dt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function mt(){let{router:e}=ct(`useNavigate`),t=dt(`useNavigate`),n=i.useRef(!1);return Ye(()=>{n.current=!0}),i.useCallback(async(r,i={})=>{_(n.current,Je),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ht={};function gt(e,t,n){!t&&!ht[e]&&(ht[e]=!0,_(!1,n))}i.memo(_t);function _t({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return $e(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function vt({to:e,replace:t,state:n,relative:r}){g(I(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:a}=i.useContext(N);_(!a,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=i.useContext(F),{pathname:s}=L(),c=R(),l=O(e,Se(o),s,r===`path`),u=JSON.stringify(l);return i.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function yt(e){g(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function bt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:a,static:o=!1,useTransitions:s}){g(!I(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=i.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:s,future:{}}),[c,a,o,s]);typeof n==`string`&&(n=S(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,v=i.useMemo(()=>{let e=D(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return _(v!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:i.createElement(N.Provider,{value:l},i.createElement(P.Provider,{children:t,value:v}))}function xt({children:e,location:t}){return Qe(St(e),t)}i.Component;function St(e,t=[]){let n=[];return i.Children.forEach(e,(e,r)=>{if(!i.isValidElement(e))return;let a=[...t,r];if(e.type===i.Fragment){n.push.apply(n,St(e.props.children,a));return}g(e.type===yt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),g(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let o={id:e.props.id||a.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=St(e.props.children,a)),n.push(o)}),n}var B=`get`,V=`application/x-www-form-urlencoded`;function H(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ct(e){return H(e)&&e.tagName.toLowerCase()===`button`}function wt(e){return H(e)&&e.tagName.toLowerCase()===`form`}function Tt(e){return H(e)&&e.tagName.toLowerCase()===`input`}function Et(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Dt(e,t){return e.button===0&&(!t||t===`_self`)&&!Et(e)}function Ot(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function kt(e,t){let n=Ot(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var U=null;function At(){if(U===null)try{new FormData(document.createElement(`form`),0),U=!1}catch{U=!0}return U}var jt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Mt(e){return e!=null&&!jt.has(e)?(_(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`),null):e}function Nt(e,t){let n,r,i,a,o;if(wt(e)){let o=e.getAttribute(`action`);r=o?D(o,t):null,n=e.getAttribute(`method`)||B,i=Mt(e.getAttribute(`enctype`))||V,a=new FormData(e)}else if(Ct(e)||Tt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?D(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||B,i=Mt(e.getAttribute(`formenctype`))||Mt(o.getAttribute(`enctype`))||V,a=new FormData(o,e),!At()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(H(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=B,r=null,i=V,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Pt(e,t){if(e===!1||e==null)throw Error(t)}function Ft(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&D(i.pathname,t)===`/`?`${A(t)}/_root.${r}`:`${A(i.pathname)}.${r}`,i}async function It(e,t){if(e.id in t)return t[e.id];try{let n=await l(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Lt(e){return e!=null&&typeof e.page==`string`}function Rt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function zt(e,t,n){return Wt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await It(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Rt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Bt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Vt(e,t,{includeHydrateFallback:n}={}){return Ht(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ht(e){return[...new Set(e)]}function Ut(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Wt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Lt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ut(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Gt(){let e=i.useContext(j);return Pt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Kt(){let e=i.useContext(M);return Pt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var qt=i.createContext(void 0);qt.displayName=`FrameworkContext`;function W(){let e=i.useContext(qt);return Pt(e,`You must render this element inside a <HydratedRouter> element`),e}function Jt(e,t){let n=i.useContext(qt),[r,a]=i.useState(!1),[o,s]=i.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=i.useRef(null);i.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),i.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{a(!0)},h=()=>{a(!1),s(!1)};return n?e===`intent`?[o,p,{onFocus:G(c,m),onBlur:G(l,h),onMouseEnter:G(u,m),onMouseLeave:G(d,h),onTouchStart:G(f,m)}]:[o,p,{}]:[!1,p,{}]}function G(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Yt({page:e,...t}){let n=Le(),{nonce:r}=W(),{router:a}=Gt(),o=i.useMemo(()=>T(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&r&&(t={...t,nonce:r}),n?i.createElement(Zt,{page:e,matches:o,...t}):i.createElement(Qt,{page:e,matches:o,...t})):null}function Xt(e){let{manifest:t,routeModules:n}=W(),[r,a]=i.useState([]);return i.useEffect(()=>{let r=!1;return zt(e,t,n).then(e=>{r||a(e)}),()=>{r=!0}},[e,t,n]),r}function Zt({page:e,matches:t,...n}){let r=L(),{future:a}=W(),{basename:o}=Gt(),s=i.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Ft(e,o,a.v8_trailingSlashAwareDataRequests,`rsc`),i=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:s.push(e.route.id);return i&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,a.v8_trailingSlashAwareDataRequests,e,r,t]);return i.createElement(i.Fragment,null,s.map(e=>i.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Qt({page:e,matches:t,...n}){let r=L(),{future:a,manifest:o,routeModules:s}=W(),{basename:c}=Gt(),{loaderData:l,matches:u}=Kt(),d=i.useMemo(()=>Bt(e,t,u,o,r,`data`),[e,t,u,o,r]),f=i.useMemo(()=>Bt(e,t,u,o,r,`assets`),[e,t,u,o,r]),p=i.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))}),n.size===0)return[];let u=Ft(e,c,a.v8_trailingSlashAwareDataRequests,`data`);return i&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,a.v8_trailingSlashAwareDataRequests,l,r,o,d,t,e,s]),m=i.useMemo(()=>Vt(f,o),[f,o]),h=Xt(f);return i.createElement(i.Fragment,null,p.map(e=>i.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>i.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>i.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function $t(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}i.Component;var en=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{en&&(window.__reactRouterVersion=`7.18.2`)}catch{}function tn({basename:e,children:t,useTransitions:n,window:r}){let a=i.useRef();a.current??=h({window:r,v5Compat:!0});let o=a.current,[s,c]=i.useState({action:o.action,location:o.location}),l=i.useCallback(e=>{n===!1?c(e):i.startTransition(()=>c(e))},[n]);return i.useLayoutEffect(()=>o.listen(l),[o,l]),i.createElement(bt,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,useTransitions:n})}var nn=i.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:a,replace:o,mask:s,state:c,target:l,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g){let{basename:_,navigator:v,useTransitions:y}=i.useContext(N),b=typeof d==`string`&&u.test(d),x=je(d,_);d=x.to;let S=qe(d,{relative:r}),C=L(),w=null;if(s){let e=O(s,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:k([_,e.pathname])),w=v.createHref(e)}let[T,ee,te]=Jt(n,h),ne=cn(d,{replace:o,mask:s,state:c,target:l,preventScrollReset:f,relative:r,viewTransition:p,defaultShouldRevalidate:m,useTransitions:y});function re(t){e&&e(t),t.defaultPrevented||ne(t)}let ie=!(x.isExternal||a),ae=i.createElement(`a`,{...h,...te,href:(ie?w:void 0)||x.absoluteURL||S,onClick:ie?re:e,ref:$t(g,ee),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?i.createElement(i.Fragment,null,ae,i.createElement(Yt,{page:S})):ae});nn.displayName=`Link`;var rn=i.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=z(o,{relative:l.relative}),f=L(),p=i.useContext(M),{navigator:m,basename:h}=i.useContext(N),g=p!=null&&mn(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=D(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let ee=typeof a==`function`?a(C):a;return i.createElement(nn,{...l,"aria-current":w,className:T,ref:u,style:ee,to:o,viewTransition:s},typeof c==`function`?c(C):c)});rn.displayName=`NavLink`;var an=i.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:s=B,action:c,onSubmit:l,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g)=>{let{useTransitions:_}=i.useContext(N),v=fn(),y=pn(c,{relative:d}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&u.test(c);return i.createElement(`form`,{ref:g,method:b,action:y,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,u=()=>v(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:a,state:o,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m});_&&n!==!1?i.startTransition(()=>u()):u()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});an.displayName=`Form`;function on(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sn(e){let t=i.useContext(j);return g(t,on(e)),t}function cn(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=R(),f=L(),p=z(e,{relative:s});return i.useCallback(m=>{if(Dt(m,t)){m.preventDefault();let t=n===void 0?x(f)===x(p):n,h=()=>d(e,{replace:t,mask:r,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?i.startTransition(()=>h()):h()}},[f,d,p,n,r,a,t,e,o,s,c,l,u])}function ln(e){_(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(Ot(e)),n=i.useRef(!1),r=L(),a=i.useMemo(()=>kt(r.search,n.current?null:t.current),[r.search]),o=R();return[a,i.useCallback((e,t)=>{let r=Ot(typeof e==`function`?e(new URLSearchParams(a)):e);n.current=!0,o(`?`+r,t)},[o,a])]}var un=0,dn=()=>`__${String(++un)}__`;function fn(){let{router:e}=sn(`useSubmit`),{basename:t}=i.useContext(N),n=ft(),r=e.fetch,a=e.navigate;return i.useCallback(async(e,i={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Nt(e,t);if(i.navigate===!1){let e=i.fetcherKey||dn();await r(e,n,i.action||o,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||c,flushSync:i.flushSync})}else await a(i.action||o,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,a,t,n])}function pn(e,{relative:t}={}){let{basename:n}=i.useContext(N),r=i.useContext(F);g(r,`useFormAction must be used inside a RouteContext`);let[a]=r.matches.slice(-1),o={...z(e||`.`,{relative:t})},s=L();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:k([n,o.pathname])),x(o)}function mn(e,{relative:t}={}){let n=i.useContext(Re);g(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=sn(`useViewTransitionState`),a=z(e,{relative:t});if(!n.isTransitioning)return!1;let o=D(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=D(n.nextLocation.pathname,r)||n.nextLocation.pathname;return E(a.pathname,s)!=null||E(a.pathname,o)!=null}var K=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hn=new class extends K{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},gn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},q=new class{#e=gn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function _n(e){setTimeout(e,0)}var vn=typeof window>`u`||`Deno`in globalThis;function J(){}function yn(e,t){return typeof e==`function`?e(t):e}function bn(e){return typeof e==`number`&&e>=0&&e!==1/0}function xn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Y(e,t){return typeof e==`function`?e(t):e}function Sn(e,t){return typeof e==`function`?e(t):e}function Cn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Tn(o,t.options))return!1}else if(!Z(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function wn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(X(t.options.mutationKey)!==X(a))return!1}else if(!Z(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Tn(e,t){return(t?.queryKeyHashFn||X)(e)}function X(e){return JSON.stringify(e,(e,t)=>An(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Z(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Z(e[n],t[n])):!1}var En=Object.prototype.hasOwnProperty;function Dn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=kn(e)&&kn(t);if(!r&&!(An(e)&&An(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:En.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Dn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function On(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function kn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function An(e){if(!jn(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!jn(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function jn(e){return Object.prototype.toString.call(e)===`[object Object]`}function Mn(e){return new Promise(t=>{q.setTimeout(t,e)})}function Nn(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Dn(e,t)}function Pn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var In=Symbol();function Ln(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===In?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Rn(e,t){return typeof e==`function`?e(...t):!!e}function zn(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Bn=(()=>{let e=()=>vn;return{isServer(){return e()},setIsServer(t){e=t}}})();function Vn(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Hn=_n;function Un(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Hn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Q=Un(),Wn=new class extends K{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Gn(e){return Math.min(1e3*2**e,3e4)}function Kn(e){return(e??`online`)!==`online`||Wn.isOnline()}var qn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Jn(e){let t=!1,n=0,r,i=Vn(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new qn(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>hn.isFocused()&&(e.networkMode===`always`||Wn.isOnline())&&e.canRun(),u=()=>Kn(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Bn.isServer()?0:3),o=e.retryDelay??Gn,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Mn(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Yn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bn(this.gcTime)&&(this.#e=q.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bn.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(q.clearTimeout(this.#e),this.#e=void 0)}};function Xn(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{zn(e,()=>t.signal,()=>n=!0)},u=Ln(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Fn:Pn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Qn:Zn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Zn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Zn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $n=class extends Yn{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=nr(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=nr(this.options);e.data!==void 0&&(this.setState(tr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Nn(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(J).catch(J):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Sn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===In||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Y(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!xn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ln(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Xn(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Jn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof qn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof qn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...er(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...tr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Q.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function er(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function tr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function nr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var rr=class extends Yn{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ir(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Jn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Q.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ir(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var ar=class extends K{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new rr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=or(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=or(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=or(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=or(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Q.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>wn(t,e))}findAll(e={}){return this.getAll().filter(t=>wn(e,t))}notify(e){Q.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Q.batch(()=>Promise.all(e.map(e=>e.continue().catch(J))))}};function or(e){return e.options.scope?.id}var sr=class extends K{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Tn(r,t),a=this.get(i);return a||(a=new $n({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Q.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Cn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Cn(e,t)):t}notify(e){Q.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Q.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Q.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},cr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new sr,this.#t=e.mutationCache||new ar,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=hn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Wn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Y(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=yn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Q.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Q.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Q.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Q.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(J).catch(J)}invalidateQueries(e,t={}){return Q.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Q.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(J)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(J)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Y(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(J).catch(J)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(J).catch(J)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Wn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(X(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Z(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(X(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Z(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Tn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===In&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},$=n(),lr=i.createContext(void 0),ur=e=>{let t=i.useContext(lr);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},dr=({client:e,children:t})=>(i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,$.jsx)(lr.Provider,{value:e,children:t})),fr=(0,i.lazy)(async()=>({default:(await l(async()=>{let{OperationsApp:e}=await import(`./operations-app-CQQhG54n.js`);return{OperationsApp:e}},__vite__mapDeps([0,1,2,3,4,5]))).OperationsApp}));function pr({label:e}){return(0,$.jsx)(`div`,{role:`status`,className:`grid min-h-screen place-items-center text-sm`,style:{colorScheme:`light dark`,background:`Canvas`,color:`CanvasText`,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`},children:e})}function mr(){return(0,$.jsx)(i.Suspense,{fallback:(0,$.jsx)(pr,{label:`Opening operations…`}),children:(0,$.jsx)(fr,{})})}document.documentElement.classList.add(`dark`),document.documentElement.style.colorScheme=`dark`;var hr=new cr({defaultOptions:{queries:{staleTime:15e3,refetchOnWindowFocus:!0}}});a.createRoot(document.getElementById(`root`)).render((0,$.jsx)(i.StrictMode,{children:(0,$.jsx)(dr,{client:hr,children:(0,$.jsx)(tn,{children:(0,$.jsx)(mr,{})})})}));export{L as C,l as D,ln as E,xt as S,Ze as T,hn as _,Vn as a,vt as b,bn as c,Sn as d,Y as f,q as g,xn as h,Q as i,J as l,Rn as m,ir as n,Bn as o,On as p,er as r,X as s,ur as t,Nn as u,K as v,R as w,yt as x,rn as y};
4
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=L(),f;if(t){let e=typeof t==`string`?S(t):t;g(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):T(e,{pathname:m});_(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),_(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=ot(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:k([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:k([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),a,n);return t&&v?i.createElement(P.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},v):v}function et(){let e=pt(),t=Oe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:r},o={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=i.createElement(i.Fragment,null,i.createElement(`p`,null,`💿 Hey developer 👋`),i.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,i.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,i.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),i.createElement(i.Fragment,null,i.createElement(`h2`,null,`Unexpected Application Error!`),i.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?i.createElement(`pre`,{style:a},n):null,s)}var tt=i.createElement(et,null),nt=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ke(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:i.createElement(F.Provider,{value:this.props.routeContext},i.createElement(Ve.Provider,{value:e,children:this.props.component}));return this.context?i.createElement(it,{error:e},t):t}};nt.contextType=Ie;var rt=new WeakMap;function it({children:e,error:t}){let{basename:n}=i.useContext(N);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ge(t.digest);if(e){let r=rt.get(t);if(r)throw r;let a=je(e.location,n),o=a.absoluteURL||a.to;if(Fe(o))throw Error(`Invalid redirect location`);if(Ae&&!rt.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw rt.set(t,n),n}}return i.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function at({routeContext:e,match:t,children:n}){let r=i.useContext(j);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(F.Provider,{value:e},n)}function ot(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,o=r?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);g(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:i}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!i||i[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),a=c>=0?a.slice(0,c+1):[a[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ke(r.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=o&&n.route.id?o[n.route.id]:void 0,p=n.route.errorElement||tt,s&&(c<0&&l===0?(gt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(at,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?i.createElement(nt,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function st(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ct(e){let t=i.useContext(j);return g(t,st(e)),t}function lt(e){let t=i.useContext(M);return g(t,st(e)),t}function ut(e){let t=i.useContext(F);return g(t,st(e)),t}function dt(e){let t=ut(e),n=t.matches[t.matches.length-1];return g(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ft(){return dt(`useRouteId`)}function pt(){let e=i.useContext(Ve),t=lt(`useRouteError`),n=dt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function mt(){let{router:e}=ct(`useNavigate`),t=dt(`useNavigate`),n=i.useRef(!1);return Ye(()=>{n.current=!0}),i.useCallback(async(r,i={})=>{_(n.current,Je),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ht={};function gt(e,t,n){!t&&!ht[e]&&(ht[e]=!0,_(!1,n))}i.memo(_t);function _t({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return $e(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function vt({to:e,replace:t,state:n,relative:r}){g(I(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:a}=i.useContext(N);_(!a,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=i.useContext(F),{pathname:s}=L(),c=R(),l=O(e,Se(o),s,r===`path`),u=JSON.stringify(l);return i.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function yt(e){g(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function bt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:a,static:o=!1,useTransitions:s}){g(!I(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=i.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:s,future:{}}),[c,a,o,s]);typeof n==`string`&&(n=S(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,v=i.useMemo(()=>{let e=D(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return _(v!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:i.createElement(N.Provider,{value:l},i.createElement(P.Provider,{children:t,value:v}))}function xt({children:e,location:t}){return Qe(St(e),t)}i.Component;function St(e,t=[]){let n=[];return i.Children.forEach(e,(e,r)=>{if(!i.isValidElement(e))return;let a=[...t,r];if(e.type===i.Fragment){n.push.apply(n,St(e.props.children,a));return}g(e.type===yt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),g(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let o={id:e.props.id||a.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=St(e.props.children,a)),n.push(o)}),n}var B=`get`,V=`application/x-www-form-urlencoded`;function H(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ct(e){return H(e)&&e.tagName.toLowerCase()===`button`}function wt(e){return H(e)&&e.tagName.toLowerCase()===`form`}function Tt(e){return H(e)&&e.tagName.toLowerCase()===`input`}function Et(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Dt(e,t){return e.button===0&&(!t||t===`_self`)&&!Et(e)}function Ot(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function kt(e,t){let n=Ot(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var U=null;function At(){if(U===null)try{new FormData(document.createElement(`form`),0),U=!1}catch{U=!0}return U}var jt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Mt(e){return e!=null&&!jt.has(e)?(_(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`),null):e}function Nt(e,t){let n,r,i,a,o;if(wt(e)){let o=e.getAttribute(`action`);r=o?D(o,t):null,n=e.getAttribute(`method`)||B,i=Mt(e.getAttribute(`enctype`))||V,a=new FormData(e)}else if(Ct(e)||Tt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?D(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||B,i=Mt(e.getAttribute(`formenctype`))||Mt(o.getAttribute(`enctype`))||V,a=new FormData(o,e),!At()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(H(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=B,r=null,i=V,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Pt(e,t){if(e===!1||e==null)throw Error(t)}function Ft(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&D(i.pathname,t)===`/`?`${A(t)}/_root.${r}`:`${A(i.pathname)}.${r}`,i}async function It(e,t){if(e.id in t)return t[e.id];try{let n=await l(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Lt(e){return e!=null&&typeof e.page==`string`}function Rt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function zt(e,t,n){return Wt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await It(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Rt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Bt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Vt(e,t,{includeHydrateFallback:n}={}){return Ht(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ht(e){return[...new Set(e)]}function Ut(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Wt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Lt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ut(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Gt(){let e=i.useContext(j);return Pt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Kt(){let e=i.useContext(M);return Pt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var qt=i.createContext(void 0);qt.displayName=`FrameworkContext`;function W(){let e=i.useContext(qt);return Pt(e,`You must render this element inside a <HydratedRouter> element`),e}function Jt(e,t){let n=i.useContext(qt),[r,a]=i.useState(!1),[o,s]=i.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=i.useRef(null);i.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),i.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{a(!0)},h=()=>{a(!1),s(!1)};return n?e===`intent`?[o,p,{onFocus:G(c,m),onBlur:G(l,h),onMouseEnter:G(u,m),onMouseLeave:G(d,h),onTouchStart:G(f,m)}]:[o,p,{}]:[!1,p,{}]}function G(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Yt({page:e,...t}){let n=Le(),{nonce:r}=W(),{router:a}=Gt(),o=i.useMemo(()=>T(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&r&&(t={...t,nonce:r}),n?i.createElement(Zt,{page:e,matches:o,...t}):i.createElement(Qt,{page:e,matches:o,...t})):null}function Xt(e){let{manifest:t,routeModules:n}=W(),[r,a]=i.useState([]);return i.useEffect(()=>{let r=!1;return zt(e,t,n).then(e=>{r||a(e)}),()=>{r=!0}},[e,t,n]),r}function Zt({page:e,matches:t,...n}){let r=L(),{future:a}=W(),{basename:o}=Gt(),s=i.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Ft(e,o,a.v8_trailingSlashAwareDataRequests,`rsc`),i=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:s.push(e.route.id);return i&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,a.v8_trailingSlashAwareDataRequests,e,r,t]);return i.createElement(i.Fragment,null,s.map(e=>i.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Qt({page:e,matches:t,...n}){let r=L(),{future:a,manifest:o,routeModules:s}=W(),{basename:c}=Gt(),{loaderData:l,matches:u}=Kt(),d=i.useMemo(()=>Bt(e,t,u,o,r,`data`),[e,t,u,o,r]),f=i.useMemo(()=>Bt(e,t,u,o,r,`assets`),[e,t,u,o,r]),p=i.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))}),n.size===0)return[];let u=Ft(e,c,a.v8_trailingSlashAwareDataRequests,`data`);return i&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,a.v8_trailingSlashAwareDataRequests,l,r,o,d,t,e,s]),m=i.useMemo(()=>Vt(f,o),[f,o]),h=Xt(f);return i.createElement(i.Fragment,null,p.map(e=>i.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>i.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>i.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function $t(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}i.Component;var en=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{en&&(window.__reactRouterVersion=`7.18.2`)}catch{}function tn({basename:e,children:t,useTransitions:n,window:r}){let a=i.useRef();a.current??=h({window:r,v5Compat:!0});let o=a.current,[s,c]=i.useState({action:o.action,location:o.location}),l=i.useCallback(e=>{n===!1?c(e):i.startTransition(()=>c(e))},[n]);return i.useLayoutEffect(()=>o.listen(l),[o,l]),i.createElement(bt,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,useTransitions:n})}var nn=i.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:a,replace:o,mask:s,state:c,target:l,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g){let{basename:_,navigator:v,useTransitions:y}=i.useContext(N),b=typeof d==`string`&&u.test(d),x=je(d,_);d=x.to;let S=qe(d,{relative:r}),C=L(),w=null;if(s){let e=O(s,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:k([_,e.pathname])),w=v.createHref(e)}let[T,ee,te]=Jt(n,h),ne=cn(d,{replace:o,mask:s,state:c,target:l,preventScrollReset:f,relative:r,viewTransition:p,defaultShouldRevalidate:m,useTransitions:y});function re(t){e&&e(t),t.defaultPrevented||ne(t)}let ie=!(x.isExternal||a),ae=i.createElement(`a`,{...h,...te,href:(ie?w:void 0)||x.absoluteURL||S,onClick:ie?re:e,ref:$t(g,ee),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?i.createElement(i.Fragment,null,ae,i.createElement(Yt,{page:S})):ae});nn.displayName=`Link`;var rn=i.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=z(o,{relative:l.relative}),f=L(),p=i.useContext(M),{navigator:m,basename:h}=i.useContext(N),g=p!=null&&mn(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=D(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let ee=typeof a==`function`?a(C):a;return i.createElement(nn,{...l,"aria-current":w,className:T,ref:u,style:ee,to:o,viewTransition:s},typeof c==`function`?c(C):c)});rn.displayName=`NavLink`;var an=i.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:s=B,action:c,onSubmit:l,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g)=>{let{useTransitions:_}=i.useContext(N),v=fn(),y=pn(c,{relative:d}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&u.test(c);return i.createElement(`form`,{ref:g,method:b,action:y,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,u=()=>v(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:a,state:o,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m});_&&n!==!1?i.startTransition(()=>u()):u()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});an.displayName=`Form`;function on(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sn(e){let t=i.useContext(j);return g(t,on(e)),t}function cn(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=R(),f=L(),p=z(e,{relative:s});return i.useCallback(m=>{if(Dt(m,t)){m.preventDefault();let t=n===void 0?x(f)===x(p):n,h=()=>d(e,{replace:t,mask:r,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?i.startTransition(()=>h()):h()}},[f,d,p,n,r,a,t,e,o,s,c,l,u])}function ln(e){_(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(Ot(e)),n=i.useRef(!1),r=L(),a=i.useMemo(()=>kt(r.search,n.current?null:t.current),[r.search]),o=R();return[a,i.useCallback((e,t)=>{let r=Ot(typeof e==`function`?e(new URLSearchParams(a)):e);n.current=!0,o(`?`+r,t)},[o,a])]}var un=0,dn=()=>`__${String(++un)}__`;function fn(){let{router:e}=sn(`useSubmit`),{basename:t}=i.useContext(N),n=ft(),r=e.fetch,a=e.navigate;return i.useCallback(async(e,i={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Nt(e,t);if(i.navigate===!1){let e=i.fetcherKey||dn();await r(e,n,i.action||o,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||c,flushSync:i.flushSync})}else await a(i.action||o,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,a,t,n])}function pn(e,{relative:t}={}){let{basename:n}=i.useContext(N),r=i.useContext(F);g(r,`useFormAction must be used inside a RouteContext`);let[a]=r.matches.slice(-1),o={...z(e||`.`,{relative:t})},s=L();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:k([n,o.pathname])),x(o)}function mn(e,{relative:t}={}){let n=i.useContext(Re);g(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=sn(`useViewTransitionState`),a=z(e,{relative:t});if(!n.isTransitioning)return!1;let o=D(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=D(n.nextLocation.pathname,r)||n.nextLocation.pathname;return E(a.pathname,s)!=null||E(a.pathname,o)!=null}var K=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hn=new class extends K{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},gn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},q=new class{#e=gn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function _n(e){setTimeout(e,0)}var vn=typeof window>`u`||`Deno`in globalThis;function J(){}function yn(e,t){return typeof e==`function`?e(t):e}function bn(e){return typeof e==`number`&&e>=0&&e!==1/0}function xn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Y(e,t){return typeof e==`function`?e(t):e}function Sn(e,t){return typeof e==`function`?e(t):e}function Cn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Tn(o,t.options))return!1}else if(!Z(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function wn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(X(t.options.mutationKey)!==X(a))return!1}else if(!Z(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Tn(e,t){return(t?.queryKeyHashFn||X)(e)}function X(e){return JSON.stringify(e,(e,t)=>An(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Z(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Z(e[n],t[n])):!1}var En=Object.prototype.hasOwnProperty;function Dn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=kn(e)&&kn(t);if(!r&&!(An(e)&&An(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:En.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Dn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function On(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function kn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function An(e){if(!jn(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!jn(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function jn(e){return Object.prototype.toString.call(e)===`[object Object]`}function Mn(e){return new Promise(t=>{q.setTimeout(t,e)})}function Nn(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Dn(e,t)}function Pn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var In=Symbol();function Ln(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===In?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Rn(e,t){return typeof e==`function`?e(...t):!!e}function zn(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Bn=(()=>{let e=()=>vn;return{isServer(){return e()},setIsServer(t){e=t}}})();function Vn(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Hn=_n;function Un(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Hn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Q=Un(),Wn=new class extends K{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Gn(e){return Math.min(1e3*2**e,3e4)}function Kn(e){return(e??`online`)!==`online`||Wn.isOnline()}var qn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Jn(e){let t=!1,n=0,r,i=Vn(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new qn(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>hn.isFocused()&&(e.networkMode===`always`||Wn.isOnline())&&e.canRun(),u=()=>Kn(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Bn.isServer()?0:3),o=e.retryDelay??Gn,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Mn(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Yn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bn(this.gcTime)&&(this.#e=q.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bn.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(q.clearTimeout(this.#e),this.#e=void 0)}};function Xn(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{zn(e,()=>t.signal,()=>n=!0)},u=Ln(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Fn:Pn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Qn:Zn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Zn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Zn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $n=class extends Yn{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=nr(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=nr(this.options);e.data!==void 0&&(this.setState(tr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Nn(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(J).catch(J):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Sn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===In||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Y(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!xn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ln(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Xn(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Jn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof qn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof qn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...er(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...tr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Q.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function er(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function tr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function nr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var rr=class extends Yn{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ir(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Jn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Q.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ir(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var ar=class extends K{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new rr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=or(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=or(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=or(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=or(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Q.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>wn(t,e))}findAll(e={}){return this.getAll().filter(t=>wn(e,t))}notify(e){Q.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Q.batch(()=>Promise.all(e.map(e=>e.continue().catch(J))))}};function or(e){return e.options.scope?.id}var sr=class extends K{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Tn(r,t),a=this.get(i);return a||(a=new $n({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Q.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Cn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Cn(e,t)):t}notify(e){Q.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Q.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Q.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},cr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new sr,this.#t=e.mutationCache||new ar,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=hn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Wn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Y(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=yn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Q.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Q.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Q.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Q.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(J).catch(J)}invalidateQueries(e,t={}){return Q.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Q.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(J)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(J)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Y(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(J).catch(J)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(J).catch(J)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Wn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(X(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Z(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(X(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Z(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Tn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===In&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},$=n(),lr=i.createContext(void 0),ur=e=>{let t=i.useContext(lr);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},dr=({client:e,children:t})=>(i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,$.jsx)(lr.Provider,{value:e,children:t})),fr=(0,i.lazy)(async()=>({default:(await l(async()=>{let{OperationsApp:e}=await import(`./operations-app-ER0gg7GN.js`);return{OperationsApp:e}},__vite__mapDeps([0,1,2,3,4,5]))).OperationsApp}));function pr({label:e}){return(0,$.jsx)(`div`,{role:`status`,className:`grid min-h-screen place-items-center text-sm`,style:{colorScheme:`light dark`,background:`Canvas`,color:`CanvasText`,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`},children:e})}function mr(){return(0,$.jsx)(i.Suspense,{fallback:(0,$.jsx)(pr,{label:`Opening operations…`}),children:(0,$.jsx)(fr,{})})}document.documentElement.classList.add(`dark`),document.documentElement.style.colorScheme=`dark`;var hr=new cr({defaultOptions:{queries:{staleTime:15e3,refetchOnWindowFocus:!0}}});a.createRoot(document.getElementById(`root`)).render((0,$.jsx)(i.StrictMode,{children:(0,$.jsx)(dr,{client:hr,children:(0,$.jsx)(tn,{children:(0,$.jsx)(mr,{})})})}));export{L as C,l as D,ln as E,xt as S,Ze as T,hn as _,Vn as a,vt as b,bn as c,Sn as d,Y as f,q as g,xn as h,Q as i,J as l,Rn as m,ir as n,Bn as o,On as p,er as r,X as s,ur as t,Nn as u,K as v,R as w,yt as x,rn as y};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-C7oxC63R.js";import{d as r,f as i,g as ee,h as te,m as ne,n as a,p as re,s as ie,t as ae,y as oe}from"./format-PoISqsES.js";import{t as se,y as o}from"./operations-D8nUP5_m.js";import{_ as s}from"./dist-CmX-h7a4.js";import{t as ce}from"./bot-yILPnRgD.js";import{t as c}from"./circle-alert-BEnMBMT-.js";import{a as le,i as l,r as u,t as d}from"./tabs-DivxbhQy.js";import{t as f}from"./play-Dwo-9xt6.js";import{t as ue}from"./siren-CCBwTSuk.js";import{a as p,c as m,f as h,i as g,l as de,n as _,o as v,r as y,s as b,t as x,u as S}from"./table-BYS-nIVA.js";import{t as fe}from"./page-header-MFVvEtZW.js";import{M as C,S as w,_ as T,c as E,g as D,h as O,j as pe,m as k,s as A,v as j,y as M}from"./operations-app-CQQhG54n.js";var me=s(`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`}]]),N=s(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),he=s(`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=s(`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=s(`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=e(t(),1),I=n();function L({data:e}){let t=se(),[n,s]=(0,F.useState)(null),[l,u]=(0,F.useState)(``),[d,L]=(0,F.useState)(`deep`),[V,H]=(0,F.useState)(`default`),[U,W]=(0,F.useState)(`auto`),G=oe({queryKey:[`recent-events`],queryFn:()=>ie(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=C({mutationFn:()=>re(),onSuccess:async e=>{s(e.recovered>0?`Recovered ${e.recovered} stale work item${e.recovered===1?``:`s`}.`:`No stale worker claims needed recovery.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),Te=C({mutationFn:()=>i(),onSuccess:async e=>{s(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=>{s(e instanceof Error?e.message:String(e))}}),Ee=C({mutationFn:()=>ne(`empty`),onSuccess:async e=>{s(`Reset local state at ${e.path}.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),Y=C({mutationFn:()=>te({label:`control-plane-1`,pollIntervalMs:2e3}),onSuccess:async()=>{s(`Started local control-plane daemon.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),X=C({mutationFn:()=>ee(),onSuccess:async e=>{s(e.stopped>0?`Stopped ${e.stopped} local daemon process${e.stopped===1?``:`es`}.`:`No live local daemon process needed stopping.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),Z=C({mutationFn:()=>r({target:l.trim(),depth:V,mode:d,runtime:U,ensureDaemon:!0}),onSuccess:async()=>{s(`Launched ${d} run for ${l.trim()}.`),u(``),await J()},onError:e=>{s(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 ee=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:ee,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)(E,{asChild:!0,variant:`outline`,children:(0,I.jsx)(o,{to:`/runs`,children:`Open runs`})}),(0,I.jsx)(E,{asChild:!0,variant:`accent`,children:(0,I.jsx)(o,{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)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`First run`}),(0,I.jsx)(w,{className:`mt-2`,children:`Launch the first target`}),(0,I.jsx)(D,{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)(O,{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)(A,{value:l,onChange:e=>u(e.target.value),placeholder:d===`mcp`?`mcp://assistant-endpoint`:d===`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:d,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)(E,{variant:`accent`,onClick:()=>Z.mutate(),disabled:!l.trim()||Q,children:[(0,I.jsx)(f,{}),`Launch target`]}),(0,I.jsxs)(E,{variant:`outline`,onClick:()=>Y.mutate(),disabled:q||Q,children:[(0,I.jsx)(N,{}),`Start daemon`]}),(0,I.jsxs)(E,{variant:`outline`,onClick:()=>X.mutate(),disabled:!q||Q,children:[(0,I.jsx)(N,{}),`Stop daemon`]})]})]})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Execution model`}),(0,I.jsx)(w,{className:`mt-2`,children:`How the system works`}),(0,I.jsx)(D,{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)(O,{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)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Launch`}),(0,I.jsx)(w,{className:`mt-2`,children:`Control strip`}),(0,I.jsx)(D,{children:`Launch a new target, keep the daemon healthy, and clear local state without dropping to the CLI.`})]})}),(0,I.jsxs)(O,{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)(A,{value:l,onChange:e=>u(e.target.value),placeholder:d===`mcp`?`mcp://assistant-endpoint`:d===`web`?`https://app.example.com`:`https://api.example.com`})]}),(0,I.jsx)(B,{label:`Mode`,value:d,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)(E,{variant:`accent`,onClick:()=>Z.mutate(),disabled:!l.trim()||Q,children:[(0,I.jsx)(f,{}),`Launch target`]}),(0,I.jsxs)(E,{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)(E,{variant:`outline`,onClick:()=>we.mutate(),disabled:Q,children:[(0,I.jsx)(he,{}),`Recover stale`]}),(0,I.jsxs)(E,{variant:`outline`,onClick:()=>Te.mutate(),disabled:Q,children:[(0,I.jsx)(P,{}),`Prune stopped`]}),(0,I.jsxs)(E,{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:n??`The daemon can be started from here. Local state reset stays guarded while a live daemon is heartbeating.`})]})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Situation`}),(0,I.jsx)(w,{className:`mt-2`,children:`Live system state`}),(0,I.jsx)(D,{children:`Read the queue, worker fleet, and review backlog at a glance before drilling into findings or runs.`})]})}),(0,I.jsxs)(O,{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:c,label:`Review`,value:_e.length,hint:`Finding families waiting on sign-off.`}),(0,I.jsx)(R,{icon:ue,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:le,label:`Unassigned`,value:be.length,hint:`Finding families without an owner.`}),(0,I.jsx)(R,{icon:f,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)(k,{className:`overflow-hidden`,children:[(0,I.jsxs)(M,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Findings`}),(0,I.jsx)(w,{className:`mt-2`,children:`Decision queue`}),(0,I.jsx)(D,{children:`Finding families that most likely need a human decision next: blocked execution, review gates, or ownership gaps.`})]}),(0,I.jsx)(E,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(o,{to:`/findings`,children:`Open findings`})})]}),(0,I.jsx)(O,{children:De.length===0?(0,I.jsx)(T,{className:`text-left`,children:`No findings currently need intervention.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Finding`}),(0,I.jsx)(g,{children:`Ownership`}),(0,I.jsx)(g,{children:`Signal`}),(0,I.jsx)(g,{className:`w-[14rem]`,children:`State`})]})}),(0,I.jsx)(_,{children:De.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsx)(o,{to:`/findings/${e.fingerprint}`,className:`text-foreground hover:text-primary`,children:e.latest.title})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.workflow.assignee??`Unassigned`}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(S,{severity:e.latest.severity}),(0,I.jsx)(b,{value:e.workflow.consensus})]})}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(m,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,I.jsx)(de,{value:e.workflow.reviewGate}),(0,I.jsx)(h,{value:e.latest.triageStatus})]})})]},e.fingerprint))})]})})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Execution`}),(0,I.jsx)(w,{className:`mt-2`,children:`Queue and daemons`}),(0,I.jsx)(D,{children:`Use this column to understand what automation is doing right now and where the queue is getting stuck.`})]})}),(0,I.jsxs)(O,{className:`space-y-6`,children:[Oe.length===0?(0,I.jsx)(T,{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)(o,{to:`/findings/${e.fingerprint}`,className:`text-sm font-medium text-foreground hover:text-primary`,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)(m,{value:e.workflow.phase})]})},e.fingerprint))}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Autonomous queue`}),(0,I.jsx)(w,{className:`mt-2`,children:`Worker-ready state`}),(0,I.jsx)(D,{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)(j,{children:`Autonomous workers`}),(0,I.jsx)(w,{className:`mt-2`,children:`Daemon state`})]}),K.length===0?(0,I.jsx)(T,{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 ${a(e.heartbeatAt)}`]}),e.lastError?(0,I.jsx)(`div`,{className:`mt-1 text-xs text-destructive`,children:e.lastError}):null]}),(0,I.jsx)(h,{value:e.status})]})},e.id))})]})]})]})]}),(0,I.jsxs)(`section`,{className:`grid gap-4 xl:grid-cols-[0.95fr_1.05fr]`,children:[(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsxs)(M,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Runs`}),(0,I.jsx)(w,{className:`mt-2`,children:`Recent execution`}),(0,I.jsx)(D,{children:`Recent and still-running runs. Use this to jump into provenance without leaving operations.`})]}),(0,I.jsx)(E,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(o,{to:`/runs`,children:`Open runs`})})]}),(0,I.jsx)(O,{children:ke.length===0?(0,I.jsx)(T,{className:`text-left`,children:`No runs recorded yet.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Target`}),(0,I.jsx)(g,{children:`Started`}),(0,I.jsx)(g,{children:`Profile`}),(0,I.jsx)(g,{className:`w-[12rem]`,children:`State`})]})}),(0,I.jsx)(_,{children:ke.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsx)(o,{to:`/runs/${e.id}`,className:`text-foreground hover:text-primary`,children:e.target})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:a(e.startedAt)}),(0,I.jsxs)(y,{className:`text-muted-foreground`,children:[e.runtime,` · `,e.mode,` · `,e.depth]}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(h,{value:e.status}),(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:ae(e.durationMs)})]})})]},e.id))})]})})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsxs)(M,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Findings`}),(0,I.jsx)(w,{className:`mt-2`,children:`Latest movement`}),(0,I.jsx)(D,{children:`Most recent finding-family changes across automation, triage, and review.`})]}),(0,I.jsx)(E,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(o,{to:`/findings`,children:`Open findings`})})]}),(0,I.jsx)(O,{children:$.length===0?(0,I.jsx)(T,{className:`text-left`,children:`No findings recorded yet.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Finding`}),(0,I.jsx)(g,{children:`Updated`}),(0,I.jsx)(g,{children:`Coverage`}),(0,I.jsx)(g,{className:`w-[16rem]`,children:`State`})]})}),(0,I.jsx)(_,{children:$.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsx)(o,{to:`/findings/${e.fingerprint}`,className:`text-foreground hover:text-primary`,children:e.latest.title})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:a(e.workflow.updatedAt??e.latest.timestamp)}),(0,I.jsxs)(y,{className:`text-muted-foreground`,children:[e.count,` hits · `,e.scanCount,` scans`]}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(m,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,I.jsx)(de,{value:e.workflow.reviewGate}),(0,I.jsx)(S,{severity:e.latest.severity}),(0,I.jsx)(b,{value:e.workflow.consensus})]})})]},e.fingerprint))})]})})]})]}),Ae.length>0?(0,I.jsxs)(k,{className:`overflow-hidden border-destructive/20`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Incidents`}),(0,I.jsx)(w,{className:`mt-2`,children:`Runtime incidents`}),(0,I.jsx)(D,{children:`Provider failures, worker crashes, and stalled agent executions that need operator attention.`})]})}),(0,I.jsx)(O,{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)(o,{to:`/runs/${e.scanId}`,className:`text-sm font-medium text-foreground hover:text-primary`,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)(S,{severity:`high`}),(0,I.jsx)(`span`,{children:e.stage}),e.actor?(0,I.jsx)(`span`,{children:e.actor}):null,(0,I.jsx)(`span`,{children:a(e.timestamp)})]})]}),(0,I.jsx)(c,{className:`mt-0.5 size-5 shrink-0 text-destructive`})]})},`${e.scanId}:${e.timestamp}`))})]}):null,(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Events`}),(0,I.jsx)(w,{className:`mt-2`,children:`Recent pipeline activity`}),(0,I.jsx)(D,{children:`Live audit events across runs, useful for seeing where the system is actually spending time.`})]})}),(0,I.jsx)(O,{children:G.isLoading?(0,I.jsx)(T,{children:`Loading recent events...`}):G.error?(0,I.jsx)(T,{children:G.error instanceof Error?G.error.message:`Failed to load recent events.`}):(G.data?.events.length??0)===0?(0,I.jsx)(T,{children:`No pipeline events recorded yet.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Target`}),(0,I.jsx)(g,{children:`Summary`}),(0,I.jsx)(g,{children:`Stage`}),(0,I.jsx)(g,{children:`Event`}),(0,I.jsx)(g,{children:`Actor`}),(0,I.jsx)(g,{className:`w-[12rem]`,children:`Time`})]})}),(0,I.jsx)(_,{children:G.data?.events.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(o,{to:`/runs/${e.scanId}`,className:`text-foreground hover:text-primary`,children:e.scanTarget}),e.findingFingerprint?(0,I.jsx)(`div`,{children:(0,I.jsx)(o,{to:`/findings/${e.findingFingerprint}`,className:`text-xs text-muted-foreground hover:text-primary`,children:`Open finding`})}):null]})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.summary}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.stage}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.eventType}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.agentRole??`system`}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:a(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)(d,{value:t,onValueChange:n,children:(0,I.jsx)(u,{className:`w-full flex-wrap justify-start`,children:r.map(e=>(0,I.jsx)(l,{value:e.value,className:`flex-1`,children:e.label},e.value))})})]})}export{L as OverviewPage};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-C7oxC63R.js";import{d as r,f as i,g as ee,h as te,m as ne,n as a,p as re,s as ie,t as ae,y as oe}from"./format-LNQSSpn6.js";import{t as se,y as o}from"./operations-e2CGYKB1.js";import{_ as s}from"./dist-CmX-h7a4.js";import{t as ce}from"./bot-yILPnRgD.js";import{t as c}from"./circle-alert-BEnMBMT-.js";import{a as le,i as l,r as u,t as d}from"./tabs-vn6v7Bk6.js";import{t as f}from"./play-Dwo-9xt6.js";import{t as ue}from"./siren-CCBwTSuk.js";import{a as p,c as m,f as h,i as g,l as de,n as _,o as v,r as y,s as b,t as x,u as S}from"./table-BgsSBdke.js";import{t as fe}from"./page-header-CIJyycfz.js";import{M as C,S as w,_ as T,c as E,g as D,h as O,j as pe,m as k,s as A,v as j,y as M}from"./operations-app-ER0gg7GN.js";var me=s(`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`}]]),N=s(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),he=s(`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=s(`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=s(`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=e(t(),1),I=n();function L({data:e}){let t=se(),[n,s]=(0,F.useState)(null),[l,u]=(0,F.useState)(``),[d,L]=(0,F.useState)(`deep`),[V,H]=(0,F.useState)(`default`),[U,W]=(0,F.useState)(`auto`),G=oe({queryKey:[`recent-events`],queryFn:()=>ie(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=C({mutationFn:()=>re(),onSuccess:async e=>{s(e.recovered>0?`Recovered ${e.recovered} stale work item${e.recovered===1?``:`s`}.`:`No stale worker claims needed recovery.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),Te=C({mutationFn:()=>i(),onSuccess:async e=>{s(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=>{s(e instanceof Error?e.message:String(e))}}),Ee=C({mutationFn:()=>ne(`empty`),onSuccess:async e=>{s(`Reset local state at ${e.path}.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),Y=C({mutationFn:()=>te({label:`control-plane-1`,pollIntervalMs:2e3}),onSuccess:async()=>{s(`Started local control-plane daemon.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),X=C({mutationFn:()=>ee(),onSuccess:async e=>{s(e.stopped>0?`Stopped ${e.stopped} local daemon process${e.stopped===1?``:`es`}.`:`No live local daemon process needed stopping.`),await J()},onError:e=>{s(e instanceof Error?e.message:String(e))}}),Z=C({mutationFn:()=>r({target:l.trim(),depth:V,mode:d,runtime:U,ensureDaemon:!0}),onSuccess:async()=>{s(`Launched ${d} run for ${l.trim()}.`),u(``),await J()},onError:e=>{s(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 ee=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:ee,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)(E,{asChild:!0,variant:`outline`,children:(0,I.jsx)(o,{to:`/runs`,children:`Open runs`})}),(0,I.jsx)(E,{asChild:!0,variant:`accent`,children:(0,I.jsx)(o,{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)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`First run`}),(0,I.jsx)(w,{className:`mt-2`,children:`Launch the first target`}),(0,I.jsx)(D,{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)(O,{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)(A,{value:l,onChange:e=>u(e.target.value),placeholder:d===`mcp`?`mcp://assistant-endpoint`:d===`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:d,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)(E,{variant:`accent`,onClick:()=>Z.mutate(),disabled:!l.trim()||Q,children:[(0,I.jsx)(f,{}),`Launch target`]}),(0,I.jsxs)(E,{variant:`outline`,onClick:()=>Y.mutate(),disabled:q||Q,children:[(0,I.jsx)(N,{}),`Start daemon`]}),(0,I.jsxs)(E,{variant:`outline`,onClick:()=>X.mutate(),disabled:!q||Q,children:[(0,I.jsx)(N,{}),`Stop daemon`]})]})]})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Execution model`}),(0,I.jsx)(w,{className:`mt-2`,children:`How the system works`}),(0,I.jsx)(D,{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)(O,{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)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Launch`}),(0,I.jsx)(w,{className:`mt-2`,children:`Control strip`}),(0,I.jsx)(D,{children:`Launch a new target, keep the daemon healthy, and clear local state without dropping to the CLI.`})]})}),(0,I.jsxs)(O,{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)(A,{value:l,onChange:e=>u(e.target.value),placeholder:d===`mcp`?`mcp://assistant-endpoint`:d===`web`?`https://app.example.com`:`https://api.example.com`})]}),(0,I.jsx)(B,{label:`Mode`,value:d,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)(E,{variant:`accent`,onClick:()=>Z.mutate(),disabled:!l.trim()||Q,children:[(0,I.jsx)(f,{}),`Launch target`]}),(0,I.jsxs)(E,{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)(E,{variant:`outline`,onClick:()=>we.mutate(),disabled:Q,children:[(0,I.jsx)(he,{}),`Recover stale`]}),(0,I.jsxs)(E,{variant:`outline`,onClick:()=>Te.mutate(),disabled:Q,children:[(0,I.jsx)(P,{}),`Prune stopped`]}),(0,I.jsxs)(E,{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:n??`The daemon can be started from here. Local state reset stays guarded while a live daemon is heartbeating.`})]})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Situation`}),(0,I.jsx)(w,{className:`mt-2`,children:`Live system state`}),(0,I.jsx)(D,{children:`Read the queue, worker fleet, and review backlog at a glance before drilling into findings or runs.`})]})}),(0,I.jsxs)(O,{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:c,label:`Review`,value:_e.length,hint:`Finding families waiting on sign-off.`}),(0,I.jsx)(R,{icon:ue,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:le,label:`Unassigned`,value:be.length,hint:`Finding families without an owner.`}),(0,I.jsx)(R,{icon:f,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)(k,{className:`overflow-hidden`,children:[(0,I.jsxs)(M,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Findings`}),(0,I.jsx)(w,{className:`mt-2`,children:`Decision queue`}),(0,I.jsx)(D,{children:`Finding families that most likely need a human decision next: blocked execution, review gates, or ownership gaps.`})]}),(0,I.jsx)(E,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(o,{to:`/findings`,children:`Open findings`})})]}),(0,I.jsx)(O,{children:De.length===0?(0,I.jsx)(T,{className:`text-left`,children:`No findings currently need intervention.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Finding`}),(0,I.jsx)(g,{children:`Ownership`}),(0,I.jsx)(g,{children:`Signal`}),(0,I.jsx)(g,{className:`w-[14rem]`,children:`State`})]})}),(0,I.jsx)(_,{children:De.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsx)(o,{to:`/findings/${e.fingerprint}`,className:`text-foreground hover:text-primary-text`,children:e.latest.title})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.workflow.assignee??`Unassigned`}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(S,{severity:e.latest.severity}),(0,I.jsx)(b,{value:e.workflow.consensus})]})}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(m,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,I.jsx)(de,{value:e.workflow.reviewGate}),(0,I.jsx)(h,{value:e.latest.triageStatus})]})})]},e.fingerprint))})]})})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Execution`}),(0,I.jsx)(w,{className:`mt-2`,children:`Queue and daemons`}),(0,I.jsx)(D,{children:`Use this column to understand what automation is doing right now and where the queue is getting stuck.`})]})}),(0,I.jsxs)(O,{className:`space-y-6`,children:[Oe.length===0?(0,I.jsx)(T,{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)(o,{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)(m,{value:e.workflow.phase})]})},e.fingerprint))}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Autonomous queue`}),(0,I.jsx)(w,{className:`mt-2`,children:`Worker-ready state`}),(0,I.jsx)(D,{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)(j,{children:`Autonomous workers`}),(0,I.jsx)(w,{className:`mt-2`,children:`Daemon state`})]}),K.length===0?(0,I.jsx)(T,{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 ${a(e.heartbeatAt)}`]}),e.lastError?(0,I.jsx)(`div`,{className:`mt-1 text-xs text-destructive`,children:e.lastError}):null]}),(0,I.jsx)(h,{value:e.status})]})},e.id))})]})]})]})]}),(0,I.jsxs)(`section`,{className:`grid gap-4 xl:grid-cols-[0.95fr_1.05fr]`,children:[(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsxs)(M,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Runs`}),(0,I.jsx)(w,{className:`mt-2`,children:`Recent execution`}),(0,I.jsx)(D,{children:`Recent and still-running runs. Use this to jump into provenance without leaving operations.`})]}),(0,I.jsx)(E,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(o,{to:`/runs`,children:`Open runs`})})]}),(0,I.jsx)(O,{children:ke.length===0?(0,I.jsx)(T,{className:`text-left`,children:`No runs recorded yet.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Target`}),(0,I.jsx)(g,{children:`Started`}),(0,I.jsx)(g,{children:`Profile`}),(0,I.jsx)(g,{className:`w-[12rem]`,children:`State`})]})}),(0,I.jsx)(_,{children:ke.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsx)(o,{to:`/runs/${e.id}`,className:`text-foreground hover:text-primary-text`,children:e.target})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:a(e.startedAt)}),(0,I.jsxs)(y,{className:`text-muted-foreground`,children:[e.runtime,` · `,e.mode,` · `,e.depth]}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(h,{value:e.status}),(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:ae(e.durationMs)})]})})]},e.id))})]})})]}),(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsxs)(M,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Findings`}),(0,I.jsx)(w,{className:`mt-2`,children:`Latest movement`}),(0,I.jsx)(D,{children:`Most recent finding-family changes across automation, triage, and review.`})]}),(0,I.jsx)(E,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,I.jsx)(o,{to:`/findings`,children:`Open findings`})})]}),(0,I.jsx)(O,{children:$.length===0?(0,I.jsx)(T,{className:`text-left`,children:`No findings recorded yet.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Finding`}),(0,I.jsx)(g,{children:`Updated`}),(0,I.jsx)(g,{children:`Coverage`}),(0,I.jsx)(g,{className:`w-[16rem]`,children:`State`})]})}),(0,I.jsx)(_,{children:$.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsx)(o,{to:`/findings/${e.fingerprint}`,className:`text-foreground hover:text-primary-text`,children:e.latest.title})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:a(e.workflow.updatedAt??e.latest.timestamp)}),(0,I.jsxs)(y,{className:`text-muted-foreground`,children:[e.count,` hits · `,e.scanCount,` scans`]}),(0,I.jsx)(y,{children:(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(m,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,I.jsx)(de,{value:e.workflow.reviewGate}),(0,I.jsx)(S,{severity:e.latest.severity}),(0,I.jsx)(b,{value:e.workflow.consensus})]})})]},e.fingerprint))})]})})]})]}),Ae.length>0?(0,I.jsxs)(k,{className:`overflow-hidden border-destructive/20`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Incidents`}),(0,I.jsx)(w,{className:`mt-2`,children:`Runtime incidents`}),(0,I.jsx)(D,{children:`Provider failures, worker crashes, and stalled agent executions that need operator attention.`})]})}),(0,I.jsx)(O,{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)(o,{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)(S,{severity:`high`}),(0,I.jsx)(`span`,{children:e.stage}),e.actor?(0,I.jsx)(`span`,{children:e.actor}):null,(0,I.jsx)(`span`,{children:a(e.timestamp)})]})]}),(0,I.jsx)(c,{className:`mt-0.5 size-5 shrink-0 text-destructive`})]})},`${e.scanId}:${e.timestamp}`))})]}):null,(0,I.jsxs)(k,{className:`overflow-hidden`,children:[(0,I.jsx)(M,{children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(j,{children:`Events`}),(0,I.jsx)(w,{className:`mt-2`,children:`Recent pipeline activity`}),(0,I.jsx)(D,{children:`Live audit events across runs, useful for seeing where the system is actually spending time.`})]})}),(0,I.jsx)(O,{children:G.isLoading?(0,I.jsx)(T,{children:`Loading recent events...`}):G.error?(0,I.jsx)(T,{children:G.error instanceof Error?G.error.message:`Failed to load recent events.`}):(G.data?.events.length??0)===0?(0,I.jsx)(T,{children:`No pipeline events recorded yet.`}):(0,I.jsxs)(x,{children:[(0,I.jsx)(p,{children:(0,I.jsxs)(v,{className:`hover:bg-transparent`,children:[(0,I.jsx)(g,{children:`Target`}),(0,I.jsx)(g,{children:`Summary`}),(0,I.jsx)(g,{children:`Stage`}),(0,I.jsx)(g,{children:`Event`}),(0,I.jsx)(g,{children:`Actor`}),(0,I.jsx)(g,{className:`w-[12rem]`,children:`Time`})]})}),(0,I.jsx)(_,{children:G.data?.events.map(e=>(0,I.jsxs)(v,{children:[(0,I.jsx)(y,{className:`font-medium`,children:(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(o,{to:`/runs/${e.scanId}`,className:`text-foreground hover:text-primary-text`,children:e.scanTarget}),e.findingFingerprint?(0,I.jsx)(`div`,{children:(0,I.jsx)(o,{to:`/findings/${e.findingFingerprint}`,className:`text-xs text-muted-foreground hover:text-primary-text`,children:`Open finding`})}):null]})}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.summary}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.stage}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.eventType}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:e.agentRole??`system`}),(0,I.jsx)(y,{className:`text-muted-foreground`,children:a(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)(d,{value:t,onValueChange:n,children:(0,I.jsx)(u,{className:`w-full flex-wrap justify-start`,children:r.map(e=>(0,I.jsx)(l,{value:e.value,className:`flex-1`,children:e.label},e.value))})})]})}export{L as OverviewPage};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-C7oxC63R.js";import{C as t}from"./operations-app-CQQhG54n.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};
1
+ import{t as e}from"./jsx-runtime-C7oxC63R.js";import{C as t}from"./operations-app-ER0gg7GN.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{a as e,n as t,t as n}from"./jsx-runtime-C7oxC63R.js";import{c as r,l as i,n as a,r as o,t as s,y as c}from"./format-LNQSSpn6.js";import{T as l,w as u,y as d}from"./operations-e2CGYKB1.js";import{_ as f,g as p}from"./dist-CmX-h7a4.js";import{t as m}from"./bot-yILPnRgD.js";import{t as h}from"./circle-alert-BEnMBMT-.js";import{t as g}from"./search-CiooTLck.js";import{t as _}from"./siren-CCBwTSuk.js";import{a as v,c as y,f as b,i as x,l as S,n as C,o as w,r as T,s as E,t as D,u as O}from"./table-BgsSBdke.js";import{n as k,t as A}from"./meta-tile-BMtBC-Qq.js";import{C as j,S as M,_ as N,b as P,c as ee,d as te,f as F,g as I,h as L,j as R,k as ne,l as z,m as B,p as V,s as re,t as ie,u as H,v as U,x as W,y as G}from"./operations-app-ER0gg7GN.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=e(t(),1),Y=n();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)(G,{className:`space-y-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(U,{children:`Queue`}),(0,Y.jsx)(M,{className:`mt-2`,children:e}),(0,Y.jsx)(I,{children:t})]}),(0,Y.jsxs)(`label`,{className:`flex items-center gap-3`,children:[(0,Y.jsx)(g,{className:`size-4 text-muted-foreground`}),(0,Y.jsx)(re,{value:n,onChange:e=>r(e.target.value),placeholder:i,className:`h-9`})]})]}),(0,Y.jsx)(L,{className:`flex min-h-0 flex-1 flex-col pt-3`,children:(0,Y.jsx)(ie,{className:`min-h-0 flex-1`,children:(0,Y.jsx)(P,{children:a})})})]})}function X({title:e,description:t,meta:n,badges:r,selected:i=!1}){return(0,Y.jsx)(W,{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)(G,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(U,{children:`Activity`}),(0,Y.jsx)(M,{className:`mt-2`,children:`Timeline`})]})}),(0,Y.jsx)(L,{className:`space-y-4`,children:e.length===0?(0,Y.jsx)(N,{children:`No pipeline events recorded.`}):(0,Y.jsxs)(D,{children:[(0,Y.jsx)(v,{children:(0,Y.jsxs)(w,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(x,{children:`Event`}),(0,Y.jsx)(x,{children:`Summary`}),(0,Y.jsx)(x,{className:`w-[10rem]`,children:`Time`}),(0,Y.jsx)(x,{className:`w-[14rem]`,children:`Payload`})]})}),(0,Y.jsx)(C,{children:e.map(e=>{let t=se(e.stage,e.eventType);return(0,Y.jsxs)(w,{children:[(0,Y.jsx)(T,{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)(b,{value:e.agentRole}):null]})]})}),(0,Y.jsx)(T,{className:`text-muted-foreground`,children:(0,Y.jsxs)(`div`,{className:`space-y-1`,children:[(0,Y.jsx)(`div`,{children:o(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)(T,{className:`text-xs text-muted-foreground`,children:a(e.timestamp)}),(0,Y.jsx)(T,{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`)?p:n.includes(`agent`)?m:n.includes(`verify`)?K:n.includes(`finding`)?h:n.includes(`scan`)?ne:n.includes(`analysis`)?q:R}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)(L,{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:j(`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:j(`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:j(`min-w-0 min-h-0`,t),children:e})}function $({children:e,className:t,span:n=!1}){return(0,Y.jsx)(`div`,{className:j(`min-w-0 min-h-0`,n&&`xl:col-span-2`,t),children:e})}function le({scans:e}){let{scanId:t}=l(),n=u(),[o,s]=(0,J.useState)(``),f=(0,J.useDeferredValue)(o),p=(0,J.useMemo)(()=>{let t=new Map;for(let n of e){let e=t.get(n.target)??[];e.push(n),t.set(n.target,e)}return[...t.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))},[e]),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)(()=>e.find(e=>e.id===t)??m[0]?.latestScan??null,[m,t,e]),g=h?.id??null,_=(0,J.useMemo)(()=>h?p.find(e=>e.target===h.target)??null:null,[p,h]);(0,J.useEffect)(()=>{!t&&g&&n(`/runs/${g}`,{replace:!0})},[n,t,g]);let v=c({queryKey:[`scan-events`,g],queryFn:()=>r(g),enabled:!!g}),y=c({queryKey:[`scan-findings`,g],queryFn:()=>i(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:o,onSearchChange:s,searchPlaceholder:`Filter targets and runs`,children:m.length===0?(0,Y.jsx)(N,{className:`py-8`,children:`No targets match the current filter.`}):m.map(e=>(0,Y.jsx)(d,{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:a(e.latestScan.startedAt),badges:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(b,{value:e.latestScan.status}),e.activeRunCount>0?(0,Y.jsxs)(V,{variant:`accent`,children:[e.activeRunCount,` active`]}):null,(0,Y.jsxs)(V,{children:[e.totalFindings,` findings`]})]})})},e.target))})}),g?v.isLoading||y.isLoading?(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(te,{label:`Scan detail`})}):v.error?(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(H,{error:v.error})}):y.error?(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(H,{error:y.error})}):v.data&&y.data?(0,Y.jsx)(ue,{events:v.data,findings:y.data,targetRuns:_?.scans??[]}):(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(z,{title:`Scan unavailable`,body:`The selected run could not be loaded from the local database.`})}):(0,Y.jsx)($,{span:!0,children:(0,Y.jsx)(z,{title:`No scan selected`,body:`Choose a run from the run history to inspect details.`})})]})})}function ue({events:e,findings:t,targetRuns:n}){let r=e.scan,i=u(),{openPanel:o,clearPanel:c}=F(),l=(0,J.useMemo)(()=>n.filter(e=>e.id!==r.id),[r.id,n]),f=(0,J.useMemo)(()=>n.filter(e=>e.status===`running`).length,[n]),p=(0,J.useMemo)(()=>de(e.events),[e.events]),m=(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)(P,{children:[(0,Y.jsx)(A,{label:`Target`,value:r.target}),(0,Y.jsx)(A,{label:`Runs on target`,value:String(n.length)}),(0,Y.jsx)(A,{label:`Running now`,value:String(f)}),(0,Y.jsx)(A,{label:`Scan id`,value:r.id,mono:!0}),(0,Y.jsx)(A,{label:`Started`,value:a(r.startedAt)}),(0,Y.jsx)(A,{label:`Completed`,value:r.completedAt?a(r.completedAt):`In progress`}),(0,Y.jsx)(A,{label:`Mode`,value:`${r.mode} / ${r.depth}`}),(0,Y.jsx)(A,{label:`Runtime`,value:r.runtime})]})}),(0,Y.jsxs)(B,{className:`overflow-hidden`,children:[(0,Y.jsx)(G,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(U,{children:`Target history`}),(0,Y.jsx)(M,{className:`mt-2`,children:`Recent passes`}),(0,Y.jsx)(I,{children:`Open another run on the same target without leaving the current dossier.`})]})}),(0,Y.jsx)(L,{className:`px-0 pb-0`,children:l.length===0?(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(N,{children:`No other runs for this target yet.`})}):(0,Y.jsx)(P,{children:l.slice(0,5).map(e=>(0,Y.jsx)(`button`,{type:`button`,onClick:()=>i(`/runs/${e.id}`),className:`w-full text-left`,children:(0,Y.jsx)(X,{title:a(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)(b,{value:e.status}),(0,Y.jsx)(V,{children:e.summary.totalFindings})]})})},e.id))})})]})]}),[f,i,l,r.completedAt,r.depth,r.id,r.mode,r.runtime,r.startedAt,r.target,n.length]);(0,J.useEffect)(()=>(c(),()=>c()),[c,r.id]);let g=(0,J.useCallback)(()=>{o({title:`${r.target} target dossier`,description:`Shared context for the selected run across the full target history.`,content:m})},[o,m,r.target]);return(0,Y.jsx)($,{span:!0,className:`space-y-4`,children:(0,Y.jsxs)(k,{eyebrow:`Run dossier`,title:r.target,description:`Started ${a(r.startedAt)} · ${r.runtime} runtime · ${r.mode} mode · ${n.length} total runs on this target`,actions:(0,Y.jsx)(ee,{variant:`outline`,size:`sm`,onClick:g,children:`Open target dossier`}),children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsx)(b,{value:r.status}),(0,Y.jsx)(V,{children:r.depth}),(0,Y.jsx)(V,{children:r.runtime}),(0,Y.jsx)(V,{children:r.mode})]}),p?(0,Y.jsx)(B,{className:`border-destructive/25 bg-destructive/5`,children:(0,Y.jsx)(L,{className:`space-y-3 p-4`,children:(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Y.jsx)(h,{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:p.headline}),(0,Y.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-muted-foreground`,children:[(0,Y.jsx)(V,{variant:`outline`,children:p.stage}),p.actor?(0,Y.jsx)(V,{variant:`outline`,children:p.actor}):null,(0,Y.jsx)(`span`,{children:a(p.timestamp)})]})]})]})})}):null,(0,Y.jsxs)(`section`,{className:`grid gap-4 lg:grid-cols-2 2xl:grid-cols-4`,children:[(0,Y.jsx)(Z,{icon:R,label:`Findings`,value:r.summary.totalFindings,hint:`Grouped and raw findings`,tone:`accent`}),(0,Y.jsx)(Z,{icon:_,label:`Critical`,value:r.summary.critical,hint:`Critical-severity findings`,tone:`danger`}),(0,Y.jsx)(Z,{icon:h,label:`High`,value:r.summary.high,hint:`High-severity findings`,tone:`warning`}),(0,Y.jsx)(Z,{icon:q,label:`Duration`,value:s(r.durationMs),hint:`Elapsed runtime`,tone:`success`})]}),(0,Y.jsxs)(B,{className:`overflow-hidden`,children:[(0,Y.jsx)(G,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(U,{children:`Run output`}),(0,Y.jsx)(M,{className:`mt-2`,children:`Finding families in this run`}),(0,Y.jsx)(I,{children:`Deduplicated finding families produced by the selected run.`})]})}),(0,Y.jsx)(L,{children:t.groups.length===0?(0,Y.jsx)(N,{children:`No finding families recorded for this run.`}):(0,Y.jsxs)(D,{children:[(0,Y.jsx)(v,{children:(0,Y.jsxs)(w,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(x,{children:`Finding`}),(0,Y.jsx)(x,{children:`Category`}),(0,Y.jsx)(x,{children:`Count`}),(0,Y.jsx)(x,{className:`w-[12rem]`,children:`Posture`})]})}),(0,Y.jsx)(C,{children:t.groups.map(e=>(0,Y.jsxs)(w,{children:[(0,Y.jsx)(T,{className:`font-medium text-foreground`,children:e.latest.title}),(0,Y.jsx)(T,{className:`text-muted-foreground`,children:e.latest.category}),(0,Y.jsx)(T,{className:`text-muted-foreground`,children:e.count}),(0,Y.jsx)(T,{children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsx)(O,{severity:e.latest.severity}),(0,Y.jsx)(y,{value:e.workflow.phase}),e.workflow.reviewGate===`none`?null:(0,Y.jsx)(S,{value:e.workflow.reviewGate}),(0,Y.jsx)(b,{value:e.latest.triageStatus}),(0,Y.jsx)(E,{value:e.workflow.consensus})]})})]},e.fingerprint))})]})})]}),(0,Y.jsxs)(B,{className:`overflow-hidden`,children:[(0,Y.jsx)(G,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(U,{children:`Target provenance`}),(0,Y.jsx)(M,{className:`mt-2`,children:`Other runs on this target`}),(0,Y.jsx)(I,{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)(L,{children:n.length<=1?(0,Y.jsx)(N,{children:`No adjacent runs recorded for this target yet.`}):(0,Y.jsxs)(D,{children:[(0,Y.jsx)(v,{children:(0,Y.jsxs)(w,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(x,{children:`Started`}),(0,Y.jsx)(x,{children:`Mode`}),(0,Y.jsx)(x,{children:`Runtime`}),(0,Y.jsx)(x,{children:`Findings`}),(0,Y.jsx)(x,{className:`w-[10rem]`,children:`Status`})]})}),(0,Y.jsx)(C,{children:n.slice(0,6).map(e=>(0,Y.jsxs)(w,{children:[(0,Y.jsx)(T,{className:`font-medium`,children:(0,Y.jsx)(d,{to:`/runs/${e.id}`,className:`text-foreground hover:text-primary-text`,children:a(e.startedAt)})}),(0,Y.jsxs)(T,{className:`text-muted-foreground`,children:[e.mode,` · `,e.depth]}),(0,Y.jsx)(T,{className:`text-muted-foreground`,children:e.runtime}),(0,Y.jsx)(T,{className:`text-muted-foreground`,children:e.summary.totalFindings}),(0,Y.jsx)(T,{children:(0,Y.jsx)(b,{value:e.status})})]},e.id))})]})})]}),(0,Y.jsx)(oe,{events:e.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};
@@ -1 +1 @@
1
- import{n as e,t}from"./jsx-runtime-C7oxC63R.js";import{C as n,p as r}from"./operations-app-CQQhG54n.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};
1
+ import{n as e,t}from"./jsx-runtime-C7oxC63R.js";import{C as n,p as r}from"./operations-app-ER0gg7GN.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};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-C7oxC63R.js";import{i as r}from"./format-PoISqsES.js";import{_ as i,a,c as o,f as s,h as c,i as l,l as u,m as d,r as f,s as p}from"./dist-CmX-h7a4.js";import{C as m,w as h}from"./operations-app-CQQhG54n.js";var g=i(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),_=e(t(),1),v=n();function y(e){let t=e+`CollectionProvider`,[n,r]=s(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=_.useRef(null),a=_.useRef(new Map).current;return(0,v.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let c=e+`CollectionSlot`,l=p(c),u=_.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(c,n),o=d(t,i.collectionRef);return(0,v.jsx)(l,{ref:o,children:r})});u.displayName=c;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=p(f),g=_.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=_.useRef(null),s=d(t,o),c=a(f,n);return _.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,v.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function y(t){let n=a(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:o,Slot:u,ItemSlot:g},y,r]}var b=`rovingFocusGroup.onEntryFocus`,x={bubbles:!1,cancelable:!0},S=`RovingFocusGroup`,[C,w,T]=y(S),[E,D]=s(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:s=!1,dir:u,currentTabStopId:f,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:m,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...y}=e,C=_.useRef(null),T=d(t,C),E=r(u),[D,k]=o({prop:f,defaultProp:p??null,onChange:m,caller:S}),[A,j]=_.useState(!1),M=l(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:s,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)(a.div,{tabIndex:A||F===0?-1:0,"data-orientation":i,...y,ref:T,style:{outline:`none`,...e.style},onMouseDown:c(e.onMouseDown,()=>{P.current=!0}),onFocus:c(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:c(e.onBlur,()=>j(!1))})})}),M=`RovingFocusGroupItem`,N=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...l}=e,d=u(),f=o||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)(a.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:c(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:c(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:c(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 s==`function`?s({isCurrentTabStop:m,hasTabStop:b!=null}):s})})});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]=s(z,[D]),V=D(),[H,U]=B(z),W=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,onValueChange:s,defaultValue:c,orientation:l=`horizontal`,dir:d,activationMode:f=`automatic`,...p}=e,m=r(d),[h,g]=o({prop:i,onChange:s,defaultProp:c??``,caller:z});return(0,v.jsx)(H,{scope:n,baseId:u(),value:h,onValueChange:g,orientation:l,dir:m,activationMode:f,children:(0,v.jsx)(a.div,{dir:m,"data-orientation":l,...p,ref:t})})});W.displayName=z;var G=`TabsList`,K=_.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,o=U(G,n),s=V(n);return(0,v.jsx)(ee,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:(0,v.jsx)(a.div,{role:`tablist`,"aria-orientation":o.orientation,...i,ref:t})})});K.displayName=G;var q=`TabsTrigger`,J=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=U(q,n),l=V(n),u=Z(s.baseId,r),d=Q(s.baseId,r),f=r===s.value;return(0,v.jsx)(te,{asChild:!0,...l,focusable:!i,active:f,children:(0,v.jsx)(a.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,...o,ref:t,onMouseDown:c(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?s.onValueChange(r):e.preventDefault()}),onKeyDown:c(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(r)}),onFocus:c(e.onFocus,()=>{let e=s.activationMode!==`manual`;!f&&!i&&e&&s.onValueChange(r)})})})});J.displayName=q;var Y=`TabsContent`,X=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,c=U(Y,n),l=Z(c.baseId,r),u=Q(c.baseId,r),d=r===c.value,p=_.useRef(d);return _.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,v.jsx)(f,{present:i||d,children:({present:n})=>(0,v.jsx)(a.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,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:m(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var se=h(`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:m(se({variant:t}),e),...n})}function le({className:e,...t}){return(0,v.jsx)(ie,{"data-slot":`tabs-trigger`,className:m(`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:m(`flex-1 text-sm outline-none`,e),...t})}export{g as a,le as i,ue as n,ce as r,oe as t};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-C7oxC63R.js";import{i as r}from"./format-LNQSSpn6.js";import{_ as i,a,c as o,f as s,h as c,i as l,l as u,m as d,r as f,s as p}from"./dist-CmX-h7a4.js";import{C as m,w as h}from"./operations-app-ER0gg7GN.js";var g=i(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),_=e(t(),1),v=n();function y(e){let t=e+`CollectionProvider`,[n,r]=s(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=_.useRef(null),a=_.useRef(new Map).current;return(0,v.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let c=e+`CollectionSlot`,l=p(c),u=_.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(c,n),o=d(t,i.collectionRef);return(0,v.jsx)(l,{ref:o,children:r})});u.displayName=c;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=p(f),g=_.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=_.useRef(null),s=d(t,o),c=a(f,n);return _.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,v.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function y(t){let n=a(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:o,Slot:u,ItemSlot:g},y,r]}var b=`rovingFocusGroup.onEntryFocus`,x={bubbles:!1,cancelable:!0},S=`RovingFocusGroup`,[C,w,T]=y(S),[E,D]=s(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:s=!1,dir:u,currentTabStopId:f,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:m,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...y}=e,C=_.useRef(null),T=d(t,C),E=r(u),[D,k]=o({prop:f,defaultProp:p??null,onChange:m,caller:S}),[A,j]=_.useState(!1),M=l(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:s,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)(a.div,{tabIndex:A||F===0?-1:0,"data-orientation":i,...y,ref:T,style:{outline:`none`,...e.style},onMouseDown:c(e.onMouseDown,()=>{P.current=!0}),onFocus:c(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:c(e.onBlur,()=>j(!1))})})}),M=`RovingFocusGroupItem`,N=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...l}=e,d=u(),f=o||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)(a.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:c(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:c(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:c(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 s==`function`?s({isCurrentTabStop:m,hasTabStop:b!=null}):s})})});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]=s(z,[D]),V=D(),[H,U]=B(z),W=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,onValueChange:s,defaultValue:c,orientation:l=`horizontal`,dir:d,activationMode:f=`automatic`,...p}=e,m=r(d),[h,g]=o({prop:i,onChange:s,defaultProp:c??``,caller:z});return(0,v.jsx)(H,{scope:n,baseId:u(),value:h,onValueChange:g,orientation:l,dir:m,activationMode:f,children:(0,v.jsx)(a.div,{dir:m,"data-orientation":l,...p,ref:t})})});W.displayName=z;var G=`TabsList`,K=_.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,o=U(G,n),s=V(n);return(0,v.jsx)(ee,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:(0,v.jsx)(a.div,{role:`tablist`,"aria-orientation":o.orientation,...i,ref:t})})});K.displayName=G;var q=`TabsTrigger`,J=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=U(q,n),l=V(n),u=Z(s.baseId,r),d=Q(s.baseId,r),f=r===s.value;return(0,v.jsx)(te,{asChild:!0,...l,focusable:!i,active:f,children:(0,v.jsx)(a.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,...o,ref:t,onMouseDown:c(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?s.onValueChange(r):e.preventDefault()}),onKeyDown:c(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(r)}),onFocus:c(e.onFocus,()=>{let e=s.activationMode!==`manual`;!f&&!i&&e&&s.onValueChange(r)})})})});J.displayName=q;var Y=`TabsContent`,X=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,c=U(Y,n),l=Z(c.baseId,r),u=Q(c.baseId,r),d=r===c.value,p=_.useRef(d);return _.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,v.jsx)(f,{present:i||d,children:({present:n})=>(0,v.jsx)(a.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,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:m(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var se=h(`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:m(se({variant:t}),e),...n})}function le({className:e,...t}){return(0,v.jsx)(ie,{"data-slot":`tabs-trigger`,className:m(`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:m(`flex-1 text-sm outline-none`,e),...t})}export{g as a,le as i,ue as n,ce as r,oe as t};
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <meta name="color-scheme" content="light dark" />
7
- <title>0sec</title>
8
- <script type="module" crossorigin src="/assets/desktop-CXTQonNm.js"></script>
7
+ <title>0.security</title>
8
+ <script type="module" crossorigin src="/assets/desktop-BT7RkC4q.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-C7oxC63R.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/client-DRYsuOGl.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/dist-CmX-h7a4.js">
@@ -15,7 +15,7 @@
15
15
  <link rel="modulepreload" crossorigin href="/assets/dist-DAwYQmf_.js">
16
16
  <link rel="modulepreload" crossorigin href="/assets/play-Dwo-9xt6.js">
17
17
  <link rel="modulepreload" crossorigin href="/assets/search-CiooTLck.js">
18
- <link rel="stylesheet" crossorigin href="/assets/desktop-NOekk4QS.css">
18
+ <link rel="stylesheet" crossorigin href="/assets/desktop-OaBI0E0e.css">
19
19
  </head>
20
20
  <body><div id="root"></div></body>
21
21
  </html>
@@ -3,11 +3,11 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>0sec</title>
7
- <script type="module" crossorigin src="/assets/operations-D8nUP5_m.js"></script>
6
+ <title>0.security</title>
7
+ <script type="module" crossorigin src="/assets/operations-e2CGYKB1.js"></script>
8
8
  <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-C7oxC63R.js">
9
9
  <link rel="modulepreload" crossorigin href="/assets/client-DRYsuOGl.js">
10
- <link rel="stylesheet" crossorigin href="/assets/operations-BKE8T-vY.css">
10
+ <link rel="stylesheet" crossorigin href="/assets/operations-CMFVrXEe.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>