@misha_misha/agentwatch 0.0.4 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +11 -4
  2. package/dist/index.js +3273 -494
  3. package/dist/web/assets/ActiveShapeUtils-CtEvtbYg.js +1 -0
  4. package/dist/web/assets/Bar-DEgd_1jq.js +1 -0
  5. package/dist/web/assets/BarChart-CLHGmIz1.js +1 -0
  6. package/dist/web/assets/CartesianChart-DgJKUG1O.js +1 -0
  7. package/dist/web/assets/CategoricalChart-DEGrE0Qv.js +33 -0
  8. package/dist/web/assets/ErrorBarContext-BMnGmrrB.js +1 -0
  9. package/dist/web/assets/Legend-CEa2zCmi.js +4 -0
  10. package/dist/web/assets/Line-CCyE37cb.js +1 -0
  11. package/dist/web/assets/LineChart-DmMubyEd.js +1 -0
  12. package/dist/web/assets/ProjectActivity-BG5hEcJl.js +1 -0
  13. package/dist/web/assets/ProjectYield-vVxXaT6e.js +1 -0
  14. package/dist/web/assets/SessionActivity-BUzJpWwc.js +1 -0
  15. package/dist/web/assets/SessionCompaction-Dx3tbM9N.js +1 -0
  16. package/dist/web/assets/{SessionDiffs-LZrXV0AY.js → SessionDiffs-CDUkVqua.js} +3 -3
  17. package/dist/web/assets/SessionGraph-DWP1YyP0.js +1 -0
  18. package/dist/web/assets/SessionReplay-kz1EhiaI.js +1 -0
  19. package/dist/web/assets/SessionTokens-BjuXcVM2.js +1 -0
  20. package/dist/web/assets/SessionYield-DXF-Xb5T.js +1 -0
  21. package/dist/web/assets/Settings-CXCDYvsc.js +1 -0
  22. package/dist/web/assets/Trends-wdNqOtnn.js +1 -0
  23. package/dist/web/assets/arrow-left-B-iQ08P0.js +1 -0
  24. package/dist/web/assets/chart-column-BwF4X7mz.js +1 -0
  25. package/dist/web/assets/clsx-DnEFlO87.js +1 -0
  26. package/dist/web/assets/{clsx-DsHpp3Uj.js → createLucideIcon-Bjwrp8ZV.js} +1 -1
  27. package/dist/web/assets/dist-BYqqB4pa.js +1 -0
  28. package/dist/web/assets/file-pen-CHXP3wF7.js +1 -0
  29. package/dist/web/assets/getRadiusAndStrokeWidthFromDot-CFcPogcT.js +1 -0
  30. package/dist/web/assets/graphicalItemSelectors-DJeUEv0O.js +1 -0
  31. package/dist/web/assets/index-CJArQihV.js +2 -0
  32. package/dist/web/assets/index-CTAomrBX.css +1 -0
  33. package/dist/web/assets/play-ONoP4Jfr.js +1 -0
  34. package/dist/web/assets/tooltipContext-BT7phkqZ.js +1 -0
  35. package/dist/web/assets/triangle-alert-BhvAiLmv.js +1 -0
  36. package/dist/web/assets/useMutation-CfQYV-vU.js +1 -0
  37. package/dist/web/index.html +12 -11
  38. package/package.json +1 -1
  39. package/dist/web/assets/CartesianChart-CZSKepVZ.js +0 -33
  40. package/dist/web/assets/LineChart-BYjz-1bE.js +0 -1
  41. package/dist/web/assets/SessionCompaction-Duzo69wv.js +0 -1
  42. package/dist/web/assets/SessionGraph-Bb1BdCWf.js +0 -1
  43. package/dist/web/assets/SessionReplay-C3AZoYFc.js +0 -1
  44. package/dist/web/assets/SessionTokens-B6wfOhyn.js +0 -1
  45. package/dist/web/assets/Settings-HKanGbBq.js +0 -1
  46. package/dist/web/assets/Trends-p9DnVxWQ.js +0 -1
  47. package/dist/web/assets/arrow-left-Bg6VjX8-.js +0 -1
  48. package/dist/web/assets/chart-column-Brz7pC96.js +0 -1
  49. package/dist/web/assets/dist-w_zu0rIf.js +0 -1
  50. package/dist/web/assets/file-pen-DWwu4Q-r.js +0 -1
  51. package/dist/web/assets/graphicalItemSelectors-Dk1a_HU_.js +0 -4
  52. package/dist/web/assets/index-Bu9taSiK.js +0 -2
  53. package/dist/web/assets/index-CJPUO3dh.css +0 -1
  54. package/dist/web/assets/play-B0mJPrwl.js +0 -1
  55. package/dist/web/assets/triangle-alert-Bx2lGvGN.js +0 -1
  56. package/dist/web/assets/useMutation-BvFLVjYz.js +0 -1
  57. /package/dist/web/assets/{format-zw6IoTwZ.js → format-zsCsqELF.js} +0 -0
@@ -0,0 +1 @@
1
+ import{A as e,P as t,j as n}from"./createLucideIcon-Bjwrp8ZV.js";var r=t(n()),i=t(e());function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(o||={});var s=`popstate`;function c(e){e===void 0&&(e={});function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return p(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:m(t)}return g(t,n,null,e)}function l(e,t){if(e===!1||e==null)throw Error(t)}function u(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function d(){return Math.random().toString(36).substr(2,8)}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,n,r){return n===void 0&&(n=null),a({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?h(t):t,{state:n,key:t&&t.key||r||d()})}function m(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function h(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:c=!1}=r,u=i.history,d=o.Pop,h=null,g=_();g??(g=0,u.replaceState(a({},u.state,{idx:g}),``));function _(){return(u.state||{idx:null}).idx}function v(){d=o.Pop;let e=_(),t=e==null?null:e-g;g=e,h&&h({action:d,location:S.location,delta:t})}function y(e,t){d=o.Push;let r=p(S.location,e,t);n&&n(r,e),g=_()+1;let a=f(r,g),s=S.createHref(r);try{u.pushState(a,``,s)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(s)}c&&h&&h({action:d,location:S.location,delta:1})}function b(e,t){d=o.Replace;let r=p(S.location,e,t);n&&n(r,e),g=_();let i=f(r,g),a=S.createHref(r);u.replaceState(i,``,a),c&&h&&h({action:d,location:S.location,delta:0})}function x(e){let t=i.location.origin===`null`?i.location.href:i.location.origin,n=typeof e==`string`?e:m(e);return n=n.replace(/ $/,`%20`),l(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}let S={get action(){return d},get location(){return e(i,u)},listen(e){if(h)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,v),h=e,()=>{i.removeEventListener(s,v),h=null}},createHref(e){return t(i,e)},createURL:x,encodeLocation(e){let t=x(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:y,replace:b,go(e){return u.go(e)}};return S}var _;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(_||={});function v(e,t,n){return n===void 0&&(n=`/`),y(e,t,n,!1)}function y(e,t,n,r){let i=A((typeof t==`string`?h(t):t).pathname||`/`,n);if(i==null)return null;let a=b(e);S(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ae(i);o=re(a[e],t,r)}return o}function b(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(l(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let s=F([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(l(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+s+`".`)),b(e.children,t,c,s)),!(e.path==null&&!e.index)&&t.push({path:s,score:te(s,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of x(e.path))i(e,t,n)}),t}function x(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=x(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 S(e){e.sort((e,t)=>e.score===t.score?ne(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var C=/^:[\w-]+$/,w=3,T=2,E=1,D=10,ee=-2,O=e=>e===`*`;function te(e,t){let n=e.split(`/`),r=n.length;return n.some(O)&&(r+=ee),t&&(r+=T),n.filter(e=>!O(e)).reduce((e,t)=>e+(C.test(t)?w:t===``?E:D),r)}function ne(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 re(e,t,n){n===void 0&&(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=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:F([a,u.pathname]),pathnameBase:ue(F([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=F([a,u.pathnameBase]))}return o}function k(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ie(e.path,e.caseSensitive,e.end),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,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return i&&!c?e[r]=void 0:e[r]=(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ie(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),u(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)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ae(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return u(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function A(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)||`/`}var oe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,se=e=>oe.test(e);function ce(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?h(e):e,a;if(n)if(se(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),u(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?j(n.substring(1),`/`):j(n,t)}else a=t;return{pathname:a,search:de(r),hash:fe(i)}}function j(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function M(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 le(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function N(e,t){let n=le(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function P(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=h(e):(i=a({},e),l(!i.pathname||!i.pathname.includes(`?`),M(`?`,`pathname`,`search`,i)),l(!i.pathname||!i.pathname.includes(`#`),M(`#`,`pathname`,`hash`,i)),l(!i.search||!i.search.includes(`#`),M(`#`,`search`,`hash`,i)));let o=e===``||i.pathname===``,s=o?`/`:i.pathname,c;if(s==null)c=n;else{let e=t.length-1;if(!r&&s.startsWith(`..`)){let t=s.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}c=e>=0?t[e]:`/`}let u=ce(i,c),d=s&&s!==`/`&&s.endsWith(`/`),f=(o||s===`.`)&&n.endsWith(`/`);return!u.pathname.endsWith(`/`)&&(d||f)&&(u.pathname+=`/`),u}var F=e=>e.join(`/`).replace(/\/\/+/g,`/`),ue=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),de=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,fe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e;function pe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var I=[`post`,`put`,`patch`,`delete`];new Set(I);var me=[`get`,...I];new Set(me);function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}var R=r.createContext(null),z=r.createContext(null),B=r.createContext(null),V=r.createContext(null),H=r.createContext({outlet:null,matches:[],isDataRoute:!1}),U=r.createContext(null);function he(e,t){let{relative:n}=t===void 0?{}:t;!W()&&l(!1);let{basename:i,navigator:a}=r.useContext(B),{hash:o,pathname:s,search:c}=J(e,{relative:n}),u=s;return i!==`/`&&(u=s===`/`?i:F([i,s])),a.createHref({pathname:u,search:c,hash:o})}function W(){return r.useContext(V)!=null}function G(){return!W()&&l(!1),r.useContext(V).location}function K(e){r.useContext(B).static||r.useLayoutEffect(e)}function q(){let{isDataRoute:e}=r.useContext(H);return e?Me():ge()}function ge(){!W()&&l(!1);let e=r.useContext(R),{basename:t,future:n,navigator:i}=r.useContext(B),{matches:a}=r.useContext(H),{pathname:o}=G(),s=JSON.stringify(N(a,n.v7_relativeSplatPath)),c=r.useRef(!1);return K(()=>{c.current=!0}),r.useCallback(function(n,r){if(r===void 0&&(r={}),!c.current)return;if(typeof n==`number`){i.go(n);return}let a=P(n,JSON.parse(s),o,r.relative===`path`);e==null&&t!==`/`&&(a.pathname=a.pathname===`/`?t:F([t,a.pathname])),(r.replace?i.replace:i.push)(a,r.state,r)},[t,i,s,o,e])}var _e=r.createContext(null);function ve(e){let t=r.useContext(H).outlet;return t&&r.createElement(_e.Provider,{value:e},t)}function ye(){let{matches:e}=r.useContext(H),t=e[e.length-1];return t?t.params:{}}function J(e,t){let{relative:n}=t===void 0?{}:t,{future:i}=r.useContext(B),{matches:a}=r.useContext(H),{pathname:o}=G(),s=JSON.stringify(N(a,i.v7_relativeSplatPath));return r.useMemo(()=>P(e,JSON.parse(s),o,n===`path`),[e,s,o,n])}function be(e,t){return xe(e,t)}function xe(e,t,n,i){!W()&&l(!1);let{navigator:a}=r.useContext(B),{matches:s}=r.useContext(H),c=s[s.length-1],u=c?c.params:{};c&&c.pathname;let d=c?c.pathnameBase:`/`;c&&c.route;let f=G(),p;if(t){let e=typeof t==`string`?h(t):t;!(d===`/`||e.pathname?.startsWith(d))&&l(!1),p=e}else p=f;let m=p.pathname||`/`,g=m;if(d!==`/`){let e=d.replace(/^\//,``).split(`/`);g=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let _=v(e,{pathname:g}),y=Ee(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:F([d,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?d:F([d,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),s,n,i);return t&&y?r.createElement(V.Provider,{value:{location:L({pathname:`/`,search:``,hash:``,state:null,key:`default`},p),navigationType:o.Pop}},y):y}function Se(){let e=je(),t=pe(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return r.createElement(r.Fragment,null,r.createElement(`h2`,null,`Unexpected Application Error!`),r.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?r.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ce=r.createElement(Se,null),we=class extends r.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){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:r.createElement(H.Provider,{value:this.props.routeContext},r.createElement(U.Provider,{value:this.state.error,children:this.props.component}))}};function Te(e){let{routeContext:t,match:n,children:i}=e,a=r.useContext(R);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(H.Provider,{value:t},i)}function Ee(e,t,n,i){if(t===void 0&&(t=[]),n===void 0&&(n=null),i===void 0&&(i=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=i)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n?.errors;if(s!=null){let e=o.findIndex(e=>e.route.id&&s?.[e.route.id]!==void 0);!(e>=0)&&l(!1),o=o.slice(0,Math.min(o.length,e+1))}let c=!1,u=-1;if(n&&i&&i.v7_partialHydration)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,o=u>=0?o.slice(0,u+1):[o[0]];break}}}return o.reduceRight((e,i,a)=>{let l,d=!1,f=null,p=null;n&&(l=s&&i.route.id?s[i.route.id]:void 0,f=i.route.errorElement||Ce,c&&(u<0&&a===0?(Pe(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):u===a&&(d=!0,p=i.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,a+1)),h=()=>{let t;return t=l?f:d?p:i.route.Component?r.createElement(i.route.Component,null):i.route.element?i.route.element:e,r.createElement(Te,{match:i,routeContext:{outlet:e,matches:m,isDataRoute:n!=null},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||a===0)?r.createElement(we,{location:n.location,revalidation:n.revalidation,component:f,error:l,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var Y=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(Y||{}),X=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}(X||{});function De(e){let t=r.useContext(R);return!t&&l(!1),t}function Oe(e){let t=r.useContext(z);return!t&&l(!1),t}function ke(e){let t=r.useContext(H);return!t&&l(!1),t}function Ae(e){let t=ke(e),n=t.matches[t.matches.length-1];return!n.route.id&&l(!1),n.route.id}function je(){let e=r.useContext(U),t=Oe(X.UseRouteError),n=Ae(X.UseRouteError);return e===void 0?t.errors?.[n]:e}function Me(){let{router:e}=De(Y.UseNavigateStable),t=Ae(X.UseNavigateStable),n=r.useRef(!1);return K(()=>{n.current=!0}),r.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,L({fromRouteId:t},i)))},[e,t])}var Ne={};function Pe(e,t,n){!t&&!Ne[e]&&(Ne[e]=!0)}var Z=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function Fe(e,t){e?.v7_startTransition===void 0&&Z(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&Z(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&Z(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&Z(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&Z(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&Z(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}r.startTransition;function Ie(e){let{to:t,replace:n,state:i,relative:a}=e;!W()&&l(!1);let{future:o,static:s}=r.useContext(B),{matches:c}=r.useContext(H),{pathname:u}=G(),d=q(),f=P(t,N(c,o.v7_relativeSplatPath),u,a===`path`),p=JSON.stringify(f);return r.useEffect(()=>d(JSON.parse(p),{replace:n,state:i,relative:a}),[d,p,a,n,i]),null}function Le(e){return ve(e.context)}function Re(e){l(!1)}function ze(e){let{basename:t=`/`,children:n=null,location:i,navigationType:a=o.Pop,navigator:s,static:c=!1,future:u}=e;W()&&l(!1);let d=t.replace(/^\/*/,`/`),f=r.useMemo(()=>({basename:d,navigator:s,static:c,future:L({v7_relativeSplatPath:!1},u)}),[d,u,s,c]);typeof i==`string`&&(i=h(i));let{pathname:p=`/`,search:m=``,hash:g=``,state:_=null,key:v=`default`}=i,y=r.useMemo(()=>{let e=A(p,d);return e==null?null:{location:{pathname:e,search:m,hash:g,state:_,key:v},navigationType:a}},[d,p,m,g,_,v,a]);return y==null?null:r.createElement(B.Provider,{value:f},r.createElement(V.Provider,{children:n,value:y}))}function Be(e){let{children:t,location:n}=e;return be(Q(t),n)}var Ve=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(Ve||{});new Promise(()=>{}),r.Component;function Q(e,t){t===void 0&&(t=[]);let n=[];return r.Children.forEach(e,(e,i)=>{if(!r.isValidElement(e))return;let a=[...t,i];if(e.type===r.Fragment){n.push.apply(n,Q(e.props.children,a));return}e.type!==Re&&l(!1),!(!e.props.index||!e.props.children)&&l(!1);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,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary: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=Q(e.props.children,a)),n.push(o)}),n}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function He(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ue(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function We(e,t){return e.button===0&&(!t||t===`_self`)&&!Ue(e)}var Ge=[`onClick`,`relative`,`reloadDocument`,`replace`,`state`,`target`,`to`,`preventScrollReset`,`viewTransition`],Ke=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`viewTransition`,`children`],qe=`6`;try{window.__reactRouterVersion=qe}catch{}var Je=r.createContext({isTransitioning:!1}),Ye=r.startTransition;i.flushSync,r.useId;function Xe(e){let{basename:t,children:n,future:i,window:a}=e,o=r.useRef();o.current??=c({window:a,v5Compat:!0});let s=o.current,[l,u]=r.useState({action:s.action,location:s.location}),{v7_startTransition:d}=i||{},f=r.useCallback(e=>{d&&Ye?Ye(()=>u(e)):u(e)},[u,d]);return r.useLayoutEffect(()=>s.listen(f),[s,f]),r.useEffect(()=>Fe(i),[i]),r.createElement(ze,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:i})}var Ze=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Qe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$e=r.forwardRef(function(e,t){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d}=e,f=He(e,Ge),{basename:p}=r.useContext(B),m,h=!1;if(typeof l==`string`&&Qe.test(l)&&(m=l,Ze))try{let e=new URL(window.location.href),t=l.startsWith(`//`)?new URL(e.protocol+l):new URL(l),n=A(t.pathname,p);t.origin===e.origin&&n!=null?l=n+t.search+t.hash:h=!0}catch{}let g=he(l,{relative:i}),_=it(l,{replace:o,state:s,target:c,preventScrollReset:u,relative:i,viewTransition:d});function v(e){n&&n(e),e.defaultPrevented||_(e)}return r.createElement(`a`,$({},f,{href:m||g,onClick:h||a?n:v,ref:t,target:c}))}),et=r.forwardRef(function(e,t){let{"aria-current":n=`page`,caseSensitive:i=!1,className:a=``,end:o=!1,style:s,to:c,viewTransition:l,children:u}=e,d=He(e,Ke),f=J(c,{relative:d.relative}),p=G(),m=r.useContext(z),{navigator:h,basename:g}=r.useContext(B),_=m!=null&&at(f)&&l===!0,v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,y=p.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(y=y.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&g&&(b=A(b,g)||b);let x=v!==`/`&&v.endsWith(`/`)?v.length-1:v.length,S=y===v||!o&&y.startsWith(v)&&y.charAt(x)===`/`,C=b!=null&&(b===v||!o&&b.startsWith(v)&&b.charAt(v.length)===`/`),w={isActive:S,isPending:C,isTransitioning:_},T=S?n:void 0,E;E=typeof a==`function`?a(w):[a,S?`active`:null,C?`pending`:null,_?`transitioning`:null].filter(Boolean).join(` `);let D=typeof s==`function`?s(w):s;return r.createElement($e,$({},d,{"aria-current":T,className:E,ref:t,style:D,to:c,viewTransition:l}),typeof u==`function`?u(w):u)}),tt;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`,e.useViewTransitionState=`useViewTransitionState`})(tt||={});var nt;(function(e){e.UseFetcher=`useFetcher`,e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(nt||={});function rt(e){let t=r.useContext(R);return!t&&l(!1),t}function it(e,t){let{target:n,replace:i,state:a,preventScrollReset:o,relative:s,viewTransition:c}=t===void 0?{}:t,l=q(),u=G(),d=J(e,{relative:s});return r.useCallback(t=>{We(t,n)&&(t.preventDefault(),l(e,{replace:i===void 0?m(u)===m(d):i,state:a,preventScrollReset:o,relative:s,viewTransition:c}))},[u,l,d,i,a,n,e,o,s,c])}function at(e,t){t===void 0&&(t={});let n=r.useContext(Je);n??l(!1);let{basename:i}=rt(tt.useViewTransitionState),a=J(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=A(n.currentLocation.pathname,i)||n.currentLocation.pathname,s=A(n.nextLocation.pathname,i)||n.nextLocation.pathname;return k(a.pathname,s)!=null||k(a.pathname,o)!=null}export{Le as a,q as c,Ie as i,ye as l,$e as n,Re as o,et as r,Be as s,Xe as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-Bjwrp8ZV.js";var t=e(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{P as e,j as t}from"./createLucideIcon-Bjwrp8ZV.js";import{t as n}from"./clsx-DnEFlO87.js";import{A as r,Lt as i,Rn as a,U as o,Vn as s,Yn as c,ar as l,ir as u,m as d,or as f,q as p,qn as m,tr as h}from"./CategoricalChart-DEGrE0Qv.js";var g=e(t());function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(null,arguments)}var v=e=>{var{cx:t,cy:r,r:i,className:a}=e,o=n(`recharts-dot`,a);return c(t)&&c(r)&&c(i)?g.createElement(`circle`,_({},l(e),s(e),{className:o,cx:t,cy:r,r:i})):null},y=[`points`];function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?b(Object(n),!0).forEach(function(t){S(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){var t=w(e,`string`);return typeof t==`symbol`?t:t+``}function w(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(null,arguments)}function E(e,t){if(e==null)return{};var n,r,i=D(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function D(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function O(e){var{option:t,dotProps:r,className:i}=e;if((0,g.isValidElement)(t))return(0,g.cloneElement)(t,r);if(typeof t==`function`)return t(r);var a=n(i,typeof t==`boolean`?``:t.className),o=r??{},{points:s}=o,c=E(o,y);return g.createElement(v,T({},c,{className:a}))}function k(e,t){return e==null?!1:t?!0:e.length===1}function A(e){var{points:t,dot:n,className:a,dotClassName:s,dataKey:c,baseProps:l,needClip:d,clipPathId:f,zIndex:p=i.scatter}=e;if(!k(t,n))return null;var m=r(n),_=u(n),v=t.map((e,r)=>{var i=x(x(x({r:3},l),_),{},{index:r,cx:e.x??void 0,cy:e.y??void 0,dataKey:c,value:e.value,payload:e.payload,points:t});return g.createElement(O,{key:`dot-${r}`,option:n,dotProps:i,className:s})}),y={};return d&&f!=null&&(y.clipPath=`url(#clipPath-${m?``:`dots-`}${f})`),g.createElement(o,{zIndex:p},g.createElement(h,T({className:a},y),v))}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?j(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function N(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=F(e,`string`);return typeof t==`symbol`?t:t+``}function F(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var I=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:a,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var c=M(M(M({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??`none`,strokeWidth:2,stroke:`#fff`,payload:t.payload,value:t.value}),f(i)),s(i)),l=(0,g.isValidElement)(i)?(0,g.cloneElement)(i,c):typeof i==`function`?i(c):g.createElement(v,c);return g.createElement(h,{className:`recharts-active-dot`,clipPath:o},l)};function L(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:s,clipPath:c,zIndex:l=i.activeDot}=e,u=a(p),f=d();if(t==null||f==null)return null;var h=t.find(e=>f.includes(e.payload));return m(h)?null:g.createElement(o,{zIndex:l},g.createElement(I,{point:h,childIndex:Number(u),mainColor:n,dataKey:s,activeDot:r,clipPath:c}))}function R(e){var t=f(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:a}=t,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(s)||s<0)&&(s=r),{r:o,strokeWidth:s}}return{r:n,strokeWidth:r}}export{L as n,A as r,R as t};
@@ -0,0 +1 @@
1
+ function e(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function t(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}export{t as n,e as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SessionTokens-BjuXcVM2.js","assets/createLucideIcon-Bjwrp8ZV.js","assets/CategoricalChart-DEGrE0Qv.js","assets/clsx-DnEFlO87.js","assets/dist-BYqqB4pa.js","assets/arrow-left-B-iQ08P0.js","assets/CartesianChart-DgJKUG1O.js","assets/getRadiusAndStrokeWidthFromDot-CFcPogcT.js","assets/Legend-CEa2zCmi.js","assets/graphicalItemSelectors-DJeUEv0O.js","assets/format-zsCsqELF.js","assets/SessionCompaction-Dx3tbM9N.js","assets/Line-CCyE37cb.js","assets/ActiveShapeUtils-CtEvtbYg.js","assets/ErrorBarContext-BMnGmrrB.js","assets/LineChart-DmMubyEd.js","assets/SessionGraph-DWP1YyP0.js","assets/SessionDiffs-CDUkVqua.js","assets/file-pen-CHXP3wF7.js","assets/SessionReplay-kz1EhiaI.js","assets/useMutation-CfQYV-vU.js","assets/play-ONoP4Jfr.js","assets/SessionActivity-BUzJpWwc.js","assets/Bar-DEgd_1jq.js","assets/tooltipContext-BT7phkqZ.js","assets/BarChart-CLHGmIz1.js","assets/ProjectActivity-BG5hEcJl.js","assets/SessionYield-DXF-Xb5T.js","assets/ProjectYield-vVxXaT6e.js","assets/Trends-wdNqOtnn.js","assets/chart-column-BwF4X7mz.js","assets/Settings-CXCDYvsc.js","assets/triangle-alert-BhvAiLmv.js"])))=>i.map(i=>d[i]);
2
+ import{A as e,C as t,D as n,M as r,O as i,P as a,S as o,_ as s,a as c,b as l,c as u,d,f,g as p,h as ee,i as m,j as te,k as h,m as ne,n as g,p as re,r as ie,s as ae,t as _,v as oe,w as se,x as v,y as ce}from"./createLucideIcon-Bjwrp8ZV.js";import{a as le,c as ue,i as de,l as y,n as b,o as x,r as fe,s as pe,t as me}from"./dist-BYqqB4pa.js";import{n as he,t as S}from"./useMutation-CfQYV-vU.js";import{t as C}from"./arrow-left-B-iQ08P0.js";import{t as ge}from"./chart-column-BwF4X7mz.js";import{n as _e,r as ve,t as ye}from"./triangle-alert-BhvAiLmv.js";import{t as be}from"./file-pen-CHXP3wF7.js";import{t as xe}from"./play-ONoP4Jfr.js";import{t as w}from"./clsx-DnEFlO87.js";import{a as T,c as E,i as D,n as O,o as k,r as Se,s as A,t as j}from"./format-zsCsqELF.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ce=r((t=>{var n=e();t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot}));function we(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=>{re(e,()=>t.signal,()=>n=!0)},u=p(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ee:ne;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Ee:Te,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:Te(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Te(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 Ee(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var De=class extends h{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 he({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=M(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=M(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=M(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=M(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){f.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=>l(t,e))}findAll(e={}){return this.getAll().filter(t=>l(e,t))}notify(e){f.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return f.batch(()=>Promise.all(e.map(e=>e.continue().catch(o))))}};function M(e){return e.options.scope?.id}var Oe=class extends h{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ce(r,t),a=this.get(i);return a||(a=new u({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(){f.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=>v(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>v(e,t)):t}notify(e){f.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){f.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){f.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ke=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Oe,this.#t=e.mutationCache||new De,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=i.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=d.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(se(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=s(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return f.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;f.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return f.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=f.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(o).catch(o)}invalidateQueries(e,t={}){return f.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=f.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(o)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(o)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(se(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(o).catch(o)}fetchInfiniteQuery(e){return e.behavior=we(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(o).catch(o)}ensureInfiniteQueryData(e){return e.behavior=we(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return d.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(oe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let n=[...this.#r.values()],r={};return n.forEach(n=>{t(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){this.#i.set(oe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let n=[...this.#i.values()],r={};return n.forEach(n=>{t(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ce(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===n&&(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=_(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Ae=_(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),je=_(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Me=_(`chart-pie`,[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]]),Ne=_(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Pe=_(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Fe=_(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),P=_(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),F=_(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),I=_(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Ie=_(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Le=_(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),L=_(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),R=_(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Re=_(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),ze=_(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),z=_(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),B=_(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Be=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Ve=(e=>e?Be(e):Be),V=a(te(),1),He=e=>e;function Ue(e,t=He){let n=V.useSyncExternalStore(e.subscribe,V.useCallback(()=>t(e.getState()),[e,t]),V.useCallback(()=>t(e.getInitialState()),[e,t]));return V.useDebugValue(n),n}var We=e=>{let t=Ve(e),n=e=>Ue(t,e);return Object.assign(n,t),n},Ge=(e=>e?We(e):We),Ke=a(Ce(),1),qe=2e3,H=Ge(e=>({events:[],initialized:!1,setInitial:t=>e({events:t,initialized:!0}),push:t=>e(e=>{if(e.events.find(e=>e.id===t.id))return{};let n=[t,...e.events];return n.length>qe&&(n.length=qe),{events:n}})})),U=0,W=null;function Je(){let{initialized:e,setInitial:t,push:n}=H();(0,V.useEffect)(()=>(e||g.events({limit:1e3}).then(e=>t(e.events)).catch(()=>t([])),U+=1,W||=ie(e=>n(e)),()=>{--U,U<=0&&W&&(W(),W=null)}),[])}var G=ae(),Ye=[{id:`nav:timeline`,title:`Timeline`,to:`/`,group:`nav`},{id:`nav:logs`,title:`Logs (disk-backed history)`,to:`/logs`,group:`nav`},{id:`nav:projects`,title:`Projects`,to:`/projects`,group:`nav`},{id:`nav:search`,title:`Search`,to:`/search`,group:`nav`},{id:`nav:agents`,title:`Agents`,to:`/agents`,group:`nav`},{id:`nav:permissions`,title:`Permissions`,to:`/permissions`,group:`nav`},{id:`nav:cron`,title:`Scheduled`,to:`/cron`,group:`nav`},{id:`nav:trends`,title:`Trends`,to:`/trends`,group:`nav`},{id:`nav:budgets`,title:`Settings · Budgets`,to:`/settings/budgets`,group:`nav`},{id:`nav:anomaly`,title:`Settings · Anomaly`,to:`/settings/anomaly`,group:`nav`},{id:`nav:triggers`,title:`Settings · Triggers`,to:`/settings/triggers`,group:`nav`}];function Xe(){let[e,t]=(0,V.useState)(!1),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(0),o=ue(),s=m({queryKey:[`projects`],queryFn:g.projects,enabled:e});(0,V.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t(e=>!e),r(``),a(0)),e.key===`Escape`&&t(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let c=(0,V.useMemo)(()=>(s.data?.projects??[]).map(e=>({id:`proj:${e.name}`,title:e.name,hint:`${e.eventCount} events · ${e.sessionIds.length} sessions`,to:`/projects/${encodeURIComponent(e.name)}`,group:`project`})),[s.data]),l=(0,V.useMemo)(()=>[...Ye,...c],[c]),u=(0,V.useMemo)(()=>{let e=n.trim().toLowerCase();return e?l.filter(t=>t.title.toLowerCase().includes(e)||(t.hint??``).toLowerCase().includes(e)).slice(0,30):l.slice(0,20)},[l,n]);if((0,V.useEffect)(()=>a(0),[n]),!e)return null;let d=e=>{t(!1),o(e.to)};return(0,G.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-start justify-center pt-[10vh] px-4`,onClick:()=>t(!1),children:(0,G.jsxs)(`div`,{className:`w-full max-w-xl bg-bg-surface border border-bg-border rounded-xl shadow-2xl overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 border-b border-bg-border`,children:[(0,G.jsx)(R,{className:`w-4 h-4 text-fg-muted`}),(0,G.jsx)(`input`,{autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),a(e=>Math.min(e+1,u.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),a(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=u[i];t&&d(t)}},placeholder:`Jump to view, project, session…`,className:`flex-1 bg-transparent outline-none text-sm`}),(0,G.jsx)(`kbd`,{className:`text-[10px] text-fg-muted mono border border-bg-border rounded px-1`,children:`esc`})]}),(0,G.jsxs)(`div`,{className:`max-h-[60vh] overflow-y-auto py-1`,children:[u.length===0&&(0,G.jsx)(`div`,{className:`p-4 text-fg-muted text-sm text-center`,children:`no results`}),u.map((e,t)=>(0,G.jsxs)(`button`,{onClick:()=>d(e),className:w(`w-full flex items-center justify-between gap-3 px-4 py-2 text-left transition`,t===i?`bg-accent/20 text-accent`:`text-fg hover:bg-bg-elev`),onMouseEnter:()=>a(t),children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-sm`,children:e.title}),e.hint&&(0,G.jsx)(`div`,{className:`text-[11px] text-fg-muted`,children:e.hint})]}),(0,G.jsx)(`div`,{className:`text-[10px] text-fg-muted uppercase mono`,children:e.group})]},e.id))]}),(0,G.jsxs)(`div`,{className:`px-4 py-2 border-t border-bg-border flex items-center justify-between text-[11px] text-fg-muted`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1 mono`,children:`↑↓`}),` navigate`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1 mono`,children:`↵`}),` open`]})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1 mono`,children:`⌘K`}),` toggle`]})]})]})})}function Ze(){Je();let e=m({queryKey:[`health`],queryFn:g.health,refetchInterval:1e4});return(0,G.jsxs)(`div`,{className:`h-full flex flex-col bg-bg text-fg`,children:[(0,G.jsxs)(`header`,{className:`flex items-center gap-6 px-5 py-3 border-b border-bg-border`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(N,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`div`,{className:`font-bold`,children:`agentwatch`}),(0,G.jsx)(`div`,{className:`text-xs text-fg-dim`,children:e.data?.version?`v${e.data.version}`:``})]}),(0,G.jsxs)(`nav`,{className:`flex items-center gap-1 text-sm`,children:[(0,G.jsx)(K,{to:`/`,label:`Timeline`,icon:(0,G.jsx)(N,{className:`w-4 h-4`}),end:!0}),(0,G.jsx)(K,{to:`/logs`,label:`Logs`,icon:(0,G.jsx)(L,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/projects`,label:`Projects`,icon:(0,G.jsx)(F,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/search`,label:`Search`,icon:(0,G.jsx)(R,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/agents`,label:`Agents`,icon:(0,G.jsx)(B,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/permissions`,label:`Permissions`,icon:(0,G.jsx)(z,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/cron`,label:`Scheduled`,icon:(0,G.jsx)(Fe,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/trends`,label:`Trends`,icon:(0,G.jsx)(ge,{className:`w-4 h-4`})}),(0,G.jsx)(K,{to:`/settings`,label:`Settings`,icon:(0,G.jsx)(_e,{className:`w-4 h-4`})})]}),(0,G.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 text-xs text-fg-dim`,children:[(0,G.jsx)(`kbd`,{className:`border border-bg-border rounded px-1.5 py-0.5 mono text-[10px]`,children:`⌘K`}),(0,G.jsx)(`span`,{className:w(`w-2 h-2 rounded-full`,e.isSuccess?`bg-ok`:`bg-warn`)}),(0,G.jsx)(`span`,{children:e.isSuccess?`connected`:`connecting…`})]})]}),(0,G.jsx)(`main`,{className:`flex-1 overflow-hidden`,children:(0,G.jsx)(le,{})}),(0,G.jsx)(Xe,{})]})}function K({to:e,label:t,icon:n,end:r,disabled:i}){return i?(0,G.jsxs)(`span`,{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-fg-muted cursor-not-allowed`,title:`coming in the next phase`,children:[n,t]}):(0,G.jsxs)(fe,{to:e,end:r,className:({isActive:e})=>w(`flex items-center gap-1.5 px-3 py-1.5 rounded-md transition`,e?`bg-accent/20 text-accent`:`text-fg-dim hover:bg-bg-elev hover:text-fg`),children:[n,t]})}var Qe=[`prompt`,`response`,`tool_call`,`shell_exec`,`file_write`,`file_read`,`file_change`,`session_start`,`session_end`,`compaction`],$e=[{id:`1h`,label:`1h`,ms:60*6e4},{id:`24h`,label:`24h`,ms:1440*6e4},{id:`7d`,label:`7d`,ms:10080*6e4},{id:`all`,label:`all`,ms:null}];function et(){let e=H(e=>e.events),t=H(e=>e.initialized),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(`all`),[o,s]=(0,V.useState)(`all`),[c,l]=(0,V.useState)(`24h`),u=(0,V.useRef)(null),d=m({queryKey:[`agents`],queryFn:g.agents,refetchInterval:1e4});(0,V.useEffect)(()=>{let e=e=>{if(e.key!==`/`||e.metaKey||e.ctrlKey)return;let t=e.target;t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`)||(e.preventDefault(),u.current?.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let f=(0,V.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.agent,(t.get(n.agent)??0)+1);return t},[e]),p=(0,V.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.type,(t.get(n.type)??0)+1);return t},[e]),ee=(0,V.useMemo)(()=>{let t=[[`all`,e.length]],n=d.data?.agents??[];for(let e of n)!e.present||!e.instrumented||t.push([e.name,f.get(e.name)??0]);for(let[e,n]of f)t.find(t=>t[0]===e)||t.push([e,n]);return t},[d.data,f,e.length]),te=(0,V.useMemo)(()=>[[`all`,e.length]].concat(Qe.filter(e=>p.has(e)).map(e=>[e,p.get(e)])),[e.length,p]),h=(0,V.useMemo)(()=>{let t=n.trim().toLowerCase(),r=$e.find(e=>e.id===c)?.ms??null,a=r==null?0:Date.now()-r;return e.filter(e=>i!==`all`&&e.agent!==i||o!==`all`&&e.type!==o||r!=null&&new Date(e.ts).getTime()<a?!1:t?(e.summary??``).toLowerCase().includes(t)||(e.path??``).toLowerCase().includes(t)||(e.cmd??``).toLowerCase().includes(t)||(e.tool??``).toLowerCase().includes(t)||(e.details?.fullText??``).toLowerCase().includes(t):!0)},[e,n,i,o,c]),ne=t&&e.length>0&&h.length===0&&i!==`all`;return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 px-5 py-3 border-b border-bg-border bg-bg-surface`,children:[(0,G.jsxs)(`div`,{className:`relative flex-1 min-w-[240px] max-w-lg`,children:[(0,G.jsx)(R,{className:`w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none`}),(0,G.jsx)(`input`,{ref:u,value:n,onChange:e=>r(e.target.value),placeholder:`filter the live buffer… (press / to focus)`,className:`w-full bg-bg-elev border border-bg-border rounded-md pl-9 pr-3 py-1.5 text-sm outline-none focus:border-accent`})]}),(0,G.jsx)(nt,{label:`agent`,value:i,options:ee,onChange:e=>a(e)}),(0,G.jsx)(nt,{label:`type`,value:o,options:te,onChange:e=>s(e)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-dim`,children:`window:`}),$e.map(e=>(0,G.jsx)(`button`,{onClick:()=>l(e.id),className:w(`px-2 py-1 rounded-md transition mono`,c===e.id?`bg-accent/20 text-accent border border-accent/40`:`border border-bg-border text-fg-dim hover:bg-bg-elev`),children:e.label},e.id))]}),(0,G.jsxs)(`div`,{className:`ml-auto text-xs text-fg-dim`,children:[(0,G.jsx)(I,{className:`inline w-3.5 h-3.5 mr-1`}),h.length,` / `,e.length,` events`]})]}),ne&&(0,G.jsxs)(`div`,{className:`px-5 py-2 text-xs text-warn bg-warn/10 border-b border-warn/30`,children:[`No `,(0,G.jsx)(`span`,{className:`mono`,children:i}),` events in the live buffer. agentwatch only captures events fired `,(0,G.jsx)(`i`,{children:`after`}),` it started. To see historical `,(0,G.jsx)(`span`,{className:`mono`,children:i}),` activity, open the `,(0,G.jsx)(b,{to:`/logs`,className:`text-accent underline`,children:`Logs`}),` view (reads disk JSONLs).`]}),(0,G.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[!t&&(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`}),t&&e.length===0&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsx)(`div`,{className:`mb-2`,children:`No events yet.`}),(0,G.jsxs)(`div`,{className:`text-xs`,children:[`Launch a Claude Code / Codex / Cursor / Gemini / Hermes / OpenClaw session and events will stream in real-time.`,` `,(0,G.jsx)(b,{to:`/logs`,className:`text-accent underline`,children:`Or open /logs to search historical JSONLs.`})]})]}),t&&e.length>0&&(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`sticky top-0 bg-bg-surface border-b border-bg-border z-10`,children:(0,G.jsxs)(`tr`,{className:`text-left text-xs uppercase text-fg-muted`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 w-36`,children:`date / time`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-28`,children:`agent`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-32`,children:`type`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-10`,children:`risk`}),(0,G.jsx)(`th`,{className:`px-3 py-2`,children:`event`})]})}),(0,G.jsx)(`tbody`,{children:h.slice(0,500).map(e=>(0,G.jsx)(tt,{event:e},e.id))})]})]})]})}function tt({event:e}){let t=e.summary??e.cmd??e.path??e.tool??`—`;return(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/40 row-hover`,children:[(0,G.jsx)(`td`,{className:`px-4 py-1.5 text-fg-dim mono text-xs align-top whitespace-nowrap`,children:Se(e.ts)}),(0,G.jsx)(`td`,{className:w(`px-2 py-1.5 mono text-xs align-top`,j(e.agent)),children:e.agent}),(0,G.jsxs)(`td`,{className:`px-2 py-1.5 mono text-xs align-top`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted mr-1`,children:E(e.type)}),e.type]}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 align-top`,children:(0,G.jsx)(`span`,{className:w(`inline-block text-[10px] mono px-1.5 py-0.5 rounded`,A(e.riskScore)),children:e.riskScore})}),(0,G.jsxs)(`td`,{className:`px-3 py-1.5 align-top`,children:[(0,G.jsx)(b,{to:`/events/${encodeURIComponent(e.id)}`,className:`hover:text-accent`,children:(0,G.jsx)(`span`,{className:`mono text-xs truncate inline-block max-w-3xl`,children:t})}),e.sessionId&&(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e.sessionId)}`,className:`ml-3 text-[10px] text-fg-muted hover:text-accent mono`,title:e.sessionId,children:[`session:`,e.sessionId.slice(0,10)]})]})]})}function nt({label:e,value:t,options:n,onChange:r}){return(0,G.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs text-fg-dim`,children:[(0,G.jsx)(`span`,{children:e}),(0,G.jsx)(`select`,{value:t,onChange:e=>r(e.target.value),className:`bg-bg-elev border border-bg-border rounded-md px-2 py-1 outline-none focus:border-accent`,children:n.map(([e,t])=>(0,G.jsxs)(`option`,{value:e,children:[e,` (`,t,`)`]},e))})]})}function rt(){let e=m({queryKey:[`projects`],queryFn:g.projects,refetchInterval:5e3});if(e.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});if(e.error)return(0,G.jsxs)(`div`,{className:`p-6 text-danger`,children:[`failed: `,String(e.error)]});let t=e.data?.projects??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`Projects`}),(0,G.jsx)(`span`,{className:`text-sm text-fg-dim`,children:t.length})]}),t.length===0?(0,G.jsx)(`div`,{className:`p-10 text-center text-fg-dim`,children:`No projects detected yet — once an agent writes to a project, it'll appear here.`}):(0,G.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3 p-5`,children:t.map(e=>(0,G.jsxs)(b,{to:`/projects/${encodeURIComponent(e.name)}`,className:`block border border-bg-border rounded-lg p-4 bg-bg-surface hover:bg-bg-elev hover:border-accent/40 transition`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,G.jsx)(F,{className:`w-4 h-4 text-accent shrink-0`}),(0,G.jsx)(`div`,{className:`font-medium truncate`,children:e.name})]}),(0,G.jsx)(Ae,{className:`w-4 h-4 text-fg-muted`})]}),(0,G.jsxs)(`div`,{className:`mt-3 grid grid-cols-3 gap-2 text-xs`,children:[(0,G.jsx)(q,{label:`events`,value:String(e.eventCount)}),(0,G.jsx)(q,{label:`sessions`,value:String(e.sessionIds.length)}),(0,G.jsx)(q,{label:`cost`,value:k(e.cost)})]}),e.lastTs&&(0,G.jsxs)(`div`,{className:`mt-2 text-[11px] text-fg-muted mono`,children:[`last: `,O(e.lastTs)]})]},e.name))})]})}function q({label:e,value:t}){return(0,G.jsxs)(`div`,{className:`bg-bg-elev rounded-md px-2 py-1.5`,children:[(0,G.jsx)(`div`,{className:`text-[10px] uppercase text-fg-muted`,children:e}),(0,G.jsx)(`div`,{className:`mono`,children:t})]})}function it(){let{name:e=``}=y(),t=m({queryKey:[`project-sessions`,e],queryFn:()=>g.projectSessions(e),refetchInterval:5e3}).data?.sessions??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(b,{to:`/projects`,className:`text-fg-dim hover:text-accent`,children:(0,G.jsx)(C,{className:`w-4 h-4 inline`})}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:decodeURIComponent(e)}),(0,G.jsxs)(`span`,{className:`text-sm text-fg-dim`,children:[t.length,` sessions`]}),(0,G.jsxs)(b,{to:`/projects/${encodeURIComponent(e)}/activity`,className:`ml-auto text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(Me,{className:`w-3.5 h-3.5`}),` activity`]}),(0,G.jsxs)(b,{to:`/projects/${encodeURIComponent(e)}/yield`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(ve,{className:`w-3.5 h-3.5`}),` yield`]})]}),(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`sticky top-0 bg-bg-surface border-b border-bg-border`,children:(0,G.jsxs)(`tr`,{className:`text-left text-xs uppercase text-fg-muted`,children:[(0,G.jsx)(`th`,{className:`px-5 py-2 w-32`,children:`agent`}),(0,G.jsx)(`th`,{className:`px-2 py-2`,children:`session`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-20`,children:`events`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-24`,children:`cost`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-44`,children:`first`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-44`,children:`last`})]})}),(0,G.jsx)(`tbody`,{children:t.map(e=>(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/40 row-hover`,children:[(0,G.jsx)(`td`,{className:w(`px-5 py-1.5 mono text-xs`,j(e.agent)),children:e.agent}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs`,children:(0,G.jsx)(b,{to:`/sessions/${encodeURIComponent(e.sessionId)}`,className:`hover:text-accent`,children:e.sessionId})}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs`,children:e.eventCount}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs`,children:k(e.cost)}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs text-fg-dim`,children:e.firstTs?O(e.firstTs):`—`}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs text-fg-dim`,children:e.lastTs?O(e.lastTs):`—`})]},e.sessionId))})]})]})}function at(){let{id:e=``}=y(),t=m({queryKey:[`session`,e],queryFn:()=>g.session(e),refetchInterval:2e3});if(t.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});if(t.error)return(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:String(t.error)});let n=t.data?.events??[],r=n;return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(b,{to:-1,className:`text-fg-dim hover:text-accent`,children:(0,G.jsx)(C,{className:`w-4 h-4 inline`})}),(0,G.jsxs)(`h1`,{className:`text-lg font-bold mono`,children:[`session:`,e.slice(0,16)]}),(0,G.jsx)(`span`,{className:w(`text-sm`,j(t.data?.agent)),children:t.data?.agent}),(0,G.jsxs)(`span`,{className:`text-sm text-fg-dim`,children:[n.length,` events`]}),(0,G.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/tokens`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(ge,{className:`w-3.5 h-3.5`}),` tokens`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/compaction`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(N,{className:`w-3.5 h-3.5`}),` compaction`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/graph`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(Ie,{className:`w-3.5 h-3.5`}),` graph`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/diffs`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(be,{className:`w-3.5 h-3.5`}),` diffs`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/replay`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(xe,{className:`w-3.5 h-3.5`}),` replay`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/activity`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(Me,{className:`w-3.5 h-3.5`}),` activity`]}),(0,G.jsxs)(b,{to:`/sessions/${encodeURIComponent(e)}/yield`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(ve,{className:`w-3.5 h-3.5`}),` yield`]}),(0,G.jsxs)(`a`,{href:`/api/sessions/${encodeURIComponent(e)}/export?format=md&inline=1`,target:`_blank`,rel:`noreferrer`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(P,{className:`w-3.5 h-3.5`}),` .md`]}),(0,G.jsxs)(`a`,{href:`/api/sessions/${encodeURIComponent(e)}/export?format=json&inline=1`,target:`_blank`,rel:`noreferrer`,className:`text-xs text-fg-dim hover:text-accent flex items-center gap-1`,children:[(0,G.jsx)(P,{className:`w-3.5 h-3.5`}),` .json`]})]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-auto`,children:r.map(e=>(0,G.jsx)(ot,{event:e},e.id))})]})}function ot({event:e}){let t=e.details?.fullText??e.details?.toolResult??e.details?.thinking;return(0,G.jsxs)(`div`,{className:`px-5 py-2 border-b border-bg-border/30 hover:bg-bg-surface/40`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted mono`,children:D(e.ts)}),(0,G.jsx)(`span`,{className:w(`mono`,j(e.agent)),children:e.agent}),(0,G.jsxs)(`span`,{className:`mono text-fg-dim`,children:[E(e.type),` `,e.type]}),(0,G.jsx)(`span`,{className:w(`text-[10px] mono px-1.5 rounded`,A(e.riskScore)),children:e.riskScore}),(0,G.jsx)(b,{to:`/events/${encodeURIComponent(e.id)}`,className:`ml-auto text-fg-muted hover:text-accent text-[11px]`,children:`detail →`})]}),e.summary&&(0,G.jsx)(`div`,{className:`mt-1 text-sm mono whitespace-pre-wrap`,children:e.summary}),t&&(0,G.jsxs)(`pre`,{className:`mt-1 text-xs mono text-fg-dim bg-bg-surface rounded p-2 overflow-x-auto max-h-40 overflow-y-auto whitespace-pre-wrap`,children:[t.slice(0,2e3),t.length>2e3&&`… (${t.length-2e3} more chars)`]})]})}function st(){let{id:e=``}=y(),t=m({queryKey:[`event`,e],queryFn:()=>g.event(e)});if(t.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});if(t.error)return(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:String(t.error)});let n=t.data?.event;return n?(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(b,{to:-1,className:`text-fg-dim hover:text-accent`,children:(0,G.jsx)(C,{className:`w-4 h-4 inline`})}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`event`}),(0,G.jsx)(`span`,{className:`text-sm text-fg-dim mono`,children:n.id})]}),(0,G.jsxs)(`div`,{className:`p-5 space-y-4 max-w-5xl`,children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-3`,children:[(0,G.jsx)(J,{label:`time`,value:O(n.ts)}),(0,G.jsx)(J,{label:`agent`,value:(0,G.jsx)(`span`,{className:j(n.agent),children:n.agent})}),(0,G.jsx)(J,{label:`type`,value:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`span`,{className:`text-fg-muted`,children:[E(n.type),` `]}),n.type]})}),(0,G.jsx)(J,{label:`risk`,value:(0,G.jsx)(`span`,{className:w(`mono px-1.5 rounded`,A(n.riskScore)),children:n.riskScore})}),n.sessionId&&(0,G.jsx)(J,{label:`session`,value:(0,G.jsx)(b,{to:`/sessions/${encodeURIComponent(n.sessionId)}`,className:`hover:text-accent mono text-xs`,children:n.sessionId.slice(0,20)})}),n.tool&&(0,G.jsx)(J,{label:`tool`,value:n.tool}),n.path&&(0,G.jsx)(J,{label:`path`,value:(0,G.jsx)(`span`,{className:`mono text-xs`,children:n.path})})]}),n.summary&&(0,G.jsx)(Y,{label:`summary`,children:(0,G.jsx)(`div`,{className:`whitespace-pre-wrap mono text-sm`,children:n.summary})}),n.cmd&&(0,G.jsx)(Y,{label:`cmd`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:n.cmd})}),n.details?.fullText&&(0,G.jsx)(Y,{label:`full text`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:n.details.fullText})}),n.details?.thinking&&(0,G.jsx)(Y,{label:`thinking`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap text-fg-dim`,children:n.details.thinking})}),n.details?.toolInput&&(0,G.jsx)(Y,{label:`tool input`,children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:JSON.stringify(n.details.toolInput,null,2)})}),n.details?.toolResult&&(0,G.jsx)(Y,{label:w(`tool result`,n.details.toolError&&`(error)`),children:(0,G.jsx)(`pre`,{className:`mono text-xs whitespace-pre-wrap`,children:n.details.toolResult})}),n.details?.usage&&(0,G.jsx)(Y,{label:`usage`,children:(0,G.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 text-sm`,children:[(0,G.jsx)(J,{label:`input`,value:T(n.details.usage.input)}),(0,G.jsx)(J,{label:`output`,value:T(n.details.usage.output)}),(0,G.jsx)(J,{label:`cache read`,value:T(n.details.usage.cacheRead)}),(0,G.jsx)(J,{label:`cache create`,value:T(n.details.usage.cacheCreate)}),n.details.cost!=null&&(0,G.jsx)(J,{label:`cost`,value:k(n.details.cost)}),n.details.model&&(0,G.jsx)(J,{label:`model`,value:(0,G.jsx)(`span`,{className:`mono text-xs`,children:n.details.model})})]})}),n.details?.source&&(0,G.jsxs)(`div`,{className:`text-xs text-fg-muted mono`,children:[`source: `,n.details.source]})]})]}):(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:`event not found`})}function J({label:e,value:t}){return(0,G.jsxs)(`div`,{className:`bg-bg-surface border border-bg-border rounded-md px-3 py-2`,children:[(0,G.jsx)(`div`,{className:`text-[10px] uppercase text-fg-muted`,children:e}),(0,G.jsx)(`div`,{className:`mt-0.5`,children:t})]})}function Y({label:e,children:t}){return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-xs uppercase text-fg-muted mb-1`,children:e}),(0,G.jsx)(`div`,{className:`bg-bg-surface border border-bg-border rounded-md p-3 overflow-x-auto`,children:t})]})}function ct(){let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(`live`),i=(0,V.useRef)(null);(0,V.useEffect)(()=>{i.current?.focus()},[]);let a=S({mutationFn:({q:e,m:t})=>g.search(e,t,100)});return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let r=e.trim();r&&a.mutate({q:r,m:n})},className:`px-5 py-4 border-b border-bg-border bg-bg-surface flex items-center gap-3`,children:[(0,G.jsxs)(`div`,{className:`relative flex-1`,children:[(0,G.jsx)(R,{className:`w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none`}),(0,G.jsx)(`input`,{ref:i,value:e,onChange:e=>t(e.target.value),placeholder:`search — enter to run`,className:`w-full bg-bg-elev border border-bg-border rounded-md pl-9 pr-3 py-2 outline-none focus:border-accent`})]}),(0,G.jsx)(`div`,{className:`flex rounded-md overflow-hidden border border-bg-border`,children:[`live`,`cross`,`semantic`].map(e=>(0,G.jsx)(`button`,{type:`button`,onClick:()=>r(e),className:w(`px-3 py-2 text-xs transition`,n===e?`bg-accent/20 text-accent`:`bg-bg-elev text-fg-dim hover:bg-bg`),children:e},e))}),(0,G.jsx)(`button`,{type:`submit`,disabled:!e.trim()||a.isPending,className:`px-4 py-2 bg-accent/20 text-accent rounded-md text-xs hover:bg-accent/30 disabled:opacity-40`,children:a.isPending?`searching…`:`search`})]}),(0,G.jsx)(lt,{mode:n}),(0,G.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[a.data?.status&&(0,G.jsx)(`div`,{className:`px-5 py-2 text-xs text-warn bg-warn/10 border-b border-warn/30`,children:a.data.status}),a.data?.error&&(0,G.jsx)(`div`,{className:`px-5 py-2 text-xs text-danger bg-danger/10 border-b border-danger/30`,children:a.data.error}),a.data&&a.data.hits.length===0&&!a.isPending&&(0,G.jsx)(`div`,{className:`p-10 text-center text-fg-dim`,children:`no matches.`}),a.data&&a.data.hits.length>0&&(0,G.jsx)(ut,{hits:a.data.hits,mode:a.data.mode}),!a.data&&!a.isPending&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsx)(`div`,{className:`mb-1`,children:`Three modes:`}),(0,G.jsxs)(`ul`,{className:`text-xs space-y-1 inline-block text-left`,children:[(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`b`,{children:`live`}),` — substring across the current in-memory buffer (fast, recent only)`]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`b`,{children:`cross`}),` — ripgrep across every JSONL on disk (slow first time, thorough)`]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`b`,{children:`semantic`}),` — hybrid BM25 + embedding search (fuzzy, needs the index built in the TUI first)`]})]})]})]})]})}function lt({mode:e}){return(0,G.jsx)(`div`,{className:`px-5 py-2 text-xs text-fg-muted bg-bg-surface border-b border-bg-border/50`,children:{live:`searching the in-memory ring buffer (500–2000 events).`,cross:`searching every session JSONL on disk.`,semantic:`searching the hybrid BM25 + embedding index.`}[e]})}function ut({hits:e}){return(0,G.jsx)(`div`,{children:e.map((e,t)=>{if(e.kind===`live`){let n=e.event;return(0,G.jsxs)(b,{to:`/events/${encodeURIComponent(n.id)}`,className:`block px-5 py-2 border-b border-bg-border/40 row-hover`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted mono`,children:D(n.ts)}),(0,G.jsx)(`span`,{className:w(`mono`,j(n.agent)),children:n.agent}),(0,G.jsxs)(`span`,{className:`mono text-fg-dim`,children:[E(n.type),` `,n.type]})]}),(0,G.jsx)(`div`,{className:`mt-0.5 mono text-sm truncate`,children:n.summary??n.cmd??n.path??n.tool??``})]},t)}let n=e.hit;return(0,G.jsxs)(b,{to:n.sessionId?`/sessions/${encodeURIComponent(n.sessionId)}`:`#`,className:`block px-5 py-2 border-b border-bg-border/40 row-hover`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:w(`mono`,j(n.agent??`unknown`)),children:n.agent??`—`}),(0,G.jsx)(`span`,{className:`mono text-fg-dim`,children:n.sessionId?.slice(0,20)}),n.score!=null&&(0,G.jsxs)(`span`,{className:`text-fg-muted mono text-[10px]`,children:[`score `,n.score.toFixed(3)]})]}),(0,G.jsx)(`div`,{className:`mt-0.5 mono text-sm whitespace-pre-wrap line-clamp-3 text-fg-dim`,children:n.snippet??``})]},t)})})}function dt(){let e=m({queryKey:[`agents`],queryFn:g.agents,refetchInterval:1e4}).data?.agents??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(B,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`agents`}),(0,G.jsxs)(`span`,{className:`text-sm text-fg-dim`,children:[e.filter(e=>e.present).length,` installed`]})]}),(0,G.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3 p-5`,children:e.map(e=>(0,G.jsxs)(`div`,{className:`bg-bg-surface border border-bg-border rounded-lg p-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.present?e.instrumented?(0,G.jsx)(Ne,{className:`w-4 h-4 text-ok`}):(0,G.jsx)(ye,{className:`w-4 h-4 text-warn`}):(0,G.jsx)(Pe,{className:`w-4 h-4 text-fg-muted`}),(0,G.jsx)(`div`,{className:w(`font-bold`,j(e.name)),children:e.label})]}),(0,G.jsx)(`div`,{className:`mt-2 text-xs text-fg-dim mono`,children:e.present?e.instrumented?`installed · events captured`:`detected · events TBD`:`not detected`}),e.configPath&&(0,G.jsx)(`div`,{className:`mt-1 text-[11px] text-fg-muted mono break-all`,children:e.configPath}),(0,G.jsxs)(`div`,{className:`mt-3 flex items-center gap-4 text-xs`,children:[(0,G.jsxs)(`span`,{className:`text-fg-dim`,children:[`events: `,(0,G.jsx)(`span`,{className:`mono`,children:e.eventCount})]}),e.lastEventAt&&(0,G.jsxs)(`span`,{className:`text-fg-dim`,children:[`last: `,(0,G.jsx)(`span`,{className:`mono`,children:O(e.lastEventAt)})]})]})]},e.name))})]})}function ft(){let e=m({queryKey:[`permissions`],queryFn:g.permissions});if(e.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});let t=e.data??{};return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(z,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`permissions`})]}),(0,G.jsxs)(`div`,{className:`p-5 space-y-5 max-w-5xl`,children:[(0,G.jsx)(X,{label:`Claude Code`,perms:t.claude}),(0,G.jsx)(X,{label:`Codex`,perms:t.codex}),(0,G.jsx)(X,{label:`Gemini`,perms:t.gemini}),(0,G.jsx)(X,{label:`OpenClaw`,perms:t.openclaw})]})]})}function X({label:e,perms:t}){return t?(0,G.jsxs)(`div`,{className:`bg-bg-surface border border-bg-border rounded-lg p-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,G.jsx)(ze,{className:`w-4 h-4 text-ok`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:e})]}),(0,G.jsx)(`pre`,{className:`mono text-xs text-fg-dim overflow-x-auto whitespace-pre-wrap`,children:JSON.stringify(t,null,2)})]}):(0,G.jsx)(`div`,{className:`bg-bg-surface border border-bg-border rounded-lg p-4`,children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,G.jsx)(Re,{className:`w-4 h-4 text-fg-muted`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:e}),(0,G.jsx)(`span`,{className:`text-xs text-fg-muted`,children:`not installed / no config`})]})})}function pt(){let e=m({queryKey:[`cron`],queryFn:g.cron,refetchInterval:1e4});if(e.isLoading)return(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`});let t=e.data?.jobs??[],n=e.data?.heartbeats??[],r=e.data?.scheduledEvents??[];return(0,G.jsxs)(`div`,{className:`h-full overflow-auto`,children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 border-b border-bg-border flex items-baseline gap-3`,children:[(0,G.jsx)(Fe,{className:`w-5 h-5 text-accent`}),(0,G.jsx)(`h1`,{className:`text-lg font-bold`,children:`scheduled`})]}),(0,G.jsxs)(`section`,{className:`p-5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,G.jsx)(je,{className:`w-4 h-4 text-accent`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:`cron jobs`}),(0,G.jsx)(`span`,{className:`text-xs text-fg-dim`,children:t.length})]}),t.length===0&&(0,G.jsx)(`div`,{className:`text-sm text-fg-dim`,children:`No OpenClaw cron jobs installed.`}),t.length>0&&(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`text-left text-xs uppercase text-fg-muted`,children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`name`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`schedule`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`agent`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`channel`}),(0,G.jsx)(`th`,{className:`py-1`,children:`last run`})]})}),(0,G.jsx)(`tbody`,{children:t.map(e=>(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/30 mono text-xs`,children:[(0,G.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.name??e.id}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.cron??e.schedule??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.agentId??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.channel??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 text-fg-dim`,children:e.lastRunAt?O(e.lastRunAt):`never`})]},e.id))})]})]}),(0,G.jsxs)(`section`,{className:`p-5 border-t border-bg-border`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,G.jsx)(Le,{className:`w-4 h-4 text-accent`}),(0,G.jsx)(`h2`,{className:`font-bold`,children:`heartbeats`}),(0,G.jsx)(`span`,{className:`text-xs text-fg-dim`,children:n.length})]}),n.length===0&&(0,G.jsx)(`div`,{className:`text-sm text-fg-dim`,children:`No heartbeat tasks detected.`}),n.length>0&&(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`text-left text-xs uppercase text-fg-muted`,children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`task`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`agent`}),(0,G.jsx)(`th`,{className:`py-1 pr-4`,children:`last`}),(0,G.jsx)(`th`,{className:`py-1`,children:`file`})]})}),(0,G.jsx)(`tbody`,{children:n.map((e,t)=>(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/30 mono text-xs`,children:[(0,G.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.taskName??e.name??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.agentId??`—`}),(0,G.jsx)(`td`,{className:`py-1.5 pr-4 text-fg-dim`,children:e.lastHeartbeatAt?O(e.lastHeartbeatAt):`—`}),(0,G.jsx)(`td`,{className:`py-1.5 text-fg-dim truncate max-w-md`,children:e.filePath??e.file??``})]},t))})]})]}),(0,G.jsxs)(`section`,{className:`p-5 border-t border-bg-border`,children:[(0,G.jsxs)(`h2`,{className:`font-bold mb-3`,children:[`recent scheduled events `,(0,G.jsx)(`span`,{className:`text-xs font-normal text-fg-dim`,children:r.length})]}),r.length===0&&(0,G.jsx)(`div`,{className:`text-sm text-fg-dim`,children:`No scheduled events in the live buffer.`}),r.slice(0,50).map(e=>(0,G.jsxs)(`div`,{className:`mono text-xs py-1 border-b border-bg-border/20`,children:[(0,G.jsx)(`span`,{className:`text-fg-dim mr-2`,children:O(e.ts)}),(0,G.jsx)(`span`,{className:`text-accent mr-2`,children:e.agent}),(0,G.jsx)(`span`,{className:`mr-2`,children:e.type}),(0,G.jsx)(`span`,{className:`text-fg-dim`,children:e.summary})]},e.id))]})]})}var Z=[{id:`1h`,label:`1h`,hours:1},{id:`24h`,label:`24h`,hours:24},{id:`7d`,label:`7d`,hours:168},{id:`30d`,label:`30d`,hours:720},{id:`all`,label:`all`,hours:null}],mt=[`claude-code`,`codex`,`gemini`];function ht(){let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(`7d`),[i,a]=(0,V.useState)(new Set),[o,s]=(0,V.useState)(100),c=(0,V.useRef)(null);(0,V.useEffect)(()=>{c.current?.focus()},[]);let l=m({queryKey:[`agents`],queryFn:g.agents});(0,V.useMemo)(()=>new Set(mt),[]);let u=S({mutationFn:({q:e,since:t,agents:n,limit:r})=>g.search(e,`cross`,r,{since:t,agents:n})});return(0,G.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`form`,{onSubmit:t=>{t?.preventDefault();let r=e.trim();if(!r)return;let a=Z.find(e=>e.id===n)?.hours??null,s=a==null?void 0:new Date(Date.now()-a*36e5).toISOString(),c=i.size>0?Array.from(i):void 0;u.mutate({q:r,since:s,agents:c,limit:o})},className:`flex flex-wrap items-center gap-3 px-5 py-3 border-b border-bg-border bg-bg-surface`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(L,{className:`w-4 h-4 text-accent`}),(0,G.jsx)(`h1`,{className:`font-bold`,children:`Logs`}),(0,G.jsx)(`span`,{className:`text-xs text-fg-dim`,children:`disk-backed history search`})]}),(0,G.jsxs)(`div`,{className:`relative flex-1 min-w-[240px] max-w-xl`,children:[(0,G.jsx)(R,{className:`w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none`}),(0,G.jsx)(`input`,{ref:c,value:e,onChange:e=>t(e.target.value),placeholder:`search every session file on disk — press enter`,className:`w-full bg-bg-elev border border-bg-border rounded-md pl-9 pr-3 py-1.5 text-sm outline-none focus:border-accent`})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,G.jsx)(`span`,{className:`text-fg-dim`,children:`when:`}),Z.map(e=>(0,G.jsx)(`button`,{type:`button`,onClick:()=>r(e.id),className:w(`px-2 py-1 rounded-md transition mono`,n===e.id?`bg-accent/20 text-accent border border-accent/40`:`border border-bg-border text-fg-dim hover:bg-bg-elev`),children:e.label},e.id))]}),(0,G.jsx)(`button`,{type:`submit`,disabled:!e.trim()||u.isPending,className:`px-4 py-1.5 rounded-md bg-accent/20 text-accent text-xs hover:bg-accent/30 disabled:opacity-40`,children:u.isPending?`searching…`:`search`})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 px-5 py-2 border-b border-bg-border/50 text-xs bg-bg/40`,children:[(0,G.jsx)(`span`,{className:`text-fg-muted`,children:`agents:`}),mt.map(e=>{let t=i.has(e),n=l.data?.agents.find(t=>t.name===e&&t.present);return(0,G.jsx)(`button`,{onClick:()=>{let n=new Set(i);t?n.delete(e):n.add(e),a(n)},className:w(`px-2 py-0.5 rounded-md border transition mono`,t?`border-accent/40 bg-accent/20 ${j(e)}`:`border-bg-border text-fg-dim hover:bg-bg-elev ${n?``:`opacity-50`}`),title:n?`${e} (installed)`:`${e} — not detected on disk`,children:e},e)}),(0,G.jsx)(`span`,{className:`text-fg-muted ml-3`,children:`results cap:`}),(0,G.jsx)(`select`,{value:o,onChange:e=>s(Number(e.target.value)),className:`bg-bg-elev border border-bg-border rounded-md px-2 py-0.5 mono`,children:[50,100,200,500].map(e=>(0,G.jsx)(`option`,{value:e,children:e},e))}),l.data?.agents.some(e=>e.name===`openclaw`&&e.present)&&(0,G.jsx)(`span`,{className:`ml-auto text-warn/80`,children:`OpenClaw + Hermes not scanned yet (SQLite storage — adapter TBD).`})]}),(0,G.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[u.isPending&&(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`searching disk…`}),u.isError&&(0,G.jsx)(`div`,{className:`p-6 text-danger`,children:String(u.error.message)}),u.data&&u.data.hits.length===0&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsxs)(`div`,{children:[`No matches on disk for “`,e.trim(),`”.`]}),(0,G.jsx)(`div`,{className:`text-xs mt-2`,children:`Try a wider time window, drop agent filters, or switch query to something broader.`})]}),u.data&&u.data.hits.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`px-5 py-2 text-xs text-fg-dim bg-bg-surface border-b border-bg-border`,children:[(0,G.jsx)(I,{className:`inline w-3.5 h-3.5 mr-1`}),u.data.hits.length,` hits`,u.data.totalScanned!=null&&u.data.totalScanned!==u.data.hits.length&&(0,G.jsxs)(`span`,{children:[` · `,u.data.totalScanned,` scanned before filters`]}),(0,G.jsxs)(`span`,{children:[` · window: `,Z.find(e=>e.id===n)?.label]}),i.size>0&&(0,G.jsxs)(`span`,{children:[` · agents: `,Array.from(i).join(`, `)]})]}),(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{className:`sticky top-0 bg-bg-surface border-b border-bg-border z-10`,children:(0,G.jsxs)(`tr`,{className:`text-left text-xs uppercase text-fg-muted`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 w-36`,children:`date / time`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-28`,children:`agent`}),(0,G.jsx)(`th`,{className:`px-2 py-2 w-44`,children:`session`}),(0,G.jsx)(`th`,{className:`px-3 py-2`,children:`match`})]})}),(0,G.jsx)(`tbody`,{children:u.data.hits.map((e,t)=>{let n=e.hit??e,r=n.ts;return(0,G.jsxs)(`tr`,{className:`border-b border-bg-border/30 row-hover`,children:[(0,G.jsx)(`td`,{className:`px-4 py-1.5 text-fg-dim mono text-xs align-top whitespace-nowrap`,children:r?Se(r):`—`}),(0,G.jsx)(`td`,{className:w(`px-2 py-1.5 mono text-xs align-top`,j(n.agent)),children:n.agent}),(0,G.jsx)(`td`,{className:`px-2 py-1.5 mono text-xs align-top`,children:n.sessionId?(0,G.jsx)(b,{to:`/sessions/${encodeURIComponent(n.sessionId)}`,className:`hover:text-accent`,title:n.sessionId,children:n.sessionId.slice(0,16)}):(0,G.jsx)(`span`,{className:`text-fg-muted`,children:`—`})}),(0,G.jsx)(`td`,{className:`px-3 py-1.5 mono text-xs align-top whitespace-pre-wrap truncate max-w-3xl`,children:n.line})]},`${n.path}:${n.lineNumber}:${t}`)})})]})]}),!u.data&&!u.isPending&&(0,G.jsxs)(`div`,{className:`p-10 text-center text-fg-dim`,children:[(0,G.jsx)(`div`,{className:`mb-2`,children:`Type a query + enter.`}),(0,G.jsx)(`div`,{className:`text-xs`,children:"This scans the session JSONLs on disk (`~/.claude/projects/`, `~/.codex/sessions/`, `~/.gemini/tmp/`). Unlike the Timeline page, results go all the way back, not just since agentwatch booted."})]})]})]})}var gt=`modulepreload`,_t=function(e){return`/`+e},vt={},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=_t(t,n),t in vt)return;vt[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:gt,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.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)})},yt=(0,V.lazy)(()=>Q(()=>import(`./SessionTokens-BjuXcVM2.js`).then(e=>({default:e.SessionTokensPage})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),bt=(0,V.lazy)(()=>Q(()=>import(`./SessionCompaction-Dx3tbM9N.js`).then(e=>({default:e.SessionCompactionPage})),__vite__mapDeps([11,1,2,3,4,5,6,12,13,7,14,15,10]))),xt=(0,V.lazy)(()=>Q(()=>import(`./SessionGraph-DWP1YyP0.js`).then(e=>({default:e.SessionGraphPage})),__vite__mapDeps([16,1,4,3,5,10]))),St=(0,V.lazy)(()=>Q(()=>import(`./SessionDiffs-CDUkVqua.js`).then(e=>({default:e.SessionDiffsPage})),__vite__mapDeps([17,1,4,3,5,18,10]))),Ct=(0,V.lazy)(()=>Q(()=>import(`./SessionReplay-kz1EhiaI.js`).then(e=>({default:e.SessionReplayPage})),__vite__mapDeps([19,1,4,20,3,5,21,10]))),wt=(0,V.lazy)(()=>Q(()=>import(`./SessionActivity-BUzJpWwc.js`).then(e=>({default:e.SessionActivityPage})),__vite__mapDeps([22,1,2,3,4,5,23,13,6,24,14,9,25,8,10]))),Tt=(0,V.lazy)(()=>Q(()=>import(`./ProjectActivity-BG5hEcJl.js`).then(e=>({default:e.ProjectActivityPage})),__vite__mapDeps([26,1,2,3,4,13,5,24,8,10]))),Et=(0,V.lazy)(()=>Q(()=>import(`./SessionYield-DXF-Xb5T.js`).then(e=>({default:e.SessionYieldPage})),__vite__mapDeps([27,1,4,5,10]))),Dt=(0,V.lazy)(()=>Q(()=>import(`./ProjectYield-vVxXaT6e.js`).then(e=>({default:e.ProjectYieldPage})),__vite__mapDeps([28,1,2,3,4,5,23,13,6,24,14,9,12,7,8,10]))),Ot=(0,V.lazy)(()=>Q(()=>import(`./Trends-wdNqOtnn.js`).then(e=>({default:e.TrendsPage})),__vite__mapDeps([29,1,2,3,30,23,13,6,24,14,9,12,7,25,15,8,10]))),kt=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.SettingsShell})),__vite__mapDeps([31,1,4,20,3,32]))),At=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.BudgetsSettings})),__vite__mapDeps([31,1,4,20,3,32]))),jt=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.AnomalySettings})),__vite__mapDeps([31,1,4,20,3,32]))),Mt=(0,V.lazy)(()=>Q(()=>import(`./Settings-CXCDYvsc.js`).then(e=>({default:e.TriggersSettings})),__vite__mapDeps([31,1,4,20,3,32]))),Nt=new ke({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:2e3}}});function $(e){return(0,G.jsx)(V.Suspense,{fallback:(0,G.jsx)(`div`,{className:`p-6 text-fg-dim`,children:`loading…`}),children:e})}Ke.createRoot(document.getElementById(`root`)).render((0,G.jsx)(V.StrictMode,{children:(0,G.jsx)(c,{client:Nt,children:(0,G.jsx)(me,{children:(0,G.jsx)(pe,{children:(0,G.jsxs)(x,{element:(0,G.jsx)(Ze,{}),children:[(0,G.jsx)(x,{index:!0,element:(0,G.jsx)(et,{})}),(0,G.jsx)(x,{path:`projects`,element:(0,G.jsx)(rt,{})}),(0,G.jsx)(x,{path:`projects/:name`,element:(0,G.jsx)(it,{})}),(0,G.jsx)(x,{path:`sessions/:id`,element:(0,G.jsx)(at,{})}),(0,G.jsx)(x,{path:`sessions/:id/tokens`,element:$((0,G.jsx)(yt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/compaction`,element:$((0,G.jsx)(bt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/graph`,element:$((0,G.jsx)(xt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/diffs`,element:$((0,G.jsx)(St,{}))}),(0,G.jsx)(x,{path:`sessions/:id/replay`,element:$((0,G.jsx)(Ct,{}))}),(0,G.jsx)(x,{path:`sessions/:id/activity`,element:$((0,G.jsx)(wt,{}))}),(0,G.jsx)(x,{path:`sessions/:id/yield`,element:$((0,G.jsx)(Et,{}))}),(0,G.jsx)(x,{path:`projects/:name/activity`,element:$((0,G.jsx)(Tt,{}))}),(0,G.jsx)(x,{path:`projects/:name/yield`,element:$((0,G.jsx)(Dt,{}))}),(0,G.jsx)(x,{path:`events/:id`,element:(0,G.jsx)(st,{})}),(0,G.jsx)(x,{path:`search`,element:(0,G.jsx)(ct,{})}),(0,G.jsx)(x,{path:`logs`,element:(0,G.jsx)(ht,{})}),(0,G.jsx)(x,{path:`agents`,element:(0,G.jsx)(dt,{})}),(0,G.jsx)(x,{path:`permissions`,element:(0,G.jsx)(ft,{})}),(0,G.jsx)(x,{path:`cron`,element:(0,G.jsx)(pt,{})}),(0,G.jsx)(x,{path:`trends`,element:$((0,G.jsx)(Ot,{}))}),(0,G.jsxs)(x,{path:`settings`,element:$((0,G.jsx)(kt,{})),children:[(0,G.jsx)(x,{index:!0,element:(0,G.jsx)(de,{to:`budgets`,replace:!0})}),(0,G.jsx)(x,{path:`budgets`,element:$((0,G.jsx)(At,{}))}),(0,G.jsx)(x,{path:`anomaly`,element:$((0,G.jsx)(jt,{}))}),(0,G.jsx)(x,{path:`triggers`,element:$((0,G.jsx)(Mt,{}))})]}),(0,G.jsx)(x,{path:`*`,element:(0,G.jsx)(de,{to:`/`,replace:!0})})]})})})})}));
@@ -0,0 +1 @@
1
+ *,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.left-3{left:.75rem}.top-0{top:0}.top-1\/2{top:50%}.z-10{z-index:10}.z-50{z-index:50}.m-5{margin:1.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-96{max-height:24rem}.max-h-\[60vh\]{max-height:60vh}.min-h-\[180px\]{min-height:180px}.min-h-\[300px\]{min-height:300px}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-60{width:15rem}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[240px\]{min-width:240px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-accent\/40{border-color:#58a6ff66}.border-bg-border{--tw-border-opacity:1;border-color:rgb(43 49 57/var(--tw-border-opacity,1))}.border-bg-border\/20{border-color:#2b313933}.border-bg-border\/30{border-color:#2b31394d}.border-bg-border\/40{border-color:#2b313966}.border-bg-border\/50{border-color:#2b313980}.border-danger\/30{border-color:#f851494d}.border-danger\/40{border-color:#f8514966}.border-warn\/30{border-color:#d299224d}.border-warn\/40{border-color:#d2992266}.bg-accent\/10{background-color:#58a6ff1a}.bg-accent\/20{background-color:#58a6ff33}.bg-bg{--tw-bg-opacity:1;background-color:rgb(11 13 16/var(--tw-bg-opacity,1))}.bg-bg-elev{--tw-bg-opacity:1;background-color:rgb(26 31 38/var(--tw-bg-opacity,1))}.bg-bg-surface{--tw-bg-opacity:1;background-color:rgb(18 21 26/var(--tw-bg-opacity,1))}.bg-bg\/30{background-color:#0b0d104d}.bg-bg\/40{background-color:#0b0d1066}.bg-black\/60{background-color:#0009}.bg-danger\/10{background-color:#f851491a}.bg-danger\/20{background-color:#f8514933}.bg-fg\/5{background-color:#e6edf30d}.bg-ok{--tw-bg-opacity:1;background-color:rgb(63 185 80/var(--tw-bg-opacity,1))}.bg-ok\/10{background-color:#3fb9501a}.bg-transparent{background-color:#0000}.bg-warn{--tw-bg-opacity:1;background-color:rgb(210 153 34/var(--tw-bg-opacity,1))}.bg-warn\/10{background-color:#d299221a}.bg-warn\/20{background-color:#d2992233}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-9{padding-left:2.25rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-\[10vh\]{padding-top:10vh}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.text-accent{--tw-text-opacity:1;color:rgb(88 166 255/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-danger{--tw-text-opacity:1;color:rgb(248 81 73/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-fg{--tw-text-opacity:1;color:rgb(230 237 243/var(--tw-text-opacity,1))}.text-fg-dim{--tw-text-opacity:1;color:rgb(125 133 144/var(--tw-text-opacity,1))}.text-fg-muted{--tw-text-opacity:1;color:rgb(72 79 88/var(--tw-text-opacity,1))}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.text-ok{--tw-text-opacity:1;color:rgb(63 185 80/var(--tw-text-opacity,1))}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.text-warn{--tw-text-opacity:1;color:rgb(210 153 34/var(--tw-text-opacity,1))}.text-warn\/80{color:#d29922cc}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.shadow-2xl{--tw-shadow:0 25px 50px -12px #00000040;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000), var(--tw-ring-shadow,0 0 #0000), var(--tw-shadow)}.outline-none{outline-offset:2px;outline:2px solid #0000}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}html,body,#root{height:100%}body{font-feature-settings:"ss01", "cv11"}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#2b3139;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#484f58}.mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.row-hover:hover{background:#12151a}.hover\:border-accent\/40:hover{border-color:#58a6ff66}.hover\:bg-accent\/30:hover{background-color:#58a6ff4d}.hover\:bg-bg:hover{--tw-bg-opacity:1;background-color:rgb(11 13 16/var(--tw-bg-opacity,1))}.hover\:bg-bg-elev:hover{--tw-bg-opacity:1;background-color:rgb(26 31 38/var(--tw-bg-opacity,1))}.hover\:bg-bg-surface\/40:hover{background-color:#12151a66}.hover\:text-accent:hover{--tw-text-opacity:1;color:rgb(88 166 255/var(--tw-text-opacity,1))}.hover\:text-fg:hover{--tw-text-opacity:1;color:rgb(230 237 243/var(--tw-text-opacity,1))}.focus\:border-accent:focus{--tw-border-opacity:1;border-color:rgb(88 166 255/var(--tw-border-opacity,1))}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.focus\:ring-accent\/50:focus{--tw-ring-color:#58a6ff80}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (min-width:1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-Bjwrp8ZV.js";var t=e(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{J as e,Ln as t,X as n,Y as r}from"./CategoricalChart-DEGrE0Qv.js";var i=e=>null;i.displayName=`Cell`;var a=(e,r,i)=>{var a=t();return(t,o)=>s=>{e?.(t,o,s),a(n({activeIndex:String(o),activeDataKey:r,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}},o=n=>{var r=t();return(t,i)=>a=>{n?.(t,i,a),r(e())}},s=(e,n,i)=>{var a=t();return(t,o)=>s=>{e?.(t,o,s),a(r({activeIndex:String(o),activeDataKey:n,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}};export{i,a as n,o as r,s as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-Bjwrp8ZV.js";var t=e(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),n=e(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),r=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{n,t as r,r as t};
@@ -0,0 +1 @@
1
+ import{E as e,P as t,S as n,T as r,f as i,j as a,k as o,l as s,o as c,u as l,v as u}from"./createLucideIcon-Bjwrp8ZV.js";var d=class extends s{#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||f(),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=l({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){this.state=(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),i.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function f(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var p=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&u(t.mutationKey)!==u(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??f();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){i.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},m=t(a(),1);function h(t,r){let a=c(r),[o]=m.useState(()=>new p(a,t));m.useEffect(()=>{o.setOptions(t)},[o,t]);let s=m.useSyncExternalStore(m.useCallback(e=>o.subscribe(i.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),l=m.useCallback((e,t)=>{o.mutate(e,t).catch(n)},[o]);if(s.error&&e(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}export{d as n,h as t};
@@ -9,17 +9,18 @@
9
9
  html, body, #root { height: 100%; margin: 0; }
10
10
  body { background: #0b0d10; color: #e6edf3; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; }
11
11
  </style>
12
- <script type="module" crossorigin src="/assets/index-Bu9taSiK.js"></script>
13
- <link rel="modulepreload" crossorigin href="/assets/clsx-DsHpp3Uj.js">
14
- <link rel="modulepreload" crossorigin href="/assets/dist-w_zu0rIf.js">
15
- <link rel="modulepreload" crossorigin href="/assets/useMutation-BvFLVjYz.js">
16
- <link rel="modulepreload" crossorigin href="/assets/arrow-left-Bg6VjX8-.js">
17
- <link rel="modulepreload" crossorigin href="/assets/chart-column-Brz7pC96.js">
18
- <link rel="modulepreload" crossorigin href="/assets/file-pen-DWwu4Q-r.js">
19
- <link rel="modulepreload" crossorigin href="/assets/play-B0mJPrwl.js">
20
- <link rel="modulepreload" crossorigin href="/assets/triangle-alert-Bx2lGvGN.js">
21
- <link rel="modulepreload" crossorigin href="/assets/format-zw6IoTwZ.js">
22
- <link rel="stylesheet" crossorigin href="/assets/index-CJPUO3dh.css">
12
+ <script type="module" crossorigin src="/assets/index-CJArQihV.js"></script>
13
+ <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-Bjwrp8ZV.js">
14
+ <link rel="modulepreload" crossorigin href="/assets/dist-BYqqB4pa.js">
15
+ <link rel="modulepreload" crossorigin href="/assets/useMutation-CfQYV-vU.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/clsx-DnEFlO87.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/arrow-left-B-iQ08P0.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/chart-column-BwF4X7mz.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/triangle-alert-BhvAiLmv.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/file-pen-CHXP3wF7.js">
21
+ <link rel="modulepreload" crossorigin href="/assets/play-ONoP4Jfr.js">
22
+ <link rel="modulepreload" crossorigin href="/assets/format-zsCsqELF.js">
23
+ <link rel="stylesheet" crossorigin href="/assets/index-CTAomrBX.css">
23
24
  </head>
24
25
  <body>
25
26
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misha_misha/agentwatch",
3
- "version": "0.0.4",
3
+ "version": "0.1.1",
4
4
  "description": "Local-only observability + control plane for every AI coding agent on your machine. TUI live tail + browser dashboard on localhost. Unified timeline across Claude Code, Codex, Gemini CLI, Cursor, Hermes, OpenClaw — token + cost accounting, compaction + anomaly detection, SVG call graphs, diff attribution, agent-aware replay, MCP server mode, OpenTelemetry exporter. No cloud, no telemetry, no sign-in.",
5
5
  "type": "module",
6
6
  "author": "Misha Nefedov",