@hivemagnus/magnus-ui 2.4.1 → 2.4.3

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 (149) hide show
  1. package/README.md +1 -1
  2. package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
  3. package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
  4. package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
  5. package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
  6. package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
  7. package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
  8. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  12. package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
  14. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
  15. package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
  16. package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
  17. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
  18. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
  19. package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
  20. package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js.nft.json +1 -1
  21. package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
  22. package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
  23. package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js.nft.json +1 -1
  24. package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
  25. package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
  26. package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
  27. package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
  28. package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
  29. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
  30. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
  31. package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
  32. package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
  33. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
  34. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
  35. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
  36. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
  37. package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
  38. package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  39. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
  40. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
  41. package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
  42. package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
  43. package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
  44. package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
  45. package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
  46. package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
  47. package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
  48. package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
  49. package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
  50. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
  51. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
  52. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
  53. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
  54. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
  55. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
  56. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
  57. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
  58. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
  59. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
  60. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
  61. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
  62. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
  63. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
  64. package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
  65. package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
  66. package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
  67. package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
  68. package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
  69. package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
  70. package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
  71. package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  72. package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
  73. package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
  74. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
  75. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
  76. package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
  77. package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  78. package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
  79. package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
  80. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
  81. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
  82. package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
  83. package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
  84. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
  85. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
  86. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
  87. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
  88. package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
  89. package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  90. package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
  91. package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
  92. package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
  93. package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
  94. package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
  95. package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
  96. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
  97. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
  98. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
  99. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
  100. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
  101. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
  102. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
  103. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
  104. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
  105. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
  106. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
  107. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
  108. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
  109. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
  110. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
  111. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
  112. package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
  113. package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
  114. package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  115. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
  116. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
  117. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
  118. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
  119. package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
  120. package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
  121. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__06giq9g4me8eh._.js +1 -1
  122. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__08sgyyf_y8ab8._.js +1 -1
  123. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11pe-l2-ko65_._.js +1 -1
  124. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0caxc2bc6a__r._.js +1 -1
  125. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1oebzzj_en62h._.js +1 -1
  126. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
  127. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_installations_page_tsx_0nvqgacugy6nf._.js +1 -1
  128. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_commands_page_tsx_1h8a4cebpdfir._.js +2 -2
  129. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
  130. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
  131. package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
  132. package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
  133. package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
  134. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
  135. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
  136. package/dist/app/apps/dashboard/.next/static/chunks/07tx3h4lr-lxl.js +6 -0
  137. package/dist/app/apps/dashboard/.next/static/chunks/{1_9kewhcudj1a.js → 0keybypm2ngd8.js} +1 -1
  138. package/dist/app/apps/dashboard/.next/static/chunks/{3hhmxyk7jn9rq.js → 0r2mvcn2r2sin.js} +1 -1
  139. package/dist/app/apps/dashboard/.next/static/chunks/{0t--rah1jdbpn.js → 1sq4fj6icwx5j.js} +1 -1
  140. package/dist/app/apps/dashboard/.next/static/chunks/{30z1w6x-svk97.js → 2szzpadqdp6kb.js} +1 -1
  141. package/dist/app/apps/dashboard/.next/static/chunks/{1z7d-69b2_7tr.js → 325d15zsugybv.js} +1 -1
  142. package/dist/app/apps/dashboard/.next/static/chunks/{29y_2wjcw14yi.js → 3hnzvqng8c0yl.js} +1 -1
  143. package/dist/app/apps/dashboard/package.json +3 -3
  144. package/dist/app/apps/dashboard/server.js +1 -1
  145. package/package.json +3 -3
  146. package/dist/app/apps/dashboard/.next/static/chunks/20kbnhp5bb1lc.js +0 -6
  147. /package/dist/app/apps/dashboard/.next/static/{GbljtEWNPg47YOR2OQT_9 → C-RL472KkxKd_qvUxFcjz}/_buildManifest.js +0 -0
  148. /package/dist/app/apps/dashboard/.next/static/{GbljtEWNPg47YOR2OQT_9 → C-RL472KkxKd_qvUxFcjz}/_clientMiddlewareManifest.js +0 -0
  149. /package/dist/app/apps/dashboard/.next/static/{GbljtEWNPg47YOR2OQT_9 → C-RL472KkxKd_qvUxFcjz}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93860,e=>{"use strict";let t,n,r,i,a,o,s,l,u,c;e.s(["BIGINT_FORMAT_RANGES",()=>ev,"CONSTANT_CATCH",()=>e4,"Class",()=>eG,"NUMBER_FORMAT_RANGES",()=>ey,"aborted",()=>eI,"allowsEval",()=>ea,"assert",()=>N,"assertEqual",()=>S,"assertIs",()=>O,"assertNever",()=>P,"assertNotEqual",()=>$,"assignProp",()=>V,"attachSchema",()=>eT,"base64ToUint8Array",()=>eL,"base64urlToUint8Array",()=>eJ,"cached",()=>D,"captureStackTrace",()=>er,"cleanEnum",()=>eB,"cleanRegex",()=>M,"clone",()=>em,"cloneDef",()=>X,"codePointLength",()=>eC,"constantCatch",()=>e6,"createTransparentProxy",()=>ef,"defineLazy",()=>B,"defineLazyInternal",()=>e2,"derived",()=>eQ,"esc",()=>et,"escapeRegex",()=>ep,"explicitlyAborted",()=>eO,"extend",()=>ew,"finalizeIssue",()=>eZ,"floatSafeRemainder",()=>U,"getElementAtPath",()=>Y,"getEnumValues",()=>E,"getLengthableOrigin",()=>eM,"getParsedType",()=>eu,"getSizableOrigin",()=>eR,"hexToUint8Array",()=>eq,"hide",()=>eY,"installLazyProp",()=>e9,"isObject",()=>ei,"isPlainObject",()=>eo,"issue",()=>eF,"joinValues",()=>T,"jsonStringifyReplacer",()=>Z,"members",()=>eH,"merge",()=>eA,"mergeDefs",()=>H,"normalizeParams",()=>eg,"nullish",()=>C,"numKeys",()=>el,"objectClone",()=>L,"omit",()=>ej,"optionalKeys",()=>eh,"own",()=>eX,"parsedType",()=>eU,"partial",()=>eS,"pick",()=>e_,"prefixIssues",()=>eP,"primitiveTypes",()=>ed,"promiseAllObject",()=>Q,"propertyKeyTypes",()=>ec,"randomString",()=>ee,"rawShape",()=>J,"required",()=>e$,"safeExtend",()=>ek,"shallowClone",()=>es,"sizeCaps",()=>eE,"slugify",()=>en,"stringifyPrimitive",()=>eb,"toZod",()=>I,"uint8ArrayToBase64",()=>eV,"uint8ArrayToBase64url",()=>eK,"uint8ArrayToHex",()=>eW,"unwrapMessage",()=>eN],22143);var d,p,m,g=e.i(43476),f=e.i(71645),b=e.i(22016),h=e.i(75775),y=e.i(41120),v=e.i(41220),_=e.i(82983),x=e.i(46670),j=e.i(68759),w=e.i(63376),z=e.i(15630);function k({nodeId:e,profileId:t,running:n,refresh:r}){let[i,a]=(0,f.useState)(""),[o,s]=(0,f.useState)(""),[l,u]=(0,f.useState)("");async function c(n){a(n),s(""),u("");try{let i=await _.f.ardent.action(e,t,n);if(!i.data?.service)throw Error("Node did not acknowledge Ardent service state");u(`${t} ${i.data.running?"running":"stopped"} on this node.`),await r()}catch(e){s(await (0,z.S)(e))}finally{a("")}}return(0,g.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 border-t border-border/40 pt-3",children:[(0,g.jsx)(j.K,{size:"sm",disabled:!!i||n,onClick:()=>void c("service-start"),children:"Start"}),(0,g.jsx)(j.K,{size:"sm",variant:"secondary",disabled:!!i||!n,onClick:()=>void c("service-restart"),children:"Restart"}),(0,g.jsx)(j.K,{size:"sm",variant:"danger",disabled:!!i||!n,onClick:()=>void c("service-stop"),children:"Stop"}),i&&(0,g.jsx)("span",{className:"text-[11px] text-text-muted",children:"Waiting for node receipt…"}),l&&(0,g.jsx)("span",{role:"status",className:"text-[11px] text-success",children:l}),o&&(0,g.jsx)("span",{role:"alert",className:"text-[11px] text-danger",children:o})]})}function A({item:e,refresh:t}){let[n,r]=(0,f.useState)(!1),[i,a]=(0,f.useState)(""),[o,s]=(0,f.useState)(""),l=e.stagedPackage;async function u(){r(!0),a(""),s("");try{let n=await _.f.ardent.action(e.nodeId,e.profiles[0]?.id??"default","package-install");if(!n.data?.installed||n.data.version!==l?.version)throw Error("Node did not verify the installed Ardent package");s(`Ardent ${n.data.version} installed. Create or start a profile when configured.`),await t()}catch(e){a(await (0,z.S)(e))}finally{r(!1)}}return(0,g.jsxs)("div",{className:"mt-4 border-t border-border/50 pt-3 text-xs",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsx)("span",{className:"text-text-muted",children:"Release package"}),(0,g.jsx)("span",{className:"font-mono text-text",children:l?.version??"not staged"}),l&&e.version!==l.version&&(0,g.jsx)(j.K,{size:"sm",disabled:n||!e.reachable,onClick:()=>void u(),children:n?"Installing…":e.installed?"Update package":"Install package"})]}),e.stagedPackageError&&(0,g.jsx)("p",{role:"alert",className:"mt-2 text-danger",children:e.stagedPackageError}),o&&(0,g.jsx)("p",{role:"status",className:"mt-2 text-success",children:o}),i&&(0,g.jsx)("p",{role:"alert",className:"mt-2 text-danger",children:i})]})}function S(e){return e}function $(e){return e}function I(){return e=>e}function O(e){}function P(e){throw Error("Unexpected value in exhaustive check")}function N(e){}function E(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function T(e,t="|"){return e.map(e=>eb(e)).join(t)}function Z(e,t){return"bigint"==typeof t?t.toString():t}class R{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function D(e){return new R(e)}function C(e){return null==e}function M(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function U(e,t){let n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}let F=Symbol("evaluating");function B(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==F)return void 0===r&&(r=F,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function L(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function V(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function J(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function K(e){return J(e._zod.def)??e._zod.def.shape}function q(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return V(this,t,e),e},enumerable:!0,configurable:!0})}function W(e,t,n){t in e?V(e,t,n):e[t]=n}function G(e,t,n,r){let i=K(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?q(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):W(e,a,r?r(n.value,a):n.value))}}function H(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function X(e){return H(e._zod.def)}function Y(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function Q(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function ee(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function et(e){return JSON.stringify(e)}function en(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}let er="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ei(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let ea=D(()=>{if(tt.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eo(e){if(!1===ei(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==ei(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function es(e){return eo(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function el(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}let eu=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},ec=new Set(["string","number","symbol"]),ed=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ep(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function em(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function eg(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function ef(e){let t;return new Proxy({},{get:(n,r,i)=>(t??(t=e()),Reflect.get(t,r,i)),set:(n,r,i,a)=>(t??(t=e()),Reflect.set(t,r,i,a)),has:(n,r)=>(t??(t=e()),Reflect.has(t,r)),deleteProperty:(n,r)=>(t??(t=e()),Reflect.deleteProperty(t,r)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,r)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)),defineProperty:(n,r,i)=>(t??(t=e()),Reflect.defineProperty(t,r,i))})}function eb(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function eh(e){return Object.keys(e).filter(t=>void 0!==e[t]._zod.optin&&"optional"===e[t]._zod.optout)}let ey={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ev={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function e_(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return G(i,e,ex(e,t)),em(e,H(n,{shape:i,checks:[]}))}function ex(e,t){let n=K(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ej(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(ex(e,t)),a={};return G(a,e,Reflect.ownKeys(K(e)).filter(e=>!i.has(e))),em(e,H(n,{shape:a,checks:[]}))}function ew(e,t){if(!eo(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=K(e);for(let e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return em(e,H(e._zod.def,{shape:ez(e,t)}))}function ez(e,t){let n={};G(n,e,Reflect.ownKeys(K(e)));for(let e of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,e);r.enumerable&&(r.get?q(n,e,()=>t[e]):W(n,e,r.value))}return n}function ek(e,t){if(!eo(t))throw Error("Invalid input to safeExtend: expected a plain object");return em(e,H(e._zod.def,{shape:ez(e,t)}))}function eA(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};G(n,e,Reflect.ownKeys(K(e))),G(n,t,Reflect.ownKeys(K(t)));let r=H(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return em(e,r)}function eS(e,t,n,r="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(ex(t,n)):void 0,o={};return G(o,t,Reflect.ownKeys(K(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:"optional",innerType:t}))),em(t,H(t._zod.def,{shape:o,checks:[]}))}function e$(e,t,n){let r=n?new Set(ex(t,n)):void 0,i={};return G(i,t,Reflect.ownKeys(K(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),em(t,H(t._zod.def,{shape:i}))}function eI(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function eO(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function eP(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function eN(e){return"string"==typeof e?e:e?.message}function eE(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function eT(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function eZ(e,t,n){let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?e.schema??(e.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:eN(e.inst?._zod.def?.error?.(e))??eN(i?.(e))??eN(t?.error?.(e))??eN(n.customError?.(e))??eN(n.localeError?.(e))??"Invalid input",o={};for(let t of Object.keys(e))"inst"!==t&&"schema"!==t&&"continue"!==t&&"input"!==t&&"__proto__"!==t&&(o[t]=e[t]);return o.path??(o.path=[]),o.message=a,t?.reportInput&&(o.input=e.input),o}function eR(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}let eD=/[\uD800-\uDBFF]/;function eC(e){let t=e.length;if(!eD.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(64512&e.charCodeAt(r))==55296&&(64512&e.charCodeAt(r+1))==56320&&(n--,r++);return n}function eM(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eU(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}function eF(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}function eB(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function eL(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function eV(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function eJ(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return eL(t+n)}function eK(e){return eV(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function eq(e){let t=e.replace(/^0x/,"");if(t.length%2!=0)throw Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function eW(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")}class eG{constructor(...e){}}function eH(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):function(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:eX(this,t,n.bind(this))},set(e){eX(this,t,e)}})}(e,n,r.value)}}function eX(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function eY(e,t,n){return eX(e,t,n,!1)}function eQ(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return eX(this,n,r(this))},set(e){eX(this,n,e)}})}return t}let e0=!1,e1={configurable:!0,get(){e0=!0}};function e2(e,n,r){let i=Object.getPrototypeOf(e._zod);if(n in i&&t!==e._zod){t=void 0;return}t=e._zod,Object.defineProperty(i,n,{configurable:!0,get(){Object.defineProperty(this,n,e1);let e=e0;e0=!1;try{let t=r(this);return e0?delete this[n]:Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t}),e0=e0||e,t}catch(t){throw delete this[n],e0=e0||e,t}},set(e){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:e})}})}function e9(e,t,n,r){let i,a=t in(i=Object.getPrototypeOf(e))?void 0:i;a&&Object.defineProperty(a,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}let e4="~constantCatch";function e6(e){let t=()=>e;return t[e4]=!0,t}let e3={value:void 0,enumerable:!1},e5="captureStackTrace"in Error?Error:null;function e8(e,t,n,r){function i(e){this.def=e,this.constr=u,this.traits=new Set}i.prototype={};let a=n&&new WeakSet;function o(r,o){if(r._zod){if(r._zod.traits.has(e))return}else{e3.value=new i(o);try{Object.defineProperty(r,"_zod",e3)}finally{e3.value=void 0}}if(r._zod.traits.add(e),t(r,o),a){let e=Object.getPrototypeOf(r),t=r._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let o=i??e;a.has(o)||(a.add(o),eH(o,n))}let s=u.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in r||(r[e]=s[e].bind(r)))}let s=r?.Parent??Object;class l extends s{}function u(e){let t=r?.Parent?function(e){let t=e5;if(t){let n=t.stackTraceLimit;if("number"==typeof n){try{t.stackTraceLimit=0}catch{return e5=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}(l):this;o(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(u,"init",{value:o}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class e7 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class te extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(d=globalThis).__zod_globalConfig??(d.__zod_globalConfig={});let tt=globalThis.__zod_globalConfig;function tn(e){return e&&Object.assign(tt,e),tt}class tr extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let ti="~memo",ta=[];function to(e){return null!==e&&"object"==typeof e}function ts(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let tl=new WeakMap,tu=[],tc={alloc(e,t,r){let i=n;if(!i)return r;n=void 0;let a={value:r,issues:null};return i.set(t.value,a),tu.push(a),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{var r,i;let a;if("backward"!==n.direction&&(r=n,i=e.value,void 0!==(a=r[ti]?.backEdges)&&to(i)&&a.has(i)))throw new tr;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let r,i,a,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,s=(l,u)=>{let c;if(void 0===r){let n=function e(t,n,r){var i,a;let o=tl.get(t);if(void 0!==o)return 2*!!o;if(n.has(t))return 2;n.add(t);let s=0,l=t=>{if(2!==s&&t?._zod){let i=e(t,n,r);i>s&&(s=i)}},u=e=>{e>s&&(s=e)},c=t._zod.def;switch(c.type){case"object":{let t=J(c);u(t?((t,i)=>{let a=0;for(let o of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,o);if(i&&!s.enumerable)continue;let l=s.get?1:s.value?._zod?e(s.value,n,r):0;l>a&&(a=l)}return a})(t,!0):1),l(c.catchall);break}case"array":l(c.element);break;case"tuple":for(let e of c.items)l(e);l(c.rest);break;case"record":case"map":l(c.keyType),l(c.valueType);break;case"set":l(c.valueType);break;case"union":for(let e of c.options)l(e);break;case"intersection":l(c.left),l(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":l(c.innerType);break;case"pipe":l(c.in),l(c.out);break;case"function":l(c.input),l(c.output);break;case"lazy":{let i=c._cachedInner??(r?t._zod.innerType:void 0);u(i?e(i,n,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&"object"==typeof n){if(n._zod)l(n);else if(Array.isArray(n))for(let e of n)l(e)}}}return n.delete(t),i=t,1!==(a=s)&&tl.set(i,2===a),a}(e,new Set,!1);if(0===n)return e._zod.parse=t,e._zod.run===s&&(e._zod.run=t),t(l,u);2===n||o?r=!0:o=!0}let d=l.value;if(!to(d))return t(l,u);let p=u[ti];if(p||(p={buckets:new WeakMap,backEdges:void 0},u[ti]=p),i===u)c=a;else{var m;let t;(t=(m=p).buckets.get(e))||(t=new WeakMap,m.buckets.set(e,t)),c=t,i=u,a=c}let g=c.get(d);if(g)return l.value=g.value,g.issues?g.issues.length&&l.issues.push(...ts(g.issues)):(l.memo=!0,p.backEdges??(p.backEdges=new WeakSet),p.backEdges.add(g.value)),l;n=c;let f=tu.length,b=t(l,u);n=void 0;let h=tu.length>f?tu.pop():void 0;return b instanceof Promise?b.then(e=>(h&&(h.issues=e.issues.length?ts(e.issues):ta),e)):(h&&(h.issues=b.issues.length?ts(b.issues):ta),b)};e._zod.parse=s,e._zod.run===t&&(e._zod.run=s)})}};(p=globalThis).__zod_globalRegistry??(p.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let td=globalThis.__zod_globalRegistry,tp=/^[cC][0-9a-z]{6,}$/,tm=/^[0-9a-z]+$/,tg=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tf=/^[0-9a-vA-V]{20}$/,tb=/^[A-Za-z0-9]{27}$/,th=/^[a-zA-Z0-9_-]{21}$/;function ty(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}let tv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,t_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tx=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,tj=tx(4),tw=tx(6),tz=tx(7),tk=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tA=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u;function tS(){return RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")}let t$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tI=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tO=e=>{let t=ep(e??":");return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},tP=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tN=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tT=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,tZ=/^https?$/,tR=/^\+[1-9]\d{6,14}$/,tD=/^\d(?:[ -]?\d){11,18}$/,tC=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,tM="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tU=RegExp(`^${tM}$`);function tF(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tB(e){return RegExp(`^${tF(e)}$`)}function tL(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${tF({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${tF({precision:e.precision})}`:n;return RegExp(`^${tM}T(?:${r})$`)}let tV=/^[\s\S]{0,}$/,tJ=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)},tK=/^-?\d+n?$/,tq=/^-?\d+$/,tW=/^-?\d+(?:\.\d+)?$/,tG=/^(?:true|false)$/i,tH=/^null$/i,tX=/^undefined$/i,tY=/^[^A-Z]*$/,tQ=/^[^a-z]*$/;function t0(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function t1(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}let t2=t0(22,"=="),t9=t1(22),t4=t0(27,"="),t6=t1(27),t3=t0(43,"="),t5=t1(43),t8=t0(64,""),t7=t1(64),ne=t0(86,"=="),nt=t1(86);e.s(["anyString",0,tV,"base64",0,tE,"base64url",0,tT,"bigint",0,tK,"boolean",0,tG,"browserEmail",0,/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,"cidrv4",0,tP,"cidrv6",0,tN,"creditCard",0,tD,"cuid",0,tp,"cuid2",0,tm,"currencyCode",0,/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,"date",0,tU,"datetime",0,tL,"domain",0,/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,"duration",0,tv,"e164",0,tR,"email",0,tk,"emoji",0,tS,"extendedDuration",0,/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,"guid",0,t_,"hex",0,/^[0-9a-fA-F]*$/,"hostname",0,/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,"html5Email",0,/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,"httpProtocol",0,tZ,"iban",0,tC,"idnEmail",0,tA,"integer",0,tq,"ipv4",0,t$,"ipv6",0,tI,"ksuid",0,tb,"lowercase",0,tY,"mac",0,tO,"md5_base64",0,t2,"md5_base64url",0,t9,"md5_hex",0,/^[0-9a-fA-F]{32}$/,"nanoid",0,th,"nanoidOfLength",0,ty,"null",0,tH,"number",0,tW,"rfc5322Email",0,/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,"sha1_base64",0,t4,"sha1_base64url",0,t6,"sha1_hex",0,/^[0-9a-fA-F]{40}$/,"sha256_base64",0,t3,"sha256_base64url",0,t5,"sha256_hex",0,/^[0-9a-fA-F]{64}$/,"sha384_base64",0,t8,"sha384_base64url",0,t7,"sha384_hex",0,/^[0-9a-fA-F]{96}$/,"sha512_base64",0,ne,"sha512_base64url",0,nt,"sha512_hex",0,/^[0-9a-fA-F]{128}$/,"string",0,tJ,"time",0,tB,"ulid",0,tg,"undefined",0,tX,"unicodeEmail",0,tA,"uppercase",0,tQ,"uuid",0,tx,"uuid4",0,tj,"uuid6",0,tw,"uuid7",0,tz,"xid",0,tf],82358);let nn=e8("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nr=e=>{let t=e.value;return!C(t)&&void 0!==t.size},ni=e=>{let t=e.value;return!C(t)&&void 0!==t.length},na={number:"number",bigint:"bigint",object:"date"},no=e8("$ZodCheckLessThan",(e,t)=>{nn.init(e,t);let n=na[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:na[typeof r.value]??n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ns=e8("$ZodCheckGreaterThan",(e,t)=>{nn.init(e,t);let n=na[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:na[typeof r.value]??n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nl=e8("$ZodCheckMultipleOf",(e,t)=>{nn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):0===U(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),nu=e8("$ZodCheckNumberFormat",(e,t)=>{nn.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,a]=ey[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s))return void o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}s<i&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),nc=e8("$ZodCheckBigIntFormat",(e,t)=>{nn.init(e,t);let[n,r]=ev[t.format];e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),nd=e8("$ZodCheckMaxSize",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=nr),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:eR(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),np=e8("$ZodCheckMinSize",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=nr),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:eR(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nm=e8("$ZodCheckSizeEquals",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=nr),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:eR(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ng=e8("$ZodCheckMaxLength",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=ni),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>t.maximum?eC(r):i)<=t.maximum)return;let a=eM(r);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nf=e8("$ZodCheckMinLength",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=ni),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>=t.minimum&&i<2*t.minimum?eC(r):i)>=t.minimum)return;let a=eM(r);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nb=e8("$ZodCheckLengthEquals",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=ni),e._zod.check=n=>{let r=n.value,i=r.length,a="string"==typeof r&&i>=t.length&&i<=2*t.length?eC(r):i;if(a===t.length)return;let o=eM(r),s=a>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),nh=e8("$ZodCheckStringFormat",(e,t)=>{var n,r;nn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ny=e8("$ZodCheckRegex",(e,t)=>{nh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),nv=e8("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tY),nh.init(e,t)}),n_=e8("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tQ),nh.init(e,t)}),nx=e8("$ZodCheckIncludes",(e,t)=>{nn.init(e,t);let n=ep(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),nj=e8("$ZodCheckStartsWith",(e,t)=>{nn.init(e,t);let n=RegExp(`^${ep(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),nw=e8("$ZodCheckEndsWith",(e,t)=>{nn.init(e,t);let n=RegExp(`.*${ep(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function nz(e,t,n){e.issues.length&&t.issues.push(...eP(n,e.issues))}(e,t)=>{let n;nn.init(e,t),eY(e,Symbol.iterator,function*(){yield e}),e._zod.check=r=>{let i;if(null==r.value)return void r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:e});n??(n=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]));let a=r.value;for(let[e,t]of n){let n=t._zod.run({value:a[e],issues:[]},{});n instanceof Promise?(i??(i=[]),i.push(n.then(t=>nz(t,r,e)))):nz(n,r,e)}if(i)return Promise.all(i).then(()=>void 0)}},(e,t)=>{nn.init(e,t);let n=new Set(t.mime);e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}};let nk=e8("$ZodCheckOverwrite",(e,t)=>{nn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class nA{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93860,e=>{"use strict";let t,n,r,i,a,o,s,l,u,c;e.s(["BIGINT_FORMAT_RANGES",()=>ev,"CONSTANT_CATCH",()=>e4,"Class",()=>eG,"NUMBER_FORMAT_RANGES",()=>ey,"aborted",()=>eI,"allowsEval",()=>ea,"assert",()=>N,"assertEqual",()=>S,"assertIs",()=>O,"assertNever",()=>P,"assertNotEqual",()=>$,"assignProp",()=>V,"attachSchema",()=>eT,"base64ToUint8Array",()=>eL,"base64urlToUint8Array",()=>eJ,"cached",()=>D,"captureStackTrace",()=>er,"cleanEnum",()=>eB,"cleanRegex",()=>M,"clone",()=>em,"cloneDef",()=>X,"codePointLength",()=>eC,"constantCatch",()=>e6,"createTransparentProxy",()=>ef,"defineLazy",()=>B,"defineLazyInternal",()=>e2,"derived",()=>eQ,"esc",()=>et,"escapeRegex",()=>ep,"explicitlyAborted",()=>eO,"extend",()=>ew,"finalizeIssue",()=>eZ,"floatSafeRemainder",()=>U,"getElementAtPath",()=>Y,"getEnumValues",()=>E,"getLengthableOrigin",()=>eM,"getParsedType",()=>eu,"getSizableOrigin",()=>eR,"hexToUint8Array",()=>eq,"hide",()=>eY,"installLazyProp",()=>e9,"isObject",()=>ei,"isPlainObject",()=>eo,"issue",()=>eF,"joinValues",()=>T,"jsonStringifyReplacer",()=>Z,"members",()=>eH,"merge",()=>eA,"mergeDefs",()=>H,"normalizeParams",()=>eg,"nullish",()=>C,"numKeys",()=>el,"objectClone",()=>L,"omit",()=>ej,"optionalKeys",()=>eh,"own",()=>eX,"parsedType",()=>eU,"partial",()=>eS,"pick",()=>e_,"prefixIssues",()=>eP,"primitiveTypes",()=>ed,"promiseAllObject",()=>Q,"propertyKeyTypes",()=>ec,"randomString",()=>ee,"rawShape",()=>J,"required",()=>e$,"safeExtend",()=>ek,"shallowClone",()=>es,"sizeCaps",()=>eE,"slugify",()=>en,"stringifyPrimitive",()=>eb,"toZod",()=>I,"uint8ArrayToBase64",()=>eV,"uint8ArrayToBase64url",()=>eK,"uint8ArrayToHex",()=>eW,"unwrapMessage",()=>eN],22143);var d,p,m,g=e.i(43476),f=e.i(71645),b=e.i(22016),h=e.i(75775),y=e.i(41120),v=e.i(41220),_=e.i(82983),x=e.i(46670),j=e.i(68759),w=e.i(63376),z=e.i(15630);function k({nodeId:e,profileId:t,running:n,refresh:r}){let[i,a]=(0,f.useState)(""),[o,s]=(0,f.useState)(""),[l,u]=(0,f.useState)("");async function c(n){a(n),s(""),u("");try{let i=await _.f.ardent.action(e,t,n);if(!i.data?.service)throw Error("Node did not acknowledge Ardent service state");u(`${t} ${i.data.running?"running":"stopped"} on this node.`),await r()}catch(e){s(await (0,z.S)(e))}finally{a("")}}return(0,g.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 border-t border-border/40 pt-3",children:[(0,g.jsx)(j.K,{size:"sm",disabled:!!i||n,onClick:()=>void c("service-start"),children:"Start"}),(0,g.jsx)(j.K,{size:"sm",variant:"secondary",disabled:!!i||!n,onClick:()=>void c("service-restart"),children:"Restart"}),(0,g.jsx)(j.K,{size:"sm",variant:"danger",disabled:!!i||!n,onClick:()=>void c("service-stop"),children:"Stop"}),i&&(0,g.jsx)("span",{className:"text-[11px] text-text-muted",children:"Waiting for node receipt…"}),l&&(0,g.jsx)("span",{role:"status",className:"text-[11px] text-success",children:l}),o&&(0,g.jsx)("span",{role:"alert",className:"text-[11px] text-danger",children:o})]})}function A({item:e,refresh:t}){let[n,r]=(0,f.useState)(!1),[i,a]=(0,f.useState)(""),[o,s]=(0,f.useState)(""),l=e.stagedPackage;async function u(){r(!0),a(""),s("");try{let n=await _.f.ardent.action(e.nodeId,e.profiles[0]?.id??"default","package-install");if(!n.data?.installed||n.data.version!==l?.version)throw Error("Node did not verify the installed Ardent package");s(`Ardent ${n.data.version} installed. Create or start a profile when configured.`),await t()}catch(e){a(await (0,z.S)(e))}finally{r(!1)}}return(0,g.jsxs)("div",{className:"mt-4 border-t border-border/50 pt-3 text-xs",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsx)("span",{className:"text-text-muted",children:"Release package"}),(0,g.jsx)("span",{className:"font-mono text-text",children:l?.version??"not staged"}),l&&e.version!==l.version&&(0,g.jsx)(j.K,{size:"sm",disabled:n||!e.reachable,onClick:()=>void u(),children:n?"Installing…":e.installed?"Update package":"Install package"})]}),l&&e.version!==l.version&&(0,g.jsx)("p",{className:"mt-2 text-text-muted",children:"Stop this node’s profiles before updating. Review unfinished work first; start the profiles again after the package is verified."}),e.stagedPackageError&&(0,g.jsx)("p",{role:"alert",className:"mt-2 text-danger",children:e.stagedPackageError}),o&&(0,g.jsx)("p",{role:"status",className:"mt-2 text-success",children:o}),i&&(0,g.jsx)("p",{role:"alert",className:"mt-2 text-danger",children:i})]})}function S(e){return e}function $(e){return e}function I(){return e=>e}function O(e){}function P(e){throw Error("Unexpected value in exhaustive check")}function N(e){}function E(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function T(e,t="|"){return e.map(e=>eb(e)).join(t)}function Z(e,t){return"bigint"==typeof t?t.toString():t}class R{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function D(e){return new R(e)}function C(e){return null==e}function M(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function U(e,t){let n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}let F=Symbol("evaluating");function B(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==F)return void 0===r&&(r=F,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function L(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function V(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function J(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function K(e){return J(e._zod.def)??e._zod.def.shape}function q(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return V(this,t,e),e},enumerable:!0,configurable:!0})}function W(e,t,n){t in e?V(e,t,n):e[t]=n}function G(e,t,n,r){let i=K(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?q(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):W(e,a,r?r(n.value,a):n.value))}}function H(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function X(e){return H(e._zod.def)}function Y(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function Q(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function ee(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function et(e){return JSON.stringify(e)}function en(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}let er="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ei(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let ea=D(()=>{if(tt.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eo(e){if(!1===ei(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==ei(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function es(e){return eo(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function el(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}let eu=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},ec=new Set(["string","number","symbol"]),ed=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ep(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function em(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function eg(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function ef(e){let t;return new Proxy({},{get:(n,r,i)=>(t??(t=e()),Reflect.get(t,r,i)),set:(n,r,i,a)=>(t??(t=e()),Reflect.set(t,r,i,a)),has:(n,r)=>(t??(t=e()),Reflect.has(t,r)),deleteProperty:(n,r)=>(t??(t=e()),Reflect.deleteProperty(t,r)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,r)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)),defineProperty:(n,r,i)=>(t??(t=e()),Reflect.defineProperty(t,r,i))})}function eb(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function eh(e){return Object.keys(e).filter(t=>void 0!==e[t]._zod.optin&&"optional"===e[t]._zod.optout)}let ey={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ev={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function e_(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return G(i,e,ex(e,t)),em(e,H(n,{shape:i,checks:[]}))}function ex(e,t){let n=K(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ej(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(ex(e,t)),a={};return G(a,e,Reflect.ownKeys(K(e)).filter(e=>!i.has(e))),em(e,H(n,{shape:a,checks:[]}))}function ew(e,t){if(!eo(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=K(e);for(let e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return em(e,H(e._zod.def,{shape:ez(e,t)}))}function ez(e,t){let n={};G(n,e,Reflect.ownKeys(K(e)));for(let e of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,e);r.enumerable&&(r.get?q(n,e,()=>t[e]):W(n,e,r.value))}return n}function ek(e,t){if(!eo(t))throw Error("Invalid input to safeExtend: expected a plain object");return em(e,H(e._zod.def,{shape:ez(e,t)}))}function eA(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};G(n,e,Reflect.ownKeys(K(e))),G(n,t,Reflect.ownKeys(K(t)));let r=H(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return em(e,r)}function eS(e,t,n,r="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(ex(t,n)):void 0,o={};return G(o,t,Reflect.ownKeys(K(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:"optional",innerType:t}))),em(t,H(t._zod.def,{shape:o,checks:[]}))}function e$(e,t,n){let r=n?new Set(ex(t,n)):void 0,i={};return G(i,t,Reflect.ownKeys(K(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),em(t,H(t._zod.def,{shape:i}))}function eI(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function eO(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function eP(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function eN(e){return"string"==typeof e?e:e?.message}function eE(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function eT(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function eZ(e,t,n){let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?e.schema??(e.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:eN(e.inst?._zod.def?.error?.(e))??eN(i?.(e))??eN(t?.error?.(e))??eN(n.customError?.(e))??eN(n.localeError?.(e))??"Invalid input",o={};for(let t of Object.keys(e))"inst"!==t&&"schema"!==t&&"continue"!==t&&"input"!==t&&"__proto__"!==t&&(o[t]=e[t]);return o.path??(o.path=[]),o.message=a,t?.reportInput&&(o.input=e.input),o}function eR(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}let eD=/[\uD800-\uDBFF]/;function eC(e){let t=e.length;if(!eD.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(64512&e.charCodeAt(r))==55296&&(64512&e.charCodeAt(r+1))==56320&&(n--,r++);return n}function eM(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eU(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}function eF(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}function eB(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function eL(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function eV(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function eJ(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return eL(t+n)}function eK(e){return eV(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function eq(e){let t=e.replace(/^0x/,"");if(t.length%2!=0)throw Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function eW(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")}class eG{constructor(...e){}}function eH(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):function(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:eX(this,t,n.bind(this))},set(e){eX(this,t,e)}})}(e,n,r.value)}}function eX(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function eY(e,t,n){return eX(e,t,n,!1)}function eQ(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return eX(this,n,r(this))},set(e){eX(this,n,e)}})}return t}let e0=!1,e1={configurable:!0,get(){e0=!0}};function e2(e,n,r){let i=Object.getPrototypeOf(e._zod);if(n in i&&t!==e._zod){t=void 0;return}t=e._zod,Object.defineProperty(i,n,{configurable:!0,get(){Object.defineProperty(this,n,e1);let e=e0;e0=!1;try{let t=r(this);return e0?delete this[n]:Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t}),e0=e0||e,t}catch(t){throw delete this[n],e0=e0||e,t}},set(e){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:e})}})}function e9(e,t,n,r){let i,a=t in(i=Object.getPrototypeOf(e))?void 0:i;a&&Object.defineProperty(a,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}let e4="~constantCatch";function e6(e){let t=()=>e;return t[e4]=!0,t}let e3={value:void 0,enumerable:!1},e5="captureStackTrace"in Error?Error:null;function e8(e,t,n,r){function i(e){this.def=e,this.constr=u,this.traits=new Set}i.prototype={};let a=n&&new WeakSet;function o(r,o){if(r._zod){if(r._zod.traits.has(e))return}else{e3.value=new i(o);try{Object.defineProperty(r,"_zod",e3)}finally{e3.value=void 0}}if(r._zod.traits.add(e),t(r,o),a){let e=Object.getPrototypeOf(r),t=r._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let o=i??e;a.has(o)||(a.add(o),eH(o,n))}let s=u.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in r||(r[e]=s[e].bind(r)))}let s=r?.Parent??Object;class l extends s{}function u(e){let t=r?.Parent?function(e){let t=e5;if(t){let n=t.stackTraceLimit;if("number"==typeof n){try{t.stackTraceLimit=0}catch{return e5=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}(l):this;o(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(u,"init",{value:o}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class e7 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class te extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(d=globalThis).__zod_globalConfig??(d.__zod_globalConfig={});let tt=globalThis.__zod_globalConfig;function tn(e){return e&&Object.assign(tt,e),tt}class tr extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let ti="~memo",ta=[];function to(e){return null!==e&&"object"==typeof e}function ts(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let tl=new WeakMap,tu=[],tc={alloc(e,t,r){let i=n;if(!i)return r;n=void 0;let a={value:r,issues:null};return i.set(t.value,a),tu.push(a),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{var r,i;let a;if("backward"!==n.direction&&(r=n,i=e.value,void 0!==(a=r[ti]?.backEdges)&&to(i)&&a.has(i)))throw new tr;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let r,i,a,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,s=(l,u)=>{let c;if(void 0===r){let n=function e(t,n,r){var i,a;let o=tl.get(t);if(void 0!==o)return 2*!!o;if(n.has(t))return 2;n.add(t);let s=0,l=t=>{if(2!==s&&t?._zod){let i=e(t,n,r);i>s&&(s=i)}},u=e=>{e>s&&(s=e)},c=t._zod.def;switch(c.type){case"object":{let t=J(c);u(t?((t,i)=>{let a=0;for(let o of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,o);if(i&&!s.enumerable)continue;let l=s.get?1:s.value?._zod?e(s.value,n,r):0;l>a&&(a=l)}return a})(t,!0):1),l(c.catchall);break}case"array":l(c.element);break;case"tuple":for(let e of c.items)l(e);l(c.rest);break;case"record":case"map":l(c.keyType),l(c.valueType);break;case"set":l(c.valueType);break;case"union":for(let e of c.options)l(e);break;case"intersection":l(c.left),l(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":l(c.innerType);break;case"pipe":l(c.in),l(c.out);break;case"function":l(c.input),l(c.output);break;case"lazy":{let i=c._cachedInner??(r?t._zod.innerType:void 0);u(i?e(i,n,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&"object"==typeof n){if(n._zod)l(n);else if(Array.isArray(n))for(let e of n)l(e)}}}return n.delete(t),i=t,1!==(a=s)&&tl.set(i,2===a),a}(e,new Set,!1);if(0===n)return e._zod.parse=t,e._zod.run===s&&(e._zod.run=t),t(l,u);2===n||o?r=!0:o=!0}let d=l.value;if(!to(d))return t(l,u);let p=u[ti];if(p||(p={buckets:new WeakMap,backEdges:void 0},u[ti]=p),i===u)c=a;else{var m;let t;(t=(m=p).buckets.get(e))||(t=new WeakMap,m.buckets.set(e,t)),c=t,i=u,a=c}let g=c.get(d);if(g)return l.value=g.value,g.issues?g.issues.length&&l.issues.push(...ts(g.issues)):(l.memo=!0,p.backEdges??(p.backEdges=new WeakSet),p.backEdges.add(g.value)),l;n=c;let f=tu.length,b=t(l,u);n=void 0;let h=tu.length>f?tu.pop():void 0;return b instanceof Promise?b.then(e=>(h&&(h.issues=e.issues.length?ts(e.issues):ta),e)):(h&&(h.issues=b.issues.length?ts(b.issues):ta),b)};e._zod.parse=s,e._zod.run===t&&(e._zod.run=s)})}};(p=globalThis).__zod_globalRegistry??(p.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let td=globalThis.__zod_globalRegistry,tp=/^[cC][0-9a-z]{6,}$/,tm=/^[0-9a-z]+$/,tg=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tf=/^[0-9a-vA-V]{20}$/,tb=/^[A-Za-z0-9]{27}$/,th=/^[a-zA-Z0-9_-]{21}$/;function ty(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}let tv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,t_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tx=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,tj=tx(4),tw=tx(6),tz=tx(7),tk=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tA=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u;function tS(){return RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")}let t$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tI=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tO=e=>{let t=ep(e??":");return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},tP=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tN=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tT=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,tZ=/^https?$/,tR=/^\+[1-9]\d{6,14}$/,tD=/^\d(?:[ -]?\d){11,18}$/,tC=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,tM="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tU=RegExp(`^${tM}$`);function tF(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tB(e){return RegExp(`^${tF(e)}$`)}function tL(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${tF({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${tF({precision:e.precision})}`:n;return RegExp(`^${tM}T(?:${r})$`)}let tV=/^[\s\S]{0,}$/,tJ=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)},tK=/^-?\d+n?$/,tq=/^-?\d+$/,tW=/^-?\d+(?:\.\d+)?$/,tG=/^(?:true|false)$/i,tH=/^null$/i,tX=/^undefined$/i,tY=/^[^A-Z]*$/,tQ=/^[^a-z]*$/;function t0(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function t1(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}let t2=t0(22,"=="),t9=t1(22),t4=t0(27,"="),t6=t1(27),t3=t0(43,"="),t5=t1(43),t8=t0(64,""),t7=t1(64),ne=t0(86,"=="),nt=t1(86);e.s(["anyString",0,tV,"base64",0,tE,"base64url",0,tT,"bigint",0,tK,"boolean",0,tG,"browserEmail",0,/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,"cidrv4",0,tP,"cidrv6",0,tN,"creditCard",0,tD,"cuid",0,tp,"cuid2",0,tm,"currencyCode",0,/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,"date",0,tU,"datetime",0,tL,"domain",0,/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,"duration",0,tv,"e164",0,tR,"email",0,tk,"emoji",0,tS,"extendedDuration",0,/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,"guid",0,t_,"hex",0,/^[0-9a-fA-F]*$/,"hostname",0,/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,"html5Email",0,/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,"httpProtocol",0,tZ,"iban",0,tC,"idnEmail",0,tA,"integer",0,tq,"ipv4",0,t$,"ipv6",0,tI,"ksuid",0,tb,"lowercase",0,tY,"mac",0,tO,"md5_base64",0,t2,"md5_base64url",0,t9,"md5_hex",0,/^[0-9a-fA-F]{32}$/,"nanoid",0,th,"nanoidOfLength",0,ty,"null",0,tH,"number",0,tW,"rfc5322Email",0,/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,"sha1_base64",0,t4,"sha1_base64url",0,t6,"sha1_hex",0,/^[0-9a-fA-F]{40}$/,"sha256_base64",0,t3,"sha256_base64url",0,t5,"sha256_hex",0,/^[0-9a-fA-F]{64}$/,"sha384_base64",0,t8,"sha384_base64url",0,t7,"sha384_hex",0,/^[0-9a-fA-F]{96}$/,"sha512_base64",0,ne,"sha512_base64url",0,nt,"sha512_hex",0,/^[0-9a-fA-F]{128}$/,"string",0,tJ,"time",0,tB,"ulid",0,tg,"undefined",0,tX,"unicodeEmail",0,tA,"uppercase",0,tQ,"uuid",0,tx,"uuid4",0,tj,"uuid6",0,tw,"uuid7",0,tz,"xid",0,tf],82358);let nn=e8("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nr=e=>{let t=e.value;return!C(t)&&void 0!==t.size},ni=e=>{let t=e.value;return!C(t)&&void 0!==t.length},na={number:"number",bigint:"bigint",object:"date"},no=e8("$ZodCheckLessThan",(e,t)=>{nn.init(e,t);let n=na[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:na[typeof r.value]??n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ns=e8("$ZodCheckGreaterThan",(e,t)=>{nn.init(e,t);let n=na[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:na[typeof r.value]??n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nl=e8("$ZodCheckMultipleOf",(e,t)=>{nn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):0===U(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),nu=e8("$ZodCheckNumberFormat",(e,t)=>{nn.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,a]=ey[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s))return void o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}s<i&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),nc=e8("$ZodCheckBigIntFormat",(e,t)=>{nn.init(e,t);let[n,r]=ev[t.format];e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),nd=e8("$ZodCheckMaxSize",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=nr),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:eR(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),np=e8("$ZodCheckMinSize",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=nr),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:eR(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nm=e8("$ZodCheckSizeEquals",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=nr),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:eR(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ng=e8("$ZodCheckMaxLength",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=ni),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>t.maximum?eC(r):i)<=t.maximum)return;let a=eM(r);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nf=e8("$ZodCheckMinLength",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=ni),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>=t.minimum&&i<2*t.minimum?eC(r):i)>=t.minimum)return;let a=eM(r);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nb=e8("$ZodCheckLengthEquals",(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=ni),e._zod.check=n=>{let r=n.value,i=r.length,a="string"==typeof r&&i>=t.length&&i<=2*t.length?eC(r):i;if(a===t.length)return;let o=eM(r),s=a>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),nh=e8("$ZodCheckStringFormat",(e,t)=>{var n,r;nn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ny=e8("$ZodCheckRegex",(e,t)=>{nh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),nv=e8("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tY),nh.init(e,t)}),n_=e8("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tQ),nh.init(e,t)}),nx=e8("$ZodCheckIncludes",(e,t)=>{nn.init(e,t);let n=ep(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),nj=e8("$ZodCheckStartsWith",(e,t)=>{nn.init(e,t);let n=RegExp(`^${ep(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),nw=e8("$ZodCheckEndsWith",(e,t)=>{nn.init(e,t);let n=RegExp(`.*${ep(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function nz(e,t,n){e.issues.length&&t.issues.push(...eP(n,e.issues))}(e,t)=>{let n;nn.init(e,t),eY(e,Symbol.iterator,function*(){yield e}),e._zod.check=r=>{let i;if(null==r.value)return void r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:e});n??(n=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]));let a=r.value;for(let[e,t]of n){let n=t._zod.run({value:a[e],issues:[]},{});n instanceof Promise?(i??(i=[]),i.push(n.then(t=>nz(t,r,e)))):nz(n,r,e)}if(i)return Promise.all(i).then(()=>void 0)}},(e,t)=>{nn.init(e,t);let n=new Set(t.mime);e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}};let nk=e8("$ZodCheckOverwrite",(e,t)=>{nn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class nA{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
2
2
  ${t.join("\n")}
3
3
  };`)(...Object.values(this.closed))}}let nS={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Z,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},n$={value:void 0,enumerable:!1},nI=new WeakSet([Object.prototype,Error.prototype]),nO=(e,t)=>{e.name="$ZodError",n$.value=t,Object.defineProperty(e,"issues",n$),n$.value=void 0,Object.defineProperty(e,"message",nS);let n=Object.getPrototypeOf(e);nI.has(n)||(nI.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},nP=e8("$ZodError",nO),nN=e8("$ZodError",nO,void 0,{Parent:Error});function nE(e,t){return{callee:t?.callee??e,Err:t?.Err}}let nT=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new e7;if(s.issues.length){let n=new(a?.Err??e)(s.issues.map(e=>eZ(e,o,tn())));throw er(n,a?.callee??t),n}return s.value};return t},nZ=nT(nN),nR=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new(a?.Err??e)(s.issues.map(e=>eZ(e,o,tn())));throw er(n,a?.callee??t),n}return s.value};return t},nD=nR(nN),nC=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new e7;return a.issues.length?nM(e,a.issues,i):{success:!0,data:a.value}};function nM(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>eZ(e,n,tn()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}let nU=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?nM(e,a.issues,i):{success:!0,data:a.value}},nF=Symbol.for("zod.compile.invalid"),nB=Symbol.for("zod.compile.fallback"),nL=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),0===i.issues.length},nV={major:4,minor:6,patch:7},nJ=e8("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nV;let r=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{let i;if(t.memo)return t;let a=eI(t);for(let o of n){if(o._zod.def.when){if(eO(t)||!o._zod.def.when(t))continue}else if(a)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new e7;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(eT(t.issues,n,e),a||(a=eI(t,n)))});else{if(t.issues.length===n)continue;eT(t.issues,n,e),a||(a=eI(t,n))}}return i?i.then(()=>t):t},n=(n,r,a)=>{if(eI(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(!1===a.async)throw new e7;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if("backward"===a.direction){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(!1===a.async)throw new e7;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return eY(this,"~standard",nW(this))},set"~standard"(e){eX(this,"~standard",e)}}),nK=(e,t)=>e.issues.length?{issues:e.issues.map(e=>eZ(e,t,tn()))}:{value:e.value};async function nq(e,t){let n={async:!0};return nK(await e._zod.run({value:t,issues:[]},n),n)}function nW(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return nK(r,n)}catch(e){}return nq(e,t)},vendor:"zod",version:1}}let nG=e8("$ZodString",(e,t)=>{nJ.init(e,t),e._zod.pattern=t.pattern??tV,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(e){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),nH=e8("$ZodStringFormat",(e,t)=>{nh.init(e,t),nG.init(e,t)}),nX=e8("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=t_),nH.init(e,t)}),nY=e8("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tx(e))}else t.pattern??(t.pattern=tx());nH.init(e,t)}),nQ=e8("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tk),nH.init(e,t)});function n0(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}let n1=/[\t\n\r]/g;function n2(e){return e.replace(n1,"")}let n9=e8("$ZodURL",(e,t)=>{nH.init(e,t),e._zod.check=n=>{try{var r,i;let a=n.value.trim(),o="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===tZ.source&&!/^https?:\/\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(a,t):n0(a)||2;if(1===o)return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});if(2===o)return void n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});if(!0===o){n.value=n2(a);return}t.hostname&&((r=t.hostname).lastIndex=0,!r.test(o.hostname))&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&((i=t.protocol).lastIndex=0,!i.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol))&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?o.href:n2(a);return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),n4=e8("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=tS()),nH.init(e,t)}),n6=e8("$ZodNanoID",(e,t)=>{if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?th:ty(t.length)),nH.init(e,t)}),n3=e8("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tp),nH.init(e,t)}),n5=e8("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tm),nH.init(e,t)}),n8=e8("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tg),nH.init(e,t)}),n7=e8("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tf),nH.init(e,t)}),re=e8("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tb),nH.init(e,t)}),rt=e8("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=tL(t)),nH.init(e,t)}),rn=e8("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tU),nH.init(e,t)}),rr=e8("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tB(t)),nH.init(e,t)}),ri=e8("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tv),nH.init(e,t)}),ra=e8("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=t$),nH.init(e,t)}),ro=/^[0-9a-fA-F:.]+$/;function rs(e){return!!ro.test(e)&&n0(`http://[${e}]`)}let rl=e8("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tI),nH.init(e,t),e._zod.check=n=>{rs(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),ru=((e,t)=>{t.pattern??(t.pattern=tO(t.delimiter)),nH.init(e,t)},e8("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tP),nH.init(e,t)})),rc=e8("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tN),nH.init(e,t),e._zod.check=n=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`===r&&!(i<0)&&!(i>128)&&rs(n)}(n.value)&&n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function rd(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rp=/^[0-9a-zA-Z+/]*={0,2}$/,rm=e8("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rp),nH.init(e,t),e._zod.check=n=>{rd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),rg=/^[A-Za-z0-9_-]*$/,rf=e8("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rg),nH.init(e,t),e._zod.check=n=>{!function(e){if(!rg.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rd(t.padEnd(4*Math.ceil(t.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),rb=e8("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tR),nH.init(e,t)}),rh=/[- ]/g,ry=((e,t)=>{t.pattern??(t.pattern=tD),nH.init(e,t),e._zod.check=n=>{var r;r=n.value,tD.test(r)&&function(e){let t=e.length,n=1,r=0;for(;t;){let i=e.charCodeAt(--t)-48;n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}(r.replace(rh,""))||n.issues.push({code:"invalid_format",format:"credit_card",input:n.value,inst:e,continue:!t.abort})}},e8("$ZodJWT",(e,t)=>{nH.init(e,t),e._zod.check=n=>{!function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(n.value,t.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),rv=((e,t)=>{nH.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}},e8("$ZodNumber",(e,t)=>{nJ.init(e,t),e._zod.pattern=tW,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}let i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...a?{received:a}:{}}),n}})),r_=e8("$ZodNumberFormat",(e,t)=>{nu.init(e,t),rv.init(e,t)}),rx=e8("$ZodBoolean",(e,t)=>{nJ.init(e,t),e._zod.pattern=tG,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(e){}let i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),rj=e8("$ZodBigInt",(e,t)=>{nJ.init(e,t),e._zod.pattern=tK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),rw=((e,t)=>{nc.init(e,t),rj.init(e,t)},e8("$ZodNull",(e,t)=>{nJ.init(e,t),e._zod.pattern=tH,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}})),rz=((e,t)=>{nJ.init(e,t),e._zod.parse=e=>e},e8("$ZodUnknown",(e,t)=>{nJ.init(e,t),e._zod.parse=e=>e})),rk=e8("$ZodNever",(e,t)=>{nJ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),rA=((e,t)=>{nJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return void 0===r||t.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),t}},e8("$ZodDate",(e,t)=>{nJ.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:e}),n}}));function rS(e,t){let n=eE(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!=="backward"){for(let[t,r]of eE(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,eT(n.issues,t,e),n}}return i(n,a)}}let r$=e=>Array.isArray(e)?e.length:-1,rI=e=>e instanceof Map?e.size:-1,rO=e=>e instanceof Set?e.size:-1;function rP(e,t,n){e.issues.length&&t.issues.push(...eP(n,e.issues)),t.value[n]=e.value}let rN=e8("$ZodArray",(e,t)=>{nJ.init(e,t);let n=tt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],l=t.element._zod.run({value:n,issues:[]},i);if(l instanceof Promise)o.push(l.then(t=>rP(t,r,e)));else if(rP(l,r,e),s&&0!==l.issues.length&&eI(l))break}return o.length?Promise.all(o).then(()=>r):r},rS(e,r$)});function rE(e,t,n,r,i,a){let o=n in r,s="optional"===a;if(o||!s||"optional"!==i){if(e.issues.length){if(void 0!==i&&s&&!o)return;t.issues.push(...eP(n,e.issues))}if(!o&&void 0===i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}void 0===e.value?(o||"defaulted"===i&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}let rT=[];function rZ(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:rT,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=eh(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function rR(e,t,n,r,i,a,o){let s=[],l=i.keySet,u=i.catchall._zod,c=u.def.type,d=u.optin,p=u.optout,m=0;for(let i in t){if(o&&n.issues.length!==m){if(eI(n,m))break;m=n.issues.length}if(l.has(i))continue;if("__proto__"===i){"never"===c&&s.push(i);continue}if("never"===c){s.push(i);continue}let a=u.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>rE(e,n,i,t,d,p))):rE(a,n,i,t,d,p)}return(s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a,continue:!0}),e.length)?Promise.all(e).then(()=>n):n}let rD=e8("$ZodObject",(e,t)=>{let n;nJ.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let e=()=>{let n={...i};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=i,Object.defineProperty(t,"shape",{get:e})}let a=D(()=>rZ(t));e2(e,"propValues",e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){for(let t of(Object.prototype.hasOwnProperty.call(n,e)||V(n,e,new Set),r.values))n[e].add(t);void 0!==r.optin&&n[e].add(void 0)}}return n});let o=t.catchall,s=tt.memoizer;s?.attach(e),e._zod.parse=(t,r)=>{n??(n=a.value);let i=t.value;if(!ei(i))return t.issues.push({expected:"object",code:"invalid_type",input:i,inst:e}),t;t.value=s?s.alloc(e,t,{},r):{};let l=[],u=n.shape,c=r?.abortEarly,d=t.issues.length;for(let e of n.allKeys){if(c&&t.issues.length!==d){if(eI(t,d))break;d=t.issues.length}if("__proto__"===e)continue;let n=u[e],a=n._zod.optin,o=n._zod.optout,s=n._zod.run({value:i[e],issues:[]},r);s instanceof Promise?l.push(s.then(n=>rE(n,t,e,i,a,o))):rE(s,t,e,i,a,o)}return o?rR(l,i,t,r,a.value,e,!0===c):l.length?Promise.all(l).then(()=>t):t}}),rC=e8("$ZodObjectJIT",(e,t)=>{let n,r;rD.init(e,t);let i=e._zod.parse,a=D(()=>rZ(t)),o=tt.memoizer,s=!tt.jitless,l=s&&ea.value,u=t.catchall;e._zod.parse=(c,d)=>{r??(r=a.value);let p=c.value;return ei(p)?s&&l&&d?.async===!1&&!0!==d.jitless?(n||(n=(t=>{let n=a.value,r=n.symbolKeys,i=new nA(["payload","ctx"],{shape:t,inst:e,memo:o,syms:r}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,l=(e,t)=>`
4
4
  let ${e}_ab = false;
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53721,e=>{"use strict";var t=e.i(43476),r=e.i(64155),a=e.i(46670),s=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,t.jsx)("span",{title:(0,s.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,t.jsxs)(a.t,{variant:"warning",children:[(0,t.jsx)(r.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,t.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,t.jsx)(r.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,t.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("p",{className:"font-medium text-text",children:[(0,t.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,t.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},57108,e=>{"use strict";var t=e.i(43476),r=e.i(46670);e.s(["f",0,function({configuration:e}){if(e?.memoryProvider!=="hivemem")return null;let a=e.hiveMemToken,s=a?.status??"unknown";return(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsxs)(r.t,{variant:"valid"===s?"success":"expiring"===s||"unreachable"===s||"unknown"===s?"warning":"danger",children:["Token ",s]}),a?.expiresAt&&(0,t.jsxs)("time",{dateTime:a.expiresAt,title:"HiveMem token expiration",children:["expires ",new Date(a.expiresAt).toLocaleString()]}),a?.checkedAt&&(0,t.jsxs)("time",{dateTime:a.checkedAt,className:"text-text-muted/70",title:"Last HiveMem authentication check",children:["checked ",new Date(a.checkedAt).toLocaleString()]})]})}])},46670,e=>{"use strict";var t=e.i(43476),r=e.i(78571);let a={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)]"},s={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,t.jsxs)("span",{className:(0,r.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",s[n])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex h-1.5 w-1.5 rounded-full",s[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 t=e.i(43476),r=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let s=(0,r.f)(a);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 u({value:e,max:r=100,tone:a,thresholds:s=o.q,label:n,size:l="xs",showValue:x=!1,valueLabel:h,glow:m,className:f,testId:p}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(r||1)*100)):0,b=a??(g?(0,o.Z)(v,s):"muted"),j=m||!a&&g&&v>=s.warn,y=h??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",f),"data-testid":p,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":g?e:void 0,"aria-valuetext":y,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,t.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[b],j&&c[b])})}),x&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:y})]})}e.s(["f",0,u],51196);var x=e.i(71645);function h({values:e,tone:r="primary",width:a=160,height:s=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:u=!0,emptyLabel:m="not enough data",className:f,testId:p,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",f),"data-testid":p,children:m});let j=o.v[r],y=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=s-4,w=a/(e.length-1),k=e=>2+N-Math.max(0,e)/y*N,_=e.map((e,t)=>[t*w,k(e)]),M=_.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),S=_[_.length-1];return(0,t.jsxs)("svg",{width:v?"100%":a,height:s,viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",f),"data-testid":p,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${s} ${M} ${a},${s}`,fill:`url(#${b})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:M}),u&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2,fill:j})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:r,children:a,className:s,action:n,tone:i,corners:o=!1,...c}){return(0,t.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:r,action:n,className:s,children:a})},"n",0,function({label:e,value:r,icon:a,trend:c,spark:d,meter:x,delta:m,tone:f="primary",className:p,testId:g}){let v=!m||m.value>=0===(m.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:f,className:(0,i.f)("overflow-hidden",p),testId:g,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,t.jsx)("span",{className:"text-primary/60",children:a})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===f?"text-primary neon-text":o.T[f]),children:r}),m&&0!==m.value&&(0,t.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[m.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(s,{className:"h-3 w-3"}),Math.abs(m.value).toFixed(+!Number.isInteger(m.value)),m.unit]})]}),c&&(0,t.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,t.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(h,{values:d,tone:f,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(78571),s=e.i(35084);e.s(["f",0,function({value:e,max:n=100,label:i,sublabel:l,tone:o,thresholds:c=s.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:h=!0,hideLabel:m=!1,className:f,testId:p}){let g=(0,r.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(n||1)*100)):0,j=o??(v?d?(0,s.Z)(100-b,c):(0,s.Z)(b,c):"muted"),y=Math.max(4,Math.round(u/16)),N=50-y/2-4,w=2*Math.PI*N,k=.75*w,_=k*b/100,M=u>=140,S=x??(v?`${Math.round(b)}%`:"—"),C=h?Array.from({length:11},(e,r)=>{let a=(135+270*r/10)*Math.PI/180,s=50-(r%5==0?4:2.5);return(0,t.jsx)("line",{x1:50+48.5*Math.cos(a),y1:50+48.5*Math.sin(a),x2:50+s*Math.cos(a),y2:50+s*Math.sin(a),stroke:"var(--color-border-strong)",strokeWidth:.8},r)}):null;return(0,t.jsxs)("div",{role:"img","aria-label":`${i}: ${S}`,"data-testid":p,className:(0,a.f)("relative inline-flex flex-col items-center",f),style:{width:u},children:[(0,t.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[M&&(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),C,(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:"var(--color-border)",strokeWidth:y,strokeLinecap:"round",strokeDasharray:`${k} ${w}`,transform:"rotate(135 50 50)"}),(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:s.v[j],strokeWidth:y,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:M?`url(#g${g})`:void 0,style:{"--dash":`${_} ${w}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,t.jsx)("span",{className:(0,a.f)("num font-bold leading-none",s.T[j],M&&s.z[j]),style:{fontSize:Math.max(12,.2*u)},children:S}),l&&(0,t.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:l})]}),!m&&(0,t.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:i})]})}],54149);var n=e.i(70703),i=e.i(65369);let l=(0,n.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,t.jsx)(i.l,{className:"h-[180px] w-full"})});e.s(["f",0,l],21176)},3062,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(35084);let s={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:u,description:x,icon:h,action:m,as:f="div",padding:p="md",testId:g,className:v,children:b,...j}){return(0,t.jsxs)(f,{...j,"data-testid":g??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[p],o&&"panel-corners",o&&s[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||m||h)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,t.jsx)("span",{className:(0,r.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,t.jsxs)("div",{className:"min-w-0",children:[u&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),m]}),b]})}])},65369,e=>{"use strict";var t=e.i(43476),r=e.i(78571);function a({className:e}){return(0,t.jsx)("div",{"aria-hidden":"true",className:(0,r.f)("skeleton h-3 w-full",e)})}e.s(["l",0,a,"g",0,function({count:e=4,className:s}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",s),children:Array.from({length:e},(e,r)=>(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,t.jsx)(a,{className:"h-2 w-1/2"}),(0,t.jsx)(a,{className:"mt-4 h-7 w-2/3"}),(0,t.jsx)(a,{className:"mt-3 h-1 w-full opacity-60"})]},r))})},"F",0,function({rows:e=5,cols:s=4,className:n}){return(0,t.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,t.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:s},(e,r)=>(0,t.jsx)(a,{className:"h-2 flex-1 opacity-60"},r))}),Array.from({length:e},(e,n)=>(0,t.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:s},(e,s)=>(0,t.jsx)(a,{className:(0,r.f)("h-3 flex-1",(n+s)%3==0&&"max-w-[60%]")},s))},n))]})},"Q",0,function({lines:e=3,className:s}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("space-y-2",s),children:Array.from({length:e},(e,r)=>(0,t.jsx)(a,{className:n[r%n.length]},r))})}])},75723,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(46670);let s={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 u=(0,a.k)(e),x=l??i.has(e.toUpperCase()),h="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,r.f)("relative inline-flex shrink-0",h,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",n[u])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex rounded-full",h,s[u])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`},"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"}):"—"}])},79432,e=>{"use strict";var t=e.i(56420);let r={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],79432)},9347,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],9347)},75775,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],75775)},82022,e=>{"use strict";var t=e.i(56420);let r={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],82022)},57665,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],57665)},86207,14098,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],86207);var s=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:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)([]),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(!0),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)(""),[y,N]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(j(""),m(t?.role?.id??""),p(!0),N(!0),(async()=>{try{let e=await o.f.roles.list();x(e.data??[])}catch{j("Failed to load roles")}finally{N(!1)}})())},[e,t?.role?.id]);let w=async()=>{if(t){v(!0),j("");try{let e=t.role?.id;e&&e!==h&&await o.f.roles.unassign(e,{nodeIds:[t.id]}),h&&await o.f.roles.assign(h,{nodeIds:[t.id],defer:!f});let s=h?u.find(e=>e.id===h)??null:null;a(s),r()}catch(e){j(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(t?.role){v(!0),j("");try{await o.f.roles.unassign(t.role.id,{nodeIds:[t.id]}),a(null),r()}catch(e){j(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:_,title:t?.role?"Change Role":"Assign Role",description:t?`Node: ${t.name}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[y?(0,s.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,s.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===u.length?(0,s.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.G,{label:"Role",children:(0,s.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"",children:"— No role —"}),u.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),h&&(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:f,onChange:e=>p(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,s.jsx)("div",{children:t?.role&&(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:g,children:"Unassign Role"})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void w(),disabled:g||!h||0===u.length,icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":t?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)("");(0,n.useEffect)(()=>{if(t){x(t.name);try{let e=JSON.parse(t.tags);m(e.join(", "))}catch{m("")}p(t.status),j("")}},[t]);let y=async()=>{if(t&&u.trim()){v(!0),j("");try{let e=h.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(t.id,{name:u.trim(),tags:e,status:f.toUpperCase()}),a(),r()}catch(e){j(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},N=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:N,title:"Edit Node",description:t?`${t.hostname}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"Status",children:(0,s.jsxs)("select",{value:f,onChange:e=>p(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,s.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,s.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,s.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,s.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:N,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:g||!u.trim(),icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:t,onRegistered:r}){let[a,u]=(0,n.useState)(""),[x,h]=(0,n.useState)(""),[m,f]=(0,n.useState)("4100"),[p,g]=(0,n.useState)("linux"),[v,b]=(0,n.useState)("x86_64"),[j,y]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),M=async()=>{if(a.trim()&&x.trim()){w(!0),_("");try{let e=j.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:a.trim(),hostname:x.trim(),ipAddress:x.trim(),port:Number(m)||4100,os:p,arch:v,tags:e,agentVersion:"2.4.1"}),r(),S()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{w(!1)}}},S=()=>{u(""),h(""),f("4100"),g("linux"),b("x86_64"),y(""),_(""),w(!1),t()};return(0,s.jsx)(l.n,{open:e,onClose:S,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Node Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:a,onChange:e=>u(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,s.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsx)(l.G,{label:"Port",children:(0,s.jsx)("input",{type:"number",value:m,onChange:e=>f(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"OS",children:(0,s.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"linux",children:"Linux"}),(0,s.jsx)("option",{value:"darwin",children:"macOS"}),(0,s.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,s.jsx)(l.G,{label:"Architecture",children:(0,s.jsxs)("select",{value:v,onChange:e=>b(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,s.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,s.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:S,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void M(),disabled:N||!a.trim()||!x.trim(),icon:N?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:N?"Registering…":"Register Node"})]})]})})}],14098)},25398,e=>{"use strict";var t=e.i(56420);let r={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],25398)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class i{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new i}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),r=globalThis;return r[t]??=o()}function d(e){return l?l.bind(e):i.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=e.r(42344)},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let a=e.r(55682)._(e.r(69093));function s(e,t){let r={};"function"==typeof e&&(r.loader=e);let s={...r,...t};return(0,a.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},9885,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67585,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return i}});let a=e.r(71645),s=e.r(74080);e.r(32061);let n=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function i({children:e}){return(0,a.use)((0,s.browser)(n)),e}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let a=e.r(43476),s=e.r(71645),n=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,s.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?s.Suspense:s.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(n.BailoutToCSRForNextDynamic,{children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(43476),s=e.r(74080),n=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={createReactBrowserBailoutReason:function(){return i},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Symbol.for("next.browser-bailout-reason");function i(e){return{$$typeof:n,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===n?t.reason:void 0}function o(e){return void 0!==l(e)}}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53721,e=>{"use strict";var t=e.i(43476),r=e.i(64155),a=e.i(46670),s=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,t.jsx)("span",{title:(0,s.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,t.jsxs)(a.t,{variant:"warning",children:[(0,t.jsx)(r.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,t.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,t.jsx)(r.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,t.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("p",{className:"font-medium text-text",children:[(0,t.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,t.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},57108,e=>{"use strict";var t=e.i(43476),r=e.i(46670);e.s(["f",0,function({configuration:e}){if(e?.memoryProvider!=="hivemem")return null;let a=e.hiveMemToken,s=a?.status??"unknown";return(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsxs)(r.t,{variant:"valid"===s?"success":"expiring"===s||"unreachable"===s||"unknown"===s?"warning":"danger",children:["Token ",s]}),a?.expiresAt&&(0,t.jsxs)("time",{dateTime:a.expiresAt,title:"HiveMem token expiration",children:["expires ",new Date(a.expiresAt).toLocaleString()]}),a?.checkedAt&&(0,t.jsxs)("time",{dateTime:a.checkedAt,className:"text-text-muted/70",title:"Last HiveMem authentication check",children:["checked ",new Date(a.checkedAt).toLocaleString()]})]})}])},46670,e=>{"use strict";var t=e.i(43476),r=e.i(78571);let a={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)]"},s={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,t.jsxs)("span",{className:(0,r.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",s[n])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex h-1.5 w-1.5 rounded-full",s[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 t=e.i(43476),r=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let s=(0,r.f)(a);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 u({value:e,max:r=100,tone:a,thresholds:s=o.q,label:n,size:l="xs",showValue:x=!1,valueLabel:h,glow:m,className:f,testId:p}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(r||1)*100)):0,b=a??(g?(0,o.Z)(v,s):"muted"),j=m||!a&&g&&v>=s.warn,y=h??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",f),"data-testid":p,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":g?e:void 0,"aria-valuetext":y,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,t.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[b],j&&c[b])})}),x&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:y})]})}e.s(["f",0,u],51196);var x=e.i(71645);function h({values:e,tone:r="primary",width:a=160,height:s=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:u=!0,emptyLabel:m="not enough data",className:f,testId:p,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",f),"data-testid":p,children:m});let j=o.v[r],y=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=s-4,w=a/(e.length-1),k=e=>2+N-Math.max(0,e)/y*N,_=e.map((e,t)=>[t*w,k(e)]),M=_.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),S=_[_.length-1];return(0,t.jsxs)("svg",{width:v?"100%":a,height:s,viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",f),"data-testid":p,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${s} ${M} ${a},${s}`,fill:`url(#${b})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:M}),u&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2,fill:j})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:r,children:a,className:s,action:n,tone:i,corners:o=!1,...c}){return(0,t.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:r,action:n,className:s,children:a})},"n",0,function({label:e,value:r,icon:a,trend:c,spark:d,meter:x,delta:m,tone:f="primary",className:p,testId:g}){let v=!m||m.value>=0===(m.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:f,className:(0,i.f)("overflow-hidden",p),testId:g,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,t.jsx)("span",{className:"text-primary/60",children:a})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===f?"text-primary neon-text":o.T[f]),children:r}),m&&0!==m.value&&(0,t.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[m.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(s,{className:"h-3 w-3"}),Math.abs(m.value).toFixed(+!Number.isInteger(m.value)),m.unit]})]}),c&&(0,t.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,t.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(h,{values:d,tone:f,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(78571),s=e.i(35084);e.s(["f",0,function({value:e,max:n=100,label:i,sublabel:l,tone:o,thresholds:c=s.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:h=!0,hideLabel:m=!1,className:f,testId:p}){let g=(0,r.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(n||1)*100)):0,j=o??(v?d?(0,s.Z)(100-b,c):(0,s.Z)(b,c):"muted"),y=Math.max(4,Math.round(u/16)),N=50-y/2-4,w=2*Math.PI*N,k=.75*w,_=k*b/100,M=u>=140,S=x??(v?`${Math.round(b)}%`:"—"),C=h?Array.from({length:11},(e,r)=>{let a=(135+270*r/10)*Math.PI/180,s=50-(r%5==0?4:2.5);return(0,t.jsx)("line",{x1:50+48.5*Math.cos(a),y1:50+48.5*Math.sin(a),x2:50+s*Math.cos(a),y2:50+s*Math.sin(a),stroke:"var(--color-border-strong)",strokeWidth:.8},r)}):null;return(0,t.jsxs)("div",{role:"img","aria-label":`${i}: ${S}`,"data-testid":p,className:(0,a.f)("relative inline-flex flex-col items-center",f),style:{width:u},children:[(0,t.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[M&&(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),C,(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:"var(--color-border)",strokeWidth:y,strokeLinecap:"round",strokeDasharray:`${k} ${w}`,transform:"rotate(135 50 50)"}),(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:s.v[j],strokeWidth:y,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:M?`url(#g${g})`:void 0,style:{"--dash":`${_} ${w}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,t.jsx)("span",{className:(0,a.f)("num font-bold leading-none",s.T[j],M&&s.z[j]),style:{fontSize:Math.max(12,.2*u)},children:S}),l&&(0,t.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:l})]}),!m&&(0,t.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:i})]})}],54149);var n=e.i(70703),i=e.i(65369);let l=(0,n.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,t.jsx)(i.l,{className:"h-[180px] w-full"})});e.s(["f",0,l],21176)},3062,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(35084);let s={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:u,description:x,icon:h,action:m,as:f="div",padding:p="md",testId:g,className:v,children:b,...j}){return(0,t.jsxs)(f,{...j,"data-testid":g??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[p],o&&"panel-corners",o&&s[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||m||h)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,t.jsx)("span",{className:(0,r.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,t.jsxs)("div",{className:"min-w-0",children:[u&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),m]}),b]})}])},65369,e=>{"use strict";var t=e.i(43476),r=e.i(78571);function a({className:e}){return(0,t.jsx)("div",{"aria-hidden":"true",className:(0,r.f)("skeleton h-3 w-full",e)})}e.s(["l",0,a,"g",0,function({count:e=4,className:s}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",s),children:Array.from({length:e},(e,r)=>(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,t.jsx)(a,{className:"h-2 w-1/2"}),(0,t.jsx)(a,{className:"mt-4 h-7 w-2/3"}),(0,t.jsx)(a,{className:"mt-3 h-1 w-full opacity-60"})]},r))})},"F",0,function({rows:e=5,cols:s=4,className:n}){return(0,t.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,t.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:s},(e,r)=>(0,t.jsx)(a,{className:"h-2 flex-1 opacity-60"},r))}),Array.from({length:e},(e,n)=>(0,t.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:s},(e,s)=>(0,t.jsx)(a,{className:(0,r.f)("h-3 flex-1",(n+s)%3==0&&"max-w-[60%]")},s))},n))]})},"Q",0,function({lines:e=3,className:s}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("space-y-2",s),children:Array.from({length:e},(e,r)=>(0,t.jsx)(a,{className:n[r%n.length]},r))})}])},75723,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(46670);let s={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 u=(0,a.k)(e),x=l??i.has(e.toUpperCase()),h="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,r.f)("relative inline-flex shrink-0",h,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",n[u])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex rounded-full",h,s[u])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`},"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"}):"—"}])},79432,e=>{"use strict";var t=e.i(56420);let r={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],79432)},9347,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],9347)},75775,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],75775)},82022,e=>{"use strict";var t=e.i(56420);let r={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],82022)},57665,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],57665)},86207,14098,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],86207);var s=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:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)([]),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(!0),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)(""),[y,N]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(j(""),m(t?.role?.id??""),p(!0),N(!0),(async()=>{try{let e=await o.f.roles.list();x(e.data??[])}catch{j("Failed to load roles")}finally{N(!1)}})())},[e,t?.role?.id]);let w=async()=>{if(t){v(!0),j("");try{let e=t.role?.id;e&&e!==h&&await o.f.roles.unassign(e,{nodeIds:[t.id]}),h&&await o.f.roles.assign(h,{nodeIds:[t.id],defer:!f});let s=h?u.find(e=>e.id===h)??null:null;a(s),r()}catch(e){j(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(t?.role){v(!0),j("");try{await o.f.roles.unassign(t.role.id,{nodeIds:[t.id]}),a(null),r()}catch(e){j(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:_,title:t?.role?"Change Role":"Assign Role",description:t?`Node: ${t.name}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[y?(0,s.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,s.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===u.length?(0,s.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.G,{label:"Role",children:(0,s.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"",children:"— No role —"}),u.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),h&&(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:f,onChange:e=>p(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,s.jsx)("div",{children:t?.role&&(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:g,children:"Unassign Role"})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void w(),disabled:g||!h||0===u.length,icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":t?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)("");(0,n.useEffect)(()=>{if(t){x(t.name);try{let e=JSON.parse(t.tags);m(e.join(", "))}catch{m("")}p(t.status),j("")}},[t]);let y=async()=>{if(t&&u.trim()){v(!0),j("");try{let e=h.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(t.id,{name:u.trim(),tags:e,status:f.toUpperCase()}),a(),r()}catch(e){j(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},N=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:N,title:"Edit Node",description:t?`${t.hostname}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"Status",children:(0,s.jsxs)("select",{value:f,onChange:e=>p(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,s.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,s.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,s.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,s.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:N,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:g||!u.trim(),icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:t,onRegistered:r}){let[a,u]=(0,n.useState)(""),[x,h]=(0,n.useState)(""),[m,f]=(0,n.useState)("4100"),[p,g]=(0,n.useState)("linux"),[v,b]=(0,n.useState)("x86_64"),[j,y]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),M=async()=>{if(a.trim()&&x.trim()){w(!0),_("");try{let e=j.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:a.trim(),hostname:x.trim(),ipAddress:x.trim(),port:Number(m)||4100,os:p,arch:v,tags:e,agentVersion:"2.4.3"}),r(),S()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{w(!1)}}},S=()=>{u(""),h(""),f("4100"),g("linux"),b("x86_64"),y(""),_(""),w(!1),t()};return(0,s.jsx)(l.n,{open:e,onClose:S,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Node Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:a,onChange:e=>u(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,s.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsx)(l.G,{label:"Port",children:(0,s.jsx)("input",{type:"number",value:m,onChange:e=>f(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"OS",children:(0,s.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"linux",children:"Linux"}),(0,s.jsx)("option",{value:"darwin",children:"macOS"}),(0,s.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,s.jsx)(l.G,{label:"Architecture",children:(0,s.jsxs)("select",{value:v,onChange:e=>b(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,s.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,s.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:S,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void M(),disabled:N||!a.trim()||!x.trim(),icon:N?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:N?"Registering…":"Register Node"})]})]})})}],14098)},25398,e=>{"use strict";var t=e.i(56420);let r={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],25398)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class i{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new i}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),r=globalThis;return r[t]??=o()}function d(e){return l?l.bind(e):i.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=e.r(42344)},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let a=e.r(55682)._(e.r(69093));function s(e,t){let r={};"function"==typeof e&&(r.loader=e);let s={...r,...t};return(0,a.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},9885,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67585,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return i}});let a=e.r(71645),s=e.r(74080);e.r(32061);let n=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function i({children:e}){return(0,a.use)((0,s.browser)(n)),e}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let a=e.r(43476),s=e.r(71645),n=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,s.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?s.Suspense:s.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(n.BailoutToCSRForNextDynamic,{children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(43476),s=e.r(74080),n=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={createReactBrowserBailoutReason:function(){return i},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Symbol.for("next.browser-bailout-reason");function i(e){return{$$typeof:n,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===n?t.reason:void 0}function o(e){return void 0!==l(e)}}]);
@@ -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:"2.4.1"}),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:"2.4.3"}),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)}]);