@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeolus-fleet/console",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "description": "Aeolus operator web app (Next.js).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
39
39
  "postpack": "rm LICENSE"
40
40
  },
41
41
  "dependencies": {
42
- "@aeolus-fleet/common": "0.20.0",
42
+ "@aeolus-fleet/common": "0.20.1",
43
43
  "@base-ui/react": "^1.8.0",
44
44
  "@hookform/resolvers": "^5.9.1",
45
45
  "@tailwindcss/postcss": "^4.3.3",
@@ -59,7 +59,7 @@
59
59
  "tw-animate-css": "^1.4.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@aeolus-fleet/core": "0.20.0",
62
+ "@aeolus-fleet/core": "0.20.1",
63
63
  "@storybook/addon-vitest": "^10.6.1",
64
64
  "@storybook/nextjs-vite": "^10.6.1",
65
65
  "@types/react": "^19.3.0",
@@ -1,3 +0,0 @@
1
- module.exports=[38688,67594,92175,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Activity",0,d],38688);let e={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"]};e.node;let f=(0,b.default)(e);a.s(["CirclePause",0,f],67594);let g={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"]};g.node;let h=(0,b.default)(g);a.s(["OctagonPause",0,h],92175)},63359,a=>{"use strict";var b=a.i(64831);let c={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};c.node;let d=(0,b.default)(c);a.s(["AppWindow",0,d],63359)},82260,a=>{"use strict";var b=a.i(64831);let c={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};c.node;let d=(0,b.default)(c);a.s(["Bot",0,d],82260)},39977,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Boxes",0,d],39977)},83138,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["FileText",0,d],83138)},25039,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Flag",0,d],25039)},53783,a=>{"use strict";var b=a.i(64831);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["SquareTerminal",0,d],53783)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},82314,85650,a=>{"use strict";var b=a.i(87924),c=a.i(52562),d=a.i(64831);let e={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"}]]};e.node;let f=(0,d.default)(e);a.s(["Copy",0,f],85650);var g=a.i(72131),h=a.i(12068);a.s(["CopyButton",0,function({value:a,label:d,size:e="xs",isLabeled:i=!1,onCopied:j,onCopyFailed:k,className:l,"data-testid":m}){let[n,o]=(0,g.useState)(!1);async function p(){try{await navigator.clipboard.writeText(a)}catch{k?.();return}o(!0),j?.(),setTimeout(()=>{o(!1)},1500)}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"ghost",size:e,isIconOnly:!i,"aria-label":d,title:i?void 0:d,icon:n?(0,b.jsx)(c.Check,{"aria-hidden":!0}):(0,b.jsx)(f,{"aria-hidden":!0}),className:l,"data-testid":m,onClick:()=>{p()},children:i?n?"Copied":"Copy":null}),(0,b.jsx)("span",{role:"status",className:"sr-only",children:n?"Copied.":""})]})}],82314)},36501,a=>{"use strict";var b=a.i(87924),c=a.i(39977),d=a.i(98238),e=a.i(23636),f=a.i(74215),g=a.i(80487);let h={"trierarch-plugin":e.ShipWheel,squadrons:c.Boxes,ship:d.Ship};a.s(["LabelChip",0,function({chip:a,onRemove:c,testId:d,className:e,trailing:i}){let j="none"===a.mark?null:h[a.mark],k=`${a.key}=${a.value}`,l="none"===a.mark?"you":a.ownerName;return(0,b.jsxs)("span",{"data-slot":"label-chip","data-testid":d,title:`${k}, by ${l}`,className:(0,g.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",e),children:[null===j?null:(0,b.jsx)(j,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a.key,"="]}),(0,b.jsx)("span",{className:"font-medium",children:a.value})]}),i,void 0===c?null:(0,b.jsx)("button",{type:"button","aria-label":`Remove ${k}`,onClick:c,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,b.jsx)(f.X,{"aria-hidden":!0})})]})}])},40108,a=>{"use strict";var b=a.i(87924),c=a.i(63359),d=a.i(82260),e=a.i(64831);let f={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};f.node;let g=(0,e.default)(f),h={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};h.node;let i=(0,e.default)(h),j={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};j.node;let k=(0,e.default)(j),l={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};l.node;let m=(0,e.default)(l),n={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};n.node;let o=(0,e.default)(n);var p=a.i(53783),q=a.i(25212),r=a.i(80487),s=a.i(67042),t=a.i(29703);let u={DEVICE:i,CLOUD:g,SERVER:o,OTHER:k},v={coding:p.SquareTerminal,chat:m,bot:d.Bot,console:c.AppWindow},w={md:"text-body",sm:"text-meta"};a.s(["LocationTag",0,function({kind:a,description:c=null,harness:d=null,isCompact:e=!1,size:f="md",className:g}){let h=(0,r.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",w[f],g);if(null===a)return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(q.Unplug,{"aria-hidden":!0}),"No session"]});let i=u[a],j=(0,t.locationKindWord)(a),k=null===c?j:`${j} \xb7 ${c}`;if(null!==d){let a=(0,s.harnessKind)(d),e=void 0===a?void 0:v[a],f=(0,s.harnessWord)(d);return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:null===c?`${f} \xb7 ${j}`:`${f} \xb7 ${j}: ${c}`,children:[void 0===e?null:(0,b.jsx)(e,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate text-foreground",children:f}),(0,b.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate",children:j}),null===c?null:(0,b.jsxs)("span",{className:"sr-only",children:[": ",c]})]})}return e?(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:k,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"sr-only",children:[j,": "]}),(0,b.jsx)("span",{className:"truncate text-foreground",children:c??j})]}):(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[j,null===c?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,b.jsx)("span",{className:"sr-only",children:", "}),(0,b.jsx)("span",{className:"text-foreground",children:c})]})]})]})}],40108)},92717,a=>{"use strict";var b=a.i(87924),c=a.i(38688),d=a.i(67594),e=a.i(92175),f=a.i(80487),g=a.i(72872),h=a.i(45185);let i={working:c.Activity,blocked:e.OctagonPause,idle:d.CirclePause},j={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};a.s(["ReportLine",0,function({report:a,now:c,variant:d,isTimeInTitle:e=!1,testId:k}){let l="full"===d,m=(0,f.classNames)("flex min-w-0 items-center gap-1.5",l?"text-body":"text-meta");if(null===a)return(0,b.jsx)("span",{"data-testid":k,"data-state":"none",className:(0,f.classNames)(m,"text-muted-foreground"),children:"No report yet"});let n=i[a.state],o=j[h.REPORT_TONES[a.state]],p=new Date(a.reportedAt);return(0,b.jsxs)("span",{"data-testid":k,"data-state":a.state,title:e?`${(0,h.reportText)(a)} \xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportText)(a),className:m,children:[(0,b.jsx)(n,{"aria-hidden":!0,className:(0,f.classNames)("size-(--size-icon-sm) shrink-0",o)}),(0,b.jsx)("span",{className:(0,f.classNames)("shrink-0 font-medium",o),children:h.REPORT_STATE_WORDS[a.state]}),null===a.note?null:(0,b.jsx)("span",{className:"min-w-0 truncate text-foreground",children:a.note}),e?null:(0,b.jsx)("time",{dateTime:a.reportedAt,title:(0,g.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:l?`\xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportAge)(p,c)})]})}])},42231,46444,21327,3842,52702,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(31429);let e={one:"delivery",many:"deliveries"};function f(a){if(0===a)return"Nothing is in flight, so no delivery moves.";let b=1===a?"returns":"return";return`${(0,d.counted)(a,{one:"in-flight delivery",many:"in-flight deliveries"})} ${b} to pending. Nothing is lost.`}function g(a){if("crewed"===a.status){let b=null===a.location?"the session crewing it":`the session on ${a.location.description??a.location.kind.toLowerCase()}`;return`This ends ${b}. ${f(a.inFlightDeliveries)}`}if(null!==a.startingPrompt&&!a.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}a.s(["abandonedLine",0,function(a){return`${(0,d.counted)(a,e)} will be abandoned`},"inFlightLine",0,f,"isTypedMatch",0,function(a,b){return b===a},"newCrewLineReplaced",0,g,"retireButtonLabel",0,function(a){return 0===a?"Retire ship":`Retire and abandon ${(0,d.counted)(a,e)}`}],46444);var h=a.i(12540),i=a.i(12068),j=a.i(52357),k=a.i(48819),l=a.i(18441),m=a.i(2374),n=a.i(33809),o=a.i(67042),p=a.i(82314),q=a.i(94777);function r({crewLines:a,subject:d,testIdPrefix:e,onCopied:f,onCopyFailed:g}){let[h,i]=(0,c.useState)(a[0]?.harness),j=a.find(a=>a.harness===h)??a[0];if(!j)return null;let k=(0,o.crewLineHarnessWord)(j.harness);return(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,b.jsx)(q.Tabs,{value:j.harness,onValueChange:b=>{let c=a.find(a=>a.harness===b);c&&i(c.harness)},children:(0,b.jsx)(q.TabsList,{"aria-label":`Crew ${d} from`,children:a.map(a=>(0,b.jsx)(q.TabsTrigger,{value:a.harness,"data-testid":`${e}-${a.harness}-tab`,children:(0,o.crewLineHarnessWord)(a.harness)},a.harness))})}),(0,b.jsx)("code",{"data-testid":`${e}-${j.harness}`,title:j.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:j.line}),(0,b.jsx)(p.CopyButton,{value:j.line,label:`Copy the ${k} crew line for ${d}`,isLabeled:!0,onCopied:f,onCopyFailed:g,"data-testid":`${e}-${j.harness}-copy`})]})}a.s(["CompactCrewLine",0,r],21327);var s=a.i(40392),t=a.i(83138);function u({note:a,model:c,template:d,testId:e}){return null===a&&null===c?null:(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,b.jsx)(t.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===d?"":` \xb7 ${d}`]}),null!==a&&(0,b.jsx)("span",{"data-testid":e,children:a}),null!==c&&(0,b.jsxs)("span",{children:["Runs ",(0,b.jsx)("span",{className:"font-mono",children:c})]})]})]})}function v({memberName:a,template:c,launchNote:d,model:e,crewLines:f}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{note:d,model:e,template:c,testId:"crew-line-launch-note"}),(0,b.jsx)(r,{crewLines:f,subject:a,testIdPrefix:"crew-line-text"}),(0,b.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,b.jsx)(j.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.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:a,state:c,template:d,launchNote:e=null,model:f=null,crewLines:g,error:h,isOpen:j,onOpenChange:o,onConfirm:p}){let q="issuing"===c;return(0,b.jsx)(l.Dialog,{open:j,onOpenChange:a=>{q||o(a)},children:(0,b.jsxs)(l.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:m.dialogSurface.phoneFullScreen,children:[(0,b.jsxs)(l.DialogHeader,{children:[(0,b.jsxs)(l.DialogTitle,{children:["Crew line for ",a]}),(0,b.jsx)(l.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."})]}),q&&(0,b.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,b.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,b.jsx)(n.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,b.jsx)(n.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===c&&void 0!==g&&(0,b.jsx)(v,{memberName:a,template:d,launchNote:e,model:f,crewLines:g}),"error"===c&&(0,b.jsx)(s.InlineError,{title:"Couldn’t issue a crew line",description:`${h??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,b.jsxs)(l.DialogFooter,{children:[("shown"===c||q)&&(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{variant:"primary","data-testid":"crew-line-done",disabled:q}),children:"Done"}),"error"===c&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Close"}),(0,b.jsx)(i.Button,{variant:"primary",icon:(0,b.jsx)(k.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:p,children:"Try again"})]})]})]})})}a.s(["LaunchNote",0,u],3842),a.s(["CrewLineDialog",0,w],52702);var x=a.i(59613);function y({memberName:a,replacedText:c,isOpen:d,onOpenChange:e,onConfirm:f}){return(0,b.jsx)(x.AlertDialog,{open:d,onOpenChange:e,children:(0,b.jsxs)(x.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:m.dialogSurface.phoneSheet,children:[(0,b.jsxs)(x.AlertDialogHeader,{children:[(0,b.jsxs)(x.AlertDialogTitle,{children:["Get a new crew line for ",a,"?"]}),(0,b.jsx)(x.AlertDialogDescription,{children:c??"Its new secret is shown once, with its launch note."})]}),(0,b.jsxs)(x.AlertDialogFooter,{children:[(0,b.jsx)(x.AlertDialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Cancel"}),(0,b.jsx)(i.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:f,children:"Get new crew line"})]})]})})}function z(a){let d=(0,h.useNewCrewLine)(),[e,f]=(0,c.useState)(!1),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(void 0),m=()=>{a&&d.mutate({squadronId:a.squadronId,shipId:a.member.shipId})},n=d.data?"shown":d.isError?"error":"issuing";return{isReady:a?.ship!==void 0,start:()=>{a?.ship&&(d.reset(),l(g(a.ship)),j(!0))},dialog:a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{memberName:a.member.name,replacedText:k,isOpen:i,onOpenChange:j,onConfirm:()=>{j(!1),f(!0),m()}}),(0,b.jsx)(w,{memberName:a.member.name,state:n,template:a.template,launchNote:d.data?.launchNote,model:d.data?.model,crewLines:d.data?.crewLines,error:d.error?.message,isOpen:e,onOpenChange:a=>{f(a),a||d.reset()},onConfirm:m})]}):null}}a.s(["GetNewCrewLine",0,function({isPrimary:a=!1,testId:c,...d}){let e=z(d);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.Button,{size:"xs",variant:a?"primary":"secondary",disabled:!e.isReady,"data-testid":c,onClick:e.start,children:"Get new crew line"}),e.dialog]})},"useNewCrewLineFlow",0,z],42231)},45185,a=>{"use strict";a.i(23600);var b=a.i(90407),c=a.i(72872);let d={working:"Working",blocked:"Blocked",idle:"Idle"};a.s(["REPORT_STATE_WORDS",0,d,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(a,b){let d=Math.max(0,b.getTime()-a.getTime());return d<6e4?`${String(Math.floor(d/1e3))} s`:d<36e5?`${String(Math.floor(d/6e4))} min`:d<864e5?`${String(Math.floor(d/36e5))} h`:(0,c.relativeTime)(a,b)},"reportDetailsJson",0,function(a){return JSON.stringify(a,null,2)},"reportDetailsLabel",0,function(a){return`JSON \xb7 ${String((0,b.reportDetailsBytes)(a))} bytes`},"reportText",0,function(a){let b=d[a.state];return null===a.note?b:`${b}: ${a.note}`},"reportedWhen",0,function(a,b){let d=(0,c.relativeTime)(a,b);return`reported ${"Just now"===d?"just now":d}`}])}];
2
-
3
- //# sourceMappingURL=_01f7zv3._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[25039,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Flag",0,d],25039)},39353,a=>{"use strict";var b=a.i(64831);let c={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};c.node;let d=(0,b.default)(c);a.s(["Lock",0,d],39353)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},2399,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(24173),f=a.i(40392),g=a.i(50808),h=a.i(39353),i=a.i(3512),j=a.i(72872),k=a.i(8219),l=a.i(76166),m=a.i(12068),n=a.i(48136),o=a.i(77339),p=a.i(58523),q=a.i(90487),r=a.i(23063);function s({blueprint:a,version:c,onVersionChange:d,templates:e,squadrons:f,onForm:g}){let t=a.versions.find(a=>a.version===c)??a.versions[0];if(!t)return null;let u=a.versions[0]?.version,v=Object.fromEntries(a.versions.map(a=>[String(a.version),`v${String(a.version)}${a.version===u?" (latest)":""}`]));return(0,b.jsxs)("div",{"data-testid":"blueprint-view",className:"flex flex-col gap-5",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,b.jsx)(l.Badge,{variant:"secondary",children:"Blueprint"}),(0,b.jsxs)(n.Select,{items:v,value:String(t.version),onValueChange:a=>{d(Number(a))},children:[(0,b.jsxs)(n.SelectTrigger,{"aria-label":"Version","data-testid":"blueprint-version",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Version"}),(0,b.jsx)(n.SelectValue,{className:"font-medium"})]}),(0,b.jsx)(n.SelectContent,{children:Object.entries(v).map(([a,c])=>(0,b.jsx)(n.SelectItem,{value:a,children:c},a))})]}),(0,b.jsxs)("span",{"data-testid":"blueprint-source",className:"text-meta text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-mono",children:t.file})," at ",(0,b.jsx)("span",{className:"font-mono",children:t.commit.slice(0,7)}),", ",(0,j.dayDate)(new Date(t.committedAt))]}),g&&(0,b.jsx)(m.Button,{variant:"primary",icon:(0,b.jsx)(i.Plus,{"aria-hidden":!0}),onClick:g,className:"ml-auto","data-testid":"blueprint-form",children:"Form squadron"})]}),(0,b.jsxs)("p",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,b.jsx)(h.Lock,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Read-only. Blueprints are edited in git; new tags show up here as new versions."]}),(0,b.jsxs)("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,b.jsxs)("section",{"aria-labelledby":"blueprint-roles",className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{id:"blueprint-roles",className:"text-body font-semibold",children:"Roles"}),(0,b.jsxs)(o.Table,{children:[(0,b.jsx)(o.TableHeader,{children:(0,b.jsxs)(o.TableRow,{children:[(0,b.jsx)(o.TableHead,{children:"Role"}),(0,b.jsx)(o.TableHead,{children:"Template"}),(0,b.jsx)(o.TableHead,{children:"Members"}),(0,b.jsx)(o.TableHead,{children:"Check-in"}),(0,b.jsx)(o.TableHead,{children:"Launch note"})]})}),(0,b.jsx)(o.TableBody,{children:t.roles.map(a=>{let c,d=(c=a.template,e.find(a=>a.repository===c.repository&&a.name===c.name&&a.version===c.version));return(0,b.jsxs)(o.TableRow,{"data-testid":"blueprint-role",children:[(0,b.jsx)(o.TableCell,{children:(0,b.jsx)(l.Badge,{variant:"type",children:a.name})}),(0,b.jsx)(o.TableCell,{className:"font-mono",children:`${a.template.name}@${String(a.template.version)}`}),(0,b.jsx)(o.TableCell,{children:a.count}),(0,b.jsx)(o.TableCell,{children:d?(0,k.checkInText)(d.checkInMinutes):"unknown"}),(0,b.jsx)(o.TableCell,{className:"max-w-64 truncate text-muted-foreground",children:d?.launchNote??""})]},a.name)})})]})]}),(0,b.jsx)(q.HandoffWiring,{blueprint:t})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,b.jsxs)("section",{"aria-labelledby":"blueprint-versions",className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{id:"blueprint-versions",className:"text-body font-semibold",children:"Versions"}),(0,b.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:a.versions.map(a=>(0,b.jsxs)("li",{className:"flex gap-3 px-3 py-2 text-meta",children:[(0,b.jsxs)("span",{className:"font-mono font-medium",children:["v",a.version]}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsxs)("span",{children:[a.description," ",a.version===u&&(0,b.jsx)(l.Badge,{variant:"outline",children:"Latest"})]}),(0,b.jsxs)("span",{className:"text-muted-foreground",children:[(0,j.dayDate)(new Date(a.committedAt))," · ",(0,b.jsx)("span",{className:"font-mono",children:a.commit.slice(0,7)})]})]})]},a.version))})]}),(0,b.jsxs)("section",{"aria-labelledby":"blueprint-squadrons",className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{id:"blueprint-squadrons",className:"text-body font-semibold",children:"Squadrons from this blueprint"}),0===f.length?(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:"None yet."}):(0,b.jsx)("ul",{className:"flex flex-col gap-1.5 rounded-lg border border-border p-3",children:f.map(a=>(0,b.jsxs)("li",{className:"flex items-center gap-2 text-meta",children:[(0,b.jsx)(p.SquadronTag,{squadronId:a.id,size:"sm"}),(0,b.jsxs)("span",{className:"text-muted-foreground",children:["v",a.blueprint.version]}),(0,b.jsx)(r.StatusBadge,{status:a.state,className:"ml-auto"})]},a.id))})]})]})]})]})}var t=a.i(15439),u=a.i(2549),v=a.i(83786),w=a.i(68698),x=a.i(83628),y=a.i(26110),z=a.i(55138),A=a.i(65563),B=a.i(94764),C=a.i(26949),D=a.i(67336),E=a.i(10023),F=a.i(68450),G=a.i(10572),H=a.i(54763),I=a.i(12540),J=a.i(34159);a.s(["default",0,function({params:a,searchParams:h}){let i=decodeURIComponent((0,d.use)(a).name),j=(0,d.use)(h),l=(0,c.useRouter)(),m=(0,F.useNow)(),n=(0,B.useAccountMenu)(m),o=(0,C.useOpenInboxCount)(),p=(0,E.useNeedsAttention)(),q=(0,E.useAttentionCount)(),r=(0,D.useLiveFleet)(),K=(0,I.useCatalogue)(),L=(0,H.useSquadronsConnection)(),M=(0,I.useSquadrons)(),N=(0,I.useFormSquadron)(),[O,P]=(0,d.useState)(!1),Q=(0,A.useAccess)(),R=(0,J.usePluginNav)(),[S,T]=(0,d.useState)(!1),[U,V]=(0,d.useState)(!1);(0,G.useSignInWhenSessionEnds)([p.error,r.error]);let W=(0,k.blueprintChoices)(K.data??{blueprints:[]}),X=W.find(a=>a.name===i&&(void 0===j.repository||a.repository===j.repository)),Y=Number(j.version??X?.versions[0]?.version);return(0,b.jsxs)(y.DetailLayout,{title:i,parents:[{href:"/squadrons",label:"Squadrons"},{href:"/squadrons?tab=blueprints",label:"Blueprints"}],header:(0,b.jsx)("h1",{className:"text-title font-semibold",children:i}),live:r.live,nav:{active:"squadrons",inboxCount:o,attentionCount:q,...R},onCompose:Q.canSend?()=>{T(!0)}:void 0,onSearch:()=>{V(!0)},account:n,banner:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.ConsoleNotices,{}),(0,b.jsx)(v.ConsoleGuide,{})]}),children:["not-connected"===L?(0,b.jsx)(z.SquadronsNotConnected,{}):K.isError?(0,b.jsx)(f.InlineError,{title:"Couldn’t read the blueprint",description:"The squadron manager couldn’t read the catalogue. Squadrons formed from it keep sailing.",detail:K.error.message,onRetry:()=>{K.refetch()}}):K.data?X?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{blueprint:X,version:Y,onVersionChange:a=>{l.replace((0,k.blueprintPath)({repository:X.repository,name:X.name,version:a}))},templates:K.data.templates,squadrons:(0,k.squadronsFromBlueprint)(M.data??[],X),onForm:Q.canManage?()=>{N.reset(),P(!0)}:void 0}),(0,b.jsx)(x.FormSquadronDialog,{blueprints:W,templates:K.data.templates,initial:{key:X.key,version:Y},isOpen:O,onOpenChange:P,isPending:N.isPending,error:N.error?.message,onSubmit:a=>{N.mutate(a,{onSuccess:a=>{P(!1),l.push(`/squadrons/${a.squadronId}`)}})}},`${X.key}@${String(Y)}`)]}):(0,b.jsx)(e.EmptyState,{title:"No such blueprint",description:`git holds no blueprint ${i}.`}):(0,b.jsx)(g.LoadingSkeleton,{variant:"detail",label:"Loading the blueprint"}),(0,b.jsx)(t.ComposeMessage,{isOpen:S,onOpenChange:T}),(0,b.jsx)(u.ConsoleCommands,{isOpen:U,onOpenChange:V,onCompose:()=>{T(!0)}})]})}],2399)},77339,a=>{"use strict";var b=a.i(87924),c=a.i(80487);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.classNames)("w-full caption-bottom text-body",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.classNames)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.classNames)("px-4 align-middle",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.classNames)("bg-muted [&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",a),...d})}])},58523,a=>{"use strict";var b=a.i(87924),c=a.i(31668),d=a.i(38246),e=a.i(80487);a.s(["SquadronTag",0,function({squadronId:a,role:f,size:g="md",className:h}){return(0,b.jsxs)(d.default,{href:`/squadrons/${a}`,"data-slot":"squadron-tag",className:(0,e.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===g?"h-5.5 text-meta":"h-6 text-body",h),children:[(0,b.jsx)(c.Shapes,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate font-medium",children:a}),void 0!==f&&(0,b.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",f]})]})}])},55138,a=>{"use strict";var b=a.i(87924),c=a.i(25212),d=a.i(38246),e=a.i(12068),f=a.i(24173);a.s(["SquadronsNotConnected",0,function(){return(0,b.jsx)(f.EmptyState,{icon:(0,b.jsx)(c.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,b.jsx)(e.Button,{nativeButton:!1,render:(0,b.jsx)(d.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},83628,a=>{"use strict";var b=a.i(87924),c=a.i(52357),d=a.i(72131),e=a.i(8219),f=a.i(12068),g=a.i(18441),h=a.i(2374),i=a.i(45098),j=a.i(48136),k=a.i(77339),l=a.i(40392);function m({blueprints:a,templates:h,isPending:n,error:o,onSubmit:p,initial:q}){let[r,s]=(0,d.useState)(1),[t,u]=(0,d.useState)(q?.key??a[0]?.key),v=a.find(a=>a.key===t)??a[0],[w,x]=(0,d.useState)(q?.version??v?.versions[0]?.version),y=v?.versions.find(a=>a.version===w)??v?.versions[0];if(!v||!y)return null;if(1===r){let c=Object.fromEntries(v.versions.map((a,b)=>[String(a.version),`v${String(a.version)}${0===b?" (latest)":""}`]));return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.DialogHeader,{children:[(0,b.jsx)(g.DialogTitle,{children:"Form a squadron"}),(0,b.jsx)(g.DialogDescription,{children:"Step 1 of 2. Pick a blueprint and the version to form it from."})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-meta font-medium",children:"Blueprint"}),(0,b.jsx)("div",{role:"radiogroup","aria-label":"Blueprint",className:"flex flex-col gap-2",children:a.map(a=>{let c=a.versions[0],d=a.key===v.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":d,"data-testid":"form-squadron-blueprint",onClick:()=>{u(a.key),x(a.versions[0]?.version)},className:"flex flex-col items-start gap-0.5 rounded-md border border-border px-3 py-2 text-left aria-checked:border-primary aria-checked:ring-1 aria-checked:ring-primary",children:[(0,b.jsxs)("span",{className:"text-body font-medium",children:[a.name," ",(0,b.jsxs)("span",{className:"font-mono text-meta text-muted-foreground",children:["v",c?.version,", latest"]})]}),(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:c?.description})]},a.key)})})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)(i.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,b.jsxs)(j.Select,{items:c,value:String(y.version),onValueChange:a=>{x(Number(a))},children:[(0,b.jsx)(j.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,b.jsx)(j.SelectValue,{})}),(0,b.jsx)(j.SelectContent,{children:Object.entries(c).map(([a,c])=>(0,b.jsx)(j.SelectItem,{value:a,children:c},a))})]}),(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:"Older versions stay available. Squadrons keep the version they were formed with."})]}),(0,b.jsxs)(g.DialogFooter,{children:[(0,b.jsx)(g.DialogClose,{render:(0,b.jsx)(f.Button,{type:"button"}),children:"Cancel"}),(0,b.jsx)(f.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{s(2)},children:"Preview roles"})]})]})}let z=(0,e.rolePreviews)(y,h);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.DialogHeader,{children:[(0,b.jsxs)(g.DialogTitle,{children:["Form a squadron from ",y.name," v",y.version]}),(0,b.jsxs)(g.DialogDescription,{children:["Step 2 of 2. ",(0,e.memberCount)(y)," member ships and a flagship are commissioned when you confirm."]})]}),(0,b.jsxs)(k.Table,{children:[(0,b.jsx)(k.TableHeader,{children:(0,b.jsxs)(k.TableRow,{children:[(0,b.jsx)(k.TableHead,{children:"Role"}),(0,b.jsx)(k.TableHead,{children:"Template"}),(0,b.jsx)(k.TableHead,{children:"Members"}),(0,b.jsx)(k.TableHead,{children:"Check-in"})]})}),(0,b.jsx)(k.TableBody,{children:z.map(a=>(0,b.jsxs)(k.TableRow,{children:[(0,b.jsx)(k.TableCell,{className:"font-mono",children:a.role}),(0,b.jsx)(k.TableCell,{className:"font-mono",children:a.template}),(0,b.jsx)(k.TableCell,{children:a.count}),(0,b.jsx)(k.TableCell,{children:void 0===a.checkInMinutes?"unknown":(0,e.checkInText)(a.checkInMinutes)})]},a.role))})]}),(0,b.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,b.jsx)(c.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:["The flagship is named as the squadron, ",(0,b.jsxs)("span",{className:"font-mono",children:[y.name,"-"]})," plus six random characters: the squadron's address. Members are named by role."]})]}),(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:"Next you get crew lines and a launch note per member. You start each session by hand; the squadron sails once every member is on station."}),void 0!==o&&(0,b.jsx)(l.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:o}),(0,b.jsxs)(g.DialogFooter,{children:[(0,b.jsx)(f.Button,{type:"button",disabled:n,onClick:()=>{s(1)},children:"Back"}),(0,b.jsx)(f.Button,{variant:"primary",isLoading:n,"data-testid":"form-squadron-submit",onClick:()=>{p({repository:y.repository,name:y.name,version:y.version})},children:n?"Forming":"Form squadron"})]})]})}a.s(["FormSquadronDialog",0,function(a){let{isOpen:c,onOpenChange:d,isPending:e}=a;return(0,b.jsx)(g.Dialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(g.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:h.dialogSurface.phoneFullScreen,children:(0,b.jsx)(m,{...a})})})}])},90487,a=>{"use strict";var b=a.i(87924),c=a.i(64831);let d={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};d.node;let e=(0,c.default)(d);var f=a.i(25039),g=a.i(72131),h=a.i(80487),i=a.i(76166);function j({name:a,count:c,onHover:d}){let e={onPointerEnter:()=>{d(a)},onPointerLeave:()=>{d(void 0)}};return"flagship"===a?(0,b.jsxs)(i.Badge,{variant:"kind",...e,children:[(0,b.jsx)(f.Flag,{"aria-hidden":!0}),"flagship"]}):(0,b.jsxs)(i.Badge,{variant:"type",...e,children:[a,void 0!==c&&c>1&&(0,b.jsxs)("span",{className:"text-muted-foreground",children:["×",c]})]})}a.s(["HandoffWiring",0,function({blueprint:a}){let[c,d]=(0,g.useState)(void 0),f=new Map(a.roles.map(a=>[a.name,a.count]));return(0,b.jsxs)("section",{"aria-labelledby":"handoff-wiring","data-testid":"handoff-wiring",className:"flex flex-col gap-2 rounded-lg border border-border p-3",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,b.jsx)("h2",{id:"handoff-wiring",className:"text-body font-semibold",children:"Hand-offs"}),(0,b.jsxs)("span",{className:"text-meta text-muted-foreground",children:["from blueprint ",a.name," v",a.version]})]}),0===a.handoffs.length?(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:"No hand-offs. Members only hear from the flagship and from each other by name."}):(0,b.jsx)("ul",{className:"grid grid-cols-[auto_auto_1fr] items-center gap-x-4 text-meta",children:a.handoffs.map(a=>(0,b.jsxs)("li",{"data-testid":"handoff-row",className:(0,h.classNames)("col-span-3 grid grid-cols-subgrid items-center rounded-md px-1.5 py-1",void 0!==c&&(a.role===c||a.to===c)?"bg-muted":void 0),children:[(0,b.jsx)("span",{children:(0,b.jsx)(j,{name:a.role,count:f.get(a.role),onHover:d})}),(0,b.jsxs)("span",{className:"flex items-center gap-1 font-mono text-muted-foreground",children:[a.handoff,(0,b.jsx)(e,{"aria-label":"goes to",className:"size-(--size-icon-sm)"})]}),(0,b.jsx)("span",{children:(0,b.jsx)(j,{name:a.to,count:f.get(a.to),onHover:d})})]},`${a.role}.${a.handoff}`))})]})}],90487)},26110,a=>{"use strict";var b=a.i(87924),c=a.i(82247),d=a.i(63041),e=a.i(43216),f=a.i(63089);a.s(["DetailLayout",0,function({title:a,parents:g,header:h,children:i,sheet:j,live:k,nav:l,onCompose:m,onSearch:n,account:o,banner:p}){return(0,b.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,b.jsx)(d.Sidebar,{active:l.active,inboxCount:l.inboxCount,attentionCount:l.attentionCount,needsCrewCount:l.needsCrewCount,hasSquadrons:l.hasSquadrons,hasTrierarchs:l.hasTrierarchs,trierarchsCount:l.trierarchsCount,hasSettings:l.hasSettings,...o}),(0,b.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,b.jsx)(c.Header,{breadcrumb:a,parents:g,live:k,onCompose:m,onSearch:n}),p,(0,b.jsx)(f.TopBar,{title:a,live:k,back:g[g.length-1]??g[0]}),(0,b.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:[h,i]})]}),j,(0,b.jsx)(e.TabBar,{active:"overview"===l.active||"needs-crew"===l.active?"fleet":"settings"===l.active?void 0:l.active,hasSquadrons:l.hasSquadrons,hasTrierarchs:l.hasTrierarchs,trierarchsCount:l.trierarchsCount,inboxCount:l.inboxCount,attentionCount:l.attentionCount})]})}])}];
2
-
3
- //# sourceMappingURL=_0bmd2ey._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[42955,a=>{"use strict";var b=a.i(64831);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["Ellipsis",0,d],42955)},26766,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["KeyRound",0,d],26766)},3894,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Tags",0,d],3894)},28339,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["UserMinus",0,d],28339)},85888,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Users",0,d],85888)},84980,a=>{"use strict";var b=a.i(87924),c=a.i(53783),d=a.i(80487),e=a.i(82314);a.s(["CodeBlock",0,function({label:a,code:f,isWrapped:g=!1,copyValue:h,copyLabel:i=`Copy ${a.toLowerCase()}`,onCopied:j,onCopyFailed:k,codeTestId:l,copyTestId:m}){return(0,b.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,b.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,b.jsx)(c.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a})]}),(0,b.jsx)(e.CopyButton,{value:h??f,label:i,isLabeled:!0,onCopied:j,onCopyFailed:k,"data-testid":m})]}),(0,b.jsx)("pre",{"data-testid":l,className:(0,d.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",g?"break-all whitespace-pre-wrap":"whitespace-pre"),children:f})]})}])},45469,a=>{"use strict";var b=a.i(87924);a.s([],84102),a.i(84102);var c=a.i(72131),d=a.i(50381),e=a.i(1811),f=a.i(57738),g=a.i(62824),h=a.i(24715),i=a.i(26184),j=a.i(557),k=a.i(21436),l=a.i(54662);let m=c.createContext(void 0),n={...a.i(27576).fieldValidityMapping,checked:a=>a?{"data-checked":""}:{"data-unchecked":""}};var o=a.i(85933),p=a.i(1230),q=a.i(58589),r=a.i(41302),s=a.i(77260),t=a.i(69476),u=a.i(94552),v=a.i(7436),w=a.i(64072);let x=c.forwardRef(function(a,l){let{checked:x,className:y,defaultChecked:z,"aria-labelledby":A,form:B,id:C,inputRef:D,name:E,nativeButton:F=!1,onCheckedChange:G,readOnly:H=!1,required:I=!1,disabled:J=!1,render:K,uncheckedValue:L,value:M,style:N,...O}=a,{clearErrors:P}=(0,r.useFormContext)(),{state:Q,setTouched:R,setDirty:S,validityData:T,setFilled:U,setFocused:V,validationMode:W,disabled:X,name:Y,validation:Z}=(0,p.useFieldRootContext)(),{labelId:$}=(0,s.useLabelableContext)(),_=X||J,aa=Y??E,ab=c.useRef(null),ac=(0,e.useMergedRefs)(ab,D,Z.inputRef),ad=c.useRef(null),ae=(0,j.useBaseUiId)(),af=(0,t.useLabelableId)({id:C}),ag=F?void 0:af,[ah,ai]=(0,d.useControlled)({controlled:x,default:!!z,name:"Switch",state:"checked"});(0,q.useRegisterFieldControl)(ad,ae,ah,void 0,!_,E),(0,f.useIsoLayoutEffect)(()=>{U(ah)},[ah,U]),(0,w.useValueChanged)(ah,()=>{P(aa),S(ah!==T.initialValue),Z.change(ah)});let{getButtonProps:aj,buttonRef:ak}=(0,k.useButton)({disabled:_,native:F}),al=function(a,b,d,e=!0,g){let[h,i]=c.useState(),k=(0,j.useBaseUiId)(g?`${g}-label`:void 0),l=a??b??h;return(0,f.useIsoLayoutEffect)(()=>{let c=a||b||!e?void 0:function(a,b){let c=function(a){if(!a)return;let b=a.parentElement;if(b&&"LABEL"===b.tagName)return b;let c=a.id;if(c){let b=a.nextElementSibling;if(b&&b.htmlFor===c)return b}let d=a.labels;return d&&d[0]}(a);if(c)return!c.id&&b&&(c.id=b),c.id||void 0}(d.current,k);h!==c&&i(c)}),l}(A,$,ab,!F,ag),am={...Z.getValidationProps(_),checked:ah,disabled:_,form:B,id:ag,name:aa,required:I,style:aa?g.visuallyHiddenInput:g.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ac,onChange(a){if(a.nativeEvent.defaultPrevented)return;if(H)return void a.preventDefault();let b=a.currentTarget.checked,c=(0,u.createChangeEventDetails)(v.REASONS.none,a.nativeEvent);G?.(b,c),c.isCanceled||ai(b)},onClick(a){a.stopPropagation()},onFocus(){ad.current?.focus()},...void 0!==M?{value:M}:h.EMPTY_OBJECT},an=c.useMemo(()=>({...Q,checked:ah,disabled:_,readOnly:H,required:I}),[Q,ah,_,H,I]),ao=(0,i.useRenderElement)("span",a,{state:an,ref:[l,ad,ak],props:[{id:F?af:ae,role:"switch","aria-checked":ah,"aria-readonly":H||void 0,"aria-required":I||void 0,"aria-labelledby":al,onFocus(){_||V(!0)},onBlur(){let a=ab.current;a&&!_&&(R(!0),V(!1),"onBlur"===W&&Z.commit(a.checked))},onClick(a){if(H||_)return;a.preventDefault();let b=ab.current;b&&(0,o.dispatchClickWithModifiers)(b,a)}},O,aj,a=>Z.getValidationProps(_,a)],stateAttributesMapping:n});return(0,b.jsxs)(m.Provider,{value:an,children:[ao,!ah&&aa&&void 0!==L&&(0,b.jsx)("input",{type:"hidden",form:B,name:aa,value:L,disabled:_}),(0,b.jsx)("input",{...am,suppressHydrationWarning:!0})]})}),y=c.forwardRef(function(a,b){let{render:d,className:e,style:f,...g}=a,h=function(){let a=c.useContext(m);if(void 0===a)throw Error((0,l.default)(63));return a}();return(0,i.useRenderElement)("span",a,{state:h,ref:b,stateAttributesMapping:n,props:g})});a.s(["Root",0,x,"Thumb",0,y],40499);var z=a.i(40499),z=z,A=a.i(80487);a.s(["Switch",0,function({className:a,...c}){return(0,b.jsx)(z.Root,{"data-slot":"switch",className:(0,A.classNames)("peer inline-flex h-5 w-8.5 shrink-0 items-center rounded-full border border-transparent bg-input p-0.5 transition-colors duration-(--duration-fast) outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-checked:bg-primary data-disabled:opacity-45",a),...c,children:(0,b.jsx)(z.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block size-4 rounded-full bg-card shadow-sm transition-transform duration-(--duration-fast) data-checked:translate-x-3.5"})})}],45469)},77339,a=>{"use strict";var b=a.i(87924),c=a.i(80487);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.classNames)("w-full caption-bottom text-body",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.classNames)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.classNames)("px-4 align-middle",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.classNames)("bg-muted [&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",a),...d})}])},71673,a=>{"use strict";var b=a.i(87924);a.s(["ConsequenceList",0,function({consequences:a}){return(0,b.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:a.map(({icon:a,text:c})=>(0,b.jsxs)("li",{className:"flex gap-2",children:[(0,b.jsx)(a,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{children:c})]},c))})}])},88647,a=>{"use strict";var b=a.i(87924),c=a.i(67042),d=a.i(84980);a.s(["CrewLines",0,function({crewLines:a,subject:e,testIdPrefix:f,onCopied:g,onCopyFailed:h}){return a.map(({harness:a,line:i})=>(0,b.jsx)(d.CodeBlock,{label:`Crew line, ${(0,c.harnessWord)(a)} with the aeolus plugin`,code:i,isWrapped:!0,copyLabel:`Copy the ${(0,c.harnessWord)(a)} crew line for ${e}`,codeTestId:`${f}-${a}`,copyTestId:`${f}-${a}-copy`,onCopied:g,onCopyFailed:h},a))}])},73224,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(80487);a.s(["FleetSegments",0,function({active:a,needsCrewCount:e}){let f=a=>(0,d.classNames)("flex h-(--size-control-touch) grow items-center justify-center gap-1.5 rounded-md text-body-touch font-medium",a?"bg-card text-foreground shadow-sm":"text-muted-foreground");return(0,b.jsxs)("nav",{"aria-label":"Fleet views",className:"flex gap-0.5 rounded-lg border border-border bg-muted p-0.5 sm:hidden","data-testid":"fleet-segments",children:[(0,b.jsx)(c.default,{href:"/","aria-current":"ships"===a?"page":void 0,className:f("ships"===a),"data-testid":"fleet-segment-ships",children:"Ships"}),(0,b.jsxs)(c.default,{href:"/needs-crew","aria-current":"needs-crew"===a?"page":void 0,className:f("needs-crew"===a),"data-testid":"fleet-segment-needs-crew",children:["Needs crew",void 0===e||0===e?null:(0,b.jsx)("span",{className:"text-micro tabular-nums",children:e})]})]})}])},90468,a=>{"use strict";var b=a.i(87924),c=a.i(187),d=a.i(38246),e=a.i(80487);let f=(0,c.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"}});a.s(["ShipName",0,function({name:a,shipId:c,size:g,isSuffixShown:h=!1,isOperator:i=!1,href:j,className:k}){let l=j?(0,b.jsx)(d.default,{href:j,className:(0,e.classNames)(f({size:g}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:a,children:a}):(0,b.jsx)("span",{className:f({size:g}),title:a,children:a});return(0,b.jsxs)("span",{"data-slot":"ship-name",className:(0,e.classNames)("inline-flex min-w-0 items-baseline gap-1.5",k),children:[l,i?(0,b.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,h&&!i?(0,b.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,b.jsx)("span",{"aria-hidden":!0,children:"· "}),c.slice(-4)]}):null]})}])},58523,a=>{"use strict";var b=a.i(87924),c=a.i(31668),d=a.i(38246),e=a.i(80487);a.s(["SquadronTag",0,function({squadronId:a,role:f,size:g="md",className:h}){return(0,b.jsxs)(d.default,{href:`/squadrons/${a}`,"data-slot":"squadron-tag",className:(0,e.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===g?"h-5.5 text-meta":"h-6 text-body",h),children:[(0,b.jsx)(c.Shapes,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate font-medium",children:a}),void 0!==f&&(0,b.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",f]})]})}])},65698,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(46444),e=a.i(75297),f=a.i(45098);a.s(["TypedConfirm",0,function({expected:a,value:g,onValueChange:h,"data-testid":i="retire-typed-confirm"}){let j=(0,c.useId)(),k=(0,c.useId)();return(0,b.jsxs)("div",{"data-testid":i,className:"flex flex-col gap-1.5",children:[(0,b.jsxs)(f.Label,{htmlFor:j,className:"text-meta",children:["Type ",(0,b.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:a})," to confirm"]}),(0,b.jsx)(e.Input,{id:j,isMono:!0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-describedby":k,className:"max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:g,onChange:a=>{h(a.target.value)}}),(0,b.jsx)("p",{id:k,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===g?"Case and hyphens must match.":(0,d.isTypedMatch)(a,g)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},80459,a=>{"use strict";var b=a.i(87924),c=a.i(79762),d=a.i(97024),e=a.i(26268),f=a.i(85888),g=a.i(72131),h=a.i(46444),i=a.i(31429),j=a.i(59613),k=a.i(12068),l=a.i(2374),m=a.i(71673),n=a.i(40392),o=a.i(65698);let p={one:"delivery",many:"deliveries"};function q({role:a,othersOfRole:b,blueprint:c}){let d=0===b.length?`no ${a}`:`${String(b.length)} ${a}`;return void 0===c?`The squadron then has ${d}.`:`The squadron then has ${d}; blueprint ${c.label} has ${String(c.count)}.`}function r(a){let{squadronId:l,member:r,othersOfRole:s,blueprint:t,openDeliveries:u,inFlightDeliveries:v,isPending:w,error:x,onConfirm:y}=a,[z,A]=(0,g.useState)(""),B=u>0,C=!B||(0,h.isTypedMatch)(r.name,z),D=0===s.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(j.AlertDialogHeader,{children:[(0,b.jsxs)(j.AlertDialogTitle,{children:["Remove ",r.name," from ",l,"?"]}),(0,b.jsx)(j.AlertDialogDescription,{children:B?(0,b.jsx)(b.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,b.jsx)(b.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),B?(0,b.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,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("p",{className:"font-medium",children:(0,h.abandonedLine)(u)}),(0,b.jsxs)("p",{className:"text-foreground",children:[u-v," pending, ",v," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,b.jsx)(m.ConsequenceList,{consequences:[{icon:c.Archive,text:`Its ship ${r.name} is retired. Its history stays read-only.`},{icon:f.Users,text:q({role:r.role,othersOfRole:s,blueprint:t})}]}),D&&(0,b.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,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.jsxs)("span",{className:"font-medium",children:["The last ",r.role,"."]})," ",(0,b.jsxs)("span",{className:"text-foreground",children:[q({role:r.role,othersOfRole:s,blueprint:t})," Work for the role waits until a member is added."]})]})]}),!B&&(0,b.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,b.jsx)(d.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),B?(0,b.jsx)(o.TypedConfirm,{expected:r.name,value:z,onValueChange:A}):null,void 0!==x&&(0,b.jsx)(n.InlineError,{title:"Couldn’t remove the member",description:`${x} Nothing changed.`}),(0,b.jsxs)(j.AlertDialogFooter,{children:[(0,b.jsx)(j.AlertDialogClose,{render:(0,b.jsx)(k.Button,{disabled:w}),children:"Cancel"}),(0,b.jsx)(k.Button,{variant:"destructive",isLoading:w,disabled:!C,onClick:y,"data-testid":"remove-member-confirm",children:B?`Remove and abandon ${(0,i.counted)(u,p)}`:"Remove member"})]})]})}a.s(["RemoveMemberDialog",0,function(a){let{isOpen:c,onOpenChange:d,isPending:e}=a;return(0,b.jsx)(j.AlertDialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(j.AlertDialogContent,{"data-testid":"remove-member-dialog",className:l.dialogSurface.phoneSheet,children:(0,b.jsx)(r,{...a})})})}])},2466,a=>{"use strict";var b=a.i(87924),c=a.i(17256),d=a.i(12068),e=a.i(82247),f=a.i(63041),g=a.i(43216),h=a.i(63089);a.s(["ListLayout",0,function({title:a,description:i,titleMeta:j,primaryAction:k,toolbar:l,live:m,nav:n,onCompose:o,onSearch:p,account:q,banner:r,children:s}){return(0,b.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,b.jsx)(f.Sidebar,{active:n.active,inboxCount:n.inboxCount,attentionCount:n.attentionCount,needsCrewCount:n.needsCrewCount,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,hasSettings:n.hasSettings,...q}),(0,b.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,b.jsx)(e.Header,{breadcrumb:a,live:m,onCompose:o,onSearch:p}),r,(0,b.jsx)(h.TopBar,{title:a,live:m,account:q,onSearch:p,actions:o?(0,b.jsx)(d.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:o,children:(0,b.jsx)(c.SquarePen,{"aria-hidden":!0})}):void 0}),(0,b.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,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,b.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:a}),j]}),i?(0,b.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),k?(0,b.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:k}):null]}),l,s]})]}),(0,b.jsx)(g.TabBar,{active:"overview"===n.active||"needs-crew"===n.active?"fleet":"settings"===n.active?void 0:n.active,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,inboxCount:n.inboxCount,attentionCount:n.attentionCount})]})}])}];
2
-
3
- //# sourceMappingURL=_0i0_i88._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},45469,a=>{"use strict";var b=a.i(87924);a.s([],84102),a.i(84102);var c=a.i(72131),d=a.i(50381),e=a.i(1811),f=a.i(57738),g=a.i(62824),h=a.i(24715),i=a.i(26184),j=a.i(557),k=a.i(21436),l=a.i(54662);let m=c.createContext(void 0),n={...a.i(27576).fieldValidityMapping,checked:a=>a?{"data-checked":""}:{"data-unchecked":""}};var o=a.i(85933),p=a.i(1230),q=a.i(58589),r=a.i(41302),s=a.i(77260),t=a.i(69476),u=a.i(94552),v=a.i(7436),w=a.i(64072);let x=c.forwardRef(function(a,l){let{checked:x,className:y,defaultChecked:z,"aria-labelledby":A,form:B,id:C,inputRef:D,name:E,nativeButton:F=!1,onCheckedChange:G,readOnly:H=!1,required:I=!1,disabled:J=!1,render:K,uncheckedValue:L,value:M,style:N,...O}=a,{clearErrors:P}=(0,r.useFormContext)(),{state:Q,setTouched:R,setDirty:S,validityData:T,setFilled:U,setFocused:V,validationMode:W,disabled:X,name:Y,validation:Z}=(0,p.useFieldRootContext)(),{labelId:$}=(0,s.useLabelableContext)(),_=X||J,aa=Y??E,ab=c.useRef(null),ac=(0,e.useMergedRefs)(ab,D,Z.inputRef),ad=c.useRef(null),ae=(0,j.useBaseUiId)(),af=(0,t.useLabelableId)({id:C}),ag=F?void 0:af,[ah,ai]=(0,d.useControlled)({controlled:x,default:!!z,name:"Switch",state:"checked"});(0,q.useRegisterFieldControl)(ad,ae,ah,void 0,!_,E),(0,f.useIsoLayoutEffect)(()=>{U(ah)},[ah,U]),(0,w.useValueChanged)(ah,()=>{P(aa),S(ah!==T.initialValue),Z.change(ah)});let{getButtonProps:aj,buttonRef:ak}=(0,k.useButton)({disabled:_,native:F}),al=function(a,b,d,e=!0,g){let[h,i]=c.useState(),k=(0,j.useBaseUiId)(g?`${g}-label`:void 0),l=a??b??h;return(0,f.useIsoLayoutEffect)(()=>{let c=a||b||!e?void 0:function(a,b){let c=function(a){if(!a)return;let b=a.parentElement;if(b&&"LABEL"===b.tagName)return b;let c=a.id;if(c){let b=a.nextElementSibling;if(b&&b.htmlFor===c)return b}let d=a.labels;return d&&d[0]}(a);if(c)return!c.id&&b&&(c.id=b),c.id||void 0}(d.current,k);h!==c&&i(c)}),l}(A,$,ab,!F,ag),am={...Z.getValidationProps(_),checked:ah,disabled:_,form:B,id:ag,name:aa,required:I,style:aa?g.visuallyHiddenInput:g.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ac,onChange(a){if(a.nativeEvent.defaultPrevented)return;if(H)return void a.preventDefault();let b=a.currentTarget.checked,c=(0,u.createChangeEventDetails)(v.REASONS.none,a.nativeEvent);G?.(b,c),c.isCanceled||ai(b)},onClick(a){a.stopPropagation()},onFocus(){ad.current?.focus()},...void 0!==M?{value:M}:h.EMPTY_OBJECT},an=c.useMemo(()=>({...Q,checked:ah,disabled:_,readOnly:H,required:I}),[Q,ah,_,H,I]),ao=(0,i.useRenderElement)("span",a,{state:an,ref:[l,ad,ak],props:[{id:F?af:ae,role:"switch","aria-checked":ah,"aria-readonly":H||void 0,"aria-required":I||void 0,"aria-labelledby":al,onFocus(){_||V(!0)},onBlur(){let a=ab.current;a&&!_&&(R(!0),V(!1),"onBlur"===W&&Z.commit(a.checked))},onClick(a){if(H||_)return;a.preventDefault();let b=ab.current;b&&(0,o.dispatchClickWithModifiers)(b,a)}},O,aj,a=>Z.getValidationProps(_,a)],stateAttributesMapping:n});return(0,b.jsxs)(m.Provider,{value:an,children:[ao,!ah&&aa&&void 0!==L&&(0,b.jsx)("input",{type:"hidden",form:B,name:aa,value:L,disabled:_}),(0,b.jsx)("input",{...am,suppressHydrationWarning:!0})]})}),y=c.forwardRef(function(a,b){let{render:d,className:e,style:f,...g}=a,h=function(){let a=c.useContext(m);if(void 0===a)throw Error((0,l.default)(63));return a}();return(0,i.useRenderElement)("span",a,{state:h,ref:b,stateAttributesMapping:n,props:g})});a.s(["Root",0,x,"Thumb",0,y],40499);var z=a.i(40499),z=z,A=a.i(80487);a.s(["Switch",0,function({className:a,...c}){return(0,b.jsx)(z.Root,{"data-slot":"switch",className:(0,A.classNames)("peer inline-flex h-5 w-8.5 shrink-0 items-center rounded-full border border-transparent bg-input p-0.5 transition-colors duration-(--duration-fast) outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-checked:bg-primary data-disabled:opacity-45",a),...c,children:(0,b.jsx)(z.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block size-4 rounded-full bg-card shadow-sm transition-transform duration-(--duration-fast) data-checked:translate-x-3.5"})})}],45469)},77339,a=>{"use strict";var b=a.i(87924),c=a.i(80487);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.classNames)("w-full caption-bottom text-body",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.classNames)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.classNames)("px-4 align-middle",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.classNames)("bg-muted [&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",a),...d})}])},75971,a=>{"use strict";var b=a.i(87924),c=a.i(80487);let d={"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 e({health:a}){return(0,b.jsx)("span",{"aria-hidden":!0,className:(0,c.classNames)("size-2 shrink-0 rounded-full",d[a].dot)})}a.s(["HealthIndicator",0,function({health:a,detail:f,className:g}){return(0,b.jsxs)("span",{"data-slot":"health-indicator","data-health":a,className:(0,c.classNames)("inline-flex items-center gap-1.5 text-meta",g),children:[(0,b.jsx)(e,{health:a}),(0,b.jsx)("span",{className:(0,c.classNames)("font-medium",d[a].text),children:d[a].label}),void 0!==f&&(0,b.jsx)("span",{className:"text-muted-foreground",children:f})]})},"HealthSummary",0,function({counts:a,className:f}){return(0,b.jsx)("span",{"data-slot":"health-summary",className:(0,c.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",f),children:a.map(({health:a,count:c})=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(e,{health:a}),(0,b.jsxs)("span",{children:[c," ",d[a].label.toLowerCase()]})]},a))})}])},55138,a=>{"use strict";var b=a.i(87924),c=a.i(25212),d=a.i(38246),e=a.i(12068),f=a.i(24173);a.s(["SquadronsNotConnected",0,function(){return(0,b.jsx)(f.EmptyState,{icon:(0,b.jsx)(c.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,b.jsx)(e.Button,{nativeButton:!1,render:(0,b.jsx)(d.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},83628,a=>{"use strict";var b=a.i(87924),c=a.i(52357),d=a.i(72131),e=a.i(8219),f=a.i(12068),g=a.i(18441),h=a.i(2374),i=a.i(45098),j=a.i(48136),k=a.i(77339),l=a.i(40392);function m({blueprints:a,templates:h,isPending:n,error:o,onSubmit:p,initial:q}){let[r,s]=(0,d.useState)(1),[t,u]=(0,d.useState)(q?.key??a[0]?.key),v=a.find(a=>a.key===t)??a[0],[w,x]=(0,d.useState)(q?.version??v?.versions[0]?.version),y=v?.versions.find(a=>a.version===w)??v?.versions[0];if(!v||!y)return null;if(1===r){let c=Object.fromEntries(v.versions.map((a,b)=>[String(a.version),`v${String(a.version)}${0===b?" (latest)":""}`]));return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.DialogHeader,{children:[(0,b.jsx)(g.DialogTitle,{children:"Form a squadron"}),(0,b.jsx)(g.DialogDescription,{children:"Step 1 of 2. Pick a blueprint and the version to form it from."})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-meta font-medium",children:"Blueprint"}),(0,b.jsx)("div",{role:"radiogroup","aria-label":"Blueprint",className:"flex flex-col gap-2",children:a.map(a=>{let c=a.versions[0],d=a.key===v.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":d,"data-testid":"form-squadron-blueprint",onClick:()=>{u(a.key),x(a.versions[0]?.version)},className:"flex flex-col items-start gap-0.5 rounded-md border border-border px-3 py-2 text-left aria-checked:border-primary aria-checked:ring-1 aria-checked:ring-primary",children:[(0,b.jsxs)("span",{className:"text-body font-medium",children:[a.name," ",(0,b.jsxs)("span",{className:"font-mono text-meta text-muted-foreground",children:["v",c?.version,", latest"]})]}),(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:c?.description})]},a.key)})})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)(i.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,b.jsxs)(j.Select,{items:c,value:String(y.version),onValueChange:a=>{x(Number(a))},children:[(0,b.jsx)(j.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,b.jsx)(j.SelectValue,{})}),(0,b.jsx)(j.SelectContent,{children:Object.entries(c).map(([a,c])=>(0,b.jsx)(j.SelectItem,{value:a,children:c},a))})]}),(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:"Older versions stay available. Squadrons keep the version they were formed with."})]}),(0,b.jsxs)(g.DialogFooter,{children:[(0,b.jsx)(g.DialogClose,{render:(0,b.jsx)(f.Button,{type:"button"}),children:"Cancel"}),(0,b.jsx)(f.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{s(2)},children:"Preview roles"})]})]})}let z=(0,e.rolePreviews)(y,h);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.DialogHeader,{children:[(0,b.jsxs)(g.DialogTitle,{children:["Form a squadron from ",y.name," v",y.version]}),(0,b.jsxs)(g.DialogDescription,{children:["Step 2 of 2. ",(0,e.memberCount)(y)," member ships and a flagship are commissioned when you confirm."]})]}),(0,b.jsxs)(k.Table,{children:[(0,b.jsx)(k.TableHeader,{children:(0,b.jsxs)(k.TableRow,{children:[(0,b.jsx)(k.TableHead,{children:"Role"}),(0,b.jsx)(k.TableHead,{children:"Template"}),(0,b.jsx)(k.TableHead,{children:"Members"}),(0,b.jsx)(k.TableHead,{children:"Check-in"})]})}),(0,b.jsx)(k.TableBody,{children:z.map(a=>(0,b.jsxs)(k.TableRow,{children:[(0,b.jsx)(k.TableCell,{className:"font-mono",children:a.role}),(0,b.jsx)(k.TableCell,{className:"font-mono",children:a.template}),(0,b.jsx)(k.TableCell,{children:a.count}),(0,b.jsx)(k.TableCell,{children:void 0===a.checkInMinutes?"unknown":(0,e.checkInText)(a.checkInMinutes)})]},a.role))})]}),(0,b.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,b.jsx)(c.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:["The flagship is named as the squadron, ",(0,b.jsxs)("span",{className:"font-mono",children:[y.name,"-"]})," plus six random characters: the squadron's address. Members are named by role."]})]}),(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:"Next you get crew lines and a launch note per member. You start each session by hand; the squadron sails once every member is on station."}),void 0!==o&&(0,b.jsx)(l.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:o}),(0,b.jsxs)(g.DialogFooter,{children:[(0,b.jsx)(f.Button,{type:"button",disabled:n,onClick:()=>{s(1)},children:"Back"}),(0,b.jsx)(f.Button,{variant:"primary",isLoading:n,"data-testid":"form-squadron-submit",onClick:()=>{p({repository:y.repository,name:y.name,version:y.version})},children:n?"Forming":"Form squadron"})]})]})}a.s(["FormSquadronDialog",0,function(a){let{isOpen:c,onOpenChange:d,isPending:e}=a;return(0,b.jsx)(g.Dialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(g.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:h.dialogSurface.phoneFullScreen,children:(0,b.jsx)(m,{...a})})})}])},2466,a=>{"use strict";var b=a.i(87924),c=a.i(17256),d=a.i(12068),e=a.i(82247),f=a.i(63041),g=a.i(43216),h=a.i(63089);a.s(["ListLayout",0,function({title:a,description:i,titleMeta:j,primaryAction:k,toolbar:l,live:m,nav:n,onCompose:o,onSearch:p,account:q,banner:r,children:s}){return(0,b.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,b.jsx)(f.Sidebar,{active:n.active,inboxCount:n.inboxCount,attentionCount:n.attentionCount,needsCrewCount:n.needsCrewCount,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,hasSettings:n.hasSettings,...q}),(0,b.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,b.jsx)(e.Header,{breadcrumb:a,live:m,onCompose:o,onSearch:p}),r,(0,b.jsx)(h.TopBar,{title:a,live:m,account:q,onSearch:p,actions:o?(0,b.jsx)(d.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:o,children:(0,b.jsx)(c.SquarePen,{"aria-hidden":!0})}):void 0}),(0,b.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,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,b.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:a}),j]}),i?(0,b.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),k?(0,b.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:k}):null]}),l,s]})]}),(0,b.jsx)(g.TabBar,{active:"overview"===n.active||"needs-crew"===n.active?"fleet":"settings"===n.active?void 0:n.active,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,inboxCount:n.inboxCount,attentionCount:n.attentionCount})]})}])},47480,20847,a=>{"use strict";function b(a){let b=/^github\.com\/([^/]+\/[^/]+)$/.exec(a);return b?.[1]===void 0?{label:a,isGitHub:!1}:{label:b[1],isGitHub:!0}}function c(a,b){let c=new Map;for(let{name:d,version:e}of a.filter(a=>a.repository===b))c.set(d,[...c.get(d)??[],e]);return[...c].map(([a,b])=>({name:a,versions:b.toSorted((a,b)=>a-b)})).toSorted((a,b)=>a.name.localeCompare(b.name))}a.s(["leftOutLabel",0,function(a){let{kind:b,name:c,version:d}=a;return"blueprint"===b?`blueprint ${c} v${String(d)}`:`${b} ${c}@${String(d)}`},"repositoryContents",0,function(a,b){return{templates:c(a.templates,b),blueprints:c(a.blueprints,b),leftOut:a.problems.filter(a=>a.repository===b)}},"repositoryLabel",0,b,"versionFileUrl",0,function(a){let{label:c,isGitHub:d}=b(a.repository);return d?`https://github.com/${c}/blob/${a.commit}/${encodeURI(a.file)}`:void 0}],47480);var d=a.i(87924),e=a.i(64831);let f={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]};f.node;let g=(0,e.default)(f);function h(){return(0,d.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",fill:"currentColor",className:"size-(--size-icon-sm) shrink-0",children:(0,d.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})})}a.s(["RepositoryName",0,function({name:a,href:c}){let{label:e,isGitHub:f}=b(a),i=(0,d.jsxs)(d.Fragment,{children:[f?(0,d.jsx)(h,{}):(0,d.jsx)(g,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"truncate",children:e})]}),j="inline-flex min-w-0 items-center gap-1.5 font-medium";return void 0===c?(0,d.jsx)("span",{title:a,className:j,children:i}):(0,d.jsx)("a",{href:c,target:"_blank",rel:"noreferrer",title:a,className:`${j} hover:underline`,children:i})}],20847)}];
2
-
3
- //# sourceMappingURL=_0t1jjxf._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[38688,67594,92175,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Activity",0,d],38688);let e={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"]};e.node;let f=(0,b.default)(e);a.s(["CirclePause",0,f],67594);let g={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"]};g.node;let h=(0,b.default)(g);a.s(["OctagonPause",0,h],92175)},63359,a=>{"use strict";var b=a.i(64831);let c={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};c.node;let d=(0,b.default)(c);a.s(["AppWindow",0,d],63359)},82260,a=>{"use strict";var b=a.i(64831);let c={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};c.node;let d=(0,b.default)(c);a.s(["Bot",0,d],82260)},39977,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Boxes",0,d],39977)},42955,a=>{"use strict";var b=a.i(64831);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["Ellipsis",0,d],42955)},83138,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["FileText",0,d],83138)},25039,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Flag",0,d],25039)},26766,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["KeyRound",0,d],26766)},53783,a=>{"use strict";var b=a.i(64831);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["SquareTerminal",0,d],53783)},3894,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Tags",0,d],3894)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},28339,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["UserMinus",0,d],28339)},85888,a=>{"use strict";var b=a.i(64831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Users",0,d],85888)},84980,a=>{"use strict";var b=a.i(87924),c=a.i(53783),d=a.i(80487),e=a.i(82314);a.s(["CodeBlock",0,function({label:a,code:f,isWrapped:g=!1,copyValue:h,copyLabel:i=`Copy ${a.toLowerCase()}`,onCopied:j,onCopyFailed:k,codeTestId:l,copyTestId:m}){return(0,b.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,b.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,b.jsx)(c.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a})]}),(0,b.jsx)(e.CopyButton,{value:h??f,label:i,isLabeled:!0,onCopied:j,onCopyFailed:k,"data-testid":m})]}),(0,b.jsx)("pre",{"data-testid":l,className:(0,d.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",g?"break-all whitespace-pre-wrap":"whitespace-pre"),children:f})]})}])},82314,85650,a=>{"use strict";var b=a.i(87924),c=a.i(52562),d=a.i(64831);let e={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"}]]};e.node;let f=(0,d.default)(e);a.s(["Copy",0,f],85650);var g=a.i(72131),h=a.i(12068);a.s(["CopyButton",0,function({value:a,label:d,size:e="xs",isLabeled:i=!1,onCopied:j,onCopyFailed:k,className:l,"data-testid":m}){let[n,o]=(0,g.useState)(!1);async function p(){try{await navigator.clipboard.writeText(a)}catch{k?.();return}o(!0),j?.(),setTimeout(()=>{o(!1)},1500)}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"ghost",size:e,isIconOnly:!i,"aria-label":d,title:i?void 0:d,icon:n?(0,b.jsx)(c.Check,{"aria-hidden":!0}):(0,b.jsx)(f,{"aria-hidden":!0}),className:l,"data-testid":m,onClick:()=>{p()},children:i?n?"Copied":"Copy":null}),(0,b.jsx)("span",{role:"status",className:"sr-only",children:n?"Copied.":""})]})}],82314)},71673,a=>{"use strict";var b=a.i(87924);a.s(["ConsequenceList",0,function({consequences:a}){return(0,b.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:a.map(({icon:a,text:c})=>(0,b.jsxs)("li",{className:"flex gap-2",children:[(0,b.jsx)(a,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{children:c})]},c))})}])},88647,a=>{"use strict";var b=a.i(87924),c=a.i(67042),d=a.i(84980);a.s(["CrewLines",0,function({crewLines:a,subject:e,testIdPrefix:f,onCopied:g,onCopyFailed:h}){return a.map(({harness:a,line:i})=>(0,b.jsx)(d.CodeBlock,{label:`Crew line, ${(0,c.harnessWord)(a)} with the aeolus plugin`,code:i,isWrapped:!0,copyLabel:`Copy the ${(0,c.harnessWord)(a)} crew line for ${e}`,codeTestId:`${f}-${a}`,copyTestId:`${f}-${a}-copy`,onCopied:g,onCopyFailed:h},a))}])},75971,a=>{"use strict";var b=a.i(87924),c=a.i(80487);let d={"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 e({health:a}){return(0,b.jsx)("span",{"aria-hidden":!0,className:(0,c.classNames)("size-2 shrink-0 rounded-full",d[a].dot)})}a.s(["HealthIndicator",0,function({health:a,detail:f,className:g}){return(0,b.jsxs)("span",{"data-slot":"health-indicator","data-health":a,className:(0,c.classNames)("inline-flex items-center gap-1.5 text-meta",g),children:[(0,b.jsx)(e,{health:a}),(0,b.jsx)("span",{className:(0,c.classNames)("font-medium",d[a].text),children:d[a].label}),void 0!==f&&(0,b.jsx)("span",{className:"text-muted-foreground",children:f})]})},"HealthSummary",0,function({counts:a,className:f}){return(0,b.jsx)("span",{"data-slot":"health-summary",className:(0,c.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",f),children:a.map(({health:a,count:c})=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(e,{health:a}),(0,b.jsxs)("span",{children:[c," ",d[a].label.toLowerCase()]})]},a))})}])},36501,a=>{"use strict";var b=a.i(87924),c=a.i(39977),d=a.i(98238),e=a.i(23636),f=a.i(74215),g=a.i(80487);let h={"trierarch-plugin":e.ShipWheel,squadrons:c.Boxes,ship:d.Ship};a.s(["LabelChip",0,function({chip:a,onRemove:c,testId:d,className:e,trailing:i}){let j="none"===a.mark?null:h[a.mark],k=`${a.key}=${a.value}`,l="none"===a.mark?"you":a.ownerName;return(0,b.jsxs)("span",{"data-slot":"label-chip","data-testid":d,title:`${k}, by ${l}`,className:(0,g.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",e),children:[null===j?null:(0,b.jsx)(j,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a.key,"="]}),(0,b.jsx)("span",{className:"font-medium",children:a.value})]}),i,void 0===c?null:(0,b.jsx)("button",{type:"button","aria-label":`Remove ${k}`,onClick:c,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,b.jsx)(f.X,{"aria-hidden":!0})})]})}])},40108,a=>{"use strict";var b=a.i(87924),c=a.i(63359),d=a.i(82260),e=a.i(64831);let f={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};f.node;let g=(0,e.default)(f),h={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};h.node;let i=(0,e.default)(h),j={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};j.node;let k=(0,e.default)(j),l={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};l.node;let m=(0,e.default)(l),n={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};n.node;let o=(0,e.default)(n);var p=a.i(53783),q=a.i(25212),r=a.i(80487),s=a.i(67042),t=a.i(29703);let u={DEVICE:i,CLOUD:g,SERVER:o,OTHER:k},v={coding:p.SquareTerminal,chat:m,bot:d.Bot,console:c.AppWindow},w={md:"text-body",sm:"text-meta"};a.s(["LocationTag",0,function({kind:a,description:c=null,harness:d=null,isCompact:e=!1,size:f="md",className:g}){let h=(0,r.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",w[f],g);if(null===a)return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(q.Unplug,{"aria-hidden":!0}),"No session"]});let i=u[a],j=(0,t.locationKindWord)(a),k=null===c?j:`${j} \xb7 ${c}`;if(null!==d){let a=(0,s.harnessKind)(d),e=void 0===a?void 0:v[a],f=(0,s.harnessWord)(d);return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:null===c?`${f} \xb7 ${j}`:`${f} \xb7 ${j}: ${c}`,children:[void 0===e?null:(0,b.jsx)(e,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate text-foreground",children:f}),(0,b.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate",children:j}),null===c?null:(0,b.jsxs)("span",{className:"sr-only",children:[": ",c]})]})}return e?(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:k,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"sr-only",children:[j,": "]}),(0,b.jsx)("span",{className:"truncate text-foreground",children:c??j})]}):(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[j,null===c?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,b.jsx)("span",{className:"sr-only",children:", "}),(0,b.jsx)("span",{className:"text-foreground",children:c})]})]})]})}],40108)},92717,a=>{"use strict";var b=a.i(87924),c=a.i(38688),d=a.i(67594),e=a.i(92175),f=a.i(80487),g=a.i(72872),h=a.i(45185);let i={working:c.Activity,blocked:e.OctagonPause,idle:d.CirclePause},j={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};a.s(["ReportLine",0,function({report:a,now:c,variant:d,isTimeInTitle:e=!1,testId:k}){let l="full"===d,m=(0,f.classNames)("flex min-w-0 items-center gap-1.5",l?"text-body":"text-meta");if(null===a)return(0,b.jsx)("span",{"data-testid":k,"data-state":"none",className:(0,f.classNames)(m,"text-muted-foreground"),children:"No report yet"});let n=i[a.state],o=j[h.REPORT_TONES[a.state]],p=new Date(a.reportedAt);return(0,b.jsxs)("span",{"data-testid":k,"data-state":a.state,title:e?`${(0,h.reportText)(a)} \xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportText)(a),className:m,children:[(0,b.jsx)(n,{"aria-hidden":!0,className:(0,f.classNames)("size-(--size-icon-sm) shrink-0",o)}),(0,b.jsx)("span",{className:(0,f.classNames)("shrink-0 font-medium",o),children:h.REPORT_STATE_WORDS[a.state]}),null===a.note?null:(0,b.jsx)("span",{className:"min-w-0 truncate text-foreground",children:a.note}),e?null:(0,b.jsx)("time",{dateTime:a.reportedAt,title:(0,g.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:l?`\xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportAge)(p,c)})]})}])},63511,13608,a=>{"use strict";var b=a.i(87924),c=a.i(64831);let d={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};d.node;let e=(0,c.default)(d);a.s(["ChevronUp",0,e],13608);var f=a.i(72131),g=a.i(36501);a.s(["ShipLabels",0,function({chips:a}){let[c,d]=(0,f.useState)(!1);return 0===a.length?(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:"No labels"}):!c&&a.length>2?(0,b.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[a.slice(0,2).map(a=>(0,b.jsx)(g.LabelChip,{chip:a,testId:"ship-label"},a.valueId)),(0,b.jsxs)("button",{type:"button","aria-label":`Show all ${String(a.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:()=>{d(!0)},children:["+",a.length-2]})]}):(0,b.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(function(a){let b=[];for(let c of a){let a="none"===c.mark?null:c.ownerName,d=b.find(b=>b.owner===a);void 0===d?b.push({owner:a,chips:[c]}):d.chips.push(c)}return b})(a).map(a=>(0,b.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[null===a.owner?null:(0,b.jsxs)("span",{className:"text-meta text-muted-foreground",children:["by ",a.owner]}),a.chips.map(a=>(0,b.jsx)(g.LabelChip,{chip:a,testId:"ship-label"},a.valueId))]},a.owner??"")),a.length>2?(0,b.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:()=>{d(!1)},children:[(0,b.jsx)(e,{"aria-hidden":!0}),"Show fewer"]}):null]})}],63511)},90468,a=>{"use strict";var b=a.i(87924),c=a.i(187),d=a.i(38246),e=a.i(80487);let f=(0,c.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"}});a.s(["ShipName",0,function({name:a,shipId:c,size:g,isSuffixShown:h=!1,isOperator:i=!1,href:j,className:k}){let l=j?(0,b.jsx)(d.default,{href:j,className:(0,e.classNames)(f({size:g}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:a,children:a}):(0,b.jsx)("span",{className:f({size:g}),title:a,children:a});return(0,b.jsxs)("span",{"data-slot":"ship-name",className:(0,e.classNames)("inline-flex min-w-0 items-baseline gap-1.5",k),children:[l,i?(0,b.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,h&&!i?(0,b.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,b.jsx)("span",{"aria-hidden":!0,children:"· "}),c.slice(-4)]}):null]})}])},65698,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(46444),e=a.i(75297),f=a.i(45098);a.s(["TypedConfirm",0,function({expected:a,value:g,onValueChange:h,"data-testid":i="retire-typed-confirm"}){let j=(0,c.useId)(),k=(0,c.useId)();return(0,b.jsxs)("div",{"data-testid":i,className:"flex flex-col gap-1.5",children:[(0,b.jsxs)(f.Label,{htmlFor:j,className:"text-meta",children:["Type ",(0,b.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:a})," to confirm"]}),(0,b.jsx)(e.Input,{id:j,isMono:!0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-describedby":k,className:"max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:g,onChange:a=>{h(a.target.value)}}),(0,b.jsx)("p",{id:k,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===g?"Case and hyphens must match.":(0,d.isTypedMatch)(a,g)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},58864,a=>{"use strict";var b=a.i(87924),c=a.i(56987),d=a.i(26766),e=a.i(64831);let f={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"}]]};f.node;let g=(0,e.default)(f);var h=a.i(13931),i=a.i(23422),j=a.i(46444),k=a.i(59613),l=a.i(12068),m=a.i(2374),n=a.i(71673),o=a.i(40392);a.s(["CrewReleaseDialog",0,function(a){let{shipName:e,stage:f,isOpen:p,onOpenChange:q,isPending:r,error:s,onConfirm:t}=a,u="crewedByHand"===f.kind?"It was crewed by hand, so stopping that session is up to you.":`Until ${f.trierarch.name} confirms its clean-up, the request shows Releasing.`;return(0,b.jsx)(k.AlertDialog,{open:p,onOpenChange:a=>{r||q(a)},children:(0,b.jsxs)(k.AlertDialogContent,{"data-testid":"crew-release-dialog",className:m.dialogSurface.phoneSheet,children:[(0,b.jsxs)(k.AlertDialogHeader,{children:[(0,b.jsxs)(k.AlertDialogTitle,{children:["Release ",e,"?"]}),(0,b.jsx)(k.AlertDialogDescription,{children:u})]}),(0,b.jsx)(n.ConsequenceList,{consequences:function(a){let{shipName:b,stage:e,sessionLocation:f,inFlightCount:k}=a,l={icon:i.Undo2,text:(0,j.inFlightLine)(k)};if("crewedByHand"===e.kind){let a=f?`the session on ${f}`:"the session crewing it";return[{icon:g,text:"Removes its crew request from Needs crew."},{icon:d.KeyRound,text:`The lease ends: ${a} loses this ship and its secret stops working.`},l]}return[{icon:g,text:"Removes its crew request, so nothing crews it again."},{icon:h.Power,text:`${e.trierarch.name} stops the session and cleans up: the worktree goes if it has no uncommitted changes; with changes it is kept.`},{icon:c.CircleDashed,text:`The lease ends. ${b} shows Awaiting crew.`},l]}(a)}),void 0===s?null:(0,b.jsx)(o.InlineError,{title:"Couldn’t release the ship",description:s}),(0,b.jsxs)(k.AlertDialogFooter,{children:[(0,b.jsx)(k.AlertDialogClose,{render:(0,b.jsx)(l.Button,{disabled:r}),children:"Cancel"}),(0,b.jsx)(l.Button,{variant:"primary",icon:(0,b.jsx)(h.Power,{}),isLoading:r,onClick:t,"data-testid":"crew-release-confirm",children:r?"Releasing":"Release"})]})]})})}],58864)},42231,46444,21327,3842,52702,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(31429);let e={one:"delivery",many:"deliveries"};function f(a){if(0===a)return"Nothing is in flight, so no delivery moves.";let b=1===a?"returns":"return";return`${(0,d.counted)(a,{one:"in-flight delivery",many:"in-flight deliveries"})} ${b} to pending. Nothing is lost.`}function g(a){if("crewed"===a.status){let b=null===a.location?"the session crewing it":`the session on ${a.location.description??a.location.kind.toLowerCase()}`;return`This ends ${b}. ${f(a.inFlightDeliveries)}`}if(null!==a.startingPrompt&&!a.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}a.s(["abandonedLine",0,function(a){return`${(0,d.counted)(a,e)} will be abandoned`},"inFlightLine",0,f,"isTypedMatch",0,function(a,b){return b===a},"newCrewLineReplaced",0,g,"retireButtonLabel",0,function(a){return 0===a?"Retire ship":`Retire and abandon ${(0,d.counted)(a,e)}`}],46444);var h=a.i(12540),i=a.i(12068),j=a.i(52357),k=a.i(48819),l=a.i(18441),m=a.i(2374),n=a.i(33809),o=a.i(67042),p=a.i(82314),q=a.i(94777);function r({crewLines:a,subject:d,testIdPrefix:e,onCopied:f,onCopyFailed:g}){let[h,i]=(0,c.useState)(a[0]?.harness),j=a.find(a=>a.harness===h)??a[0];if(!j)return null;let k=(0,o.crewLineHarnessWord)(j.harness);return(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,b.jsx)(q.Tabs,{value:j.harness,onValueChange:b=>{let c=a.find(a=>a.harness===b);c&&i(c.harness)},children:(0,b.jsx)(q.TabsList,{"aria-label":`Crew ${d} from`,children:a.map(a=>(0,b.jsx)(q.TabsTrigger,{value:a.harness,"data-testid":`${e}-${a.harness}-tab`,children:(0,o.crewLineHarnessWord)(a.harness)},a.harness))})}),(0,b.jsx)("code",{"data-testid":`${e}-${j.harness}`,title:j.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:j.line}),(0,b.jsx)(p.CopyButton,{value:j.line,label:`Copy the ${k} crew line for ${d}`,isLabeled:!0,onCopied:f,onCopyFailed:g,"data-testid":`${e}-${j.harness}-copy`})]})}a.s(["CompactCrewLine",0,r],21327);var s=a.i(40392),t=a.i(83138);function u({note:a,model:c,template:d,testId:e}){return null===a&&null===c?null:(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,b.jsx)(t.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===d?"":` \xb7 ${d}`]}),null!==a&&(0,b.jsx)("span",{"data-testid":e,children:a}),null!==c&&(0,b.jsxs)("span",{children:["Runs ",(0,b.jsx)("span",{className:"font-mono",children:c})]})]})]})}function v({memberName:a,template:c,launchNote:d,model:e,crewLines:f}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{note:d,model:e,template:c,testId:"crew-line-launch-note"}),(0,b.jsx)(r,{crewLines:f,subject:a,testIdPrefix:"crew-line-text"}),(0,b.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,b.jsx)(j.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.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:a,state:c,template:d,launchNote:e=null,model:f=null,crewLines:g,error:h,isOpen:j,onOpenChange:o,onConfirm:p}){let q="issuing"===c;return(0,b.jsx)(l.Dialog,{open:j,onOpenChange:a=>{q||o(a)},children:(0,b.jsxs)(l.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:m.dialogSurface.phoneFullScreen,children:[(0,b.jsxs)(l.DialogHeader,{children:[(0,b.jsxs)(l.DialogTitle,{children:["Crew line for ",a]}),(0,b.jsx)(l.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."})]}),q&&(0,b.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,b.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,b.jsx)(n.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,b.jsx)(n.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===c&&void 0!==g&&(0,b.jsx)(v,{memberName:a,template:d,launchNote:e,model:f,crewLines:g}),"error"===c&&(0,b.jsx)(s.InlineError,{title:"Couldn’t issue a crew line",description:`${h??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,b.jsxs)(l.DialogFooter,{children:[("shown"===c||q)&&(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{variant:"primary","data-testid":"crew-line-done",disabled:q}),children:"Done"}),"error"===c&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Close"}),(0,b.jsx)(i.Button,{variant:"primary",icon:(0,b.jsx)(k.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:p,children:"Try again"})]})]})]})})}a.s(["LaunchNote",0,u],3842),a.s(["CrewLineDialog",0,w],52702);var x=a.i(59613);function y({memberName:a,replacedText:c,isOpen:d,onOpenChange:e,onConfirm:f}){return(0,b.jsx)(x.AlertDialog,{open:d,onOpenChange:e,children:(0,b.jsxs)(x.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:m.dialogSurface.phoneSheet,children:[(0,b.jsxs)(x.AlertDialogHeader,{children:[(0,b.jsxs)(x.AlertDialogTitle,{children:["Get a new crew line for ",a,"?"]}),(0,b.jsx)(x.AlertDialogDescription,{children:c??"Its new secret is shown once, with its launch note."})]}),(0,b.jsxs)(x.AlertDialogFooter,{children:[(0,b.jsx)(x.AlertDialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Cancel"}),(0,b.jsx)(i.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:f,children:"Get new crew line"})]})]})})}function z(a){let d=(0,h.useNewCrewLine)(),[e,f]=(0,c.useState)(!1),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(void 0),m=()=>{a&&d.mutate({squadronId:a.squadronId,shipId:a.member.shipId})},n=d.data?"shown":d.isError?"error":"issuing";return{isReady:a?.ship!==void 0,start:()=>{a?.ship&&(d.reset(),l(g(a.ship)),j(!0))},dialog:a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{memberName:a.member.name,replacedText:k,isOpen:i,onOpenChange:j,onConfirm:()=>{j(!1),f(!0),m()}}),(0,b.jsx)(w,{memberName:a.member.name,state:n,template:a.template,launchNote:d.data?.launchNote,model:d.data?.model,crewLines:d.data?.crewLines,error:d.error?.message,isOpen:e,onOpenChange:a=>{f(a),a||d.reset()},onConfirm:m})]}):null}}a.s(["GetNewCrewLine",0,function({isPrimary:a=!1,testId:c,...d}){let e=z(d);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.Button,{size:"xs",variant:a?"primary":"secondary",disabled:!e.isReady,"data-testid":c,onClick:e.start,children:"Get new crew line"}),e.dialog]})},"useNewCrewLineFlow",0,z],42231)},80459,a=>{"use strict";var b=a.i(87924),c=a.i(79762),d=a.i(97024),e=a.i(26268),f=a.i(85888),g=a.i(72131),h=a.i(46444),i=a.i(31429),j=a.i(59613),k=a.i(12068),l=a.i(2374),m=a.i(71673),n=a.i(40392),o=a.i(65698);let p={one:"delivery",many:"deliveries"};function q({role:a,othersOfRole:b,blueprint:c}){let d=0===b.length?`no ${a}`:`${String(b.length)} ${a}`;return void 0===c?`The squadron then has ${d}.`:`The squadron then has ${d}; blueprint ${c.label} has ${String(c.count)}.`}function r(a){let{squadronId:l,member:r,othersOfRole:s,blueprint:t,openDeliveries:u,inFlightDeliveries:v,isPending:w,error:x,onConfirm:y}=a,[z,A]=(0,g.useState)(""),B=u>0,C=!B||(0,h.isTypedMatch)(r.name,z),D=0===s.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(j.AlertDialogHeader,{children:[(0,b.jsxs)(j.AlertDialogTitle,{children:["Remove ",r.name," from ",l,"?"]}),(0,b.jsx)(j.AlertDialogDescription,{children:B?(0,b.jsx)(b.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,b.jsx)(b.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),B?(0,b.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,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("p",{className:"font-medium",children:(0,h.abandonedLine)(u)}),(0,b.jsxs)("p",{className:"text-foreground",children:[u-v," pending, ",v," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,b.jsx)(m.ConsequenceList,{consequences:[{icon:c.Archive,text:`Its ship ${r.name} is retired. Its history stays read-only.`},{icon:f.Users,text:q({role:r.role,othersOfRole:s,blueprint:t})}]}),D&&(0,b.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,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.jsxs)("span",{className:"font-medium",children:["The last ",r.role,"."]})," ",(0,b.jsxs)("span",{className:"text-foreground",children:[q({role:r.role,othersOfRole:s,blueprint:t})," Work for the role waits until a member is added."]})]})]}),!B&&(0,b.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,b.jsx)(d.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),B?(0,b.jsx)(o.TypedConfirm,{expected:r.name,value:z,onValueChange:A}):null,void 0!==x&&(0,b.jsx)(n.InlineError,{title:"Couldn’t remove the member",description:`${x} Nothing changed.`}),(0,b.jsxs)(j.AlertDialogFooter,{children:[(0,b.jsx)(j.AlertDialogClose,{render:(0,b.jsx)(k.Button,{disabled:w}),children:"Cancel"}),(0,b.jsx)(k.Button,{variant:"destructive",isLoading:w,disabled:!C,onClick:y,"data-testid":"remove-member-confirm",children:B?`Remove and abandon ${(0,i.counted)(u,p)}`:"Remove member"})]})]})}a.s(["RemoveMemberDialog",0,function(a){let{isOpen:c,onOpenChange:d,isPending:e}=a;return(0,b.jsx)(j.AlertDialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(j.AlertDialogContent,{"data-testid":"remove-member-dialog",className:l.dialogSurface.phoneSheet,children:(0,b.jsx)(r,{...a})})})}])},26110,a=>{"use strict";var b=a.i(87924),c=a.i(82247),d=a.i(63041),e=a.i(43216),f=a.i(63089);a.s(["DetailLayout",0,function({title:a,parents:g,header:h,children:i,sheet:j,live:k,nav:l,onCompose:m,onSearch:n,account:o,banner:p}){return(0,b.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,b.jsx)(d.Sidebar,{active:l.active,inboxCount:l.inboxCount,attentionCount:l.attentionCount,needsCrewCount:l.needsCrewCount,hasSquadrons:l.hasSquadrons,hasTrierarchs:l.hasTrierarchs,trierarchsCount:l.trierarchsCount,hasSettings:l.hasSettings,...o}),(0,b.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,b.jsx)(c.Header,{breadcrumb:a,parents:g,live:k,onCompose:m,onSearch:n}),p,(0,b.jsx)(f.TopBar,{title:a,live:k,back:g[g.length-1]??g[0]}),(0,b.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:[h,i]})]}),j,(0,b.jsx)(e.TabBar,{active:"overview"===l.active||"needs-crew"===l.active?"fleet":"settings"===l.active?void 0:l.active,hasSquadrons:l.hasSquadrons,hasTrierarchs:l.hasTrierarchs,trierarchsCount:l.trierarchsCount,inboxCount:l.inboxCount,attentionCount:l.attentionCount})]})}])},9854,a=>{"use strict";var b=a.i(31429);function c(a){let b=a.split(";")[0]?.trim().toLowerCase()??"";return"application/json"===b||b.endsWith("+json")}a.s(["formattedPayload",0,function(a,b){if(c(b))try{return JSON.stringify(JSON.parse(a),null,2)}catch{return}},"isJson",0,c,"payloadLabel",0,function(a,d){let e=c(d)?"JSON":d.split(";")[0]?.trim()??d,f=new TextEncoder().encode(a).byteLength;return`${e} \xb7 ${(0,b.counted)(f,{one:"byte",many:"bytes"})}`}])},45185,a=>{"use strict";a.i(23600);var b=a.i(90407),c=a.i(72872);let d={working:"Working",blocked:"Blocked",idle:"Idle"};a.s(["REPORT_STATE_WORDS",0,d,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(a,b){let d=Math.max(0,b.getTime()-a.getTime());return d<6e4?`${String(Math.floor(d/1e3))} s`:d<36e5?`${String(Math.floor(d/6e4))} min`:d<864e5?`${String(Math.floor(d/36e5))} h`:(0,c.relativeTime)(a,b)},"reportDetailsJson",0,function(a){return JSON.stringify(a,null,2)},"reportDetailsLabel",0,function(a){return`JSON \xb7 ${String((0,b.reportDetailsBytes)(a))} bytes`},"reportText",0,function(a){let b=d[a.state];return null===a.note?b:`${b}: ${a.note}`},"reportedWhen",0,function(a,b){let d=(0,c.relativeTime)(a,b);return`reported ${"Just now"===d?"just now":d}`}])}];
2
-
3
- //# sourceMappingURL=_20pku2-._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[96082,82611,681,71251,a=>{"use strict";a.i(23600);var b=a.i(11708),c=a.i(2811),d=a.i(29931);function e(a,b){for(let c of b)a.includes(c)||a.push(c)}function f(a){return Object.fromEntries((a?.options??[]).flatMap(a=>{let b=a.defaultValue??a.values[0];return void 0===b?[]:[[a.name,b]]}))}function g(a){let[b]=a?.repositories??[];if(void 0!==b)return{kind:"worktree",repository:b};let[c]=a?.folders??[];return void 0===c?void 0:{kind:"folder",name:c}}function h(a){let[b]=a;return{harness:b?.harness??"",workspace:g(b),options:f(b),firstPrompt:"",squadron:"",machineLabels:[]}}function i(a,b){let{harness:c,offers:d}=b,e=d.find(a=>a.harness===c),h=a.workspace,i=void 0!==h&&("worktree"===h.kind?e?.repositories.includes(h.repository)??!1:e?.folders.includes(h.name)??!1);return{...a,harness:c,workspace:i?h:g(e),options:f(e)}}let j=new TextEncoder;function k(a){return j.encode(a).byteLength}function l(a){return a<1024?`${String(a)} B`:`${(a/1024).toFixed(1).replace(/\.0$/,"")} KB`}a.s(["byteSize",0,l,"defaultValues",0,h,"offersOf",0,function(a){let b=[];for(let c of a)if(!c.isSilent&&null!==c.details)for(let a of c.details.harnesses){let f=b.find(b=>b.harness===a.harness);for(let g of(void 0===f&&(f={harness:a.harness,repositories:[],folders:[],options:[]},b.push(f)),e(f.repositories,c.details.workspaces.repositories),e(f.folders,c.details.workspaces.folders),(0,d.harnessOptions)(a.options))){let a=f.options.find(a=>a.name===g.name);void 0===a?f.options.push({...g,values:[...g.values]}):(e(a.values,g.values),a.defaultValue??=g.defaultValue)}}return b},"promptBytes",0,k,"settingsOf",0,function(a){if(""!==a.harness&&void 0!==a.workspace)return{harness:a.harness,workspace:a.workspace,options:a.options,...""===a.firstPrompt?{}:{firstPrompt:a.firstPrompt},...""===a.squadron?{}:{squadron:a.squadron},...0===a.machineLabels.length?{}:{machineLabels:a.machineLabels.flatMap(a=>{let b=(0,c.idSchema)("labelValue").safeParse(a);return b.success?[b.data]:[]})}}},"settingsRows",0,function(a){let c=b.crewSettingsSchema.safeParse(a);if(!c.success)return;let{harness:d,workspace:e,options:f,firstPrompt:g,squadron:h}=c.data;return[{label:"Harness",value:d},"worktree"===e.kind?{label:"Workspace",value:e.repository,meta:"New worktree"}:{label:"Workspace",value:e.name,meta:"Folder, as it is"},...Object.entries(f).map(([a,b])=>({label:a,value:"string"==typeof b?b:JSON.stringify(b),isMono:!0})),{label:"First prompt",value:void 0===g?null:l(k(g))},{label:"Squadron",value:h??null,isMono:!0}]},"valuesOf",0,function(a,c){let d=b.crewSettingsSchema.safeParse(a);if(!d.success)return h(c);let{harness:e,workspace:f,options:g,firstPrompt:i,squadron:j,machineLabels:k}=d.data;return{harness:e,workspace:"worktree"===f.kind?{kind:"worktree",repository:f.repository}:{kind:"folder",name:f.name},options:Object.fromEntries(Object.entries(g).flatMap(([a,b])=>"string"==typeof b?[[a,b]]:[])),firstPrompt:i??"",squadron:j??"",machineLabels:[...k??[]]}},"withHarness",0,i],96082);var m=a.i(65230);function n(a,b){return a.ships.find(a=>a.id===b.shipId)?.labels.map(a=>a.valueId)??[]}function o(a){return 1===a?{these:"this label",carries:"carries it"}:2===a?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}a.s(["machineLabelIdsOf",0,function(a){let c=b.crewSettingsSchema.safeParse(a);return c.success?[...c.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(a,b){return{groups:function(a,b){let c=b.map(b=>n(a,b)),d=[],e=[];for(let b of a.labels){let f=b.values.map(a=>({valueId:a.id,value:a.value,shipCount:c.filter(b=>b.includes(a.id)).length})),g={labelId:b.id,key:b.key,mark:a.ownerOf.get(b.id)?.mark??"ship",values:f};(f.some(a=>a.shipCount>0)?d:e).push(g)}let f=(a,b)=>a.key.localeCompare(b.key);return[{title:"On machines",keys:d.toSorted(f)},{title:"On no machine yet",keys:e.toSorted(f)}].filter(a=>a.keys.length>0)}(a,b),chipsOf:b=>(0,m.pickedChips)(b,a),matchOf:c=>{var d;return{matching:(d={machines:b,valueIds:c}).machines.filter(b=>{let c=n(a,b);return d.valueIds.every(a=>c.includes(a))}).map(a=>a.name),total:d.machines.length}}}},"machineLabelsText",0,function(a){let b=a.map(a=>`${a.key}=${a.value}`);return b.length<=2?b.join(" and "):`${b.slice(0,-1).join(", ")} and ${b.at(-1)??""}`},"noMatchWords",0,o],82611);var p=a.i(87924),q=a.i(72131),r=a.i(67042),s=a.i(45098),t=a.i(48136),u=a.i(72309),v=a.i(40392),w=a.i(7058),x=a.i(8311),y=a.i(3512),z=a.i(38246),A=a.i(12068),B=a.i(60275),C=a.i(36501),D=a.i(39977),E=a.i(7963),F=a.i(41146),G=a.i(33540),H=a.i(98238),I=a.i(23636),J=a.i(80487),K=a.i(75297);let L={"trierarch-plugin":I.ShipWheel,squadrons:D.Boxes,ship:H.Ship};function M(a,b){return`${String(a)} ${1===a?b:`${b}s`}`}function N({groups:a,pickedValueIds:b,onPick:c,size:d="sm",pickedWord:e="Picked",countWord:f="ship"}){let[g,h]=(0,q.useState)(""),[i,j]=(0,q.useState)(void 0),k="touch"===d,l=(0,J.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",k?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==i)return(0,p.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,p.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:()=>{j(void 0)},"aria-label":`Back to the keys, from ${i.key}`,children:[(0,p.jsx)(E.ChevronLeft,{"aria-hidden":!0}),i.key,"="]}),(0,p.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===f?"Ships":"Machines"," with each"]})]}),(0,p.jsx)("ul",{className:"flex flex-col",children:i.values.map(a=>{let d=b.includes(a.valueId);return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:l,disabled:d,"data-testid":"label-picker-value",onClick:()=>{c(a.valueId),j(void 0),h("")},children:[(0,p.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:a.value}),(0,p.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:d?e:M(a.shipCount,f)})]})},a.valueId)})})]});let m=g.trim().toLowerCase(),n=a.map(a=>({...a,keys:a.keys.filter(a=>""===m||a.key.includes(m))})).filter(a=>a.keys.length>0);return(0,p.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,p.jsx)(K.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:k?"touch":"md",leadingIcon:(0,p.jsx)(G.Search,{}),value:g,onChange:a=>{h(a.target.value)}}),0===n.length?(0,p.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===a.length?"The fleet has no labels yet.":`No key matches “${g.trim()}”.`}):n.map(a=>(0,p.jsxs)("div",{className:"flex flex-col",children:[(0,p.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:a.title}),(0,p.jsx)("ul",{className:"flex flex-col",children:a.keys.map(a=>{let b="none"===a.mark?null:L[a.mark];return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:(0,J.classNames)(l,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{j(a)},children:[null===b?null:(0,p.jsx)(b,{"aria-hidden":!0}),(0,p.jsx)("span",{className:"font-mono",children:a.key}),(0,p.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:M(a.values.length,"value")}),(0,p.jsx)(F.ChevronRight,{"aria-hidden":!0})]})},a.labelId)})})]},a.title))]})}function O({groups:a,picked:b,isDisabled:c,onAdd:d}){let[e,f]=(0,q.useState)(!1);return(0,p.jsxs)(B.Popover,{open:e,onOpenChange:f,children:[(0,p.jsx)(B.PopoverTrigger,{render:(0,p.jsx)(A.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,p.jsx)(y.Plus,{}),disabled:c,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,p.jsxs)(B.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,p.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,p.jsx)(N,{groups:a,pickedValueIds:b.map(a=>a.valueId),countWord:"machine",onPick:a=>{f(!1),d(a)}}),(0,p.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,p.jsx)(z.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}function P({shipName:a,picked:b,groups:c,match:d,isDisabled:e,onAdd:f,onRemove:g}){let h=o(b.length);return(0,p.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,p.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,p.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,p.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===b.length?(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,b.map((a,b)=>(0,p.jsxs)(q.Fragment,{children:[0===b?null:(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,p.jsx)(C.LabelChip,{chip:a,testId:"machine-label",...e?{}:{onRemove:()=>{g(a.valueId)}}})]},a.valueId)),b.length>=w.SHIP_LABELS_MAX?null:(0,p.jsx)(O,{groups:c,picked:b,isDisabled:e,onAdd:f})]}),0===b.length?null:0===d.matching.length?(0,p.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,p.jsx)(x.Clock,{"aria-hidden":!0}),(0,p.jsxs)("span",{children:["No machine matches ",h.these,". You can still request: it waits on Needs crew until a machine ",h.carries,"."]})]}):(0,p.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",d.matching.length," of ",d.total," ",1===d.total?"machine":"machines",": ",d.matching.join(", "),"."]}),(0,p.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",a," only on a machine that carries every label here. Leave it empty for any machine."]})]})}function Q({id:a,label:b,isOptional:c,hint:d,error:e,children:f}){return(0,p.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,p.jsxs)(s.Label,{htmlFor:a,children:[b,c?(0,p.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"}):null]}),f,void 0===d?null:(0,p.jsx)("p",{className:"text-meta text-muted-foreground",children:d}),void 0===e?null:(0,p.jsx)(v.InlineError,{variant:"field",title:e})]})}function R({id:a,items:b,value:c,onPick:d,isDisabled:e,testId:f}){return(0,p.jsxs)(t.Select,{items:b,value:c,disabled:e,onValueChange:a=>{"string"==typeof a&&d(a)},children:[(0,p.jsx)(t.SelectTrigger,{id:a,className:"h-(--size-control) w-full","data-testid":f,children:(0,p.jsx)(t.SelectValue,{})}),(0,p.jsx)(t.SelectContent,{children:Object.entries(b).map(([a,b])=>(0,p.jsx)(t.SelectItem,{value:a,children:b},a))})]})}a.s(["LabelPicker",0,N],681),a.s(["CrewSettingsFields",0,function({offers:a,values:c,onChange:d,squadrons:e,refusal:f,isDisabled:g=!1,machineLabels:h}){var j;let m={harness:(0,q.useId)(),workspace:(0,q.useId)(),options:(0,q.useId)(),firstPrompt:(0,q.useId)(),squadron:(0,q.useId)()},n=a.find(a=>a.harness===c.harness),o=a=>f?.field===a?f.reason:void 0,s=k(c.firstPrompt),t=s>b.FIRST_PROMPT_MAX_BYTES,v=Object.fromEntries([...(n?.repositories??[]).map(a=>[`worktree:${a}`,`${a} \xb7 new worktree`]),...(n?.folders??[]).map(a=>[`folder:${a}`,`${a} \xb7 folder, as it is`])]);return(0,p.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"crew-settings-fields",children:[(0,p.jsx)(Q,{id:m.harness,label:"Harness",error:o("harness"),children:(0,p.jsx)(R,{id:m.harness,items:Object.fromEntries(a.map(a=>[a.harness,(0,r.harnessWord)(a.harness)])),value:c.harness,isDisabled:g,testId:"crew-settings-harness",onPick:b=>{d(i(c,{harness:b,offers:a}))}})}),(0,p.jsx)(Q,{id:m.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:o("workspace"),children:(0,p.jsx)(R,{id:m.workspace,items:v,value:void 0===(j=c.workspace)?"":"worktree"===j.kind?`worktree:${j.repository}`:`folder:${j.name}`,isDisabled:g,testId:"crew-settings-workspace",onPick:a=>{d({...c,workspace:function(a){let[b,...c]=a.split(":"),d=c.join(":");return"worktree"===b?{kind:"worktree",repository:d}:"folder"===b?{kind:"folder",name:d}:void 0}(a)})}})}),void 0===h?null:(0,p.jsx)(P,{shipName:h.shipName,picked:h.chipsOf(c.machineLabels),groups:h.groups,match:h.matchOf(c.machineLabels),isDisabled:g,onAdd:a=>{d({...c,machineLabels:[...c.machineLabels,a]})},onRemove:a=>{d({...c,machineLabels:c.machineLabels.filter(b=>b!==a)})}}),(n?.options??[]).map((a,b)=>(0,p.jsx)(Q,{id:`${m.options}-${String(b)}`,label:a.name,error:0===b?o("options"):void 0,children:(0,p.jsx)(R,{id:`${m.options}-${String(b)}`,items:Object.fromEntries(a.values.map(b=>[b,b===a.defaultValue?`${b} (default)`:b])),value:c.options[a.name]??"",isDisabled:g,testId:`crew-settings-option-${a.name}`,onPick:b=>{d({...c,options:{...c.options,[a.name]:b}})}})},a.name)),(0,p.jsx)(Q,{id:m.firstPrompt,label:"First prompt",isOptional:!0,hint:(0,p.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,p.jsx)("span",{children:"The session starts with it, on its first start only."}),(0,p.jsxs)("span",{className:"tabular-nums",children:[l(s)," of ",l(b.FIRST_PROMPT_MAX_BYTES)]})]}),error:t?`A first prompt is at most ${l(b.FIRST_PROMPT_MAX_BYTES)}.`:o("firstPrompt"),children:(0,p.jsx)(u.Textarea,{id:m.firstPrompt,rows:3,disabled:g,"aria-invalid":!!t||void 0,"data-testid":"crew-settings-first-prompt",value:c.firstPrompt,onChange:a=>{d({...c,firstPrompt:a.target.value})}})}),void 0===e?null:(0,p.jsx)(Q,{id:m.squadron,label:"Squadron",isOptional:!0,hint:"The session starts with that squadron’s crew line and template.",error:o("squadron"),children:(0,p.jsx)(R,{id:m.squadron,items:{"":"None",...Object.fromEntries(e.map(a=>[a,a]))},value:c.squadron,isDisabled:g,testId:"crew-settings-squadron",onPick:a=>{d({...c,squadron:a})}})})]})}],71251)}];
2
-
3
- //# sourceMappingURL=packages_console_lib_crew-settings-form_ts_1_mrtph._.js.map
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86247,e=>{"use strict";var i=e.i(56420);let t={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"]};t.node;let s=(0,i.default)(t);e.s(["Ellipsis",0,s],86247)},18236,e=>{"use strict";var i=e.i(56420);let t={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"]};t.node;let s=(0,i.default)(t);e.s(["FileKey",0,s],18236)},58925,e=>{"use strict";var i=e.i(56420);let t={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"}]]};t.node;let s=(0,i.default)(t);e.s(["KeyRound",0,s],58925)},68997,e=>{"use strict";var i=e.i(56420);let t={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"]};t.node;let s=(0,i.default)(t);e.s(["Pen",0,s],68997)},15331,71139,73330,e=>{"use strict";var i=e.i(56420);let t={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"}]]};t.node;let s=(0,i.default)(t);e.s(["Radio",0,s],15331);let n={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"}]]};n.node;let a=(0,i.default)(n);e.s(["UserX",0,a],71139);var r=e.i(49635);e.s(["canPing",0,function(e){return"agent"===e.kind&&"crewed"===e.status},"pingLine",0,function(e,i){let t=new Date(e.sentAt);switch(e.state){case"waiting":{let e=(0,r.relativeTime)(t,i);return`Pinged ${"Just now"===e?"just now":e}, no answer yet`}case"answered":var s;let n;return null===e.answeredAt?"Answered ping":`Answered ping in ${(n=Math.max(0,(s=new Date(e.answeredAt)).getTime()-t.getTime()))<6e4?`${String(Math.round(n/1e3))} s`:(0,r.duration)(t,s)}`;case"received":return"Received, not answered with pong";case"undeliverable":return"Ping not answered: undeliverable"}}],73330)},68401,e=>{"use strict";var i=e.i(56420);let t={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"}]]};t.node;let s=(0,i.default)(t);e.s(["Tags",0,s],68401)},37817,e=>{"use strict";var i=e.i(56420);let t={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"}]]};t.node;let s=(0,i.default)(t);e.s(["Undo2",0,s],37817)},49319,e=>{"use strict";var i=e.i(56420);let t={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"}]]};t.node;let s=(0,i.default)(t);e.s(["UserMinus",0,s],49319)},82303,e=>{"use strict";var i=e.i(56420);let t={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"}]]};t.node;let s=(0,i.default)(t);e.s(["Users",0,s],82303)},91703,e=>{"use strict";var i=e.i(43476),t=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:u}){return(0,i.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,i.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,i.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,i.jsx)(t.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,i.jsx)("span",{className:"truncate",children:e})]}),(0,i.jsx)(n.CopyButton,{value:o??a,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":u})]}),(0,i.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})]})}])},1009,e=>{"use strict";var i=e.i(43476);e.s(["ConsequenceList",0,function({consequences:e}){return(0,i.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:t})=>(0,i.jsxs)("li",{className:"flex gap-2",children:[(0,i.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,i.jsx)("span",{children:t})]},t))})}])},56478,e=>{"use strict";var i=e.i(43476),t=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,i.jsx)(s.CodeBlock,{label:`Crew line, ${(0,t.harnessWord)(e)} with the aeolus plugin`,code:l,isWrapped:!0,copyLabel:`Copy the ${(0,t.harnessWord)(e)} crew line for ${n}`,codeTestId:`${a}-${e}`,copyTestId:`${a}-${e}-copy`,onCopied:r,onCopyFailed:o},e))}])},69374,e=>{"use strict";var i=e.i(43476),t=e.i(71645),s=e.i(26808),n=e.i(12470),a=e.i(91727);e.s(["TypedConfirm",0,function({expected:e,value:r,onValueChange:o,"data-testid":l="retire-typed-confirm"}){let d=(0,t.useId)(),c=(0,t.useId)();return(0,i.jsxs)("div",{"data-testid":l,className:"flex flex-col gap-1.5",children:[(0,i.jsxs)(a.Label,{htmlFor:d,className:"text-meta",children:["Type ",(0,i.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:e})," to confirm"]}),(0,i.jsx)(n.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:r,onChange:e=>{o(e.target.value)}}),(0,i.jsx)("p",{id:c,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===r?"Case and hyphens must match.":(0,s.isTypedMatch)(e,r)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},29244,88280,39844,e=>{"use strict";var i=e.i(43476),t=e.i(52886),s=e.i(18236),n=e.i(58925),a=e.i(37817),r=e.i(26808),o=e.i(24010),l=e.i(15905),d=e.i(94945),c=e.i(1009),h=e.i(17981);let u={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:x="release",isOpen:g,onOpenChange:f,isPending:b,error:y,onConfirm:j}=e,v=u[x],w=m?`The session on ${m}`:"The session crewing it";return(0,i.jsx)(o.AlertDialog,{open:g,onOpenChange:e=>{b||f(e)},children:(0,i.jsxs)(o.AlertDialogContent,{"data-testid":v.testId,className:d.dialogSurface.phoneSheet,children:[(0,i.jsxs)(o.AlertDialogHeader,{children:[(0,i.jsxs)(o.AlertDialogTitle,{children:[v.title," ",p,"?"]}),(0,i.jsxs)(o.AlertDialogDescription,{children:[w," loses this ship now."]})]}),(0,i.jsx)(c.ConsequenceList,{consequences:function(e){let{shipName:i,inFlightCount:o,mode:l="release"}=e;return[{icon:n.KeyRound,text:"Its secret and crew token stop working, so that session cannot come back."},{icon:a.Undo2,text:(0,r.inFlightLine)(o)},"release"===l?{icon:t.CircleDashed,text:`${i} shows as Awaiting crew until you get a new starting prompt.`}:{icon:s.FileKey,text:"A new starting prompt and its crew lines are shown once, for the new crew."}]}(e)}),void 0===y?null:(0,i.jsx)(h.InlineError,{title:v.failed,description:`${y} Nothing changed; the session still holds the ship.`}),(0,i.jsxs)(o.AlertDialogFooter,{children:[(0,i.jsx)(o.AlertDialogClose,{render:(0,i.jsx)(l.Button,{disabled:b}),children:"Cancel"}),(0,i.jsx)(l.Button,{variant:"primary",isLoading:b,onClick:j,children:b?v.busy:v.action})]})]})})}],29244),e.i(31627);var p=e.i(44827),m=e.i(85595),x=e.i(16984),g=e.i(66787),f=e.i(71645),b=e.i(90063),y=e.i(65160),j=e.i(22212),v=e.i(12470),w=e.i(91727);function k({shipName:e,activeNames:t,isPending:s,error:n,onSubmit:a}){let r=(0,f.useId)(),o=(0,f.useId)(),[d,c]=(0,f.useState)(""),u=(0,y.checkShipName)(d,{activeNames:t,current:e}),C="invalid"===u.kind||"reserved"===u.kind||"taken"===u.kind,N="available"===u.kind;return(0,i.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),N&&a(d)},children:[(0,i.jsxs)(j.DialogHeader,{children:[(0,i.jsxs)(j.DialogTitle,{children:["Rename ",e]}),(0,i.jsx)(j.DialogDescription,{children:"The ship keeps its id, inbox and history."})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,i.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,i.jsx)(w.Label,{htmlFor:r,children:"New name"}),(0,i.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[d.length," / ",p.SHIP_HANDLE_MAX_LENGTH]})]}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(v.Input,{id:r,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:e,"data-testid":"rename-name","aria-invalid":!!C||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,y.asHandle)(e.target.value))}}),"available"===u.kind?(0,i.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):C?(0,i.jsx)(x.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,i.jsx)("p",{id:o,"aria-live":"polite",className:(0,b.classNames)("text-meta",C?"text-destructive-text":"text-muted-foreground"),children:u.message})]}),(0,i.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,i.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsxs)("p",{className:"text-body font-medium",children:["Ships that address ",e," by name stop reaching it"]}),(0,i.jsx)("p",{className:"text-meta text-foreground",children:"Messages already sent are unaffected, because they are stored by ship id."})]})]}),void 0===n?null:(0,i.jsx)(h.InlineError,{title:"Couldn’t rename the ship",description:`${n} Nothing changed.`}),(0,i.jsxs)(j.DialogFooter,{children:[(0,i.jsx)(j.DialogClose,{render:(0,i.jsx)(l.Button,{type:"button",disabled:s}),children:"Cancel"}),(0,i.jsx)(l.Button,{type:"submit",variant:"primary",isLoading:s,disabled:!N,"data-testid":"rename-submit",children:s?"Renaming":"Rename ship"})]})]})}e.s(["RenameDialog",0,function(e){let{isOpen:t,onOpenChange:s,isPending:n}=e;return(0,i.jsx)(j.Dialog,{open:t,onOpenChange:e=>{n||s(e)},children:(0,i.jsx)(j.DialogContent,{"data-testid":"rename-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,i.jsx)(k,{...e})})})}],88280);var C=e.i(80799),N=e.i(68401),D=e.i(71139),S=e.i(82303),I=e.i(69374);function M({openDeliveries:e}){return 0===e?(0,i.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,i.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}):(0,i.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,i.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("p",{className:"text-body font-medium",children:(0,r.abandonedLine)(e)}),(0,i.jsx)("p",{className:"text-meta text-foreground",children:"Each is marked Abandoned and its sender can see that."})]})]})}function L(e){var t;let{shipName:s,openDeliveries:a,isCrewed:d,isPending:u,error:p,onConfirm:m}=e,[x,g]=(0,f.useState)(""),b=a>0,y=!b||(0,r.isTypedMatch)(s,x);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.AlertDialogHeader,{children:[(0,i.jsxs)(o.AlertDialogTitle,{children:["Retire ",s,"?"]}),(0,i.jsx)(o.AlertDialogDescription,{children:"Retiring ends this ship for good. Its history stays available read-only. This can’t be undone."})]}),(0,i.jsx)(M,{openDeliveries:a}),(0,i.jsx)(c.ConsequenceList,{consequences:(t=e.labelLines??[],[...d?[{icon:D.UserX,text:"The session crewing it loses it now."}]:[],...t.map(e=>({icon:N.Tags,text:e})),{icon:n.KeyRound,text:"Its secret stops working."},{icon:C.Tag,text:"It is never crewed or messaged again, and its name is free for a new ship."},{icon:S.Users,text:"Deliveries to its type stay, for the other ships of the type."}])}),b?(0,i.jsx)(I.TypedConfirm,{expected:s,value:x,onValueChange:g}):null,void 0===p?null:(0,i.jsx)(h.InlineError,{title:"Couldn’t retire the ship",description:`${p} Nothing changed.`}),(0,i.jsxs)(o.AlertDialogFooter,{children:[(0,i.jsx)(o.AlertDialogClose,{render:(0,i.jsx)(l.Button,{disabled:u}),children:"Cancel"}),(0,i.jsx)(l.Button,{variant:"destructive",isLoading:u,disabled:!y,onClick:m,children:(0,r.retireButtonLabel)(a)})]})]})}e.s(["RetireDialog",0,function(e){let{isOpen:t,onOpenChange:s,isPending:n}=e;return(0,i.jsx)(o.AlertDialog,{open:t,onOpenChange:e=>{n||s(e)},children:(0,i.jsx)(o.AlertDialogContent,{"data-testid":"retire-dialog",className:d.dialogSurface.phoneSheet,children:(0,i.jsx)(L,{...e})})})}],39844)},48287,e=>{"use strict";var i=e.i(43476),t=e.i(76561),s=e.i(85595),n=e.i(66787),a=e.i(82303),r=e.i(71645),o=e.i(26808),l=e.i(46150),d=e.i(24010),c=e.i(15905),h=e.i(94945),u=e.i(1009),p=e.i(17981),m=e.i(69374);let x={one:"delivery",many:"deliveries"};function g({role:e,othersOfRole:i,blueprint:t}){let s=0===i.length?`no ${e}`:`${String(i.length)} ${e}`;return void 0===t?`The squadron then has ${s}.`:`The squadron then has ${s}; blueprint ${t.label} has ${String(t.count)}.`}function f(e){let{squadronId:h,member:f,othersOfRole:b,blueprint:y,openDeliveries:j,inFlightDeliveries:v,isPending:w,error:k,onConfirm:C}=e,[N,D]=(0,r.useState)(""),S=j>0,I=!S||(0,o.isTypedMatch)(f.name,N),M=0===b.length;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.AlertDialogHeader,{children:[(0,i.jsxs)(d.AlertDialogTitle,{children:["Remove ",f.name," from ",h,"?"]}),(0,i.jsx)(d.AlertDialogDescription,{children:S?(0,i.jsx)(i.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,i.jsx)(i.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),S?(0,i.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,i.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,i.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,i.jsx)("p",{className:"font-medium",children:(0,o.abandonedLine)(j)}),(0,i.jsxs)("p",{className:"text-foreground",children:[j-v," pending, ",v," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,i.jsx)(u.ConsequenceList,{consequences:[{icon:t.Archive,text:`Its ship ${f.name} is retired. Its history stays read-only.`},{icon:a.Users,text:g({role:f.role,othersOfRole:b,blueprint:y})}]}),M&&(0,i.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,i.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,i.jsxs)("span",{children:[(0,i.jsxs)("span",{className:"font-medium",children:["The last ",f.role,"."]})," ",(0,i.jsxs)("span",{className:"text-foreground",children:[g({role:f.role,othersOfRole:b,blueprint:y})," Work for the role waits until a member is added."]})]})]}),!S&&(0,i.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,i.jsx)(s.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),S?(0,i.jsx)(m.TypedConfirm,{expected:f.name,value:N,onValueChange:D}):null,void 0!==k&&(0,i.jsx)(p.InlineError,{title:"Couldn’t remove the member",description:`${k} Nothing changed.`}),(0,i.jsxs)(d.AlertDialogFooter,{children:[(0,i.jsx)(d.AlertDialogClose,{render:(0,i.jsx)(c.Button,{disabled:w}),children:"Cancel"}),(0,i.jsx)(c.Button,{variant:"destructive",isLoading:w,disabled:!I,onClick:C,"data-testid":"remove-member-confirm",children:S?`Remove and abandon ${(0,l.counted)(j,x)}`:"Remove member"})]})]})}e.s(["RemoveMemberDialog",0,function(e){let{isOpen:t,onOpenChange:s,isPending:n}=e;return(0,i.jsx)(d.AlertDialog,{open:t,onOpenChange:e=>{n||s(e)},children:(0,i.jsx)(d.AlertDialogContent,{"data-testid":"remove-member-dialog",className:h.dialogSurface.phoneSheet,children:(0,i.jsx)(f,{...e})})})}])},5894,e=>{"use strict";var i=e.i(43476),t=e.i(76561),s=e.i(8734),n=e.i(86247),a=e.i(44594),r=e.i(58925),o=e.i(68997),l=e.i(15331),d=e.i(60011),c=e.i(19759),h=e.i(49319),u=e.i(57443),p=e.i(71139),m=e.i(22016),x=e.i(71645),g=e.i(5387),f=e.i(90262),b=e.i(80581),y=e.i(73330),j=e.i(53573),v=e.i(86165),w=e.i(48695),k=e.i(84294),C=e.i(84156),N=e.i(15905),D=e.i(57334),S=e.i(75305),I=e.i(41880),M=e.i(44824),L=e.i(29244),T=e.i(39874),z=e.i(48287),A=e.i(88280),R=e.i(39844),P=e.i(82532);function $({action:e,className:t}){let s=e.isPrimary?"primary":e.isDestructive||"rename"===e.key?"ghost":"secondary";return void 0!==e.href?(0,i.jsx)(N.Button,{size:"xs",variant:s,nativeButton:!1,"data-testid":e.testId,className:t,render:(0,i.jsx)(m.default,{href:e.href}),children:e.label}):(0,i.jsx)(N.Button,{size:"xs",variant:s,"data-testid":e.testId,disabled:e.isDisabled,isLoading:e.isLoading,className:t,onClick:e.onSelect,children:e.label})}function O(e,i){let t=e[i-1],s=e[i];return void 0!==t&&void 0!==s&&(!0===t.isMenuOnly&&!0!==s.isMenuOnly||!0===s.isDestructive&&!0!==t.isDestructive)}function F({layout:e,ship:t,actions:s}){if("next"===e){let e=s.find(e=>"prompt"===e.key||"crew-line"===e.key&&!0===e.isPrimary);return e?(0,i.jsx)($,{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=s.filter(e=>!0!==e.isMenuOnly);return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2 max-sm:justify-start",children:e.map(e=>(0,i.jsx)($,{action:e},e.key))})}let a=(0,i.jsx)(N.Button,{size:"sheet"===e?"touch":"xs",variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${t.name}`,icon:(0,i.jsx)(n.Ellipsis,{}),"data-testid":"fleet-actions"});return"sheet"===e?(0,i.jsxs)(S.Sheet,{children:[(0,i.jsx)(S.SheetTrigger,{render:a}),(0,i.jsxs)(S.SheetContent,{side:"bottom","data-testid":"fleet-row-sheet",children:[(0,i.jsx)(S.SheetHeader,{children:(0,i.jsx)(S.SheetTitle,{children:t.name})}),(0,i.jsx)("ul",{className:"flex flex-col pb-2",children:s.map((e,t)=>(0,i.jsx)("li",{className:O(s,t)?"mt-1 border-t border-border pt-1":void 0,children:(0,i.jsxs)(S.SheetClose,{render:void 0===e.href?(0,i.jsx)("button",{type:"button",disabled:e.isDisabled,onClick:e.onSelect}):(0,i.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,i.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel.replace(/…$/,"")]})},e.key))}),(0,i.jsx)("div",{className:"px-4 pb-4",children:(0,i.jsx)(S.SheetClose,{render:(0,i.jsx)(N.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]}):(0,i.jsxs)(D.DropdownMenu,{children:[(0,i.jsx)(D.DropdownMenuTrigger,{render:a}),(0,i.jsx)(D.DropdownMenuContent,{children:s.map((e,t)=>(0,i.jsxs)(x.Fragment,{children:[O(s,t)?(0,i.jsx)(D.DropdownMenuSeparator,{}):null,void 0===e.href?(0,i.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,disabled:e.isDisabled,variant:e.isDestructive?"destructive":"default",onClick:e.onSelect,children:[(0,i.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]}):(0,i.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,render:(0,i.jsx)(m.default,{href:e.href}),children:[(0,i.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]})]},e.key))})]})}e.s(["ShipActions",0,function({ship:e,layout:n="buttons"}){var m,N;let D=(0,f.useAccess)(),[S,$]=(0,x.useState)(),[O,q]=(0,x.useState)(!1),[B,U]=(0,x.useState)(void 0),H=(0,g.useGetStartingPrompt)(),E=(0,g.useReleaseShip)(),K=(0,g.useRetireShip)(),G=(0,g.useRecrewShip)(),V=(0,g.useRenameShip)(),X=(0,g.usePingShip)(),W=(0,g.useFleetSnapshot)(),_=(0,g.useLabelContext)(),J=(0,j.useShip)("release"===S||"recrew"===S||"retire"===S||"remove"===S?e.id:void 0),Q=(0,v.useSquadronsConnection)(),Y=(0,w.useSquadrons)(),Z=(0,w.useRemoveMember)(),ee=Y.data?.find(i=>"disbanded"!==i.state&&(i.flagship.shipId===e.id||i.members.some(i=>i.shipId===e.id))),ei=void 0!==ee&&ee.flagship.shipId!==e.id,et=(0,j.useShip)(ei&&"retired"!==e.status?e.id:void 0),es=ee?.members.find(i=>i.shipId===e.id),en=(0,T.useNewCrewLineFlow)(ee&&es?{squadronId:ee.id,member:es,ship:et.data}:void 0),ea="unknown"===Q||"connected"===Q&&!Y.isFetched,er=()=>{$(void 0)},eo=H.data??G.data,el=eo?"shown":H.isError?"error":"issuing",ed=e=>()=>{E.reset(),K.reset(),G.reset(),V.reset(),Z.reset(),$(e)},ec=async()=>{try{await navigator.clipboard.writeText(e.id),(0,I.showToast)({title:"Ship id copied",description:e.id,tone:"success"})}catch{(0,I.showToast)({title:"Couldn’t copy the ship id",description:e.id,tone:"error"})}},eh=ee?.flagship.shipId===e.id,eu={key:"message",label:"Message",menuLabel:"Message this ship…",icon:c.SquarePen,testId:"fleet-ship-message",onSelect:()=>{q(!0)},isMenuOnly:!0,needs:"canSend"},ep={key:"copy",label:"Copy ship id",menuLabel:"Copy ship id",icon:s.Copy,testId:"fleet-ship-copy-id",onSelect:()=>{ec()},isMenuOnly:!0},em=(0,y.canPing)(e)?[{key:"ping",label:"Ping",menuLabel:"Ping",icon:l.Radio,testId:"fleet-ship-ping",onSelect:()=>{X.mutate({shipId:e.id},{onSuccess:({isNew:i})=>{(0,I.showToast)(i?{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:i=>{(0,I.showToast)({title:`Couldn’t ping ${e.name}`,description:i.message,tone:"error"})}})},isLoading:X.isPending,needs:"canManage"}]:[],ex=[];return"operator"===e.kind?ex.push({key:"inbox",label:"Open inbox",menuLabel:"Open inbox",icon:a.Inbox,testId:"fleet-ship-open-inbox",href:"/inbox",isMenuOnly:!0},ep):"retired"===e.status||"viewer"===e.kind?ex.push(ep):eh?ex.push({key:"squadron",label:"Open squadron",menuLabel:"Open squadron",icon:d.Shapes,testId:"fleet-ship-open-squadron",href:`/squadrons/${ee.id}`}):ea?ex.push(eu,ep,...em):es&&ee?(ex.push(eu,ep,...em,{key:"crew-line",label:"Get new crew line",menuLabel:"Get new crew line…",icon:r.KeyRound,testId:"fleet-ship-new-crew-line",onSelect:en.start,needs:"canManage",isDisabled:!en.isReady,isPrimary:"silent"===es.health}),"crewed"===e.status&&ex.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)&&ex.push({key:"remove",label:"Remove from squadron",menuLabel:"Remove from squadron…",icon:h.UserMinus,testId:"fleet-ship-remove",onSelect:ed("remove"),isDestructive:!0,needs:"canManage"})):(ex.push(eu,ep),"awaitingCrew"===e.status?ex.push({key:"prompt",label:"Get starting prompt",menuLabel:"Get starting prompt…",icon:r.KeyRound,testId:"fleet-ship-prompt",onSelect:()=>{H.reset(),G.reset(),U((0,C.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),$("prompt"),H.mutate({shipId:e.id})},needs:"canManage"}):ex.push(...em,{key:"recrew",label:"Re-crew",menuLabel:"Re-crew…",icon:u.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"}),ex.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:t.Archive,testId:"fleet-ship-retire",onSelect:ed("retire"),isDestructive:!0,needs:"canManage"})),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(F,{layout:n,ship:e,actions:(m=ex,N=D,m.filter(e=>void 0===e.needs||N[e.needs]))}),(0,i.jsx)(L.ReleaseDialog,{shipName:e.name,sessionLocation:null===e.location?null:e.location.description??e.location.kind.toLowerCase(),inFlightCount:J.data?.inFlightDeliveries??0,mode:"recrew"===S?"recrew":"release",isOpen:("release"===S||"recrew"===S)&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:E.isPending||G.isPending,error:("recrew"===S?G.error:E.error)?.message,onConfirm:()=>{"recrew"===S?G.mutate({shipId:e.id},{onSuccess:()=>{U(void 0),$("prompt")}}):E.mutate({shipId:e.id},{onSuccess:er})}}),(0,i.jsx)(R.RetireDialog,{shipName:e.name,openDeliveries:J.data?.openDeliveries??0,isCrewed:"crewed"===e.status,isOpen:"retire"===S&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:K.isPending,error:K.error?.message,onConfirm:()=>{K.mutate({shipId:e.id},{onSuccess:er})},labelLines:void 0===_?void 0:(0,b.retireLabelLines)((0,b.retiredLabelsOf)(e,_))}),ee&&es&&(0,i.jsx)(z.RemoveMemberDialog,{squadronId:ee.id,member:es,othersOfRole:(0,k.otherMembersOfRole)(ee,es.shipId),openDeliveries:J.data?.openDeliveries??0,inFlightDeliveries:J.data?.inFlightDeliveries??0,isOpen:"remove"===S&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:Z.isPending,error:Z.error?.message,onConfirm:()=>{Z.mutate({squadronId:ee.id,shipId:es.shipId},{onSuccess:er})}}),(0,i.jsx)(A.RenameDialog,{shipName:e.name,activeNames:(W.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:"rename"===S,onOpenChange:e=>{e||er()},isPending:V.isPending,error:V.error?.message,onSubmit:i=>{V.mutate({shipId:e.id,name:i},{onSuccess:er})}}),(0,i.jsx)(P.StartingPromptDialog,{shipName:e.name,state:el,prompt:eo?.prompt,crewLines:eo?.crewLines,replacesUnclaimed:B,error:H.error?.message,isOpen:"prompt"===S,onOpenChange:e=>{e||(H.reset(),G.reset(),er())},onConfirm:()=>{G.reset(),H.mutate({shipId:e.id})}}),en.dialog,O&&(0,i.jsx)(M.ComposeMessage,{isOpen:!0,onOpenChange:q,toShipId:e.id})]})}])},82532,e=>{"use strict";var i=e.i(43476),t=e.i(22768),s=e.i(10818),n=e.i(25398),a=e.i(71645),r=e.i(49635),o=e.i(15905),l=e.i(91703),d=e.i(22212),c=e.i(94945),h=e.i(19321),u=e.i(56478),p=e.i(17981);function m({shipName:e,prompt:n,crewLines:r}){let[o,d]=(0,a.useState)(!1),c=()=>{d(!1)},h=()=>{d(!0)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,i.jsx)(s.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,i.jsxs)("span",{children:[(0,i.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,i.jsx)(l.CodeBlock,{label:`Starting prompt for ${e}`,code:n,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e}`,codeTestId:"starting-prompt-text",copyTestId:"starting-prompt-copy",onCopied:c,onCopyFailed:h}),(0,i.jsx)(u.CrewLines,{crewLines:r,subject:e,testIdPrefix:"starting-prompt-crew-line",onCopied:c,onCopyFailed:h}),(0,i.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:o?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.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:t,state:s,prompt:a,crewLines:l,replacesUnclaimed:u,error:x,isOpen:g,onOpenChange:f,onConfirm:b}=e,y="issuing"===s;return(0,i.jsx)(d.Dialog,{open:g,onOpenChange:e=>{y||f(e)},children:(0,i.jsxs)(d.DialogContent,{size:"md","data-testid":"starting-prompt-dialog",className:c.dialogSurface.phoneFullScreen,children:[(0,i.jsxs)(d.DialogHeader,{children:[(0,i.jsxs)(d.DialogTitle,{children:["Starting prompt for ",t]}),(0,i.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 ",t," stops working now."]})]}),"error"!==s&&u?(0,i.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,i.jsx)("time",{dateTime:u.issuedAt,children:(0,r.shortDateTime)(new Date(u.issuedAt))})," ","working."]}):null,y?(0,i.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,i.jsx)("span",{className:"sr-only",children:"Issuing a starting prompt..."}),(0,i.jsx)(h.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,i.jsx)(h.Skeleton,{className:"h-40 w-full rounded-lg"})]}):null,"shown"===s&&void 0!==a&&void 0!==l?(0,i.jsx)(m,{shipName:t,prompt:a,crewLines:l}):null,"error"===s?(0,i.jsx)(p.InlineError,{title:"Couldn’t issue a starting prompt",description:`${x??"The server did not answer."} No new secret was created; any earlier prompt still works.`}):null,(0,i.jsxs)(d.DialogFooter,{children:["issuing"===s||"shown"===s?(0,i.jsx)(d.DialogClose,{render:(0,i.jsx)(o.Button,{variant:"primary",disabled:y}),children:"Done"}):null,"error"===s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.DialogClose,{render:(0,i.jsx)(o.Button,{}),children:"Close"}),(0,i.jsx)(o.Button,{variant:"primary",icon:(0,i.jsx)(n.RotateCw,{}),onClick:b,children:"Try again"})]}):null]})]})})}])},84156,e=>{"use strict";e.s(["isUnclaimedPromptOut",0,function(e){return null!==e.startingPrompt&&!e.startingPrompt.isClaimed}])}]);