@sleep2agi/agent-network-dashboard 0.4.6-preview.73 → 0.4.6-preview.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +4 -4
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.html +1 -1
- package/.next/server/app/admin.rsc +1 -1
- package/.next/server/app/admin.segments/_full.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs.html +1 -1
- package/.next/server/app/logs.rsc +1 -1
- package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages.html +1 -1
- package/.next/server/app/messages.rsc +1 -1
- package/.next/server/app/messages.segments/_full.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node.html +1 -1
- package/.next/server/app/node.rsc +1 -1
- package/.next/server/app/node.segments/_full.segment.rsc +1 -1
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +1 -1
- package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes.html +1 -1
- package/.next/server/app/nodes.rsc +1 -1
- package/.next/server/app/nodes.segments/_full.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +1 -1
- package/.next/server/app/server-logs.rsc +1 -1
- package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/settings/networks.html +1 -1
- package/.next/server/app/settings/networks.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +1 -1
- package/.next/server/app/settings/tokens.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +2 -2
- package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks.html +1 -1
- package/.next/server/app/tasks.rsc +1 -1
- package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{00gcd-k80jt4f.js → 0-rg_sn64~6ct.js} +1 -1
- package/.next/static/chunks/{0nnnm9sje6ir3.js → 0__-l50jc2og..js} +1 -1
- package/.next/static/chunks/{14ptjec_46..-.js → 0lk_jpbgmnf0d.js} +1 -1
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/components/TopoGraph.tsx +10 -4
- package/package.json +1 -1
- package/scripts/topo-filter-pill-mobile-test.mjs +90 -0
- /package/.next/static/{gCDpUefjhcoc2RgtM8t2V → Xd4MkQH8ezFJVT3r4zsAA}/_buildManifest.js +0 -0
- /package/.next/static/{gCDpUefjhcoc2RgtM8t2V → Xd4MkQH8ezFJVT3r4zsAA}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{gCDpUefjhcoc2RgtM8t2V → Xd4MkQH8ezFJVT3r4zsAA}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,136,(e,t,r)=>{},7454,(e,t,r)=>{var a=e.i(20888);e.r(136);var s=e.r(23910),n=s&&"object"==typeof s&&"default"in s?s:{default:s},l=void 0!==a.default&&a.default.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,s=t.optimizeForSpeed,n=void 0===s?l:s;d(o(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",d("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(d(o(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return l||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var a=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,a))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var r="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(a){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var a=this._tags[e];d(a,"old rule at index `"+e+"` not found"),a.textContent=t}return e},r.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];d(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&d(o(t),"makeStyleTag accepts only strings as second parameter");var a=document.createElement("style");this._nonce&&a.setAttribute("nonce",this._nonce),a.type="text/css",a.setAttribute("data-"+e,""),t&&a.appendChild(document.createTextNode(t));var s=document.head||document.getElementsByTagName("head")[0];return r?s.insertBefore(a,r):s.appendChild(a),a},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(e.prototype,t),e}();function d(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},h={};function u(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return h[a]||(h[a]="jsx-"+c(e+"-"+r)),h[a]}function x(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return h[r]||(h[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[r]}var m=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,a=void 0===r?null:r,s=t.optimizeForSpeed,n=void 0!==s&&s;this._sheet=a||new i({name:"styled-jsx",optimizeForSpeed:n}),this._sheet.inject(),a&&"boolean"==typeof n&&(this._sheet.setOptimizeForSpeed(n),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),a=r.styleId,s=r.rules;if(a in this._instancesCounts){this._instancesCounts[a]+=1;return}var n=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[a]=n,this._instancesCounts[a]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var a=this._fromServer&&this._fromServer[r];a?(a.parentNode.removeChild(a),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],a=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:a}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,a=e.id;if(r){var s=u(a,r);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return x(s,e)}):[x(s,t)]}}return{styleId:u(a),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),f=s.createContext(null);function p(){return new m}function g(){return s.useContext(f)}f.displayName="StyleSheetContext";var y=n.default.useInsertionEffect||n.default.useLayoutEffect,b="u">typeof window?p():void 0;function v(e){var t=b||g();return t&&("u"<typeof window?t.add(e):y(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return u(e[0],e[1])}).join(" ")},r.StyleRegistry=function(e){var t=e.registry,r=e.children,a=s.useContext(f),l=s.useState(function(){return a||t||p()})[0];return n.default.createElement(f.Provider,{value:l},r)},r.createStyleRegistry=p,r.style=v,r.useStyleRegistry=g},6694,(e,t,r)=>{t.exports=e.r(7454).style},18722,e=>{"use strict";var t=e.i(20888),r=e.i(22381),a=e.i(23910),s=e.i(56839),n=e.i(3479);function l({online:e,working:t,total:a,version:s,uptime:n}){let i=a>0?Math.round(e/a*100):0,d=0===a;return(0,r.jsxs)("div",{className:d?"mb-4":"mb-8",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Agent Network"}),(0,r.jsxs)("span",{className:"text-xs text-gray-500",children:["CommHub ",s," · ",n]})]}),d?(0,r.jsxs)("div",{className:"anet-stat-strip flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-gray-500 border-t border-b border-[#2a2a4a] py-2",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full bg-gray-600"}),(0,r.jsx)("span",{className:"text-gray-300 tabular-nums",children:"0"})," online"]}),(0,r.jsx)("span",{className:"text-gray-700",children:"·"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full bg-gray-600"}),(0,r.jsx)("span",{className:"text-gray-300 tabular-nums",children:"0"})," working"]}),(0,r.jsx)("span",{className:"text-gray-700",children:"·"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full bg-gray-600"}),(0,r.jsx)("span",{className:"text-gray-300 tabular-nums",children:"0"})," registered"]})]}):(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,r.jsx)(o,{value:e,label:"Online",sub:`${i}% of fleet`,color:"text-green-400",accent:"from-green-500/20 to-green-500/0",border:"border-green-500/15"}),(0,r.jsx)(o,{value:t,label:"Working",sub:e>0?`${Math.round(t/e*100)}% utilization`:"--",color:"text-cyan-400",accent:"from-cyan-500/20 to-cyan-500/0",border:"border-cyan-500/15"}),(0,r.jsx)(o,{value:a-e,label:"Offline",sub:a-e==0?"All systems go":`${a-e} disconnected`,color:"text-gray-400",accent:"from-gray-500/10 to-gray-500/0",border:"border-gray-500/15"}),(0,r.jsx)(o,{value:a,label:"Total",sub:"Registered nodes",color:"text-white",accent:"from-blue-500/15 to-blue-500/0",border:"border-blue-500/15"})]})]})}function o({value:e,label:t,sub:a,color:s,accent:n,border:l}){let i=s.replace("text-","").split("-")[0];return(0,r.jsxs)("div",{"data-anet-stat-card":i,className:`anet-stat-card relative overflow-hidden rounded-xl border ${l} bg-[#111128] px-4 py-3 transition-all`,children:[(0,r.jsx)("div",{className:`absolute inset-0 bg-gradient-to-br ${n} pointer-events-none`}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:`text-3xl font-bold ${s} tabular-nums leading-tight`,children:e}),(0,r.jsx)("div",{className:"text-sm text-gray-300 mt-0.5",children:t}),(0,r.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:a})]})]})}function i(){let[e,t]=(0,a.useState)(""),[s,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)(""),i=async()=>{if(e.trim()){n(!0),o("");try{let r=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}),a=await r.json();a.ok?(o(`Broadcast sent to ${a.recipients} node(s)`),t("")):o(`Failed: ${a.error||"Send error"}`)}catch(e){o(`Failed: ${e instanceof Error?e.message:"Send error"}`)}n(!1),setTimeout(()=>o(""),5e3)}};return(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{type:"text",value:e,onChange:e=>t(e.target.value),onKeyDown:e=>"Enter"===e.key&&i(),placeholder:"Broadcast message to all online agents...",maxLength:500,"aria-label":"Broadcast message",className:"flex-1 bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-2.5 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:ring-1 focus:ring-blue-500/20 focus:outline-none transition-colors"}),(0,r.jsx)("button",{onClick:i,disabled:s||!e.trim(),"aria-label":"Send broadcast",className:"flex items-center gap-2 px-5 py-2.5 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-all font-medium cursor-pointer disabled:cursor-not-allowed",children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,r.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,r.jsx)("span",{children:"Sending…"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M3 11v3a1 1 0 0 0 1 1h2l3.29 3.29a1 1 0 0 0 1.71-.71V7.42a1 1 0 0 0-1.71-.71L6 10H4a1 1 0 0 0-1 1Z"}),(0,r.jsx)("path",{d:"M16 8a5 5 0 0 1 0 6",opacity:"0.7"}),(0,r.jsx)("path",{d:"M19 5a9 9 0 0 1 0 12",opacity:"0.45"})]}),(0,r.jsx)("span",{children:"Broadcast"})]})})]}),e.length>0&&(0,r.jsxs)("div",{className:"text-right text-xs text-gray-600 mt-1 tabular-nums",children:[e.length,"/500"]}),l&&(0,r.jsx)("div",{className:`mt-3 text-sm text-center anet-fade-in ${l.startsWith("Failed")?"text-red-400":"text-green-400/80"}`,children:l})]})}var d=e.i(46228),c=e.i(43058),h=e.i(59276),u=e.i(59746);function x({alias:e,onClose:t}){let[s,n]=(0,a.useState)({x:0,y:0}),[l,o]=(0,a.useState)({w:380,h:520}),i=(0,a.useRef)({active:!1,startX:0,startY:0,baseX:0,baseY:0}),m=(0,a.useRef)({active:!1,startX:0,startY:0,baseW:0,baseH:0}),{sessions:f}=(0,h.useSessions)(),p=(0,a.useMemo)(()=>f.find(t=>t.alias===e),[f,e]),g=p&&"offline"!==p.status?null:(0,u.relativeAgo)(p?.last_seen_at),y=(0,a.useCallback)((e,t,r,a)=>({x:Math.min(Math.max(16,e),Math.max(16,window.innerWidth-r-16)),y:Math.min(Math.max(16,t),Math.max(16,window.innerHeight-a-16))}),[]);(0,a.useEffect)(()=>{let e=()=>{let e=window.innerWidth,t=window.innerHeight,r=Math.min(380,e-32),a=Math.min(520,t-96);o({w:r,h:a});let s=e<640;n(y(s?16:e-r-24,s?t-a-16:96,r,a))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[y]),(0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let b=e=>{if(i.current.active){i.current.active=!1;try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}}},v=e=>{if(m.current.active){m.current.active=!1,e.stopPropagation();try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}}};return(0,r.jsxs)("div",{className:"fixed z-50 flex flex-col overflow-hidden rounded-xl border border-[var(--border)] bg-[var(--bg)] shadow-2xl shadow-black/60 anet-fade-in",style:{left:s.x,top:s.y,width:l.w,height:l.h},role:"dialog","aria-label":`Chat with ${e}`,children:[(0,r.jsxs)("div",{onPointerDown:e=>{0===e.button&&(e.currentTarget.setPointerCapture?.(e.pointerId),i.current={active:!0,startX:e.clientX,startY:e.clientY,baseX:s.x,baseY:s.y})},onPointerMove:e=>{let t=i.current;t.active&&n(y(t.baseX+(e.clientX-t.startX),t.baseY+(e.clientY-t.startY),l.w,l.h))},onPointerUp:b,onPointerCancel:b,className:"flex items-center justify-between px-3 py-2.5 border-b border-[var(--border)] bg-[var(--bg-secondary)] rounded-t-xl cursor-grab active:cursor-grabbing select-none touch-none",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,r.jsx)(d.AliasAvatar,{alias:e,size:28}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-[var(--fg)] truncate",children:e}),p?.project_dir?(0,r.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] truncate font-mono",title:p.project_dir,"data-popover-cwd":!0,children:["cwd: ",p.project_dir]}):null,g?(0,r.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] truncate","data-popover-lastseen":!0,children:["last seen: ",g]}):null,p?.project_dir||g?null:(0,r.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)]",children:"Drag to move · Esc to close"})]})]}),(0,r.jsx)("button",{onClick:t,onPointerDown:e=>e.stopPropagation(),"aria-label":"Close chat",className:"text-[var(--fg-muted)] hover:text-[var(--fg)] p-1.5 rounded-lg hover:bg-[var(--bg-elevated)] shrink-0",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex-1 min-h-0",children:(0,r.jsx)(c.TaskChatPanel,{alias:e,onClose:t,inline:!0})}),(0,r.jsx)("div",{onPointerDown:e=>{0===e.button&&(e.stopPropagation(),e.currentTarget.setPointerCapture?.(e.pointerId),m.current={active:!0,startX:e.clientX,startY:e.clientY,baseW:l.w,baseH:l.h})},onPointerMove:e=>{let t=m.current;if(!t.active)return;e.stopPropagation();let r=Math.max(300,window.innerWidth-s.x-16),a=Math.max(320,window.innerHeight-s.y-16);o({w:Math.min(r,Math.max(300,t.baseW+(e.clientX-t.startX))),h:Math.min(a,Math.max(320,t.baseH+(e.clientY-t.startY)))})},onPointerUp:v,onPointerCancel:v,"aria-label":"Resize chat",className:"absolute bottom-0 right-0 w-5 h-5 cursor-nwse-resize touch-none z-10",style:{touchAction:"none"},children:(0,r.jsx)("svg",{className:"absolute bottom-0.5 right-0.5 w-3 h-3 text-[var(--fg-dim)]",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M11 5L5 11M11 9L9 11"})})})]})}let m={id:"unknown",label:"Unknown vendor",mono:{bg:"hsl(220 10% 26%)",ring:"hsl(220 10% 46%)",text:"hsl(220 14% 82%)"},initial:"?",logo:null},f=[{test:e=>e.startsWith("intern"),vendor:{id:"intern",label:"书生 · 上海 AI 实验室",mono:{bg:"hsl(28 38% 24%)",ring:"hsl(32 45% 52%)",text:"hsl(34 60% 82%)"},initial:"书",logo:"/intern_avatar.png"}},{test:e=>e.startsWith("minimax"),vendor:{id:"minimax",label:"MiniMax",mono:{bg:"hsl(18 50% 26%)",ring:"hsl(18 65% 52%)",text:"hsl(20 80% 82%)"},initial:"M",logo:null}},{test:e=>e.startsWith("claude"),vendor:{id:"anthropic",label:"Anthropic",mono:{bg:"hsl(16 32% 26%)",ring:"hsl(16 48% 54%)",text:"hsl(18 60% 84%)"},initial:"A",logo:null}},{test:e=>e.startsWith("gpt")||e.startsWith("codex")||e.startsWith("o1")||e.startsWith("o3")||e.startsWith("o4"),vendor:{id:"openai",label:"OpenAI",mono:{bg:"hsl(165 26% 22%)",ring:"hsl(165 40% 44%)",text:"hsl(165 45% 80%)"},initial:"O",logo:null}}];function p(e){if(!e)return m;let t=e.toLowerCase();for(let e of f)if(e.test(t))return e.vendor;return m}let g={"claude-code-cli":{label:"Claude Code CLI",iconPath:"M4 5h16v14H4z M7 9l3 3-3 3 M13 15h4",color:"#a78bfa"},"codex-sdk":{label:"Codex SDK",iconPath:"M9 7l-5 5 5 5 M15 7l5 5-5 5",color:"#38bdf8"},"claude-agent-sdk":{label:"Claude Agent SDK",iconPath:"M4 7h16v10H4z M8 11h8 M8 14h5",color:"#34d399"},"http-api":{label:"HTTP API",iconPath:"M7 18a4 4 0 010-8 5 5 0 019.6-1.3A3.5 3.5 0 0118 18z",color:"#fbbf24"}};function y(e){return e?g[e]??null:null}function b(e,t,r,a=0){let s=t<=2?Math.PI:1.78*Math.PI,n=-Math.PI/2-s/2,l=t<=1?-Math.PI/2:n+s*e/(t-1)+a;return{x:500+r*Math.cos(l),y:330+r*Math.sin(l)}}function v(e,t,r=0){let a=(e.x+t.x)/2,s=(e.y+t.y)/2,n=t.x-e.x,l=t.y-e.y,o=Math.hypot(n,l)||1,i={x:a+-l/o*r,y:s+n/o*r};return`M${e.x},${e.y} Q${i.x},${i.y} ${t.x},${t.y}`}function j(e,t){return e.length>t?`${e.slice(0,t-1)}...`:e}function w({sessions:e}){let t=(0,a.useRef)(Date.now()),[s,n]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{t.current=Date.now()},[e]),(0,a.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]);let l=Math.max(0,Math.floor((s-t.current)/1e3)),o=l>10;return(0,r.jsxs)("span",{className:o?"hidden sm:inline px-2.5 py-1 rounded-md bg-amber-500/10 text-amber-300 border border-amber-500/20 font-mono":"hidden sm:inline px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20 font-mono",title:o?`Last sync ${l}s ago — SWR refresh may be lagging`:`Live data \xb7 refreshes every 5s \xb7 last sync ${l}s ago`,"data-freshness-chip":!0,children:["live · ",l,"s"]})}function k(e,t,r){return t?"working"===e.status?{label:"working",primary:r?"#059669":"#22c55e",halo:r?"#d1fae5":"#14532d",text:r?"#065f46":"#dcfce7"}:"idle"===e.status?{label:"idle",primary:r?"#0d9488":"#2dd4bf",halo:r?"#ccfbf1":"#134e4a",text:r?"#115e59":"#ccfbf1"}:{label:e.status||"online",primary:r?"#0284c7":"#38bdf8",halo:r?"#e0f2fe":"#0c4a6e",text:r?"#0c4a6e":"#e0f2fe"}:{label:"offline",primary:r?"#94a3b8":"#6b7280",halo:r?"#e2e8f0":"#111827",text:r?"#475569":"#9ca3af"}}let N={panelStops:["#0b1220","#080814","#101018"],radarStops:[{color:"#22d3ee",opacity:.18},{color:"#22c55e",opacity:.045},{color:"#020617",opacity:0}],arrowFill:"#67e8f9",ringStroke:"#164e63",spokeStroke:{active:"#22d3ee",idle:"#155e75"},flowEdge:"#67e8f9",flowPath:"#e0f2fe",flowParticle:"#fef08a",nodeFill:{online:"#020617",offline:"#080814"},labelBox:{fill:"#020617",stroke:"#1f2937"},legendBox:{fill:"#020617",stroke:"#1f2937"},legendText:"#94a3b8",legendHeadline:"#e5e7eb",legendAccent:"#67e8f9",containerBg:"#080814",containerBorder:"#2a2a4a",topRailGradient:"from-transparent via-cyan-400/70 to-transparent"},S={panelStops:["#f8fafc","#ffffff","#f1f5f9"],radarStops:[{color:"#10b981",opacity:.06},{color:"#3b82f6",opacity:.03},{color:"#ffffff",opacity:0}],arrowFill:"#10b981",ringStroke:"#cbd5e1",spokeStroke:{active:"#10b981",idle:"#cbd5e1"},flowEdge:"#10b981",flowPath:"#475569",flowParticle:"#f59e0b",nodeFill:{online:"#ffffff",offline:"#f8fafc"},labelBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendText:"#475569",legendHeadline:"#0f172a",legendAccent:"#0d9488",containerBg:"#ffffff",containerBorder:"#e3e6eb",topRailGradient:"from-transparent via-emerald-500/40 to-transparent"};function _(e,t){let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];)r++;return e.slice(0,r)}function M(e){let t=e.length,r=e.map((e,t)=>t),a=e=>{for(;r[e]!==e;)r[e]=r[r[e]],e=r[e];return e},s=(e,t)=>{let s=a(e),n=a(t);s!==n&&(r[s]=n)},n={};for(let t of(e.forEach((e,t)=>{let r=e.project_dir?.trim();r&&(n[r]||=[]).push(t)}),Object.values(n)))for(let e=1;e<t.length;e++)s(t[0],t[e]);let l=e.map((e,t)=>t).sort((t,r)=>e[t].alias.localeCompare(e[r].alias));for(let t=0;t+1<l.length;t++)_(e[l[t]].alias,e[l[t+1]].alias).length>=2&&s(l[t],l[t+1]);let o={};for(let e=0;e<t;e++)(o[a(e)]||=[]).push(e);let i={};for(let t of Object.values(o)){let r;if(1===t.length)r=e[t[0]].alias;else{let a=new Set(t.map(t=>e[t].project_dir?.trim()).filter(Boolean));if(1===a.size){let e=[...a][0];r=e.split("/").filter(Boolean).pop()||e}else(r=t.map(t=>e[t].alias).reduce((e,t)=>_(e,t))).length<2&&(r=e[t[0]].alias)}for(let a of t)i[e[a].alias]=r}return i}function C(e,t){let r=new Map;return e.forEach(e=>{if(!t[e.from_alias]||!t[e.to_alias]||e.from_alias===e.to_alias)return;let a=`${e.from_alias}->${e.to_alias}`,s=r.get(a),n=e.created_at||"",l=s?n>s.last_at?n:s.last_at:n;r.set(a,{key:a,from:e.from_alias,to:e.to_alias,count:(s?.count||0)+1,content:s?.content||e.content,last_at:l})}),[...r.values()].slice(0,18)}function $({sessions:e,sseSessions:t,renameSignal:s}){let n,l,o,i,c="light"===function(){let[e,t]=(0,a.useState)("dark");return(0,a.useEffect)(()=>{let e=()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber";t("light"===e||"mint"===e?"light":"dark")};e();let r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>r.disconnect()},[]),e}(),h=function(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!window.matchMedia)return;let e=window.matchMedia("(prefers-reduced-motion: reduce)");t(e.matches);let r=e=>t(e.matches);return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[]),e}(),m=c?S:N,f="intern"===function(){let[e,t]=(0,a.useState)(null);return(0,a.useEffect)(()=>{try{let e=new URL(window.location.href).searchParams.get("brand");null!==e?""===e||"none"===e?(localStorage.removeItem("anet-brand"),t(null)):(localStorage.setItem("anet-brand",e),t(e)):t(localStorage.getItem("anet-brand"))}catch{}},[]),e}(),[g,_]=(0,a.useState)([]),[z,E]=(0,a.useState)("ring");(0,a.useEffect)(()=>{try{let e=localStorage.getItem("anet-topo-layout");("grid"===e||"ring"===e)&&E(e)}catch{}},[]);let P=()=>E(e=>{let t="ring"===e?"grid":"ring";try{localStorage.setItem("anet-topo-layout",t)}catch{}return t}),[T,A]=(0,a.useState)(.84);(0,a.useEffect)(()=>{try{let e=parseFloat(localStorage.getItem("anet-topo-nodescale")||"");(.7===e||.84===e||1===e)&&A(e)}catch{}},[]),(0,a.useEffect)(()=>{let e=async()=>{try{let e=await fetch("/api/hub/messages?limit=50");if(401===e.status)return void window.location.assign("/login");let t=await e.json();_(t.messages||[])}catch{}};e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let{onlineNodes:L,offlineNodes:R,nodePositions:I,flowLinks:F,activeAliases:B,groupKeys:W,groupBoxes:O,gridContentBottom:D}=(0,a.useMemo)(()=>{let r=e=>(e.network_id?t[`${e.network_id}:${e.alias}`]:void 0)??t[e.alias],a=(e,t)=>e.alias.localeCompare(t.alias),s=Date.now(),n=e.filter(e=>"offline"!==e.status||r(e)).sort(a),l=e.filter(e=>"offline"===e.status&&!r(e)&&!(e=>{if("offline"!==e.status||r(e)||!e.last_seen_at)return!1;let t=(0,u.parseHubTime)(e.last_seen_at);return null!==t&&s-t>36e5})(e)).sort(a),o={};if("grid"===z){let e=[...n,...l],t=M(e),a=Math.max(1,Math.ceil(Math.sqrt(e.length))),s=700/a,i=Math.round(26*T),d=[];for(let r of e){let e=t[r.alias],a=d[d.length-1];a&&a.key===e?a.members.push(r):d.push({key:e,members:[r]})}let c=[],h=0,u=0;for(;u<d.length;)if(d[u].members.length>=2)c.push({members:d[u].members,startRow:h,centred:!1,isGroup:!0}),h+=Math.ceil(d[u].members.length/a),u++;else{let e=[];for(;u<d.length&&d[u].members.length<2;)e.push(d[u].members[0]),u++;c.push({members:e,startRow:h,centred:!0,isGroup:!1}),h+=Math.ceil(e.length/a)}let x=Math.max(1,h),m=i+20,f=Math.max(2*i+22,m+12,i+(T<.8?12:14)+m+3,Math.min(100,526/x));for(let e of c)e.members.forEach((t,r)=>{let n=Math.floor(r/a),l=r%a,i=Math.min(a,e.members.length-n*a),d=e.centred?(a-i)*s/2:0;o[t.alias]={x:150+d+(l+.5)*s,y:126+(e.startRow+n+.5)*f}});let p=C(g,o),y=new Set;p.forEach(e=>{y.add(e.from),y.add(e.to)});let b=Math.max(8,Math.min(26,f-m-8)),v=c.filter(e=>e.isGroup).map(e=>{let a=e.members.map(e=>o[e.alias]).filter(Boolean),s=a.map(e=>e.x),n=a.map(e=>e.y),l=Math.min(...s),i=Math.min(...n),d=0,c=0,h=0;for(let t of e.members){let e="offline"!==t.status||!!r(t);"working"===t.status?d++:e?c++:h++}return{key:e.members.length?t[e.members[0].alias]:"",count:e.members.length,statuses:{working:d,idle:c,offline:h},x:l-b,y:i-m,w:Math.max(...s)-l+2*b,h:Math.max(...n)-i+m+b}});return{onlineNodes:n,offlineNodes:l,nodePositions:o,flowLinks:p,activeAliases:y,groupKeys:t,groupBoxes:v,gridContentBottom:126+x*f+8}}let i=n.length>14,d=!i&&n.length>8,c=n.length;if(i){let e=Math.ceil(n.length/3),t=n.slice(0,e),r=n.slice(e,2*e),a=n.slice(2*e);t.forEach((e,r)=>{o[e.alias]=b(r,Math.max(t.length,1),145)});let s=t.length<=2?Math.PI:1.78*Math.PI,l=t.length>1?s/(t.length-1):0;r.forEach((e,t)=>{o[e.alias]=b(t,Math.max(r.length,1),215,l/2)}),a.forEach((e,t)=>{o[e.alias]=b(t,Math.max(a.length,1),285)}),c=a.length}else if(d){let e=Math.ceil(n.length/2),t=n.length-e,r=n.slice(0,e),a=n.slice(e);r.forEach((t,r)=>{o[t.alias]=b(r,Math.max(e,1),175)});let s=e<=2?Math.PI:1.78*Math.PI,l=e>1?s/(e-1):0;a.forEach((e,r)=>{o[e.alias]=b(r,Math.max(t,1),260,l/2)}),c=t}else n.forEach((e,t)=>{o[e.alias]=b(t,Math.max(n.length,1),220)});let h=c<=2?Math.PI:1.78*Math.PI,x=c>1?h/(c-1):0,m=c>0?x/2:0,f=325+6*Math.max(0,l.length-4);l.forEach((e,t)=>{o[e.alias]=b(t,Math.max(l.length,1),f,m)});let p=C(g,o),y=new Set;p.forEach(e=>{y.add(e.from),y.add(e.to)});let v=M([...n,...l]);return{onlineNodes:n,offlineNodes:l,nodePositions:o,flowLinks:p,activeAliases:y,groupKeys:v,groupBoxes:[],gridContentBottom:0}},[g,e,t,z,T]),H=L.filter(e=>"working"===e.status).length,Y=(0,a.useMemo)(()=>{let e=new Map;for(let t of[...L,...R]){let r=p(t.model),a="unknown"===r.id?"?":r.initial,s=e.get(a);s?s.count++:e.set(a,{initial:a,count:1,color:r.mono.text})}return[...e.values()].sort((e,t)=>t.count-e.count)},[L,R]),X=L.length+R.length>16,[U,G]=(0,a.useState)(null),K=U?W[U]??U:null,[J,V]=(0,a.useState)(()=>{try{return sessionStorage.getItem("anet-topo-pinned-group")}catch{return null}}),q=K??J;(0,a.useEffect)(()=>{try{J?sessionStorage.setItem("anet-topo-pinned-group",J):sessionStorage.removeItem("anet-topo-pinned-group")}catch{}},[J]),(0,a.useEffect)(()=>{!J||new Set(Object.values(W)).has(J)||V(null)},[J,W]);let[Z,Q]=(0,a.useState)(null),[ee,et]=(0,a.useState)(null),[er,ea]=(0,a.useState)(()=>{try{let e=sessionStorage.getItem("anet-topo-pinned-status");return"working"===e||"idle"===e||"offline"===e?e:null}catch{return null}}),es=ee??er;(0,a.useEffect)(()=>{try{er?sessionStorage.setItem("anet-topo-pinned-status",er):sessionStorage.removeItem("anet-topo-pinned-status")}catch{}},[er]);let en=(0,a.useMemo)(()=>{if(!Z)return null;let e=F.find(e=>e.key===Z);return e?new Set([e.from,e.to]):null},[Z,F]),el=(0,a.useRef)(null),eo=(0,a.useRef)(null),[ei,ed]=(0,a.useState)({zoom:1,x:0,y:0}),ec=(0,a.useRef)(ei),eh=(0,a.useRef)({active:!1,startX:0,startY:0,baseX:0,baseY:0}),[eu,ex]=(0,a.useState)(!1),[em,ef]=(0,a.useState)(null),[ep,eg]=(0,a.useState)(null);(0,a.useEffect)(()=>{s&&s.from===em&&ef(s.to)},[s]),(0,a.useEffect)(()=>{ec.current=ei},[ei]),(0,a.useEffect)(()=>{try{let e=localStorage.getItem("anet-topo-view");if(e){let t=JSON.parse(e);"number"==typeof t?.zoom&&ed({zoom:Math.min(4,Math.max(.5,t.zoom)),x:"number"==typeof t.x?t.x:0,y:"number"==typeof t.y?t.y:0})}}catch{}},[]);let[ey]=(0,a.useState)(()=>!!localStorage.getItem("anet-topo-view")),eb=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!eb.current){if(ey){eb.current=!0;return}if("grid"===z&&0!==e.length&&D){if(D<=680){eb.current=!0;return}ed({zoom:Math.max(.5,Math.min(1,680/D)),x:0,y:0}),eb.current=!0}}},[z,e.length,D,ey]),(0,a.useEffect)(()=>{try{localStorage.setItem("anet-topo-view",JSON.stringify(ei))}catch{}},[ei]),(0,a.useEffect)(()=>{let e=()=>ex(document.fullscreenElement===el.current);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),(0,a.useEffect)(()=>{let e=eo.current;if(!e)return;let t=t=>{if(!eu&&!t.ctrlKey&&!t.metaKey)return;t.preventDefault();let r=e.getBoundingClientRect(),a=(t.clientX-r.left)/r.width*1e3,s=(t.clientY-r.top)/r.height*680;ed(e=>{let r=Math.min(1.08,Math.max(.926,Math.exp(-(6e-4*t.deltaY)))),n=Math.min(4,Math.max(.5,e.zoom*r)),l=n/e.zoom;return{zoom:n,x:a-(a-e.x)*l,y:s-(s-e.y)*l}})};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[eu]);let[ev,ej]=(0,a.useState)(!1),ew=e=>{if(eh.current.active){eh.current.active=!1,ej(!1);try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}}},ek=e=>{ed(t=>{let r=Math.min(4,Math.max(.5,t.zoom*e)),a=r/t.zoom;return{zoom:r,x:500-(500-t.x)*a,y:340-(340-t.y)*a}})},eN=()=>ed({zoom:1,x:0,y:0}),eS=(0,a.useCallback)(()=>{ed({zoom:!D||D<=680?1:Math.max(.5,Math.min(1,680/D)),x:0,y:0})},[D]);return(0,a.useEffect)(()=>{let e=e=>{if(e.ctrlKey||e.metaKey||e.altKey)return;let t=document.activeElement;if(t){let e=t.tagName;if("INPUT"===e||"TEXTAREA"===e||"SELECT"===e||t.isContentEditable)return}"+"===e.key||"="===e.key?(ek(1.2),e.preventDefault()):"-"===e.key||"_"===e.key?(ek(1/1.2),e.preventDefault()):"0"===e.key?(eN(),e.preventDefault()):"f"===e.key||"F"===e.key?(eS(),e.preventDefault()):"l"===e.key||"L"===e.key?(P(),e.preventDefault()):"Escape"===e.key&&!em&&(er||J)&&(er&&ea(null),J&&V(null),e.preventDefault())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[eS,em,er,J]),(0,r.jsxs)("section",{className:"w-full max-w-6xl mx-auto mb-8",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between mb-3 px-1",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs uppercase text-gray-600 tracking-wider",children:"Network Topology"}),(0,r.jsx)("h2",{className:"text-lg text-white font-semibold",children:"Command mesh"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"inline-flex rounded-md border border-gray-500/25 overflow-hidden",role:"group","aria-label":"Topology layout",children:[(0,r.jsx)("button",{onClick:()=>{"ring"!==z&&P()},"aria-pressed":"ring"===z,title:"Ring layout (l to toggle)",className:`px-2.5 py-1 transition-colors ${"ring"===z?"bg-cyan-500/15 text-cyan-300":"text-gray-500 hover:text-gray-400"}`,children:"Ring"}),(0,r.jsx)("button",{onClick:()=>{"grid"!==z&&P()},"aria-pressed":"grid"===z,title:"Grid layout (l to toggle)",className:`px-2.5 py-1 border-l border-gray-500/25 transition-colors ${"grid"===z?"bg-cyan-500/15 text-cyan-300":"text-gray-500 hover:text-gray-400"}`,children:"Grid"})]}),(0,r.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-green-500/10 text-green-300 border border-green-500/20",children:[H," working"]}),(0,r.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-cyan-500/10 text-cyan-300 border border-cyan-500/20",children:[L.length," online"]}),(()=>{let e=L.length-H,t=R.length,a=H+e+t;if(0===a)return null;let s=(e,t,s,n)=>{if(0===e)return null;let l=er===s;return(0,r.jsx)("span",{"data-pressure-seg":s,role:"button",tabIndex:0,"aria-pressed":l,title:`${e} ${n} — click to ${l?"release filter":"highlight"}`,style:{width:`${e/a*100}%`,background:t,height:"100%",cursor:"pointer",boxShadow:l?`inset 0 0 0 1px ${t}, inset 0 0 0 2px rgba(255,255,255,0.6)`:void 0},onClick:e=>{e.stopPropagation(),ea(e=>e===s?null:s)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ea(e=>e===s?null:s))}},s)};return(0,r.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-2 px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20 font-mono",title:`${H} working \xb7 ${e} idle \xb7 ${t} offline`,"data-fleet-pressure":!0,children:[(0,r.jsx)("span",{className:"text-[10px] tracking-wide",children:"pressure"}),(0,r.jsxs)("span",{className:"inline-flex h-1.5 w-16 rounded-full overflow-hidden",style:{background:"rgb(75 85 99 / 0.25)"},children:[s(H,c?"#059669":"#22c55e","working","working"),s(e,c?"#0d9488":"#2dd4bf","idle","idle"),s(t,c?"#94a3b8":"#6b7280","offline","offline")]})]})})(),er&&(0,r.jsxs)("span",{"data-active-filter":"status",className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border",style:{background:"working"===er?c?"#05966914":"#22c55e1f":"idle"===er?c?"#0d948814":"#2dd4bf1f":c?"#94a3b814":"#6b72801f",color:"working"===er?c?"#047857":"#86efac":"idle"===er?c?"#0f766e":"#5eead4":c?"#475569":"#9ca3af",borderColor:"currentColor"},children:[(0,r.jsxs)("span",{children:["filter: ",er]}),(0,r.jsx)("button",{type:"button","aria-label":`Clear ${er} filter`,onClick:()=>ea(null),className:"ml-0.5 leading-none hover:opacity-70",style:{background:"transparent",color:"inherit",cursor:"pointer",padding:0},children:"×"})]}),J&&(0,r.jsxs)("span",{"data-active-filter":"group",className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border",style:{background:c?"#67e8f914":"#67e8f91f",color:m.legendAccent,borderColor:"currentColor"},children:[(0,r.jsxs)("span",{children:["filter: ",J]}),(0,r.jsx)("button",{type:"button","aria-label":`Clear group filter ${J}`,onClick:()=>V(null),className:"ml-0.5 leading-none hover:opacity-70",style:{background:"transparent",color:"inherit",cursor:"pointer",padding:0},children:"×"})]}),Y.length>1&&(0,r.jsx)("span",{className:"hidden sm:inline-flex items-center gap-2 px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20 font-mono",title:"Fleet by model vendor",children:Y.map(e=>(0,r.jsxs)("span",{className:"inline-flex items-baseline gap-0.5",children:[(0,r.jsx)("span",{style:{color:e.color},children:e.initial}),(0,r.jsxs)("span",{className:"text-gray-500",children:[":",e.count]})]},e.initial))}),(l=null!==(n=F.reduce((e,t)=>{if(!t.last_at)return e;let r=(0,u.parseHubTime)(t.last_at);return null===r?e:null===e||r>e?r:e},null))?(0,u.relativeAgo)(new Date(n).toISOString()):null,(0,r.jsxs)("span",{className:"hidden sm:inline px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20",children:[F.length," active link",1===F.length?"":"s",l?(0,r.jsxs)("span",{className:"text-gray-500",children:[" · last ",l]}):null]})),(0,r.jsx)(w,{sessions:e})]})]}),(0,r.jsxs)("div",{ref:el,className:`relative overflow-hidden rounded-lg border shadow-2xl ${c?"shadow-zinc-900/5":"shadow-cyan-950/30"} ${eu?"flex items-center justify-center":""}`,style:{background:m.containerBg,borderColor:m.containerBorder},children:[(0,r.jsx)("div",{className:`absolute inset-x-0 top-0 h-px bg-gradient-to-r ${m.topRailGradient}`}),(0,r.jsxs)("svg",{ref:eo,viewBox:"0 0 1000 680",className:"w-full h-auto block",preserveAspectRatio:"xMidYMid meet",onPointerDown:e=>{0===e.button&&(e.currentTarget.setPointerCapture?.(e.pointerId),eh.current={active:!0,startX:e.clientX,startY:e.clientY,baseX:ec.current.x,baseY:ec.current.y},ej(!0))},onPointerMove:e=>{let t=eh.current;if(!t.active)return;let r=eo.current;if(!r)return;let a=r.getBoundingClientRect(),s=(e.clientX-t.startX)/a.width*1e3,n=(e.clientY-t.startY)/a.height*680;ed(e=>({...e,x:t.baseX+s,y:t.baseY+n}))},onPointerUp:ew,onPointerLeave:ew,onDoubleClick:e=>{let t=e.target;t?.closest("g[data-node]")||eN()},style:{cursor:ev?"grabbing":"grab",touchAction:"none"},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"topo-panel",x1:"0",x2:"1",y1:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:m.panelStops[0]}),(0,r.jsx)("stop",{offset:"48%",stopColor:m.panelStops[1]}),(0,r.jsx)("stop",{offset:"100%",stopColor:m.panelStops[2]})]}),(0,r.jsxs)("radialGradient",{id:"topo-radar",cx:"50%",cy:"50%",r:"55%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:m.radarStops[0].color,stopOpacity:m.radarStops[0].opacity}),(0,r.jsx)("stop",{offset:"45%",stopColor:m.radarStops[1].color,stopOpacity:m.radarStops[1].opacity}),(0,r.jsx)("stop",{offset:"100%",stopColor:m.radarStops[2].color,stopOpacity:m.radarStops[2].opacity})]}),!c&&(0,r.jsxs)("filter",{id:"topo-glow",children:[(0,r.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,r.jsxs)("feMerge",{children:[(0,r.jsx)("feMergeNode",{in:"blur"}),(0,r.jsx)("feMergeNode",{in:"SourceGraphic"})]})]}),[{id:"topo-arrow-s",size:12},{id:"topo-arrow",size:16},{id:"topo-arrow-l",size:22}].map(e=>(0,r.jsx)("marker",{id:e.id,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:e.size,markerHeight:e.size,markerUnits:"userSpaceOnUse",orient:"auto-start-reverse",children:(0,r.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:m.arrowFill})},e.id)),(0,r.jsxs)("radialGradient",{id:"topo-sweep",cx:"0%",cy:"50%",r:"100%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:c?"#0d9488":"#22d3ee",stopOpacity:c?.18:.32}),(0,r.jsx)("stop",{offset:"70%",stopColor:c?"#0d9488":"#22d3ee",stopOpacity:c?.1:.18}),(0,r.jsx)("stop",{offset:"100%",stopColor:c?"#0d9488":"#22d3ee",stopOpacity:"0"})]})]}),(0,r.jsx)("rect",{width:"1000",height:"680",fill:"url(#topo-panel)"}),(0,r.jsxs)("g",{transform:`translate(${ei.x} ${ei.y}) scale(${ei.zoom})`,children:["ring"===z&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:500,cy:330,r:"330",fill:"url(#topo-radar)",style:{pointerEvents:"none"}}),!c&&(0,r.jsx)("g",{opacity:"0.5",style:{pointerEvents:"none"},children:Array.from({length:28}).map((e,t)=>{let a=9301*t+49297;return(0,r.jsx)("circle",{cx:13*a%1e3,cy:7*a%680,r:t%3==0?1.2:.7,fill:"#a5b4fc",opacity:.35+t%4*.05},t)})}),(0,r.jsx)("g",{style:{transformOrigin:"500px 330px",transformBox:"view-box",pointerEvents:"none"},className:"anet-topo-sweep",opacity:c?.7:1,children:(0,r.jsx)("path",{d:`M 500 330 L 830 330 A 330 330 0 0 0 ${500+330*Math.cos(-Math.PI/4.5)} ${330+330*Math.sin(-Math.PI/4.5)} Z`,fill:"url(#topo-sweep)"})}),[90,170,250,330].map(e=>(0,r.jsx)("circle",{cx:500,cy:330,r:e,fill:"none",stroke:m.ringStroke,strokeWidth:"1",opacity:c?.6:.35},e)),(L.length>14?[145,215,285]:L.length>8?[175,260]:L.length>0?[220]:[]).map(e=>(0,r.jsx)("circle",{cx:500,cy:330,r:e,fill:"none",stroke:m.ringStroke,strokeWidth:"0.7",strokeDasharray:"2 8",opacity:c?.32:.42,style:{pointerEvents:"none"},"data-tier-ring":e},`tier-${e}`)),!c&&[0,.25,.5,.75].map((e,t)=>(0,r.jsx)("g",{children:(0,r.jsx)("circle",{cx:830,cy:330,r:0===t?2.8:2.2,fill:"#22d3ee",opacity:.9,filter:"url(#topo-glow)",children:(0,r.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:`${360*e} 500 330`,to:`${360*e+360} 500 330`,dur:"16s",repeatCount:"indefinite"})})},`orbit-${t}`)),[0,30,60,90,120,150].map(e=>(0,r.jsx)("line",{x1:500-360*Math.cos(e*Math.PI/180),y1:330-360*Math.sin(e*Math.PI/180),x2:500+360*Math.cos(e*Math.PI/180),y2:330+360*Math.sin(e*Math.PI/180),stroke:m.ringStroke,strokeWidth:"1",opacity:c?.35:.18},e))]}),"ring"===z&&L.map((e,t)=>{let a=I[e.alias];if(!a)return null;let s=v({x:500,y:330},a,0),n=B.has(e.alias);return(0,r.jsx)("path",{d:s,fill:"none",stroke:n?m.spokeStroke.active:m.spokeStroke.idle,strokeWidth:n?2:1,strokeDasharray:n?"none":"6 14",opacity:n?.7:.45,className:n?void 0:"anet-topo-spoke-flow",style:n?void 0:{animationDelay:`${-(.25*t)}s`}},`hub-${e.alias}`)}),O.map(e=>{let t=q===e.key;return(0,r.jsxs)("g",{"data-group":e.key,className:"transition-opacity",style:{opacity:!q||t?1:.28},children:[(0,r.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:"14",fill:c?"#0f172a":"#a5b4fc",fillOpacity:t?c?.05:.09:c?.025:.045,stroke:t?m.legendAccent:m.ringStroke,strokeWidth:t?2:1.5,strokeDasharray:t?"none":"6 6",style:{transition:"stroke 200ms ease-out, stroke-width 200ms ease-out, fill-opacity 200ms ease-out",pointerEvents:"none"}}),(0,r.jsxs)("g",{role:"button",tabIndex:0,"aria-pressed":J===e.key,"data-group-label-hit":e.key,style:{pointerEvents:"all",cursor:"pointer"},onPointerDown:e=>e.stopPropagation(),onClick:()=>V(t=>t===e.key?null:e.key),children:[(0,r.jsx)("rect",{x:e.x+6,y:e.y+2,width:Math.min(e.w-12,240),height:20,fill:"transparent"}),(0,r.jsxs)("text",{x:e.x+12,y:e.y+14,fill:t?m.legendHeadline:m.legendText,fontSize:"13",fontFamily:"monospace",fontWeight:"700",style:{transition:"fill 200ms ease-out"},"data-group-label":e.key,children:[e.key,(0,r.jsxs)("tspan",{dx:"6",fill:m.legendText,fontSize:"11",fontWeight:"400",children:["· ",e.count]}),e.statuses.working>0&&(0,r.jsxs)("tspan",{dx:"8",fill:c?"#059669":"#22c55e",fontSize:"11",fontWeight:"600",children:[e.statuses.working,"w"]}),e.statuses.idle>0&&(0,r.jsxs)("tspan",{dx:"4",fill:c?"#0d9488":"#2dd4bf",fontSize:"11",fontWeight:"600",children:[e.statuses.idle,"i"]}),e.statuses.offline>0&&(0,r.jsxs)("tspan",{dx:"4",fill:c?"#94a3b8":"#6b7280",fontSize:"11",fontWeight:"600",children:[e.statuses.offline,"o"]})]})]})]},`grp-${e.key}`)}),F.map((e,t)=>{let a=I[e.from],s=I[e.to];if(!a||!s)return null;let n=(t%2==0?1:-1)*Math.min(36,.18*Math.hypot(s.x-a.x,s.y-a.y)),l=v(a,s,n),o=Math.min(2+e.count,7),i=Math.max(.9,2.6/Math.sqrt(e.count)),d=Math.max(.35,1-(e.last_at?Math.max(0,Date.now()-Date.parse(e.last_at)):0)/3e5),x=e.count<=2?"topo-arrow-s":e.count<=4?"topo-arrow":"topo-arrow-l",f=(0,u.relativeAgo)(e.last_at),p=`${e.from} → ${e.to}
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,136,(e,t,r)=>{},7454,(e,t,r)=>{var a=e.i(20888);e.r(136);var s=e.r(23910),n=s&&"object"==typeof s&&"default"in s?s:{default:s},l=void 0!==a.default&&a.default.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,s=t.optimizeForSpeed,n=void 0===s?l:s;d(o(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",d("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(d(o(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return l||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var a=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,a))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var r="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(a){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var a=this._tags[e];d(a,"old rule at index `"+e+"` not found"),a.textContent=t}return e},r.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];d(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&d(o(t),"makeStyleTag accepts only strings as second parameter");var a=document.createElement("style");this._nonce&&a.setAttribute("nonce",this._nonce),a.type="text/css",a.setAttribute("data-"+e,""),t&&a.appendChild(document.createTextNode(t));var s=document.head||document.getElementsByTagName("head")[0];return r?s.insertBefore(a,r):s.appendChild(a),a},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(e.prototype,t),e}();function d(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},h={};function u(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return h[a]||(h[a]="jsx-"+c(e+"-"+r)),h[a]}function x(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return h[r]||(h[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[r]}var m=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,a=void 0===r?null:r,s=t.optimizeForSpeed,n=void 0!==s&&s;this._sheet=a||new i({name:"styled-jsx",optimizeForSpeed:n}),this._sheet.inject(),a&&"boolean"==typeof n&&(this._sheet.setOptimizeForSpeed(n),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),a=r.styleId,s=r.rules;if(a in this._instancesCounts){this._instancesCounts[a]+=1;return}var n=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[a]=n,this._instancesCounts[a]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var a=this._fromServer&&this._fromServer[r];a?(a.parentNode.removeChild(a),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],a=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:a}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,a=e.id;if(r){var s=u(a,r);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return x(s,e)}):[x(s,t)]}}return{styleId:u(a),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),f=s.createContext(null);function p(){return new m}function g(){return s.useContext(f)}f.displayName="StyleSheetContext";var y=n.default.useInsertionEffect||n.default.useLayoutEffect,b="u">typeof window?p():void 0;function v(e){var t=b||g();return t&&("u"<typeof window?t.add(e):y(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return u(e[0],e[1])}).join(" ")},r.StyleRegistry=function(e){var t=e.registry,r=e.children,a=s.useContext(f),l=s.useState(function(){return a||t||p()})[0];return n.default.createElement(f.Provider,{value:l},r)},r.createStyleRegistry=p,r.style=v,r.useStyleRegistry=g},6694,(e,t,r)=>{t.exports=e.r(7454).style},18722,e=>{"use strict";var t=e.i(20888),r=e.i(22381),a=e.i(23910),s=e.i(56839),n=e.i(3479);function l({online:e,working:t,total:a,version:s,uptime:n}){let i=a>0?Math.round(e/a*100):0,d=0===a;return(0,r.jsxs)("div",{className:d?"mb-4":"mb-8",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Agent Network"}),(0,r.jsxs)("span",{className:"text-xs text-gray-500",children:["CommHub ",s," · ",n]})]}),d?(0,r.jsxs)("div",{className:"anet-stat-strip flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-gray-500 border-t border-b border-[#2a2a4a] py-2",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full bg-gray-600"}),(0,r.jsx)("span",{className:"text-gray-300 tabular-nums",children:"0"})," online"]}),(0,r.jsx)("span",{className:"text-gray-700",children:"·"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full bg-gray-600"}),(0,r.jsx)("span",{className:"text-gray-300 tabular-nums",children:"0"})," working"]}),(0,r.jsx)("span",{className:"text-gray-700",children:"·"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full bg-gray-600"}),(0,r.jsx)("span",{className:"text-gray-300 tabular-nums",children:"0"})," registered"]})]}):(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,r.jsx)(o,{value:e,label:"Online",sub:`${i}% of fleet`,color:"text-green-400",accent:"from-green-500/20 to-green-500/0",border:"border-green-500/15"}),(0,r.jsx)(o,{value:t,label:"Working",sub:e>0?`${Math.round(t/e*100)}% utilization`:"--",color:"text-cyan-400",accent:"from-cyan-500/20 to-cyan-500/0",border:"border-cyan-500/15"}),(0,r.jsx)(o,{value:a-e,label:"Offline",sub:a-e==0?"All systems go":`${a-e} disconnected`,color:"text-gray-400",accent:"from-gray-500/10 to-gray-500/0",border:"border-gray-500/15"}),(0,r.jsx)(o,{value:a,label:"Total",sub:"Registered nodes",color:"text-white",accent:"from-blue-500/15 to-blue-500/0",border:"border-blue-500/15"})]})]})}function o({value:e,label:t,sub:a,color:s,accent:n,border:l}){let i=s.replace("text-","").split("-")[0];return(0,r.jsxs)("div",{"data-anet-stat-card":i,className:`anet-stat-card relative overflow-hidden rounded-xl border ${l} bg-[#111128] px-4 py-3 transition-all`,children:[(0,r.jsx)("div",{className:`absolute inset-0 bg-gradient-to-br ${n} pointer-events-none`}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:`text-3xl font-bold ${s} tabular-nums leading-tight`,children:e}),(0,r.jsx)("div",{className:"text-sm text-gray-300 mt-0.5",children:t}),(0,r.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:a})]})]})}function i(){let[e,t]=(0,a.useState)(""),[s,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)(""),i=async()=>{if(e.trim()){n(!0),o("");try{let r=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}),a=await r.json();a.ok?(o(`Broadcast sent to ${a.recipients} node(s)`),t("")):o(`Failed: ${a.error||"Send error"}`)}catch(e){o(`Failed: ${e instanceof Error?e.message:"Send error"}`)}n(!1),setTimeout(()=>o(""),5e3)}};return(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{type:"text",value:e,onChange:e=>t(e.target.value),onKeyDown:e=>"Enter"===e.key&&i(),placeholder:"Broadcast message to all online agents...",maxLength:500,"aria-label":"Broadcast message",className:"flex-1 bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-2.5 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:ring-1 focus:ring-blue-500/20 focus:outline-none transition-colors"}),(0,r.jsx)("button",{onClick:i,disabled:s||!e.trim(),"aria-label":"Send broadcast",className:"flex items-center gap-2 px-5 py-2.5 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-all font-medium cursor-pointer disabled:cursor-not-allowed",children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,r.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,r.jsx)("span",{children:"Sending…"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M3 11v3a1 1 0 0 0 1 1h2l3.29 3.29a1 1 0 0 0 1.71-.71V7.42a1 1 0 0 0-1.71-.71L6 10H4a1 1 0 0 0-1 1Z"}),(0,r.jsx)("path",{d:"M16 8a5 5 0 0 1 0 6",opacity:"0.7"}),(0,r.jsx)("path",{d:"M19 5a9 9 0 0 1 0 12",opacity:"0.45"})]}),(0,r.jsx)("span",{children:"Broadcast"})]})})]}),e.length>0&&(0,r.jsxs)("div",{className:"text-right text-xs text-gray-600 mt-1 tabular-nums",children:[e.length,"/500"]}),l&&(0,r.jsx)("div",{className:`mt-3 text-sm text-center anet-fade-in ${l.startsWith("Failed")?"text-red-400":"text-green-400/80"}`,children:l})]})}var d=e.i(46228),c=e.i(43058),h=e.i(59276),u=e.i(59746);function x({alias:e,onClose:t}){let[s,n]=(0,a.useState)({x:0,y:0}),[l,o]=(0,a.useState)({w:380,h:520}),i=(0,a.useRef)({active:!1,startX:0,startY:0,baseX:0,baseY:0}),m=(0,a.useRef)({active:!1,startX:0,startY:0,baseW:0,baseH:0}),{sessions:f}=(0,h.useSessions)(),p=(0,a.useMemo)(()=>f.find(t=>t.alias===e),[f,e]),g=p&&"offline"!==p.status?null:(0,u.relativeAgo)(p?.last_seen_at),y=(0,a.useCallback)((e,t,r,a)=>({x:Math.min(Math.max(16,e),Math.max(16,window.innerWidth-r-16)),y:Math.min(Math.max(16,t),Math.max(16,window.innerHeight-a-16))}),[]);(0,a.useEffect)(()=>{let e=()=>{let e=window.innerWidth,t=window.innerHeight,r=Math.min(380,e-32),a=Math.min(520,t-96);o({w:r,h:a});let s=e<640;n(y(s?16:e-r-24,s?t-a-16:96,r,a))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[y]),(0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let b=e=>{if(i.current.active){i.current.active=!1;try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}}},v=e=>{if(m.current.active){m.current.active=!1,e.stopPropagation();try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}}};return(0,r.jsxs)("div",{className:"fixed z-50 flex flex-col overflow-hidden rounded-xl border border-[var(--border)] bg-[var(--bg)] shadow-2xl shadow-black/60 anet-fade-in",style:{left:s.x,top:s.y,width:l.w,height:l.h},role:"dialog","aria-label":`Chat with ${e}`,children:[(0,r.jsxs)("div",{onPointerDown:e=>{0===e.button&&(e.currentTarget.setPointerCapture?.(e.pointerId),i.current={active:!0,startX:e.clientX,startY:e.clientY,baseX:s.x,baseY:s.y})},onPointerMove:e=>{let t=i.current;t.active&&n(y(t.baseX+(e.clientX-t.startX),t.baseY+(e.clientY-t.startY),l.w,l.h))},onPointerUp:b,onPointerCancel:b,className:"flex items-center justify-between px-3 py-2.5 border-b border-[var(--border)] bg-[var(--bg-secondary)] rounded-t-xl cursor-grab active:cursor-grabbing select-none touch-none",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,r.jsx)(d.AliasAvatar,{alias:e,size:28}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-[var(--fg)] truncate",children:e}),p?.project_dir?(0,r.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] truncate font-mono",title:p.project_dir,"data-popover-cwd":!0,children:["cwd: ",p.project_dir]}):null,g?(0,r.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] truncate","data-popover-lastseen":!0,children:["last seen: ",g]}):null,p?.project_dir||g?null:(0,r.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)]",children:"Drag to move · Esc to close"})]})]}),(0,r.jsx)("button",{onClick:t,onPointerDown:e=>e.stopPropagation(),"aria-label":"Close chat",className:"text-[var(--fg-muted)] hover:text-[var(--fg)] p-1.5 rounded-lg hover:bg-[var(--bg-elevated)] shrink-0",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex-1 min-h-0",children:(0,r.jsx)(c.TaskChatPanel,{alias:e,onClose:t,inline:!0})}),(0,r.jsx)("div",{onPointerDown:e=>{0===e.button&&(e.stopPropagation(),e.currentTarget.setPointerCapture?.(e.pointerId),m.current={active:!0,startX:e.clientX,startY:e.clientY,baseW:l.w,baseH:l.h})},onPointerMove:e=>{let t=m.current;if(!t.active)return;e.stopPropagation();let r=Math.max(300,window.innerWidth-s.x-16),a=Math.max(320,window.innerHeight-s.y-16);o({w:Math.min(r,Math.max(300,t.baseW+(e.clientX-t.startX))),h:Math.min(a,Math.max(320,t.baseH+(e.clientY-t.startY)))})},onPointerUp:v,onPointerCancel:v,"aria-label":"Resize chat",className:"absolute bottom-0 right-0 w-5 h-5 cursor-nwse-resize touch-none z-10",style:{touchAction:"none"},children:(0,r.jsx)("svg",{className:"absolute bottom-0.5 right-0.5 w-3 h-3 text-[var(--fg-dim)]",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M11 5L5 11M11 9L9 11"})})})]})}let m={id:"unknown",label:"Unknown vendor",mono:{bg:"hsl(220 10% 26%)",ring:"hsl(220 10% 46%)",text:"hsl(220 14% 82%)"},initial:"?",logo:null},f=[{test:e=>e.startsWith("intern"),vendor:{id:"intern",label:"书生 · 上海 AI 实验室",mono:{bg:"hsl(28 38% 24%)",ring:"hsl(32 45% 52%)",text:"hsl(34 60% 82%)"},initial:"书",logo:"/intern_avatar.png"}},{test:e=>e.startsWith("minimax"),vendor:{id:"minimax",label:"MiniMax",mono:{bg:"hsl(18 50% 26%)",ring:"hsl(18 65% 52%)",text:"hsl(20 80% 82%)"},initial:"M",logo:null}},{test:e=>e.startsWith("claude"),vendor:{id:"anthropic",label:"Anthropic",mono:{bg:"hsl(16 32% 26%)",ring:"hsl(16 48% 54%)",text:"hsl(18 60% 84%)"},initial:"A",logo:null}},{test:e=>e.startsWith("gpt")||e.startsWith("codex")||e.startsWith("o1")||e.startsWith("o3")||e.startsWith("o4"),vendor:{id:"openai",label:"OpenAI",mono:{bg:"hsl(165 26% 22%)",ring:"hsl(165 40% 44%)",text:"hsl(165 45% 80%)"},initial:"O",logo:null}}];function p(e){if(!e)return m;let t=e.toLowerCase();for(let e of f)if(e.test(t))return e.vendor;return m}let g={"claude-code-cli":{label:"Claude Code CLI",iconPath:"M4 5h16v14H4z M7 9l3 3-3 3 M13 15h4",color:"#a78bfa"},"codex-sdk":{label:"Codex SDK",iconPath:"M9 7l-5 5 5 5 M15 7l5 5-5 5",color:"#38bdf8"},"claude-agent-sdk":{label:"Claude Agent SDK",iconPath:"M4 7h16v10H4z M8 11h8 M8 14h5",color:"#34d399"},"http-api":{label:"HTTP API",iconPath:"M7 18a4 4 0 010-8 5 5 0 019.6-1.3A3.5 3.5 0 0118 18z",color:"#fbbf24"}};function y(e){return e?g[e]??null:null}function b(e,t,r,a=0){let s=t<=2?Math.PI:1.78*Math.PI,n=-Math.PI/2-s/2,l=t<=1?-Math.PI/2:n+s*e/(t-1)+a;return{x:500+r*Math.cos(l),y:330+r*Math.sin(l)}}function v(e,t,r=0){let a=(e.x+t.x)/2,s=(e.y+t.y)/2,n=t.x-e.x,l=t.y-e.y,o=Math.hypot(n,l)||1,i={x:a+-l/o*r,y:s+n/o*r};return`M${e.x},${e.y} Q${i.x},${i.y} ${t.x},${t.y}`}function j(e,t){return e.length>t?`${e.slice(0,t-1)}...`:e}function w({sessions:e}){let t=(0,a.useRef)(Date.now()),[s,n]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{t.current=Date.now()},[e]),(0,a.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]);let l=Math.max(0,Math.floor((s-t.current)/1e3)),o=l>10;return(0,r.jsxs)("span",{className:o?"hidden sm:inline px-2.5 py-1 rounded-md bg-amber-500/10 text-amber-300 border border-amber-500/20 font-mono":"hidden sm:inline px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20 font-mono",title:o?`Last sync ${l}s ago — SWR refresh may be lagging`:`Live data \xb7 refreshes every 5s \xb7 last sync ${l}s ago`,"data-freshness-chip":!0,children:["live · ",l,"s"]})}function k(e,t,r){return t?"working"===e.status?{label:"working",primary:r?"#059669":"#22c55e",halo:r?"#d1fae5":"#14532d",text:r?"#065f46":"#dcfce7"}:"idle"===e.status?{label:"idle",primary:r?"#0d9488":"#2dd4bf",halo:r?"#ccfbf1":"#134e4a",text:r?"#115e59":"#ccfbf1"}:{label:e.status||"online",primary:r?"#0284c7":"#38bdf8",halo:r?"#e0f2fe":"#0c4a6e",text:r?"#0c4a6e":"#e0f2fe"}:{label:"offline",primary:r?"#94a3b8":"#6b7280",halo:r?"#e2e8f0":"#111827",text:r?"#475569":"#9ca3af"}}let N={panelStops:["#0b1220","#080814","#101018"],radarStops:[{color:"#22d3ee",opacity:.18},{color:"#22c55e",opacity:.045},{color:"#020617",opacity:0}],arrowFill:"#67e8f9",ringStroke:"#164e63",spokeStroke:{active:"#22d3ee",idle:"#155e75"},flowEdge:"#67e8f9",flowPath:"#e0f2fe",flowParticle:"#fef08a",nodeFill:{online:"#020617",offline:"#080814"},labelBox:{fill:"#020617",stroke:"#1f2937"},legendBox:{fill:"#020617",stroke:"#1f2937"},legendText:"#94a3b8",legendHeadline:"#e5e7eb",legendAccent:"#67e8f9",containerBg:"#080814",containerBorder:"#2a2a4a",topRailGradient:"from-transparent via-cyan-400/70 to-transparent"},S={panelStops:["#f8fafc","#ffffff","#f1f5f9"],radarStops:[{color:"#10b981",opacity:.06},{color:"#3b82f6",opacity:.03},{color:"#ffffff",opacity:0}],arrowFill:"#10b981",ringStroke:"#cbd5e1",spokeStroke:{active:"#10b981",idle:"#cbd5e1"},flowEdge:"#10b981",flowPath:"#475569",flowParticle:"#f59e0b",nodeFill:{online:"#ffffff",offline:"#f8fafc"},labelBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendText:"#475569",legendHeadline:"#0f172a",legendAccent:"#0d9488",containerBg:"#ffffff",containerBorder:"#e3e6eb",topRailGradient:"from-transparent via-emerald-500/40 to-transparent"};function _(e,t){let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];)r++;return e.slice(0,r)}function M(e){let t=e.length,r=e.map((e,t)=>t),a=e=>{for(;r[e]!==e;)r[e]=r[r[e]],e=r[e];return e},s=(e,t)=>{let s=a(e),n=a(t);s!==n&&(r[s]=n)},n={};for(let t of(e.forEach((e,t)=>{let r=e.project_dir?.trim();r&&(n[r]||=[]).push(t)}),Object.values(n)))for(let e=1;e<t.length;e++)s(t[0],t[e]);let l=e.map((e,t)=>t).sort((t,r)=>e[t].alias.localeCompare(e[r].alias));for(let t=0;t+1<l.length;t++)_(e[l[t]].alias,e[l[t+1]].alias).length>=2&&s(l[t],l[t+1]);let o={};for(let e=0;e<t;e++)(o[a(e)]||=[]).push(e);let i={};for(let t of Object.values(o)){let r;if(1===t.length)r=e[t[0]].alias;else{let a=new Set(t.map(t=>e[t].project_dir?.trim()).filter(Boolean));if(1===a.size){let e=[...a][0];r=e.split("/").filter(Boolean).pop()||e}else(r=t.map(t=>e[t].alias).reduce((e,t)=>_(e,t))).length<2&&(r=e[t[0]].alias)}for(let a of t)i[e[a].alias]=r}return i}function C(e,t){let r=new Map;return e.forEach(e=>{if(!t[e.from_alias]||!t[e.to_alias]||e.from_alias===e.to_alias)return;let a=`${e.from_alias}->${e.to_alias}`,s=r.get(a),n=e.created_at||"",l=s?n>s.last_at?n:s.last_at:n;r.set(a,{key:a,from:e.from_alias,to:e.to_alias,count:(s?.count||0)+1,content:s?.content||e.content,last_at:l})}),[...r.values()].slice(0,18)}function $({sessions:e,sseSessions:t,renameSignal:s}){let n,l,o,i,c="light"===function(){let[e,t]=(0,a.useState)("dark");return(0,a.useEffect)(()=>{let e=()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber";t("light"===e||"mint"===e?"light":"dark")};e();let r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>r.disconnect()},[]),e}(),h=function(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!window.matchMedia)return;let e=window.matchMedia("(prefers-reduced-motion: reduce)");t(e.matches);let r=e=>t(e.matches);return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[]),e}(),m=c?S:N,f="intern"===function(){let[e,t]=(0,a.useState)(null);return(0,a.useEffect)(()=>{try{let e=new URL(window.location.href).searchParams.get("brand");null!==e?""===e||"none"===e?(localStorage.removeItem("anet-brand"),t(null)):(localStorage.setItem("anet-brand",e),t(e)):t(localStorage.getItem("anet-brand"))}catch{}},[]),e}(),[g,_]=(0,a.useState)([]),[z,E]=(0,a.useState)("ring");(0,a.useEffect)(()=>{try{let e=localStorage.getItem("anet-topo-layout");("grid"===e||"ring"===e)&&E(e)}catch{}},[]);let P=()=>E(e=>{let t="ring"===e?"grid":"ring";try{localStorage.setItem("anet-topo-layout",t)}catch{}return t}),[T,A]=(0,a.useState)(.84);(0,a.useEffect)(()=>{try{let e=parseFloat(localStorage.getItem("anet-topo-nodescale")||"");(.7===e||.84===e||1===e)&&A(e)}catch{}},[]),(0,a.useEffect)(()=>{let e=async()=>{try{let e=await fetch("/api/hub/messages?limit=50");if(401===e.status)return void window.location.assign("/login");let t=await e.json();_(t.messages||[])}catch{}};e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let{onlineNodes:L,offlineNodes:R,nodePositions:I,flowLinks:F,activeAliases:B,groupKeys:W,groupBoxes:O,gridContentBottom:D}=(0,a.useMemo)(()=>{let r=e=>(e.network_id?t[`${e.network_id}:${e.alias}`]:void 0)??t[e.alias],a=(e,t)=>e.alias.localeCompare(t.alias),s=Date.now(),n=e.filter(e=>"offline"!==e.status||r(e)).sort(a),l=e.filter(e=>"offline"===e.status&&!r(e)&&!(e=>{if("offline"!==e.status||r(e)||!e.last_seen_at)return!1;let t=(0,u.parseHubTime)(e.last_seen_at);return null!==t&&s-t>36e5})(e)).sort(a),o={};if("grid"===z){let e=[...n,...l],t=M(e),a=Math.max(1,Math.ceil(Math.sqrt(e.length))),s=700/a,i=Math.round(26*T),d=[];for(let r of e){let e=t[r.alias],a=d[d.length-1];a&&a.key===e?a.members.push(r):d.push({key:e,members:[r]})}let c=[],h=0,u=0;for(;u<d.length;)if(d[u].members.length>=2)c.push({members:d[u].members,startRow:h,centred:!1,isGroup:!0}),h+=Math.ceil(d[u].members.length/a),u++;else{let e=[];for(;u<d.length&&d[u].members.length<2;)e.push(d[u].members[0]),u++;c.push({members:e,startRow:h,centred:!0,isGroup:!1}),h+=Math.ceil(e.length/a)}let x=Math.max(1,h),m=i+20,f=Math.max(2*i+22,m+12,i+(T<.8?12:14)+m+3,Math.min(100,526/x));for(let e of c)e.members.forEach((t,r)=>{let n=Math.floor(r/a),l=r%a,i=Math.min(a,e.members.length-n*a),d=e.centred?(a-i)*s/2:0;o[t.alias]={x:150+d+(l+.5)*s,y:126+(e.startRow+n+.5)*f}});let p=C(g,o),y=new Set;p.forEach(e=>{y.add(e.from),y.add(e.to)});let b=Math.max(8,Math.min(26,f-m-8)),v=c.filter(e=>e.isGroup).map(e=>{let a=e.members.map(e=>o[e.alias]).filter(Boolean),s=a.map(e=>e.x),n=a.map(e=>e.y),l=Math.min(...s),i=Math.min(...n),d=0,c=0,h=0;for(let t of e.members){let e="offline"!==t.status||!!r(t);"working"===t.status?d++:e?c++:h++}return{key:e.members.length?t[e.members[0].alias]:"",count:e.members.length,statuses:{working:d,idle:c,offline:h},x:l-b,y:i-m,w:Math.max(...s)-l+2*b,h:Math.max(...n)-i+m+b}});return{onlineNodes:n,offlineNodes:l,nodePositions:o,flowLinks:p,activeAliases:y,groupKeys:t,groupBoxes:v,gridContentBottom:126+x*f+8}}let i=n.length>14,d=!i&&n.length>8,c=n.length;if(i){let e=Math.ceil(n.length/3),t=n.slice(0,e),r=n.slice(e,2*e),a=n.slice(2*e);t.forEach((e,r)=>{o[e.alias]=b(r,Math.max(t.length,1),145)});let s=t.length<=2?Math.PI:1.78*Math.PI,l=t.length>1?s/(t.length-1):0;r.forEach((e,t)=>{o[e.alias]=b(t,Math.max(r.length,1),215,l/2)}),a.forEach((e,t)=>{o[e.alias]=b(t,Math.max(a.length,1),285)}),c=a.length}else if(d){let e=Math.ceil(n.length/2),t=n.length-e,r=n.slice(0,e),a=n.slice(e);r.forEach((t,r)=>{o[t.alias]=b(r,Math.max(e,1),175)});let s=e<=2?Math.PI:1.78*Math.PI,l=e>1?s/(e-1):0;a.forEach((e,r)=>{o[e.alias]=b(r,Math.max(t,1),260,l/2)}),c=t}else n.forEach((e,t)=>{o[e.alias]=b(t,Math.max(n.length,1),220)});let h=c<=2?Math.PI:1.78*Math.PI,x=c>1?h/(c-1):0,m=c>0?x/2:0,f=325+6*Math.max(0,l.length-4);l.forEach((e,t)=>{o[e.alias]=b(t,Math.max(l.length,1),f,m)});let p=C(g,o),y=new Set;p.forEach(e=>{y.add(e.from),y.add(e.to)});let v=M([...n,...l]);return{onlineNodes:n,offlineNodes:l,nodePositions:o,flowLinks:p,activeAliases:y,groupKeys:v,groupBoxes:[],gridContentBottom:0}},[g,e,t,z,T]),H=L.filter(e=>"working"===e.status).length,Y=(0,a.useMemo)(()=>{let e=new Map;for(let t of[...L,...R]){let r=p(t.model),a="unknown"===r.id?"?":r.initial,s=e.get(a);s?s.count++:e.set(a,{initial:a,count:1,color:r.mono.text})}return[...e.values()].sort((e,t)=>t.count-e.count)},[L,R]),X=L.length+R.length>16,[U,G]=(0,a.useState)(null),K=U?W[U]??U:null,[J,V]=(0,a.useState)(()=>{try{return sessionStorage.getItem("anet-topo-pinned-group")}catch{return null}}),q=K??J;(0,a.useEffect)(()=>{try{J?sessionStorage.setItem("anet-topo-pinned-group",J):sessionStorage.removeItem("anet-topo-pinned-group")}catch{}},[J]),(0,a.useEffect)(()=>{!J||new Set(Object.values(W)).has(J)||V(null)},[J,W]);let[Z,Q]=(0,a.useState)(null),[ee,et]=(0,a.useState)(null),[er,ea]=(0,a.useState)(()=>{try{let e=sessionStorage.getItem("anet-topo-pinned-status");return"working"===e||"idle"===e||"offline"===e?e:null}catch{return null}}),es=ee??er;(0,a.useEffect)(()=>{try{er?sessionStorage.setItem("anet-topo-pinned-status",er):sessionStorage.removeItem("anet-topo-pinned-status")}catch{}},[er]);let en=(0,a.useMemo)(()=>{if(!Z)return null;let e=F.find(e=>e.key===Z);return e?new Set([e.from,e.to]):null},[Z,F]),el=(0,a.useRef)(null),eo=(0,a.useRef)(null),[ei,ed]=(0,a.useState)({zoom:1,x:0,y:0}),ec=(0,a.useRef)(ei),eh=(0,a.useRef)({active:!1,startX:0,startY:0,baseX:0,baseY:0}),[eu,ex]=(0,a.useState)(!1),[em,ef]=(0,a.useState)(null),[ep,eg]=(0,a.useState)(null);(0,a.useEffect)(()=>{s&&s.from===em&&ef(s.to)},[s]),(0,a.useEffect)(()=>{ec.current=ei},[ei]),(0,a.useEffect)(()=>{try{let e=localStorage.getItem("anet-topo-view");if(e){let t=JSON.parse(e);"number"==typeof t?.zoom&&ed({zoom:Math.min(4,Math.max(.5,t.zoom)),x:"number"==typeof t.x?t.x:0,y:"number"==typeof t.y?t.y:0})}}catch{}},[]);let[ey]=(0,a.useState)(()=>!!localStorage.getItem("anet-topo-view")),eb=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!eb.current){if(ey){eb.current=!0;return}if("grid"===z&&0!==e.length&&D){if(D<=680){eb.current=!0;return}ed({zoom:Math.max(.5,Math.min(1,680/D)),x:0,y:0}),eb.current=!0}}},[z,e.length,D,ey]),(0,a.useEffect)(()=>{try{localStorage.setItem("anet-topo-view",JSON.stringify(ei))}catch{}},[ei]),(0,a.useEffect)(()=>{let e=()=>ex(document.fullscreenElement===el.current);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),(0,a.useEffect)(()=>{let e=eo.current;if(!e)return;let t=t=>{if(!eu&&!t.ctrlKey&&!t.metaKey)return;t.preventDefault();let r=e.getBoundingClientRect(),a=(t.clientX-r.left)/r.width*1e3,s=(t.clientY-r.top)/r.height*680;ed(e=>{let r=Math.min(1.08,Math.max(.926,Math.exp(-(6e-4*t.deltaY)))),n=Math.min(4,Math.max(.5,e.zoom*r)),l=n/e.zoom;return{zoom:n,x:a-(a-e.x)*l,y:s-(s-e.y)*l}})};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[eu]);let[ev,ej]=(0,a.useState)(!1),ew=e=>{if(eh.current.active){eh.current.active=!1,ej(!1);try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}}},ek=e=>{ed(t=>{let r=Math.min(4,Math.max(.5,t.zoom*e)),a=r/t.zoom;return{zoom:r,x:500-(500-t.x)*a,y:340-(340-t.y)*a}})},eN=()=>ed({zoom:1,x:0,y:0}),eS=(0,a.useCallback)(()=>{ed({zoom:!D||D<=680?1:Math.max(.5,Math.min(1,680/D)),x:0,y:0})},[D]);return(0,a.useEffect)(()=>{let e=e=>{if(e.ctrlKey||e.metaKey||e.altKey)return;let t=document.activeElement;if(t){let e=t.tagName;if("INPUT"===e||"TEXTAREA"===e||"SELECT"===e||t.isContentEditable)return}"+"===e.key||"="===e.key?(ek(1.2),e.preventDefault()):"-"===e.key||"_"===e.key?(ek(1/1.2),e.preventDefault()):"0"===e.key?(eN(),e.preventDefault()):"f"===e.key||"F"===e.key?(eS(),e.preventDefault()):"l"===e.key||"L"===e.key?(P(),e.preventDefault()):"Escape"===e.key&&!em&&(er||J)&&(er&&ea(null),J&&V(null),e.preventDefault())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[eS,em,er,J]),(0,r.jsxs)("section",{className:"w-full max-w-6xl mx-auto mb-8",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between mb-3 px-1",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs uppercase text-gray-600 tracking-wider",children:"Network Topology"}),(0,r.jsx)("h2",{className:"text-lg text-white font-semibold",children:"Command mesh"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"inline-flex rounded-md border border-gray-500/25 overflow-hidden",role:"group","aria-label":"Topology layout",children:[(0,r.jsx)("button",{onClick:()=>{"ring"!==z&&P()},"aria-pressed":"ring"===z,title:"Ring layout (l to toggle)",className:`px-2.5 py-1 transition-colors ${"ring"===z?"bg-cyan-500/15 text-cyan-300":"text-gray-500 hover:text-gray-400"}`,children:"Ring"}),(0,r.jsx)("button",{onClick:()=>{"grid"!==z&&P()},"aria-pressed":"grid"===z,title:"Grid layout (l to toggle)",className:`px-2.5 py-1 border-l border-gray-500/25 transition-colors ${"grid"===z?"bg-cyan-500/15 text-cyan-300":"text-gray-500 hover:text-gray-400"}`,children:"Grid"})]}),(0,r.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-green-500/10 text-green-300 border border-green-500/20",children:[H," working"]}),(0,r.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-cyan-500/10 text-cyan-300 border border-cyan-500/20",children:[L.length," online"]}),(()=>{let e=L.length-H,t=R.length,a=H+e+t;if(0===a)return null;let s=(e,t,s,n)=>{if(0===e)return null;let l=er===s;return(0,r.jsx)("span",{"data-pressure-seg":s,role:"button",tabIndex:0,"aria-pressed":l,title:`${e} ${n} — click to ${l?"release filter":"highlight"}`,style:{width:`${e/a*100}%`,background:t,height:"100%",cursor:"pointer",boxShadow:l?`inset 0 0 0 1px ${t}, inset 0 0 0 2px rgba(255,255,255,0.6)`:void 0},onClick:e=>{e.stopPropagation(),ea(e=>e===s?null:s)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ea(e=>e===s?null:s))}},s)};return(0,r.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-2 px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20 font-mono",title:`${H} working \xb7 ${e} idle \xb7 ${t} offline`,"data-fleet-pressure":!0,children:[(0,r.jsx)("span",{className:"text-[10px] tracking-wide",children:"pressure"}),(0,r.jsxs)("span",{className:"inline-flex h-1.5 w-16 rounded-full overflow-hidden",style:{background:"rgb(75 85 99 / 0.25)"},children:[s(H,c?"#059669":"#22c55e","working","working"),s(e,c?"#0d9488":"#2dd4bf","idle","idle"),s(t,c?"#94a3b8":"#6b7280","offline","offline")]})]})})(),er&&(0,r.jsxs)("span",{"data-active-filter":"status",className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border anet-fade-in",style:{background:"working"===er?c?"#05966914":"#22c55e1f":"idle"===er?c?"#0d948814":"#2dd4bf1f":c?"#94a3b814":"#6b72801f",color:"working"===er?c?"#047857":"#86efac":"idle"===er?c?"#0f766e":"#5eead4":c?"#475569":"#9ca3af",borderColor:"currentColor"},children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"hidden sm:inline","data-filter-prefix":!0,children:"filter: "}),er]}),(0,r.jsx)("button",{type:"button","aria-label":`Clear ${er} filter`,onClick:()=>ea(null),className:"ml-0.5 leading-none hover:opacity-70",style:{background:"transparent",color:"inherit",cursor:"pointer",padding:0},children:"×"})]}),J&&(0,r.jsxs)("span",{"data-active-filter":"group",className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border anet-fade-in",style:{background:c?"#67e8f914":"#67e8f91f",color:m.legendAccent,borderColor:"currentColor"},children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"hidden sm:inline","data-filter-prefix":!0,children:"filter: "}),J]}),(0,r.jsx)("button",{type:"button","aria-label":`Clear group filter ${J}`,onClick:()=>V(null),className:"ml-0.5 leading-none hover:opacity-70",style:{background:"transparent",color:"inherit",cursor:"pointer",padding:0},children:"×"})]}),Y.length>1&&(0,r.jsx)("span",{className:"hidden sm:inline-flex items-center gap-2 px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20 font-mono",title:"Fleet by model vendor",children:Y.map(e=>(0,r.jsxs)("span",{className:"inline-flex items-baseline gap-0.5",children:[(0,r.jsx)("span",{style:{color:e.color},children:e.initial}),(0,r.jsxs)("span",{className:"text-gray-500",children:[":",e.count]})]},e.initial))}),(l=null!==(n=F.reduce((e,t)=>{if(!t.last_at)return e;let r=(0,u.parseHubTime)(t.last_at);return null===r?e:null===e||r>e?r:e},null))?(0,u.relativeAgo)(new Date(n).toISOString()):null,(0,r.jsxs)("span",{className:"hidden sm:inline px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20",children:[F.length," active link",1===F.length?"":"s",l?(0,r.jsxs)("span",{className:"text-gray-500",children:[" · last ",l]}):null]})),(0,r.jsx)(w,{sessions:e})]})]}),(0,r.jsxs)("div",{ref:el,className:`relative overflow-hidden rounded-lg border shadow-2xl ${c?"shadow-zinc-900/5":"shadow-cyan-950/30"} ${eu?"flex items-center justify-center":""}`,style:{background:m.containerBg,borderColor:m.containerBorder},children:[(0,r.jsx)("div",{className:`absolute inset-x-0 top-0 h-px bg-gradient-to-r ${m.topRailGradient}`}),(0,r.jsxs)("svg",{ref:eo,viewBox:"0 0 1000 680",className:"w-full h-auto block",preserveAspectRatio:"xMidYMid meet",onPointerDown:e=>{0===e.button&&(e.currentTarget.setPointerCapture?.(e.pointerId),eh.current={active:!0,startX:e.clientX,startY:e.clientY,baseX:ec.current.x,baseY:ec.current.y},ej(!0))},onPointerMove:e=>{let t=eh.current;if(!t.active)return;let r=eo.current;if(!r)return;let a=r.getBoundingClientRect(),s=(e.clientX-t.startX)/a.width*1e3,n=(e.clientY-t.startY)/a.height*680;ed(e=>({...e,x:t.baseX+s,y:t.baseY+n}))},onPointerUp:ew,onPointerLeave:ew,onDoubleClick:e=>{let t=e.target;t?.closest("g[data-node]")||eN()},style:{cursor:ev?"grabbing":"grab",touchAction:"none"},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"topo-panel",x1:"0",x2:"1",y1:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:m.panelStops[0]}),(0,r.jsx)("stop",{offset:"48%",stopColor:m.panelStops[1]}),(0,r.jsx)("stop",{offset:"100%",stopColor:m.panelStops[2]})]}),(0,r.jsxs)("radialGradient",{id:"topo-radar",cx:"50%",cy:"50%",r:"55%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:m.radarStops[0].color,stopOpacity:m.radarStops[0].opacity}),(0,r.jsx)("stop",{offset:"45%",stopColor:m.radarStops[1].color,stopOpacity:m.radarStops[1].opacity}),(0,r.jsx)("stop",{offset:"100%",stopColor:m.radarStops[2].color,stopOpacity:m.radarStops[2].opacity})]}),!c&&(0,r.jsxs)("filter",{id:"topo-glow",children:[(0,r.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,r.jsxs)("feMerge",{children:[(0,r.jsx)("feMergeNode",{in:"blur"}),(0,r.jsx)("feMergeNode",{in:"SourceGraphic"})]})]}),[{id:"topo-arrow-s",size:12},{id:"topo-arrow",size:16},{id:"topo-arrow-l",size:22}].map(e=>(0,r.jsx)("marker",{id:e.id,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:e.size,markerHeight:e.size,markerUnits:"userSpaceOnUse",orient:"auto-start-reverse",children:(0,r.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:m.arrowFill})},e.id)),(0,r.jsxs)("radialGradient",{id:"topo-sweep",cx:"0%",cy:"50%",r:"100%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:c?"#0d9488":"#22d3ee",stopOpacity:c?.18:.32}),(0,r.jsx)("stop",{offset:"70%",stopColor:c?"#0d9488":"#22d3ee",stopOpacity:c?.1:.18}),(0,r.jsx)("stop",{offset:"100%",stopColor:c?"#0d9488":"#22d3ee",stopOpacity:"0"})]})]}),(0,r.jsx)("rect",{width:"1000",height:"680",fill:"url(#topo-panel)"}),(0,r.jsxs)("g",{transform:`translate(${ei.x} ${ei.y}) scale(${ei.zoom})`,children:["ring"===z&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:500,cy:330,r:"330",fill:"url(#topo-radar)",style:{pointerEvents:"none"}}),!c&&(0,r.jsx)("g",{opacity:"0.5",style:{pointerEvents:"none"},children:Array.from({length:28}).map((e,t)=>{let a=9301*t+49297;return(0,r.jsx)("circle",{cx:13*a%1e3,cy:7*a%680,r:t%3==0?1.2:.7,fill:"#a5b4fc",opacity:.35+t%4*.05},t)})}),(0,r.jsx)("g",{style:{transformOrigin:"500px 330px",transformBox:"view-box",pointerEvents:"none"},className:"anet-topo-sweep",opacity:c?.7:1,children:(0,r.jsx)("path",{d:`M 500 330 L 830 330 A 330 330 0 0 0 ${500+330*Math.cos(-Math.PI/4.5)} ${330+330*Math.sin(-Math.PI/4.5)} Z`,fill:"url(#topo-sweep)"})}),[90,170,250,330].map(e=>(0,r.jsx)("circle",{cx:500,cy:330,r:e,fill:"none",stroke:m.ringStroke,strokeWidth:"1",opacity:c?.6:.35},e)),(L.length>14?[145,215,285]:L.length>8?[175,260]:L.length>0?[220]:[]).map(e=>(0,r.jsx)("circle",{cx:500,cy:330,r:e,fill:"none",stroke:m.ringStroke,strokeWidth:"0.7",strokeDasharray:"2 8",opacity:c?.32:.42,style:{pointerEvents:"none"},"data-tier-ring":e},`tier-${e}`)),!c&&[0,.25,.5,.75].map((e,t)=>(0,r.jsx)("g",{children:(0,r.jsx)("circle",{cx:830,cy:330,r:0===t?2.8:2.2,fill:"#22d3ee",opacity:.9,filter:"url(#topo-glow)",children:(0,r.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:`${360*e} 500 330`,to:`${360*e+360} 500 330`,dur:"16s",repeatCount:"indefinite"})})},`orbit-${t}`)),[0,30,60,90,120,150].map(e=>(0,r.jsx)("line",{x1:500-360*Math.cos(e*Math.PI/180),y1:330-360*Math.sin(e*Math.PI/180),x2:500+360*Math.cos(e*Math.PI/180),y2:330+360*Math.sin(e*Math.PI/180),stroke:m.ringStroke,strokeWidth:"1",opacity:c?.35:.18},e))]}),"ring"===z&&L.map((e,t)=>{let a=I[e.alias];if(!a)return null;let s=v({x:500,y:330},a,0),n=B.has(e.alias);return(0,r.jsx)("path",{d:s,fill:"none",stroke:n?m.spokeStroke.active:m.spokeStroke.idle,strokeWidth:n?2:1,strokeDasharray:n?"none":"6 14",opacity:n?.7:.45,className:n?void 0:"anet-topo-spoke-flow",style:n?void 0:{animationDelay:`${-(.25*t)}s`}},`hub-${e.alias}`)}),O.map(e=>{let t=q===e.key;return(0,r.jsxs)("g",{"data-group":e.key,className:"transition-opacity",style:{opacity:!q||t?1:.28},children:[(0,r.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:"14",fill:c?"#0f172a":"#a5b4fc",fillOpacity:t?c?.05:.09:c?.025:.045,stroke:t?m.legendAccent:m.ringStroke,strokeWidth:t?2:1.5,strokeDasharray:t?"none":"6 6",style:{transition:"stroke 200ms ease-out, stroke-width 200ms ease-out, fill-opacity 200ms ease-out",pointerEvents:"none"}}),(0,r.jsxs)("g",{role:"button",tabIndex:0,"aria-pressed":J===e.key,"data-group-label-hit":e.key,style:{pointerEvents:"all",cursor:"pointer"},onPointerDown:e=>e.stopPropagation(),onClick:()=>V(t=>t===e.key?null:e.key),children:[(0,r.jsx)("rect",{x:e.x+6,y:e.y+2,width:Math.min(e.w-12,240),height:20,fill:"transparent"}),(0,r.jsxs)("text",{x:e.x+12,y:e.y+14,fill:t?m.legendHeadline:m.legendText,fontSize:"13",fontFamily:"monospace",fontWeight:"700",style:{transition:"fill 200ms ease-out"},"data-group-label":e.key,children:[e.key,(0,r.jsxs)("tspan",{dx:"6",fill:m.legendText,fontSize:"11",fontWeight:"400",children:["· ",e.count]}),e.statuses.working>0&&(0,r.jsxs)("tspan",{dx:"8",fill:c?"#059669":"#22c55e",fontSize:"11",fontWeight:"600",children:[e.statuses.working,"w"]}),e.statuses.idle>0&&(0,r.jsxs)("tspan",{dx:"4",fill:c?"#0d9488":"#2dd4bf",fontSize:"11",fontWeight:"600",children:[e.statuses.idle,"i"]}),e.statuses.offline>0&&(0,r.jsxs)("tspan",{dx:"4",fill:c?"#94a3b8":"#6b7280",fontSize:"11",fontWeight:"600",children:[e.statuses.offline,"o"]})]})]})]},`grp-${e.key}`)}),F.map((e,t)=>{let a=I[e.from],s=I[e.to];if(!a||!s)return null;let n=(t%2==0?1:-1)*Math.min(36,.18*Math.hypot(s.x-a.x,s.y-a.y)),l=v(a,s,n),o=Math.min(2+e.count,7),i=Math.max(.9,2.6/Math.sqrt(e.count)),d=Math.max(.35,1-(e.last_at?Math.max(0,Date.now()-Date.parse(e.last_at)):0)/3e5),x=e.count<=2?"topo-arrow-s":e.count<=4?"topo-arrow":"topo-arrow-l",f=(0,u.relativeAgo)(e.last_at),p=`${e.from} → ${e.to}
|
|
2
2
|
${e.count} message${1===e.count?"":"s"}${f?` \xb7 last ${f}`:""}`,g=Z===e.key,y=W[e.from]??e.from,b=W[e.to]??e.to,j=g?2:Z?.35:U||q?e.from===U||e.to===U?1.7:q&&y===q&&b===q?1.3:.35:1,w=g?Math.min(1.4*o,10):o;return(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{d:l,fill:"none",stroke:"transparent",strokeWidth:Math.max(o+10,16),style:{pointerEvents:"stroke"},"data-edge-hitbox":!0,onMouseEnter:()=>Q(e.key),onMouseLeave:()=>Q(t=>t===e.key?null:t),children:(0,r.jsx)("title",{children:p})}),(0,r.jsx)("path",{d:l,fill:"none",stroke:m.flowEdge,strokeWidth:w,opacity:Math.min(1,(c?.22:.28)*d*j),filter:c?void 0:"url(#topo-glow)",markerEnd:`url(#${x})`,className:"transition-opacity duration-300",style:{pointerEvents:"none"}}),(0,r.jsx)("path",{id:`flow-path-${t}`,d:l,fill:"none",stroke:m.flowPath,strokeWidth:"1",strokeDasharray:"2 12",opacity:Math.min(1,(c?.4:.75)*d*j),className:"transition-opacity duration-300"}),!h&&(0,r.jsx)("circle",{r:"4",fill:m.flowParticle,filter:c?void 0:"url(#topo-glow)",opacity:Math.min(1,d*j),children:(0,r.jsx)("animateMotion",{dur:`${i}s`,repeatCount:"indefinite",path:l})})]},e.key)}),"ring"===z&&(0,r.jsxs)("g",{"data-topo-hub":!0,style:{cursor:"pointer"},onPointerDown:e=>e.stopPropagation(),onClick:()=>{eS(),eg({ts:Date.now(),x:500,y:330,r0:18,color:c?"#059669":"#10b981"}),setTimeout(()=>eg(e=>e&&500===e.x&&330===e.y?null:e),600)},children:[(0,r.jsx)("title",{children:(o=e.length,i=["Network hub",`${o} session${1===o?"":"s"}`],L.length>0&&i.push(`${L.length} online`),H>0&&i.push(`${H} working`),F.length>0&&i.push(`${F.length} active link${1===F.length?"":"s"}`),i.join(" · ")+"\nclick to fit view")}),(0,r.jsx)("circle",{cx:500,cy:330,r:"18",fill:c?"#d1fae5":"#10b981",opacity:c?.42:.12,children:!h&&(0,r.jsx)("animate",{attributeName:"opacity",values:c?"0.32;0.52;0.32":"0.08;0.16;0.08",dur:"4s",repeatCount:"indefinite"})}),(0,r.jsx)("circle",{cx:500,cy:330,r:"10",fill:c?"#059669":"#10b981"}),(0,r.jsx)("circle",{cx:500,cy:330,r:"5",fill:"#d1fae5",opacity:"0.9"})]}),[...L,...R].map((e,a)=>{var s,n;let l,o,i,x,g,b,v,w,N=I[e.alias];if(!N)return null;let S=(e.network_id?t[`${e.network_id}:${e.alias}`]:void 0)??t[e.alias],_="offline"!==e.status||!!S,M=k(e,_,c),C=B.has(e.alias),$=Math.round((_?26:18)*T),z=!X||U===e.alias||ei.zoom>=1.4,E=!q||(W[e.alias]??e.alias)===q;return(0,r.jsxs)("g",{"data-node":e.alias,className:"group transition-opacity anet-fade-in",style:{cursor:"pointer",opacity:en&&!en.has(e.alias)&&em!==e.alias||es&&em!==e.alias&&!("working"===es?"working"===e.status:"idle"===es?_&&"working"!==e.status:!_)?.28:E?em===e.alias||_?1:.6:.32,animationDelay:`${25*Math.min(a,24)}ms`,transform:h||U!==e.alias?void 0:"translateY(-2px)",transition:"transform 180ms cubic-bezier(0.4,0,0.2,1)"},onPointerDown:e=>e.stopPropagation(),onPointerEnter:()=>G(e.alias),onPointerLeave:()=>G(t=>t===e.alias?null:t),onClick:()=>{ef(e.alias),eg({ts:Date.now(),x:N.x,y:N.y,r0:$,color:M.primary}),setTimeout(()=>eg(e=>e&&Date.now()-e.ts>=590?null:e),600)},children:[(l=!_&&e.last_seen_at?(0,u.relativeAgo)(e.last_seen_at):null,(0,r.jsx)("title",{children:[(s=e.model,n=e.runtime,o=p(s),i=y(n),x=[],"unknown"!==o.id&&x.push(o.label),s&&x.push(s),i&&x.push(i.label),x.join(" · ")||e.alias),e.project_dir?`cwd: ${e.project_dir}`:null,l?`last seen: ${l}`:null].filter(Boolean).join("\n")})),(0,r.jsx)("circle",{cx:N.x,cy:N.y,r:$+12,fill:"none",stroke:M.primary,strokeWidth:"2",className:"opacity-0 group-hover:opacity-70 transition-opacity duration-150",style:{pointerEvents:"none"}}),em===e.alias&&(0,r.jsx)("circle",{cx:N.x,cy:N.y,r:$+14,fill:"none",stroke:M.primary,strokeWidth:"2.5",opacity:c?.85:.95,filter:c?void 0:"url(#topo-glow)",className:"transition-opacity duration-200",style:{pointerEvents:"none"}}),C&&!h&&(0,r.jsxs)("circle",{cx:N.x,cy:N.y,r:$+14,fill:M.primary,opacity:c?.08:.12,children:[(0,r.jsx)("animate",{attributeName:"r",values:`${$+8};${$+22};${$+8}`,dur:"2.4s",repeatCount:"indefinite"}),(0,r.jsx)("animate",{attributeName:"opacity",values:c?"0.12;0.02;0.12":"0.18;0.04;0.18",dur:"2.4s",repeatCount:"indefinite"})]}),(0,r.jsx)("circle",{cx:N.x,cy:N.y,r:$+8,fill:M.halo,opacity:_?c?.85:.65:c?.4:.25,className:"transition-[fill,opacity] duration-300 ease-out"}),(0,r.jsx)("circle",{cx:N.x,cy:N.y,r:$,fill:_?m.nodeFill.online:m.nodeFill.offline,stroke:M.primary,strokeWidth:_?3:1.5,strokeDasharray:_?"none":"5 5",filter:_&&!c?"url(#topo-glow)":void 0,className:"transition-[fill,stroke] duration-300 ease-out"}),(()=>{let t=Math.round((_?14:10)*T),a=2*$,s=p(e.model),n=/书生|书小生|intern/i.test(e.alias);if(f||n||s.logo)return(0,r.jsx)("image",{href:s.logo??"/intern_avatar.png",x:N.x-a/2,y:N.y-a/2,width:a,height:a,preserveAspectRatio:"xMidYMid meet"});if("unknown"!==s.id)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:N.x,cy:N.y,r:t,fill:s.mono.bg,stroke:s.mono.ring,strokeWidth:"1"}),(0,r.jsx)("text",{x:N.x,y:N.y,dy:"0.34em",textAnchor:"middle",fill:s.mono.text,fontSize:t,fontFamily:"monospace",fontWeight:"700",children:s.initial})]});let l=(0,d.aliasAvatarColors)(W[e.alias]||e.alias);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:N.x,cy:N.y,r:t,fill:l.bg,stroke:l.ring,strokeWidth:"1"}),(0,r.jsx)("text",{x:N.x,y:N.y,dy:"0.34em",textAnchor:"middle",fill:l.text,fontSize:t,fontFamily:"monospace",fontWeight:"700",children:(0,d.aliasInitial)(e.alias)})]})})(),(()=>{let t=y(e.runtime);if(!t)return null;let a=_?7:5.5,s=N.x+.72*$,n=N.y+.72*$,l=2*a*.62;return(0,r.jsxs)("g",{style:{pointerEvents:"none"},children:[(0,r.jsx)("circle",{cx:s,cy:n,r:a,fill:m.containerBg,stroke:t.color,strokeWidth:"1.5"}),(0,r.jsx)("g",{transform:`translate(${s-l/2} ${n-l/2}) scale(${l/24})`,children:(0,r.jsx)("path",{d:t.iconPath,fill:"none",stroke:t.color,strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})]})})(),"working"===e.status&&(b=(g=S??0)>=4?"0.7s":g>=2?"0.9s":"1.2s",(0,r.jsx)("circle",{cx:N.x,cy:N.y-($-6),r:"2.5",fill:m.flowParticle,"data-pulse-dur":b,opacity:h?.6:void 0,children:!h&&(0,r.jsx)("animate",{attributeName:"opacity",values:"1;0.25;1",dur:b,repeatCount:"indefinite"})})),(w=(v=T<.8)?88:100,z?(0,r.jsxs)("g",{transform:`translate(${N.x}, ${N.y+$+(v?18:22)})`,style:{pointerEvents:"none"},className:"transition-transform duration-200 group-hover:-translate-y-[1.5px]",children:[(0,r.jsx)("rect",{x:-w/2,y:v?-12:-14,width:w,height:v?36:42,rx:"6",fill:m.labelBox.fill,stroke:m.labelBox.stroke,opacity:c?1:.94}),(0,r.jsx)("text",{x:"0",y:"1",textAnchor:"middle",fill:M.text,fontSize:v?11:12,fontFamily:"monospace",fontWeight:"700",children:j(e.alias,v?11:12)}),(0,r.jsxs)("text",{x:"0",y:v?15:17,textAnchor:"middle",fill:M.primary,fontSize:v?8:9,fontFamily:"monospace",children:[M.label,_&&null!=S?` sse:${S}`:""]})]}):(0,r.jsx)("text",{x:N.x,y:N.y+$+(v?12:14),textAnchor:"middle",fill:M.text,fontSize:v?9:10,fontFamily:"monospace",fontWeight:"700",opacity:.9,className:"transition-transform duration-200 group-hover:-translate-y-[1.5px]",style:{pointerEvents:"none",paintOrder:"stroke"},stroke:m.containerBg,strokeWidth:"3",children:j(e.alias,v?9:10)}))]},e.alias)}),ep&&!h&&(0,r.jsxs)("circle",{cx:ep.x,cy:ep.y,r:ep.r0+4,fill:"none",stroke:ep.color,strokeWidth:"2",opacity:"0",style:{pointerEvents:"none"},children:[(0,r.jsx)("animate",{attributeName:"r",values:`${ep.r0+4};${ep.r0+30}`,dur:"0.5s",fill:"freeze"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.7;0",dur:"0.5s",fill:"freeze"})]},ep.ts)]}),(0,r.jsxs)("g",{transform:"translate(16, 16)",children:[(0,r.jsx)("rect",{x:"0",y:"0",width:"230",height:"84",rx:"10",fill:m.legendBox.fill,stroke:m.legendBox.stroke,opacity:c?.97:.92,style:{filter:c?"drop-shadow(0 2px 6px rgba(15,23,42,0.08))":"drop-shadow(0 2px 6px rgba(0,0,0,0.45))"},"data-topo-panel-elevation":"recent"}),(0,r.jsx)("text",{x:"13",y:"21",fill:m.legendHeadline,fontSize:"12",fontFamily:"monospace",fontWeight:"700",children:"recent signal"}),(0,r.jsxs)("text",{x:"150",y:"21",fill:m.legendAccent,fontSize:"10",fontFamily:"monospace",children:[g.length," msgs"]}),0===F.length?(0,r.jsx)("text",{x:"115",y:"60",textAnchor:"middle",fill:m.legendText,fontSize:"10",fontFamily:"monospace",fontStyle:"italic",opacity:.65,"data-recent-signal-empty":!0,children:"no flow yet"}):F.slice(0,3).map((e,t)=>(0,r.jsxs)("g",{"data-recent-row":e.key,style:{cursor:"pointer"},onMouseEnter:()=>Q(e.key),onMouseLeave:()=>Q(t=>t===e.key?null:t),children:[(0,r.jsx)("rect",{x:"6",y:38+16*t-10,width:"218",height:"14",fill:"transparent"}),(0,r.jsxs)("text",{x:"13",y:38+16*t,fill:Z===e.key?m.legendHeadline:m.legendText,fontSize:"9",fontFamily:"monospace",style:{transition:"fill 150ms ease-out"},children:[j(e.from,6)," ","->"," ",j(e.to,6)," / ",e.count," / ",j(e.content,12)]})]},e.key))]}),(0,r.jsxs)("g",{transform:"translate(760, 16)",children:[(0,r.jsx)("rect",{x:"0",y:"0",width:"224",height:"96",rx:"10",fill:m.legendBox.fill,stroke:m.legendBox.stroke,opacity:c?.97:.92,style:{filter:c?"drop-shadow(0 2px 6px rgba(15,23,42,0.08))":"drop-shadow(0 2px 6px rgba(0,0,0,0.45))"},"data-topo-panel-elevation":"legend"}),[{key:"working",y0:24,y1:28,fill:c?"#059669":"#22c55e",label:"working node"},{key:"idle",y0:48,y1:52,fill:c?"#0d9488":"#2dd4bf",label:"online idle"},{key:"offline",y0:72,y1:76,fill:c?"#94a3b8":"#6b7280",label:"offline / no SSE"}].map(e=>{let t=er===e.key;return(0,r.jsxs)("g",{"data-legend-status":e.key,role:"button",tabIndex:0,"aria-pressed":t,style:{cursor:"pointer"},onPointerDown:e=>e.stopPropagation(),onMouseEnter:()=>et(e.key),onMouseLeave:()=>et(t=>t===e.key?null:t),onClick:()=>ea(t=>t===e.key?null:e.key),children:[(0,r.jsx)("rect",{x:"6",y:e.y0-12,width:"170",height:"22",fill:"transparent"}),(0,r.jsx)("circle",{cx:"16",cy:e.y0,r:"5.5",fill:e.fill}),t&&(0,r.jsx)("circle",{cx:"16",cy:e.y0,r:"8",fill:"none",stroke:e.fill,strokeWidth:"1.5"}),(0,r.jsx)("text",{x:"30",y:e.y1,fill:ee===e.key||t?m.legendHeadline:m.legendText,fontSize:"11",fontFamily:"monospace",style:{transition:"fill 150ms ease-out"},children:e.label})]},e.key)}),(0,r.jsx)("path",{d:"M140,72 Q164,48 196,72",fill:"none",stroke:m.flowEdge,strokeWidth:"3",markerEnd:"url(#topo-arrow)",style:{pointerEvents:"none"}})]})]}),(()=>{if(.01>Math.abs(ei.zoom-1)&&1>Math.abs(ei.x)&&1>Math.abs(ei.y)||L.length+R.length===0)return null;let e=-ei.x/ei.zoom*.12,a=-ei.y/ei.zoom*.12058823529411765,s=1e3/ei.zoom*.12,n=680/ei.zoom*.12058823529411765;return(0,r.jsx)("div",{className:"absolute right-3 rounded-md border shadow-lg shadow-black/30 overflow-hidden anet-fade-in",style:{bottom:56,background:m.legendBox.fill,borderColor:m.containerBorder,cursor:"crosshair"},role:"img","aria-label":"Topology minimap — click to recenter",title:"Minimap · click to recenter",onClick:e=>{let t=e.currentTarget.getBoundingClientRect(),r=(e.clientX-t.left)/t.width,a=(e.clientY-t.top)/t.height;ed(e=>({...e,x:500-1e3*r*e.zoom,y:340-680*a*e.zoom}))},"data-topo-minimap":!0,children:(0,r.jsxs)("svg",{width:120,height:82,viewBox:"0 0 120 82",style:{display:"block"},children:[[...L,...R].map(e=>{let a=I[e.alias];if(!a)return null;let s=(e.network_id?t[`${e.network_id}:${e.alias}`]:void 0)??t[e.alias],n="offline"!==e.status||!!s,l=k(e,n,c);return(0,r.jsx)("circle",{cx:.12*a.x,cy:.12058823529411765*a.y,r:n?1.7:1.2,fill:l.primary,opacity:n?.9:.5},e.alias)}),(0,r.jsx)("rect",{x:Math.max(0,e),y:Math.max(0,a),width:Math.max(0,Math.min(120-Math.max(0,e),s)),height:Math.max(0,Math.min(82-Math.max(0,a),n)),fill:"none",stroke:m.legendAccent,strokeWidth:"1",opacity:"0.9"})]})})})(),(0,r.jsxs)("div",{className:"absolute bottom-3 right-3 flex items-center gap-1.5 text-xs select-none",children:[(0,r.jsx)("div",{className:"flex items-center rounded-md border overflow-hidden",style:{background:m.legendBox.fill,borderColor:m.containerBorder},role:"group","aria-label":"Node size",children:[["S",.7],["M",.84],["L",1]].map(([e,t],a)=>(0,r.jsx)("button",{onClick:()=>(e=>{A(e);try{localStorage.setItem("anet-topo-nodescale",String(e))}catch{}})(t),"aria-pressed":T===t,title:`Node size: ${"S"===e?"small":"M"===e?"medium":"large"}`,className:`px-2 py-1 transition-colors ${a>0?"border-l":""} ${T===t?"bg-cyan-500/15 text-cyan-300":"hover:bg-white/5"}`,style:{color:T===t?void 0:m.legendText,borderColor:m.containerBorder},children:e},e))}),(0,r.jsxs)("div",{className:"flex items-center rounded-md border overflow-hidden",style:{background:m.legendBox.fill,borderColor:m.containerBorder},children:[(0,r.jsx)("button",{onClick:()=>ek(1/1.2),className:"px-2 py-1 hover:bg-white/5 transition-colors",style:{color:m.legendText},"aria-label":"Zoom out",title:"Zoom out (−)",children:(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M5 12h14"})})}),(0,r.jsxs)("span",{className:"px-2 py-1 tabular-nums border-x text-center",style:{color:m.legendText,borderColor:m.containerBorder,minWidth:46},title:"Current zoom level",children:[Math.round(100*ei.zoom),"%"]}),(0,r.jsx)("button",{onClick:()=>ek(1.2),className:"px-2 py-1 hover:bg-white/5 transition-colors",style:{color:m.legendText},"aria-label":"Zoom in",title:"Zoom in (+)",children:(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M12 5v14M5 12h14"})})})]}),(0,r.jsx)("button",{onClick:eN,className:"p-1.5 rounded-md border hover:bg-white/5 transition-colors",style:{background:m.legendBox.fill,borderColor:m.containerBorder,color:m.legendText},"aria-label":"Reset view",title:"Reset zoom + pan (0, or double-click the canvas)",children:(0,r.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,r.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9 9 0 0 0-6.4 2.6L3 8"}),(0,r.jsx)("path",{d:"M3 3v5h5"})]})}),(0,r.jsx)("button",{onClick:()=>{let e=el.current;if(e)if(document.fullscreenElement)document.exitFullscreen?.();else{let t=e.requestFullscreen||e.webkitRequestFullscreen;t?.call(e)}},className:"p-1.5 rounded-md border hover:bg-white/5 transition-colors",style:{background:m.legendBox.fill,borderColor:m.containerBorder,color:m.legendText},"aria-label":eu?"Exit fullscreen":"Enter fullscreen",title:eu?"Exit fullscreen":"Fullscreen",children:eu?(0,r.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M8 3v4a1 1 0 0 1-1 1H3M21 8h-4a1 1 0 0 1-1-1V3M3 16h4a1 1 0 0 1 1 1v4M16 21v-4a1 1 0 0 1 1-1h4"})}):(0,r.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M3 8V5a2 2 0 0 1 2-2h3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M21 16v3a2 2 0 0 1-2 2h-3"})})})]}),em&&(0,r.jsx)(x,{alias:em,onClose:()=>ef(null)})]})]})}let z={working:{bg:"bg-green-900/30 border-green-800/30",text:"text-green-300",dot:"bg-green-500",glow:"shadow-green-500/10"},idle:{bg:"bg-cyan-900/30 border-cyan-800/30",text:"text-cyan-300",dot:"bg-cyan-400",glow:"shadow-cyan-500/5"},blocked:{bg:"bg-yellow-900/30 border-yellow-800/30",text:"text-yellow-300",dot:"bg-yellow-500",glow:""},error:{bg:"bg-red-900/30 border-red-800/30",text:"text-red-300",dot:"bg-red-500",glow:""}},E={bg:"bg-gray-800/50 border-gray-700/30",text:"text-gray-500",dot:"bg-gray-500",glow:""};function P({session:e,hasSse:t,sseCount:a,onChat:l}){let o=t&&z[e.status]||E;return(0,r.jsxs)(s.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,prefetch:!1,className:`anet-agent-card group relative block rounded-xl border p-4 transition-all duration-300 cursor-pointer hover:-translate-y-0.5 ${t?`bg-[#111128] border-[#2a2a4a] hover:border-cyan-500/30 hover:shadow-lg ${o.glow}`:"bg-[#0d0d1a] border-[#1a1a2a] opacity-40"}`,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)(d.AliasAvatar,{alias:e.alias,size:22}),(0,r.jsx)("span",{className:"font-semibold text-white truncate text-sm",title:e.alias,children:e.alias}),(0,r.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${o.dot} ${t&&"working"===e.status?"animate-pulse":""}`})]}),(0,r.jsx)("span",{className:`text-[11px] px-2 py-0.5 rounded-md border shrink-0 ${o.bg} ${o.text}`,children:t?e.status:"offline"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("span",{className:"text-xs text-gray-600 bg-[#0a0a15] px-2 py-0.5 rounded border border-[#1a1a2a]",children:e.agent||"unknown"}),t&&(0,r.jsxs)("span",{className:"text-[10px] text-green-500",children:["SSE:",a]})]}),e.task?(0,r.jsx)("div",{className:"text-xs text-gray-400 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] line-clamp-2",title:e.task,children:e.task}):(0,r.jsx)("div",{className:"text-xs text-gray-700 italic",children:"No active task"}),e.progress>0&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsxs)("div",{className:"flex justify-between text-[10px] mb-1",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Progress"}),(0,r.jsxs)("span",{className:o.text,children:[e.progress,"%"]})]}),(0,r.jsx)("div",{className:"w-full bg-gray-800 rounded-full h-1.5 overflow-hidden",children:(0,r.jsx)("div",{className:`h-1.5 rounded-full transition-all duration-700 ${"working"===e.status?"bg-green-500":"bg-cyan-500"}`,style:{width:`${Math.min(e.progress,100)}%`}})})]}),(0,r.jsxs)("div",{className:"mt-3 flex justify-between items-center text-[10px] text-gray-600",children:[(0,r.jsx)("span",{className:"truncate",title:e.server||"",children:e.server||"--"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[l&&t&&(0,r.jsx)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),l(e.alias)},className:"text-cyan-400 hover:text-cyan-300 px-1.5 py-0.5 rounded border border-cyan-500/20 hover:bg-cyan-500/10 transition-colors",children:"Chat"}),(0,r.jsx)("span",{children:(0,n.timeAgo)(e.updated_at)}),(0,r.jsx)("svg",{"aria-hidden":!0,className:"w-3 h-3 text-gray-700 opacity-0 -translate-x-1 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})]})]})]})}function T({messages:e}){return 0===e.length?null:(0,r.jsxs)("div",{className:"mt-8",children:[(0,r.jsxs)("h2",{className:"text-lg font-semibold text-white mb-3 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-gray-500",children:"Inbox"}),(0,r.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:e.length})]}),(0,r.jsx)("div",{className:"space-y-2 max-h-96 overflow-y-auto pr-1 scrollbar-thin",children:e.map(e=>(0,r.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm transition-colors hover:border-[#3a3a5a]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs mb-1.5",children:[e.from_session&&(0,r.jsx)(d.AliasAvatar,{alias:e.from_session,size:16}),(0,r.jsx)("span",{className:"text-gray-200 font-medium truncate",children:e.from_session}),(0,r.jsx)("span",{className:"ml-auto text-gray-600 shrink-0",title:e.created_at,children:(0,n.timeAgo)(e.created_at)})]}),(0,r.jsx)("div",{className:"text-gray-300 leading-relaxed line-clamp-3",title:e.content||"",children:(0,n.previewContent)(e.content)})]},e.id))})]})}function A(){return(0,r.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8 anet-skeleton-pulse",children:[1,2,3,4].map(e=>(0,r.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-4 py-3",children:[(0,r.jsx)(L,{w:"2.5rem",h:"1.75rem"}),(0,r.jsx)(L,{w:"3.5rem",h:"0.75rem",className:"mt-2"}),(0,r.jsx)(L,{w:"5rem",h:"0.625rem",className:"mt-1"})]},e))}),(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-3 anet-skeleton-pulse",children:[(0,r.jsx)(L,{w:"6rem",h:"2.5rem",rounded:"0.75rem"}),(0,r.jsxs)("div",{className:"flex-1 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-2.5 flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full anet-skeleton-bar"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(L,{w:"6rem",h:"0.875rem"}),(0,r.jsx)(L,{w:"10rem",h:"0.625rem",className:"mt-1"})]})]})]}),(0,r.jsx)("div",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 anet-skeleton-pulse",children:(0,r.jsx)(L,{w:"14rem",h:"0.875rem"})}),(0,r.jsx)("div",{className:"grid grid-cols-3 gap-2 sm:gap-3 mb-3 anet-skeleton-pulse",children:[1,2,3].map(e=>(0,r.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-3",children:[(0,r.jsx)(L,{w:"2rem",h:"1.25rem"}),(0,r.jsx)(L,{w:"2.5rem",h:"0.75rem",className:"mt-1"}),(0,r.jsx)(L,{w:"3.5rem",h:"0.625rem",className:"mt-px"})]},e))}),(0,r.jsx)("div",{className:"grid grid-cols-3 gap-2 sm:gap-3 mb-6 anet-skeleton-pulse",children:[1,2,3].map(e=>(0,r.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-2.5 flex items-center justify-center gap-2",children:[(0,r.jsx)("div",{className:"w-4 h-4 rounded anet-skeleton-bar"}),(0,r.jsx)(L,{w:"4rem",h:"0.75rem"})]},e))}),(0,r.jsxs)("div",{className:"mb-6 flex gap-2 anet-skeleton-pulse",children:[(0,r.jsx)("div",{className:"flex-1 h-10 rounded-lg border border-[#2a2a4a] bg-[#111128]"}),(0,r.jsx)("div",{className:"w-28 h-10 rounded-lg anet-skeleton-bar"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4 anet-skeleton-pulse",children:[1,2,3,4].map(e=>(0,r.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("div",{className:"w-2 h-2 rounded-full anet-skeleton-bar"}),(0,r.jsx)(L,{w:"6rem",h:"0.875rem"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(L,{w:"100%",h:"0.625rem"}),(0,r.jsx)(L,{w:"75%",h:"0.625rem"}),(0,r.jsx)(L,{w:"55%",h:"0.625rem"})]})]},e))})]})}function L({w:e,h:t,rounded:a,className:s}){return(0,r.jsx)("div",{className:`anet-skeleton-bar ${s||""}`,style:{width:e,height:t,borderRadius:a||"0.375rem"}})}var R=e.i(76161),I=e.i(98025),F=e.i(11449);function B(){let{setNetworkId:e}=(0,F.useNetworkId)(),[t,s]=(0,a.useState)({user:null,networks:[],currentNetwork:"",token:""}),[n,l]=(0,a.useState)(!1),[o,i]=(0,a.useState)(""),[d,c]=(0,a.useState)(""),[h,u]=(0,a.useState)(""),[x,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=sessionStorage.getItem("anet_v3_auth");if(e)try{s(JSON.parse(e))}catch{}},[]);let[f,p]=(0,a.useState)(!1),[g,y]=(0,a.useState)(""),[b,v]=(0,a.useState)(""),j=async()=>{try{await fetch(`/api/hub/auth?token=${t.token}&endpoint=/api/auth/me`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update_profile",token:t.token,display_name:g,email:b})});let e=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update_profile",token:t.token,display_name:g,email:b})}),r=await e.json();if(r.ok&&r.user){let e={...t,user:r.user};s(e),sessionStorage.setItem("anet_v3_auth",JSON.stringify(e)),p(!1)}}catch{}};if(!t.user)return null;let w=(t.user.display_name||t.user.username).slice(0,2).toUpperCase();return(0,r.jsxs)("div",{className:"flex items-center justify-between bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-2.5 mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center text-xs font-bold text-white",children:w}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-white font-medium",children:t.user.display_name||t.user.username}),(0,r.jsxs)("div",{className:"text-[10px] text-gray-500",children:[t.user.role," · ",t.user.user_id]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[t.networks.length>0&&(0,r.jsx)("select",{value:t.currentNetwork,onChange:r=>{let a={...t,currentNetwork:r.target.value};s(a),e(r.target.value),sessionStorage.setItem("anet_v3_auth",JSON.stringify(a))},className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white focus:outline-none",children:t.networks.map(e=>(0,r.jsx)("option",{value:e.network_id,children:e.network_name},e.network_id))}),(0,r.jsxs)("button",{onClick:()=>{y(t.user?.display_name||""),v(""),p(!f)},className:"text-xs text-gray-500 hover:text-gray-300 whitespace-nowrap","aria-label":"Edit profile",children:[(0,r.jsx)("span",{className:"hidden sm:inline",children:"Edit"}),(0,r.jsx)("svg",{className:"sm:hidden w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.862 4.487z"})})]}),(0,r.jsxs)("button",{onClick:()=>{s({user:null,networks:[],currentNetwork:"",token:""}),sessionStorage.removeItem("anet_v3_auth")},className:"text-xs text-gray-500 hover:text-gray-300 whitespace-nowrap","aria-label":"Sign out",children:[(0,r.jsx)("span",{className:"hidden sm:inline",children:"Sign out"}),(0,r.jsx)("svg",{className:"sm:hidden w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})})]})]}),f&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-2 pt-2 border-t border-[#2a2a4a]",children:[(0,r.jsx)("input",{type:"text",value:g,onChange:e=>y(e.target.value),placeholder:"Display name",className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-32"}),(0,r.jsx)("input",{type:"email",value:b,onChange:e=>v(e.target.value),placeholder:"Email",className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-40"}),(0,r.jsx)("button",{onClick:j,className:"px-2 py-1 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded",children:"Save"})]})]})}var W=e.i(6694);function O({tabs:e,activeTab:t,onOpenTab:a,onCloseTab:s,onSetActive:n,onClose:l}){return 0===e.length?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{onClick:l,className:"jsx-f7cf3d1a6fdfc074 fixed inset-0 bg-black/30 z-40 lg:hidden"}),(0,r.jsxs)("div",{className:"jsx-f7cf3d1a6fdfc074 fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 animate-slide-in",children:[(0,r.jsxs)("div",{className:"jsx-f7cf3d1a6fdfc074 flex items-center border-b border-[#2a2a4a] bg-[#0d0d1a] overflow-x-auto",children:[(0,r.jsx)("div",{className:"jsx-f7cf3d1a6fdfc074 flex-1 flex min-w-0",children:e.map(e=>(0,r.jsxs)("button",{onClick:()=>n(e),className:`jsx-f7cf3d1a6fdfc074 flex items-center gap-1.5 px-3 py-2.5 text-xs border-b-2 transition-colors shrink-0 ${t===e?"border-cyan-400 text-cyan-300 bg-cyan-500/5":"border-transparent text-gray-500 hover:text-gray-300"}`,children:[(0,r.jsx)("div",{className:`jsx-f7cf3d1a6fdfc074 w-2 h-2 rounded-full ${t===e?"bg-cyan-400":"bg-gray-600"}`}),(0,r.jsx)("span",{className:"jsx-f7cf3d1a6fdfc074 max-w-[80px] truncate",children:e}),(0,r.jsx)("button",{onClick:t=>{t.stopPropagation(),s(e)},className:"jsx-f7cf3d1a6fdfc074 ml-1 text-gray-600 hover:text-gray-300 p-0.5",children:"×"})]},e))}),(0,r.jsx)("button",{onClick:l,className:"jsx-f7cf3d1a6fdfc074 text-gray-500 hover:text-white px-3 py-2.5 shrink-0 border-l border-[#2a2a4a]",children:(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-f7cf3d1a6fdfc074 w-4 h-4",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-f7cf3d1a6fdfc074"})})})]}),(0,r.jsx)("div",{className:"jsx-f7cf3d1a6fdfc074 flex-1 relative overflow-hidden",children:e.map(e=>(0,r.jsx)("div",{className:`jsx-f7cf3d1a6fdfc074 absolute inset-0 ${t===e?"block":"hidden"}`,children:(0,r.jsx)(D,{alias:e})},e))})]}),(0,r.jsx)(W.default,{id:"f7cf3d1a6fdfc074",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}function D({alias:e}){return(0,r.jsx)(c.TaskChatPanel,{alias:e,onClose:()=>{},inline:!0})}function H({sessions:e,onClose:t}){let[s,n]=(0,a.useState)(new Set),[l,o]=(0,a.useState)(""),[i,c]=(0,a.useState)("normal"),[h,u]=(0,a.useState)(!1),[x,m]=(0,a.useState)([]),[f,p]=(0,a.useState)(""),g=e.filter(e=>"offline"!==e.status).filter(e=>!f||e.alias.toLowerCase().includes(f.toLowerCase())||(e.agent||"").toLowerCase().includes(f.toLowerCase())),y=async()=>{if(!l.trim()||0===s.size||h)return;u(!0),m([]);let e=[...s].map(async e=>{try{let t=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:e,task:l,priority:i})}),r=await t.json();return{alias:e,ok:!!r.ok,error:r.error}}catch(t){return{alias:e,ok:!1,error:"send failed"}}});m(await Promise.all(e)),u(!1)},b=x.filter(e=>e.ok).length;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black/50 z-40 anet-fade-in",onClick:t}),(0,r.jsxs)("div",{className:"fixed inset-4 lg:inset-x-[15%] lg:inset-y-[5%] bg-[#0a0a1a] border border-[#2a2a4a] rounded-2xl z-50 flex flex-col shadow-2xl shadow-black/70 overflow-hidden anet-fade-in",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-bold text-white",children:"Dispatch Task"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Send a task to one or more agents"})]}),(0,r.jsx)("button",{onClick:t,className:"text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col lg:flex-row overflow-hidden",children:[(0,r.jsxs)("div",{className:"lg:w-[280px] border-b lg:border-b-0 lg:border-r border-[#2a2a4a] flex flex-col",children:[(0,r.jsxs)("div",{className:"px-4 py-3 border-b border-[#2a2a4a]",children:[(0,r.jsx)("input",{type:"text",value:f,onChange:e=>p(e.target.value),placeholder:"Filter agents...",className:"w-full bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,r.jsx)("button",{onClick:()=>{s.size===g.length?n(new Set):n(new Set(g.map(e=>e.alias)))},className:"text-[10px] text-cyan-400 hover:text-cyan-300",children:s.size===g.length?"Deselect all":`Select all (${g.length})`}),(0,r.jsxs)("span",{className:"text-[10px] text-gray-600",children:[s.size," selected"]})]})]}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 py-2 space-y-0.5 max-h-[200px] lg:max-h-none",children:[g.map(e=>(0,r.jsxs)("button",{onClick:()=>{var t;return t=e.alias,void n(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs text-left transition-colors ${s.has(e.alias)?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20":"text-gray-400 hover:bg-[#1a1a2a]"}`,children:[(0,r.jsx)(d.AliasAvatar,{alias:e.alias,size:16}),(0,r.jsx)("div",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${"working"===e.status?"bg-green-400":"idle"===e.status?"bg-cyan-400":"bg-gray-500"}`}),(0,r.jsx)("span",{className:"truncate flex-1",children:e.alias}),(0,r.jsx)("span",{className:"text-[9px] text-gray-600",children:e.agent||"--"})]},e.alias)),0===g.length&&(0,r.jsx)("div",{className:"text-center text-xs text-gray-600 py-4",children:"No online agents"})]})]}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,r.jsxs)("div",{className:"flex-1 px-6 py-4 flex flex-col",children:[(0,r.jsx)("label",{className:"text-xs text-gray-500 uppercase mb-2",children:"Task Prompt"}),(0,r.jsx)("textarea",{value:l,onChange:e=>o(e.target.value),placeholder:"Enter the task you want to dispatch...",className:"flex-1 min-h-[120px] bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none"}),(0,r.jsxs)("div",{className:"flex items-center gap-3 mt-4",children:[(0,r.jsxs)("select",{value:i,onChange:e=>c(e.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white focus:outline-none",children:[(0,r.jsx)("option",{value:"normal",children:"Normal priority"}),(0,r.jsx)("option",{value:"high",children:"High priority"}),(0,r.jsx)("option",{value:"low",children:"Low priority"})]}),(0,r.jsx)("div",{className:"flex-1"}),(0,r.jsx)("button",{onClick:y,disabled:h||!l.trim()||0===s.size,className:"px-6 py-2.5 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-xl transition-all shadow-lg shadow-cyan-500/10 disabled:shadow-none active:scale-95",children:h?(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Sending..."]}):`Dispatch to ${s.size} agent${s.size>1?"s":""}`})]})]}),x.length>0&&(0,r.jsxs)("div",{className:"px-6 py-3 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,r.jsxs)("div",{className:"text-xs text-gray-500 mb-2",children:[b,"/",x.length," dispatched successfully"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:x.map(e=>(0,r.jsxs)("span",{className:`flex items-center gap-1.5 text-[10px] pl-1 pr-2 py-0.5 rounded-full border ${e.ok?"text-green-300 border-green-500/20 bg-green-500/5":"text-red-300 border-red-500/20 bg-red-500/5"}`,children:[(0,r.jsx)(d.AliasAvatar,{alias:e.alias,size:14}),(0,r.jsx)("span",{children:e.alias}),(0,r.jsx)("span",{"aria-hidden":!0,children:e.ok?"✓":e.error||"✗"})]},e.alias))})]})]})]})]})]})}var Y=e.i(2684),X=e.i(50111);e.s(["default",0,function(){let e,o,c,u,x;(0,a.useEffect)(()=>{sessionStorage.getItem("anet_v3_auth")||(fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login"))},[]);let{sessions:m,hint:f,error:p,isLoading:g}=(0,h.useSessions)(),{health:y}=(0,h.useHealth)(),{config:b}=(0,h.useAnetConfig)(),{tasks:v}=(0,h.useTasks)({limit:"500"}),{stats:j}=(0,h.useStats)(),[w,k]=(0,a.useState)(window.innerWidth>=1024),[N,S]=(0,a.useState)(!1),_=function(){let[e,t]=(0,a.useState)([]),[r,s]=(0,a.useState)("");return{tabs:e,activeTab:r,openTab:e=>{t(t=>t.includes(e)?t:[...t,e]),s(e)},closeTab:e=>{t(t=>{let a=t.filter(t=>t!==e);return r===e&&s(a[a.length-1]||""),a})},closeAll:()=>{t([]),s("")},setActiveTab:s}}(),[M,C]=(0,a.useState)(!1),[z,E]=(0,a.useState)([]),[L,F]=(0,a.useState)("all"),[W,D]=(0,a.useState)(null),{mutate:U}=(0,X.useSWRConfig)(),G="1"!==t.default.env.NEXT_PUBLIC_DISABLE_SSE,{connected:K,supported:J}=(0,Y.useSSE)({url:"/api/hub/events",enabled:G,onEvent:e=>{if("node.renamed"===e.type){U("/api/hub/status");let t=e.data;t?.old_alias&&t?.new_alias&&D({from:t.old_alias,to:t.new_alias,ts:Date.now()});return}["new_task","new_message","new_reply","node_status_changed","broadcast"].includes(e.type)&&(U("/api/hub/status"),U(e=>"string"==typeof e&&e.startsWith("/api/hub/tasks"),void 0,{revalidate:!0}))}});if((0,a.useEffect)(()=>{let e=()=>{fetch("/api/hub/inbox").then(e=>e.json()).then(e=>{e.messages?.length&&E(t=>{let r=new Set(t.map(e=>e.id));return[...e.messages.filter(e=>!r.has(e.id)),...t].slice(0,100)})}).catch(()=>{})};e();let t=setInterval(e,1e4);return()=>clearInterval(t)},[]),g)return(0,r.jsx)(A,{});let V=y?.sse_sessions||{},q=e=>(e.network_id?V[`${e.network_id}:${e.alias}`]:void 0)??V[e.alias],Z=e=>"offline"!==e.status||!!q(e),Q=m.filter(Z).length,ee=m.length,et=m.filter(e=>"working"===e.status).length,er=y?(0,n.formatUptime)(y.uptime):"--",ea=y?.version||"--",es=!!(b?.hub&&b.tokenConfigured),en=b?.source==="file"?"Local config":b?.source==="runtime-env"?"Runtime env":"Config missing",el={};if(j?.tasks?.by_status?.length)for(let e of j.tasks.by_status)el[e.status]=e.count;else for(let e of v)el[e.status]=(el[e.status]||0)+1;let eo=[...m].sort((e,t)=>{let r=+!!Z(e),a=+!!Z(t);if(r!==a)return a-r;let s=+("working"===e.status);return("working"===t.status)-s}),ei=0===m.length&&!p;return(0,r.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,r.jsx)("div",{className:"lg:ml-0 ml-10",children:(0,r.jsx)(l,{online:Q,working:et,total:ee,version:ea,uptime:er})}),(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[!ei&&(0,r.jsx)("button",{onClick:()=>C(!0),className:"px-4 py-2 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 text-white text-sm font-medium rounded-xl shadow-lg shadow-cyan-500/10 transition-all active:scale-95 shrink-0",children:"⚡ Dispatch"}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(B,{})})]}),(0,r.jsxs)("section",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 shadow-lg shadow-black/20",children:[(0,r.jsxs)("button",{onClick:()=>S(!N),className:"w-full flex items-center justify-between text-left",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,r.jsx)("span",{className:"uppercase text-gray-600",children:"Config"}),(0,r.jsx)("span",{className:`w-2 h-2 rounded-full ${es?"bg-green-400":"bg-red-400"}`}),(0,r.jsx)("span",{className:"text-gray-500",children:en})]}),(0,r.jsx)("svg",{className:`w-4 h-4 text-gray-600 transition-transform ${N?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),N&&(0,r.jsxs)("div",{className:"mt-3 pt-3 border-t border-[#2a2a4a]",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsxs)("div",{className:"text-gray-100 truncate text-sm",title:b?.hub||void 0,children:["Hub: ",(0,r.jsx)("span",{className:b?.hub?"text-cyan-300":"text-red-300",children:b?.hub?.trim()||"not configured"})]})}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-xs",children:(0,r.jsxs)("span",{className:`px-2.5 py-1 rounded-md border ${b?.tokenConfigured?"bg-blue-500/5 text-blue-300 border-blue-500/20":"bg-gray-500/5 text-gray-400 border-gray-500/20"}`,children:["Token: ",b?.tokenPreview||"not configured"]})})]}),b?.error&&(0,r.jsx)("div",{className:"mt-2 text-xs text-gray-600",children:b.error})]})]}),Object.keys(el).length>0&&(0,r.jsxs)("section",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 shadow-lg shadow-black/20",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("div",{className:"text-xs uppercase text-gray-600",children:"Task Status"}),(0,r.jsx)(s.default,{href:"/tasks",prefetch:!1,className:"text-xs text-cyan-400 hover:text-cyan-300",children:"View all →"})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:["running","delivered","acked","replied","created","failed","cancelled","expired","closed"].filter(e=>el[e]).map(e=>(0,r.jsxs)(s.default,{href:`/tasks?status=${e}`,prefetch:!1,className:`px-2.5 py-1 rounded-md border text-xs ${I.STATUS_CHIP_CLASS[e]} hover:opacity-80 transition-opacity`,children:[e,": ",el[e]]},e))})]}),!ei&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-2",children:"Quick navigation"}),(0,r.jsx)("section",{className:"mb-3 grid grid-cols-3 gap-2 sm:gap-3",children:(e=m.filter(e=>Z(e)&&"working"!==e.status).length,o=ee-Q,c=v.filter(e=>"failed"===e.status).length,[{href:"/nodes",label:"Nodes",value:`${Q}/${ee}`,sub:`${ee>0?Math.round(Q/ee*100):0}% online`,color:"text-green-400 border-green-500/20",popover:0===ee?null:[{k:"working",v:et,dot:"",color:"#4ade80"},{k:"idle",v:e,dot:"",color:"#22d3ee"},{k:"offline",v:o,dot:"",color:"#9ca3af"}]},{href:"/tasks",label:"Tasks",value:String(Object.values(el).reduce((e,t)=>e+t,0)||0),sub:"all-time",color:"text-cyan-400 border-cyan-500/20",popover:0===Object.keys(el).length?null:["running","replied","failed","cancelled","expired","closed","created","delivered","acked"].filter(e=>el[e]).map(e=>({k:e,v:el[e],dot:"",color:({running:"#4ade80",replied:"#a78bfa",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c",closed:"#9ca3af",created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee"})[e]||"#9ca3af"}))},{href:"/tasks?status=failed",label:"Failed",value:String(el.failed||0),sub:el.failed?"needs review":"none",color:el.failed?"text-red-400 border-red-500/25":"text-gray-500 border-gray-700/30",popover:c?[{k:`${c} in current view`,v:"",dot:"",color:"#f87171"}]:[{k:"no failures yet",v:"",dot:"",color:"#4b5563"}]}].map(e=>(0,r.jsxs)(s.default,{href:e.href,prefetch:!1,className:`anet-stat-link group relative rounded-xl border ${e.color} bg-[#111128] px-3 py-3 transition-all hover:-translate-y-px`,children:[(0,r.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("div",{className:`text-xl font-semibold tabular-nums ${e.color.split(" ")[0]}`,children:e.value}),(0,r.jsx)("div",{className:"hidden sm:block text-[10px] text-gray-600 group-hover:text-gray-400 transition-colors",children:"View →"})]}),(0,r.jsx)("div",{className:"text-[11px] text-gray-400 mt-0.5",children:e.label}),(0,r.jsx)("div",{className:"text-[10px] text-gray-600 mt-px",children:e.sub}),e.popover&&e.popover.length>0&&(0,r.jsxs)("div",{className:"anet-stat-popover hidden md:block pointer-events-none absolute left-2 right-2 top-full mt-1 z-20 rounded-lg border border-[#2a2a4a] bg-[#0d0d1a] shadow-lg shadow-black/30 px-3 py-2 opacity-0 translate-y-[-2px] group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-150 delay-100",children:[(0,r.jsx)("div",{className:"text-[10px] text-gray-600 uppercase tracking-wider mb-1.5",children:"Breakdown"}),(0,r.jsx)("ul",{className:"space-y-1",children:e.popover.map(e=>(0,r.jsxs)("li",{className:"flex items-center gap-2 text-[11px]",children:[(0,r.jsx)("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:e.color},"aria-hidden":!0}),(0,r.jsx)("span",{className:"text-gray-400 capitalize",children:e.k}),""!==e.v&&(0,r.jsx)("span",{className:"ml-auto text-gray-300 tabular-nums font-medium",children:e.v})]},e.k))})]})]},e.href)))}),(0,r.jsx)("section",{className:"mb-6 grid grid-cols-3 gap-2 sm:gap-3",children:[{href:"/messages",label:"Messages",icon:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"},{href:"/logs",label:"Audit log",icon:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8"},{href:"/admin",label:"Admin",icon:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4z M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"}].map(e=>(0,r.jsxs)(s.default,{href:e.href,prefetch:!1,className:"anet-nav-tile flex items-center justify-center gap-2 rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-2.5 text-[12px] text-gray-400 hover:text-gray-200 transition-colors",children:[(0,r.jsx)("svg",{className:"w-4 h-4 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:e.icon})}),(0,r.jsx)("span",{children:e.label})]},e.href))}),(0,r.jsx)(i,{}),v.length>0&&(0,r.jsxs)("section",{className:"mb-6 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Recent Activity"}),(0,r.jsx)(s.default,{href:"/tasks",className:"text-xs text-cyan-400 hover:text-cyan-300",children:"All tasks →"})]}),(0,r.jsx)("div",{className:"space-y-2 max-h-40 overflow-y-auto",children:v.slice(0,5).map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:I.STATUS_DOT_HEX[e.status]||"#6b7280"}}),e.from_name&&(0,r.jsx)(d.AliasAvatar,{alias:e.from_name,size:14}),(0,r.jsx)("span",{className:"text-gray-300 shrink-0 max-w-[20%] truncate",children:e.from_name||"?"}),(0,r.jsx)("span",{className:"text-gray-600",children:"→"}),e.to_name&&(0,r.jsx)(d.AliasAvatar,{alias:e.to_name,size:14}),(0,r.jsx)("span",{className:"text-gray-300 shrink-0 max-w-[20%] truncate",children:e.to_name||"?"}),(0,r.jsx)("span",{className:"text-gray-500 truncate flex-1",title:e.content||"",children:(0,n.previewContent)(e.content).slice(0,60)}),(0,r.jsx)("span",{className:`shrink-0 px-1.5 py-0.5 rounded text-[10px] border ${I.STATUS_CHIP_CLASS[e.status]||"text-gray-500 border-gray-700/30"}`,children:e.status})]},e.task_id))})]})]}),p&&(0,r.jsxs)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-3 rounded-lg mb-6 text-sm flex items-center justify-between",role:"alert",children:[(0,r.jsx)("span",{children:String(p)}),(0,r.jsx)("span",{className:"text-gray-500 text-xs",children:"Check CommHub connection"})]}),m.length>0&&(0,r.jsx)("div",{className:"flex justify-center mb-4",children:(0,r.jsx)("button",{onClick:()=>k(!w),className:"text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-4 py-1.5 rounded-lg transition-colors hover:border-gray-600 cursor-pointer",children:w?"Hide Topology":"Show Topology"})}),!w&&m.length>0&&(0,r.jsx)("div",{className:"lg:hidden text-center text-xs text-gray-600 mb-4",children:"Topology hidden on mobile for better readability"}),w&&m.length>0&&(0,r.jsx)($,{sessions:m,sseSessions:V,renameSignal:W}),0!==m.length||p?(u={all:eo.length,working:eo.filter(e=>Z(e)&&"working"===e.status).length,idle:eo.filter(e=>Z(e)&&"working"!==e.status).length,offline:eo.filter(e=>!Z(e)).length},x=eo.filter(e=>"all"===L||("offline"===L?!Z(e):"working"===L?Z(e)&&"working"===e.status:"idle"!==L||Z(e)&&"working"!==e.status)),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-3 flex flex-wrap items-center gap-1",children:[{key:"all",label:"All"},{key:"working",label:"Working",dot:"#4ade80"},{key:"idle",label:"Idle",dot:"#22d3ee"},{key:"offline",label:"Offline",dot:"#6b7280"}].map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>F(e.key),disabled:0===u[e.key]&&"all"!==e.key,className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-30 disabled:cursor-not-allowed ${L===e.key?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/30":"text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] border border-transparent"}`,children:[e.dot&&(0,r.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:e.dot}}),(0,r.jsx)("span",{children:e.label}),(0,r.jsx)("span",{className:`text-[10px] tabular-nums ${L===e.key?"text-cyan-400":"text-gray-600"}`,children:u[e.key]})]},e.key))}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4",children:x.map(e=>(0,r.jsx)(P,{session:e,hasSse:Z(e),sseCount:q(e)||0,onChat:_.openTab},e.alias))}),0===x.length&&(0,r.jsxs)("div",{className:"mt-4 text-center text-xs text-gray-600",children:['No agents match "',L,'" — ',(0,r.jsx)("button",{onClick:()=>F("all"),className:"underline hover:text-gray-400",children:"Show all"})]})]})):(0,r.jsx)(R.NodesEmptyState,{hint:f,taskHistoryCount:Object.values(el).reduce((e,t)=>e+t,0)}),(0,r.jsx)(T,{messages:z}),(0,r.jsx)("div",{className:"mt-8 text-center text-xs text-gray-600 flex items-center justify-center gap-2 flex-wrap",children:J&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${K?"bg-green-400":"bg-gray-600"}`}),K?"SSE live":"SWR polling"]})}),M&&(0,r.jsx)(H,{sessions:m,onClose:()=>C(!1)}),_.tabs.length>0&&(0,r.jsx)(O,{tabs:_.tabs,activeTab:_.activeTab,onOpenTab:_.openTab,onCloseTab:_.closeTab,onSetActive:_.setActiveTab,onClose:_.closeAll})]})}],18722)}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":263,"timestamp":30512788827,"id":4,"parentId":1,"tags":{},"startTime":1778838485035,"traceId":"c2331030493c9bc7"},{"name":"load-custom-routes","duration":456,"timestamp":30512789230,"id":5,"parentId":1,"tags":{},"startTime":1778838485036,"traceId":"c2331030493c9bc7"},{"name":"create-dist-dir","duration":657,"timestamp":30512789725,"id":6,"parentId":1,"tags":{},"startTime":1778838485036,"traceId":"c2331030493c9bc7"},{"name":"clean","duration":498,"timestamp":30512790989,"id":7,"parentId":1,"tags":{},"startTime":1778838485037,"traceId":"c2331030493c9bc7"},{"name":"discover-routes","duration":10444,"timestamp":30512876958,"id":8,"parentId":1,"tags":{},"startTime":1778838485123,"traceId":"c2331030493c9bc7"},{"name":"create-root-mapping","duration":99,"timestamp":30512887460,"id":9,"parentId":1,"tags":{},"startTime":1778838485134,"traceId":"c2331030493c9bc7"},{"name":"generate-route-types","duration":30058,"timestamp":30512889708,"id":10,"parentId":1,"tags":{},"startTime":1778838485136,"traceId":"c2331030493c9bc7"},{"name":"public-dir-conflict-check","duration":118,"timestamp":30512919911,"id":11,"parentId":1,"tags":{},"startTime":1778838485166,"traceId":"c2331030493c9bc7"},{"name":"generate-routes-manifest","duration":4415,"timestamp":30512920158,"id":12,"parentId":1,"tags":{},"startTime":1778838485166,"traceId":"c2331030493c9bc7"},{"name":"run-turbopack","duration":5573806,"timestamp":30512929943,"id":14,"parentId":1,"tags":{},"startTime":1778838485176,"traceId":"c2331030493c9bc7"},{"name":"turbopack-build-events","duration":103,"timestamp":30513215172,"id":15,"parentId":1,"tags":{},"startTime":1778838485461,"traceId":"c2331030493c9bc7"},{"name":"run-typescript","duration":8275317,"timestamp":30518536867,"id":16,"parentId":1,"tags":{},"startTime":1778838490783,"traceId":"c2331030493c9bc7"},{"name":"generate-required-server-files","duration":2415,"timestamp":30526813375,"id":18,"parentId":1,"tags":{},"startTime":1778838499060,"traceId":"c2331030493c9bc7"},{"name":"check-static-error-page","duration":18072,"timestamp":30526992641,"id":20,"parentId":19,"tags":{},"startTime":1778838499239,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":431826,"timestamp":30527016654,"id":63,"parentId":22,"tags":{},"startTime":1778838499263,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":453339,"timestamp":30526995315,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778838499242,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":540230,"timestamp":30527033120,"id":69,"parentId":30,"tags":{},"startTime":1778838499279,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":573831,"timestamp":30526999627,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778838499246,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":581630,"timestamp":30527033305,"id":70,"parentId":32,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":615024,"timestamp":30527000034,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778838499246,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":609086,"timestamp":30527016858,"id":65,"parentId":26,"tags":{},"startTime":1778838499263,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":626933,"timestamp":30526999112,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778838499245,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":601675,"timestamp":30527033430,"id":72,"parentId":34,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":634871,"timestamp":30527000312,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778838499247,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":612899,"timestamp":30527033366,"id":71,"parentId":33,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":646172,"timestamp":30527000178,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778838499246,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":630301,"timestamp":30527016275,"id":62,"parentId":21,"tags":{},"startTime":1778838499263,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":652758,"timestamp":30526993856,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778838499240,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":630168,"timestamp":30527016765,"id":64,"parentId":25,"tags":{},"startTime":1778838499263,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":648037,"timestamp":30526998931,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778838499245,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":619916,"timestamp":30527033565,"id":74,"parentId":36,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":652577,"timestamp":30527000966,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778838499247,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":624785,"timestamp":30527033615,"id":77,"parentId":39,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":657014,"timestamp":30527001434,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":629244,"timestamp":30527033625,"id":78,"parentId":40,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":661381,"timestamp":30527001536,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":633540,"timestamp":30527033635,"id":79,"parentId":41,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":665601,"timestamp":30527001623,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":637837,"timestamp":30527033643,"id":80,"parentId":42,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":669805,"timestamp":30527001727,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":650375,"timestamp":30527033455,"id":73,"parentId":35,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":683417,"timestamp":30527000466,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778838499247,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":650399,"timestamp":30527033654,"id":81,"parentId":43,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":682274,"timestamp":30527001816,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":659782,"timestamp":30527033606,"id":76,"parentId":38,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":692129,"timestamp":30527001317,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":658423,"timestamp":30527035170,"id":83,"parentId":45,"tags":{},"startTime":1778838499281,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":691645,"timestamp":30527001999,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":676894,"timestamp":30527016940,"id":66,"parentId":27,"tags":{},"startTime":1778838499263,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":694639,"timestamp":30526999226,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778838499245,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":665336,"timestamp":30527035194,"id":85,"parentId":47,"tags":{},"startTime":1778838499281,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":698365,"timestamp":30527002213,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":669119,"timestamp":30527035155,"id":82,"parentId":44,"tags":{},"startTime":1778838499281,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":702479,"timestamp":30527001899,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":664861,"timestamp":30527047824,"id":88,"parentId":24,"tags":{},"startTime":1778838499294,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":717042,"timestamp":30526995692,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778838499242,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":678221,"timestamp":30527035182,"id":84,"parentId":46,"tags":{},"startTime":1778838499281,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":711353,"timestamp":30527002097,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778838499248,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":670695,"timestamp":30527048989,"id":89,"parentId":31,"tags":{},"startTime":1778838499295,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":719990,"timestamp":30526999744,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778838499246,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":689875,"timestamp":30527035214,"id":87,"parentId":49,"tags":{},"startTime":1778838499281,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":722739,"timestamp":30527002405,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778838499249,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":693461,"timestamp":30527032748,"id":67,"parentId":28,"tags":{},"startTime":1778838499279,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":726896,"timestamp":30526999361,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778838499246,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":697442,"timestamp":30527032969,"id":68,"parentId":29,"tags":{},"startTime":1778838499279,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":730968,"timestamp":30526999490,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778838499246,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":709747,"timestamp":30527033594,"id":75,"parentId":37,"tags":{},"startTime":1778838499280,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":742237,"timestamp":30527001170,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778838499247,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":693896,"timestamp":30527064416,"id":95,"parentId":54,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":752167,"timestamp":30527006234,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778838499253,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":701772,"timestamp":30527064430,"id":96,"parentId":56,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":759305,"timestamp":30527006957,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778838499253,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":734177,"timestamp":30527035205,"id":86,"parentId":48,"tags":{},"startTime":1778838499281,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":767125,"timestamp":30527002313,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778838499249,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":713679,"timestamp":30527064318,"id":90,"parentId":23,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":782563,"timestamp":30526995510,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778838499242,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":717255,"timestamp":30527064378,"id":92,"parentId":51,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":775991,"timestamp":30527005698,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778838499252,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":717425,"timestamp":30527064439,"id":97,"parentId":57,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":774773,"timestamp":30527007161,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778838499253,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":725764,"timestamp":30527064484,"id":100,"parentId":61,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":779824,"timestamp":30527010494,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778838499257,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":726254,"timestamp":30527064359,"id":91,"parentId":50,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":785145,"timestamp":30527005510,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778838499252,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":736710,"timestamp":30527064470,"id":99,"parentId":60,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":790885,"timestamp":30527010364,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778838499257,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":727324,"timestamp":30527074042,"id":102,"parentId":58,"tags":{},"startTime":1778838499320,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":794063,"timestamp":30527007335,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778838499254,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":736969,"timestamp":30527064498,"id":101,"parentId":55,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":795029,"timestamp":30527006459,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778838499253,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":756807,"timestamp":30527064393,"id":93,"parentId":52,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":815449,"timestamp":30527005847,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778838499252,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":768712,"timestamp":30527064402,"id":94,"parentId":53,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":827140,"timestamp":30527006048,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778838499252,"traceId":"c2331030493c9bc7"},{"name":"is-page-static","duration":787781,"timestamp":30527064452,"id":98,"parentId":59,"tags":{},"startTime":1778838499311,"traceId":"c2331030493c9bc7"},{"name":"check-page","duration":842093,"timestamp":30527010204,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778838499256,"traceId":"c2331030493c9bc7"},{"name":"static-check","duration":860593,"timestamp":30526991750,"id":19,"parentId":1,"tags":{},"startTime":1778838499238,"traceId":"c2331030493c9bc7"},{"name":"write-routes-manifest","duration":424,"timestamp":30527860329,"id":104,"parentId":1,"tags":{},"startTime":1778838500107,"traceId":"c2331030493c9bc7"},{"name":"load-dotenv","duration":53,"timestamp":30527874463,"id":107,"parentId":106,"tags":{},"startTime":1778838500121,"traceId":"c2331030493c9bc7"},{"name":"run-export-path-map","duration":598,"timestamp":30527877156,"id":108,"parentId":106,"tags":{},"startTime":1778838500123,"traceId":"c2331030493c9bc7"},{"name":"next-export","duration":563231,"timestamp":30527872858,"id":106,"parentId":1,"tags":{},"startTime":1778838500119,"traceId":"c2331030493c9bc7"}]
|
|
2
|
-
[{"name":"move-exported-app-not-found-","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":349,"timestamp":30829676899,"id":4,"parentId":1,"tags":{},"startTime":1778838801923,"traceId":"bf2a85b780e53cb7"},{"name":"load-custom-routes","duration":693,"timestamp":30829677423,"id":5,"parentId":1,"tags":{},"startTime":1778838801924,"traceId":"bf2a85b780e53cb7"},{"name":"create-dist-dir","duration":705,"timestamp":30829678174,"id":6,"parentId":1,"tags":{},"startTime":1778838801924,"traceId":"bf2a85b780e53cb7"},{"name":"clean","duration":626,"timestamp":30829679626,"id":7,"parentId":1,"tags":{},"startTime":1778838801926,"traceId":"bf2a85b780e53cb7"},{"name":"discover-routes","duration":9440,"timestamp":30829774213,"id":8,"parentId":1,"tags":{},"startTime":1778838802020,"traceId":"bf2a85b780e53cb7"},{"name":"create-root-mapping","duration":137,"timestamp":30829783718,"id":9,"parentId":1,"tags":{},"startTime":1778838802030,"traceId":"bf2a85b780e53cb7"},{"name":"generate-route-types","duration":38248,"timestamp":30829786382,"id":10,"parentId":1,"tags":{},"startTime":1778838802033,"traceId":"bf2a85b780e53cb7"},{"name":"public-dir-conflict-check","duration":97,"timestamp":30829824725,"id":11,"parentId":1,"tags":{},"startTime":1778838802071,"traceId":"bf2a85b780e53cb7"},{"name":"generate-routes-manifest","duration":5456,"timestamp":30829824928,"id":12,"parentId":1,"tags":{},"startTime":1778838802071,"traceId":"bf2a85b780e53cb7"},{"name":"run-turbopack","duration":6412694,"timestamp":30829835940,"id":14,"parentId":1,"tags":{},"startTime":1778838802082,"traceId":"bf2a85b780e53cb7"},{"name":"turbopack-build-events","duration":75,"timestamp":30830136294,"id":15,"parentId":1,"tags":{},"startTime":1778838802383,"traceId":"bf2a85b780e53cb7"},{"name":"run-typescript","duration":8334920,"timestamp":30836257130,"id":16,"parentId":1,"tags":{},"startTime":1778838808503,"traceId":"bf2a85b780e53cb7"},{"name":"generate-required-server-files","duration":2121,"timestamp":30844593046,"id":18,"parentId":1,"tags":{},"startTime":1778838816839,"traceId":"bf2a85b780e53cb7"},{"name":"check-static-error-page","duration":12663,"timestamp":30844754920,"id":20,"parentId":19,"tags":{},"startTime":1778838817001,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":524357,"timestamp":30844770668,"id":63,"parentId":22,"tags":{},"startTime":1778838817017,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":537612,"timestamp":30844757591,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778838817004,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":536585,"timestamp":30844771311,"id":67,"parentId":28,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":547803,"timestamp":30844760185,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778838817006,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":557561,"timestamp":30844771750,"id":70,"parentId":32,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":568721,"timestamp":30844760672,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778838817007,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":569708,"timestamp":30844771066,"id":66,"parentId":27,"tags":{},"startTime":1778838817017,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":580737,"timestamp":30844760109,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778838817006,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":569683,"timestamp":30844771867,"id":71,"parentId":33,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":582266,"timestamp":30844760803,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778838817007,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":574739,"timestamp":30844771942,"id":72,"parentId":34,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":585918,"timestamp":30844760923,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778838817007,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":582729,"timestamp":30844771974,"id":73,"parentId":35,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":593690,"timestamp":30844761063,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778838817007,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":586525,"timestamp":30844770285,"id":62,"parentId":21,"tags":{},"startTime":1778838817017,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":600618,"timestamp":30844756227,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778838817003,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":589766,"timestamp":30844772133,"id":75,"parentId":37,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":600204,"timestamp":30844761743,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778838817008,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":594515,"timestamp":30844771455,"id":68,"parentId":29,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":605765,"timestamp":30844760261,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778838817007,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":595362,"timestamp":30844770822,"id":64,"parentId":25,"tags":{},"startTime":1778838817017,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":606336,"timestamp":30844759880,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778838817006,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":596817,"timestamp":30844772160,"id":77,"parentId":39,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":607066,"timestamp":30844761963,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778838817008,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":616076,"timestamp":30844772173,"id":78,"parentId":40,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":626363,"timestamp":30844762078,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778838817008,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":616541,"timestamp":30844772200,"id":80,"parentId":42,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":626299,"timestamp":30844762478,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":616792,"timestamp":30844772099,"id":74,"parentId":36,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":627354,"timestamp":30844761562,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778838817008,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":622481,"timestamp":30844772222,"id":82,"parentId":44,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":632046,"timestamp":30844762696,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":623013,"timestamp":30844772209,"id":81,"parentId":43,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":632695,"timestamp":30844762587,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":629016,"timestamp":30844772186,"id":79,"parentId":41,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":638887,"timestamp":30844762354,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":629161,"timestamp":30844772245,"id":84,"parentId":46,"tags":{},"startTime":1778838817019,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":638494,"timestamp":30844762942,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":631901,"timestamp":30844772235,"id":83,"parentId":45,"tags":{},"startTime":1778838817019,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":641340,"timestamp":30844762834,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":635451,"timestamp":30844772258,"id":85,"parentId":47,"tags":{},"startTime":1778838817019,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":644654,"timestamp":30844763087,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":634375,"timestamp":30844775755,"id":88,"parentId":24,"tags":{},"startTime":1778838817022,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":652196,"timestamp":30844757971,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778838817004,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":635832,"timestamp":30844777132,"id":89,"parentId":31,"tags":{},"startTime":1778838817023,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":652578,"timestamp":30844760450,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778838817007,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":648950,"timestamp":30844772299,"id":87,"parentId":49,"tags":{},"startTime":1778838817019,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":658076,"timestamp":30844763228,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778838817010,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":654074,"timestamp":30844772285,"id":86,"parentId":48,"tags":{},"startTime":1778838817019,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":663241,"timestamp":30844763163,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778838817009,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":677644,"timestamp":30844772151,"id":76,"parentId":38,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":687985,"timestamp":30844761876,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778838817008,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":677940,"timestamp":30844780981,"id":94,"parentId":53,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":694836,"timestamp":30844764148,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778838817010,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":695298,"timestamp":30844780994,"id":95,"parentId":54,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":711935,"timestamp":30844764423,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778838817011,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":695874,"timestamp":30844780944,"id":91,"parentId":50,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":713316,"timestamp":30844763556,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778838817010,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":701602,"timestamp":30844780915,"id":90,"parentId":23,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":724771,"timestamp":30844757796,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778838817004,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":706616,"timestamp":30844780959,"id":92,"parentId":51,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":723939,"timestamp":30844763679,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778838817010,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":706956,"timestamp":30844781036,"id":97,"parentId":57,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":722487,"timestamp":30844765563,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778838817012,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":716620,"timestamp":30844771584,"id":69,"parentId":30,"tags":{},"startTime":1778838817018,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":727887,"timestamp":30844760373,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778838817007,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":717876,"timestamp":30844770939,"id":65,"parentId":26,"tags":{},"startTime":1778838817017,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":728836,"timestamp":30844760023,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778838817006,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":717302,"timestamp":30844781026,"id":96,"parentId":56,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":733035,"timestamp":30844765337,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778838817012,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":721744,"timestamp":30844781049,"id":98,"parentId":59,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":736626,"timestamp":30844766215,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778838817012,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":740075,"timestamp":30844781080,"id":100,"parentId":61,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":754020,"timestamp":30844767191,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778838817013,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":740284,"timestamp":30844781066,"id":99,"parentId":60,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":755003,"timestamp":30844766398,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778838817013,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":740506,"timestamp":30844780968,"id":93,"parentId":52,"tags":{},"startTime":1778838817027,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":757644,"timestamp":30844763860,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778838817010,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":755672,"timestamp":30844790783,"id":101,"parentId":58,"tags":{},"startTime":1778838817037,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":780763,"timestamp":30844765756,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778838817012,"traceId":"bf2a85b780e53cb7"},{"name":"is-page-static","duration":760793,"timestamp":30844804381,"id":102,"parentId":55,"tags":{},"startTime":1778838817051,"traceId":"bf2a85b780e53cb7"},{"name":"check-page","duration":800537,"timestamp":30844764699,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778838817011,"traceId":"bf2a85b780e53cb7"},{"name":"static-check","duration":811146,"timestamp":30844754167,"id":19,"parentId":1,"tags":{},"startTime":1778838817000,"traceId":"bf2a85b780e53cb7"},{"name":"write-routes-manifest","duration":423,"timestamp":30845572323,"id":104,"parentId":1,"tags":{},"startTime":1778838817819,"traceId":"bf2a85b780e53cb7"},{"name":"load-dotenv","duration":49,"timestamp":30845584049,"id":107,"parentId":106,"tags":{},"startTime":1778838817830,"traceId":"bf2a85b780e53cb7"},{"name":"run-export-path-map","duration":674,"timestamp":30845587690,"id":108,"parentId":106,"tags":{},"startTime":1778838817834,"traceId":"bf2a85b780e53cb7"},{"name":"next-export","duration":560617,"timestamp":30845582573,"id":106,"parentId":1,"tags":{},"startTime":1778838817829,"traceId":"bf2a85b780e53cb7"}]
|
|
2
|
+
[{"name":"move-exported-app-not-found-","duration":1994,"timestamp":30846146317,"id":109,"parentId":105,"tags":{},"startTime":1778838818393,"traceId":"bf2a85b780e53cb7"},{"name":"move-exported-app-global-error-","duration":487,"timestamp":30846148397,"id":110,"parentId":105,"tags":{},"startTime":1778838818395,"traceId":"bf2a85b780e53cb7"},{"name":"static-generation","duration":573508,"timestamp":30845577020,"id":105,"parentId":1,"tags":{},"startTime":1778838817823,"traceId":"bf2a85b780e53cb7"},{"name":"write-routes-manifest","duration":325,"timestamp":30846150667,"id":111,"parentId":1,"tags":{},"startTime":1778838818397,"traceId":"bf2a85b780e53cb7"},{"name":"print-tree-view","duration":4712,"timestamp":30846167595,"id":112,"parentId":1,"tags":{},"startTime":1778838818414,"traceId":"bf2a85b780e53cb7"},{"name":"write-route-bundle-stats","duration":15047,"timestamp":30846172334,"id":113,"parentId":1,"tags":{},"startTime":1778838818419,"traceId":"bf2a85b780e53cb7"},{"name":"telemetry-flush","duration":22790,"timestamp":30846187405,"id":114,"parentId":1,"tags":{},"startTime":1778838818434,"traceId":"bf2a85b780e53cb7"},{"name":"next-build","duration":16589366,"timestamp":30829620853,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778838801867,"traceId":"bf2a85b780e53cb7"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":6412694,"timestamp":30829835940,"id":14,"parentId":1,"tags":{},"startTime":1778838802082,"traceId":"bf2a85b780e53cb7"},{"name":"turbopack-build-events","duration":75,"timestamp":30830136294,"id":15,"parentId":1,"tags":{},"startTime":1778838802383,"traceId":"bf2a85b780e53cb7"},{"name":"run-typescript","duration":8334920,"timestamp":30836257130,"id":16,"parentId":1,"tags":{},"startTime":1778838808503,"traceId":"bf2a85b780e53cb7"},{"name":"static-check","duration":811146,"timestamp":30844754167,"id":19,"parentId":1,"tags":{},"startTime":1778838817000,"traceId":"bf2a85b780e53cb7"},{"name":"static-generation","duration":573508,"timestamp":30845577020,"id":105,"parentId":1,"tags":{},"startTime":1778838817823,"traceId":"bf2a85b780e53cb7"},{"name":"telemetry-flush","duration":22790,"timestamp":30846187405,"id":114,"parentId":1,"tags":{},"startTime":1778838818434,"traceId":"bf2a85b780e53cb7"},{"name":"next-build","duration":16589366,"timestamp":30829620853,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778838801867,"traceId":"bf2a85b780e53cb7"}]
|
|
@@ -1224,10 +1224,16 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
1224
1224
|
specific pin (Esc still clears all — both paths are
|
|
1225
1225
|
valid). pinnedStatus and pinnedGroup pin independently so
|
|
1226
1226
|
both pills may render simultaneously. */}
|
|
1227
|
+
{/* R67: pills enter via anet-fade-in so they appear softly
|
|
1228
|
+
instead of popping. The "filter: " prefix collapses below
|
|
1229
|
+
sm — at narrow viewports the chip row is precious real
|
|
1230
|
+
estate (R47 already hides pressure / vendor / freshness),
|
|
1231
|
+
so dropping the redundant label keeps the working/idle/
|
|
1232
|
+
alpha keys readable without overflow. */}
|
|
1227
1233
|
{pinnedStatus && (
|
|
1228
1234
|
<span
|
|
1229
1235
|
data-active-filter="status"
|
|
1230
|
-
className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border"
|
|
1236
|
+
className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border anet-fade-in"
|
|
1231
1237
|
style={{
|
|
1232
1238
|
background: pinnedStatus === 'working' ? (isLight ? '#05966914' : '#22c55e1f')
|
|
1233
1239
|
: pinnedStatus === 'idle' ? (isLight ? '#0d948814' : '#2dd4bf1f')
|
|
@@ -1238,7 +1244,7 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
1238
1244
|
borderColor: 'currentColor',
|
|
1239
1245
|
}}
|
|
1240
1246
|
>
|
|
1241
|
-
<span>filter: {pinnedStatus}</span>
|
|
1247
|
+
<span><span className="hidden sm:inline" data-filter-prefix>filter: </span>{pinnedStatus}</span>
|
|
1242
1248
|
<button
|
|
1243
1249
|
type="button"
|
|
1244
1250
|
aria-label={`Clear ${pinnedStatus} filter`}
|
|
@@ -1251,14 +1257,14 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
1251
1257
|
{pinnedGroup && (
|
|
1252
1258
|
<span
|
|
1253
1259
|
data-active-filter="group"
|
|
1254
|
-
className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border"
|
|
1260
|
+
className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md font-mono text-xs border anet-fade-in"
|
|
1255
1261
|
style={{
|
|
1256
1262
|
background: isLight ? '#67e8f914' : '#67e8f91f',
|
|
1257
1263
|
color: pal.legendAccent,
|
|
1258
1264
|
borderColor: 'currentColor',
|
|
1259
1265
|
}}
|
|
1260
1266
|
>
|
|
1261
|
-
<span>filter: {pinnedGroup}</span>
|
|
1267
|
+
<span><span className="hidden sm:inline" data-filter-prefix>filter: </span>{pinnedGroup}</span>
|
|
1262
1268
|
<button
|
|
1263
1269
|
type="button"
|
|
1264
1270
|
aria-label={`Clear group filter ${pinnedGroup}`}
|