@aeolus-fleet/console 0.20.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/fallback-build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/squadrons/[procedure]/route.js.nft.json +1 -1
  13. package/.next/server/app/inbox/page.js.nft.json +1 -1
  14. package/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/labels/page.js.nft.json +1 -1
  16. package/.next/server/app/labels/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/needs-attention/page.js.nft.json +1 -1
  18. package/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/needs-crew/page.js.nft.json +1 -1
  20. package/.next/server/app/needs-crew/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/page.js.nft.json +1 -1
  22. package/.next/server/app/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/settings/page.js.nft.json +1 -1
  24. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
  26. package/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  28. package/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/sign-in/page.js.nft.json +1 -1
  30. package/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
  32. package/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  34. package/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  35. package/.next/server/app/squadrons/connection/route.js.nft.json +1 -1
  36. package/.next/server/app/squadrons/page.js.nft.json +1 -1
  37. package/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
  39. package/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app/trierarch-plugin/connection/route.js.nft.json +1 -1
  41. package/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -1
  42. package/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app/trierarchs/page.js.nft.json +1 -1
  44. package/.next/server/app/trierarchs/page_client-reference-manifest.js +1 -1
  45. package/.next/server/app/version/route.js.nft.json +1 -1
  46. package/.next/server/chunks/[root-of-the-server]__1f_8ohl._.js +1 -1
  47. package/.next/server/chunks/_0h366h9._.js +1 -1
  48. package/.next/server/chunks/packages_console_lib_connect-plugin_ts_197hf-1._.js +1 -1
  49. package/.next/server/chunks/ssr/_0dogq79._.js +1 -1
  50. package/.next/server/chunks/ssr/_0rvujxo._.js +1 -1
  51. package/.next/server/chunks/ssr/_0s2b6hb._.js +1 -1
  52. package/.next/server/chunks/ssr/_0sko-kt._.js +1 -1
  53. package/.next/server/chunks/ssr/{_1bqclkf._.js → _0sv2xqb._.js} +2 -2
  54. package/.next/server/chunks/ssr/_0wr_wnm._.js +3 -0
  55. package/.next/server/chunks/ssr/_0wtj0e-._.js +1 -1
  56. package/.next/server/chunks/ssr/{_0n4kirm._.js → _0xc3etp._.js} +1 -1
  57. package/.next/server/chunks/ssr/_0xvm1ng._.js +1 -1
  58. package/.next/server/chunks/ssr/_0ziovn_._.js +1 -1
  59. package/.next/server/chunks/ssr/_11cgy8n._.js +3 -0
  60. package/.next/server/chunks/ssr/_1442xyx._.js +1 -1
  61. package/.next/server/chunks/ssr/_14rijy-._.js +3 -0
  62. package/.next/server/chunks/ssr/{_08f4mzr._.js → _17u4fan._.js} +2 -2
  63. package/.next/server/chunks/ssr/_181kpys._.js +1 -1
  64. package/.next/server/chunks/ssr/_19e0e-9._.js +1 -1
  65. package/.next/server/chunks/ssr/_1_h504-._.js +3 -0
  66. package/.next/server/chunks/ssr/_1al_cqt._.js +3 -0
  67. package/.next/server/chunks/ssr/_1bmk6y_._.js +3 -0
  68. package/.next/server/chunks/ssr/{_1oqoc4e._.js → _1ejhqt9._.js} +2 -2
  69. package/.next/server/chunks/ssr/_1ezhc7m._.js +3 -0
  70. package/.next/server/chunks/ssr/_1kv8ma5._.js +1 -1
  71. package/.next/server/chunks/ssr/_1ommvbv._.js +1 -1
  72. package/.next/server/chunks/ssr/{_0mob-i2._.js → _1on9mjs._.js} +2 -2
  73. package/.next/server/chunks/ssr/_1oofkty._.js +1 -1
  74. package/.next/server/chunks/ssr/_1r6ce_7._.js +1 -1
  75. package/.next/server/chunks/ssr/{_1tsejml._.js → _208q2q8._.js} +1 -1
  76. package/.next/server/chunks/ssr/node_modules_next_dist_0kq7z60._.js +1 -1
  77. package/.next/server/chunks/ssr/{packages_console_023iioa._.js → packages_console_0edevze._.js} +1 -1
  78. package/.next/server/chunks/ssr/packages_console_0oso305._.js +3 -0
  79. package/.next/server/chunks/ssr/{packages_console_0lv43wr._.js → packages_console_0y7h5dm._.js} +1 -1
  80. package/.next/server/chunks/ssr/packages_console_1stwpsk._.js +3 -0
  81. package/.next/server/chunks/ssr/packages_console_app_page_tsx_16ln4px._.js +1 -1
  82. package/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_page_tsx_0fudjay._.js +1 -1
  83. package/.next/server/chunks/ssr/packages_console_app_squadrons_[squadronId]_page_tsx_1umxs1g._.js +1 -1
  84. package/.next/server/chunks/ssr/packages_console_app_squadrons_page_tsx_1w6ym6z._.js +1 -1
  85. package/.next/server/chunks/ssr/packages_console_components_1-5gwzg._.js +1 -1
  86. package/.next/server/chunks/ssr/packages_console_components_organisms_form-squadron_tsx_1-qlsje._.js +3 -0
  87. package/.next/server/middleware-build-manifest.js +3 -3
  88. package/.next/server/pages/500.html +1 -1
  89. package/.next/server/server-reference-manifest.js +1 -1
  90. package/.next/server/server-reference-manifest.json +1 -1
  91. package/.next/static/chunks/0y1nvhxr03jkb.js +1 -0
  92. package/.next/static/chunks/1bvfk_-_enrxp.js +1 -0
  93. package/.next/static/chunks/1ct431l_sosvm.js +1 -0
  94. package/.next/static/chunks/1h0f7mfr5wxsj.js +1 -0
  95. package/.next/static/chunks/{39-cyg4qvxgbm.js → 21y50ct8e_pis.js} +1 -1
  96. package/.next/static/chunks/25amuen1qm2o7.js +1 -0
  97. package/.next/static/chunks/28j4p-34f5axr.js +1 -0
  98. package/.next/static/chunks/28vyyv4krlzx3.js +1 -0
  99. package/.next/static/chunks/2b-ho-tbr3sac.js +1 -0
  100. package/.next/static/chunks/{2_txjvbug4b86.js → 2r2aklt62ojhs.js} +1 -1
  101. package/.next/static/chunks/2spn0c35v7c1b.js +1 -0
  102. package/.next/static/chunks/2wnrtdpkhbd_j.js +1 -0
  103. package/.next/static/chunks/3061rp6nl670n.js +1 -0
  104. package/.next/static/chunks/3ba10-qig9f07.js +1 -0
  105. package/.next/static/chunks/3drxrwegn5v1p.css +3 -0
  106. package/.next/static/chunks/3jhje-hiar2ex.js +1 -0
  107. package/.next/static/chunks/3pu5ywtisj_fp.js +1 -0
  108. package/.next/static/chunks/{21jwgqx67q8ql.js → 3splvoavlf-cc.js} +1 -1
  109. package/.next/static/chunks/3vl7dc6v-u8w0.js +1 -0
  110. package/.next/static/chunks/{3b5uomyz3knol.js → 3z61krti-vbu2.js} +1 -1
  111. package/.next/static/chunks/{0e6zs-5ou_ra4.js → 414186x82sxkk.js} +1 -1
  112. package/package.json +3 -3
  113. package/.next/server/chunks/ssr/_01f7zv3._.js +0 -3
  114. package/.next/server/chunks/ssr/_0bmd2ey._.js +0 -3
  115. package/.next/server/chunks/ssr/_0i0_i88._.js +0 -3
  116. package/.next/server/chunks/ssr/_0t1jjxf._.js +0 -3
  117. package/.next/server/chunks/ssr/_20pku2-._.js +0 -3
  118. package/.next/server/chunks/ssr/packages_console_lib_crew-settings-form_ts_1_mrtph._.js +0 -3
  119. package/.next/static/chunks/00pjrzynt0in-.js +0 -1
  120. package/.next/static/chunks/0ez9e35zkfaz5.js +0 -1
  121. package/.next/static/chunks/0vlyibw4rexm7.js +0 -1
  122. package/.next/static/chunks/16o3i61aw3cj2.js +0 -1
  123. package/.next/static/chunks/17quvh6filhxh.js +0 -1
  124. package/.next/static/chunks/19x_u3cmb9s_j.js +0 -1
  125. package/.next/static/chunks/1mbia-jrmgpuu.js +0 -1
  126. package/.next/static/chunks/2c1daktq2hun-.css +0 -3
  127. package/.next/static/chunks/2k5tcu7bvrhet.js +0 -1
  128. package/.next/static/chunks/2mvb-x6v93lfc.js +0 -1
  129. package/.next/static/chunks/2ne-qdcv-7ck1.js +0 -1
  130. package/.next/static/chunks/30ux5-xn650iq.js +0 -1
  131. package/.next/static/chunks/3e1veij7vs6ao.js +0 -1
  132. package/.next/static/chunks/3eaxbdj-y982h.js +0 -1
  133. package/.next/static/chunks/3evbxrltn9tcu.js +0 -1
  134. /package/.next/static/{LHmQaS8aizP80vXh3K-ws → tBoOmC5nKBL5eqDmRV5Vd}/_buildManifest.js +0 -0
  135. /package/.next/static/{LHmQaS8aizP80vXh3K-ws → tBoOmC5nKBL5eqDmRV5Vd}/_clientMiddlewareManifest.js +0 -0
  136. /package/.next/static/{LHmQaS8aizP80vXh3K-ws → tBoOmC5nKBL5eqDmRV5Vd}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),s=e.i(52245),r=e.i(33332);let i=t.createContext(void 0);function n(){let e=t.useContext(i);if(void 0===e)throw Error((0,r.default)(13));return e}let a={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,r){let{className:n,render:l,style:d,...c}=e,[u,h]=t.useState("idle"),p=t.useMemo(()=>({imageLoadingStatus:u,setImageLoadingStatus:h}),[u,h]),m=(0,s.useRenderElement)("span",e,{state:{imageLoadingStatus:u},ref:r,props:c,stateAttributesMapping:a});return(0,o.jsx)(i.Provider,{value:p,children:m})});var d=e.i(67865),c=e.i(46376),u=e.i(37584),h=e.i(74354),p=e.i(23910),m=e.i(56789);let f={...a,...h.transitionStatusMapping},g=t.forwardRef(function(e,r){let{className:i,render:a,onLoadingStatusChange:o,keepMounted:l=!1,style:h,sizes:g,srcSet:x,src:y,...b}=e,{setImageLoadingStatus:v}=n(),[j,w]=function(e,{referrerPolicy:s,crossOrigin:r,sizes:i,srcSet:n},a){let o=t.useState("idle"),l=o[1];return(0,c.useIsoLayoutEffect)(()=>{if(!a)return m.NOOP;if(!e&&!n)return l("error"),m.NOOP;let t=!0,o=new window.Image,d=e=>()=>{t&&l(e)};return l("loading"),o.onload=d("loaded"),o.onerror=d("error"),s&&(o.referrerPolicy=s),o.crossOrigin=r??null,i&&(o.sizes=i),n&&(o.srcset=n),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[a,e,n,i,r,s,l]),o}(y,e,!l),C="loaded"===j,{mounted:k,transitionStatus:S,setMounted:N}=(0,p.useTransitionStatus)(C),R=t.useRef(null),D=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!l)return;let e=D.current;D.current=!1;let t=R.current;if(!t)return;if(!t.complete)return void w("loading");let s=t.naturalWidth>0?"loaded":"error";w(s),"loaded"===s&&e&&N(!0)},[l,y,x,g,b.crossOrigin,b.referrerPolicy,a,w,N]);let I=l?{"data-loading":"loading"===j?"":void 0,"data-error":"error"===j?"":void 0,"aria-hidden":"loaded"!==j||void 0,onLoad(){w("loaded")},onError(){w("error")}}:void 0,T=(0,d.useStableCallback)(e=>{o?.(e),v(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==j&&T(j)},[j,T]),(0,c.useIsoLayoutEffect)(()=>()=>v("idle"),[v]),(0,u.useOpenChangeComplete)({enabled:!C,open:C,ref:R,onComplete(){C||N(!1)}});let M=l||k,A={};void 0!==g&&(A.sizes=g),void 0!==x&&(A.srcSet=x),void 0!==y&&(A.src=y);let L=(0,s.useRenderElement)("img",e,{state:{imageLoadingStatus:j,transitionStatus:l&&"ending"===S?void 0:S},ref:[r,R],props:[I,b,A],stateAttributesMapping:f,enabled:M});return M?L:null});var x=e.i(39957);let y=t.forwardRef(function(e,r){let{className:i,render:o,delay:l=0,style:d,...c}=e,{imageLoadingStatus:u}=n(),[h,p]=t.useState(0===l),m=(0,x.useTimeout)();return t.useEffect(()=>(l>0?m.start(l,()=>p(!0)):p(!0),m.clear),[m,l]),(0,s.useRenderElement)("span",e,{state:{imageLoadingStatus:u},ref:r,props:c,stateAttributesMapping:a,enabled:"loaded"!==u&&(0===l||h)})});e.s(["Fallback",0,y,"Image",0,g,"Root",0,l],14751);var b=e.i(14751);e.s(["Avatar",0,b],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let s={[t.startingStyle]:""},r={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?s:"ending"===e?r:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),s=e.i(67865),r=e.i(74080),i=e.i(8445),n=e.i(94603),a=e.i(80862);let o=null;function l(e,t=!1,d=!1){let c=(0,i.useAnimationFrame)();return(0,s.useStableCallback)((s,i=null)=>{c.cancel();let l=(0,n.resolveRef)(e);if(null==l)return;let u=()=>{if(!d)return void r.flushSync(s);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,r.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{i?.aborted||s()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void s();function h(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||u()},()=>{i?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?h():u())})}if(t){let e=a.startingStyle;if(!l.hasAttribute(e))return void c.request(h);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),h())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(h)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:r=!0,open:i,ref:n,batch:a=!1,onComplete:o}=e,d=(0,s.useStableCallback)(o),c=l(n,i,a);t.useEffect(()=>{if(!r)return;let e=new AbortController;return c(d,e.signal),()=>{e.abort()}},[r,i,d,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),s=e.i(46376),r=e.i(8445);e.s(["useTransitionStatus",0,function(e,i=!1,n=!1,a=!1){let[o,l]=t.useState(e&&i?"idle":void 0),[d,c]=t.useState(e&&!a);return e&&!d&&(c(!0),l("starting")),e||!d||"ending"===o||n||l("ending"),e||d||"ending"!==o||l(void 0),(0,s.useIsoLayoutEffect)(()=>{if(!e&&d&&"ending"!==o&&n){let e=r.AnimationFrame.request(()=>{l("ending")});return()=>{r.AnimationFrame.cancel(e)}}},[e,d,o,n]),(0,s.useIsoLayoutEffect)(()=>{if(!e||i)return;let t=r.AnimationFrame.request(()=>{l(void 0)});return()=>{r.AnimationFrame.cancel(t)}},[i,e]),(0,s.useIsoLayoutEffect)(()=>{if(!e||!i)return;e&&d&&"idle"!==o&&l("starting");let t=r.AnimationFrame.request(()=>{l("idle")});return()=>{r.AnimationFrame.cancel(t)}},[i,e,d,o]),{mounted:d,setMounted:c,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),s=e.i(26300);let r=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let s=0;s<t.length;s+=1)t[s]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class i{static create(){return new i}static request(e){return r.request(e)}static cancel(e){return r.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=r.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(r.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,i,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(i.create).current;return(0,s.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),s=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,s.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),s=e.i(26300);class r{static create(){return new r}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,r,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(r.create).current;return(0,s.useOnMount)(e.disposeEffect),e}])},86247,e=>{"use strict";var t=e.i(56420);let s={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};s.node;let r=(0,t.default)(s);e.s(["Ellipsis",0,r],86247)},18236,e=>{"use strict";var t=e.i(56420);let s={name:"file-key",size:24,node:[["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M4 12v6",key:"bg1pfk"}],["path",{d:"M4 14h2",key:"1sf9f8"}],["path",{d:"M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4",key:"d56i0q"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["file-key-2"]};s.node;let r=(0,t.default)(s);e.s(["FileKey",0,r],18236)},26091,e=>{"use strict";var t=e.i(56420);let s={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};s.node;let r=(0,t.default)(s);e.s(["FileText",0,r],26091)},58925,e=>{"use strict";var t=e.i(56420);let s={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};s.node;let r=(0,t.default)(s);e.s(["KeyRound",0,r],58925)},68997,e=>{"use strict";var t=e.i(56420);let s={name:"pen",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-2"]};s.node;let r=(0,t.default)(s);e.s(["Pen",0,r],68997)},15331,71139,73330,e=>{"use strict";var t=e.i(56420);let s={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};s.node;let r=(0,t.default)(s);e.s(["Radio",0,r],15331);let i={name:"user-x",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]};i.node;let n=(0,t.default)(i);e.s(["UserX",0,n],71139);var a=e.i(49635);e.s(["canPing",0,function(e){return"agent"===e.kind&&"crewed"===e.status},"pingLine",0,function(e,t){let s=new Date(e.sentAt);switch(e.state){case"waiting":{let e=(0,a.relativeTime)(s,t);return`Pinged ${"Just now"===e?"just now":e}, no answer yet`}case"answered":var r;let i;return null===e.answeredAt?"Answered ping":`Answered ping in ${(i=Math.max(0,(r=new Date(e.answeredAt)).getTime()-s.getTime()))<6e4?`${String(Math.round(i/1e3))} s`:(0,a.duration)(s,r)}`;case"received":return"Received, not answered with pong";case"undeliverable":return"Ping not answered: undeliverable"}}],73330)},49287,e=>{"use strict";var t=e.i(56420);let s={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};s.node;let r=(0,t.default)(s);e.s(["Ship",0,r],49287)},83035,e=>{"use strict";var t=e.i(56420);let s={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};s.node;let r=(0,t.default)(s);e.s(["SquareTerminal",0,r],83035)},68401,e=>{"use strict";var t=e.i(56420);let s={name:"tags",size:24,node:[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]};s.node;let r=(0,t.default)(s);e.s(["Tags",0,r],68401)},37817,e=>{"use strict";var t=e.i(56420);let s={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};s.node;let r=(0,t.default)(s);e.s(["Undo2",0,r],37817)},49319,e=>{"use strict";var t=e.i(56420);let s={name:"user-minus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};s.node;let r=(0,t.default)(s);e.s(["UserMinus",0,r],49319)},82303,e=>{"use strict";var t=e.i(56420);let s={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};s.node;let r=(0,t.default)(s);e.s(["Users",0,r],82303)},22016,(e,t,s)=>{"use strict";e.i(47167),Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return x},useLinkStatus:function(){return b}};for(var i in r)Object.defineProperty(s,i,{enumerable:!0,get:r[i]});let n=e.r(90809),a=e.r(43476),o=n._(e.r(71645)),l=e.r(95057),d=e.r(8372),c=e.r(18581),u=e.r(18967),h=e.r(5550),p=e.r(88540),m=e.r(91949),f=e.r(73668),g=e.r(9396);function x(t){var s;let r,i,n,[x,b]=(0,o.useOptimistic)(m.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:w,children:C,prefetch:k=null,passHref:S,replace:N,shallow:R,scroll:D,onClick:I,onMouseEnter:T,onTouchStart:M,legacyBehavior:A=!1,onNavigate:L,transitionTypes:O,ref:P,unstable_dynamicOnHover:E,...z}=t;r=C,A&&("string"==typeof r||"number"==typeof r)&&(r=(0,a.jsx)("a",{children:r}));let F=o.default.useContext(d.AppRouterContext),$=!1!==k,q=!1===k?"none":!0===k?"full":"auto",_="none"!==q?"auto"===q?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(s=w||j)?s:(0,l.formatUrl)(s);if(A){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=o.default.Children.only(r)}let H=A?i&&"object"==typeof i&&i.ref:P,U,Q=o.default.useCallback(e=>(null!==F&&(v.current=(0,m.mountLinkInstance)(e,B,F,_,$,b,U)),()=>{v.current&&((0,m.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,m.unmountPrefetchableInstance)(e)}),[$,B,F,_,b,U]),K={ref:(0,c.useMergedRef)(Q,H),onClick(t){A||"function"!=typeof I||I(t),A&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!F||t.defaultPrevented||function(t,s,r,i,n,a,l,d="none"){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,f.isLocalURL)(s)){i&&(t.preventDefault(),location.replace(s));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);o.default.startTransition(()=>{h(s,i?"replace":"push",!1===n?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,r.current,l,d)})}}(t,B,v,N,D,L,O,q)},onMouseEnter(e){A||"function"!=typeof T||T(e),A&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),F&&$&&(0,m.onNavigationIntent)(e.currentTarget,!0===E)},onTouchStart:function(e){A||"function"!=typeof M||M(e),A&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),F&&$&&(0,m.onNavigationIntent)(e.currentTarget,!0===E)}};return(0,u.isAbsoluteUrl)(B)?K.href=B:A&&!S&&("a"!==i.type||"href"in i.props)||(K.href=(0,h.addBasePath)(B)),n=A?o.default.cloneElement(i,K):(0,a.jsx)("a",{...z,...K,children:r}),(0,a.jsx)(y.Provider,{value:x,children:n})}let y=(0,o.createContext)(m.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(y);("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},18581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(71645);function i(e,t){let s=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=s.current;e&&(s.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(s.current=n(e,r)),t&&(i.current=n(t,r))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},18967,(e,t,s)=>{"use strict";e.i(47167),Object.defineProperty(s,"__esModule",{value:!0});var r={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return f},ST:function(){return g},WEB_VITALS:function(){return n},execOnce:function(){return a},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return h},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return w}};for(var i in r)Object.defineProperty(s,i,{enumerable:!0,get:r[i]});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,s=!1;return(...r)=>(s||(s=!0,t=e(...r)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function d(){let{protocol:e,hostname:t,port:s}=window.location;return`${e}//${t}${s?":"+s:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let s=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(s&&h(s))return r;if(!r)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${r}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return r}let f="u">typeof performance,g=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"isLocalURL",{enumerable:!0,get:function(){return n}});let r=e.r(18967),i=e.r(52817);function n(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),s=new URL(e,t);return s.origin===t&&(0,i.hasBasePath)(s.pathname)}catch(e){return!1}}},98183,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={assign:function(){return l},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}};for(var i in r)Object.defineProperty(s,i,{enumerable:!0,get:r[i]});function n(e){let t={};for(let[s,r]of e.entries()){let e=t[s];void 0===e?t[s]=r:Array.isArray(e)?e.push(r):t[s]=[e,r]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[s,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(s,a(e));else t.set(s,a(r));return t}function l(e,...t){for(let s of t){for(let t of s.keys())e.delete(t);for(let[t,r]of s.entries())e.append(t,r)}return e}},95057,(e,t,s)=>{"use strict";e.i(47167),Object.defineProperty(s,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return d},urlObjectKeys:function(){return l}};for(var i in r)Object.defineProperty(s,i,{enumerable:!0,get:r[i]});let n=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:s}=e,r=e.protocol||"",i=e.pathname||"",o=e.hash||"",l=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:s&&(d=t+(~s.indexOf(":")?`[${s}]`:s),e.port&&(d+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.test(r))&&!1!==d?(d="//"+(d||""),i&&"/"!==i[0]&&(i="/"+i)):d||(d=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${d}${i}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return o(e)}},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var s=e.i(66250),r=e.i(2820),i=e.i(56736),n=e.i(9793),a=e.i(84324),o=e.i(64951),l=e.i(77173);let d=e.i(13488).DialogTrigger;var c=e.i(74217),u=e.i(25326);class h extends u.DialogHandle{}e.s(["Backdrop",()=>r.DialogBackdrop,"Close",()=>i.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,h,"Popup",()=>a.DialogPopup,"Portal",()=>o.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>l.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var p=e.i(34604),p=p,m=e.i(90063),f=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(p.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(p.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:r,...i}){return(0,t.jsxs)(p.Portal,{children:[(0,t.jsx)(p.Backdrop,{"data-slot":"alert-dialog-overlay",className:f.dialogSurface.overlay}),(0,t.jsx)(p.Popup,{"data-slot":"alert-dialog-content",className:(0,m.classNames)(f.dialogSurface.popup({size:s}),e),...i,children:r})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(p.Description,{"data-slot":"alert-dialog-description",className:(0,m.classNames)(f.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.classNames)(f.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.classNames)(f.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(p.Title,{"data-slot":"alert-dialog-title",className:(0,m.classNames)(f.dialogSurface.title,e),...s})}],24010)},94859,26478,e=>{"use strict";var t=e.i(43476),s=e.i(52376),r=e.i(25913),i=e.i(49287),n=e.i(56420);let a={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};a.node;let o=(0,n.default)(a);e.s(["UserRound",0,o],26478);var l=e.i(90063);let d=(0,r.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:r,name:n="",className:a}){let c=e??"ship";return(0,t.jsx)(s.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(d({kind:e,size:r}),a),children:(0,t.jsx)(s.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(i.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(o,{"aria-hidden":!0}):n.replaceAll("-","").slice(0,2)})})}],94859)},91703,e=>{"use strict";var t=e.i(43476),s=e.i(83035),r=e.i(90063),i=e.i(61966);e.s(["CodeBlock",0,function({label:e,code:n,isWrapped:a=!1,copyValue:o,copyLabel:l=`Copy ${e.toLowerCase()}`,onCopied:d,onCopyFailed:c,codeTestId:u,copyTestId:h}){return(0,t.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(s.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e})]}),(0,t.jsx)(i.CopyButton,{value:o??n,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":h})]}),(0,t.jsx)("pre",{"data-testid":u,className:(0,r.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",a?"break-all whitespace-pre-wrap":"whitespace-pre"),children:n})]})}])},61966,8734,e=>{"use strict";var t=e.i(43476),s=e.i(89664),r=e.i(56420);let i={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};i.node;let n=(0,r.default)(i);e.s(["Copy",0,n],8734);var a=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:r,size:i="xs",isLabeled:l=!1,onCopied:d,onCopyFailed:c,className:u,"data-testid":h}){let[p,m]=(0,a.useState)(!1);async function f(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}m(!0),d?.(),setTimeout(()=>{m(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:i,isIconOnly:!l,"aria-label":r,title:l?void 0:r,icon:p?(0,t.jsx)(s.Check,{"aria-hidden":!0}):(0,t.jsx)(n,{"aria-hidden":!0}),className:u,"data-testid":h,onClick:()=>{f()},children:l?p?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:p?"Copied.":""})]})}],61966)},1009,e=>{"use strict";var t=e.i(43476);e.s(["ConsequenceList",0,function({consequences:e}){return(0,t.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:e.map(({icon:e,text:s})=>(0,t.jsxs)("li",{className:"flex gap-2",children:[(0,t.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{children:s})]},s))})}])},56478,e=>{"use strict";var t=e.i(43476),s=e.i(66616),r=e.i(91703);e.s(["CrewLines",0,function({crewLines:e,subject:i,testIdPrefix:n,onCopied:a,onCopyFailed:o}){return e.map(({harness:e,line:l})=>(0,t.jsx)(r.CodeBlock,{label:`Crew line, ${(0,s.harnessWord)(e)} with the aeolus plugin`,code:l,isWrapped:!0,copyLabel:`Copy the ${(0,s.harnessWord)(e)} crew line for ${i}`,codeTestId:`${n}-${e}`,copyTestId:`${n}-${e}-copy`,onCopied:a,onCopyFailed:o},e))}])},69374,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(26808),i=e.i(12470),n=e.i(91727);e.s(["TypedConfirm",0,function({expected:e,value:a,onValueChange:o,"data-testid":l="retire-typed-confirm"}){let d=(0,s.useId)(),c=(0,s.useId)();return(0,t.jsxs)("div",{"data-testid":l,className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(n.Label,{htmlFor:d,className:"text-meta",children:["Type ",(0,t.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:e})," to confirm"]}),(0,t.jsx)(i.Input,{id:d,isMono:!0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-describedby":c,className:"max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:a,onChange:e=>{o(e.target.value)}}),(0,t.jsx)("p",{id:c,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===a?"Case and hyphens must match.":(0,r.isTypedMatch)(e,a)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(46150);let i={one:"delivery",many:"deliveries"};function n(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,r.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function a(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${n(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,r.counted)(e,i)} will be abandoned`},"inFlightLine",0,n,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,a,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,r.counted)(e,i)}`}],26808);var o=e.i(48695),l=e.i(15905),d=e.i(10818),c=e.i(25398),u=e.i(22212),h=e.i(94945),p=e.i(19321),m=e.i(66616),f=e.i(61966),g=e.i(60592);function x({crewLines:e,subject:r,testIdPrefix:i,onCopied:n,onCopyFailed:a}){let[o,l]=(0,s.useState)(e[0]?.harness),d=e.find(e=>e.harness===o)??e[0];if(!d)return null;let c=(0,m.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(g.Tabs,{value:d.harness,onValueChange:t=>{let s=e.find(e=>e.harness===t);s&&l(s.harness)},children:(0,t.jsx)(g.TabsList,{"aria-label":`Crew ${r} from`,children:e.map(e=>(0,t.jsx)(g.TabsTrigger,{value:e.harness,"data-testid":`${i}-${e.harness}-tab`,children:(0,m.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${i}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(f.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${r}`,isLabeled:!0,onCopied:n,onCopyFailed:a,"data-testid":`${i}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,x],82880);var y=e.i(17981),b=e.i(26091);function v({note:e,model:s,template:r,testId:i}){return null===e&&null===s?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(b.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===r?"":` \xb7 ${r}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":i,children:e}),null!==s&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:s})]})]})]})}function j({memberName:e,template:s,launchNote:r,model:i,crewLines:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v,{note:r,model:i,template:s,testId:"crew-line-launch-note"}),(0,t.jsx)(x,{crewLines:n,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function w({memberName:e,state:s,template:r,launchNote:i=null,model:n=null,crewLines:a,error:o,isOpen:d,onOpenChange:m,onConfirm:f}){let g="issuing"===s;return(0,t.jsx)(u.Dialog,{open:d,onOpenChange:e=>{g||m(e)},children:(0,t.jsxs)(u.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:h.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsxs)(u.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(u.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),g&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(p.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(p.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===s&&void 0!==a&&(0,t.jsx)(j,{memberName:e,template:r,launchNote:i,model:n,crewLines:a}),"error"===s&&(0,t.jsx)(y.InlineError,{title:"Couldn’t issue a crew line",description:`${o??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(u.DialogFooter,{children:[("shown"===s||g)&&(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(l.Button,{variant:"primary","data-testid":"crew-line-done",disabled:g}),children:"Done"}),"error"===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(l.Button,{}),children:"Close"}),(0,t.jsx)(l.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:f,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,v],3067),e.s(["CrewLineDialog",0,w],42211);var C=e.i(24010);function k({memberName:e,replacedText:s,isOpen:r,onOpenChange:i,onConfirm:n}){return(0,t.jsx)(C.AlertDialog,{open:r,onOpenChange:i,children:(0,t.jsxs)(C.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:h.dialogSurface.phoneSheet,children:[(0,t.jsxs)(C.AlertDialogHeader,{children:[(0,t.jsxs)(C.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(C.AlertDialogDescription,{children:s??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(C.AlertDialogFooter,{children:[(0,t.jsx)(C.AlertDialogClose,{render:(0,t.jsx)(l.Button,{}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:n,children:"Get new crew line"})]})]})})}function S(e){let r=(0,o.useNewCrewLine)(),[i,n]=(0,s.useState)(!1),[l,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(void 0),h=()=>{e&&r.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},p=r.data?"shown":r.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(r.reset(),u(a(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k,{memberName:e.member.name,replacedText:c,isOpen:l,onOpenChange:d,onConfirm:()=>{d(!1),n(!0),h()}}),(0,t.jsx)(w,{memberName:e.member.name,state:p,template:e.template,launchNote:r.data?.launchNote,model:r.data?.model,crewLines:r.data?.crewLines,error:r.error?.message,isOpen:i,onOpenChange:e=>{n(e),e||r.reset()},onConfirm:h})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:s,...r}){let i=S(r);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!i.isReady,"data-testid":s,onClick:i.start,children:"Get new crew line"}),i.dialog]})},"useNewCrewLineFlow",0,S],39874)},29244,88280,39844,e=>{"use strict";var t=e.i(43476),s=e.i(52886),r=e.i(18236),i=e.i(58925),n=e.i(37817),a=e.i(26808),o=e.i(24010),l=e.i(15905),d=e.i(94945),c=e.i(1009),u=e.i(17981);let h={release:{title:"Release",action:"Release ship",busy:"Releasing",failed:"Couldn’t release the ship",testId:"release-dialog"},recrew:{title:"Re-crew",action:"Re-crew ship",busy:"Re-crewing",failed:"Couldn’t re-crew the ship",testId:"recrew-dialog"}};e.s(["ReleaseDialog",0,function(e){let{shipName:p,sessionLocation:m,mode:f="release",isOpen:g,onOpenChange:x,isPending:y,error:b,onConfirm:v}=e,j=h[f],w=m?`The session on ${m}`:"The session crewing it";return(0,t.jsx)(o.AlertDialog,{open:g,onOpenChange:e=>{y||x(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":j.testId,className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:[j.title," ",p,"?"]}),(0,t.jsxs)(o.AlertDialogDescription,{children:[w," loses this ship now."]})]}),(0,t.jsx)(c.ConsequenceList,{consequences:function(e){let{shipName:t,inFlightCount:o,mode:l="release"}=e;return[{icon:i.KeyRound,text:"Its secret and crew token stop working, so that session cannot come back."},{icon:n.Undo2,text:(0,a.inFlightLine)(o)},"release"===l?{icon:s.CircleDashed,text:`${t} shows as Awaiting crew until you get a new starting prompt.`}:{icon:r.FileKey,text:"A new starting prompt and its crew lines are shown once, for the new crew."}]}(e)}),void 0===b?null:(0,t.jsx)(u.InlineError,{title:j.failed,description:`${b} Nothing changed; the session still holds the ship.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:y}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",isLoading:y,onClick:v,children:y?j.busy:j.action})]})]})})}],29244),e.i(31627);var p=e.i(44827),m=e.i(85595),f=e.i(16984),g=e.i(66787),x=e.i(71645),y=e.i(90063),b=e.i(65160),v=e.i(22212),j=e.i(12470),w=e.i(91727);function C({shipName:e,activeNames:s,isPending:r,error:i,onSubmit:n}){let a=(0,x.useId)(),o=(0,x.useId)(),[d,c]=(0,x.useState)(""),h=(0,b.checkShipName)(d,{activeNames:s,current:e}),k="invalid"===h.kind||"reserved"===h.kind||"taken"===h.kind,S="available"===h.kind;return(0,t.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),S&&n(d)},children:[(0,t.jsxs)(v.DialogHeader,{children:[(0,t.jsxs)(v.DialogTitle,{children:["Rename ",e]}),(0,t.jsx)(v.DialogDescription,{children:"The ship keeps its id, inbox and history."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(w.Label,{htmlFor:a,children:"New name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[d.length," / ",p.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(j.Input,{id:a,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:e,"data-testid":"rename-name","aria-invalid":!!k||void 0,"aria-describedby":o,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:d,onChange:e=>{c((0,b.asHandle)(e.target.value))}}),"available"===h.kind?(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):k?(0,t.jsx)(f.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,t.jsx)("p",{id:o,"aria-live":"polite",className:(0,y.classNames)("text-meta",k?"text-destructive-text":"text-muted-foreground"),children:h.message})]}),(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg p-3 text-tone-waiting-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("p",{className:"text-body font-medium",children:["Ships that address ",e," by name stop reaching it"]}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Messages already sent are unaffected, because they are stored by ship id."})]})]}),void 0===i?null:(0,t.jsx)(u.InlineError,{title:"Couldn’t rename the ship",description:`${i} Nothing changed.`}),(0,t.jsxs)(v.DialogFooter,{children:[(0,t.jsx)(v.DialogClose,{render:(0,t.jsx)(l.Button,{type:"button",disabled:r}),children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",variant:"primary",isLoading:r,disabled:!S,"data-testid":"rename-submit",children:r?"Renaming":"Rename ship"})]})]})}e.s(["RenameDialog",0,function(e){let{isOpen:s,onOpenChange:r,isPending:i}=e;return(0,t.jsx)(v.Dialog,{open:s,onOpenChange:e=>{i||r(e)},children:(0,t.jsx)(v.DialogContent,{"data-testid":"rename-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.jsx)(C,{...e})})})}],88280);var k=e.i(80799),S=e.i(68401),N=e.i(71139),R=e.i(82303),D=e.i(69374);function I({openDeliveries:e}){return 0===e?(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}):(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:(0,a.abandonedLine)(e)}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Each is marked Abandoned and its sender can see that."})]})]})}function T(e){var s;let{shipName:r,openDeliveries:n,isCrewed:d,isPending:h,error:p,onConfirm:m}=e,[f,g]=(0,x.useState)(""),y=n>0,b=!y||(0,a.isTypedMatch)(r,f);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Retire ",r,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:"Retiring ends this ship for good. Its history stays available read-only. This can’t be undone."})]}),(0,t.jsx)(I,{openDeliveries:n}),(0,t.jsx)(c.ConsequenceList,{consequences:(s=e.labelLines??[],[...d?[{icon:N.UserX,text:"The session crewing it loses it now."}]:[],...s.map(e=>({icon:S.Tags,text:e})),{icon:i.KeyRound,text:"Its secret stops working."},{icon:k.Tag,text:"It is never crewed or messaged again, and its name is free for a new ship."},{icon:R.Users,text:"Deliveries to its type stay, for the other ships of the type."}])}),y?(0,t.jsx)(D.TypedConfirm,{expected:r,value:f,onValueChange:g}):null,void 0===p?null:(0,t.jsx)(u.InlineError,{title:"Couldn’t retire the ship",description:`${p} Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:h}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:h,disabled:!b,onClick:m,children:(0,a.retireButtonLabel)(n)})]})]})}e.s(["RetireDialog",0,function(e){let{isOpen:s,onOpenChange:r,isPending:i}=e;return(0,t.jsx)(o.AlertDialog,{open:s,onOpenChange:e=>{i||r(e)},children:(0,t.jsx)(o.AlertDialogContent,{"data-testid":"retire-dialog",className:d.dialogSurface.phoneSheet,children:(0,t.jsx)(T,{...e})})})}],39844)},48287,e=>{"use strict";var t=e.i(43476),s=e.i(76561),r=e.i(85595),i=e.i(66787),n=e.i(82303),a=e.i(71645),o=e.i(26808),l=e.i(46150),d=e.i(24010),c=e.i(15905),u=e.i(94945),h=e.i(1009),p=e.i(17981),m=e.i(69374);let f={one:"delivery",many:"deliveries"};function g({role:e,othersOfRole:t,blueprint:s}){let r=0===t.length?`no ${e}`:`${String(t.length)} ${e}`;return void 0===s?`The squadron then has ${r}.`:`The squadron then has ${r}; blueprint ${s.label} has ${String(s.count)}.`}function x(e){let{squadronId:u,member:x,othersOfRole:y,blueprint:b,openDeliveries:v,inFlightDeliveries:j,isPending:w,error:C,onConfirm:k}=e,[S,N]=(0,a.useState)(""),R=v>0,D=!R||(0,o.isTypedMatch)(x.name,S),I=0===y.length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.AlertDialogHeader,{children:[(0,t.jsxs)(d.AlertDialogTitle,{children:["Remove ",x.name," from ",u,"?"]}),(0,t.jsx)(d.AlertDialogDescription,{children:R?(0,t.jsx)(t.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,t.jsx)(t.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),R?(0,t.jsxs)("div",{role:"alert",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-meta text-tone-attention-fg",children:[(0,t.jsx)(i.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"font-medium",children:(0,o.abandonedLine)(v)}),(0,t.jsxs)("p",{className:"text-foreground",children:[v-j," pending, ",j," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,t.jsx)(h.ConsequenceList,{consequences:[{icon:s.Archive,text:`Its ship ${x.name} is retired. Its history stays read-only.`},{icon:n.Users,text:g({role:x.role,othersOfRole:y,blueprint:b})}]}),I&&(0,t.jsxs)("p",{"data-testid":"remove-member-last-of-role",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:[(0,t.jsx)(i.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"font-medium",children:["The last ",x.role,"."]})," ",(0,t.jsxs)("span",{className:"text-foreground",children:[g({role:x.role,othersOfRole:y,blueprint:b})," Work for the role waits until a member is added."]})]})]}),!R&&(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(r.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),R?(0,t.jsx)(m.TypedConfirm,{expected:x.name,value:S,onValueChange:N}):null,void 0!==C&&(0,t.jsx)(p.InlineError,{title:"Couldn’t remove the member",description:`${C} Nothing changed.`}),(0,t.jsxs)(d.AlertDialogFooter,{children:[(0,t.jsx)(d.AlertDialogClose,{render:(0,t.jsx)(c.Button,{disabled:w}),children:"Cancel"}),(0,t.jsx)(c.Button,{variant:"destructive",isLoading:w,disabled:!D,onClick:k,"data-testid":"remove-member-confirm",children:R?`Remove and abandon ${(0,l.counted)(v,f)}`:"Remove member"})]})]})}e.s(["RemoveMemberDialog",0,function(e){let{isOpen:s,onOpenChange:r,isPending:i}=e;return(0,t.jsx)(d.AlertDialog,{open:s,onOpenChange:e=>{i||r(e)},children:(0,t.jsx)(d.AlertDialogContent,{"data-testid":"remove-member-dialog",className:u.dialogSurface.phoneSheet,children:(0,t.jsx)(x,{...e})})})}])},5894,e=>{"use strict";var t=e.i(43476),s=e.i(76561),r=e.i(8734),i=e.i(86247),n=e.i(44594),a=e.i(58925),o=e.i(68997),l=e.i(15331),d=e.i(60011),c=e.i(19759),u=e.i(49319),h=e.i(57443),p=e.i(71139),m=e.i(22016),f=e.i(71645),g=e.i(5387),x=e.i(90262),y=e.i(80581),b=e.i(73330),v=e.i(53573),j=e.i(86165),w=e.i(48695),C=e.i(84294),k=e.i(84156),S=e.i(15905),N=e.i(57334),R=e.i(75305),D=e.i(41880),I=e.i(44824),T=e.i(29244),M=e.i(39874),A=e.i(48287),L=e.i(88280),O=e.i(39844),P=e.i(82532);function E({action:e,className:s}){let r=e.isPrimary?"primary":e.isDestructive||"rename"===e.key?"ghost":"secondary";return void 0!==e.href?(0,t.jsx)(S.Button,{size:"xs",variant:r,nativeButton:!1,"data-testid":e.testId,className:s,render:(0,t.jsx)(m.default,{href:e.href}),children:e.label}):(0,t.jsx)(S.Button,{size:"xs",variant:r,"data-testid":e.testId,disabled:e.isDisabled,isLoading:e.isLoading,className:s,onClick:e.onSelect,children:e.label})}function z(e,t){let s=e[t-1],r=e[t];return void 0!==s&&void 0!==r&&(!0===s.isMenuOnly&&!0!==r.isMenuOnly||!0===r.isDestructive&&!0!==s.isDestructive)}function F({layout:e,ship:s,actions:r}){if("next"===e){let e=r.find(e=>"prompt"===e.key||"crew-line"===e.key&&!0===e.isPrimary);return e?(0,t.jsx)(E,{action:{...e,isPrimary:!1},className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch"}):null}if("buttons"===e){let e=r.filter(e=>!0!==e.isMenuOnly);return 0===e.length?null:(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2 max-sm:justify-start",children:e.map(e=>(0,t.jsx)(E,{action:e},e.key))})}let n=(0,t.jsx)(S.Button,{size:"sheet"===e?"touch":"xs",variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${s.name}`,icon:(0,t.jsx)(i.Ellipsis,{}),"data-testid":"fleet-actions"});return"sheet"===e?(0,t.jsxs)(R.Sheet,{children:[(0,t.jsx)(R.SheetTrigger,{render:n}),(0,t.jsxs)(R.SheetContent,{side:"bottom","data-testid":"fleet-row-sheet",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:s.name})}),(0,t.jsx)("ul",{className:"flex flex-col pb-2",children:r.map((e,s)=>(0,t.jsx)("li",{className:z(r,s)?"mt-1 border-t border-border pt-1":void 0,children:(0,t.jsxs)(R.SheetClose,{render:void 0===e.href?(0,t.jsx)("button",{type:"button",disabled:e.isDisabled,onClick:e.onSelect}):(0,t.jsx)(m.default,{href:e.href}),"data-testid":e.testId,className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch disabled:opacity-45 [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel.replace(/…$/,"")]})},e.key))}),(0,t.jsx)("div",{className:"px-4 pb-4",children:(0,t.jsx)(R.SheetClose,{render:(0,t.jsx)(S.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]}):(0,t.jsxs)(N.DropdownMenu,{children:[(0,t.jsx)(N.DropdownMenuTrigger,{render:n}),(0,t.jsx)(N.DropdownMenuContent,{children:r.map((e,s)=>(0,t.jsxs)(f.Fragment,{children:[z(r,s)?(0,t.jsx)(N.DropdownMenuSeparator,{}):null,void 0===e.href?(0,t.jsxs)(N.DropdownMenuItem,{"data-testid":e.testId,disabled:e.isDisabled,variant:e.isDestructive?"destructive":"default",onClick:e.onSelect,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]}):(0,t.jsxs)(N.DropdownMenuItem,{"data-testid":e.testId,render:(0,t.jsx)(m.default,{href:e.href}),children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]})]},e.key))})]})}e.s(["ShipActions",0,function({ship:e,layout:i="buttons"}){var m,S;let N=(0,x.useAccess)(),[R,E]=(0,f.useState)(),[z,$]=(0,f.useState)(!1),[q,_]=(0,f.useState)(void 0),B=(0,g.useGetStartingPrompt)(),H=(0,g.useReleaseShip)(),U=(0,g.useRetireShip)(),Q=(0,g.useRecrewShip)(),K=(0,g.useRenameShip)(),V=(0,g.usePingShip)(),W=(0,g.useFleetSnapshot)(),G=(0,g.useLabelContext)(),X=(0,v.useShip)("release"===R||"recrew"===R||"retire"===R||"remove"===R?e.id:void 0),J=(0,j.useSquadronsConnection)(),Y=(0,w.useSquadrons)(),Z=(0,w.useRemoveMember)(),ee=Y.data?.find(t=>"disbanded"!==t.state&&(t.flagship.shipId===e.id||t.members.some(t=>t.shipId===e.id))),et=void 0!==ee&&ee.flagship.shipId!==e.id,es=(0,v.useShip)(et&&"retired"!==e.status?e.id:void 0),er=ee?.members.find(t=>t.shipId===e.id),ei=(0,M.useNewCrewLineFlow)(ee&&er?{squadronId:ee.id,member:er,ship:es.data}:void 0),en="unknown"===J||"connected"===J&&!Y.isFetched,ea=()=>{E(void 0)},eo=B.data??Q.data,el=eo?"shown":B.isError?"error":"issuing",ed=e=>()=>{H.reset(),U.reset(),Q.reset(),K.reset(),Z.reset(),E(e)},ec=async()=>{try{await navigator.clipboard.writeText(e.id),(0,D.showToast)({title:"Ship id copied",description:e.id,tone:"success"})}catch{(0,D.showToast)({title:"Couldn’t copy the ship id",description:e.id,tone:"error"})}},eu=ee?.flagship.shipId===e.id,eh={key:"message",label:"Message",menuLabel:"Message this ship…",icon:c.SquarePen,testId:"fleet-ship-message",onSelect:()=>{$(!0)},isMenuOnly:!0,needs:"canSend"},ep={key:"copy",label:"Copy ship id",menuLabel:"Copy ship id",icon:r.Copy,testId:"fleet-ship-copy-id",onSelect:()=>{ec()},isMenuOnly:!0},em=(0,b.canPing)(e)?[{key:"ping",label:"Ping",menuLabel:"Ping",icon:l.Radio,testId:"fleet-ship-ping",onSelect:()=>{V.mutate({shipId:e.id},{onSuccess:({isNew:t})=>{(0,D.showToast)(t?{title:`Pinged ${e.name}`,description:"Its session answers with pong on its next turn.",tone:"success"}:{title:`A ping already waits for ${e.name}`,description:"Pings never stack: this is the one shown.",tone:"info"})},onError:t=>{(0,D.showToast)({title:`Couldn’t ping ${e.name}`,description:t.message,tone:"error"})}})},isLoading:V.isPending,needs:"canManage"}]:[],ef=[];return"operator"===e.kind?ef.push({key:"inbox",label:"Open inbox",menuLabel:"Open inbox",icon:n.Inbox,testId:"fleet-ship-open-inbox",href:"/inbox",isMenuOnly:!0},ep):"retired"===e.status||"viewer"===e.kind?ef.push(ep):eu?ef.push({key:"squadron",label:"Open squadron",menuLabel:"Open squadron",icon:d.Shapes,testId:"fleet-ship-open-squadron",href:`/squadrons/${ee.id}`}):en?ef.push(eh,ep,...em):er&&ee?(ef.push(eh,ep,...em,{key:"crew-line",label:"Get new crew line",menuLabel:"Get new crew line…",icon:a.KeyRound,testId:"fleet-ship-new-crew-line",onSelect:ei.start,needs:"canManage",isDisabled:!ei.isReady,isPrimary:"silent"===er.health}),"crewed"===e.status&&ef.push({key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ed("release"),needs:"canManage"}),("sailing"===ee.state||"standing-down"===ee.state)&&ef.push({key:"remove",label:"Remove from squadron",menuLabel:"Remove from squadron…",icon:u.UserMinus,testId:"fleet-ship-remove",onSelect:ed("remove"),isDestructive:!0,needs:"canManage"})):(ef.push(eh,ep),"awaitingCrew"===e.status?ef.push({key:"prompt",label:"Get starting prompt",menuLabel:"Get starting prompt…",icon:a.KeyRound,testId:"fleet-ship-prompt",onSelect:()=>{B.reset(),Q.reset(),_((0,k.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),E("prompt"),B.mutate({shipId:e.id})},needs:"canManage"}):ef.push(...em,{key:"recrew",label:"Re-crew",menuLabel:"Re-crew…",icon:h.UserPlus,testId:"fleet-ship-recrew",onSelect:ed("recrew"),needs:"canManage"},{key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ed("release"),needs:"canManage"}),ef.push({key:"rename",label:"Rename",menuLabel:"Rename…",icon:o.Pen,testId:"fleet-ship-rename",onSelect:ed("rename"),needs:"canManage"},{key:"retire",label:"Retire",menuLabel:"Retire ship…",icon:s.Archive,testId:"fleet-ship-retire",onSelect:ed("retire"),isDestructive:!0,needs:"canManage"})),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F,{layout:i,ship:e,actions:(m=ef,S=N,m.filter(e=>void 0===e.needs||S[e.needs]))}),(0,t.jsx)(T.ReleaseDialog,{shipName:e.name,sessionLocation:null===e.location?null:e.location.description??e.location.kind.toLowerCase(),inFlightCount:X.data?.inFlightDeliveries??0,mode:"recrew"===R?"recrew":"release",isOpen:("release"===R||"recrew"===R)&&void 0!==X.data,onOpenChange:e=>{e||ea()},isPending:H.isPending||Q.isPending,error:("recrew"===R?Q.error:H.error)?.message,onConfirm:()=>{"recrew"===R?Q.mutate({shipId:e.id},{onSuccess:()=>{_(void 0),E("prompt")}}):H.mutate({shipId:e.id},{onSuccess:ea})}}),(0,t.jsx)(O.RetireDialog,{shipName:e.name,openDeliveries:X.data?.openDeliveries??0,isCrewed:"crewed"===e.status,isOpen:"retire"===R&&void 0!==X.data,onOpenChange:e=>{e||ea()},isPending:U.isPending,error:U.error?.message,onConfirm:()=>{U.mutate({shipId:e.id},{onSuccess:ea})},labelLines:void 0===G?void 0:(0,y.retireLabelLines)((0,y.retiredLabelsOf)(e,G))}),ee&&er&&(0,t.jsx)(A.RemoveMemberDialog,{squadronId:ee.id,member:er,othersOfRole:(0,C.otherMembersOfRole)(ee,er.shipId),openDeliveries:X.data?.openDeliveries??0,inFlightDeliveries:X.data?.inFlightDeliveries??0,isOpen:"remove"===R&&void 0!==X.data,onOpenChange:e=>{e||ea()},isPending:Z.isPending,error:Z.error?.message,onConfirm:()=>{Z.mutate({squadronId:ee.id,shipId:er.shipId},{onSuccess:ea})}}),(0,t.jsx)(L.RenameDialog,{shipName:e.name,activeNames:(W.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:"rename"===R,onOpenChange:e=>{e||ea()},isPending:K.isPending,error:K.error?.message,onSubmit:t=>{K.mutate({shipId:e.id,name:t},{onSuccess:ea})}}),(0,t.jsx)(P.StartingPromptDialog,{shipName:e.name,state:el,prompt:eo?.prompt,crewLines:eo?.crewLines,replacesUnclaimed:q,error:B.error?.message,isOpen:"prompt"===R,onOpenChange:e=>{e||(B.reset(),Q.reset(),ea())},onConfirm:()=>{Q.reset(),B.mutate({shipId:e.id})}}),ei.dialog,z&&(0,t.jsx)(I.ComposeMessage,{isOpen:!0,onOpenChange:$,toShipId:e.id})]})}])},82532,e=>{"use strict";var t=e.i(43476),s=e.i(22768),r=e.i(10818),i=e.i(25398),n=e.i(71645),a=e.i(49635),o=e.i(15905),l=e.i(91703),d=e.i(22212),c=e.i(94945),u=e.i(19321),h=e.i(56478),p=e.i(17981);function m({shipName:e,prompt:i,crewLines:a}){let[o,d]=(0,n.useState)(!1),c=()=>{d(!1)},u=()=>{d(!0)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,t.jsx)(r.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," If you lose it, get a new one; this one then stops working."]})]}),(0,t.jsx)(l.CodeBlock,{label:`Starting prompt for ${e}`,code:i,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e}`,codeTestId:"starting-prompt-text",copyTestId:"starting-prompt-copy",onCopied:c,onCopyFailed:u}),(0,t.jsx)(h.CrewLines,{crewLines:a,subject:e,testIdPrefix:"starting-prompt-crew-line",onCopied:c,onCopyFailed:u}),(0,t.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null})]})}e.s(["StartingPromptDialog",0,function(e){let{shipName:s,state:r,prompt:n,crewLines:l,replacesUnclaimed:h,error:f,isOpen:g,onOpenChange:x,onConfirm:y}=e,b="issuing"===r;return(0,t.jsx)(d.Dialog,{open:g,onOpenChange:e=>{b||x(e)},children:(0,t.jsxs)(d.DialogContent,{size:"md","data-testid":"starting-prompt-dialog",className:c.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsxs)(d.DialogTitle,{children:["Starting prompt for ",s]}),(0,t.jsxs)(d.DialogDescription,{children:["Paste it into the agent session that should crew this ship, or a crew line into Claude Code or Codex with the aeolus plugin. Any earlier prompt for ",s," stops working now."]})]}),"error"!==r&&h?(0,t.jsxs)("p",{className:"rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:["This prompt stops the one issued"," ",(0,t.jsx)("time",{dateTime:h.issuedAt,children:(0,a.shortDateTime)(new Date(h.issuedAt))})," ","working."]}):null,b?(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a starting prompt..."}),(0,t.jsx)(u.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(u.Skeleton,{className:"h-40 w-full rounded-lg"})]}):null,"shown"===r&&void 0!==n&&void 0!==l?(0,t.jsx)(m,{shipName:s,prompt:n,crewLines:l}):null,"error"===r?(0,t.jsx)(p.InlineError,{title:"Couldn’t issue a starting prompt",description:`${f??"The server did not answer."} No new secret was created; any earlier prompt still works.`}):null,(0,t.jsxs)(d.DialogFooter,{children:["issuing"===r||"shown"===r?(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary",disabled:b}),children:"Done"}):null,"error"===r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(i.RotateCw,{}),onClick:y,children:"Try again"})]}):null]})]})})}])},66616,e=>{"use strict";let t={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function s(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":s(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,s])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),s=e.i(19273),r=e.i(12598),i=e.i(81384),n=e.i(73664),a=e.i(27001),o=e.i(54440),l=e.i(71645),d=e.i(15823),c=e.i(40143),u=e.i(69230);function h(e,t){let s=new Set(t);return e.filter(e=>!s.has(e))}var p=class extends d.Subscribable{#e;#t;#s;#r;#i;#n;#a;#o;#l;#d=[];constructor(e,t,s){super(),this.#e=e,this.#r=s,this.#s=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#i.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#s=e,this.#r=t,c.notifyManager.batch(()=>{let e=this.#i,t=this.#u(this.#s);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let r=t.map(e=>e.observer),i=r.map(e=>e.getCurrentResult()),n=e.length!==r.length,a=r.some((t,s)=>t!==e[s]),o=n||a,l=!!o||i.some((e,t)=>{let r=this.#t[t];return!r||!(0,s.shallowEqualObjects)(e,r)});(o||l)&&(o&&(this.#d=t,this.#i=r),this.#t=i,this.hasListeners()&&(o&&(h(e,r).forEach(e=>{e.destroy()}),h(r,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let s=this.#u(e),r=s.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=s.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#p(e??r,t,i),()=>this.#m(r,s)]}#m(e,t){let s=new Set;return t.map((r,i)=>{let n=e[i];return r.defaultedQueryOptions.notifyOnChangeProps?n:r.observer.trackResult(n,e=>{s.has(e)||(s.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#p(e,t,r){if(t){let i=this.#l,n=void 0!==r&&void 0!==i&&(i.length!==r.length||r.some((e,t)=>e!==i[t]));return(this.#t!==this.#o||n||t!==this.#a)&&(this.#a=t,this.#o=this.#t,void 0!==r&&(this.#l=r),this.#n=(0,s.replaceEqualDeep)(this.#n,t(e))),this.#n}return e}#f(){return!this.#r?.combine||this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#u(e){let t=new Map;this.#i.forEach(e=>{let s=e.options.queryHash;if(!s)return;let r=t.get(s);r?r.push(e):t.set(s,[e])});let s=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new u.QueryObserver(this.#e,r);s.push({defaultedQueryOptions:r,observer:i})}),s}#c(e,t){let s=this.#i.indexOf(e);-1!==s&&(this.#t=this.#t.slice(),this.#t[s]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#n,s=e?t:this.#p(this.#m(this.#t,this.#d),this.#r?.combine);(e||t!==s)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},m=e.i(66027),f=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.message.queryOptions(void 0===e?s.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.ship.queryOptions(void 0===e?s.skipToken:{shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let d=(0,g.useTRPC)(),h=function({queries:e,...t}){let d=(0,r.useQueryClient)(void 0),h=(0,i.useIsRestoring)(),m=(0,n.useQueryErrorResetBoundary)(),f=!1!==t.subscribed,g=l.useMemo(()=>e.map(e=>{let t=d.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":f?"optimistic":void 0,t}),[e,d,h,f]);g.forEach(e=>{(0,o.ensureSuspenseTimers)(e);let t=d.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,m,t)}),(0,a.useClearResetErrorBoundary)(m);let[x]=l.useState(()=>new p(d,g,t)),[y,b,v]=x.getOptimisticResult(g,t.combine),j=!h&&f;l.useSyncExternalStore(l.useCallback(e=>j?x.subscribe(c.notifyManager.batchCalls(e)):s.noop,[x,j]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),l.useEffect(()=>{x.setQueries(g,t)},[g,t,x]);let w=y.some((e,t)=>(0,o.shouldSuspend)(g[t],e))?y.flatMap((e,t)=>{let s=g[t];if(s&&(0,o.shouldSuspend)(s,e)){let e=new u.QueryObserver(d,s);return(0,o.fetchOptimistic)(s,e,m)}return[]}):[];if(w.length>0)throw Promise.all(w);let C=y.find((e,t)=>{let s=g[t];return s&&(0,a.getHasError)({result:e,errorResetBoundary:m,throwOnError:s.throwOnError,query:d.getQueryCache().get(s.queryHash),suspense:s.suspense})});if(C)throw C.error;return b(v())}({queries:e.flatMap(e=>{let s=(0,t.idSchema)("ship").safeParse(e);return s.success?[s.data]:[]}).map(e=>d.fleet.ship.queryOptions({shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))}),m=new Map;for(let e of h)e.data&&m.set(e.data.id,e.data);return m}],53573)},84156,e=>{"use strict";e.s(["isUnclaimedPromptOut",0,function(e){return null!==e.startingPrompt&&!e.startingPrompt.isClaimed}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62219,e=>{"use strict";var t=e.i(43476),s=e.i(80799),a=e.i(22016),n=e.i(18566),i=e.i(71645),r=e.i(15905),l=e.i(44824),o=e.i(45608),d=e.i(95475),c=e.i(2767),u=e.i(52886),m=e.i(66787),h=e.i(92870),p=e.i(90063);let x={ok:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg"};function f({label:e,shortLabel:s,value:n,detail:i,href:r,icon:l,tone:o,testId:d}){return(0,t.jsxs)(a.default,{href:r,"data-testid":d,className:"flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-card px-4.5 py-4 shadow-sm transition-colors duration-(--duration-fast) hover:bg-accent max-sm:gap-1.5 max-sm:rounded-xl max-sm:px-3.5 max-sm:py-3",children:[(0,t.jsxs)("span",{className:"flex items-center justify-between gap-2 text-meta font-medium text-muted-foreground",children:[(0,t.jsx)("span",{className:"max-sm:hidden",children:e}),(0,t.jsx)("span",{className:"sm:hidden",children:s??e}),(0,t.jsx)("span",{className:(0,p.classNames)("flex size-6.5 shrink-0 items-center justify-center rounded-md border max-sm:size-5.5",x[o]),children:(0,t.jsx)(l,{"aria-hidden":!0,className:"size-3.5"})})]}),(0,t.jsx)("span",{className:"text-[28px] leading-none font-semibold tracking-tight tabular-nums text-foreground max-sm:text-2xl",children:n}),(0,t.jsx)("span",{className:"truncate text-meta text-muted-foreground",children:i})]})}var g=e.i(5387),v=e.i(28459),j=e.i(96676),b=e.i(49635);function w(e){return e.filter(e=>"agent"===e.kind&&"retired"!==e.status)}function y(){var e;let s,a,n,i,r=(0,g.useFleetSnapshot)(),l=(0,v.useNeedsAttention)(),o=(0,v.useAttentionCount)(),d=(0,j.useNow)();if(!r.data)return null;let c=(n=(a=(s=w((e={ships:r.data,undeliverable:l.data??[],now:d}).ships)).filter(e=>"awaitingCrew"===e.status)).flatMap(e=>null===e.awaitingCrewSince?[]:[{name:e.name,since:new Date(e.awaitingCrewSince)}]).sort((e,t)=>e.since.getTime()-t.since.getTime())[0],i=e.undeliverable.map(e=>new Date(e.since)).sort((e,t)=>e.getTime()-t.getTime())[0],{activeCount:s.length,crewedCount:s.filter(e=>"crewed"===e.status).length,awaitingCount:a.length,longestWait:n&&{name:n.name,wait:(0,b.duration)(n.since,e.now)},oldestUndeliverable:i&&(0,b.duration)(i,e.now)});return 0===c.activeCount?null:(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 max-sm:grid-cols-2 max-sm:gap-2.5","data-testid":"overview-metrics",children:[(0,t.jsx)(f,{label:"Ships crewed",shortLabel:"Crewed",value:c.crewedCount,detail:`of ${String(c.activeCount)} active ships`,href:"/?status=crewed",icon:h.UserCheck,tone:"ok",testId:"overview-crewed"}),(0,t.jsx)(f,{label:"Awaiting crew",value:c.awaitingCount,detail:c.longestWait?`Longest wait: ${c.longestWait.name}, ${c.longestWait.wait}`:"Every active ship is crewed",href:"/?status=awaitingCrew",icon:u.CircleDashed,tone:"waiting",testId:"overview-awaiting"}),(0,t.jsx)(f,{label:"Needs attention",value:o??0,detail:c.oldestUndeliverable?`Undeliverable deliveries, oldest ${c.oldestUndeliverable}`:"Nothing needs you",href:"/needs-attention",icon:m.TriangleAlert,tone:"attention",testId:"overview-attention"})]})}var S=e.i(77071),C=e.i(10649),N=e.i(78608),k=e.i(41880),R=e.i(49092),T=e.i(87600),P=e.i(16752),I=e.i(86165),O=e.i(48695),q=e.i(265);e.i(31627);var E=e.i(73332),A=e.i(44827),M=e.i(85595),L=e.i(16984),z=e.i(9677),D=e.i(65160),V=e.i(33173),H=e.i(22212),$=e.i(94945),F=e.i(12470),B=e.i(91727),U=e.i(75867),_=e.i(43988),W=e.i(75774),K=e.i(17981),X=e.i(77435);let Y={"fleet:read":"Read the fleet","fleet:manage":"Manage the fleet","crew:assign":"Assign crews","crew:run":"Run crews","labels:define":"Define labels","labels:assign":"Assign labels"};function G({activeShips:e,isPending:a,error:n,shipLimit:l,accountUrl:o,crewRequest:d,onSubmit:c}){let u=(0,i.useId)(),m=(0,i.useId)(),h=(0,i.useId)(),x=(0,i.useId)(),f=(0,i.useId)(),g=(0,i.useId)(),[v,j]=(0,i.useState)(""),[b,w]=(0,i.useState)(""),[y,S]=(0,i.useState)(""),[N,k]=(0,i.useState)([]),[R,T]=(0,i.useState)(void 0!==d),[I,O]=(0,i.useState)(()=>(0,C.defaultValues)(d?.offers??[])),q=I.machineLabels.length>0&&d?.machineLabels?.matchOf(I.machineLabels).matching.length===0,$=(0,C.settingsOf)(I),Q=d?.check?.kind==="refused"?d.check:void 0,J=!R||void 0===d||void 0!==$&&void 0===Q&&(0,C.promptBytes)(I.firstPrompt)<=z.FIRST_PROMPT_MAX_BYTES,Z=(0,D.checkShipName)(v,{activeNames:e.map(e=>e.name)}),ee="invalid"===Z.kind||"reserved"===Z.kind||"taken"===Z.kind,et=b.trim(),es=A.shipHandleSchema.safeParse(et).success,ea=""!==et&&!es,en=[...new Set(e.map(e=>e.type))].sort(),ei="available"===Z.kind&&es&&void 0===l&&J,er=void 0!==d&&R;return(0,t.jsxs)("form",{noValidate:!0,"data-testid":"commission-form",className:"contents",onSubmit:e=>{e.preventDefault(),ei&&c({name:v,type:et,...""===y.trim()?{}:{note:y},...0===N.length?{}:{fleetScopes:[...N]}},R?void 0===d?{settings:{}}:void 0===$?void 0:{settings:$}:void 0)},children:[(0,t.jsxs)(H.DialogHeader,{children:[(0,t.jsx)(H.DialogTitle,{children:"Commission a ship"}),(0,t.jsx)(H.DialogDescription,{children:er?"A durable identity with its own inbox, and a crew request so it gets a session right away.":"A ship is a durable agent identity with its own inbox. Next, you get the starting prompt."})]}),void 0===l?null:(0,t.jsx)(X.LimitNotice,{...(0,P.shipLimitNotice)(l),accountUrl:o,testId:"commission-ship-limit"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(B.Label,{htmlFor:u,children:"Name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[v.length," / ",A.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(F.Input,{id:u,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"e.g. reviewer-02","data-testid":"commission-name","aria-invalid":!!ee||void 0,"aria-describedby":m,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:v,onChange:e=>{j((0,D.asHandle)(e.target.value))}}),"available"===Z.kind?(0,t.jsx)(M.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):ee?(0,t.jsx)(L.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,t.jsx)("p",{id:m,"aria-live":"polite",className:(0,p.classNames)("text-meta",ee?"text-destructive-text":"text-muted-foreground"),children:Z.message})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(B.Label,{htmlFor:h,children:"Type"}),(0,t.jsx)(V.Combobox,{id:h,options:en.map(e=>({value:e,label:e})),value:""===b?null:b,onValueChange:e=>{w(e??"")},isFreeText:!0,toQuery:D.asHandle,leadingIcon:(0,t.jsx)(s.Tag,{}),placeholder:"e.g. reviewer",isInvalid:ea,"aria-describedby":x,"data-testid":"commission-type"}),(0,t.jsx)("p",{id:x,className:(0,p.classNames)("text-meta",ea?"text-destructive-text":"text-muted-foreground"),children:ea?`Use 1 to ${String(A.SHIP_HANDLE_MAX_LENGTH)} lowercase letters, digits, hyphens or colons.`:(0,D.typeHint)(b,e.filter(e=>e.type===et).length)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(B.Label,{htmlFor:f,children:"Note (optional)"}),(0,t.jsx)(_.Textarea,{id:f,rows:2,"data-testid":"commission-note",value:y,onChange:e=>{S(e.target.value)}})]}),(0,t.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,t.jsx)("legend",{className:"mb-1.5 text-body font-medium text-foreground",children:"Fleet access"}),E.FLEET_SCOPES.map(e=>(0,t.jsxs)("label",{className:"flex items-center justify-between gap-3 text-body text-foreground",children:[(0,t.jsxs)("span",{children:[Y[e]," ",(0,t.jsx)("span",{className:"font-mono text-id text-muted-foreground",children:e})]}),(0,t.jsx)(U.Switch,{checked:N.includes(e),onCheckedChange:t=>{k(s=>t?[...s,e]:s.filter(t=>t!==e))},"data-testid":`commission-${e.replace(":","-")}`})]},e)),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Every ship sends and receives. Fleet access lets its session act as the console does; crew ships lets a trierarch start their sessions. It cannot be changed later."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border pt-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(B.Label,{htmlFor:g,children:"Request a crew"}),(0,t.jsx)(U.Switch,{id:g,checked:R,onCheckedChange:T,"data-testid":"commission-request-crew"})]}),(0,t.jsx)("p",{className:"-mt-2 text-meta text-muted-foreground",children:void 0===d?`Puts ${""===v?"the ship":v} on your Needs crew list until you crew it by hand. You get its starting prompt next either way.`:"The trierarch plugin picks a trierarch that starts the session and keeps it crewed."}),er?(0,t.jsx)(W.CrewSettingsFields,{offers:d.offers,values:I,onChange:e=>{O(e),d.onSettingsChange((0,C.settingsOf)(e))},squadrons:d.squadrons,refusal:Q,isDisabled:a,...void 0===d.machineLabels?{}:{machineLabels:{...d.machineLabels,shipName:""===v.trim()?"this ship":v.trim()}}}):null]}),void 0===n?null:(0,t.jsx)(K.InlineError,{title:"Not commissioned",description:n}),(0,t.jsxs)(H.DialogFooter,{className:"items-center",children:[void 0===d?null:(0,t.jsx)("span",{className:"mr-auto text-meta text-muted-foreground","data-testid":"commission-crew-note",children:R?q?"The request will wait for a machine with these labels.":d.check?.kind==="noRoom"?"The request will wait for room.":"Uncheck Request a crew to get the starting prompt instead.":null}),(0,t.jsx)(H.DialogClose,{render:(0,t.jsx)(r.Button,{type:"button",disabled:a}),children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",variant:"primary",isLoading:a,disabled:!ei,"data-testid":"commission-submit",children:a?"Commissioning":er?"Commission and request crew":"Commission ship"})]})]})}function Q(e){let{isOpen:s,onOpenChange:a,isPending:n}=e;return(0,t.jsx)(H.Dialog,{open:s,onOpenChange:e=>{n||a(e)},children:(0,t.jsx)(H.DialogContent,{size:"md","data-testid":"commission-dialog",className:$.dialogSurface.phoneFullScreen,children:(0,t.jsx)(G,{...e})})})}var J=e.i(82532);function Z({isOpen:e,onOpenChange:s}){let a=(0,g.useFleetSnapshot)(),n=(0,R.useFleetLimits)(),l=(0,T.useHostedAccountUrl)(),o=(0,g.useCommissionShip)(),d=(0,g.useRequestCrew)(),c="connected"===(0,q.useTrierarchPluginConnection)(),u=(0,q.useMachines)(),m=(0,I.useSquadronsConnection)(),h=(0,O.useSquadrons)(),[p,x]=(0,i.useState)(!1),[f,v]=(0,i.useState)(null),j=(0,C.offersOf)(u.data??[]),b=(0,g.useLabelContext)(),w=void 0===b||void 0===u.data?void 0:(0,N.machineLabelsInputOf)(b,u.data),y=(0,q.useCrewSettingsCheck)(e&&c?null===f?(0,C.settingsOf)((0,C.defaultValues)(j)):f:void 0),E=(a.data??[]).filter(e=>"retired"!==e.status),A=(e,t)=>{o.mutate(e,{onSuccess:({shipId:a})=>{s(!1);let n=c&&void 0!==t;n||x(!0),void 0!==t&&d.mutate({shipId:a,settings:t.settings},{onSuccess:()=>{n&&(0,k.showToast)({title:`${e.name} commissioned, crew requested`,description:"The trierarch plugin assigns a trierarch that fits.",tone:"success"})},onError:t=>{(0,k.showToast)({title:`Couldn’t request a crew for ${e.name}`,description:`${t.message} The ship is commissioned; request a crew on its page.`,tone:"error"})}})}})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"primary",icon:(0,t.jsx)(S.Plus,{}),"data-testid":"fleet-commission",onClick:()=>{o.reset(),v(null),s(!0)},children:"Commission ship"}),(0,t.jsx)(Q,{activeShips:E,isOpen:e,onOpenChange:s,isPending:o.isPending,error:o.error?.message,shipLimit:(0,P.shipLimitReached)(n.data),accountUrl:l,...c?{crewRequest:{offers:j,squadrons:"connected"===m?(h.data??[]).filter(e=>"disbanded"!==e.state).map(e=>e.id):void 0,...void 0===w?{}:{machineLabels:w},check:y.data,onSettingsChange:v}}:{},onSubmit:(e,t)=>{let s={...e,idempotencyKey:crypto.randomUUID()};c&&void 0!==t?y.checkNow().catch(()=>void 0).then(e=>{e?.kind!=="refused"&&A(s,t)}).catch(()=>void 0):A(s,t)}}),(0,t.jsx)(J.StartingPromptDialog,{shipName:o.variables?.name??"",state:"shown",prompt:o.data?.prompt??void 0,crewLines:o.data?.crewLines??void 0,isOpen:p&&void 0!==o.data,onOpenChange:e=>{e||(x(!1),o.reset())},onConfirm:()=>void 0})]})}var ee=e.i(56420);let et={name:"infinity",size:24,node:[["path",{d:"M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8",key:"18ogeb"}]]};et.node;let es=(0,ee.default)(et);var ea=e.i(30274),en=e.i(49287),ei=e.i(78865);let er={ships:{label:"Ships",unit:"ships",Icon:en.Ship},messages:{label:"Messages today",unit:"messages",Icon:ea.Send}},el={below:"bg-primary",at:"bg-tone-waiting-fg",over:"bg-tone-attention-fg"},eo={at:"at-limit",over:"over-limit"};function ed({kind:e,count:s,limit:a,resetsAt:n}){let{label:i,unit:r,Icon:l}=er[e],o=(0,P.meterState)({count:s,limit:a}),d=eo[o],c=(0,P.meterCaption)({count:s,limit:a}),u=null===a?0:0===a?1:Math.min(s/a,1);return(0,t.jsxs)("div",{"data-testid":`limit-meter-${e}`,"data-state":o,className:"flex flex-col gap-2 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta font-medium text-muted-foreground",children:[(0,t.jsx)(l,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),i]}),void 0===d?null:(0,t.jsx)(ei.StatusBadge,{status:d})]}),(0,t.jsxs)("p",{className:"flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"text-metric font-semibold tabular-nums",children:(0,P.meterCount)(s)}),(0,t.jsx)("span",{className:"text-body text-muted-foreground",children:null===a?r:`of ${(0,P.meterCount)(a)} ${r}`})]}),null===a?(0,t.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(es,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),"No limit"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{role:"meter","aria-label":`${i}: ${String(s)} of ${String(a)}`,"aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":a,className:"block h-1.5 overflow-hidden rounded-full bg-secondary",children:(0,t.jsx)("span",{className:(0,p.classNames)("block h-full rounded-full","none"===o?void 0:el[o]),style:{width:`${String(100*u)}%`}})}),(0,t.jsxs)("p",{"data-testid":`limit-meter-${e}-caption`,className:"text-caption text-muted-foreground",children:[c,void 0===n?null:` \xb7 resets at ${(0,P.resetTime)(n)}`]})]})]})}function ec(){let e=(0,R.useFleetLimits)().data,s=(0,T.useHostedAccountUrl)();return(0,P.hasLimits)(e)?(0,t.jsxs)("section",{"aria-labelledby":"overview-limits-title","data-testid":"overview-limits",className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("h2",{id:"overview-limits-title",className:"text-body font-semibold",children:"Limits"}),void 0===s?null:(0,t.jsx)("a",{href:s,"data-testid":"overview-limits-view",className:"text-meta font-medium text-primary underline underline-offset-2",children:"View limits"})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsx)(ed,{kind:"ships",count:e.ships.count,limit:e.ships.limit}),(0,t.jsx)(ed,{kind:"messages",count:e.dailyMessages.count,limit:e.dailyMessages.limit,resetsAt:e.dailyMessages.resetsAt})]})]}):null}var eu=e.i(84294);let em={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};em.node;let eh=(0,ee.default)(em);var ep=e.i(31458),ex=e.i(58925),ef=e.i(66595);let eg={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};eg.node;let ev=(0,ee.default)(eg);var ej=e.i(26478),eb=e.i(83615),ew=e.i(54492),ey=e.i(80581),eS=e.i(49841);let eC={query:"",filters:{status:"all",crewRequest:"all",type:"all",squadron:"all",isRetiredShown:!1,labelValueIds:[]}},eN="status",ek="crew",eR="type",eT="squadron",eP="retired",eI="label";function eO(e,t){return[...new Set(e.filter(e=>t||"retired"!==e.status).map(e=>e.type))].toSorted((e,t)=>e.localeCompare(t))}function eq(e){return e.filter(e=>"retired"===e.status).length}function eE(e){return[...new Set([...e.values()].map(e=>e.squadronId))].toSorted((e,t)=>e.localeCompare(t))}let eA={crewed:"Crewed",awaitingCrew:"Awaiting crew"};function eM(e){return eL(e).length+e.labelValueIds.length}function eL(e){return["all"===e.status?void 0:`Status: ${eA[e.status]}`,"all"===e.crewRequest?void 0:`Crew request: ${(0,eS.crewRequestKeyWord)(e.crewRequest)}`,"all"===e.type?void 0:`Type: ${e.type}`,"all"===e.squadron?void 0:`Squadron: ${e.squadron}`,e.isRetiredShown?"Retired shown":void 0].filter(e=>void 0!==e)}var ez=e.i(66390),eD=e.i(46033),eV=e.i(75305),eH=e.i(14732),e$=e.i(67874),eF=e.i(95960);function eB({chips:e,width:s,testId:a}){if(0===e.length)return null;let{shown:n,folded:i}=(0,ey.rowChips)(e,s);return(0,t.jsxs)("span",{"data-testid":a,className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[n.map((e,s)=>(0,t.jsx)(eF.LabelChip,{chip:e,className:0===s?"min-w-0 shrink":void 0},e.valueId)),0===i.length?null:(0,t.jsxs)("span",{title:i.map(e=>`${e.key}=${e.value}`).join(", "),className:"inline-flex h-5.5 shrink-0 items-center rounded-sm bg-secondary px-1.5 text-caption font-medium text-foreground tabular-nums",children:["+",i.length,(0,t.jsx)("span",{className:"sr-only",children:" more labels"})]})]})}var eU=e.i(88393);let e_={name:"signal",size:24,node:[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]]};e_.node;let eW=(0,ee.default)(e_),eK={name:"signal-low",size:24,node:[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}]]};eK.node;let eX=(0,ee.default)(eK),eY={name:"signal-medium",size:24,node:[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}]]};eY.node;let eG=(0,ee.default)(eY);e.s([],51047),e.i(51047);var eQ=e.i(96499),eJ=e.i(56789),eZ=e.i(46376),e0=e.i(33332);let e1=i.createContext(void 0);function e2(e){let t=i.useContext(e1);if(void 0===t&&!e)throw Error((0,e0.default)(72));return t}var e5=e.i(74735),e4=e.i(67865),e6=e.i(29315),e7=e.i(84446),e8=e.i(57940);function e3(e){return null!=e&&null!=e.clientX}var e9=e.i(17989),te=e.i(75606),tt=e.i(64111),ts=e.i(76782),ta=e.i(26352),tn=e.i(56434),ti=e.i(18478),tr=e.i(16786),tl=e.i(90627);let to={...tr.popupStoreSelectors,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class td extends ta.ReactStore{constructor(e,t,s){const a=new tl.PopupTriggerMap;super(tc(e,a,t,s),tu(a),to)}setOpen=(e,t)=>{(0,tt.applyPopupOpenChange)(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,(0,te.createChangeEventDetails)(tn.REASONS.triggerPress,e))}}function tc(e,t,s,a=!1){return{...(0,tr.createInitialPopupStoreState)(t,s,a),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function tu(e){return{popupRef:i.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}let tm=(0,eQ.fastComponent)(function(e){let{disabled:s=!1,defaultOpen:a=!1,open:n,disableHoverablePopup:r=!1,trackCursorAxis:l="none",actionsRef:o,onOpenChange:d,onOpenChangeComplete:c,handle:u,triggerId:m,defaultTriggerId:h=null,children:p}=e,x=(0,tt.usePopupRootStore)((e,t)=>new td({open:a,openProp:n,activeTriggerId:h,triggerIdProp:m},e,t));x.useControlledProp("openProp",n),x.useControlledProp("triggerIdProp",m),x.useContextCallback("onOpenChange",d),x.useContextCallback("onOpenChangeComplete",c);let f=x.useState("open"),g=!s&&f,v=x.useState("activeTriggerId"),j=x.useState("mounted"),b=x.useState("payload");x.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:r,disabled:s}),(0,tt.useImplicitActiveTrigger)(x,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:w,transitionStatus:y}=(0,tt.useOpenStateTransitions)(g,x),S=x.useState("isInstantPhase"),C=x.useState("instantType"),N=x.useState("lastOpenChangeReason"),k=i.useRef(null);(0,eZ.useIsoLayoutEffect)(()=>{f&&s&&x.setOpen(!1,(0,te.createChangeEventDetails)(tn.REASONS.disabled))},[f,s,x]),(0,eZ.useIsoLayoutEffect)(()=>{"ending"===y&&N===tn.REASONS.none||"ending"!==y&&S?("delay"!==C&&(k.current=C),x.set("instantType","delay")):null!==k.current&&(x.set("instantType",k.current),k.current=null)},[y,S,N,C,x]),(0,eZ.useIsoLayoutEffect)(()=>{g&&null==v&&x.set("payload",void 0)},[x,v,g]),i.useImperativeHandle(o,()=>({unmount:w,close:()=>x.setOpen(!1,(0,te.createChangeEventDetails)(tn.REASONS.imperativeAction))}),[w,x]);let R=g||j||!s&&"none"!==l;return(0,t.jsxs)(e1.Provider,{value:x,children:[u&&(0,t.jsx)(tt.PopupHandleAttachment,{handle:u,store:x}),R&&(0,t.jsx)(th,{store:x,disabled:s,trackCursorAxis:l}),"function"==typeof p?p({payload:b}):p]})});function th({store:e,disabled:t,trackCursorAxis:s}){let a=e.useState("floatingRootContext"),n=(0,e9.useDismiss)(a,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),r=function(e,t={}){let{enabled:s=!0,axis:a="both"}=t,n="rootStore"in e?e.rootStore:e,r=n.useState("open"),l=n.useState("floatingElement"),o=n.useState("domReferenceElement"),d=n.context.dataRef,c=i.useRef(!1),u=i.useRef(null),[m,h]=i.useState(),[p,x]=i.useState([]),f=(0,e4.useStableCallback)(e=>{n.set("positionReference",e)}),g=(0,e4.useStableCallback)((e,t,s)=>{if(!c.current&&(!d.current.openEvent||e3(d.current.openEvent))){var i,r;let l,c,u;n.set("positionReference",(i=s??o,r={x:e,y:t,axis:a,dataRef:d,pointerType:m},l=null,c=null,u=!1,{contextElement:i||void 0,getBoundingClientRect(){let e=i?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===r.axis||"both"===r.axis,s="y"===r.axis||"both"===r.axis,a=["mouseenter","mousemove"].includes(r.dataRef.current.openEvent?.type||"")&&"touch"!==r.pointerType,n=e.width,o=e.height,d=e.x,m=e.y;return null==l&&r.x&&t&&(l=e.x-r.x),null==c&&r.y&&s&&(c=e.y-r.y),d-=l||0,m-=c||0,n=0,o=0,!u||a?(n="y"===r.axis?e.width:0,o="x"===r.axis?e.height:0,d=t&&null!=r.x?r.x:d,m=s&&null!=r.y?r.y:m):u&&!a&&(o="x"===r.axis?e.height:o,n="y"===r.axis?e.width:n),u=!0,{width:n,height:o,x:d,y:m,top:m,right:d+n,bottom:m+o,left:d}}}))}}),v=(0,e4.useStableCallback)(e=>{r?u.current||(g(e.clientX,e.clientY,e.currentTarget),x([])):g(e.clientX,e.clientY,e.currentTarget)}),j=(0,e8.isMouseLikePointerType)(m)?l:r;i.useEffect(()=>{if(!s)return void f(o);if(!j)return;function e(){u.current?.(),u.current=null}let t=(0,e6.getWindow)(l);return!d.current.openEvent||e3(d.current.openEvent)?u.current=(0,e5.addEventListener)(t,"mousemove",function(t){let s=(0,e7.getTarget)(t);(0,e7.contains)(l,s)?e():g(t.clientX,t.clientY)}):f(o),e},[j,s,l,d,o,n,g,f,p]),i.useEffect(()=>()=>{n.set("positionReference",null)},[n]),i.useEffect(()=>{s&&!l&&(c.current=!1)},[s,l]),i.useEffect(()=>{!s&&r&&(c.current=!0)},[s,r]);let b=i.useMemo(()=>{function e(e){h(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return i.useMemo(()=>s?{reference:b,trigger:b}:{},[s,b])}(a,{enabled:!t&&"none"!==s,axis:"none"===s?void 0:s}),l=i.useMemo(()=>(0,ts.mergeProps)(r.reference,n.reference),[r.reference,n.reference]);return(0,tt.usePopupInteractionProps)(e,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:n.floating??eJ.EMPTY_OBJECT}),null}var tp=e.i(39957),tx=e.i(46265),tf=e.i(79938),tg=e.i(52245),tv=e.i(59636),tj=e.i(88015);let tb=i.createContext(void 0);var tw=e.i(50316),ty=e.i(44681);let tS=i.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new tp.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});function tC(e){let{children:s,delay:a,timeoutMs:n=0}=e,r=i.useRef(a),l=i.useRef(a),o=i.useRef(null),d=i.useRef(null),c=(0,tp.useTimeout)();return(0,eZ.useIsoLayoutEffect)(()=>{if(l.current=a,!o.current){r.current=a;return}r.current={open:(0,ty.getDelay)(r.current,"open"),close:(0,ty.getDelay)(a,"close")}},[a,o,r,l]),(0,t.jsx)(tS.Provider,{value:i.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:l,currentIdRef:o,timeoutMs:n,currentContextRef:d,timeout:c}),[n,c]),children:s})}var tN=e.i(13082),tk=e.i(72135),tR=e.i(73752),tT=e.i(22846);let tP="data-base-ui-tooltip-trigger";function tI(e){if("composedPath"in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let s=t[e];if((0,e6.isElement)(s))return s}}let t=e.target;return(0,e6.isElement)(t)?t:null}let tO=(0,eQ.fastComponentRef)(function(e,t){let{render:s,className:a,style:n,handle:r,payload:l,disabled:o,delay:d,closeOnClick:c=!0,closeDelay:u,id:m,...h}=e,p=e2(!0),x=(0,tv.usePopupHandleStore)(r)??p;if(!x)throw Error((0,e0.default)(82));let f=(0,tj.useBaseUiId)(m),g=x.useState("isTriggerActive",f),v=x.useState("isOpenedByTrigger",f),j=x.useState("floatingRootContext"),b=i.useRef(null),w=u??0,{registerTrigger:y,isMountedByThisTrigger:S}=(0,tt.useTriggerDataForwarding)(f,b,x,{payload:l,closeOnClick:c,closeDelay:w}),C=i.useContext(tb),{activeIdRef:N,delayRef:k,isInstantPhase:R,hasProvider:T}=function(e,t={open:!1}){let{open:s}=t,a="rootStore"in e?e.rootStore:e,n=a.useState("floatingId"),{currentIdRef:r,delayRef:l,timeoutMs:o,initialDelayRef:d,currentContextRef:c,hasProvider:u,timeout:m}=i.useContext(tS),[h,p]=i.useState(!1),x=i.useRef(s);return(0,eZ.useIsoLayoutEffect)(()=>{x.current=s},[s]),(0,eZ.useIsoLayoutEffect)(()=>{function e(){c.current?.setIsInstantPhase(!1),r.current=null,c.current=null,l.current=d.current,m.clear()}if(r.current&&!s&&r.current===n){if(p(!1),o)return m.start(o,()=>{a.select("open")||r.current&&r.current!==n||e()}),()=>{(x.current||r.current!==n)&&m.clear()};e()}},[s,n,r,l,o,d,c,m,a]),(0,eZ.useIsoLayoutEffect)(()=>{if(!s)return;let e=c.current,t=r.current;m.clear(),c.current={onOpenChange:a.setOpen,setIsInstantPhase:p},r.current=n,l.current={open:0,close:(0,ty.getDelay)(d.current,"close")},null!==t&&t!==n?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,te.createChangeEventDetails)(tn.REASONS.none))):(p(!1),e?.setIsInstantPhase(!1))},[s,n,a,r,l,d,c,m]),(0,eZ.useIsoLayoutEffect)(()=>()=>{r.current===n&&(c.current=null,x.current)&&(r.current=null,l.current=d.current,m.clear())},[c,r,l,n,d,m]),i.useMemo(()=>({activeIdRef:r,hasProvider:u,delayRef:l,isInstantPhase:h}),[r,u,l,h])}(j,{open:v}),P=(0,tR.useHoverInteractionSharedState)(j);x.useSyncedValue("isInstantPhase",R);let I=x.useState("disabled"),O=o??I,q=(0,tx.useValueAsRef)(O),E=x.useState("trackCursorAxis"),A=x.useState("disableHoverablePopup"),M=i.useRef(!1),L=(0,tp.useTimeout)(),z=i.useRef(void 0);function D(){return T&&null!=N.current?0:d??C??600}function V(e){let t=b.current;if(!t||!e)return!1;let s=function(e){let t=e;for(;t;){let e=t.closest(`[${tP}]`);if(e)return e;let s=t.getRootNode();t="host"in s&&(0,e6.isElement)(s.host)?s.host:null}return null}(e);return null!==s&&s!==t&&(0,e7.contains)(t,s)}let H=(0,tk.useHoverReferenceInteraction)(j,{enabled:!O,mouseOnly:!0,move:!1,handleClose:A||"both"===E?null:(0,tw.safePolygon)(),restMs:D,delay:()=>null==u&&T?{close:(0,ty.getDelay)(k.current,"close")}:{close:w},triggerElementRef:b,isActiveTrigger:g,isClosing:()=>"ending"===x.select("transitionStatus"),shouldOpen:()=>!M.current}),$=(0,tN.useFocus)(j,{enabled:!O}).reference,F=x.useState("triggerProps",S),B=S||"none"!==E;return(0,tg.useRenderElement)("button",e,{state:{open:v},ref:[t,y,b],props:[H,$,B?F:void 0,{onMouseOver(e){(e=>{let t,s=M.current,a=tI(e),n=(M.current=t=V(a),t&&(P.openChangeTimeout.clear(),P.restTimeout.clear(),P.restTimeoutPending=!1,L.clear()),t),i=b.current,r=i&&a&&(0,e7.contains)(i,a);if(n&&x.select("open")&&x.select("lastOpenChangeReason")===tn.REASONS.triggerHover)return x.setOpen(!1,(0,te.createChangeEventDetails)(tn.REASONS.triggerHover,e));if(s&&!n&&r&&!q.current&&!x.select("open")&&i&&(0,e8.isMouseLikePointerType)(z.current)){let t=()=>{M.current||q.current||x.select("open")||x.setOpen(!0,(0,te.createChangeEventDetails)(tn.REASONS.triggerHover,e,i))},s=D();0===s?(L.clear(),t()):L.start(s,t)}})(e.nativeEvent)},onFocus(e){V(tI(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){M.current=!1,L.clear(),z.current=void 0},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,x.set("closeOnClick",c),c&&!x.select("open")&&x.cancelPendingOpen(e.nativeEvent)},onClick(e){c&&!x.select("open")&&x.cancelPendingOpen(e.nativeEvent)},id:f,[tT.triggerDisabled]:O?"":void 0,[tP]:O?void 0:""},h],stateAttributesMapping:tf.triggerOpenStateMapping})}),tq=i.createContext(void 0);var tE=e.i(74080),tA=e.i(26674);let tM=i.forwardRef(function(e,s){let{children:a,container:n,className:r,render:l,style:o,...d}=e,{node:c,subtree:u}=(0,tA.useFloatingPortalNode)({container:n,ref:s,componentProps:e,elementProps:d});return u||c?(0,t.jsxs)(i.Fragment,{children:[u,c&&tE.createPortal(a,c)]}):null}),tL=i.forwardRef(function(e,s){let{keepMounted:a=!1,...n}=e;return e2().useState("mounted")||a?(0,t.jsx)(tq.Provider,{value:a,children:(0,t.jsx)(tM,{ref:s,...n})}):null}),tz=i.createContext(void 0);function tD(){let e=i.useContext(tz);if(void 0===e)throw Error((0,e0.default)(71));return e}var tV=e.i(23706),tH=e.i(38396),t$=e.i(89579);let tF=i.forwardRef(function(e,s){let{render:a,className:n,anchor:r,positionMethod:l="absolute",side:o="top",align:d="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:m="clipping-ancestors",collisionPadding:h=5,arrowPadding:p=5,sticky:x=!1,disableAnchorTracking:f=!1,collisionAvoidance:g=tH.POPUP_COLLISION_AVOIDANCE,style:v,...j}=e,b=e2(),w=function(){let e=i.useContext(tq);if(void 0===e)throw Error((0,e0.default)(70));return e}(),y=b.useState("open"),S=b.useState("mounted"),C=b.useState("trackCursorAxis"),N=b.useState("disableHoverablePopup"),k=b.useState("floatingRootContext"),R=b.useState("instantType"),T=b.useState("transitionStatus"),P=b.useState("adaptiveOrigin"),I=(0,tV.useAnchorPositioning)({anchor:r,positionMethod:l,floatingRootContext:k,mounted:S,side:o,sideOffset:c,align:d,alignOffset:u,collisionBoundary:m,collisionPadding:h,sticky:x,arrowPadding:p,disableAnchorTracking:f,keepMounted:w,collisionAvoidance:g,adaptiveOrigin:P}),O=i.useMemo(()=>({open:y,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:"none"!==C?"tracking-cursor":R}),[y,I.side,I.align,I.anchorHidden,C,R]),q=(0,t$.usePositioner)(e,O,{styles:I.positionerStyles,transitionStatus:T,props:j,refs:[s,b.useStateSetter("positionerElement")],hidden:!S,inert:!y||"both"===C||N});return(0,t.jsx)(tz.Provider,{value:I,children:q})});var tB=e.i(37584),tU=e.i(53984),t_=e.i(31157);let tW=i.forwardRef(function(e,t){let{render:s,className:a,style:n,...i}=e,r=e2(),{side:l,align:o}=tD(),d=r.useState("open"),c=r.useState("instantType"),u=r.useState("transitionStatus"),m=r.useState("popupProps"),h=r.useState("floatingRootContext"),p=r.useState("disabled"),x=r.useState("closeDelay");(0,tB.useOpenChangeComplete)({open:d,ref:r.context.popupRef,onComplete(){d&&r.context.onOpenChangeComplete?.(!0)}}),(0,t_.useHoverFloatingInteraction)(h,{enabled:!p,closeDelay:x});let f=r.useStateSetter("popupElement");return(0,tg.useRenderElement)("div",e,{state:{open:d,side:l,align:o,instant:c,transitionStatus:u},ref:[t,r.context.popupRef,f],props:[tt.FOCUSABLE_POPUP_PROPS,m,(0,tU.getDisabledMountTransitionStyles)(u),i],stateAttributesMapping:tf.popupTransitionStateMapping})}),tK=i.forwardRef(function(e,t){let{render:s,className:a,style:n,...i}=e,r=e2(),{arrowRef:l,side:o,align:d,arrowUncentered:c,arrowStyles:u}=tD(),m=r.useState("open"),h=r.useState("instantType");return(0,tg.useRenderElement)("div",e,{state:{open:m,side:o,align:d,uncentered:c,instant:h},ref:[t,l],props:[{style:u,"aria-hidden":!0},i],stateAttributesMapping:tf.popupStateMapping})});var tX=e.i(18390);let tY=i.forwardRef(function(e,t){let{render:s,className:a,style:n,children:i,...r}=e,l=e2(),o=tD(),d=l.useState("instantType"),{children:c,state:u}=(0,tX.usePopupViewport)({store:l,side:o.side,children:i}),m={activationDirection:u.activationDirection,transitioning:u.transitioning,instant:d};return(0,tg.useRenderElement)("div",e,{state:m,ref:t,props:[r,{children:c}],stateAttributesMapping:tX.popupViewportStateMapping})});var tG=e.i(64170);class tQ extends tG.BasePopupHandle{constructor(){super(function(){let e=new tl.PopupTriggerMap;return Object.assign(new ti.NullStore(Object.freeze(tc(void 0,e)),Object.freeze(tu(e)),to),{setOpen:eJ.NOOP,cancelPendingOpen:eJ.NOOP})}(),"Tooltip")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",0,tK,"Handle",0,tQ,"Popup",0,tW,"Portal",0,tL,"Positioner",0,tF,"Provider",0,function(e){let{delay:s,closeDelay:a,timeout:n=400}=e,r=i.useMemo(()=>({open:s,close:a}),[s,a]);return(0,t.jsx)(tb.Provider,{value:s,children:(0,t.jsx)(tC,{delay:r,timeoutMs:n,children:e.children})})},"Root",0,tm,"Trigger",0,tO,"Viewport",0,tY,"createHandle",0,function(){return new tQ}],99643);var tJ=e.i(99643),tJ=tJ;function tZ(e){return(0,t.jsx)(tJ.Root,{"data-slot":"tooltip",...e})}function t0(e){return(0,t.jsx)(tJ.Trigger,{"data-slot":"tooltip-trigger",...e})}function t1({className:e,side:s="top",sideOffset:a=6,align:n="center",...i}){return(0,t.jsx)(tJ.Portal,{children:(0,t.jsx)(tJ.Positioner,{align:n,side:s,sideOffset:a,className:"isolate z-50 max-sm:hidden",children:(0,t.jsx)(tJ.Popup,{"data-slot":"tooltip-content",className:(0,p.classNames)("w-fit max-w-xs origin-(--transform-origin) rounded-sm bg-foreground px-2 py-1 text-caption font-medium text-background shadow-md duration-(--duration-fast) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...i})})})}let t2={fresh:{Icon:eW,tone:"text-tone-ok-fg"},while:{Icon:eG,tone:"text-muted-foreground"},long:{Icon:eX,tone:"text-tone-waiting-fg"}};function t5({seenAt:e,now:s,testId:a}){let n;if(null===e)return null;let i=new Date(e),r=(n=s.getTime()-i.getTime())<6e4?"fresh":n<=9e5?"while":"long",{Icon:l,tone:o}=t2[r],d=(0,b.lastSeen)(i,s);return(0,t.jsxs)(tZ,{children:[(0,t.jsx)(t0,{render:(0,t.jsx)("span",{role:"img","aria-label":d,"data-testid":a,"data-signal":r,className:(0,p.classNames)("inline-flex [&_svg]:size-(--size-icon) max-sm:[&_svg]:size-4",o)}),children:(0,t.jsx)(l,{"aria-hidden":!0})}),(0,t.jsx)(t1,{children:d})]})}var t4=e.i(63481);let t6={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};t6.node;let t7=(0,ee.default)(t6),t8={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};t8.node;let t3=(0,ee.default)(t8);function t9(e){return e.startsWith("@")||/@\d+\.\d+\.\d+$/.test(e)}function se({model:e,isCrewed:s,now:a,testId:n}){if(!s)return null;if(null===e)return(0,t.jsx)("span",{"data-testid":n,className:"text-meta text-muted-foreground",children:"Not stated yet"});let i=t9(e.id),r=function(e,t){let s=new Date(e.statedAt),a=Math.max(0,t.getTime()-s.getTime()),n=t9(e.id)?"Software":"Model";if(a<6e4)return`${n}, stated ${String(Math.floor(a/1e3))} s ago`;let i=(0,b.relativeTime)(s,t);return`${n}, stated ${i.charAt(0).toLowerCase()}${i.slice(1)}`}(e,a);return(0,t.jsxs)(tZ,{children:[(0,t.jsxs)(t0,{render:(0,t.jsx)("span",{"data-testid":n,"data-slot":"model-tag","data-software":i?"":void 0,className:(0,p.classNames)("inline-flex max-w-44 min-w-0 items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-id [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",i?"border border-dashed border-border text-muted-foreground":"bg-secondary text-secondary-foreground")}),children:[(0,t.jsx)(i?t7:t3,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:e.id}),(0,t.jsxs)("span",{className:"sr-only",children:[", ",r]})]}),(0,t.jsx)(t1,{children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"font-mono",children:e.id}),(0,t.jsx)("span",{className:"opacity-75",children:r})]})})]})}let st={waiting:"bg-tone-waiting-fg",active:"bg-tone-active-fg",ok:"bg-tone-ok-fg",attention:"bg-tone-attention-fg"};function ss({cell:e,testId:s}){return void 0===e?(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":s,children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"–"}),(0,t.jsx)("span",{className:"sr-only",children:"No crew request"})]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta whitespace-nowrap","data-testid":s,children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,p.classNames)("size-1.5 shrink-0 rounded-full",st[e.tone])}),e.word]})}var sa=e.i(81830),sn=e.i(1935),si=e.i(39448),sr=e.i(16327),sl=e.i(68401),so=e.i(6734),sd=e.i(87851);function sc({groups:e,picked:s,onPick:n,trigger:r}){let[l,o]=(0,i.useState)(!1);return(0,t.jsxs)(so.Popover,{open:l,onOpenChange:o,children:[(0,t.jsx)(so.PopoverTrigger,{render:r}),(0,t.jsxs)(so.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"label-filter-popover",children:[(0,t.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Filter by label"}),(0,t.jsx)(sd.LabelPicker,{groups:e,pickedValueIds:s.map(e=>e.valueId),onPick:e=>{n(e),o(!1)}}),(0,t.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,t.jsx)(a.default,{href:"/labels",className:"font-medium text-foreground hover:underline","data-testid":"label-filter-manage",children:"Manage labels"})]})]})]})}function su({groups:e,picked:a,onPick:n}){return(0,t.jsx)(sc,{groups:e,picked:a,onPick:n,trigger:(0,t.jsxs)(r.Button,{variant:"secondary",size:"sm",icon:(0,t.jsx)(s.Tag,{}),"data-testid":"fleet-filter-labels",children:["Labels",0===a.length?null:(0,t.jsxs)("span",{className:"inline-flex size-5 items-center justify-center rounded-full bg-primary text-caption font-semibold text-primary-foreground tabular-nums",children:[a.length,(0,t.jsx)("span",{className:"sr-only",children:" picked"})]}),(0,t.jsx)(sr.ChevronDown,{"aria-hidden":!0,className:"text-muted-foreground"})]})})}function sm({groups:e,picked:s,onPick:a,onRemove:n,onClear:i}){return 0===s.length?null:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5 text-meta max-sm:hidden","data-testid":"fleet-picked-labels",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Ships with"}),s.map((e,s)=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[0===s?null:(0,t.jsx)("span",{className:"text-muted-foreground",children:"and"}),(0,t.jsx)(eF.LabelChip,{chip:e,testId:"fleet-picked-label",onRemove:()=>{n(e.valueId)}})]},e.valueId)),(0,t.jsx)(sc,{groups:e,picked:s,onPick:a,trigger:(0,t.jsx)(r.Button,{variant:"ghost",size:"xs",icon:(0,t.jsx)(S.Plus,{}),children:"Add"})}),(0,t.jsx)("span",{"aria-hidden":!0,className:"h-4 w-px bg-border"}),(0,t.jsx)(r.Button,{variant:"ghost",size:"xs",onClick:i,"data-testid":"fleet-labels-clear",children:"Clear labels"})]})}function sh({groups:e,picked:s,onPick:n,onRemove:l}){let[o,d]=(0,i.useState)(!1);return(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"fleet-filter-labels-touch",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 text-meta font-medium text-muted-foreground",children:["Labels ",(0,t.jsx)("span",{className:"font-normal",children:"all must hold"})]}),0===s.length?null:(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 text-meta",children:s.map((e,s)=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[0===s?null:(0,t.jsx)("span",{className:"text-muted-foreground",children:"and"}),(0,t.jsx)(eF.LabelChip,{chip:e,onRemove:()=>{l(e.valueId)}})]},e.valueId))}),o?(0,t.jsx)("div",{className:"rounded-lg border border-border p-2",children:(0,t.jsx)(sd.LabelPicker,{groups:e,pickedValueIds:s.map(e=>e.valueId),size:"touch",onPick:e=>{n(e),d(!1)}})}):(0,t.jsx)(r.Button,{variant:"secondary",size:"touch",icon:(0,t.jsx)(S.Plus,{}),className:"self-start",onClick:()=>{d(!0)},children:"Add label"}),(0,t.jsxs)(a.default,{href:"/labels",className:"inline-flex items-center gap-1.5 self-start text-meta text-muted-foreground hover:underline [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(sl.Tags,{"aria-hidden":!0}),"All labels and their owners"]})]})}function sp(e,t){return{...e,filters:{...e.filters,labelValueIds:t}}}let sx={all:"All",crewed:"Crewed",awaitingCrew:"Awaiting crew"};function sf(e){return Object.hasOwn(sx,e)}let sg={all:"All",...Object.fromEntries(eS.CREW_REQUEST_KEYS.map(e=>[e,(0,eS.crewRequestKeyWord)(e)]))};function sv(e){return Object.hasOwn(sg,e)}function sj({ship:e,squadron:s}){return"operator"===e.kind?(0,t.jsxs)(ez.Badge,{variant:"kind",children:[(0,t.jsx)(ej.UserRound,{"aria-hidden":!0}),"operator"]}):"viewer"===e.kind?(0,t.jsxs)(ez.Badge,{variant:"kind","data-testid":"fleet-viewer",children:[(0,t.jsx)(eh,{"aria-hidden":!0}),"viewer"]}):s?.role===null?(0,t.jsxs)(ez.Badge,{variant:"kind","data-testid":"fleet-flagship",children:[(0,t.jsx)(ep.Flag,{"aria-hidden":!0}),"flagship"]}):s?(0,t.jsx)(sn.SquadronTag,{squadronId:s.squadronId,role:s.role,size:"sm"}):null}function sb({ship:e,now:s}){let a=e.startingPrompt,n="inline-flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0";if(null===a)return(0,t.jsxs)("span",{className:n,children:[(0,t.jsx)(ex.KeyRound,{"aria-hidden":!0}),"No starting prompt issued"]});let i=new Date(a.issuedAt);return(0,t.jsxs)("span",{className:n,children:[(0,t.jsx)(ex.KeyRound,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:["Prompt issued"," ",(0,t.jsx)("time",{dateTime:a.issuedAt,title:(0,b.fullDateTime)(i),children:(0,b.relativeTime)(i,s)}),a.isClaimed?", claimed":", not claimed yet"]})]})}function sw({ship:e,now:s}){return"retired"===e.status?null===e.retiredAt?null:(0,t.jsxs)("span",{className:"truncate text-meta text-muted-foreground","data-testid":"fleet-retired-on",title:(0,b.fullDateTime)(new Date(e.retiredAt)),children:["Retired ",(0,b.dayMonth)(new Date(e.retiredAt))]}):"viewer"===e.kind?null:"awaitingCrew"===e.status?(0,t.jsx)(sb,{ship:e,now:s}):(0,t.jsx)(t4.LocationTag,{kind:"operator"===e.kind&&null!==e.location?"DEVICE":e.location?.kind??null,description:e.location?.description,harness:"operator"===e.kind?"console":e.harness,size:"sm"})}function sy({ship:e,now:s,next:a}){let n="agent"===e.kind&&"crewed"===e.status;return(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[n?(0,t.jsx)(sa.ReportLine,{report:e.report,now:s,variant:"row",isTimeInTitle:!0,testId:"fleet-report"}):null,a]})}function sS({ships:e,view:s,onViewChange:a,size:n,squadronsOf:i,labels:l}){let{filters:o}=s,d={all:"All",...Object.fromEntries(eO(e,o.isRetiredShown).map(e=>[e,e]))},c=eq(e),u="sm"===n?"fleet-show-retired":"fleet-show-retired-touch",m=e=>{a({...s,filters:{...o,...e}})},h="touch"===n;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eD.Select,{items:sx,value:o.status,onValueChange:e=>{null!==e&&sf(e)&&m({status:e})},children:[(0,t.jsx)(eD.SelectTrigger,{size:n,"aria-label":"Status","data-testid":h?void 0:"fleet-filter-status",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Status"}),(0,t.jsx)(eD.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(eD.SelectContent,{children:Object.entries(sx).map(([e,s])=>(0,t.jsx)(eD.SelectItem,{value:e,children:s},e))})]}),(0,t.jsxs)(eD.Select,{items:sg,value:o.crewRequest,onValueChange:e=>{null!==e&&sv(e)&&m({crewRequest:e})},children:[(0,t.jsx)(eD.SelectTrigger,{size:n,"aria-label":"Crew request","data-testid":h?void 0:"fleet-filter-crew-request",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Crew request"}),(0,t.jsx)(eD.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(eD.SelectContent,{children:Object.entries(sg).map(([e,s])=>(0,t.jsx)(eD.SelectItem,{value:e,children:s},e))})]}),(0,t.jsxs)(eD.Select,{items:d,value:o.type,onValueChange:e=>{null!==e&&m({type:e})},children:[(0,t.jsx)(eD.SelectTrigger,{size:n,"aria-label":"Type","data-testid":h?void 0:"fleet-filter-type",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Type"}),(0,t.jsx)(eD.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(eD.SelectContent,{children:Object.entries(d).map(([e,s])=>(0,t.jsx)(eD.SelectItem,{value:e,className:"all"===e?void 0:"font-mono",children:s},e))})]}),i&&(0,t.jsxs)(eD.Select,{items:{all:"All",...Object.fromEntries(eE(i).map(e=>[e,e]))},value:o.squadron,onValueChange:e=>{null!==e&&m({squadron:e})},children:[(0,t.jsx)(eD.SelectTrigger,{size:n,"aria-label":"Squadron","data-testid":h?void 0:"fleet-filter-squadron",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Squadron"}),(0,t.jsx)(eD.SelectValue,{className:"font-medium"})]})}),(0,t.jsxs)(eD.SelectContent,{children:[(0,t.jsx)(eD.SelectItem,{value:"all",children:"All"}),eE(i).map(e=>(0,t.jsx)(eD.SelectItem,{value:e,children:e},e))]})]}),void 0===l||h?null:(0,t.jsx)(su,{groups:(0,ey.filterGroupsOf)(l),picked:(0,ey.pickedChips)(o.labelValueIds,l),onPick:e=>{a(sp(s,[...o.labelValueIds,e]))}}),eL(o).length>0&&!h?(0,t.jsx)(r.Button,{variant:"ghost",size:"xs","data-testid":"fleet-filters-clear",onClick:()=>{a({...s,filters:eC.filters})},children:"Clear filters"}):null,(0,t.jsxs)("div",{className:(0,p.classNames)("inline-flex items-center gap-2",h?"py-2":"sm:ml-auto"),children:[(0,t.jsx)(U.Switch,{id:u,"data-testid":h?void 0:"fleet-show-retired",checked:o.isRetiredShown,onCheckedChange:e=>{m({isRetiredShown:e})}}),(0,t.jsxs)(B.Label,{htmlFor:u,className:(0,p.classNames)("font-normal text-muted-foreground",h?"text-body-touch":"text-meta"),children:["Show retired (",c,")"]})]})]})}function sC({label:e,isOn:s,kind:a,onPick:n}){return(0,t.jsx)(r.Button,{variant:s?"primary":"secondary",size:"touch",role:"radio"===a?"radio":void 0,"aria-checked":"radio"===a?s:void 0,"aria-pressed":"toggle"===a?s:void 0,onClick:n,children:e})}function sN({ships:e,view:s,onViewChange:a,shownCount:n,squadronsOf:i,labels:l}){let{filters:o}=s,d=e=>{a({...s,filters:{...o,...e}})},c=eM(o),u=eq(e);return(0,t.jsxs)(eV.Sheet,{children:[(0,t.jsx)(eV.SheetTrigger,{render:(0,t.jsx)(r.Button,{size:"touch",isIconOnly:!0,"aria-label":c>0?`Filter ships, ${String(c)} active`:"Filter ships","data-testid":"fleet-filters-open",icon:(0,t.jsx)(ev,{}),className:"relative sm:hidden",children:c>0?(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-1.5 size-2 rounded-full bg-primary"}):null})}),(0,t.jsxs)(eV.SheetContent,{side:"bottom",children:[(0,t.jsxs)(eV.SheetHeader,{className:"flex-row items-center justify-between",children:[(0,t.jsx)(eV.SheetTitle,{children:"Filter ships"}),(0,t.jsx)(r.Button,{variant:"ghost",size:"touch","data-testid":"fleet-filters-reset",onClick:()=>{a({...s,filters:eC.filters})},children:"Reset"})]}),(0,t.jsxs)(eV.SheetBody,{className:"flex flex-col gap-4 pb-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{id:"fleet-filter-status-label",className:"text-meta font-medium text-muted-foreground",children:"Status"}),(0,t.jsx)("div",{role:"radiogroup","aria-labelledby":"fleet-filter-status-label",className:"flex gap-1.5 [&>*]:flex-1",children:Object.entries(sx).map(([e,s])=>(0,t.jsx)(sC,{label:s,kind:"radio",isOn:o.status===e,onPick:()=>{sf(e)&&d({status:e})}},e))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{id:"fleet-filter-crew-request-label",className:"text-meta font-medium text-muted-foreground",children:"Crew request"}),(0,t.jsx)("div",{role:"radiogroup","aria-labelledby":"fleet-filter-crew-request-label",className:"flex flex-wrap gap-1.5",children:Object.entries(sg).map(([e,s])=>(0,t.jsx)(sC,{label:s,kind:"radio",isOn:o.crewRequest===e,onPick:()=>{sv(e)&&d({crewRequest:e})}},e))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-meta font-medium text-muted-foreground",children:"Type"}),(0,t.jsx)("div",{role:"group","aria-label":"Type",className:"flex flex-wrap gap-1.5",children:["all",...eO(e,o.isRetiredShown)].map(e=>(0,t.jsx)(sC,{label:"all"===e?"All types":e,kind:"toggle",isOn:o.type===e,onPick:()=>{d({type:e})}},e))})]}),i&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{id:"fleet-filter-squadron-label",className:"text-meta font-medium text-muted-foreground",children:"Squadron"}),(0,t.jsx)("div",{role:"radiogroup","aria-labelledby":"fleet-filter-squadron-label",className:"flex flex-wrap gap-1.5",children:["all",...eE(i)].map(e=>(0,t.jsx)(sC,{label:"all"===e?"All":e,kind:"radio",isOn:o.squadron===e,onPick:()=>{d({squadron:e})}},e))})]}),void 0===l?null:(0,t.jsx)(sh,{groups:(0,ey.filterGroupsOf)(l),picked:(0,ey.pickedChips)(o.labelValueIds,l),onPick:e=>{a(sp(s,[...o.labelValueIds,e]))},onRemove:e=>{a(sp(s,o.labelValueIds.filter(t=>t!==e)))}}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 py-1",children:[(0,t.jsxs)(B.Label,{htmlFor:"fleet-show-retired-touch",className:"text-body-touch font-normal",children:["Show retired ships ",(0,t.jsxs)("span",{className:"text-muted-foreground",children:["(",u,")"]})]}),(0,t.jsx)(U.Switch,{id:"fleet-show-retired-touch",checked:o.isRetiredShown,onCheckedChange:e=>{d({isRetiredShown:e})}})]}),(0,t.jsx)(eV.SheetClose,{render:(0,t.jsx)(r.Button,{size:"touch","data-testid":"fleet-filters-apply"}),children:1===n?"Show 1 ship":`Show ${String(n)} ships`})]})]})]})}function sk({view:e,onViewChange:s,labels:a}){let n=eL(e.filters),i=void 0===a?[]:(0,ey.pickedChips)(e.filters.labelValueIds,a);return 0===n.length&&0===i.length?null:(0,t.jsxs)("div",{className:"flex w-full flex-wrap items-center gap-1.5 sm:hidden","data-testid":"fleet-filter-chips",children:[n.map(e=>(0,t.jsx)(ez.Badge,{variant:"outline",className:"max-w-full truncate",children:e},e)),i.map(a=>(0,t.jsx)(eF.LabelChip,{chip:a,onRemove:()=>{s(sp(e,e.filters.labelValueIds.filter(e=>e!==a.valueId)))}},a.valueId)),(0,t.jsx)(r.Button,{variant:"ghost",size:"touch",onClick:()=>{s({...e,filters:eC.filters})},children:"Clear filters"})]})}function sR({ships:e,view:s,onViewChange:a,shownCount:n,squadronsOf:i,labels:r}){return(0,t.jsxs)("div",{"data-slot":"fleet-toolbar",className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("div",{className:"w-60 max-sm:min-w-0 max-sm:flex-1",children:(0,t.jsx)(F.Input,{type:"search","aria-label":"Search ships by name or type",placeholder:"Search ships by name","data-testid":"fleet-search",value:s.query,onChange:e=>{a({...s,query:e.target.value})},leadingIcon:(0,t.jsx)(ef.Search,{}),className:"h-(--size-control-sm) text-meta max-sm:h-(--size-control-touch) max-sm:text-input-touch"})}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 max-sm:hidden sm:flex-1",children:(0,t.jsx)(sS,{ships:e,view:s,onViewChange:a,squadronsOf:i,labels:r,size:"sm"})}),(0,t.jsx)(sN,{ships:e,view:s,onViewChange:a,shownCount:n,squadronsOf:i,labels:r}),(0,t.jsx)(sk,{view:s,onViewChange:a,labels:r}),(0,t.jsxs)("p",{"aria-live":"polite",className:"text-meta text-muted-foreground tabular-nums max-sm:w-full",children:[n," of ",e.length," ships"]})]})}function sT({ship:e}){return(0,t.jsx)(si.ShipName,{name:e.name,shipId:e.id,isSuffixShown:"retired"===e.status,href:`/ships/${e.id}`})}function sP({ships:e,highlightedShipIds:s,now:a,renderRowActions:n,squadronsOf:i,labels:r}){return(0,t.jsx)("div",{className:"max-sm:hidden",children:(0,t.jsxs)(eH.Table,{"aria-label":"Ships",children:[(0,t.jsx)(eH.TableHeader,{children:(0,t.jsxs)(eH.TableRow,{children:[(0,t.jsx)(eH.TableHead,{children:void 0===r||0===r.labels.length?"Name":"Name and labels"}),(0,t.jsx)(eH.TableHead,{children:"Status"}),(0,t.jsx)(eH.TableHead,{children:"Crew request"}),(0,t.jsx)(eH.TableHead,{children:"Report"}),(0,t.jsx)(eH.TableHead,{children:"Runs on"}),(0,t.jsx)(eH.TableHead,{children:"Model"}),(0,t.jsx)(eH.TableHead,{children:"Seen"}),(0,t.jsx)(eH.TableHead,{children:(0,t.jsx)("span",{className:"sr-only",children:"Actions"})})]})}),(0,t.jsx)(eH.TableBody,{children:e.map(e=>(0,t.jsxs)(eH.TableRow,{"data-testid":`fleet-row-${e.name}`,"data-new":s?.has(e.id)?"":void 0,className:"h-12",children:[(0,t.jsx)(eH.TableCell,{className:"max-w-64",children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(sT,{ship:e}),(0,t.jsx)(sj,{ship:e,squadron:i?.get(e.id)})]}),void 0===r?null:(0,t.jsx)(eB,{chips:(0,ey.chipsOf)(e,r),width:22,testId:"fleet-labels"})]})}),(0,t.jsx)(eH.TableCell,{children:(0,t.jsx)(ei.StatusBadge,{status:e.status})}),(0,t.jsx)(eH.TableCell,{children:(0,t.jsx)(ss,{cell:(0,eS.crewRequestCell)((0,ew.crewRequestStage)(e)),testId:"fleet-crew-request"})}),(0,t.jsx)(eH.TableCell,{className:"max-w-72",children:(0,t.jsx)(sy,{ship:e,now:a,next:n?.(e,"next")})}),(0,t.jsx)(eH.TableCell,{className:"max-w-56",children:(0,t.jsx)(sw,{ship:e,now:a})}),(0,t.jsx)(eH.TableCell,{children:"agent"!==e.kind?null:(0,t.jsx)(se,{model:e.model,isCrewed:"crewed"===e.status,now:a,testId:"fleet-model"})}),(0,t.jsx)(eH.TableCell,{children:(0,t.jsx)(t5,{seenAt:e.lastSeenAt,now:a,testId:"fleet-last-seen"})}),(0,t.jsx)(eH.TableCell,{className:"w-10 text-right",children:n?.(e,"table")})]},e.id))})]})})}function sI({ships:e,highlightedShipIds:s,now:a,renderRowActions:n,squadronsOf:i}){return(0,t.jsx)("ul",{"aria-label":"Ships",className:"overflow-hidden rounded-lg border border-border bg-card sm:hidden",children:e.map(e=>(0,t.jsxs)("li",{"data-testid":`fleet-card-${e.name}`,"data-new":s?.has(e.id)?"":void 0,className:"flex items-start gap-2 border-b border-border px-3.5 py-3 last:border-0 data-new:animate-highlight",children:[(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 text-body-touch",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(sT,{ship:e}),(0,t.jsx)(sj,{ship:e,squadron:i?.get(e.id)})]}),(0,t.jsx)(ei.StatusBadge,{status:e.status})]}),null===e.crewRequest?null:(0,t.jsx)(ss,{cell:(0,eS.crewRequestCell)((0,ew.crewRequestStage)(e))}),(0,t.jsx)(sy,{ship:e,now:a,next:n?.(e,"next")}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1",children:[(0,t.jsx)(sw,{ship:e,now:a}),"agent"!==e.kind?null:(0,t.jsx)(se,{model:e.model,isCrewed:"crewed"===e.status,now:a}),(0,t.jsx)(t5,{seenAt:e.lastSeenAt,now:a})]})]}),n?.(e,"phone")]},e.id))})}function sO({ships:e,view:s,onViewChange:a,state:n,error:i,highlightedShipIds:l,now:o,renderRowActions:d,emptyAction:c,squadronsOf:u,labels:m}){var h;let p;if("loading"===n)return(0,t.jsxs)("div",{"data-slot":"fleet-table","data-state":"loading",className:"flex flex-col gap-3",children:[(0,t.jsx)(eU.LoadingSkeleton,{variant:"table",rows:6,label:"Loading the fleet",className:"max-sm:hidden"}),(0,t.jsx)(eU.LoadingSkeleton,{variant:"list",rows:5,label:"Loading the fleet",className:"sm:hidden"})]});if("error"===n)return(0,t.jsx)(K.InlineError,{variant:"page",title:"Couldn’t load the fleet",description:"This page couldn’t reach the fleet server. Check that the server is running and reachable from this browser, then try again.",detail:i?.detail,retryNote:i?.retryNote,onRetry:i?.onRetry});let x={highlightedShipIds:l,now:o,renderRowActions:d,squadronsOf:u};if(e.every(e=>"operator"===e.kind||"retired"===e.status)){let s=e.filter(e=>"operator"===e.kind);return(0,t.jsxs)("div",{"data-slot":"fleet-table","data-state":"empty",className:"flex flex-col gap-3",children:[(0,t.jsx)(sP,{ships:s,labels:m,...x}),(0,t.jsx)(sI,{ships:s,...x}),(0,t.jsx)(e$.EmptyState,{icon:(0,t.jsx)(en.Ship,{}),title:"No ships besides argo yet",description:"argo is your own ship: messages to the operator land in its inbox. Commission a ship to add an agent to the fleet.",action:c})]})}let f=(h={...s,squadronsOf:u},e.filter(e=>{let t;return(""===(t=h.query.trim().toLowerCase())||e.name.toLowerCase().includes(t)||e.type.toLowerCase().includes(t))&&function(e,t){let{filters:s,squadronsOf:a}=t;return("retired"!==e.status||!!s.isRetiredShown)&&("all"===s.squadron||a?.get(e.id)?.squadronId===s.squadron)&&("all"===s.status||e.status===s.status)&&("all"===s.crewRequest||(0,eS.crewRequestKey)((0,ew.crewRequestStage)(e))===s.crewRequest)&&!!(0,ey.carriesEvery)(e,s.labelValueIds)&&("all"===s.type||e.type===s.type)}(e,h)}).toSorted((e,t)=>e.kind!==t.kind?"operator"===e.kind?-1:1:e.name.localeCompare(t.name)||e.id.localeCompare(t.id))),g=s.query.trim();return(0,t.jsxs)("div",{"data-slot":"fleet-table","data-state":"ready",className:"flex flex-col gap-3",children:[(0,t.jsx)(sR,{ships:e,view:s,onViewChange:a,shownCount:f.length,squadronsOf:u,labels:m}),void 0===m?null:(0,t.jsx)(sm,{groups:(0,ey.filterGroupsOf)(m),picked:(0,ey.pickedChips)(s.filters.labelValueIds,m),onPick:e=>{a(sp(s,[...s.filters.labelValueIds,e]))},onRemove:e=>{a(sp(s,s.filters.labelValueIds.filter(t=>t!==e)))},onClear:()=>{a(sp(s,[]))}}),0===f.length?(0,t.jsx)(e$.EmptyState,{variant:"no-results",title:""===g?"No ships match these filters.":`No ships match “${g}”.`,action:(0,t.jsx)(r.Button,{size:"xs","data-testid":"fleet-clear-filters",onClick:()=>{a(eC)},children:(p=eM(s.filters)>0,""===g?"Clear filters":p?"Clear search and filters":"Clear search")})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(sP,{ships:f,labels:m,...x}),(0,t.jsx)(sI,{ships:f,...x})]})]})}var sq=e.i(5894);function sE({view:e,onViewChange:s,newShipIds:a}){let n=(0,g.useFleetSnapshot)(),i=(0,j.useNow)(),r=(0,O.useSquadrons)(),l=(0,g.useLabelContext)();return(0,t.jsx)("section",{"aria-label":"Fleet",className:"flex flex-col gap-3",children:(0,t.jsx)(sO,{ships:n.data??[],view:e,onViewChange:s,state:n.isPending?"loading":n.isError?"error":"ready",error:{detail:n.error?.message,onRetry:()=>{n.refetch()}},highlightedShipIds:a,now:i,renderRowActions:(e,s)=>(0,t.jsx)(sq.ShipActions,{ship:e,layout:"table"===s?"menu":"phone"===s?"sheet":"next"}),squadronsOf:r.data?(0,eu.shipsInSquadrons)(r.data):void 0,labels:l})})}var sA=e.i(87792),sM=e.i(62687),sL=e.i(90262),sz=e.i(86413),sD=e.i(18423),sV=e.i(88721),sH=e.i(78485),s$=e.i(3979);e.s(["default",0,function({searchParams:e}){var u,m;let h,p=(0,n.useRouter)(),x=function(e){let t=new URLSearchParams;for(let[s,a]of Object.entries(e))for(let e of Array.isArray(a)?a:void 0===a?[]:[a])t.append(s,e);return t}((0,i.use)(e)),f={query:x.get("q")??"",filters:{status:(u=x.get(eN),(h=E.shipStatusSchema.safeParse(u)).success&&"retired"!==h.data?h.data:"all"),crewRequest:(m=x.get(ek),eS.CREW_REQUEST_KEYS.find(e=>e===m)??"all"),type:x.get(eR)??"all",squadron:x.get(eT)??"all",isRetiredShown:"1"===x.get(eP),labelValueIds:x.getAll(eI).filter(e=>(0,eb.idSchema)("labelValue").safeParse(e).success)}},b="new"===x.get("commission"),S=(0,g.useFleetSnapshot)(),C=(0,sD.useLiveFleet)(),N=(0,j.useNow)(),k=(0,sV.useAccountMenu)(N),I=(0,P.messageLimitReached)((0,R.useFleetLimits)().data),O=(0,T.useHostedAccountUrl)(),q=(0,sz.useOpenInboxCount)(),A=(0,sL.useAccess)(),M=(0,s$.usePluginNav)(),[L,z]=(0,i.useState)(!1),[D,V]=(0,i.useState)(!1),[H,$]=(0,i.useState)(!1),F=(0,v.useAttentionCount)();(0,sH.useSignInWhenSessionEnds)([S.error,C.error]);let B=e=>{let t=(function(e){let t=new URLSearchParams;for(let s of(""!==e.query&&t.set("q",e.query),"all"!==e.filters.status&&t.set(eN,e.filters.status),"all"!==e.filters.crewRequest&&t.set(ek,e.filters.crewRequest),"all"!==e.filters.type&&t.set(eR,e.filters.type),"all"!==e.filters.squadron&&t.set(eT,e.filters.squadron),e.filters.isRetiredShown&&t.set(eP,"1"),e.filters.labelValueIds))t.append(eI,s);return t})(e).toString();p.replace(""===t?"/":`/?${t}`,{scroll:!1})};return(0,t.jsxs)(sA.ListLayout,{title:"Fleet overview",description:S.data?function(e){let t=w(e.ships).length,s=e.ships.filter(e=>"agent"===e.kind&&"retired"===e.status).length;if(0===t&&0===s)return e.canCommission?"Only argo so far. Ships you commission appear here.":"Only argo so far.";let a=0===s?"":`, ${String(s)} retired`;return`${1===t?"1 active ship":`${String(t)} active ships`} and argo${a}. Changes appear as they happen.`}({ships:S.data,canCommission:A.canManage}):"Loading your fleet",primaryAction:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(r.Button,{render:(0,t.jsx)(a.default,{href:"/labels"}),nativeButton:!1,icon:(0,t.jsx)(s.Tag,{}),"data-testid":"overview-labels",children:A.canDefineLabels?"Manage labels":"View labels"}),A.canManage?(0,t.jsx)(Z,{isOpen:H||b,onOpenChange:e=>{$(e),!e&&b&&B(f)}}):null]}),live:C.live,nav:{active:"overview",inboxCount:q,attentionCount:F,...M},onCompose:A.canSend?()=>{z(!0)}:void 0,onSearch:()=>{V(!0)},account:k,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.ConsoleNotices,{}),(0,t.jsx)(d.ConsoleGuide,{})]}),children:[(0,t.jsx)(sM.FleetSegments,{active:"ships",needsCrewCount:M.needsCrewCount}),void 0===I?null:(0,t.jsx)(X.LimitNotice,{...(0,P.messageLimitNotice)(I),accountUrl:O,testId:"overview-message-limit"}),(0,t.jsx)(ec,{}),(0,t.jsx)(y,{}),(0,t.jsx)(sE,{view:f,onViewChange:B,newShipIds:C.newShipIds}),(0,t.jsx)(l.ComposeMessage,{isOpen:L,onOpenChange:z}),(0,t.jsx)(o.ConsoleCommands,{isOpen:D,onOpenChange:V,onCompose:()=>{z(!0)}})]})}],62219)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69644,69846,e=>{"use strict";var t=e.i(56420);let i={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};i.node;let s=(0,t.default)(i);e.s(["FolderOpen",0,s],69644);let n={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};n.node;let a=(0,t.default)(n);e.s(["GitBranch",0,a],69846)},27290,e=>{"use strict";var t=e.i(43476),i=e.i(77071),s=e.i(71645),n=e.i(66390),a=e.i(15905),r=e.i(44824),o=e.i(45608),l=e.i(95475),d=e.i(2767);e.i(31627);var c=e.i(44827),h=e.i(22768),m=e.i(85595),u=e.i(16984),x=e.i(10818),p=e.i(90063),g=e.i(65160),f=e.i(91703),j=e.i(22212),v=e.i(94945),b=e.i(12470),w=e.i(91727),N=e.i(56478),y=e.i(17981);function C({activeNames:e,isPending:i,error:n,onSubmit:r}){let o=(0,s.useId)(),l=(0,s.useId)(),[d,h]=(0,s.useState)(""),x=(0,g.checkShipName)(d,{activeNames:e}),f="invalid"===x.kind||"reserved"===x.kind||"taken"===x.kind,v="available"===x.kind;return(0,t.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),v&&r(d)},children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsx)(j.DialogTitle,{children:"Join a machine"}),(0,t.jsx)(j.DialogDescription,{children:"The trierarch plugin commissions a trierarch ship of this name. You then run its setup line on the machine, and the trierarch there starts sessions for the crew requests it is given."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(w.Label,{htmlFor:o,children:"Name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[d.length," / ",c.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(b.Input,{id:o,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"trierarch-mac","data-testid":"join-machine-name","aria-invalid":!!f||void 0,"aria-describedby":l,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:d,onChange:e=>{h((0,g.asHandle)(e.target.value))}}),"available"===x.kind?(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):f?(0,t.jsx)(u.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,t.jsx)("p",{id:l,"aria-live":"polite",className:(0,p.classNames)("text-meta",f?"text-destructive-text":"text-muted-foreground"),children:x.message})]}),void 0===n?null:(0,t.jsx)(y.InlineError,{title:"Couldn’t join the machine",description:`${n} Nothing changed.`}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(a.Button,{type:"button",disabled:i}),children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",variant:"primary",isLoading:i,disabled:!v,"data-testid":"join-machine-submit",children:i?"Joining":"Join machine"})]})]})}function k({joined:e}){let[i,n]=(0,s.useState)(!1),r=()=>{n(!1)},o=()=>{n(!0)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:[e.name," joined"]}),(0,t.jsxs)(j.DialogDescription,{children:["Run the setup line on the machine. It installs the trierarch, which then crews ",e.name," and reports what the machine offers."]})]}),(0,t.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,t.jsx)(x.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," It carries the ship’s secret. If you lose it, get a new starting prompt on ",e.name,"’s ship page."]})]}),(0,t.jsx)(f.CodeBlock,{label:"Setup line",code:e.setupLine,isWrapped:!0,copyLabel:`Copy the setup line for ${e.name}`,codeTestId:"join-machine-setup-line",copyTestId:"join-machine-setup-line-copy",onCopied:r,onCopyFailed:o}),(0,t.jsx)(f.CodeBlock,{label:`Starting prompt for ${e.name}`,code:e.prompt,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e.name}`,codeTestId:"join-machine-prompt",onCopied:r,onCopyFailed:o}),(0,t.jsx)(N.CrewLines,{crewLines:e.crewLines,subject:e.name,testIdPrefix:"join-machine-crew-line",onCopied:r,onCopyFailed:o}),(0,t.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null}),(0,t.jsx)(j.DialogFooter,{children:(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(a.Button,{variant:"primary"}),children:"Done"})})]})}function S(e){let{isOpen:i,onOpenChange:s,isPending:n,joined:a}=e;return(0,t.jsx)(j.Dialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(j.DialogContent,{size:"md","data-testid":"join-machine-dialog",className:v.dialogSurface.phoneFullScreen,children:void 0===a?(0,t.jsx)(C,{...e}):(0,t.jsx)(k,{joined:a})})})}var T=e.i(42383),L=e.i(87792),B=e.i(90262),z=e.i(88721),I=e.i(5387),D=e.i(86413),$=e.i(18423),A=e.i(28459),O=e.i(96676),F=e.i(3979),M=e.i(78485),_=e.i(265);e.s(["default",0,function(){let e=(0,O.useNow)(),c=(0,z.useAccountMenu)(e),h=(0,D.useOpenInboxCount)(),m=(0,A.useNeedsAttention)(),u=(0,A.useAttentionCount)(),x=(0,$.useLiveFleet)(),p=(0,I.useFleetSnapshot)(),g=(0,_.useTrierarchPluginConnection)(),f=(0,_.useMachines)(),j=(0,_.useTrierarchPluginVersion)(),v=(0,_.useJoinMachine)(),b=(0,B.useAccess)(),w=(0,F.usePluginNav)(),[N,y]=(0,s.useState)(!1),[C,k]=(0,s.useState)(!1),[W,H]=(0,s.useState)(!1);(0,M.useSignInWhenSessionEnds)([m.error,x.error]);let q=b.canManage&&"connected"===g,P=()=>{v.reset(),y(!0)};return(0,t.jsxs)(L.ListLayout,{title:"Trierarchs",titleMeta:void 0===j?void 0:(0,t.jsxs)(n.Badge,{variant:"outline","data-testid":"trierarchs-plugin-version",children:["trierarch plugin ",j]}),description:"none"===g?"Not set up.":"Machines that run sessions for crew requests. The plugin picks a trierarch for each request.",live:x.live,nav:{active:"trierarchs",inboxCount:h,attentionCount:u,...w},primaryAction:q?(0,t.jsx)(a.Button,{variant:"primary",icon:(0,t.jsx)(i.Plus,{"aria-hidden":!0}),onClick:P,"data-testid":"trierarchs-join",children:"Join a machine"}):void 0,onCompose:b.canSend?()=>{k(!0)}:void 0,onSearch:()=>{H(!0)},account:c,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.ConsoleNotices,{}),(0,t.jsx)(l.ConsoleGuide,{})]}),children:[(0,t.jsx)(T.MachineList,{connection:g,machines:f.data,ships:p.data??[],error:f.isError?f.error.message:void 0,onRetry:()=>{f.refetch()},onJoin:q?P:void 0,now:e}),q&&(0,t.jsx)(S,{activeNames:(p.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:N,onOpenChange:e=>{y(e),e||v.reset()},isPending:v.isPending,error:v.error?.message,joined:v.data,onSubmit:e=>{v.mutate(e)}}),(0,t.jsx)(r.ComposeMessage,{isOpen:C,onOpenChange:k}),(0,t.jsx)(o.ConsoleCommands,{isOpen:W,onOpenChange:H,onCompose:()=>{k(!0)}})]})}],27290)},91703,e=>{"use strict";var t=e.i(43476),i=e.i(83035),s=e.i(90063),n=e.i(61966);e.s(["CodeBlock",0,function({label:e,code:a,isWrapped:r=!1,copyValue:o,copyLabel:l=`Copy ${e.toLowerCase()}`,onCopied:d,onCopyFailed:c,codeTestId:h,copyTestId:m}){return(0,t.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(i.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e})]}),(0,t.jsx)(n.CopyButton,{value:o??a,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":m})]}),(0,t.jsx)("pre",{"data-testid":h,className:(0,s.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",r?"break-all whitespace-pre-wrap":"whitespace-pre"),children:a})]})}])},54422,e=>{"use strict";var t=e.i(43476),i=e.i(90063),s=e.i(14695);let n={running:"bg-tone-ok-fg",crewing:"bg-tone-active-fg",releasing:"bg-tone-active-fg",restarting:"bg-tone-waiting-fg",crashed:"bg-tone-attention-fg"};e.s(["CapacityBar",0,function({spots:e,caps:a,unknownText:r="Unknown",testId:o}){let l=(0,s.capacityLine)(e,a);if(void 0===a||void 0===l)return(0,t.jsx)("span",{"data-testid":o,className:"text-meta text-muted-foreground",children:r});let d=Math.max(0,a.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":l,"data-testid":o,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,t.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[e.map((e,s)=>(0,t.jsx)("span",{title:`Spot ${String(s+1)}: ${e.name}, ${e.status}`,className:(0,i.classNames)("h-2 w-3 rounded-xs",n[e.status])},e.shipId)),Array.from({length:d},(i,s)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+s+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(s)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:l})]})}])},56478,e=>{"use strict";var t=e.i(43476),i=e.i(66616),s=e.i(91703);e.s(["CrewLines",0,function({crewLines:e,subject:n,testIdPrefix:a,onCopied:r,onCopyFailed:o}){return e.map(({harness:e,line:l})=>(0,t.jsx)(s.CodeBlock,{label:`Crew line, ${(0,i.harnessWord)(e)} with the aeolus plugin`,code:l,isWrapped:!0,copyLabel:`Copy the ${(0,i.harnessWord)(e)} crew line for ${n}`,codeTestId:`${a}-${e}`,copyTestId:`${a}-${e}-copy`,onCopied:r,onCopyFailed:o},e))}])},42383,94313,e=>{"use strict";var t=e.i(43476),i=e.i(77071),s=e.i(86875),n=e.i(94831),a=e.i(22016),r=e.i(14695),o=e.i(31513),l=e.i(15905),d=e.i(67874),c=e.i(17981),h=e.i(88393),m=e.i(71567),u=e.i(52886),x=e.i(69644),p=e.i(69846),g=e.i(66787),f=e.i(66616),j=e.i(49635),v=e.i(66390),b=e.i(54422),w=e.i(63481);let N={alive:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",silent:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg","not-started":"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg"},y={alive:"Alive",silent:"Not answering","not-started":"Not started"};function C({machine:e,now:i}){let n=(0,r.machineLiveness)(e),a=null===e.lastSeenAt?null:new Date(e.lastSeenAt);return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":n,children:[(0,t.jsxs)(v.Badge,{variant:"outline",className:N[n],children:["alive"===n?(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(u.CircleDashed,{"aria-hidden":!0}),y[n]]}),null===a?(0,t.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,t.jsxs)("time",{dateTime:e.lastSeenAt??void 0,title:(0,j.fullDateTime)(a),className:"text-muted-foreground tabular-nums",children:["· ","silent"===n?`since ${(0,j.clockTime)(a)}`:(0,j.lastSeen)(a,i).replace("Last seen","seen")]})]})}function k(e,t){let i=(0,j.relativeTime)(e,t);return"Just now"===i?"just now":i}function S({title:e,children:i,className:s}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${s??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),i]})}function T({harness:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border py-2.5 first-of-type:border-t-0 first-of-type:pt-0",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-body font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(m.Bot,{"aria-hidden":!0}),(0,f.harnessWord)(e.harness)]}),(0,r.harnessOptions)(e.options).map(e=>(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e.name}),e.values.map(i=>(0,t.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[i,i===e.defaultValue?(0,t.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},i))]},e.name)),0===e.flags.length?null:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:e.flags.map(i=>e.riskyFlags?.includes(i)===!0?(0,t.jsxs)("code",{"data-testid":"machine-risky-flag",title:"Risky: every launch runs without its harness's safeguards",className:"inline-flex items-center gap-1 rounded-sm border border-tone-waiting-border bg-tone-waiting-bg px-1.5 font-mono text-id text-tone-waiting-fg [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0}),i,(0,t.jsx)("span",{className:"sr-only",children:" (risky)"})]},i):(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:i},i))})]})}function L({title:e,icon:i,names:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e}),0===s.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):s.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[i,e]},e))]})}function B({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(L,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(p.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(L,{title:"Folders · used as they are",icon:(0,t.jsx)(x.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}function z({machine:e,spots:i,location:n,now:r}){let{details:o,report:l}=e,d=null===l?null:new Date(l.reportedAt);return(0,t.jsxs)("section",{"aria-label":e.name,"data-testid":"machine-card",className:"grid grid-cols-[minmax(0,18.75rem)_minmax(0,1.25fr)_minmax(0,1fr)] divide-x divide-border rounded-lg border border-border bg-card shadow-sm max-lg:grid-cols-1 max-lg:divide-x-0 max-lg:divide-y",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,t.jsxs)(a.default,{href:`/trierarchs/${e.shipId}`,"data-testid":"machine-card-name",className:"inline-flex items-center gap-2 text-section font-semibold hover:underline [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(C,{machine:e,now:r}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(w.LocationTag,{kind:n?.kind??null,description:n?.description}),null===o?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",o.version]})]}),(0,t.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,t.jsx)(b.CapacityBar,{spots:i,caps:o?.caps,testId:"machine-card-capacity",unknownText:null===d?"Unknown until it answers":`Unknown since ${(0,j.clockTime)(d)}`}),null===d?null:(0,t.jsxs)("time",{dateTime:l?.reportedAt,title:(0,j.fullDateTime)(d),className:"text-meta text-muted-foreground",children:["Last answer ",k(d,r)]})]}),(0,t.jsx)(S,{title:"Harnesses, options and flags",children:null===o?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):o.harnesses.map(e=>(0,t.jsx)(T,{harness:e},e.harness))}),(0,t.jsx)(S,{title:"Workspaces",children:null===o?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(B,{workspaces:o.workspaces})})]})}e.s(["HarnessOffer",0,T,"MachineCard",0,z,"MachineLiveness",0,C,"WorkspaceOffer",0,B,"lastAnswer",0,k],94313);let I=`${o.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;e.s(["MachineList",0,function({connection:e,machines:o,ships:m,error:u,onRetry:x,onJoin:p,now:g}){return"none"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}),title:"The trierarch plugin is not set up for this fleet",description:"Crew requests work without it: they wait on Needs crew and you crew each ship by hand with its starting prompt. With the plugin, trierarchs on your machines start, restart and stop those sessions for you.",action:(0,t.jsx)(l.Button,{nativeButton:!1,render:({children:e,...i})=>(0,t.jsx)("a",{href:I,target:"_blank",rel:"noreferrer",...i,children:e}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,t.jsx)(l.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==u?(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:u,onRetry:x}):void 0===o||"unknown"===e?(0,t.jsx)(h.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===o.length?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}),title:"No machines yet",description:"Join a machine: its trierarch then starts sessions there for the crew requests the plugin gives it.",action:p?(0,t.jsx)(l.Button,{variant:"primary",icon:(0,t.jsx)(i.Plus,{"aria-hidden":!0}),onClick:p,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:o.map(e=>(0,t.jsx)(z,{machine:e,spots:(0,r.spotsOf)(e,m),location:m.find(t=>t.id===e.shipId)?.location??null,now:g},e.shipId))})}],42383)},87792,e=>{"use strict";var t=e.i(43476),i=e.i(19759),s=e.i(15905),n=e.i(77880),a=e.i(36779),r=e.i(15034),o=e.i(85538);e.s(["ListLayout",0,function({title:e,description:l,titleMeta:d,primaryAction:c,toolbar:h,live:m,nav:u,onCompose:x,onSearch:p,account:g,banner:f,children:j}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(a.Sidebar,{active:u.active,inboxCount:u.inboxCount,attentionCount:u.attentionCount,needsCrewCount:u.needsCrewCount,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,hasSettings:u.hasSettings,...g}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:m,onCompose:x,onSearch:p}),f,(0,t.jsx)(o.TopBar,{title:e,live:m,account:g,onSearch:p,actions:x?(0,t.jsx)(s.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:x,children:(0,t.jsx)(i.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),d]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),c?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:c}):null]}),h,j]})]}),(0,t.jsx)(r.TabBar,{active:"overview"===u.active||"needs-crew"===u.active?"fleet":"settings"===u.active?void 0:u.active,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,inboxCount:u.inboxCount,attentionCount:u.attentionCount})]})}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92150,e=>{"use strict";var t=e.i(56420);let s={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};s.node;let n=(0,t.default)(s);e.s(["Boxes",0,n],92150)},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let n={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function a({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",n[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:i,className:r}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",r),children:[(0,t.jsx)(a,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",n[e].text),children:n[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"HealthSummary",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(a,{health:e}),(0,t.jsxs)("span",{children:[s," ",n[e].label.toLowerCase()]})]},e))})}])},95960,e=>{"use strict";var t=e.i(43476),s=e.i(92150),n=e.i(49287),a=e.i(86875),i=e.i(63676),r=e.i(90063);let l={"trierarch-plugin":a.ShipWheel,squadrons:s.Boxes,ship:n.Ship};e.s(["LabelChip",0,function({chip:e,onRemove:s,testId:n,className:a,trailing:o}){let d="none"===e.mark?null:l[e.mark],c=`${e.key}=${e.value}`,u="none"===e.mark?"you":e.ownerName;return(0,t.jsxs)("span",{"data-slot":"label-chip","data-testid":n,title:`${c}, by ${u}`,className:(0,r.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",a),children:[null===d?null:(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),o,void 0===s?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${c}`,onClick:s,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(i.X,{"aria-hidden":!0})})]})}])},99261,56539,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let n={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};n.node;let a=(0,s.default)(n);e.s(["ChevronUp",0,a],56539);var i=e.i(71645),r=e.i(95960);e.s(["ShipLabels",0,function({chips:e}){let[s,n]=(0,i.useState)(!1);return 0===e.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"No labels"}):!s&&e.length>2?(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[e.slice(0,2).map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId)),(0,t.jsxs)("button",{type:"button","aria-label":`Show all ${String(e.length)} labels`,"data-testid":"ship-labels-more",className:"inline-flex h-5.5 items-center rounded-sm bg-secondary px-1.5 text-caption font-medium tabular-nums hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",onClick:()=>{n(!0)},children:["+",e.length-2]})]}):(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(function(e){let t=[];for(let s of e){let e="none"===s.mark?null:s.ownerName,n=t.find(t=>t.owner===e);void 0===n?t.push({owner:e,chips:[s]}):n.chips.push(s)}return t})(e).map(e=>(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[null===e.owner?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["by ",e.owner]}),e.chips.map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId))]},e.owner??"")),e.length>2?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 text-meta hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{n(!1)},children:[(0,t.jsx)(a,{"aria-hidden":!0}),"Show fewer"]}):null]})}],99261)},39448,e=>{"use strict";var t=e.i(43476),s=e.i(25913),n=e.i(22016),a=e.i(90063);let i=(0,s.cva)("min-w-0 truncate font-sans font-medium",{variants:{size:{body:"text-body text-foreground",meta:"text-meta text-muted-foreground",title:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch"}},defaultVariants:{size:"body"}});e.s(["ShipName",0,function({name:e,shipId:s,size:r,isSuffixShown:l=!1,isOperator:o=!1,href:d,className:c}){let u=d?(0,t.jsx)(n.default,{href:d,className:(0,a.classNames)(i({size:r}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:e,children:e}):(0,t.jsx)("span",{className:i({size:r}),title:e,children:e});return(0,t.jsxs)("span",{"data-slot":"ship-name",className:(0,a.classNames)("inline-flex min-w-0 items-baseline gap-1.5",c),children:[u,o?(0,t.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,l&&!o?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"· "}),s.slice(-4)]}):null]})}])},4510,e=>{"use strict";var t=e.i(43476),s=e.i(52886),n=e.i(58925),a=e.i(56420);let i={name:"list-x",size:24,node:[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"m15.5 9.5 5 5",key:"ytk86i"}],["path",{d:"m20.5 9.5-5 5",key:"17o44f"}]]};i.node;let r=(0,a.default)(i);var l=e.i(57665),o=e.i(37817),d=e.i(26808),c=e.i(24010),u=e.i(15905),h=e.i(94945),m=e.i(1009),x=e.i(17981);e.s(["CrewReleaseDialog",0,function(e){let{shipName:a,stage:i,isOpen:p,onOpenChange:f,isPending:g,error:b,onConfirm:v}=e,j="crewedByHand"===i.kind?"It was crewed by hand, so stopping that session is up to you.":`Until ${i.trierarch.name} confirms its clean-up, the request shows Releasing.`;return(0,t.jsx)(c.AlertDialog,{open:p,onOpenChange:e=>{g||f(e)},children:(0,t.jsxs)(c.AlertDialogContent,{"data-testid":"crew-release-dialog",className:h.dialogSurface.phoneSheet,children:[(0,t.jsxs)(c.AlertDialogHeader,{children:[(0,t.jsxs)(c.AlertDialogTitle,{children:["Release ",a,"?"]}),(0,t.jsx)(c.AlertDialogDescription,{children:j})]}),(0,t.jsx)(m.ConsequenceList,{consequences:function(e){let{shipName:t,stage:a,sessionLocation:i,inFlightCount:c}=e,u={icon:o.Undo2,text:(0,d.inFlightLine)(c)};if("crewedByHand"===a.kind){let e=i?`the session on ${i}`:"the session crewing it";return[{icon:r,text:"Removes its crew request from Needs crew."},{icon:n.KeyRound,text:`The lease ends: ${e} loses this ship and its secret stops working.`},u]}return[{icon:r,text:"Removes its crew request, so nothing crews it again."},{icon:l.Power,text:`${a.trierarch.name} stops the session and cleans up: the worktree goes if it has no uncommitted changes; with changes it is kept.`},{icon:s.CircleDashed,text:`The lease ends. ${t} shows Awaiting crew.`},u]}(e)}),void 0===b?null:(0,t.jsx)(x.InlineError,{title:"Couldn’t release the ship",description:b}),(0,t.jsxs)(c.AlertDialogFooter,{children:[(0,t.jsx)(c.AlertDialogClose,{render:(0,t.jsx)(u.Button,{disabled:g}),children:"Cancel"}),(0,t.jsx)(u.Button,{variant:"primary",icon:(0,t.jsx)(l.Power,{}),isLoading:g,onClick:v,"data-testid":"crew-release-confirm",children:g?"Releasing":"Release"})]})]})})}],4510)},274,e=>{"use strict";var t=e.i(43476),s=e.i(77880),n=e.i(36779),a=e.i(15034),i=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:r,header:l,children:o,sheet:d,live:c,nav:u,onCompose:h,onSearch:m,account:x,banner:p}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:u.active,inboxCount:u.inboxCount,attentionCount:u.attentionCount,needsCrewCount:u.needsCrewCount,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,hasSettings:u.hasSettings,...x}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(s.Header,{breadcrumb:e,parents:r,live:c,onCompose:h,onSearch:m}),p,(0,t.jsx)(i.TopBar,{title:e,live:c,back:r[r.length-1]??r[0]}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[l,o]})]}),d,(0,t.jsx)(a.TabBar,{active:"overview"===u.active||"needs-crew"===u.active?"fleet":"settings"===u.active?void 0:u.active,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,inboxCount:u.inboxCount,attentionCount:u.attentionCount})]})}])},69693,e=>{"use strict";var t=e.i(46150);function s(e){let t=e.split(";")[0]?.trim().toLowerCase()??"";return"application/json"===t||t.endsWith("+json")}e.s(["formattedPayload",0,function(e,t){if(s(t))try{return JSON.stringify(JSON.parse(e),null,2)}catch{return}},"isJson",0,s,"payloadLabel",0,function(e,n){let a=s(n)?"JSON":n.split(";")[0]?.trim()??n,i=new TextEncoder().encode(e).byteLength;return`${a} \xb7 ${(0,t.counted)(i,{one:"byte",many:"bytes"})}`}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79432,19002,11147,e=>{"use strict";var t=e.i(56420);let s={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"}]]};s.node;let i=(0,t.default)(s);e.s(["Activity",0,i],79432);let r={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};r.node;let n=(0,t.default)(r);e.s(["CirclePause",0,n],19002);let a={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};a.node;let l=(0,t.default)(a);e.s(["OctagonPause",0,l],11147)},26091,e=>{"use strict";var t=e.i(56420);let s={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};s.node;let i=(0,t.default)(s);e.s(["FileText",0,i],26091)},31458,e=>{"use strict";var t=e.i(56420);let s={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};s.node;let i=(0,t.default)(s);e.s(["Flag",0,i],31458)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var s=e.i(66250),i=e.i(2820),r=e.i(56736),n=e.i(9793),a=e.i(84324),l=e.i(64951),o=e.i(77173);let d=e.i(13488).DialogTrigger;var c=e.i(74217),u=e.i(25326);class h extends u.DialogHandle{}e.s(["Backdrop",()=>i.DialogBackdrop,"Close",()=>r.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,h,"Popup",()=>a.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>o.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var m=e.i(34604),m=m,p=e.i(90063),f=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(m.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(m.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:i,...r}){return(0,t.jsxs)(m.Portal,{children:[(0,t.jsx)(m.Backdrop,{"data-slot":"alert-dialog-overlay",className:f.dialogSurface.overlay}),(0,t.jsx)(m.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(f.dialogSurface.popup({size:s}),e),...r,children:i})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(m.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(f.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(f.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(f.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(m.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(f.dialogSurface.title,e),...s})}],24010)},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),i=e.i(19002),r=e.i(11147),n=e.i(90063),a=e.i(49635),l=e.i(93361);let o={working:s.Activity,blocked:r.OctagonPause,idle:i.CirclePause},d={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:s,variant:i,isTimeInTitle:r=!1,testId:c}){let u="full"===i,h=(0,n.classNames)("flex min-w-0 items-center gap-1.5",u?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,n.classNames)(h,"text-muted-foreground"),children:"No report yet"});let m=o[e.state],p=d[l.REPORT_TONES[e.state]],f=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:r?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportText)(e),className:h,children:[(0,t.jsx)(m,{"aria-hidden":!0,className:(0,n.classNames)("size-(--size-icon-sm) shrink-0",p)}),(0,t.jsx)("span",{className:(0,n.classNames)("shrink-0 font-medium",p),children:l.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),r?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,a.fullDateTime)(f),className:"shrink-0 text-muted-foreground tabular-nums",children:u?`\xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportAge)(f,s)})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),s=e.i(71645),i=e.i(46150);let r={one:"delivery",many:"deliveries"};function n(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,i.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function a(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${n(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,i.counted)(e,r)} will be abandoned`},"inFlightLine",0,n,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,a,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,i.counted)(e,r)}`}],26808);var l=e.i(48695),o=e.i(15905),d=e.i(10818),c=e.i(25398),u=e.i(22212),h=e.i(94945),m=e.i(19321),p=e.i(66616),f=e.i(61966),g=e.i(60592);function x({crewLines:e,subject:i,testIdPrefix:r,onCopied:n,onCopyFailed:a}){let[l,o]=(0,s.useState)(e[0]?.harness),d=e.find(e=>e.harness===l)??e[0];if(!d)return null;let c=(0,p.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(g.Tabs,{value:d.harness,onValueChange:t=>{let s=e.find(e=>e.harness===t);s&&o(s.harness)},children:(0,t.jsx)(g.TabsList,{"aria-label":`Crew ${i} from`,children:e.map(e=>(0,t.jsx)(g.TabsTrigger,{value:e.harness,"data-testid":`${r}-${e.harness}-tab`,children:(0,p.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${r}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(f.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${i}`,isLabeled:!0,onCopied:n,onCopyFailed:a,"data-testid":`${r}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,x],82880);var b=e.i(17981),v=e.i(26091);function w({note:e,model:s,template:i,testId:r}){return null===e&&null===s?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(v.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===i?"":` \xb7 ${i}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":r,children:e}),null!==s&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:s})]})]})]})}function y({memberName:e,template:s,launchNote:i,model:r,crewLines:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{note:i,model:r,template:s,testId:"crew-line-launch-note"}),(0,t.jsx)(x,{crewLines:n,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function j({memberName:e,state:s,template:i,launchNote:r=null,model:n=null,crewLines:a,error:l,isOpen:d,onOpenChange:p,onConfirm:f}){let g="issuing"===s;return(0,t.jsx)(u.Dialog,{open:d,onOpenChange:e=>{g||p(e)},children:(0,t.jsxs)(u.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:h.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsxs)(u.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(u.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),g&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(m.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(m.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===s&&void 0!==a&&(0,t.jsx)(y,{memberName:e,template:i,launchNote:r,model:n,crewLines:a}),"error"===s&&(0,t.jsx)(b.InlineError,{title:"Couldn’t issue a crew line",description:`${l??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(u.DialogFooter,{children:[("shown"===s||g)&&(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary","data-testid":"crew-line-done",disabled:g}),children:"Done"}),"error"===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:f,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,w],3067),e.s(["CrewLineDialog",0,j],42211);var k=e.i(24010);function N({memberName:e,replacedText:s,isOpen:i,onOpenChange:r,onConfirm:n}){return(0,t.jsx)(k.AlertDialog,{open:i,onOpenChange:r,children:(0,t.jsxs)(k.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:h.dialogSurface.phoneSheet,children:[(0,t.jsxs)(k.AlertDialogHeader,{children:[(0,t.jsxs)(k.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(k.AlertDialogDescription,{children:s??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(k.AlertDialogFooter,{children:[(0,t.jsx)(k.AlertDialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:n,children:"Get new crew line"})]})]})})}function C(e){let i=(0,l.useNewCrewLine)(),[r,n]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(void 0),h=()=>{e&&i.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},m=i.data?"shown":i.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(i.reset(),u(a(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{memberName:e.member.name,replacedText:c,isOpen:o,onOpenChange:d,onConfirm:()=>{d(!1),n(!0),h()}}),(0,t.jsx)(j,{memberName:e.member.name,state:m,template:e.template,launchNote:i.data?.launchNote,model:i.data?.model,crewLines:i.data?.crewLines,error:i.error?.message,isOpen:r,onOpenChange:e=>{n(e),e||i.reset()},onConfirm:h})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:s,...i}){let r=C(i);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!r.isReady,"data-testid":s,onClick:r.start,children:"Get new crew line"}),r.dialog]})},"useNewCrewLineFlow",0,C],39874)},10649,78608,87851,75774,e=>{"use strict";e.i(31627);var t=e.i(9677),s=e.i(83615),i=e.i(14695);function r(e,t){for(let s of t)e.includes(s)||e.push(s)}function n(e){return Object.fromEntries((e?.options??[]).flatMap(e=>{let t=e.defaultValue??e.values[0];return void 0===t?[]:[[e.name,t]]}))}function a(e){let[t]=e?.repositories??[];if(void 0!==t)return{kind:"worktree",repository:t};let[s]=e?.folders??[];return void 0===s?void 0:{kind:"folder",name:s}}function l(e){let[t]=e;return{harness:t?.harness??"",workspace:a(t),options:n(t),firstPrompt:"",squadron:"",machineLabels:[]}}function o(e,t){let{harness:s,offers:i}=t,r=i.find(e=>e.harness===s),l=e.workspace,o=void 0!==l&&("worktree"===l.kind?r?.repositories.includes(l.repository)??!1:r?.folders.includes(l.name)??!1);return{...e,harness:s,workspace:o?l:a(r),options:n(r)}}let d=new TextEncoder;function c(e){return d.encode(e).byteLength}function u(e){return e<1024?`${String(e)} B`:`${(e/1024).toFixed(1).replace(/\.0$/,"")} KB`}e.s(["byteSize",0,u,"defaultValues",0,l,"offersOf",0,function(e){let t=[];for(let s of e)if(!s.isSilent&&null!==s.details)for(let e of s.details.harnesses){let n=t.find(t=>t.harness===e.harness);for(let a of(void 0===n&&(n={harness:e.harness,repositories:[],folders:[],options:[]},t.push(n)),r(n.repositories,s.details.workspaces.repositories),r(n.folders,s.details.workspaces.folders),(0,i.harnessOptions)(e.options))){let e=n.options.find(e=>e.name===a.name);void 0===e?n.options.push({...a,values:[...a.values]}):(r(e.values,a.values),e.defaultValue??=a.defaultValue)}}return t},"promptBytes",0,c,"settingsOf",0,function(e){if(""!==e.harness&&void 0!==e.workspace)return{harness:e.harness,workspace:e.workspace,options:e.options,...""===e.firstPrompt?{}:{firstPrompt:e.firstPrompt},...""===e.squadron?{}:{squadron:e.squadron},...0===e.machineLabels.length?{}:{machineLabels:e.machineLabels.flatMap(e=>{let t=(0,s.idSchema)("labelValue").safeParse(e);return t.success?[t.data]:[]})}}},"settingsRows",0,function(e){let s=t.crewSettingsSchema.safeParse(e);if(!s.success)return;let{harness:i,workspace:r,options:n,firstPrompt:a,squadron:l}=s.data;return[{label:"Harness",value:i},"worktree"===r.kind?{label:"Workspace",value:r.repository,meta:"New worktree"}:{label:"Workspace",value:r.name,meta:"Folder, as it is"},...Object.entries(n).map(([e,t])=>({label:e,value:"string"==typeof t?t:JSON.stringify(t),isMono:!0})),{label:"First prompt",value:void 0===a?null:u(c(a))},{label:"Squadron",value:l??null,isMono:!0}]},"valuesOf",0,function(e,s){let i=t.crewSettingsSchema.safeParse(e);if(!i.success)return l(s);let{harness:r,workspace:n,options:a,firstPrompt:o,squadron:d,machineLabels:c}=i.data;return{harness:r,workspace:"worktree"===n.kind?{kind:"worktree",repository:n.repository}:{kind:"folder",name:n.name},options:Object.fromEntries(Object.entries(a).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[])),firstPrompt:o??"",squadron:d??"",machineLabels:[...c??[]]}},"withHarness",0,o],10649);var h=e.i(80581);function m(e,t){return e.ships.find(e=>e.id===t.shipId)?.labels.map(e=>e.valueId)??[]}function p(e){return 1===e?{these:"this label",carries:"carries it"}:2===e?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}e.s(["machineLabelIdsOf",0,function(e){let s=t.crewSettingsSchema.safeParse(e);return s.success?[...s.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(e,t){return{groups:function(e,t){let s=t.map(t=>m(e,t)),i=[],r=[];for(let t of e.labels){let n=t.values.map(e=>({valueId:e.id,value:e.value,shipCount:s.filter(t=>t.includes(e.id)).length})),a={labelId:t.id,key:t.key,mark:e.ownerOf.get(t.id)?.mark??"ship",values:n};(n.some(e=>e.shipCount>0)?i:r).push(a)}let n=(e,t)=>e.key.localeCompare(t.key);return[{title:"On machines",keys:i.toSorted(n)},{title:"On no machine yet",keys:r.toSorted(n)}].filter(e=>e.keys.length>0)}(e,t),chipsOf:t=>(0,h.pickedChips)(t,e),matchOf:s=>{var i;return{matching:(i={machines:t,valueIds:s}).machines.filter(t=>{let s=m(e,t);return i.valueIds.every(e=>s.includes(e))}).map(e=>e.name),total:i.machines.length}}}},"machineLabelsText",0,function(e){let t=e.map(e=>`${e.key}=${e.value}`);return t.length<=2?t.join(" and "):`${t.slice(0,-1).join(", ")} and ${t.at(-1)??""}`},"noMatchWords",0,p],78608);var f=e.i(43476),g=e.i(71645),x=e.i(66616),b=e.i(91727),v=e.i(46033),w=e.i(43988),y=e.i(17981),j=e.i(93669),k=e.i(74544),N=e.i(77071),C=e.i(22016),S=e.i(15905),O=e.i(6734),T=e.i(95960),R=e.i(92150),P=e.i(24071),D=e.i(67927),$=e.i(66595),L=e.i(49287),M=e.i(86875),E=e.i(90063),I=e.i(12470);let A={"trierarch-plugin":M.ShipWheel,squadrons:R.Boxes,ship:L.Ship};function q(e,t){return`${String(e)} ${1===e?t:`${t}s`}`}function z({groups:e,pickedValueIds:t,onPick:s,size:i="sm",pickedWord:r="Picked",countWord:n="ship"}){let[a,l]=(0,g.useState)(""),[o,d]=(0,g.useState)(void 0),c="touch"===i,u=(0,E.classNames)("flex w-full items-center gap-2 rounded-sm px-2 text-left hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50",c?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==o)return(0,f.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,f.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 font-mono text-body hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{d(void 0)},"aria-label":`Back to the keys, from ${o.key}`,children:[(0,f.jsx)(P.ChevronLeft,{"aria-hidden":!0}),o.key,"="]}),(0,f.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===n?"Ships":"Machines"," with each"]})]}),(0,f.jsx)("ul",{className:"flex flex-col",children:o.values.map(e=>{let i=t.includes(e.valueId);return(0,f.jsx)("li",{children:(0,f.jsxs)("button",{type:"button",className:u,disabled:i,"data-testid":"label-picker-value",onClick:()=>{s(e.valueId),d(void 0),l("")},children:[(0,f.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:e.value}),(0,f.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:i?r:q(e.shipCount,n)})]})},e.valueId)})})]});let h=a.trim().toLowerCase(),m=e.map(e=>({...e,keys:e.keys.filter(e=>""===h||e.key.includes(h))})).filter(e=>e.keys.length>0);return(0,f.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,f.jsx)(I.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:c?"touch":"md",leadingIcon:(0,f.jsx)($.Search,{}),value:a,onChange:e=>{l(e.target.value)}}),0===m.length?(0,f.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===e.length?"The fleet has no labels yet.":`No key matches “${a.trim()}”.`}):m.map(e=>(0,f.jsxs)("div",{className:"flex flex-col",children:[(0,f.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:e.title}),(0,f.jsx)("ul",{className:"flex flex-col",children:e.keys.map(e=>{let t="none"===e.mark?null:A[e.mark];return(0,f.jsx)("li",{children:(0,f.jsxs)("button",{type:"button",className:(0,E.classNames)(u,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{d(e)},children:[null===t?null:(0,f.jsx)(t,{"aria-hidden":!0}),(0,f.jsx)("span",{className:"font-mono",children:e.key}),(0,f.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:q(e.values.length,"value")}),(0,f.jsx)(D.ChevronRight,{"aria-hidden":!0})]})},e.labelId)})})]},e.title))]})}function _({groups:e,picked:t,isDisabled:s,onAdd:i}){let[r,n]=(0,g.useState)(!1);return(0,f.jsxs)(O.Popover,{open:r,onOpenChange:n,children:[(0,f.jsx)(O.PopoverTrigger,{render:(0,f.jsx)(S.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,f.jsx)(N.Plus,{}),disabled:s,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,f.jsxs)(O.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,f.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,f.jsx)(z,{groups:e,pickedValueIds:t.map(e=>e.valueId),countWord:"machine",onPick:e=>{n(!1),i(e)}}),(0,f.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,f.jsx)(C.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}function F({shipName:e,picked:t,groups:s,match:i,isDisabled:r,onAdd:n,onRemove:a}){let l=p(t.length);return(0,f.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,f.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,f.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,f.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===t.length?(0,f.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,t.map((e,t)=>(0,f.jsxs)(g.Fragment,{children:[0===t?null:(0,f.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,f.jsx)(T.LabelChip,{chip:e,testId:"machine-label",...r?{}:{onRemove:()=>{a(e.valueId)}}})]},e.valueId)),t.length>=j.SHIP_LABELS_MAX?null:(0,f.jsx)(_,{groups:s,picked:t,isDisabled:r,onAdd:n})]}),0===t.length?null:0===i.matching.length?(0,f.jsxs)("p",{role:"status","data-testid":"machine-labels-match",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,f.jsx)(k.Clock,{"aria-hidden":!0}),(0,f.jsxs)("span",{children:["No machine matches ",l.these,". You can still request: it waits on Needs crew until a machine ",l.carries,"."]})]}):(0,f.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",i.matching.length," of ",i.total," ",1===i.total?"machine":"machines",": ",i.matching.join(", "),"."]}),(0,f.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}function H({id:e,label:t,isOptional:s,hint:i,error:r,children:n}){return(0,f.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,f.jsxs)(b.Label,{htmlFor:e,children:[t,s?(0,f.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"}):null]}),n,void 0===i?null:(0,f.jsx)("p",{className:"text-meta text-muted-foreground",children:i}),void 0===r?null:(0,f.jsx)(y.InlineError,{variant:"field",title:r})]})}function B({id:e,items:t,value:s,onPick:i,isDisabled:r,testId:n}){return(0,f.jsxs)(v.Select,{items:t,value:s,disabled:r,onValueChange:e=>{"string"==typeof e&&i(e)},children:[(0,f.jsx)(v.SelectTrigger,{id:e,className:"h-(--size-control) w-full","data-testid":n,children:(0,f.jsx)(v.SelectValue,{})}),(0,f.jsx)(v.SelectContent,{children:Object.entries(t).map(([e,t])=>(0,f.jsx)(v.SelectItem,{value:e,children:t},e))})]})}e.s(["LabelPicker",0,z],87851),e.s(["CrewSettingsFields",0,function({offers:e,values:s,onChange:i,squadrons:r,refusal:n,isDisabled:a=!1,machineLabels:l}){var d;let h={harness:(0,g.useId)(),workspace:(0,g.useId)(),options:(0,g.useId)(),firstPrompt:(0,g.useId)(),squadron:(0,g.useId)()},m=e.find(e=>e.harness===s.harness),p=e=>n?.field===e?n.reason:void 0,b=c(s.firstPrompt),v=b>t.FIRST_PROMPT_MAX_BYTES,y=Object.fromEntries([...(m?.repositories??[]).map(e=>[`worktree:${e}`,`${e} \xb7 new worktree`]),...(m?.folders??[]).map(e=>[`folder:${e}`,`${e} \xb7 folder, as it is`])]);return(0,f.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"crew-settings-fields",children:[(0,f.jsx)(H,{id:h.harness,label:"Harness",error:p("harness"),children:(0,f.jsx)(B,{id:h.harness,items:Object.fromEntries(e.map(e=>[e.harness,(0,x.harnessWord)(e.harness)])),value:s.harness,isDisabled:a,testId:"crew-settings-harness",onPick:t=>{i(o(s,{harness:t,offers:e}))}})}),(0,f.jsx)(H,{id:h.workspace,label:"Workspace",hint:"A repository gets a new git worktree for this ship; a folder is used as it is, shared by the ships in it.",error:p("workspace"),children:(0,f.jsx)(B,{id:h.workspace,items:y,value:void 0===(d=s.workspace)?"":"worktree"===d.kind?`worktree:${d.repository}`:`folder:${d.name}`,isDisabled:a,testId:"crew-settings-workspace",onPick:e=>{i({...s,workspace:function(e){let[t,...s]=e.split(":"),i=s.join(":");return"worktree"===t?{kind:"worktree",repository:i}:"folder"===t?{kind:"folder",name:i}:void 0}(e)})}})}),void 0===l?null:(0,f.jsx)(F,{shipName:l.shipName,picked:l.chipsOf(s.machineLabels),groups:l.groups,match:l.matchOf(s.machineLabels),isDisabled:a,onAdd:e=>{i({...s,machineLabels:[...s.machineLabels,e]})},onRemove:e=>{i({...s,machineLabels:s.machineLabels.filter(t=>t!==e)})}}),(m?.options??[]).map((e,t)=>(0,f.jsx)(H,{id:`${h.options}-${String(t)}`,label:e.name,error:0===t?p("options"):void 0,children:(0,f.jsx)(B,{id:`${h.options}-${String(t)}`,items:Object.fromEntries(e.values.map(t=>[t,t===e.defaultValue?`${t} (default)`:t])),value:s.options[e.name]??"",isDisabled:a,testId:`crew-settings-option-${e.name}`,onPick:t=>{i({...s,options:{...s.options,[e.name]:t}})}})},e.name)),(0,f.jsx)(H,{id:h.firstPrompt,label:"First prompt",isOptional:!0,hint:(0,f.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,f.jsx)("span",{children:"The session starts with it, on its first start only."}),(0,f.jsxs)("span",{className:"tabular-nums",children:[u(b)," of ",u(t.FIRST_PROMPT_MAX_BYTES)]})]}),error:v?`A first prompt is at most ${u(t.FIRST_PROMPT_MAX_BYTES)}.`:p("firstPrompt"),children:(0,f.jsx)(w.Textarea,{id:h.firstPrompt,rows:3,disabled:a,"aria-invalid":!!v||void 0,"data-testid":"crew-settings-first-prompt",value:s.firstPrompt,onChange:e=>{i({...s,firstPrompt:e.target.value})}})}),void 0===r?null:(0,f.jsx)(H,{id:h.squadron,label:"Squadron",isOptional:!0,hint:"The session starts with that squadron’s crew line and template.",error:p("squadron"),children:(0,f.jsx)(B,{id:h.squadron,items:{"":"None",...Object.fromEntries(r.map(e=>[e,e]))},value:s.squadron,isDisabled:a,testId:"crew-settings-squadron",onPick:e=>{i({...s,squadron:e})}})})]})}],75774)},66616,e=>{"use strict";let t={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function s(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":s(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,s])},93361,e=>{"use strict";e.i(31627);var t=e.i(94661),s=e.i(49635);let i={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,i,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,t){let i=Math.max(0,t.getTime()-e.getTime());return i<6e4?`${String(Math.floor(i/1e3))} s`:i<36e5?`${String(Math.floor(i/6e4))} min`:i<864e5?`${String(Math.floor(i/36e5))} h`:(0,s.relativeTime)(e,t)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String((0,t.reportDetailsBytes)(e))} bytes`},"reportText",0,function(e){let t=i[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,t){let i=(0,s.relativeTime)(e,t);return`reported ${"Just now"===i?"just now":i}`}])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),s=e.i(19273),i=e.i(12598),r=e.i(81384),n=e.i(73664),a=e.i(27001),l=e.i(54440),o=e.i(71645),d=e.i(15823),c=e.i(40143),u=e.i(69230);function h(e,t){let s=new Set(t);return e.filter(e=>!s.has(e))}var m=class extends d.Subscribable{#e;#t;#s;#i;#r;#n;#a;#l;#o;#d=[];constructor(e,t,s){super(),this.#e=e,this.#i=s,this.#s=[],this.#r=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#r.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#s=e,this.#i=t,c.notifyManager.batch(()=>{let e=this.#r,t=this.#u(this.#s);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let i=t.map(e=>e.observer),r=i.map(e=>e.getCurrentResult()),n=e.length!==i.length,a=i.some((t,s)=>t!==e[s]),l=n||a,o=!!l||r.some((e,t)=>{let i=this.#t[t];return!i||!(0,s.shallowEqualObjects)(e,i)});(l||o)&&(l&&(this.#d=t,this.#r=i),this.#t=r,this.hasListeners()&&(l&&(h(e,i).forEach(e=>{e.destroy()}),h(i,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){let s=this.#u(e),i=s.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),r=s.map(e=>e.defaultedQueryOptions.queryHash);return[i,e=>this.#m(e??i,t,r),()=>this.#p(i,s)]}#p(e,t){let s=new Set;return t.map((i,r)=>{let n=e[r];return i.defaultedQueryOptions.notifyOnChangeProps?n:i.observer.trackResult(n,e=>{s.has(e)||(s.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#m(e,t,i){if(t){let r=this.#o,n=void 0!==i&&void 0!==r&&(r.length!==i.length||i.some((e,t)=>e!==r[t]));return(this.#t!==this.#l||n||t!==this.#a)&&(this.#a=t,this.#l=this.#t,void 0!==i&&(this.#o=i),this.#n=(0,s.replaceEqualDeep)(this.#n,t(e))),this.#n}return e}#f(){return!this.#i?.combine||this.#r.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#u(e){let t=new Map;this.#r.forEach(e=>{let s=e.options.queryHash;if(!s)return;let i=t.get(s);i?i.push(e):t.set(s,[e])});let s=[];return e.forEach(e=>{let i=this.#e.defaultQueryOptions(e),r=t.get(i.queryHash)?.shift()??new u.QueryObserver(this.#e,i);s.push({defaultedQueryOptions:i,observer:r})}),s}#c(e,t){let s=this.#r.indexOf(e);-1!==s&&(this.#t=this.#t.slice(),this.#t[s]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#n,s=e?t:this.#m(this.#p(this.#t,this.#d),this.#i?.combine);(e||t!==s)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),f=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?s.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?s.skipToken:{shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let d=(0,g.useTRPC)(),h=function({queries:e,...t}){let d=(0,i.useQueryClient)(void 0),h=(0,r.useIsRestoring)(),p=(0,n.useQueryErrorResetBoundary)(),f=!1!==t.subscribed,g=o.useMemo(()=>e.map(e=>{let t=d.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":f?"optimistic":void 0,t}),[e,d,h,f]);g.forEach(e=>{(0,l.ensureSuspenseTimers)(e);let t=d.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,a.useClearResetErrorBoundary)(p);let[x]=o.useState(()=>new m(d,g,t)),[b,v,w]=x.getOptimisticResult(g,t.combine),y=!h&&f;o.useSyncExternalStore(o.useCallback(e=>y?x.subscribe(c.notifyManager.batchCalls(e)):s.noop,[x,y]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),o.useEffect(()=>{x.setQueries(g,t)},[g,t,x]);let j=b.some((e,t)=>(0,l.shouldSuspend)(g[t],e))?b.flatMap((e,t)=>{let s=g[t];if(s&&(0,l.shouldSuspend)(s,e)){let e=new u.QueryObserver(d,s);return(0,l.fetchOptimistic)(s,e,p)}return[]}):[];if(j.length>0)throw Promise.all(j);let k=b.find((e,t)=>{let s=g[t];return s&&(0,a.getHasError)({result:e,errorResetBoundary:p,throwOnError:s.throwOnError,query:d.getQueryCache().get(s.queryHash),suspense:s.suspense})});if(k)throw k.error;return v(w())}({queries:e.flatMap(e=>{let s=(0,t.idSchema)("ship").safeParse(e);return s.success?[s.data]:[]}).map(e=>d.fleet.ship.queryOptions({shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of h)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);