@hivemagnus/magnus-ui 3.0.2 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
  2. package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
  3. package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
  4. package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
  5. package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
  6. package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
  7. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
  13. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
  14. package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
  15. package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
  16. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
  17. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
  18. package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
  19. package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
  20. package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
  21. package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
  22. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
  23. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
  24. package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
  25. package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
  26. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
  27. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
  28. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
  29. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
  30. package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
  31. package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  32. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
  33. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
  34. package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
  35. package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
  36. package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
  37. package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
  38. package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
  39. package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
  40. package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
  41. package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
  42. package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
  43. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
  44. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
  45. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
  46. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
  47. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
  48. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
  49. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
  50. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
  51. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
  52. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
  53. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
  54. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
  55. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
  56. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
  57. package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
  58. package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
  59. package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
  60. package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
  61. package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
  62. package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
  63. package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
  64. package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  65. package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
  66. package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
  67. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
  68. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
  69. package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
  70. package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  71. package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
  72. package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
  73. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
  74. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
  75. package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
  76. package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
  77. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
  78. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
  79. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
  80. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
  81. package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
  82. package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  83. package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
  84. package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
  85. package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
  86. package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
  87. package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
  88. package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
  89. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
  90. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
  91. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
  92. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
  93. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
  94. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
  95. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
  96. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
  97. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
  98. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
  99. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
  100. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
  101. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
  102. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
  103. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
  104. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
  105. package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
  106. package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
  107. package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  108. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
  109. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
  110. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
  111. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
  112. package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
  113. package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
  114. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__06giq9g4me8eh._.js +1 -1
  115. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__08sgyyf_y8ab8._.js +1 -1
  116. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11pe-l2-ko65_._.js +1 -1
  117. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0caxc2bc6a__r._.js +1 -1
  118. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1oebzzj_en62h._.js +1 -1
  119. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
  120. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_installations_page_tsx_0nvqgacugy6nf._.js +1 -1
  121. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
  122. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
  123. package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
  124. package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
  125. package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
  126. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
  127. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
  128. package/dist/app/apps/dashboard/.next/static/chunks/{05oj34aih4am5.js → 01o36-nzvnb50.js} +1 -1
  129. package/dist/app/apps/dashboard/.next/static/chunks/{37rjo1mzfhwgp.js → 0prxb5rrnyazx.js} +1 -1
  130. package/dist/app/apps/dashboard/.next/static/chunks/{3asqy-wi1vbta.js → 2d7iofjrbu67d.js} +1 -1
  131. package/dist/app/apps/dashboard/.next/static/chunks/{39iknwb_xeoy1.js → 2gglvzjgngh6n.js} +1 -1
  132. package/dist/app/apps/dashboard/.next/static/chunks/{269qlvth5p8b4.js → 30bfg_hz7dqgc.js} +1 -1
  133. package/dist/app/apps/dashboard/.next/static/chunks/{2mmi4kuxeaoif.js → 3z4_b86_ztp8q.js} +1 -1
  134. package/dist/app/apps/dashboard/package.json +2 -2
  135. package/dist/app/apps/dashboard/server.js +1 -1
  136. package/package.json +2 -2
  137. /package/dist/app/apps/dashboard/.next/static/{VctstYkAeZ_bmSUU1lySP → LwCb7cxSJ3jJXNJIZN5vo}/_buildManifest.js +0 -0
  138. /package/dist/app/apps/dashboard/.next/static/{VctstYkAeZ_bmSUU1lySP → LwCb7cxSJ3jJXNJIZN5vo}/_clientMiddlewareManifest.js +0 -0
  139. /package/dist/app/apps/dashboard/.next/static/{VctstYkAeZ_bmSUU1lySP → LwCb7cxSJ3jJXNJIZN5vo}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[81837,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(5739),j=a.i(8897),k=a.i(5050);let l=(0,k.createServerReference)("40c661150a97001995ce6e1795054976d1901770c4",k.callServer,void 0,k.findSourceMapURL,"scanCron");var m=a.i(8387),n=a.i(73771),o=a.i(33855),p=a.i(19783),q=a.i(33540),r=a.i(8311),s=a.i(34532),t=a.i(89027),u=a.i(41146),v=a.i(1661),w=a.i(75160),x=a.i(57307),y=a.i(70944),z=a.i(68579),A=a.i(13412),B=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,j.l)(),[k,C]=(0,c.useState)([]),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)("1.0.0"),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),C([]),G(null);let b=Date.now();try{let b=await l(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done"}));C(a);let c=new Set(a.filter(a=>a.jobs.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=k.reduce((a,b)=>a+("done"===b.status?b.jobs.length:0),0),X=k.filter(a=>"done"===a.status).length,Y=k.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.command.toLowerCase().includes(b)||a.schedule.toLowerCase().includes(b)||(a.user?.toLowerCase().includes(b)??!1)},$=async()=>{if(N&&P){U(!0);try{let a=JSON.stringify({name:N.job.name,version:P,schedule:N.job.schedule,command:N.job.command,description:R},null,2);await h.f.library.files.create({name:`${N.job.name} v${P}`,fileName:`${N.job.name}-${P}.json`,mimeType:"application/x-magnus-cronjob",content:a,tags:["cronjob","cron"]}),O(null),Q("1.0.0"),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(n.U,{className:"space-y-6",children:[(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!D&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[k.length," node",1!==k.length?"s":""," · ",W," job",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:D,children:[(0,b.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",D&&"animate-spin")}),D?"Scanning...":"Rescan"]})]})]})}),D&&(0,b.jsx)(n.z,{children:(0,b.jsx)(o.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:k.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!D&&H&&W>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(q.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:J,onChange:a=>K(a.target.value),className:(0,m.f)(g.W,"pl-9")})]})}),!D&&H&&F&&(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(z.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!D&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===k.length?(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(s.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):k.map(a=>{let c=L.has(a.nodeId),g=a.jobs.filter(Z);return(0,b.jsx)(n.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(s.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.jobs.length>0?"success":"default",children:[a.jobs.length," job",1!==a.jobs.length?"s":""]}),"error"===a.status&&((0,i.f)(a.error)?(0,b.jsx)(e.t,{variant:"default",children:"Disabled"}):(0,b.jsx)(e.t,{variant:"danger",children:"Error"}))]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,i.f)(a.error)?"text-text-muted":"text-danger"),children:(0,i.f)(a.error)??a.error}),"done"===a.status&&0===a.jobs.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(A.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(B.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(t.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(u.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map((c,f)=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),c.user&&(0,b.jsx)(e.t,{variant:"default",children:c.user}),(0,b.jsx)(e.t,{variant:"info",children:c.schedule})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{O({job:c,nodeId:a.nodeId,nodeName:a.nodeName}),Q("1.0.0"),S("")},children:[(0,b.jsx)(v.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,b.jsx)(y.f,{className:"h-3 w-3"}),function(a){let b=a.split(/\s+/);if(b.length<5)return a;let[c,d,e,f,g]=b;return"*"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every minute":"0"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every hour":"0"===c&&"0"===d&&"*"===e&&"*"===f&&"*"===g?"Daily at midnight":c?.startsWith("*/")?`Every ${c.slice(2)} minutes`:d?.startsWith("*/")?`Every ${d.slice(2)} hours`:a}(c.schedule)]}),(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,b.jsx)(x.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,b.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:c.command})]})]},`${c.name}-${f}`))})})]})},a.nodeId)}),k.length>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," job",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:"Publish to Library",description:N?.job.name??"",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:P,onChange:a=>Q(a.target.value),placeholder:"1.0.0",className:g.W})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"What does this cron job do?",className:g.W})]}),N&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",N.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",N.job.schedule]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,b.jsx)("span",{className:"text-primary",children:N.job.command})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>O(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!P,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(v.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],81837)}];
1
+ module.exports=[81837,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(5739),j=a.i(8897),k=a.i(5050);let l=(0,k.createServerReference)("40a10688cb9a2c3f5e2652b5e782c2776ccb81f473",k.callServer,void 0,k.findSourceMapURL,"scanCron");var m=a.i(8387),n=a.i(73771),o=a.i(33855),p=a.i(19783),q=a.i(33540),r=a.i(8311),s=a.i(34532),t=a.i(89027),u=a.i(41146),v=a.i(1661),w=a.i(75160),x=a.i(57307),y=a.i(70944),z=a.i(68579),A=a.i(13412),B=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,j.l)(),[k,C]=(0,c.useState)([]),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)("1.0.0"),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),C([]),G(null);let b=Date.now();try{let b=await l(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done"}));C(a);let c=new Set(a.filter(a=>a.jobs.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=k.reduce((a,b)=>a+("done"===b.status?b.jobs.length:0),0),X=k.filter(a=>"done"===a.status).length,Y=k.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.command.toLowerCase().includes(b)||a.schedule.toLowerCase().includes(b)||(a.user?.toLowerCase().includes(b)??!1)},$=async()=>{if(N&&P){U(!0);try{let a=JSON.stringify({name:N.job.name,version:P,schedule:N.job.schedule,command:N.job.command,description:R},null,2);await h.f.library.files.create({name:`${N.job.name} v${P}`,fileName:`${N.job.name}-${P}.json`,mimeType:"application/x-magnus-cronjob",content:a,tags:["cronjob","cron"]}),O(null),Q("1.0.0"),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(n.U,{className:"space-y-6",children:[(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!D&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[k.length," node",1!==k.length?"s":""," · ",W," job",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:D,children:[(0,b.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",D&&"animate-spin")}),D?"Scanning...":"Rescan"]})]})]})}),D&&(0,b.jsx)(n.z,{children:(0,b.jsx)(o.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:k.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!D&&H&&W>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(q.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:J,onChange:a=>K(a.target.value),className:(0,m.f)(g.W,"pl-9")})]})}),!D&&H&&F&&(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(z.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!D&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===k.length?(0,b.jsx)(n.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(s.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):k.map(a=>{let c=L.has(a.nodeId),g=a.jobs.filter(Z);return(0,b.jsx)(n.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(s.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.jobs.length>0?"success":"default",children:[a.jobs.length," job",1!==a.jobs.length?"s":""]}),"error"===a.status&&((0,i.f)(a.error)?(0,b.jsx)(e.t,{variant:"default",children:"Disabled"}):(0,b.jsx)(e.t,{variant:"danger",children:"Error"}))]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,i.f)(a.error)?"text-text-muted":"text-danger"),children:(0,i.f)(a.error)??a.error}),"done"===a.status&&0===a.jobs.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(A.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(B.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(t.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(u.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map((c,f)=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),c.user&&(0,b.jsx)(e.t,{variant:"default",children:c.user}),(0,b.jsx)(e.t,{variant:"info",children:c.schedule})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{O({job:c,nodeId:a.nodeId,nodeName:a.nodeName}),Q("1.0.0"),S("")},children:[(0,b.jsx)(v.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,b.jsx)(y.f,{className:"h-3 w-3"}),function(a){let b=a.split(/\s+/);if(b.length<5)return a;let[c,d,e,f,g]=b;return"*"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every minute":"0"===c&&"*"===d&&"*"===e&&"*"===f&&"*"===g?"Every hour":"0"===c&&"0"===d&&"*"===e&&"*"===f&&"*"===g?"Daily at midnight":c?.startsWith("*/")?`Every ${c.slice(2)} minutes`:d?.startsWith("*/")?`Every ${d.slice(2)} hours`:a}(c.schedule)]}),(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,b.jsx)(x.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,b.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:c.command})]})]},`${c.name}-${f}`))})})]})},a.nodeId)}),k.length>0&&(0,b.jsx)(n.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," job",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:"Publish to Library",description:N?.job.name??"",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:P,onChange:a=>Q(a.target.value),placeholder:"1.0.0",className:g.W})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"What does this cron job do?",className:g.W})]}),N&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",N.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",N.job.schedule]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,b.jsx)("span",{className:"text-primary",children:N.job.command})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>O(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!P,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(v.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],81837)}];
2
2
 
3
3
  //# sourceMappingURL=apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[9121,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(8897),j=a.i(5050);let k=(0,j.createServerReference)("403137cff7275d427fe7171b94f5bb6ce9d09b12b3",j.callServer,void 0,j.findSourceMapURL,"scanSkills");var l=a.i(8387),m=a.i(73771),n=a.i(33855),o=a.i(19783),p=a.i(33540),q=a.i(92965),r=a.i(34532),s=a.i(64831);let t={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};t.node;let u=(0,s.f)(t);var v=a.i(40260),w=a.i(89027),x=a.i(41146),y=a.i(55681),z=a.i(1661),A=a.i(75160),B=a.i(68579),C=a.i(13412),D=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,i.l)(),[j,s]=(0,c.useState)([]),[t,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(null),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),s([]),G(null);let b=Date.now();try{let b=await k(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done",skills:a.skills.map(a=>({...a,files:a.files.map(a=>"string"==typeof a?{name:a,content:""}:a)}))}));s(a);let c=new Set(a.filter(a=>a.skills.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=j.reduce((a,b)=>a+("done"===b.status?b.skills.length:0),0),X=j.filter(a=>"done"===a.status).length,Y=j.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.description.toLowerCase().includes(b)||a.tags.some(a=>a.toLowerCase().includes(b))},$=async()=>{if(P&&R){U(!0);try{let a={name:P.skill.name,version:R,description:P.skill.description,author:P.skill.author,entryPoint:P.skill.entryPoint,dependencies:P.skill.dependencies,tags:P.skill.tags},b={};for(let a of P.skill.files)b[a.name]=a.content;let c=JSON.stringify({manifest:a,files:b},null,2);await h.f.library.files.create({name:`${P.skill.name} v${R}`,fileName:`${P.skill.name}-${R}.json`,mimeType:"application/x-magnus-skill",content:c,tags:["skill",...P.skill.tags]}),Q(null),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(m.U,{className:"space-y-6",children:[(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Skills"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage Hermes Agent skills across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!t&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[j.length," node",1!==j.length?"s":""," · ",W," skill",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:t,children:[(0,b.jsx)(o.f,{className:(0,l.f)("h-3.5 w-3.5 mr-1.5",t&&"animate-spin")}),t?"Scanning...":"Rescan"]})]})]})}),t&&(0,b.jsx)(m.z,{children:(0,b.jsx)(n.f,{title:"Scanning Nodes for Skills",description:"Probing all online nodes...",nodes:j.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!t&&H&&W>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(p.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search skills by name, description, or tag...",value:J,onChange:a=>K(a.target.value),className:(0,l.f)(g.W,"pl-9")})]})}),!t&&H&&F&&(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(B.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(o.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!t&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===j.length?(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(r.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):j.map(a=>{let c=L.has(a.nodeId),g=a.skills.filter(Z);return(0,b.jsx)(m.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.skills.length>0?"success":"default",children:[a.skills.length," skill",1!==a.skills.length?"s":""]}),"error"===a.status&&(0,b.jsx)(e.t,{variant:"danger",children:"Error"})]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:"text-[11px] text-danger mt-0.5 truncate",children:a.error}),"done"===a.status&&0===a.skills.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No skills installed on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(C.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(D.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(w.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(x.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.skills.length?"No skills installed on this node. Deploy skills from the Library.":"No skills match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map(c=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(q.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),(0,b.jsx)(e.t,{variant:"info",children:c.version})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{Q({skill:c,nodeId:a.nodeId,nodeName:a.nodeName}),S(c.version)},children:[(0,b.jsx)(z.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),c.description&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:c.description}),c.tags.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1",children:c.tags.map(a=>(0,b.jsxs)(e.t,{variant:"default",children:[(0,b.jsx)(u,{className:"h-2.5 w-2.5 mr-1"}),a]},a))}),(0,b.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Author"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.author||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Entry Point"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.entryPoint||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Dependencies"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.dependencies.length>0?c.dependencies.join(", "):"—"})]})]}),c.files.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:["Files (",c.files.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:c.files.map(a=>(0,b.jsxs)("button",{onClick:()=>O(a),className:"flex items-center gap-2 rounded border border-border/50 px-3 py-1.5 text-xs hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] transition-all w-full text-left",children:[(0,b.jsx)(v.f,{className:"h-3 w-3 text-primary"}),(0,b.jsx)("span",{children:a.name}),(0,b.jsx)(y.f,{className:"h-3 w-3 text-text-muted ml-auto"})]},a.name))})]})]},c.name))})})]})},a.nodeId)}),j.length>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," skill",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:N?.name??"File",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,b.jsx)("pre",{className:"rounded border border-border bg-bg p-4 text-xs overflow-auto max-h-96 whitespace-pre-wrap",children:N?.content||"(empty)"})}),(0,b.jsx)(g.n,{open:!!P,onClose:()=>Q(null),title:"Publish to Library",description:P?.skill.name??"",icon:(0,b.jsx)(z.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"1.0.0",className:g.W})]}),P&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Files:"})," ",P.skill.files.length," files"]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Tags:"})," ",["skill",...P.skill.tags].join(", ")]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>Q(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!R,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(z.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],9121)}];
1
+ module.exports=[9121,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(68415),e=a.i(58299),f=a.i(49521),g=a.i(85063),h=a.i(46997),i=a.i(8897),j=a.i(5050);let k=(0,j.createServerReference)("406e787aaf2acf5178fea11f1394d531646e00d02d",j.callServer,void 0,j.findSourceMapURL,"scanSkills");var l=a.i(8387),m=a.i(73771),n=a.i(33855),o=a.i(19783),p=a.i(33540),q=a.i(92965),r=a.i(34532),s=a.i(64831);let t={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};t.node;let u=(0,s.f)(t);var v=a.i(40260),w=a.i(89027),x=a.i(41146),y=a.i(55681),z=a.i(1661),A=a.i(75160),B=a.i(68579),C=a.i(13412),D=a.i(11134);a.s(["default",0,function(){let{activeNode:a}=(0,i.l)(),[j,s]=(0,c.useState)([]),[t,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(new Set),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(null),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)(!1),V=(0,c.useCallback)(async()=>{E(!0),s([]),G(null);let b=Date.now();try{let b=await k(a.id);if(b.success&&Array.isArray(b.data)){let a=b.data.map(a=>({...a,status:"error"===a.status?"error":"done",skills:a.skills.map(a=>({...a,files:a.files.map(a=>"string"==typeof a?{name:a,content:""}:a)}))}));s(a);let c=new Set(a.filter(a=>a.skills.length>0).map(a=>a.nodeId));M(c.size>0?c:new Set(a.map(a=>a.nodeId)))}else G(b.error?.message??"Scan returned unsuccessful response")}catch(b){let a=b instanceof Error?b.message:"Scan request failed";G(a)}finally{let a=Date.now()-b;a<1500&&await new Promise(b=>setTimeout(b,1500-a)),E(!1),I(!0)}},[a]);(0,c.useEffect)(()=>{a&&V()},[a,V]);let W=j.reduce((a,b)=>a+("done"===b.status?b.skills.length:0),0),X=j.filter(a=>"done"===a.status).length,Y=j.filter(a=>"error"===a.status).length,Z=a=>{if(!J)return!0;let b=J.toLowerCase();return a.name.toLowerCase().includes(b)||a.description.toLowerCase().includes(b)||a.tags.some(a=>a.toLowerCase().includes(b))},$=async()=>{if(P&&R){U(!0);try{let a={name:P.skill.name,version:R,description:P.skill.description,author:P.skill.author,entryPoint:P.skill.entryPoint,dependencies:P.skill.dependencies,tags:P.skill.tags},b={};for(let a of P.skill.files)b[a.name]=a.content;let c=JSON.stringify({manifest:a,files:b},null,2);await h.f.library.files.create({name:`${P.skill.name} v${R}`,fileName:`${P.skill.name}-${R}.json`,mimeType:"application/x-magnus-skill",content:c,tags:["skill",...P.skill.tags]}),Q(null),S("")}catch{}finally{U(!1)}}};return(0,b.jsxs)(m.U,{className:"space-y-6",children:[(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Skills"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage Hermes Agent skills across your fleet"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[H&&!t&&(0,b.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[j.length," node",1!==j.length?"s":""," · ",W," skill",1!==W?"s":"",Y>0&&` \xb7 ${Y} error${1!==Y?"s":""}`]}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:t,children:[(0,b.jsx)(o.f,{className:(0,l.f)("h-3.5 w-3.5 mr-1.5",t&&"animate-spin")}),t?"Scanning...":"Rescan"]})]})]})}),t&&(0,b.jsx)(m.z,{children:(0,b.jsx)(n.f,{title:"Scanning Nodes for Skills",description:"Probing all online nodes...",nodes:j.map(a=>({nodeId:a.nodeId,nodeName:a.nodeName,status:a.status,error:a.error})),scanning:!0})}),!t&&H&&W>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(p.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,b.jsx)("input",{type:"text",placeholder:"Search skills by name, description, or tag...",value:J,onChange:a=>K(a.target.value),className:(0,l.f)(g.W,"pl-9")})]})}),!t&&H&&F&&(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(B.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,b.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,b.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:F}),(0,b.jsxs)(d.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void V(),children:[(0,b.jsx)(o.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!t&&H&&!F&&(0,b.jsxs)(b.Fragment,{children:[0===j.length?(0,b.jsx)(m.z,{children:(0,b.jsx)(f.N,{children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)(r.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,b.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):j.map(a=>{let c=L.has(a.nodeId),g=a.skills.filter(Z);return(0,b.jsx)(m.z,{children:(0,b.jsxs)(f.N,{className:"overflow-hidden",children:[(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.nodeId,void M(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,b.jsx)(r.f,{className:"h-4 w-4 text-primary"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:a.nodeName}),"done"===a.status&&(0,b.jsxs)(e.t,{variant:a.skills.length>0?"success":"default",children:[a.skills.length," skill",1!==a.skills.length?"s":""]}),"error"===a.status&&(0,b.jsx)(e.t,{variant:"danger",children:"Error"})]}),"error"===a.status&&a.error&&(0,b.jsx)("p",{className:"text-[11px] text-danger mt-0.5 truncate",children:a.error}),"done"===a.status&&0===a.skills.length&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No skills installed on this node"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===a.status?(0,b.jsx)(C.f,{className:"h-4 w-4 text-success"}):(0,b.jsx)(D.f,{className:"h-4 w-4 text-danger"}),c?(0,b.jsx)(w.f,{className:"h-4 w-4 text-text-muted"}):(0,b.jsx)(x.f,{className:"h-4 w-4 text-text-muted"})]})]}),c&&"done"===a.status&&(0,b.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===g.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:0===a.skills.length?"No skills installed on this node. Deploy skills from the Library.":"No skills match your search on this node."})}):(0,b.jsx)("div",{className:"divide-y divide-border/30",children:g.map(c=>(0,b.jsxs)("div",{className:"p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(q.f,{className:"h-4 w-4 text-primary"}),(0,b.jsx)("span",{className:"text-xs font-bold",children:c.name}),(0,b.jsx)(e.t,{variant:"info",children:c.version})]}),(0,b.jsxs)(d.K,{size:"sm",variant:"secondary",onClick:()=>{Q({skill:c,nodeId:a.nodeId,nodeName:a.nodeName}),S(c.version)},children:[(0,b.jsx)(z.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),c.description&&(0,b.jsx)("p",{className:"text-[11px] text-text-muted",children:c.description}),c.tags.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1",children:c.tags.map(a=>(0,b.jsxs)(e.t,{variant:"default",children:[(0,b.jsx)(u,{className:"h-2.5 w-2.5 mr-1"}),a]},a))}),(0,b.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Author"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.author||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Entry Point"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.entryPoint||"—"})]}),(0,b.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,b.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Dependencies"}),(0,b.jsx)("p",{className:"text-[11px]",children:c.dependencies.length>0?c.dependencies.join(", "):"—"})]})]}),c.files.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:["Files (",c.files.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:c.files.map(a=>(0,b.jsxs)("button",{onClick:()=>O(a),className:"flex items-center gap-2 rounded border border-border/50 px-3 py-1.5 text-xs hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] transition-all w-full text-left",children:[(0,b.jsx)(v.f,{className:"h-3 w-3 text-primary"}),(0,b.jsx)("span",{children:a.name}),(0,b.jsx)(y.f,{className:"h-3 w-3 text-text-muted ml-auto"})]},a.name))})]})]},c.name))})})]})},a.nodeId)}),j.length>0&&(0,b.jsx)(m.z,{children:(0,b.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,b.jsxs)("span",{children:[X," node",1!==X?"s":""," scanned ·"," ",W," skill",1!==W?"s":""," discovered"]}),Y>0&&(0,b.jsxs)("span",{className:"text-danger",children:[Y," node",1!==Y?"s":""," unreachable"]})]})})]}),(0,b.jsx)(g.n,{open:!!N,onClose:()=>O(null),title:N?.name??"File",icon:(0,b.jsx)(v.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,b.jsx)("pre",{className:"rounded border border-border bg-bg p-4 text-xs overflow-auto max-h-96 whitespace-pre-wrap",children:N?.content||"(empty)"})}),(0,b.jsx)(g.n,{open:!!P,onClose:()=>Q(null),title:"Publish to Library",description:P?.skill.name??"",icon:(0,b.jsx)(z.f,{className:"h-5 w-5 text-primary"}),children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,b.jsx)("span",{className:"text-accent",children:"*"})]}),(0,b.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:"1.0.0",className:g.W})]}),P&&(0,b.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Files:"})," ",P.skill.files.length," files"]}),(0,b.jsxs)("p",{children:[(0,b.jsx)("span",{className:"text-text-muted",children:"Tags:"})," ",["skill",...P.skill.tags].join(", ")]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(d.K,{variant:"secondary",size:"sm",onClick:()=>Q(null),children:"Cancel"}),(0,b.jsx)(d.K,{size:"sm",onClick:()=>void $(),disabled:T||!R,children:T?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(z.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],9121)}];
2
2
 
3
3
  //# sourceMappingURL=apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js.map
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/0cz1d0mv5g_q7.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/VctstYkAeZ_bmSUU1lySP/_buildManifest.js",
11
- "static/VctstYkAeZ_bmSUU1lySP/_ssgManifest.js",
12
- "static/VctstYkAeZ_bmSUU1lySP/_clientMiddlewareManifest.js"
10
+ "static/LwCb7cxSJ3jJXNJIZN5vo/_buildManifest.js",
11
+ "static/LwCb7cxSJ3jJXNJIZN5vo/_ssgManifest.js",
12
+ "static/LwCb7cxSJ3jJXNJIZN5vo/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/3y705tc4v-41-.js",
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/3y705tc4v-41-.js"/><script src="/_next/static/chunks/1k2w3nq2-wg_-.js" async=""></script><script src="/_next/static/chunks/16uyp1ymdlvpq.js" async=""></script><script src="/_next/static/chunks/3l8w-h8da7s_r.js" async=""></script><script src="/_next/static/chunks/3t6i_3lvi_934.js" async=""></script><script src="/_next/static/chunks/turbopack-2u1d16houkiyo.js" async=""></script><script src="/_next/static/chunks/1ua2kfq9s-me6.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script id="_R_">(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push({"otherChunks":["static/chunks/3y705tc4v-41-.js","static/chunks/1k2w3nq2-wg_-.js","static/chunks/16uyp1ymdlvpq.js","static/chunks/3l8w-h8da7s_r.js","static/chunks/3t6i_3lvi_934.js"],"runtimeModuleIds":[94553]});</script><script src="/_next/static/chunks/3y705tc4v-41-.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"/_next/static/chunks/1ua2kfq9s-me6.js\"\n3:I[39756,[\"$2\"],\"default\"]\n4:I[37457,[\"$2\"],\"default\"]\n7:I[97367,[\"$2\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[97367,[\"$2\"],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[97367,[\"$2\"],\"$d\"]\n10:I[68027,[\"$2\"],\"default\",1]\n5:X\n6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$5\"},\"c\":\"$Q6\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"VctstYkAeZ_bmSUU1lySP\"}\n5:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:null\nf:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/3y705tc4v-41-.js"/><script src="/_next/static/chunks/1k2w3nq2-wg_-.js" async=""></script><script src="/_next/static/chunks/16uyp1ymdlvpq.js" async=""></script><script src="/_next/static/chunks/3l8w-h8da7s_r.js" async=""></script><script src="/_next/static/chunks/3t6i_3lvi_934.js" async=""></script><script src="/_next/static/chunks/turbopack-2u1d16houkiyo.js" async=""></script><script src="/_next/static/chunks/1ua2kfq9s-me6.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script id="_R_">(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push({"otherChunks":["static/chunks/3y705tc4v-41-.js","static/chunks/1k2w3nq2-wg_-.js","static/chunks/16uyp1ymdlvpq.js","static/chunks/3l8w-h8da7s_r.js","static/chunks/3t6i_3lvi_934.js"],"runtimeModuleIds":[94553]});</script><script src="/_next/static/chunks/3y705tc4v-41-.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"/_next/static/chunks/1ua2kfq9s-me6.js\"\n3:I[39756,[\"$2\"],\"default\"]\n4:I[37457,[\"$2\"],\"default\"]\n7:I[97367,[\"$2\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[97367,[\"$2\"],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[97367,[\"$2\"],\"$d\"]\n10:I[68027,[\"$2\"],\"default\",1]\n5:X\n6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$5\"},\"c\":\"$Q6\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"LwCb7cxSJ3jJXNJIZN5vo\"}\n5:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:null\nf:[]\n"])</script></body></html>
@@ -1,5 +1,5 @@
1
1
  {
2
- "previewModeId": "110ffa7f0fe81299d1c74adbd6bb5325",
3
- "previewModeSigningKey": "7add0b16d6470e5fcf2fa39c5de88e3ab8bb336d457d20f62b439b5e148b77f9",
4
- "previewModeEncryptionKey": "7e56615fe336a087a0a08e36956f0c9b8daebe4067db93687f76a6e33470d149"
2
+ "previewModeId": "71cc52eb2a150c353032f7ada7a7265d",
3
+ "previewModeSigningKey": "d94374c9bda9520ac5874367174c2a6adf29f65d77120e106576010744142f25",
4
+ "previewModeEncryptionKey": "6a12263eb8018701fb719fe396aae7344103993fbefe46be45163d889b965278"
5
5
  }
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"40c661150a97001995ce6e1795054976d1901770c4\": {\n \"workers\": {\n \"app/cron/page\": {\n \"moduleId\": 80202,\n \"async\": false\n }\n },\n \"filename\": \"apps/dashboard/src/app/actions/scan.ts\",\n \"exportedName\": \"scanCron\"\n },\n \"403137cff7275d427fe7171b94f5bb6ce9d09b12b3\": {\n \"workers\": {\n \"app/skills/page\": {\n \"moduleId\": 28111,\n \"async\": false\n }\n },\n \"filename\": \"apps/dashboard/src/app/actions/scan.ts\",\n \"exportedName\": \"scanSkills\"\n }\n },\n \"edge\": {},\n \"encryptionKey\": \"fAeuVJ3Jtl+4YIDZkPCYeAGrQCN2rIIJ63+rOUA959c=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"40a10688cb9a2c3f5e2652b5e782c2776ccb81f473\": {\n \"workers\": {\n \"app/cron/page\": {\n \"moduleId\": 80202,\n \"async\": false\n }\n },\n \"filename\": \"apps/dashboard/src/app/actions/scan.ts\",\n \"exportedName\": \"scanCron\"\n },\n \"406e787aaf2acf5178fea11f1394d531646e00d02d\": {\n \"workers\": {\n \"app/skills/page\": {\n \"moduleId\": 28111,\n \"async\": false\n }\n },\n \"filename\": \"apps/dashboard/src/app/actions/scan.ts\",\n \"exportedName\": \"scanSkills\"\n }\n },\n \"edge\": {},\n \"encryptionKey\": \"F+P5kHRpzUx8yVmX+Lo8b4m0HRzyVV3NAQW/WO39bZ8=\"\n}"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "node": {
3
- "40c661150a97001995ce6e1795054976d1901770c4": {
3
+ "40a10688cb9a2c3f5e2652b5e782c2776ccb81f473": {
4
4
  "workers": {
5
5
  "app/cron/page": {
6
6
  "moduleId": 80202,
@@ -10,7 +10,7 @@
10
10
  "filename": "apps/dashboard/src/app/actions/scan.ts",
11
11
  "exportedName": "scanCron"
12
12
  },
13
- "403137cff7275d427fe7171b94f5bb6ce9d09b12b3": {
13
+ "406e787aaf2acf5178fea11f1394d531646e00d02d": {
14
14
  "workers": {
15
15
  "app/skills/page": {
16
16
  "moduleId": 28111,
@@ -22,5 +22,5 @@
22
22
  }
23
23
  },
24
24
  "edge": {},
25
- "encryptionKey": "fAeuVJ3Jtl+4YIDZkPCYeAGrQCN2rIIJ63+rOUA959c="
25
+ "encryptionKey": "F+P5kHRpzUx8yVmX+Lo8b4m0HRzyVV3NAQW/WO39bZ8="
26
26
  }
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67683,e=>{"use strict";var a=e.i(43476),s=e.i(22016),r=e.i(64155),t=e.i(83902);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,a)=>e.tailscale?.expired!==a.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(a.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?t.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,a.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,a.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,a.jsx)(o,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,a.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,a.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,a.jsx)("span",{className:"font-semibold",children:e.name}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,a.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},53721,e=>{"use strict";var a=e.i(43476),s=e.i(64155),r=e.i(46670),t=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsx)("span",{title:(0,t.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,a.jsxs)(r.t,{variant:"warning",children:[(0,a.jsx)(s.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,a.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,a.jsx)(s.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,a.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("p",{className:"font-medium text-text",children:[(0,a.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,a.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},46670,e=>{"use strict";var a=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},t={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,a.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",t[n])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",t[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var a=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let t=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:s=100,tone:r,thresholds:t=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:u,glow:h,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=r??(f?(0,o.Z)(v,t):"muted"),b=h||!r&&f&&v>=t.warn,N=u??(f?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":g,children:[(0,a.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":f?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,a.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[j],b&&c[j])})}),m&&(0,a.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[j]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function u({values:e,tone:s="primary",width:r=160,height:t=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,a.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":g,children:h});let b=o.v[s],N=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),w=t-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,_=e.map((e,a)=>[a*y,k(e)]),E=_.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),C=_[_.length-1];return(0,a.jsxs)("svg",{width:v?"100%":r,height:t,viewBox:`0 0 ${r} ${t}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||void 0,children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${t} ${E} ${r},${t}`,fill:`url(#${j})`})]}),void 0!==d&&(0,a.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:E}),x&&!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,u],55427),e.s(["N",0,function({title:e,description:s,children:r,className:t,action:n,tone:i,corners:o=!1,...c}){return(0,a.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:t,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:m,delta:h,tone:p="primary",className:g,testId:f}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,a.jsx)("span",{className:"text-primary/60",children:r})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,a.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),h&&0!==h.value&&(0,a.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(t,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),c&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==m&&(0,a.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(u,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);let t={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:x,description:m,icon:u,action:h,as:p="div",padding:g="md",testId:f,className:v,children:j,...b}){return(0,a.jsxs)(p,{...b,"data-testid":f??b["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],o&&"panel-corners",o&&t[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||u)&&(0,a.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,a.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:u}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},73404,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:t,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:x}){return(0,a.jsxs)("div",{"data-testid":x,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,a.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"// "}),t]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var a=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var a=e.i(43476),s=e.i(78571);function r({className:e}){return(0,a.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:t}){return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",t),children:Array.from({length:e},(e,s)=>(0,a.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,a.jsx)(r,{className:"h-2 w-1/2"}),(0,a.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,a.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:t=4,className:n}){return(0,a.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,a.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:t},(e,s)=>(0,a.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,a.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:t},(e,t)=>(0,a.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+t)%3==0&&"max-w-[60%]")},t))},n))]})},"Q",0,function({lines:e=3,className:t}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",t),children:Array.from({length:e},(e,s)=>(0,a.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(46670);let t={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let x=(0,r.k)(e),m=l??i.has(e.toUpperCase()),u="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,a.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",u,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[m&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[x])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",u,t[x])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let a=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,a)).toFixed(1))} ${["B","KB","MB","GB","TB"][a]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},59439,e=>{e.v(a=>Promise.all(["static/chunks/1ixu-i6j99dj0.js"].map(a=>e.l(a))).then(()=>a(93309)))},37138,e=>{e.v(a=>Promise.all(["static/chunks/3h4dmpbixi6eo.js"].map(a=>e.l(a))).then(()=>a(99894)))},75775,e=>{"use strict";var a=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],75775)},57665,e=>{"use strict";var a=e.i(56420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],57665)},86207,14098,e=>{"use strict";var a=e.i(56420);let s={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],86207);var t=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)([]),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(!0),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(b(""),h(a?.role?.id??""),g(!0),w(!0),(async()=>{try{let e=await o.f.roles.list();m(e.data??[])}catch{b("Failed to load roles")}finally{w(!1)}})())},[e,a?.role?.id]);let y=async()=>{if(a){v(!0),b("");try{let e=a.role?.id;e&&e!==u&&await o.f.roles.unassign(e,{nodeIds:[a.id]}),u&&await o.f.roles.assign(u,{nodeIds:[a.id],defer:!p});let t=u?x.find(e=>e.id===u)??null:null;r(t),s()}catch(e){b(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(a?.role){v(!0),b("");try{await o.f.roles.unassign(a.role.id,{nodeIds:[a.id]}),r(null),s()}catch(e){b(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:_,title:a?.role?"Change Role":"Assign Role",description:a?`Node: ${a.name}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[N?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,t.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===x.length?(0,t.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.G,{label:"Role",children:(0,t.jsxs)("select",{value:u,onChange:e=>h(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"",children:"— No role —"}),x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),u&&(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:p,onChange:e=>g(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,t.jsx)("div",{children:a?.role&&(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:f,children:"Unassign Role"})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:f||!u||0===x.length,icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":a?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)(""),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)("");(0,n.useEffect)(()=>{if(a){m(a.name);try{let e=JSON.parse(a.tags);h(e.join(", "))}catch{h("")}g(a.status),b("")}},[a]);let N=async()=>{if(a&&x.trim()){v(!0),b("");try{let e=u.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(a.id,{name:x.trim(),tags:e,status:p.toUpperCase()}),r(),s()}catch(e){b(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},w=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:w,title:"Edit Node",description:a?`${a.hostname}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:x,onChange:e=>m(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"Status",children:(0,t.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,t.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,t.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,t.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,t.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>h(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:w,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void N(),disabled:f||!x.trim(),icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:a,onRegistered:s}){let[r,x]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),[h,p]=(0,n.useState)("4100"),[g,f]=(0,n.useState)("linux"),[v,j]=(0,n.useState)("x86_64"),[b,N]=(0,n.useState)(""),[w,y]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),E=async()=>{if(r.trim()&&m.trim()){y(!0),_("");try{let e=b.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:r.trim(),hostname:m.trim(),ipAddress:m.trim(),port:Number(h)||4100,os:g,arch:v,tags:e,agentVersion:"3.0.2"}),s(),C()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{y(!1)}}},C=()=>{x(""),u(""),p("4100"),f("linux"),j("x86_64"),N(""),_(""),y(!1),a()};return(0,t.jsx)(l.n,{open:e,onClose:C,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Node Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:r,onChange:e=>x(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,t.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsx)(l.G,{label:"Port",children:(0,t.jsx)("input",{type:"number",value:h,onChange:e=>p(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"OS",children:(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"linux",children:"Linux"}),(0,t.jsx)("option",{value:"darwin",children:"macOS"}),(0,t.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,t.jsx)(l.G,{label:"Architecture",children:(0,t.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,t.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,t.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:b,onChange:e=>N(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void E(),disabled:w||!r.trim()||!m.trim(),icon:w?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:w?"Registering…":"Register Node"})]})]})})}],14098)},83902,e=>{"use strict";var a=e.i(56420);let s={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],83902)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67683,e=>{"use strict";var a=e.i(43476),s=e.i(22016),r=e.i(64155),t=e.i(83902);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,a)=>e.tailscale?.expired!==a.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(a.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?t.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,a.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,a.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,a.jsx)(o,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,a.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,a.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,a.jsx)("span",{className:"font-semibold",children:e.name}),(0,a.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,a.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},53721,e=>{"use strict";var a=e.i(43476),s=e.i(64155),r=e.i(46670),t=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsx)("span",{title:(0,t.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,a.jsxs)(r.t,{variant:"warning",children:[(0,a.jsx)(s.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,a.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,a.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,a.jsx)(s.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,a.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("p",{className:"font-medium text-text",children:[(0,a.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,a.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},46670,e=>{"use strict";var a=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},t={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,a.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",t[n])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",t[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var a=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let t=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:s=100,tone:r,thresholds:t=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:u,glow:h,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=r??(f?(0,o.Z)(v,t):"muted"),b=h||!r&&f&&v>=t.warn,N=u??(f?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":g,children:[(0,a.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":f?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,a.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[j],b&&c[j])})}),m&&(0,a.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[j]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function u({values:e,tone:s="primary",width:r=160,height:t=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,a.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":g,children:h});let b=o.v[s],N=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),w=t-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,_=e.map((e,a)=>[a*y,k(e)]),E=_.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),C=_[_.length-1];return(0,a.jsxs)("svg",{width:v?"100%":r,height:t,viewBox:`0 0 ${r} ${t}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||void 0,children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${t} ${E} ${r},${t}`,fill:`url(#${j})`})]}),void 0!==d&&(0,a.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:E}),x&&!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,u],55427),e.s(["N",0,function({title:e,description:s,children:r,className:t,action:n,tone:i,corners:o=!1,...c}){return(0,a.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:t,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:m,delta:h,tone:p="primary",className:g,testId:f}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,a.jsx)("span",{className:"text-primary/60",children:r})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,a.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),h&&0!==h.value&&(0,a.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(t,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),c&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==m&&(0,a.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(u,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);let t={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:x,description:m,icon:u,action:h,as:p="div",padding:g="md",testId:f,className:v,children:j,...b}){return(0,a.jsxs)(p,{...b,"data-testid":f??b["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],o&&"panel-corners",o&&t[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||u)&&(0,a.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,a.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:u}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},73404,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:t,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:x}){return(0,a.jsxs)("div",{"data-testid":x,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,a.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"// "}),t]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var a=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,a.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var a=e.i(43476),s=e.i(78571);function r({className:e}){return(0,a.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:t}){return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",t),children:Array.from({length:e},(e,s)=>(0,a.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,a.jsx)(r,{className:"h-2 w-1/2"}),(0,a.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,a.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:t=4,className:n}){return(0,a.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,a.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:t},(e,s)=>(0,a.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,a.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:t},(e,t)=>(0,a.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+t)%3==0&&"max-w-[60%]")},t))},n))]})},"Q",0,function({lines:e=3,className:t}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,a.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",t),children:Array.from({length:e},(e,s)=>(0,a.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var a=e.i(43476),s=e.i(78571),r=e.i(46670);let t={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let x=(0,r.k)(e),m=l??i.has(e.toUpperCase()),u="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,a.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",u,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[m&&(0,a.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[x])}),(0,a.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",u,t[x])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let a=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,a)).toFixed(1))} ${["B","KB","MB","GB","TB"][a]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},59439,e=>{e.v(a=>Promise.all(["static/chunks/1ixu-i6j99dj0.js"].map(a=>e.l(a))).then(()=>a(93309)))},37138,e=>{e.v(a=>Promise.all(["static/chunks/3h4dmpbixi6eo.js"].map(a=>e.l(a))).then(()=>a(99894)))},75775,e=>{"use strict";var a=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],75775)},57665,e=>{"use strict";var a=e.i(56420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],57665)},86207,14098,e=>{"use strict";var a=e.i(56420);let s={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],86207);var t=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)([]),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(!0),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(b(""),h(a?.role?.id??""),g(!0),w(!0),(async()=>{try{let e=await o.f.roles.list();m(e.data??[])}catch{b("Failed to load roles")}finally{w(!1)}})())},[e,a?.role?.id]);let y=async()=>{if(a){v(!0),b("");try{let e=a.role?.id;e&&e!==u&&await o.f.roles.unassign(e,{nodeIds:[a.id]}),u&&await o.f.roles.assign(u,{nodeIds:[a.id],defer:!p});let t=u?x.find(e=>e.id===u)??null:null;r(t),s()}catch(e){b(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(a?.role){v(!0),b("");try{await o.f.roles.unassign(a.role.id,{nodeIds:[a.id]}),r(null),s()}catch(e){b(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:_,title:a?.role?"Change Role":"Assign Role",description:a?`Node: ${a.name}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[N?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,t.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===x.length?(0,t.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.G,{label:"Role",children:(0,t.jsxs)("select",{value:u,onChange:e=>h(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"",children:"— No role —"}),x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),u&&(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:p,onChange:e=>g(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,t.jsx)("div",{children:a?.role&&(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:f,children:"Unassign Role"})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:f||!u||0===x.length,icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":a?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:a,onClose:s,onSaved:r}){let[x,m]=(0,n.useState)(""),[u,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)("");(0,n.useEffect)(()=>{if(a){m(a.name);try{let e=JSON.parse(a.tags);h(e.join(", "))}catch{h("")}g(a.status),b("")}},[a]);let N=async()=>{if(a&&x.trim()){v(!0),b("");try{let e=u.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(a.id,{name:x.trim(),tags:e,status:p.toUpperCase()}),r(),s()}catch(e){b(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},w=()=>{b(""),v(!1),s()};return(0,t.jsx)(l.n,{open:e,onClose:w,title:"Edit Node",description:a?`${a.hostname}`:"",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:x,onChange:e=>m(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"Status",children:(0,t.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,t.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,t.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,t.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,t.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>h(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),j&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:j}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:w,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void N(),disabled:f||!x.trim(),icon:f?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:f?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:a,onRegistered:s}){let[r,x]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),[h,p]=(0,n.useState)("4100"),[g,f]=(0,n.useState)("linux"),[v,j]=(0,n.useState)("x86_64"),[b,N]=(0,n.useState)(""),[w,y]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),E=async()=>{if(r.trim()&&m.trim()){y(!0),_("");try{let e=b.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:r.trim(),hostname:m.trim(),ipAddress:m.trim(),port:Number(h)||4100,os:g,arch:v,tags:e,agentVersion:"3.1.0"}),s(),C()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{y(!1)}}},C=()=>{x(""),u(""),p("4100"),f("linux"),j("x86_64"),N(""),_(""),y(!1),a()};return(0,t.jsx)(l.n,{open:e,onClose:C,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,t.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(l.G,{label:"Node Name",required:!0,children:(0,t.jsx)("input",{type:"text",value:r,onChange:e=>x(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,t.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsx)(l.G,{label:"Port",children:(0,t.jsx)("input",{type:"number",value:h,onChange:e=>p(e.target.value),className:l.W})}),(0,t.jsx)(l.G,{label:"OS",children:(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"linux",children:"Linux"}),(0,t.jsx)("option",{value:"darwin",children:"macOS"}),(0,t.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,t.jsx)(l.G,{label:"Architecture",children:(0,t.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:l.N,children:[(0,t.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,t.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,t.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,t.jsxs)(l.G,{label:"Tags",children:[(0,t.jsx)("input",{type:"text",value:b,onChange:e=>N(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void E(),disabled:w||!r.trim()||!m.trim(),icon:w?(0,t.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:w?"Registering…":"Register Node"})]})]})})}],14098)},83902,e=>{"use strict";var a=e.i(56420);let s={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};s.node;let r=(0,a.f)(s);e.s(["f",0,r],83902)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47061,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(68759),a=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(34479),o=e.i(4050),d=e.i(95187);let x=(0,d.createServerReference)("40c661150a97001995ce6e1795054976d1901770c4",d.callServer,void 0,d.findSourceMapURL,"scanCron");var m=e.i(78571),h=e.i(63376),u=e.i(88187),p=e.i(41120),f=e.i(66595),j=e.i(74544),v=e.i(41220),g=e.i(16327),b=e.i(67927),N=e.i(25981),w=e.i(32781),y=e.i(4139),k=e.i(49882),S=e.i(64155),_=e.i(51757),C=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,o.l)(),[d,I]=(0,t.useState)([]),[E,$]=(0,t.useState)(!1),[L,M]=(0,t.useState)(null),[D,z]=(0,t.useState)(!1),[R,T]=(0,t.useState)(""),[O,A]=(0,t.useState)(new Set),[P,F]=(0,t.useState)(null),[U,G]=(0,t.useState)("1.0.0"),[W,K]=(0,t.useState)(""),[H,q]=(0,t.useState)(!1),B=(0,t.useCallback)(async()=>{$(!0),I([]),M(null);let s=Date.now();try{let s=await x(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done"}));I(e);let t=new Set(e.filter(e=>e.jobs.length>0).map(e=>e.nodeId));A(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else M(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";M(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),$(!1),z(!0)}},[e]);(0,t.useEffect)(()=>{e&&B()},[e,B]);let J=d.reduce((e,s)=>e+("done"===s.status?s.jobs.length:0),0),V=d.filter(e=>"done"===e.status).length,Q=d.filter(e=>"error"===e.status).length,Y=e=>{if(!R)return!0;let s=R.toLowerCase();return e.name.toLowerCase().includes(s)||e.command.toLowerCase().includes(s)||e.schedule.toLowerCase().includes(s)||(e.user?.toLowerCase().includes(s)??!1)},Z=async()=>{if(P&&U){q(!0);try{let e=JSON.stringify({name:P.job.name,version:U,schedule:P.job.schedule,command:P.job.command,description:W},null,2);await l.f.library.files.create({name:`${P.job.name} v${U}`,fileName:`${P.job.name}-${U}.json`,mimeType:"application/x-magnus-cronjob",content:e,tags:["cronjob","cron"]}),F(null),G("1.0.0"),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(h.U,{className:"space-y-6",children:[(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[D&&!E&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[d.length," node",1!==d.length?"s":""," · ",J," job",1!==J?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(r.K,{variant:"secondary",size:"sm",onClick:()=>void B(),disabled:E,children:[(0,s.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",E&&"animate-spin")}),E?"Scanning...":"Rescan"]})]})]})}),E&&(0,s.jsx)(h.z,{children:(0,s.jsx)(u.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:d.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!E&&D&&J>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(f.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:R,onChange:e=>T(e.target.value),className:(0,m.f)(i.W,"pl-9")})]})}),!E&&D&&L&&(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(S.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:L}),(0,s.jsxs)(r.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void B(),children:[(0,s.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!E&&D&&!L&&(0,s.jsxs)(s.Fragment,{children:[0===d.length?(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(v.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):d.map(e=>{let t=O.has(e.nodeId),i=e.jobs.filter(Y);return(0,s.jsx)(h.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void A(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(v.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(a.t,{variant:e.jobs.length>0?"success":"default",children:[e.jobs.length," job",1!==e.jobs.length?"s":""]}),"error"===e.status&&((0,c.f)(e.error)?(0,s.jsx)(a.t,{variant:"default",children:"Disabled"}):(0,s.jsx)(a.t,{variant:"danger",children:"Error"}))]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,c.f)(e.error)?"text-text-muted":"text-danger"),children:(0,c.f)(e.error)??e.error}),"done"===e.status&&0===e.jobs.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(_.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(C.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(g.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(b.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map((t,n)=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),t.user&&(0,s.jsx)(a.t,{variant:"default",children:t.user}),(0,s.jsx)(a.t,{variant:"info",children:t.schedule})]}),(0,s.jsxs)(r.K,{size:"sm",variant:"secondary",onClick:()=>{F({job:t,nodeId:e.nodeId,nodeName:e.nodeName}),G("1.0.0"),K("")},children:[(0,s.jsx)(N.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,s.jsx)(k.f,{className:"h-3 w-3"}),function(e){let s=e.split(/\s+/);if(s.length<5)return e;let[t,r,a,n,i]=s;return"*"===t&&"*"===r&&"*"===a&&"*"===n&&"*"===i?"Every minute":"0"===t&&"*"===r&&"*"===a&&"*"===n&&"*"===i?"Every hour":"0"===t&&"0"===r&&"*"===a&&"*"===n&&"*"===i?"Daily at midnight":t?.startsWith("*/")?`Every ${t.slice(2)} minutes`:r?.startsWith("*/")?`Every ${r.slice(2)} hours`:e}(t.schedule)]}),(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,s.jsx)(y.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,s.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:t.command})]})]},`${t.name}-${n}`))})})]})},e.nodeId)}),d.length>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[V," node",1!==V?"s":""," scanned ·"," ",J," job",1!==J?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!P,onClose:()=>F(null),title:"Publish to Library",description:P?.job.name??"",icon:(0,s.jsx)(N.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:U,onChange:e=>G(e.target.value),placeholder:"1.0.0",className:i.W})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,s.jsx)("input",{type:"text",value:W,onChange:e=>K(e.target.value),placeholder:"What does this cron job do?",className:i.W})]}),P&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",P.job.schedule]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,s.jsx)("span",{className:"text-primary",children:P.job.command})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(r.K,{variant:"secondary",size:"sm",onClick:()=>F(null),children:"Cancel"}),(0,s.jsx)(r.K,{size:"sm",onClick:()=>void Z(),disabled:H||!U,children:H?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],47061)},46670,e=>{"use strict";var s=e.i(43476),t=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},a={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",a[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",a[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var s=e.i(43476),t=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let a=(0,t.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let o={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:r,thresholds:a=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:f}){let j="number"==typeof e&&Number.isFinite(e),v=j?Math.max(0,Math.min(100,e/(t||1)*100)):0,g=r??(j?(0,c.Z)(v,a):"muted"),b=u||!r&&j&&v>=a.warn,N=h??(j?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":j?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[g],b&&o[g])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",j?c.T[g]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:t="primary",width:r=160,height:a=32,area:n=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:p,testId:f,label:j,stretch:v=!1}){let g=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":f,children:u});let b=c.v[t],N=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=a-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),C=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":r,height:a,viewBox:`0 0 ${r} ${a}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":f,role:j?"img":void 0,"aria-label":j,"aria-hidden":!j||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:g,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${a} ${_} ${r},${a}`,fill:`url(#${g})`})]}),void 0!==d&&(0,s.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:r,className:a,action:n,tone:i,corners:c=!1,...o}){return(0,s.jsx)(l.f,{...o,tone:i,corners:c,title:e,description:t,action:n,className:a,children:r})},"n",0,function({label:e,value:t,icon:r,trend:o,spark:d,meter:m,delta:u,tone:p="primary",className:f,testId:j}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",f),testId:j,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,s.jsx)("span",{className:"text-primary/60",children:r})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":c.T[p]),children:t}),u&&0!==u.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[u.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(a,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.unit]})]}),o&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(h,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var s=e.i(43476),t=e.i(78571),r=e.i(35084);let a={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:m,icon:h,action:u,as:p="div",padding:f="md",testId:j,className:v,children:g,...b}){return(0,s.jsxs)(p,{...b,"data-testid":j??b["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&a[e],o&&"glow-hover",o&&n[e],o&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||u||h)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",r.T[e]),children:h}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),g]})}])},63376,e=>{"use strict";var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{"use strict";var s=e.i(43476),t=e.i(32181),r=e.i(32781),a=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:o}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[o&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:o?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[o?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(a.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:o?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&o&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let o=(0,l.f)(c);e.s(["f",0,o],25981)},75775,e=>{"use strict";var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let r=(0,s.f)(t);e.s(["f",0,r],75775)},49882,e=>{"use strict";var s=e.i(56420);let t={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};t.node;let r=(0,s.f)(t);e.s(["f",0,r],49882)},95187,(e,s,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in r)Object.defineProperty(t,a,{enumerable:!0,get:r[a]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47061,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(68759),a=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(34479),o=e.i(4050),d=e.i(95187);let x=(0,d.createServerReference)("40a10688cb9a2c3f5e2652b5e782c2776ccb81f473",d.callServer,void 0,d.findSourceMapURL,"scanCron");var m=e.i(78571),h=e.i(63376),u=e.i(88187),p=e.i(41120),f=e.i(66595),j=e.i(74544),v=e.i(41220),g=e.i(16327),b=e.i(67927),N=e.i(25981),w=e.i(32781),y=e.i(4139),k=e.i(49882),S=e.i(64155),_=e.i(51757),C=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,o.l)(),[d,I]=(0,t.useState)([]),[E,$]=(0,t.useState)(!1),[L,M]=(0,t.useState)(null),[D,z]=(0,t.useState)(!1),[R,T]=(0,t.useState)(""),[O,A]=(0,t.useState)(new Set),[P,F]=(0,t.useState)(null),[U,G]=(0,t.useState)("1.0.0"),[W,K]=(0,t.useState)(""),[H,q]=(0,t.useState)(!1),B=(0,t.useCallback)(async()=>{$(!0),I([]),M(null);let s=Date.now();try{let s=await x(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done"}));I(e);let t=new Set(e.filter(e=>e.jobs.length>0).map(e=>e.nodeId));A(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else M(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";M(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),$(!1),z(!0)}},[e]);(0,t.useEffect)(()=>{e&&B()},[e,B]);let J=d.reduce((e,s)=>e+("done"===s.status?s.jobs.length:0),0),V=d.filter(e=>"done"===e.status).length,Q=d.filter(e=>"error"===e.status).length,Y=e=>{if(!R)return!0;let s=R.toLowerCase();return e.name.toLowerCase().includes(s)||e.command.toLowerCase().includes(s)||e.schedule.toLowerCase().includes(s)||(e.user?.toLowerCase().includes(s)??!1)},Z=async()=>{if(P&&U){q(!0);try{let e=JSON.stringify({name:P.job.name,version:U,schedule:P.job.schedule,command:P.job.command,description:W},null,2);await l.f.library.files.create({name:`${P.job.name} v${U}`,fileName:`${P.job.name}-${U}.json`,mimeType:"application/x-magnus-cronjob",content:e,tags:["cronjob","cron"]}),F(null),G("1.0.0"),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(h.U,{className:"space-y-6",children:[(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[D&&!E&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[d.length," node",1!==d.length?"s":""," · ",J," job",1!==J?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(r.K,{variant:"secondary",size:"sm",onClick:()=>void B(),disabled:E,children:[(0,s.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",E&&"animate-spin")}),E?"Scanning...":"Rescan"]})]})]})}),E&&(0,s.jsx)(h.z,{children:(0,s.jsx)(u.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:d.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!E&&D&&J>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(f.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:R,onChange:e=>T(e.target.value),className:(0,m.f)(i.W,"pl-9")})]})}),!E&&D&&L&&(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(S.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:L}),(0,s.jsxs)(r.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void B(),children:[(0,s.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!E&&D&&!L&&(0,s.jsxs)(s.Fragment,{children:[0===d.length?(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(v.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):d.map(e=>{let t=O.has(e.nodeId),i=e.jobs.filter(Y);return(0,s.jsx)(h.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void A(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(v.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(a.t,{variant:e.jobs.length>0?"success":"default",children:[e.jobs.length," job",1!==e.jobs.length?"s":""]}),"error"===e.status&&((0,c.f)(e.error)?(0,s.jsx)(a.t,{variant:"default",children:"Disabled"}):(0,s.jsx)(a.t,{variant:"danger",children:"Error"}))]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,c.f)(e.error)?"text-text-muted":"text-danger"),children:(0,c.f)(e.error)??e.error}),"done"===e.status&&0===e.jobs.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(_.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(C.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(g.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(b.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map((t,n)=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),t.user&&(0,s.jsx)(a.t,{variant:"default",children:t.user}),(0,s.jsx)(a.t,{variant:"info",children:t.schedule})]}),(0,s.jsxs)(r.K,{size:"sm",variant:"secondary",onClick:()=>{F({job:t,nodeId:e.nodeId,nodeName:e.nodeName}),G("1.0.0"),K("")},children:[(0,s.jsx)(N.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,s.jsx)(k.f,{className:"h-3 w-3"}),function(e){let s=e.split(/\s+/);if(s.length<5)return e;let[t,r,a,n,i]=s;return"*"===t&&"*"===r&&"*"===a&&"*"===n&&"*"===i?"Every minute":"0"===t&&"*"===r&&"*"===a&&"*"===n&&"*"===i?"Every hour":"0"===t&&"0"===r&&"*"===a&&"*"===n&&"*"===i?"Daily at midnight":t?.startsWith("*/")?`Every ${t.slice(2)} minutes`:r?.startsWith("*/")?`Every ${r.slice(2)} hours`:e}(t.schedule)]}),(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,s.jsx)(y.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,s.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:t.command})]})]},`${t.name}-${n}`))})})]})},e.nodeId)}),d.length>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[V," node",1!==V?"s":""," scanned ·"," ",J," job",1!==J?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!P,onClose:()=>F(null),title:"Publish to Library",description:P?.job.name??"",icon:(0,s.jsx)(N.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:U,onChange:e=>G(e.target.value),placeholder:"1.0.0",className:i.W})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,s.jsx)("input",{type:"text",value:W,onChange:e=>K(e.target.value),placeholder:"What does this cron job do?",className:i.W})]}),P&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",P.job.schedule]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,s.jsx)("span",{className:"text-primary",children:P.job.command})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(r.K,{variant:"secondary",size:"sm",onClick:()=>F(null),children:"Cancel"}),(0,s.jsx)(r.K,{size:"sm",onClick:()=>void Z(),disabled:H||!U,children:H?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],47061)},46670,e=>{"use strict";var s=e.i(43476),t=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},a={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",a[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",a[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var s=e.i(43476),t=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let a=(0,t.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let o={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:r,thresholds:a=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:f}){let j="number"==typeof e&&Number.isFinite(e),v=j?Math.max(0,Math.min(100,e/(t||1)*100)):0,g=r??(j?(0,c.Z)(v,a):"muted"),b=u||!r&&j&&v>=a.warn,N=h??(j?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":j?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[g],b&&o[g])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",j?c.T[g]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:t="primary",width:r=160,height:a=32,area:n=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:p,testId:f,label:j,stretch:v=!1}){let g=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":f,children:u});let b=c.v[t],N=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=a-4,y=r/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),C=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":r,height:a,viewBox:`0 0 ${r} ${a}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":f,role:j?"img":void 0,"aria-label":j,"aria-hidden":!j||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:g,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${a} ${_} ${r},${a}`,fill:`url(#${g})`})]}),void 0!==d&&(0,s.jsx)("line",{x1:0,x2:r,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:r,className:a,action:n,tone:i,corners:c=!1,...o}){return(0,s.jsx)(l.f,{...o,tone:i,corners:c,title:e,description:t,action:n,className:a,children:r})},"n",0,function({label:e,value:t,icon:r,trend:o,spark:d,meter:m,delta:u,tone:p="primary",className:f,testId:j}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",f),testId:j,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,s.jsx)("span",{className:"text-primary/60",children:r})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":c.T[p]),children:t}),u&&0!==u.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[u.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(a,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.unit]})]}),o&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(h,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var s=e.i(43476),t=e.i(78571),r=e.i(35084);let a={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:m,icon:h,action:u,as:p="div",padding:f="md",testId:j,className:v,children:g,...b}){return(0,s.jsxs)(p,{...b,"data-testid":j??b["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&a[e],o&&"glow-hover",o&&n[e],o&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||u||h)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",r.T[e]),children:h}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),g]})}])},63376,e=>{"use strict";var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{"use strict";var s=e.i(43476),t=e.i(32181),r=e.i(32781),a=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:o}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[o&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:o?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[o?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(a.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:o?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&o&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let o=(0,l.f)(c);e.s(["f",0,o],25981)},75775,e=>{"use strict";var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let r=(0,s.f)(t);e.s(["f",0,r],75775)},49882,e=>{"use strict";var s=e.i(56420);let t={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};t.node;let r=(0,s.f)(t);e.s(["f",0,r],49882)},95187,(e,s,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in r)Object.defineProperty(t,a,{enumerable:!0,get:r[a]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}]);