@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.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/squadrons/[procedure]/route.js.nft.json +1 -1
- package/.next/server/app/inbox/page.js.nft.json +1 -1
- package/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
- package/.next/server/app/labels/page.js.nft.json +1 -1
- package/.next/server/app/labels/page_client-reference-manifest.js +1 -1
- package/.next/server/app/needs-attention/page.js.nft.json +1 -1
- package/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
- package/.next/server/app/needs-crew/page.js.nft.json +1 -1
- package/.next/server/app/needs-crew/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
- package/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
- package/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sign-in/page.js.nft.json +1 -1
- package/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/connection/route.js.nft.json +1 -1
- package/.next/server/app/squadrons/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/trierarch-plugin/connection/route.js.nft.json +1 -1
- package/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -1
- package/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/trierarchs/page.js.nft.json +1 -1
- package/.next/server/app/trierarchs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/version/route.js.nft.json +1 -1
- package/.next/server/chunks/[root-of-the-server]__1f_8ohl._.js +1 -1
- package/.next/server/chunks/_0h366h9._.js +1 -1
- package/.next/server/chunks/packages_console_lib_connect-plugin_ts_197hf-1._.js +1 -1
- package/.next/server/chunks/ssr/_0dogq79._.js +1 -1
- package/.next/server/chunks/ssr/_0rvujxo._.js +1 -1
- package/.next/server/chunks/ssr/_0s2b6hb._.js +1 -1
- package/.next/server/chunks/ssr/_0sko-kt._.js +1 -1
- package/.next/server/chunks/ssr/{_1bqclkf._.js → _0sv2xqb._.js} +2 -2
- package/.next/server/chunks/ssr/_0wr_wnm._.js +3 -0
- package/.next/server/chunks/ssr/_0wtj0e-._.js +1 -1
- package/.next/server/chunks/ssr/{_0n4kirm._.js → _0xc3etp._.js} +1 -1
- package/.next/server/chunks/ssr/_0xvm1ng._.js +1 -1
- package/.next/server/chunks/ssr/_0ziovn_._.js +1 -1
- package/.next/server/chunks/ssr/_11cgy8n._.js +3 -0
- package/.next/server/chunks/ssr/_1442xyx._.js +1 -1
- package/.next/server/chunks/ssr/_14rijy-._.js +3 -0
- package/.next/server/chunks/ssr/{_08f4mzr._.js → _17u4fan._.js} +2 -2
- package/.next/server/chunks/ssr/_181kpys._.js +1 -1
- package/.next/server/chunks/ssr/_19e0e-9._.js +1 -1
- package/.next/server/chunks/ssr/_1_h504-._.js +3 -0
- package/.next/server/chunks/ssr/_1al_cqt._.js +3 -0
- package/.next/server/chunks/ssr/_1bmk6y_._.js +3 -0
- package/.next/server/chunks/ssr/{_1oqoc4e._.js → _1ejhqt9._.js} +2 -2
- package/.next/server/chunks/ssr/_1ezhc7m._.js +3 -0
- package/.next/server/chunks/ssr/_1kv8ma5._.js +1 -1
- package/.next/server/chunks/ssr/_1ommvbv._.js +1 -1
- package/.next/server/chunks/ssr/{_0mob-i2._.js → _1on9mjs._.js} +2 -2
- package/.next/server/chunks/ssr/_1oofkty._.js +1 -1
- package/.next/server/chunks/ssr/_1r6ce_7._.js +1 -1
- package/.next/server/chunks/ssr/{_1tsejml._.js → _208q2q8._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_0kq7z60._.js +1 -1
- package/.next/server/chunks/ssr/{packages_console_023iioa._.js → packages_console_0edevze._.js} +1 -1
- package/.next/server/chunks/ssr/packages_console_0oso305._.js +3 -0
- package/.next/server/chunks/ssr/{packages_console_0lv43wr._.js → packages_console_0y7h5dm._.js} +1 -1
- package/.next/server/chunks/ssr/packages_console_1stwpsk._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_app_page_tsx_16ln4px._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_page_tsx_0fudjay._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_squadrons_[squadronId]_page_tsx_1umxs1g._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_squadrons_page_tsx_1w6ym6z._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_components_1-5gwzg._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_components_organisms_form-squadron_tsx_1-qlsje._.js +3 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/0y1nvhxr03jkb.js +1 -0
- package/.next/static/chunks/1bvfk_-_enrxp.js +1 -0
- package/.next/static/chunks/1ct431l_sosvm.js +1 -0
- package/.next/static/chunks/1h0f7mfr5wxsj.js +1 -0
- package/.next/static/chunks/{39-cyg4qvxgbm.js → 21y50ct8e_pis.js} +1 -1
- package/.next/static/chunks/25amuen1qm2o7.js +1 -0
- package/.next/static/chunks/28j4p-34f5axr.js +1 -0
- package/.next/static/chunks/28vyyv4krlzx3.js +1 -0
- package/.next/static/chunks/2b-ho-tbr3sac.js +1 -0
- package/.next/static/chunks/{2_txjvbug4b86.js → 2r2aklt62ojhs.js} +1 -1
- package/.next/static/chunks/2spn0c35v7c1b.js +1 -0
- package/.next/static/chunks/2wnrtdpkhbd_j.js +1 -0
- package/.next/static/chunks/3061rp6nl670n.js +1 -0
- package/.next/static/chunks/3ba10-qig9f07.js +1 -0
- package/.next/static/chunks/3drxrwegn5v1p.css +3 -0
- package/.next/static/chunks/3jhje-hiar2ex.js +1 -0
- package/.next/static/chunks/3pu5ywtisj_fp.js +1 -0
- package/.next/static/chunks/{21jwgqx67q8ql.js → 3splvoavlf-cc.js} +1 -1
- package/.next/static/chunks/3vl7dc6v-u8w0.js +1 -0
- package/.next/static/chunks/{3b5uomyz3knol.js → 3z61krti-vbu2.js} +1 -1
- package/.next/static/chunks/{0e6zs-5ou_ra4.js → 414186x82sxkk.js} +1 -1
- package/package.json +3 -3
- package/.next/server/chunks/ssr/_01f7zv3._.js +0 -3
- package/.next/server/chunks/ssr/_0bmd2ey._.js +0 -3
- package/.next/server/chunks/ssr/_0i0_i88._.js +0 -3
- package/.next/server/chunks/ssr/_0t1jjxf._.js +0 -3
- package/.next/server/chunks/ssr/_20pku2-._.js +0 -3
- package/.next/server/chunks/ssr/packages_console_lib_crew-settings-form_ts_1_mrtph._.js +0 -3
- package/.next/static/chunks/00pjrzynt0in-.js +0 -1
- package/.next/static/chunks/0ez9e35zkfaz5.js +0 -1
- package/.next/static/chunks/0vlyibw4rexm7.js +0 -1
- package/.next/static/chunks/16o3i61aw3cj2.js +0 -1
- package/.next/static/chunks/17quvh6filhxh.js +0 -1
- package/.next/static/chunks/19x_u3cmb9s_j.js +0 -1
- package/.next/static/chunks/1mbia-jrmgpuu.js +0 -1
- package/.next/static/chunks/2c1daktq2hun-.css +0 -3
- package/.next/static/chunks/2k5tcu7bvrhet.js +0 -1
- package/.next/static/chunks/2mvb-x6v93lfc.js +0 -1
- package/.next/static/chunks/2ne-qdcv-7ck1.js +0 -1
- package/.next/static/chunks/30ux5-xn650iq.js +0 -1
- package/.next/static/chunks/3e1veij7vs6ao.js +0 -1
- package/.next/static/chunks/3eaxbdj-y982h.js +0 -1
- package/.next/static/chunks/3evbxrltn9tcu.js +0 -1
- /package/.next/static/{LHmQaS8aizP80vXh3K-ws → tBoOmC5nKBL5eqDmRV5Vd}/_buildManifest.js +0 -0
- /package/.next/static/{LHmQaS8aizP80vXh3K-ws → tBoOmC5nKBL5eqDmRV5Vd}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{LHmQaS8aizP80vXh3K-ws → tBoOmC5nKBL5eqDmRV5Vd}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79432,19002,11147,e=>{"use strict";var t=e.i(56420);let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let n=(0,t.default)(s);e.s(["Activity",0,n],79432);let a={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"]};a.node;let i=(0,t.default)(a);e.s(["CirclePause",0,i],19002);let r={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"]};r.node;let l=(0,t.default)(r);e.s(["OctagonPause",0,l],11147)},26091,e=>{"use strict";var t=e.i(56420);let s={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};s.node;let n=(0,t.default)(s);e.s(["FileText",0,n],26091)},90167,e=>{"use strict";var t=e.i(43476),s=e.i(18566),n=e.i(71645),a=e.i(41880),i=e.i(44824),r=e.i(45608),l=e.i(95475),o=e.i(2767),d=e.i(67927),c=e.i(85595),u=e.i(25398),m=e.i(90063),h=e.i(28459),x=e.i(69693),p=e.i(49635),f=e.i(46150),g=e.i(15905),b=e.i(14732),j=e.i(67874),v=e.i(17981),w=e.i(88393),y=e.i(39448),N=e.i(78865);function C({party:e}){let s=e.name===f.OPERATOR_NAME;return(0,t.jsx)(y.ShipName,{name:e.name,shipId:e.id,size:"meta",isOperator:s,isSuffixShown:!s})}function T({delivery:e}){let{sender:s,recipient:n}=e.message;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(C,{party:s}),(0,t.jsx)("span",{"aria-hidden":!0,children:"→"}),(0,t.jsx)("span",{className:"sr-only",children:"to"}),"ship"===n.kind?(0,t.jsx)(C,{party:n.ship}):(0,t.jsxs)("span",{children:["any ship of type ",n.type]})]})}function S({delivery:e}){let{payload:s,contentType:n}=e.message;return(0,t.jsx)("span",{className:(0,m.classNames)("block min-w-0 truncate text-foreground",(0,x.isJson)(n)?"font-mono text-id":"text-body max-sm:text-body-touch"),title:s,children:s.split("\n")[0]})}function k(e){return`Received ${String(e.attempts)} times, never acknowledged.`}function D(e){var t;return`the message from ${e.message.sender.name} to ${"ship"===(t=e.message.recipient).kind?t.ship.name:`any ship of type ${t.type}`}`}function L({delivery:e,onResend:s,onDismiss:n,pendingIds:a,layout:i}){let r=a.has(e.deliveryId),l="phone"===i;if(void 0===s&&void 0===n)return null;let o=void 0!==s&&(0,h.canResend)(e)?(0,t.jsx)(g.Button,{size:l?"touch":"sm",variant:l?"primary":"secondary",icon:(0,t.jsx)(u.RotateCw,{"aria-hidden":!0}),isLoading:r,"data-testid":"attention-resend","aria-label":`Resend ${D(e)}`,onClick:()=>{s(e.deliveryId)},className:l?"flex-1":void 0,children:"Resend"}):null,d=void 0===n?null:(0,t.jsx)(g.Button,{size:l?"touch":"sm",variant:l?"secondary":"ghost",disabled:r,"data-testid":"attention-dismiss","aria-label":`Dismiss ${D(e)}`,onClick:()=>{n(e.deliveryId)},className:l?"flex-1":void 0,children:"Dismiss"});return l?(0,t.jsxs)("div",{className:"flex gap-2 pt-1",children:[d,o]}):(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[o,d]})}function R({deliveries:e,onOpen:s,now:n,...a}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2 max-sm:hidden",children:[(0,t.jsxs)(b.Table,{"aria-label":"Undeliverable deliveries",children:[(0,t.jsx)(b.TableHeader,{children:(0,t.jsxs)(b.TableRow,{children:[(0,t.jsx)(b.TableHead,{children:"State"}),(0,t.jsx)(b.TableHead,{children:"Message"}),(0,t.jsx)(b.TableHead,{children:"Reason"}),(0,t.jsx)(b.TableHead,{children:"Since"}),(0,t.jsx)(b.TableHead,{children:"Actions"})]})}),(0,t.jsx)(b.TableBody,{children:e.map(e=>{let i=new Date(e.since);return(0,t.jsxs)(b.TableRow,{"data-testid":"attention-row","data-delivery-id":e.deliveryId,children:[(0,t.jsx)(b.TableCell,{className:"align-top",children:(0,t.jsx)(N.StatusBadge,{status:"undeliverable"})}),(0,t.jsx)(b.TableCell,{className:"max-w-96 align-top",children:(0,t.jsxs)("button",{type:"button","aria-label":`Open ${D(e)}`,onClick:()=>{s(e)},className:"flex w-full min-w-0 flex-col gap-0.5 rounded-xs text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,t.jsx)(S,{delivery:e}),(0,t.jsx)(T,{delivery:e})]})}),(0,t.jsx)(b.TableCell,{className:"max-w-48 align-top text-meta whitespace-normal text-muted-foreground",children:k(e)}),(0,t.jsx)(b.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5 tabular-nums",children:[(0,t.jsx)("time",{dateTime:e.since,title:(0,p.fullDateTime)(i),className:"text-body text-foreground",children:(0,p.shortDateTime)(i)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[(0,p.duration)(i,n)," ago"]})]})}),(0,t.jsx)(b.TableCell,{className:"align-top",children:(0,t.jsx)(L,{delivery:e,layout:"table",...a})})]},e.deliveryId)})})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Resend creates a new message with the same payload, linked to the original. Dismiss marks the delivery resolved. Abandoned deliveries are not listed here."})]})}function $({deliveries:e,onOpen:s,now:n,...a}){return(0,t.jsx)("ul",{"aria-label":"Undeliverable deliveries",className:"flex flex-col gap-3 sm:hidden",children:e.map(e=>{let i=new Date(e.since),r=n.getTime()-i.getTime()<864e5?(0,p.clockTime)(i):(0,p.shortDateTime)(i);return(0,t.jsxs)("li",{"data-testid":"attention-row","data-delivery-id":e.deliveryId,className:"flex flex-col gap-1.5 rounded-lg border border-border bg-card px-3.5 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(N.StatusBadge,{status:"undeliverable"}),(0,t.jsxs)("button",{type:"button","aria-label":`Open ${D(e)}`,onClick:()=>{s(e)},className:"inline-flex items-center gap-1 rounded-xs text-meta text-muted-foreground tabular-nums focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",children:[(0,p.duration)(i,n),(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0})]})]}),(0,t.jsx)(S,{delivery:e}),(0,t.jsx)(T,{delivery:e}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:[k(e)," Since"," ",(0,t.jsx)("time",{dateTime:e.since,title:(0,p.fullDateTime)(i),className:"tabular-nums",children:r}),"."]}),(0,t.jsx)(L,{delivery:e,layout:"phone",...a})]},e.deliveryId)})})}function I({deliveries:e,state:s,onRetry:n,...a}){return"loading"===s?(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"loading",children:[(0,t.jsx)(w.LoadingSkeleton,{variant:"table",rows:2,label:"Loading Needs attention",className:"max-sm:hidden"}),(0,t.jsx)(w.LoadingSkeleton,{variant:"list",rows:2,label:"Loading Needs attention",className:"sm:hidden"})]}):"error"===s?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"error","data-testid":"attention-error",children:(0,t.jsx)(v.InlineError,{variant:"page",title:"Couldn’t load Needs attention",description:"This page couldn’t reach the fleet server. Undeliverable deliveries are kept on the server, so nothing is lost.",onRetry:n})}):0===e.length?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"empty","data-testid":"attention-empty",children:(0,t.jsx)(j.EmptyState,{icon:(0,t.jsx)(c.CircleCheck,{className:"text-tone-ok-fg"}),title:"Nothing needs your attention",description:"Undeliverable deliveries show up here as soon as they happen."})}):(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"ready",className:"flex flex-col gap-3",children:[(0,t.jsx)(R,{deliveries:e,...a}),(0,t.jsx)($,{deliveries:e,...a})]})}var O=e.i(39874),A=e.i(22016),z=e.i(84294),M=e.i(19249),B=e.i(81830),H=e.i(1935);function P({members:e,ships:s,now:n,renderAction:a}){return(0,t.jsx)("ul",{"data-testid":"silent-members",className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.map(({squadronId:e,member:i})=>{let{lastSeenAt:r}=i.crew;return(0,t.jsxs)("li",{"data-testid":"silent-member",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.HealthIndicator,{health:"silent"}),(0,t.jsx)("span",{className:"font-medium",children:i.name})]}),(0,t.jsx)(H.SquadronTag,{squadronId:e,role:i.role,size:"sm"})]}),(0,t.jsxs)("span",{className:"flex flex-col text-meta",children:[(0,t.jsx)("span",{children:null===r?"never seen":`not seen for ${(0,p.duration)(new Date(r),n)}`}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,z.checkInText)(i.checkInMinutes)]})]}),(0,t.jsx)("span",{className:"grow",children:(0,t.jsx)(B.ReportLine,{report:s.get(i.shipId)?.report??null,now:n,variant:"row",testId:"silent-member-report"})}),a?.({squadronId:e,member:i}),(0,t.jsxs)(A.default,{href:`/squadrons/${e}`,className:"inline-flex items-center gap-1 text-meta font-medium hover:underline",children:["Open",(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})]},i.shipId)})})}var q=e.i(87792),E=e.i(90262),F=e.i(86413),_=e.i(18423),W=e.i(96676),J=e.i(88721),U=e.i(78485),G=e.i(5387),V=e.i(53573),K=e.i(48695),Q=e.i(3979);function X(e){return e instanceof Error?e.message:"Try again in a moment."}e.s(["default",0,function(){let e=(0,s.useRouter)(),d=(0,W.useNow)(),c=(0,h.useNeedsAttention)(),u=(0,h.useResendDelivery)(),m=(0,h.useDismissDelivery)(),x=(0,_.useLiveFleet)(),p=(0,J.useAccountMenu)(d),f=(0,K.useSquadrons)(),g=(0,z.silentMembers)(f.data??[]),b=(0,V.useShips)(g.map(({member:e})=>e.shipId)),j=new Map(((0,G.useFleetSnapshot)().data??[]).map(e=>[e.id,e])),v=(0,h.useAttentionCount)(),w=(0,F.useOpenInboxCount)(),y=(0,E.useAccess)(),N=(0,Q.usePluginNav)(),[C,T]=(0,n.useState)(!1),[S,k]=(0,n.useState)(!1);(0,U.useSignInWhenSessionEnds)([c.error,x.error]);let[D,L]=(0,n.useState)(new Set),R=(e,t)=>{L(t=>new Set([...t,e])),t().finally(()=>{L(t=>new Set([...t].filter(t=>t!==e)))})},$=(0,t.jsx)(I,{deliveries:c.data??[],state:c.isError?"error":c.data?"ready":"loading",onRetry:()=>{c.refetch()},onResend:y.canManage?e=>{let t=(0,h.deliveryWithId)(c.data,e);R(e,async()=>{try{await u.mutateAsync({deliveryId:e}),t&&(0,a.showToast)({...(0,h.resentToast)(t),tone:"success"})}catch(e){(0,a.showToast)({title:"Couldn’t resend the message",description:X(e),tone:"error"})}})}:void 0,onDismiss:y.canManage?e=>{R(e,async()=>{try{await m.mutateAsync({deliveryId:e}),(0,a.showToast)({...h.DISMISSED_TOAST,tone:"success"})}catch(e){(0,a.showToast)({title:"Couldn’t dismiss the delivery",description:X(e),tone:"error"})}})}:void 0,onOpen:t=>{e.push((0,h.messagePathOf)(t))},pendingIds:D,now:d});return(0,t.jsxs)(q.ListLayout,{title:"Needs attention",description:"Deliveries no ship acknowledged after five tries, oldest first. Resend or dismiss each one.",live:x.live,nav:{active:"attention",inboxCount:w,attentionCount:v,...N},onCompose:y.canSend?()=>{T(!0)}:void 0,onSearch:()=>{k(!0)},account:p,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.ConsoleNotices,{}),(0,t.jsx)(l.ConsoleGuide,{})]}),children:[g.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("section",{"aria-labelledby":"attention-undeliverable",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"attention-undeliverable",className:"text-body font-semibold",children:["Undeliverable deliveries (",c.data?.length??0,")"]}),c.data?.length===0?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"None."}):$]}),(0,t.jsxs)("section",{"aria-labelledby":"attention-silent",className:"flex flex-col gap-2 max-sm:order-first",children:[(0,t.jsxs)("h2",{id:"attention-silent",className:"text-body font-semibold",children:["Silent members (",g.length,")"]}),(0,t.jsx)(P,{members:g,ships:j,now:d,renderAction:y.canManage?({squadronId:e,member:s})=>(0,t.jsx)(O.GetNewCrewLine,{squadronId:e,member:s,ship:b.get(s.shipId),isPrimary:!0,testId:"silent-member-new-crew-line"}):void 0}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"A member is silent after 3 missed check-ins; only you can start its new session. Late members and blocked reports stay on their squadron page."})]})]}):$,(0,t.jsx)(i.ComposeMessage,{isOpen:C,onOpenChange:T}),(0,t.jsx)(r.ConsoleCommands,{isOpen:S,onOpenChange:k,onCompose:()=>{T(!0)}})]})}],90167)},14732,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Table",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,s.classNames)("w-full caption-bottom text-body",e),...n})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,s.classNames)("[&_tr:last-child]:border-0",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,s.classNames)("px-4 align-middle",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,s.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,s.classNames)("bg-muted [&_tr]:border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,s.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",e),...n})}])},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let n={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function a({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",n[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:i,className:r}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",r),children:[(0,t.jsx)(a,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",n[e].text),children:n[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"HealthSummary",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(a,{health:e}),(0,t.jsxs)("span",{children:[s," ",n[e].label.toLowerCase()]})]},e))})}])},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),n=e.i(19002),a=e.i(11147),i=e.i(90063),r=e.i(49635),l=e.i(93361);let o={working:s.Activity,blocked:a.OctagonPause,idle:n.CirclePause},d={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:s,variant:n,isTimeInTitle:a=!1,testId:c}){let u="full"===n,m=(0,i.classNames)("flex min-w-0 items-center gap-1.5",u?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,i.classNames)(m,"text-muted-foreground"),children:"No report yet"});let h=o[e.state],x=d[l.REPORT_TONES[e.state]],p=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:a?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportText)(e),className:m,children:[(0,t.jsx)(h,{"aria-hidden":!0,className:(0,i.classNames)("size-(--size-icon-sm) shrink-0",x)}),(0,t.jsx)("span",{className:(0,i.classNames)("shrink-0 font-medium",x),children:l.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),a?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,r.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:u?`\xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportAge)(p,s)})]})}])},39448,e=>{"use strict";var t=e.i(43476),s=e.i(25913),n=e.i(22016),a=e.i(90063);let i=(0,s.cva)("min-w-0 truncate font-sans font-medium",{variants:{size:{body:"text-body text-foreground",meta:"text-meta text-muted-foreground",title:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch"}},defaultVariants:{size:"body"}});e.s(["ShipName",0,function({name:e,shipId:s,size:r,isSuffixShown:l=!1,isOperator:o=!1,href:d,className:c}){let u=d?(0,t.jsx)(n.default,{href:d,className:(0,a.classNames)(i({size:r}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:e,children:e}):(0,t.jsx)("span",{className:i({size:r}),title:e,children:e});return(0,t.jsxs)("span",{"data-slot":"ship-name",className:(0,a.classNames)("inline-flex min-w-0 items-baseline gap-1.5",c),children:[u,o?(0,t.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,l&&!o?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"· "}),s.slice(-4)]}):null]})}])},1935,e=>{"use strict";var t=e.i(43476),s=e.i(60011),n=e.i(22016),a=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:i,size:r="md",className:l}){return(0,t.jsxs)(n.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,a.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"===r?"h-5.5 text-meta":"h-6 text-body",l),children:[(0,t.jsx)(s.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==i&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",i]})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(46150);let a={one:"delivery",many:"deliveries"};function i(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,n.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function r(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${i(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,n.counted)(e,a)} will be abandoned`},"inFlightLine",0,i,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,r,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,n.counted)(e,a)}`}],26808);var l=e.i(48695),o=e.i(15905),d=e.i(10818),c=e.i(25398),u=e.i(22212),m=e.i(94945),h=e.i(19321),x=e.i(66616),p=e.i(61966),f=e.i(60592);function g({crewLines:e,subject:n,testIdPrefix:a,onCopied:i,onCopyFailed:r}){let[l,o]=(0,s.useState)(e[0]?.harness),d=e.find(e=>e.harness===l)??e[0];if(!d)return null;let c=(0,x.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(f.Tabs,{value:d.harness,onValueChange:t=>{let s=e.find(e=>e.harness===t);s&&o(s.harness)},children:(0,t.jsx)(f.TabsList,{"aria-label":`Crew ${n} from`,children:e.map(e=>(0,t.jsx)(f.TabsTrigger,{value:e.harness,"data-testid":`${a}-${e.harness}-tab`,children:(0,x.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${a}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(p.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${n}`,isLabeled:!0,onCopied:i,onCopyFailed:r,"data-testid":`${a}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,g],82880);var b=e.i(17981),j=e.i(26091);function v({note:e,model:s,template:n,testId:a}){return null===e&&null===s?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(j.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===n?"":` \xb7 ${n}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":a,children:e}),null!==s&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:s})]})]})]})}function w({memberName:e,template:s,launchNote:n,model:a,crewLines:i}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v,{note:n,model:a,template:s,testId:"crew-line-launch-note"}),(0,t.jsx)(g,{crewLines:i,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function y({memberName:e,state:s,template:n,launchNote:a=null,model:i=null,crewLines:r,error:l,isOpen:d,onOpenChange:x,onConfirm:p}){let f="issuing"===s;return(0,t.jsx)(u.Dialog,{open:d,onOpenChange:e=>{f||x(e)},children:(0,t.jsxs)(u.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:m.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsxs)(u.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(u.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),f&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(h.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(h.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===s&&void 0!==r&&(0,t.jsx)(w,{memberName:e,template:n,launchNote:a,model:i,crewLines:r}),"error"===s&&(0,t.jsx)(b.InlineError,{title:"Couldn’t issue a crew line",description:`${l??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(u.DialogFooter,{children:[("shown"===s||f)&&(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary","data-testid":"crew-line-done",disabled:f}),children:"Done"}),"error"===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:p,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,v],3067),e.s(["CrewLineDialog",0,y],42211);var N=e.i(24010);function C({memberName:e,replacedText:s,isOpen:n,onOpenChange:a,onConfirm:i}){return(0,t.jsx)(N.AlertDialog,{open:n,onOpenChange:a,children:(0,t.jsxs)(N.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:m.dialogSurface.phoneSheet,children:[(0,t.jsxs)(N.AlertDialogHeader,{children:[(0,t.jsxs)(N.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(N.AlertDialogDescription,{children:s??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(N.AlertDialogFooter,{children:[(0,t.jsx)(N.AlertDialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:i,children:"Get new crew line"})]})]})})}function T(e){let n=(0,l.useNewCrewLine)(),[a,i]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(void 0),m=()=>{e&&n.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},h=n.data?"shown":n.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(n.reset(),u(r(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C,{memberName:e.member.name,replacedText:c,isOpen:o,onOpenChange:d,onConfirm:()=>{d(!1),i(!0),m()}}),(0,t.jsx)(y,{memberName:e.member.name,state:h,template:e.template,launchNote:n.data?.launchNote,model:n.data?.model,crewLines:n.data?.crewLines,error:n.error?.message,isOpen:a,onOpenChange:e=>{i(e),e||n.reset()},onConfirm:m})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:s,...n}){let a=T(n);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!a.isReady,"data-testid":s,onClick:a.start,children:"Get new crew line"}),a.dialog]})},"useNewCrewLineFlow",0,T],39874)},87792,e=>{"use strict";var t=e.i(43476),s=e.i(19759),n=e.i(15905),a=e.i(77880),i=e.i(36779),r=e.i(15034),l=e.i(85538);e.s(["ListLayout",0,function({title:e,description:o,titleMeta:d,primaryAction:c,toolbar:u,live:m,nav:h,onCompose:x,onSearch:p,account:f,banner:g,children:b}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(i.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,needsCrewCount:h.needsCrewCount,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,hasSettings:h.hasSettings,...f}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(a.Header,{breadcrumb:e,live:m,onCompose:x,onSearch:p}),g,(0,t.jsx)(l.TopBar,{title:e,live:m,account:f,onSearch:p,actions:x?(0,t.jsx)(n.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:x,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),d]}),o?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:o}):null]}),c?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:c}):null]}),u,b]})]}),(0,t.jsx)(r.TabBar,{active:"overview"===h.active||"needs-crew"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])},69693,e=>{"use strict";var t=e.i(46150);function s(e){let t=e.split(";")[0]?.trim().toLowerCase()??"";return"application/json"===t||t.endsWith("+json")}e.s(["formattedPayload",0,function(e,t){if(s(t))try{return JSON.stringify(JSON.parse(e),null,2)}catch{return}},"isJson",0,s,"payloadLabel",0,function(e,n){let a=s(n)?"JSON":n.split(";")[0]?.trim()??n,i=new TextEncoder().encode(e).byteLength;return`${a} \xb7 ${(0,t.counted)(i,{one:"byte",many:"bytes"})}`}])},93361,e=>{"use strict";e.i(31627);var t=e.i(94661),s=e.i(49635);let n={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,n,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,t){let n=Math.max(0,t.getTime()-e.getTime());return n<6e4?`${String(Math.floor(n/1e3))} s`:n<36e5?`${String(Math.floor(n/6e4))} min`:n<864e5?`${String(Math.floor(n/36e5))} h`:(0,s.relativeTime)(e,t)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String((0,t.reportDetailsBytes)(e))} bytes`},"reportText",0,function(e){let t=n[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,t){let n=(0,s.relativeTime)(e,t);return`reported ${"Just now"===n?"just now":n}`}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79432,19002,11147,e=>{"use strict";var t=e.i(56420);let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let n=(0,t.default)(s);e.s(["Activity",0,n],79432);let a={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"]};a.node;let i=(0,t.default)(a);e.s(["CirclePause",0,i],19002);let r={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"]};r.node;let l=(0,t.default)(r);e.s(["OctagonPause",0,l],11147)},26091,e=>{"use strict";var t=e.i(56420);let s={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};s.node;let n=(0,t.default)(s);e.s(["FileText",0,n],26091)},90167,e=>{"use strict";var t=e.i(43476),s=e.i(18566),n=e.i(71645),a=e.i(41880),i=e.i(44824),r=e.i(45608),l=e.i(95475),o=e.i(2767),d=e.i(67927),c=e.i(85595),u=e.i(25398),m=e.i(90063),h=e.i(28459),x=e.i(69693),p=e.i(49635),f=e.i(46150),g=e.i(15905),b=e.i(14732),j=e.i(67874),v=e.i(17981),w=e.i(88393),y=e.i(39448),N=e.i(78865);function C({party:e}){let s=e.name===f.OPERATOR_NAME;return(0,t.jsx)(y.ShipName,{name:e.name,shipId:e.id,size:"meta",isOperator:s,isSuffixShown:!s})}function T({delivery:e}){let{sender:s,recipient:n}=e.message;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(C,{party:s}),(0,t.jsx)("span",{"aria-hidden":!0,children:"→"}),(0,t.jsx)("span",{className:"sr-only",children:"to"}),"ship"===n.kind?(0,t.jsx)(C,{party:n.ship}):(0,t.jsxs)("span",{children:["any ship of type ",n.type]})]})}function S({delivery:e}){let{payload:s,contentType:n}=e.message;return(0,t.jsx)("span",{className:(0,m.classNames)("block min-w-0 truncate text-foreground",(0,x.isJson)(n)?"font-mono text-id":"text-body max-sm:text-body-touch"),title:s,children:s.split("\n")[0]})}function k(e){return`Received ${String(e.attempts)} times, never acknowledged.`}function D(e){var t;return`the message from ${e.message.sender.name} to ${"ship"===(t=e.message.recipient).kind?t.ship.name:`any ship of type ${t.type}`}`}function L({delivery:e,onResend:s,onDismiss:n,pendingIds:a,layout:i}){let r=a.has(e.deliveryId),l="phone"===i;if(void 0===s&&void 0===n)return null;let o=void 0!==s&&(0,h.canResend)(e)?(0,t.jsx)(g.Button,{size:l?"touch":"sm",variant:l?"primary":"secondary",icon:(0,t.jsx)(u.RotateCw,{"aria-hidden":!0}),isLoading:r,"data-testid":"attention-resend","aria-label":`Resend ${D(e)}`,onClick:()=>{s(e.deliveryId)},className:l?"flex-1":void 0,children:"Resend"}):null,d=void 0===n?null:(0,t.jsx)(g.Button,{size:l?"touch":"sm",variant:l?"secondary":"ghost",disabled:r,"data-testid":"attention-dismiss","aria-label":`Dismiss ${D(e)}`,onClick:()=>{n(e.deliveryId)},className:l?"flex-1":void 0,children:"Dismiss"});return l?(0,t.jsxs)("div",{className:"flex gap-2 pt-1",children:[d,o]}):(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[o,d]})}function R({deliveries:e,onOpen:s,now:n,...a}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2 max-sm:hidden",children:[(0,t.jsxs)(b.Table,{"aria-label":"Undeliverable deliveries",children:[(0,t.jsx)(b.TableHeader,{children:(0,t.jsxs)(b.TableRow,{children:[(0,t.jsx)(b.TableHead,{children:"State"}),(0,t.jsx)(b.TableHead,{children:"Message"}),(0,t.jsx)(b.TableHead,{children:"Reason"}),(0,t.jsx)(b.TableHead,{children:"Since"}),(0,t.jsx)(b.TableHead,{children:"Actions"})]})}),(0,t.jsx)(b.TableBody,{children:e.map(e=>{let i=new Date(e.since);return(0,t.jsxs)(b.TableRow,{"data-testid":"attention-row","data-delivery-id":e.deliveryId,children:[(0,t.jsx)(b.TableCell,{className:"align-top",children:(0,t.jsx)(N.StatusBadge,{status:"undeliverable"})}),(0,t.jsx)(b.TableCell,{className:"max-w-96 align-top",children:(0,t.jsxs)("button",{type:"button","aria-label":`Open ${D(e)}`,onClick:()=>{s(e)},className:"flex w-full min-w-0 flex-col gap-0.5 rounded-xs text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,t.jsx)(S,{delivery:e}),(0,t.jsx)(T,{delivery:e})]})}),(0,t.jsx)(b.TableCell,{className:"max-w-48 align-top text-meta whitespace-normal text-muted-foreground",children:k(e)}),(0,t.jsx)(b.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5 tabular-nums",children:[(0,t.jsx)("time",{dateTime:e.since,title:(0,p.fullDateTime)(i),className:"text-body text-foreground",children:(0,p.shortDateTime)(i)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[(0,p.duration)(i,n)," ago"]})]})}),(0,t.jsx)(b.TableCell,{className:"align-top",children:(0,t.jsx)(L,{delivery:e,layout:"table",...a})})]},e.deliveryId)})})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Resend creates a new message with the same payload, linked to the original. Dismiss marks the delivery resolved. Abandoned deliveries are not listed here."})]})}function $({deliveries:e,onOpen:s,now:n,...a}){return(0,t.jsx)("ul",{"aria-label":"Undeliverable deliveries",className:"flex flex-col gap-3 sm:hidden",children:e.map(e=>{let i=new Date(e.since),r=n.getTime()-i.getTime()<864e5?(0,p.clockTime)(i):(0,p.shortDateTime)(i);return(0,t.jsxs)("li",{"data-testid":"attention-row","data-delivery-id":e.deliveryId,className:"flex flex-col gap-1.5 rounded-lg border border-border bg-card px-3.5 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(N.StatusBadge,{status:"undeliverable"}),(0,t.jsxs)("button",{type:"button","aria-label":`Open ${D(e)}`,onClick:()=>{s(e)},className:"inline-flex items-center gap-1 rounded-xs text-meta text-muted-foreground tabular-nums focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",children:[(0,p.duration)(i,n),(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0})]})]}),(0,t.jsx)(S,{delivery:e}),(0,t.jsx)(T,{delivery:e}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:[k(e)," Since"," ",(0,t.jsx)("time",{dateTime:e.since,title:(0,p.fullDateTime)(i),className:"tabular-nums",children:r}),"."]}),(0,t.jsx)(L,{delivery:e,layout:"phone",...a})]},e.deliveryId)})})}function I({deliveries:e,state:s,onRetry:n,...a}){return"loading"===s?(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"loading",children:[(0,t.jsx)(w.LoadingSkeleton,{variant:"table",rows:2,label:"Loading Needs attention",className:"max-sm:hidden"}),(0,t.jsx)(w.LoadingSkeleton,{variant:"list",rows:2,label:"Loading Needs attention",className:"sm:hidden"})]}):"error"===s?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"error","data-testid":"attention-error",children:(0,t.jsx)(v.InlineError,{variant:"page",title:"Couldn’t load Needs attention",description:"This page couldn’t reach the fleet server. Undeliverable deliveries are kept on the server, so nothing is lost.",onRetry:n})}):0===e.length?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"empty","data-testid":"attention-empty",children:(0,t.jsx)(j.EmptyState,{icon:(0,t.jsx)(c.CircleCheck,{className:"text-tone-ok-fg"}),title:"Nothing needs your attention",description:"Undeliverable deliveries show up here as soon as they happen."})}):(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"ready",className:"flex flex-col gap-3",children:[(0,t.jsx)(R,{deliveries:e,...a}),(0,t.jsx)($,{deliveries:e,...a})]})}var O=e.i(39874),A=e.i(22016),z=e.i(84294),M=e.i(19249),B=e.i(81830),H=e.i(1935);function P({members:e,ships:s,now:n,renderAction:a}){return(0,t.jsx)("ul",{"data-testid":"silent-members",className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.map(({squadronId:e,member:i})=>{let{lastSeenAt:r}=i.crew;return(0,t.jsxs)("li",{"data-testid":"silent-member",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.HealthIndicator,{health:"silent"}),(0,t.jsx)("span",{className:"font-medium",children:i.name})]}),(0,t.jsx)(H.SquadronTag,{squadronId:e,role:i.role,size:"sm"})]}),(0,t.jsxs)("span",{className:"flex flex-col text-meta",children:[(0,t.jsx)("span",{children:null===r?"never seen":`not seen for ${(0,p.duration)(new Date(r),n)}`}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,z.checkInText)(i.checkInMinutes)]})]}),(0,t.jsx)("span",{className:"grow",children:(0,t.jsx)(B.ReportLine,{report:s.get(i.shipId)?.report??null,now:n,variant:"row",testId:"silent-member-report"})}),a?.({squadronId:e,member:i}),(0,t.jsxs)(A.default,{href:`/squadrons/${e}`,className:"inline-flex items-center gap-1 text-meta font-medium hover:underline",children:["Open",(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})]},i.shipId)})})}var q=e.i(87792),E=e.i(90262),F=e.i(86413),_=e.i(18423),W=e.i(96676),J=e.i(88721),U=e.i(78485),G=e.i(5387),V=e.i(53573),K=e.i(48695),Q=e.i(3979);function X(e){return e instanceof Error?e.message:"Try again in a moment."}e.s(["default",0,function(){let e=(0,s.useRouter)(),d=(0,W.useNow)(),c=(0,h.useNeedsAttention)(),u=(0,h.useResendDelivery)(),m=(0,h.useDismissDelivery)(),x=(0,_.useLiveFleet)(),p=(0,J.useAccountMenu)(d),f=(0,K.useSquadrons)(),g=(0,z.silentMembers)(f.data??[]),b=(0,V.useShips)(g.map(({member:e})=>e.shipId)),j=new Map(((0,G.useFleetSnapshot)().data??[]).map(e=>[e.id,e])),v=(0,h.useAttentionCount)(),w=(0,F.useOpenInboxCount)(),y=(0,E.useAccess)(),N=(0,Q.usePluginNav)(),[C,T]=(0,n.useState)(!1),[S,k]=(0,n.useState)(!1);(0,U.useSignInWhenSessionEnds)([c.error,x.error]);let[D,L]=(0,n.useState)(new Set),R=(e,t)=>{L(t=>new Set([...t,e])),t().finally(()=>{L(t=>new Set([...t].filter(t=>t!==e)))})},$=(0,t.jsx)(I,{deliveries:c.data??[],state:c.isError?"error":c.data?"ready":"loading",onRetry:()=>{c.refetch()},onResend:y.canManage?e=>{let t=(0,h.deliveryWithId)(c.data,e);R(e,async()=>{try{await u.mutateAsync({deliveryId:e}),t&&(0,a.showToast)({...(0,h.resentToast)(t),tone:"success"})}catch(e){(0,a.showToast)({title:"Couldn’t resend the message",description:X(e),tone:"error"})}})}:void 0,onDismiss:y.canManage?e=>{R(e,async()=>{try{await m.mutateAsync({deliveryId:e}),(0,a.showToast)({...h.DISMISSED_TOAST,tone:"success"})}catch(e){(0,a.showToast)({title:"Couldn’t dismiss the delivery",description:X(e),tone:"error"})}})}:void 0,onOpen:t=>{e.push((0,h.messagePathOf)(t))},pendingIds:D,now:d});return(0,t.jsxs)(q.ListLayout,{title:"Needs attention",description:"Deliveries no ship acknowledged after five tries, oldest first. Resend or dismiss each one.",live:x.live,nav:{active:"attention",inboxCount:w,attentionCount:v,...N},onCompose:y.canSend?()=>{T(!0)}:void 0,onSearch:()=>{k(!0)},account:p,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.ConsoleNotices,{}),(0,t.jsx)(l.ConsoleGuide,{})]}),children:[g.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("section",{"aria-labelledby":"attention-undeliverable",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"attention-undeliverable",className:"text-body font-semibold",children:["Undeliverable deliveries (",c.data?.length??0,")"]}),c.data?.length===0?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"None."}):$]}),(0,t.jsxs)("section",{"aria-labelledby":"attention-silent",className:"flex flex-col gap-2 max-sm:order-first",children:[(0,t.jsxs)("h2",{id:"attention-silent",className:"text-body font-semibold",children:["Silent members (",g.length,")"]}),(0,t.jsx)(P,{members:g,ships:j,now:d,renderAction:y.canManage?({squadronId:e,member:s})=>(0,t.jsx)(O.GetNewCrewLine,{squadronId:e,member:s,ship:b.get(s.shipId),isPrimary:!0,testId:"silent-member-new-crew-line"}):void 0}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"A member is silent after 3 missed check-ins; only you can start its new session. Late members and blocked reports stay on their squadron page."})]})]}):$,(0,t.jsx)(i.ComposeMessage,{isOpen:C,onOpenChange:T}),(0,t.jsx)(r.ConsoleCommands,{isOpen:S,onOpenChange:k,onCompose:()=>{T(!0)}})]})}],90167)},14732,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Table",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,s.classNames)("w-full caption-bottom text-body",e),...n})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,s.classNames)("[&_tr:last-child]:border-0",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,s.classNames)("px-4 align-middle",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,s.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,s.classNames)("bg-muted [&_tr]:border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,s.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",e),...n})}])},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let n={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"standing-down":{label:"Standing down",dot:"bg-tone-active-fg",text:"text-tone-active-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function a({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",n[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:i,className:r}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",r),children:[(0,t.jsx)(a,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",n[e].text),children:n[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"HealthSummary",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(a,{health:e}),(0,t.jsxs)("span",{children:[s," ",n[e].label.toLowerCase()]})]},e))})}])},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),n=e.i(19002),a=e.i(11147),i=e.i(90063),r=e.i(49635),l=e.i(93361);let o={working:s.Activity,blocked:a.OctagonPause,idle:n.CirclePause},d={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:s,variant:n,isTimeInTitle:a=!1,testId:c}){let u="full"===n,m=(0,i.classNames)("flex min-w-0 items-center gap-1.5",u?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,i.classNames)(m,"text-muted-foreground"),children:"No report yet"});let h=o[e.state],x=d[l.REPORT_TONES[e.state]],p=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:a?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportText)(e),className:m,children:[(0,t.jsx)(h,{"aria-hidden":!0,className:(0,i.classNames)("size-(--size-icon-sm) shrink-0",x)}),(0,t.jsx)("span",{className:(0,i.classNames)("shrink-0 font-medium",x),children:l.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),a?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,r.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:u?`\xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportAge)(p,s)})]})}])},39448,e=>{"use strict";var t=e.i(43476),s=e.i(25913),n=e.i(22016),a=e.i(90063);let i=(0,s.cva)("min-w-0 truncate font-sans font-medium",{variants:{size:{body:"text-body text-foreground",meta:"text-meta text-muted-foreground",title:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch"}},defaultVariants:{size:"body"}});e.s(["ShipName",0,function({name:e,shipId:s,size:r,isSuffixShown:l=!1,isOperator:o=!1,href:d,className:c}){let u=d?(0,t.jsx)(n.default,{href:d,className:(0,a.classNames)(i({size:r}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:e,children:e}):(0,t.jsx)("span",{className:i({size:r}),title:e,children:e});return(0,t.jsxs)("span",{"data-slot":"ship-name",className:(0,a.classNames)("inline-flex min-w-0 items-baseline gap-1.5",c),children:[u,o?(0,t.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,l&&!o?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"· "}),s.slice(-4)]}):null]})}])},1935,e=>{"use strict";var t=e.i(43476),s=e.i(60011),n=e.i(22016),a=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:i,size:r="md",className:l}){return(0,t.jsxs)(n.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,a.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"===r?"h-5.5 text-meta":"h-6 text-body",l),children:[(0,t.jsx)(s.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==i&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",i]})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(46150);let a={one:"delivery",many:"deliveries"};function i(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,n.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function r(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${i(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,n.counted)(e,a)} will be abandoned`},"inFlightLine",0,i,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,r,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,n.counted)(e,a)}`}],26808);var l=e.i(48695),o=e.i(15905),d=e.i(10818),c=e.i(25398),u=e.i(22212),m=e.i(94945),h=e.i(19321),x=e.i(66616),p=e.i(61966),f=e.i(60592);function g({crewLines:e,subject:n,testIdPrefix:a,onCopied:i,onCopyFailed:r}){let[l,o]=(0,s.useState)(e[0]?.harness),d=e.find(e=>e.harness===l)??e[0];if(!d)return null;let c=(0,x.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(f.Tabs,{value:d.harness,onValueChange:t=>{let s=e.find(e=>e.harness===t);s&&o(s.harness)},children:(0,t.jsx)(f.TabsList,{"aria-label":`Crew ${n} from`,children:e.map(e=>(0,t.jsx)(f.TabsTrigger,{value:e.harness,"data-testid":`${a}-${e.harness}-tab`,children:(0,x.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${a}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(p.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${n}`,isLabeled:!0,onCopied:i,onCopyFailed:r,"data-testid":`${a}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,g],82880);var b=e.i(17981),j=e.i(26091);function v({note:e,model:s,template:n,testId:a}){return null===e&&null===s?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(j.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===n?"":` \xb7 ${n}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":a,children:e}),null!==s&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:s})]})]})]})}function w({memberName:e,template:s,launchNote:n,model:a,crewLines:i}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v,{note:n,model:a,template:s,testId:"crew-line-launch-note"}),(0,t.jsx)(g,{crewLines:i,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function y({memberName:e,state:s,template:n,launchNote:a=null,model:i=null,crewLines:r,error:l,isOpen:d,onOpenChange:x,onConfirm:p}){let f="issuing"===s;return(0,t.jsx)(u.Dialog,{open:d,onOpenChange:e=>{f||x(e)},children:(0,t.jsxs)(u.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:m.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsxs)(u.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(u.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),f&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(h.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(h.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===s&&void 0!==r&&(0,t.jsx)(w,{memberName:e,template:n,launchNote:a,model:i,crewLines:r}),"error"===s&&(0,t.jsx)(b.InlineError,{title:"Couldn’t issue a crew line",description:`${l??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(u.DialogFooter,{children:[("shown"===s||f)&&(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary","data-testid":"crew-line-done",disabled:f}),children:"Done"}),"error"===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:p,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,v],3067),e.s(["CrewLineDialog",0,y],42211);var N=e.i(24010);function C({memberName:e,replacedText:s,isOpen:n,onOpenChange:a,onConfirm:i}){return(0,t.jsx)(N.AlertDialog,{open:n,onOpenChange:a,children:(0,t.jsxs)(N.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:m.dialogSurface.phoneSheet,children:[(0,t.jsxs)(N.AlertDialogHeader,{children:[(0,t.jsxs)(N.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(N.AlertDialogDescription,{children:s??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(N.AlertDialogFooter,{children:[(0,t.jsx)(N.AlertDialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:i,children:"Get new crew line"})]})]})})}function T(e){let n=(0,l.useNewCrewLine)(),[a,i]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(void 0),m=()=>{e&&n.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},h=n.data?"shown":n.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(n.reset(),u(r(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C,{memberName:e.member.name,replacedText:c,isOpen:o,onOpenChange:d,onConfirm:()=>{d(!1),i(!0),m()}}),(0,t.jsx)(y,{memberName:e.member.name,state:h,template:e.template,launchNote:n.data?.launchNote,model:n.data?.model,crewLines:n.data?.crewLines,error:n.error?.message,isOpen:a,onOpenChange:e=>{i(e),e||n.reset()},onConfirm:m})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:s,...n}){let a=T(n);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!a.isReady,"data-testid":s,onClick:a.start,children:"Get new crew line"}),a.dialog]})},"useNewCrewLineFlow",0,T],39874)},87792,e=>{"use strict";var t=e.i(43476),s=e.i(19759),n=e.i(15905),a=e.i(77880),i=e.i(36779),r=e.i(15034),l=e.i(85538);e.s(["ListLayout",0,function({title:e,description:o,titleMeta:d,primaryAction:c,toolbar:u,live:m,nav:h,onCompose:x,onSearch:p,account:f,banner:g,children:b}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(i.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,needsCrewCount:h.needsCrewCount,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,hasSettings:h.hasSettings,...f}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(a.Header,{breadcrumb:e,live:m,onCompose:x,onSearch:p}),g,(0,t.jsx)(l.TopBar,{title:e,live:m,account:f,onSearch:p,actions:x?(0,t.jsx)(n.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:x,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),d]}),o?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:o}):null]}),c?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:c}):null]}),u,b]})]}),(0,t.jsx)(r.TabBar,{active:"overview"===h.active||"needs-crew"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])},69693,e=>{"use strict";var t=e.i(46150);function s(e){let t=e.split(";")[0]?.trim().toLowerCase()??"";return"application/json"===t||t.endsWith("+json")}e.s(["formattedPayload",0,function(e,t){if(s(t))try{return JSON.stringify(JSON.parse(e),null,2)}catch{return}},"isJson",0,s,"payloadLabel",0,function(e,n){let a=s(n)?"JSON":n.split(";")[0]?.trim()??n,i=new TextEncoder().encode(e).byteLength;return`${a} \xb7 ${(0,t.counted)(i,{one:"byte",many:"bytes"})}`}])},93361,e=>{"use strict";e.i(31627);var t=e.i(94661),s=e.i(49635);let n={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,n,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,t){let n=Math.max(0,t.getTime()-e.getTime());return n<6e4?`${String(Math.floor(n/1e3))} s`:n<36e5?`${String(Math.floor(n/6e4))} min`:n<864e5?`${String(Math.floor(n/36e5))} h`:(0,s.relativeTime)(e,t)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String((0,t.reportDetailsBytes)(e))} bytes`},"reportText",0,function(e){let t=n[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,t){let n=(0,s.relativeTime)(e,t);return`reported ${"Just now"===n?"just now":n}`}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59493,e=>{"use strict";var t=e.i(43476),s=e.i(77071),a=e.i(18566),r=e.i(71645),n=e.i(15905),i=e.i(60592),o=e.i(67927),l=e.i(77913),d=e.i(22016),c=e.i(49635),m=e.i(18310),u=e.i(84294),h=e.i(14732),p=e.i(67874),x=e.i(17981),f=e.i(88393),b=e.i(51588);function g({blueprints:e,squadrons:s,state:a,error:r,onRetry:n}){if("loading"===a)return(0,t.jsx)(f.LoadingSkeleton,{variant:"table",label:"Loading blueprints"});if("error"===a)return(0,t.jsx)(x.InlineError,{variant:"page",title:"Couldn’t read blueprints from git",description:"The squadron manager couldn’t fetch the squadrons repository. Running squadrons are not affected.",detail:r,onRetry:n});if(0===e.length)return(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(l.DraftingCompass,{"aria-hidden":!0}),title:"No blueprints in git",description:"The squadron manager reads blueprints from .aeolus/squadrons/blueprints. Commit one there; it shows up here on its own."});let i=e.flatMap(e=>{let t=e.versions[0];return t?[{blueprint:e,latest:t,formed:(0,u.squadronsText)((0,u.squadronsFromBlueprint)(s,e))}]:[]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.Table,{"data-testid":"blueprint-table",className:"max-sm:hidden",children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Blueprint"}),(0,t.jsx)(h.TableHead,{children:"Source"}),(0,t.jsx)(h.TableHead,{children:"Latest"}),(0,t.jsx)(h.TableHead,{children:"Roles"}),(0,t.jsx)(h.TableHead,{children:"Squadrons"}),(0,t.jsx)(h.TableHead,{children:"Committed"})]})}),(0,t.jsx)(h.TableBody,{children:i.map(({blueprint:e,latest:s,formed:a})=>(0,t.jsxs)(h.TableRow,{"data-testid":"blueprint-row",children:[(0,t.jsx)(h.TableCell,{className:"font-medium",children:(0,t.jsx)(d.default,{href:(0,u.blueprintPath)(e),className:"hover:underline",children:e.name})}),(0,t.jsx)(h.TableCell,{"data-testid":"blueprint-row-source",children:(0,t.jsx)(b.RepositoryName,{name:s.repository,href:(0,m.versionFileUrl)(s)})}),(0,t.jsxs)(h.TableCell,{children:["v",s.version]}),(0,t.jsx)(h.TableCell,{children:(0,u.rolesText)(s)}),(0,t.jsx)(h.TableCell,{className:""===a?"text-muted-foreground":void 0,children:""===a?"None":a}),(0,t.jsxs)(h.TableCell,{className:"text-muted-foreground",children:[(0,c.dayMonth)(new Date(s.committedAt))," · ",(0,t.jsx)("span",{className:"font-mono",children:s.commit.slice(0,7)})]})]},e.key))})]}),(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border sm:hidden",children:i.map(({blueprint:e,latest:s})=>(0,t.jsx)("li",{children:(0,t.jsxs)(d.default,{href:(0,u.blueprintPath)(e),className:"flex items-center gap-2 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"text-meta font-normal text-muted-foreground",children:["v",s.version]})]}),(0,t.jsx)("span",{className:"truncate text-meta text-muted-foreground",children:(0,u.rolesText)(s)}),(0,t.jsx)("span",{className:"flex min-w-0 text-meta text-muted-foreground",children:(0,t.jsx)(b.RepositoryName,{name:s.repository})})]}),(0,t.jsx)(o.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"})]})},e.key))})]})}var j=e.i(56420);let v={name:"layout-template",size:24,node:[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]};v.node;let w=(0,j.default)(v);function y({templates:e,blueprints:s,state:a,error:r,onRetry:n}){if("loading"===a)return(0,t.jsx)(f.LoadingSkeleton,{variant:"table",label:"Loading templates"});if("error"===a)return(0,t.jsx)(x.InlineError,{variant:"page",title:"Couldn’t read templates from git",description:"The squadron manager couldn’t fetch the squadrons repository. Running squadrons are not affected.",detail:r,onRetry:n});if(0===e.length)return(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(w,{"aria-hidden":!0}),title:"No templates in git",description:"The squadron manager reads templates from .aeolus/squadrons/templates. Commit one there; it shows up here on its own."});let i=e.flatMap(e=>{let t=e.versions[0];return t?[{template:e,latest:t,users:function(e,t){let s=new Map;for(let e of t){let t=`${e.repository}#${e.name}`,a=s.get(t);(!a||a.version<e.version)&&s.set(t,e)}return(0,u.blueprintsUsing)([...s.values()],e).map(e=>e.name).sort().join(", ")}(e,s)}]:[]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.Table,{"data-testid":"template-table",className:"max-sm:hidden",children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Template"}),(0,t.jsx)(h.TableHead,{children:"Source"}),(0,t.jsx)(h.TableHead,{children:"Latest"}),(0,t.jsx)(h.TableHead,{children:"Check-in"}),(0,t.jsx)(h.TableHead,{children:"Used by blueprints"}),(0,t.jsx)(h.TableHead,{children:"Committed"})]})}),(0,t.jsx)(h.TableBody,{children:i.map(({template:e,latest:s,users:a})=>(0,t.jsxs)(h.TableRow,{"data-testid":"template-row",children:[(0,t.jsx)(h.TableCell,{className:"font-medium",children:(0,t.jsx)(d.default,{href:(0,u.templatePath)(e),className:"hover:underline",children:e.name})}),(0,t.jsx)(h.TableCell,{"data-testid":"template-row-source",children:(0,t.jsx)(b.RepositoryName,{name:s.repository,href:(0,m.versionFileUrl)(s)})}),(0,t.jsxs)(h.TableCell,{children:["v",s.version]}),(0,t.jsx)(h.TableCell,{children:(0,u.checkInText)(s.checkInMinutes)}),(0,t.jsx)(h.TableCell,{className:""===a?"text-muted-foreground":void 0,children:""===a?"None":a}),(0,t.jsx)(h.TableCell,{className:"text-muted-foreground",children:(0,c.dayMonth)(new Date(s.committedAt))})]},e.key))})]}),(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border sm:hidden",children:i.map(({template:e,latest:s})=>(0,t.jsx)("li",{children:(0,t.jsxs)(d.default,{href:(0,u.templatePath)(e),className:"flex items-center gap-2 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"text-meta font-normal text-muted-foreground",children:["v",s.version]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:(0,u.checkInText)(s.checkInMinutes)}),(0,t.jsx)("span",{className:"flex min-w-0 text-meta text-muted-foreground",children:(0,t.jsx)(b.RepositoryName,{name:s.repository})})]}),(0,t.jsx)(o.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"})]})},e.key))})]})}var k=e.i(44824),C=e.i(45608),N=e.i(95475),S=e.i(2767),T=e.i(71164),q=e.i(60011);let R={name:"wifi-off",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};R.node;let L=(0,j.default)(R);var F=e.i(48695);let B="state",O="blueprint",H="disbanded";var I=e.i(12470),$=e.i(91727),E=e.i(46033),D=e.i(75867),P=e.i(19249),M=e.i(78865);function z({squadrons:e,state:a,hasBlueprints:r,error:i,onRetry:o,onForm:l,view:d,onViewChange:c}){let m;if("loading"===a)return(0,t.jsx)(f.LoadingSkeleton,{variant:"table",label:"Loading squadrons"});if("error"===a)return(0,t.jsx)(x.InlineError,{title:"Couldn’t load squadrons",description:"The console couldn’t reach the squadron manager. Your ships keep running; nothing is lost.",detail:i,onRetry:o});if(0===e.length)return r?(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(q.Shapes,{"aria-hidden":!0}),title:"No squadrons yet",description:"A squadron is a team of ships formed from a blueprint: a planner, implementers, a tester. You start each member's session by hand with its crew line.",action:l&&(0,t.jsx)(n.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:l,"data-testid":"squadrons-form-first",children:"Form your first squadron"})}):(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(L,{"aria-hidden":!0}),title:"No blueprints found",description:"The squadron manager reads blueprints and templates from git. Add a blueprint there; it shows up here on its own."});let u=(m=d.query.trim().toLowerCase(),e.filter(e=>(d.isDisbandedShown||"disbanded"!==e.state)&&("all"===d.state||e.state===d.state)&&("all"===d.blueprint||e.blueprint.name===d.blueprint)&&(""===m||e.id.toLowerCase().includes(m)||e.blueprint.name.toLowerCase().includes(m))));return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(V,{squadrons:e,view:d,onViewChange:c,shownCount:u.length}),0===u.length?(0,t.jsx)(p.EmptyState,{variant:"no-results",title:"No squadrons match",action:(0,t.jsx)(n.Button,{onClick:()=>{c({query:"",state:"all",blueprint:"all",isDisbandedShown:d.isDisbandedShown})},children:"Clear filters"})}):(0,t.jsx)(U,{squadrons:u})]})}let A={all:"All",forming:"Forming",sailing:"Sailing","standing-down":"Standing down"};function V({squadrons:e,view:s,onViewChange:a,shownCount:r}){let n={all:"All",...Object.fromEntries([...new Set(e.map(e=>e.blueprint.name))].toSorted((e,t)=>e.localeCompare(t)).map(e=>[e,e]))};return(0,t.jsxs)("div",{"data-slot":"squadrons-toolbar",className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("div",{className:"w-60 max-sm:min-w-0 max-sm:flex-1",children:(0,t.jsx)(I.Input,{type:"search","aria-label":"Search squadrons",placeholder:"Search squadrons","data-testid":"squadrons-search",value:s.query,onChange:e=>{a({...s,query:e.target.value})}})}),(0,t.jsxs)(E.Select,{items:A,value:s.state,onValueChange:e=>{null!==e&&Object.hasOwn(A,e)&&a({...s,state:e})},children:[(0,t.jsx)(E.SelectTrigger,{size:"sm","aria-label":"State","data-testid":"squadrons-filter-state",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"State"}),(0,t.jsx)(E.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(E.SelectContent,{children:Object.entries(A).map(([e,s])=>(0,t.jsx)(E.SelectItem,{value:e,children:s},e))})]}),(0,t.jsxs)(E.Select,{items:n,value:s.blueprint,onValueChange:e=>{null!==e&&a({...s,blueprint:e})},children:[(0,t.jsx)(E.SelectTrigger,{size:"sm","aria-label":"Blueprint","data-testid":"squadrons-filter-blueprint",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Blueprint"}),(0,t.jsx)(E.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(E.SelectContent,{children:Object.entries(n).map(([e,s])=>(0,t.jsx)(E.SelectItem,{value:e,className:"all"===e?void 0:"font-mono",children:s},e))})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 sm:ml-auto",children:[(0,t.jsx)(D.Switch,{id:"squadrons-show-disbanded","data-testid":"squadrons-show-disbanded",checked:s.isDisbandedShown,onCheckedChange:e=>{a({...s,isDisbandedShown:e})}}),(0,t.jsxs)($.Label,{htmlFor:"squadrons-show-disbanded",className:"text-meta font-normal text-muted-foreground",children:["Show disbanded (",e.filter(e=>"disbanded"===e.state).length,")"]}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[r," of ",e.length," squadrons"]})]})]})}function U({squadrons:e}){return(0,t.jsxs)(h.Table,{"data-testid":"squadrons-table",children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Squadron"}),(0,t.jsx)(h.TableHead,{children:"Blueprint"}),(0,t.jsx)(h.TableHead,{children:"State"}),(0,t.jsx)(h.TableHead,{children:"Members"}),(0,t.jsx)(h.TableHead,{children:"Health"}),(0,t.jsx)(h.TableHead,{children:"Formed"})]})}),(0,t.jsx)(h.TableBody,{children:e.map(e=>(0,t.jsxs)(h.TableRow,{"data-testid":"squadrons-row",children:[(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(d.default,{href:`/squadrons/${e.id}`,className:"font-medium hover:underline",children:e.id})}),(0,t.jsx)(h.TableCell,{children:(0,t.jsxs)(d.default,{href:(0,u.blueprintPath)(e.blueprint),className:"hover:underline",children:[(0,t.jsx)("span",{className:"font-mono",children:e.blueprint.name})," ",(0,t.jsxs)("span",{className:"text-muted-foreground",children:["v",e.blueprint.version]})]})}),(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(M.StatusBadge,{status:e.state})}),(0,t.jsx)(h.TableCell,{children:function(e){if("forming"===e.state){let{onStation:t,total:s}=(0,u.stationCount)(e);return`${String(t)} of ${String(s)} on station`}return`${String(e.members.length)} ${1===e.members.length?"member":"members"}`}(e)}),(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(P.HealthSummary,{counts:(0,u.healthCounts)(e.members)})}),(0,t.jsx)(h.TableCell,{className:"text-muted-foreground",children:(0,c.shortDateTime)(new Date(e.formedAt))})]},e.id))})]})}var _=e.i(87792),W=e.i(33939),Y=e.i(90262),G=e.i(88721),J=e.i(86413),K=e.i(18423),Q=e.i(28459),X=e.i(96676),Z=e.i(78485),ee=e.i(86165),et=e.i(3979);let es=["squadrons","blueprints","templates"];function ea(e){return es.find(t=>t===e)??"squadrons"}e.s(["default",0,function({searchParams:e}){var o,l;let d,c=(0,a.useRouter)(),m=(0,r.use)(e),h={query:(o=new URLSearchParams(Object.entries(m).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[]))).get("q")??"",state:(l=o.get(B),void 0===(d=F.SQUADRON_STATES.find(e=>e===l))||"disbanded"===d?"all":d),blueprint:o.get(O)??"all",isDisbandedShown:"1"===o.get(H)},p="new"===m.form,x=ea(m.tab),f=e=>{let t,s=(t=new URLSearchParams,""!==e.query&&t.set("q",e.query),"all"!==e.state&&t.set(B,e.state),"all"!==e.blueprint&&t.set(O,e.blueprint),e.isDisbandedShown&&t.set(H,"1"),t).toString();c.replace(""===s?"/squadrons":`/squadrons?${s}`,{scroll:!1})},b=(0,X.useNow)(),j=(0,G.useAccountMenu)(b),v=(0,J.useOpenInboxCount)(),w=(0,Q.useNeedsAttention)(),q=(0,Q.useAttentionCount)(),R=(0,K.useLiveFleet)(),L=(0,F.useSquadrons)(),I=(0,ee.useSquadronsConnection)(),$=(0,F.useCatalogue)(),[E,D]=(0,r.useState)(!1),P=(0,Y.useAccess)(),M=(0,et.usePluginNav)(),[A,V]=(0,r.useState)(!1),[U,es]=(0,r.useState)(!1);(0,Z.useSignInWhenSessionEnds)([w.error,R.error]);let er=(0,u.blueprintChoices)($.data??{blueprints:[]}),en=()=>{D(!0)};return(0,t.jsxs)(_.ListLayout,{title:"Squadrons",description:"Teams of ships formed from blueprints in git.",live:R.live,nav:{active:"squadrons",inboxCount:v,attentionCount:q,...M},primaryAction:P.canManage&&er.length>0?(0,t.jsx)(n.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:en,"data-testid":"squadrons-form",children:"Form squadron"}):void 0,onCompose:P.canSend?()=>{V(!0)}:void 0,onSearch:()=>{es(!0)},account:j,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.ConsoleNotices,{}),(0,t.jsx)(N.ConsoleGuide,{})]}),children:["not-connected"===I?(0,t.jsx)(W.SquadronsNotConnected,{}):(0,t.jsxs)(i.Tabs,{value:x,onValueChange:e=>{let t=ea(e);c.replace("squadrons"===t?"/squadrons":`/squadrons?tab=${t}`,{scroll:!1})},children:[(0,t.jsxs)(i.TabsList,{variant:"line","aria-label":"Squadrons sections",children:[(0,t.jsx)(i.TabsTrigger,{variant:"line",value:"squadrons","data-testid":"squadrons-tab-squadrons",children:"Squadrons"}),(0,t.jsx)(i.TabsTrigger,{variant:"line",value:"blueprints","data-testid":"squadrons-tab-blueprints",children:"Blueprints"}),(0,t.jsx)(i.TabsTrigger,{variant:"line",value:"templates","data-testid":"squadrons-tab-templates",children:"Templates"})]}),(0,t.jsx)(i.TabsContent,{value:"squadrons",className:"pt-4",children:(0,t.jsx)(z,{squadrons:L.data??[],state:L.isError?"error":L.data?"ready":"loading",hasBlueprints:er.length>0,error:L.error?.message,onRetry:()=>{L.refetch()},onForm:P.canManage?en:void 0,view:h,onViewChange:f})}),(0,t.jsx)(i.TabsContent,{value:"blueprints",className:"pt-4",children:(0,t.jsx)(g,{blueprints:er,squadrons:L.data??[],state:$.isError?"error":$.data?"ready":"loading",error:$.error?.message,onRetry:()=>{$.refetch()}})}),(0,t.jsx)(i.TabsContent,{value:"templates",className:"pt-4",children:(0,t.jsx)(y,{templates:(0,u.templateChoices)($.data??{templates:[]}),blueprints:$.data?.blueprints??[],state:$.isError?"error":$.data?"ready":"loading",error:$.error?.message,onRetry:()=>{$.refetch()}})})]}),er.length>0&&(0,t.jsx)(T.FormSquadron,{blueprints:er,templates:$.data?.templates??[],isOpen:E||p,onOpenChange:e=>{D(e),!e&&p&&f(h)},onFormed:e=>{D(!1),c.push(`/squadrons/${e}`)}}),(0,t.jsx)(k.ComposeMessage,{isOpen:A,onOpenChange:V}),(0,t.jsx)(C.ConsoleCommands,{isOpen:U,onOpenChange:es,onCompose:()=>{V(!0)}})]})}],59493)},75867,e=>{"use strict";var t=e.i(43476);e.s([],24305),e.i(24305);var s=e.i(71645),a=e.i(51437),r=e.i(28918),n=e.i(46376),i=e.i(2077),o=e.i(56789),l=e.i(52245),d=e.i(88015),c=e.i(40886),m=e.i(33332);let u=s.createContext(void 0),h={...e.i(75812).fieldValidityMapping,checked:e=>e?{"data-checked":""}:{"data-unchecked":""}};var p=e.i(64350),x=e.i(69690),f=e.i(81104),b=e.i(84708),g=e.i(47778),j=e.i(38489),v=e.i(75606),w=e.i(56434),y=e.i(6039);let k=s.forwardRef(function(e,m){let{checked:k,className:C,defaultChecked:N,"aria-labelledby":S,form:T,id:q,inputRef:R,name:L,nativeButton:F=!1,onCheckedChange:B,readOnly:O=!1,required:H=!1,disabled:I=!1,render:$,uncheckedValue:E,value:D,style:P,...M}=e,{clearErrors:z}=(0,b.useFormContext)(),{state:A,setTouched:V,setDirty:U,validityData:_,setFilled:W,setFocused:Y,validationMode:G,disabled:J,name:K,validation:Q}=(0,x.useFieldRootContext)(),{labelId:X}=(0,g.useLabelableContext)(),Z=J||I,ee=K??L,et=s.useRef(null),es=(0,r.useMergedRefs)(et,R,Q.inputRef),ea=s.useRef(null),er=(0,d.useBaseUiId)(),en=(0,j.useLabelableId)({id:q}),ei=F?void 0:en,[eo,el]=(0,a.useControlled)({controlled:k,default:!!N,name:"Switch",state:"checked"});(0,f.useRegisterFieldControl)(ea,er,eo,void 0,!Z,L),(0,n.useIsoLayoutEffect)(()=>{W(eo)},[eo,W]),(0,y.useValueChanged)(eo,()=>{z(ee),U(eo!==_.initialValue),Q.change(eo)});let{getButtonProps:ed,buttonRef:ec}=(0,c.useButton)({disabled:Z,native:F}),em=function(e,t,a,r=!0,i){let[o,l]=s.useState(),c=(0,d.useBaseUiId)(i?`${i}-label`:void 0),m=e??t??o;return(0,n.useIsoLayoutEffect)(()=>{let s=e||t||!r?void 0:function(e,t){let s=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let s=e.id;if(s){let t=e.nextElementSibling;if(t&&t.htmlFor===s)return t}let a=e.labels;return a&&a[0]}(e);if(s)return!s.id&&t&&(s.id=t),s.id||void 0}(a.current,c);o!==s&&l(s)}),m}(S,X,et,!F,ei),eu={...Q.getValidationProps(Z),checked:eo,disabled:Z,form:T,id:ei,name:ee,required:H,style:ee?i.visuallyHiddenInput:i.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:es,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(O)return void e.preventDefault();let t=e.currentTarget.checked,s=(0,v.createChangeEventDetails)(w.REASONS.none,e.nativeEvent);B?.(t,s),s.isCanceled||el(t)},onClick(e){e.stopPropagation()},onFocus(){ea.current?.focus()},...void 0!==D?{value:D}:o.EMPTY_OBJECT},eh=s.useMemo(()=>({...A,checked:eo,disabled:Z,readOnly:O,required:H}),[A,eo,Z,O,H]),ep=(0,l.useRenderElement)("span",e,{state:eh,ref:[m,ea,ec],props:[{id:F?en:er,role:"switch","aria-checked":eo,"aria-readonly":O||void 0,"aria-required":H||void 0,"aria-labelledby":em,onFocus(){Z||Y(!0)},onBlur(){let e=et.current;e&&!Z&&(V(!0),Y(!1),"onBlur"===G&&Q.commit(e.checked))},onClick(e){if(O||Z)return;e.preventDefault();let t=et.current;t&&(0,p.dispatchClickWithModifiers)(t,e)}},M,ed,e=>Q.getValidationProps(Z,e)],stateAttributesMapping:h});return(0,t.jsxs)(u.Provider,{value:eh,children:[ep,!eo&&ee&&void 0!==E&&(0,t.jsx)("input",{type:"hidden",form:T,name:ee,value:E,disabled:Z}),(0,t.jsx)("input",{...eu,suppressHydrationWarning:!0})]})}),C=s.forwardRef(function(e,t){let{render:a,className:r,style:n,...i}=e,o=function(){let e=s.useContext(u);if(void 0===e)throw Error((0,m.default)(63));return e}();return(0,l.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:h,props:i})});e.s(["Root",0,k,"Thumb",0,C],50994);var N=e.i(50994),N=N,S=e.i(90063);e.s(["Switch",0,function({className:e,...s}){return(0,t.jsx)(N.Root,{"data-slot":"switch",className:(0,S.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",e),...s,children:(0,t.jsx)(N.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"})})}],75867)},14732,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Table",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,s.classNames)("w-full caption-bottom text-body",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,s.classNames)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,s.classNames)("px-4 align-middle",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,s.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,s.classNames)("bg-muted [&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,s.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",e),...a})}])},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let a={"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"},"standing-down":{label:"Standing down",dot:"bg-tone-active-fg",text:"text-tone-active-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function r({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",a[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:n,className:i}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",i),children:[(0,t.jsx)(r,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",a[e].text),children:a[e].label}),void 0!==n&&(0,t.jsx)("span",{className:"text-muted-foreground",children:n})]})},"HealthSummary",0,function({counts:e,className:n}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",n),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(r,{health:e}),(0,t.jsxs)("span",{children:[s," ",a[e].label.toLowerCase()]})]},e))})}])},33939,e=>{"use strict";var t=e.i(43476),s=e.i(94831),a=e.i(22016),r=e.i(15905),n=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,t.jsx)(n.EmptyState,{icon:(0,t.jsx)(s.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,t.jsx)(r.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},71164,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(10649),r=e.i(5387),n=e.i(80581);function i(e,t){return t?.labels.find(t=>t.key===e.key)?.values.find(t=>t.value===e.value)?.id}function o(e,t){return e.map(e=>{let s=e.crew.machineLabels??[];return{slot:e.slot,role:e.role,template:`${e.template.name}@${String(e.template.version)}`,harness:e.crew.harness??"",workspace:function(e){if(void 0!==e)return"worktree"===e.kind?{kind:"worktree",repository:e.repository}:{kind:"folder",name:e.name}}(e.crew.workspace),firstPrompt:e.crew.firstPrompt??"",options:{...e.crew.options},machineLabels:s.flatMap(e=>i(e,t)??[]),unknownLabels:s.filter(e=>void 0===i(e,t)).map(e=>`${e.key}=${e.value}`),parameters:e.parameters.map(e=>({name:e.name,description:e.description,value:e.value??""}))}})}function l(e){return[...void 0===e.workspace?["workspace"]:[],...e.parameters.filter(e=>""===e.value.trim()).map(e=>e.name)]}function d(e,t){return[...void 0===t?[]:(0,n.pickedChips)(e.machineLabels,t).map(e=>({key:e.key,value:e.value})),...e.unknownLabels.map(e=>{let[t="",s=""]=e.split("=");return{key:t,value:s}})]}function c(e){return"worktree"===e.kind?`worktree:${e.repository}`:`folder:${e.name}`}function m(e){let[t,...s]=e.split(":"),a=s.join(":");return"worktree"===t?{kind:"worktree",repository:a}:"folder"===t?{kind:"folder",name:a}:void 0}var u=e.i(78608),h=e.i(48695),p=e.i(265),x=e.i(10818),f=e.i(25398),b=e.i(84294),g=e.i(15905),j=e.i(22212),v=e.i(94945),w=e.i(91727),y=e.i(46033),k=e.i(14732),C=e.i(17981),N=e.i(16327),S=e.i(67927),T=e.i(85595),q=e.i(52886),R=e.i(90063),L=e.i(66616),F=e.i(12470),B=e.i(43988),O=e.i(4032);function H({id:e,label:s,isRequired:a,hint:r,children:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(w.Label,{htmlFor:e,children:[s,(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:a?" required":" optional"})]}),n,void 0===r?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:r})]})}function I({id:e,items:s,value:a,onPick:r,isDisabled:n,testId:i}){return(0,t.jsxs)(y.Select,{items:s,value:a,disabled:n,onValueChange:e=>{r("string"==typeof e?e:"")},children:[(0,t.jsx)(y.SelectTrigger,{id:e,"data-testid":i,children:(0,t.jsx)(y.SelectValue,{})}),(0,t.jsx)(y.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s},e))})]})}function $(e){return"string"==typeof e?e:JSON.stringify(e)}function E({member:e,offers:a,workspaces:r,machineLabels:n,isOpen:i,onOpenChange:o,isDisabled:d,error:u,onChange:h}){let p={workspace:(0,s.useId)(),harness:(0,s.useId)(),options:(0,s.useId)(),firstPrompt:(0,s.useId)(),parameters:(0,s.useId)()},x=l(e),f=a.find(t=>t.harness===e.harness),b={"":"The trierarch’s default",...Object.fromEntries(a.map(e=>[e.harness,(0,L.harnessWord)(e.harness)])),...""===e.harness||f?{}:{[e.harness]:(0,L.harnessWord)(e.harness)}},g=new Set((f?.options??[]).map(e=>e.name)),j=Object.entries(e.options).filter(([e])=>!g.has(e)),v=i?N.ChevronDown:S.ChevronRight;return(0,t.jsxs)("section",{"aria-label":e.slot,"data-testid":"member-crew-section",className:(0,R.classNames)("flex flex-col rounded-lg border bg-card",void 0===u?"border-border":"border-tone-attention-border"),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":i,"data-testid":"member-crew-toggle",className:"flex min-h-11 items-center gap-2.5 px-3.5 py-2 text-left focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",onClick:()=>{o(!i)},children:[(0,t.jsx)(v,{"aria-hidden":!0,className:"text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-body font-medium",children:e.slot}),(0,t.jsx)("span",{className:"font-mono text-meta text-muted-foreground",children:e.template}),(0,t.jsx)("span",{className:"flex-1"}),0===x.length?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-tone-ok-fg","data-testid":"member-crew-ready",children:[(0,t.jsx)(T.CircleCheck,{"aria-hidden":!0}),"Ready"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-tone-waiting-fg","data-testid":"member-crew-missing",children:[(0,t.jsx)(q.CircleDashed,{"aria-hidden":!0}),"Needs ",x.join(", ")]})]}),void 0===u?null:(0,t.jsx)("div",{className:"px-3.5 pb-3",children:(0,t.jsx)(C.InlineError,{variant:"field",title:u})}),i?(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-border px-3.5 py-3.5",children:[(0,t.jsx)(H,{id:p.workspace,label:"Workspace",isRequired:!0,hint:"A repository gets a new git worktree for this ship; a folder is used as it is.",children:(0,t.jsx)(I,{id:p.workspace,items:r,value:void 0===e.workspace?"":c(e.workspace),isDisabled:d,testId:"member-crew-workspace",onPick:t=>{h({...e,workspace:m(t)})}})}),(0,t.jsx)(H,{id:p.harness,label:"Harness",children:(0,t.jsx)(I,{id:p.harness,items:b,value:e.harness,isDisabled:d,testId:"member-crew-harness",onPick:t=>{h({...e,harness:t})}})}),(f?.options??[]).map((s,a)=>(0,t.jsx)(H,{id:`${p.options}-${String(a)}`,label:s.name,children:(0,t.jsx)(I,{id:`${p.options}-${String(a)}`,items:{"":"The trierarch’s default",...Object.fromEntries(s.values.map(e=>[e,e===s.defaultValue?`${e} (default)`:e])),..."string"==typeof e.options[s.name]&&!s.values.includes($(e.options[s.name]))?{[$(e.options[s.name])]:$(e.options[s.name])}:{}},value:void 0===e.options[s.name]?"":$(e.options[s.name]),isDisabled:d,testId:"member-crew-option",onPick:t=>{let a=Object.fromEntries(Object.entries(e.options).filter(([e])=>e!==s.name));h({...e,options:""===t?a:{...a,[s.name]:t}})}})},s.name)),0===j.length?null:(0,t.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"member-crew-file-options",children:[(0,t.jsx)("span",{className:"text-body font-medium",children:"From its files"}),(0,t.jsx)("ul",{className:"flex flex-wrap gap-1.5",children:j.map(([e,s])=>(0,t.jsxs)("li",{className:"rounded-sm bg-secondary px-1.5 py-0.5 font-mono text-id",children:[e,"=",$(s)]},e))})]}),void 0===n?null:(0,t.jsx)(O.MachineLabelsField,{shipName:e.slot,picked:n.chipsOf(e.machineLabels),groups:n.groups,match:n.matchOf(e.machineLabels),isDisabled:d,unknown:e.unknownLabels,onAdd:t=>{h({...e,machineLabels:[...e.machineLabels,t]})},onRemove:t=>{h({...e,machineLabels:e.machineLabels.filter(e=>e!==t)})},onRemoveUnknown:t=>{h({...e,unknownLabels:e.unknownLabels.filter(e=>e!==t)})}}),(0,t.jsx)(H,{id:p.firstPrompt,label:"First prompt",hint:"The session starts with it, on its first start only.",children:(0,t.jsx)(B.Textarea,{id:p.firstPrompt,value:e.firstPrompt,disabled:d,"data-testid":"member-crew-first-prompt",rows:2,onChange:t=>{h({...e,firstPrompt:t.target.value})}})}),e.parameters.map((s,a)=>(0,t.jsx)(H,{id:`${p.parameters}-${String(a)}`,label:s.name,isRequired:!0,hint:s.description,children:(0,t.jsx)(F.Input,{id:`${p.parameters}-${String(a)}`,value:s.value,disabled:d,"aria-invalid":""===s.value.trim()||void 0,"data-testid":"member-crew-parameter",onChange:t=>{h({...e,parameters:e.parameters.map(e=>e.name===s.name?{...e,value:t.target.value}:e)})}})},s.name))]}):null]})}function D({drafts:e,crew:a,isPending:r,error:n,onBack:i,onSubmit:u}){let h=(0,s.useId)(),[p,x]=(0,s.useState)(()=>o(e,a.context)),[f,b]=(0,s.useState)(()=>new Set(o(e,a.context).filter(e=>l(e).length>0).map(e=>e.slot))),v=function(e,t){let s=new Map;for(let t of e){for(let e of t.repositories)s.set(c({kind:"worktree",repository:e}),`${e} \xb7 new worktree`);for(let e of t.folders)s.set(c({kind:"folder",name:e}),`${e} \xb7 folder, as it is`)}for(let{workspace:e}of t)void 0===e||s.has(c(e))||s.set(c(e),"worktree"===e.kind?`${e.repository} \xb7 new worktree, no machine offers it yet`:`${e.name} \xb7 folder, no machine offers it yet`);return Object.fromEntries(s)}(a.offers,p),{ready:k,total:N}={ready:p.filter(e=>0===l(e).length).length,total:p.length},S=k===N,T=void 0===n?void 0:function(e,t){let{members:s,context:a}=t,[,r]=/machine label (\S+?),/.exec(e)??[];if(void 0!==r)return s.find(e=>d(e,a).some(e=>`${e.key}=${e.value}`===r))?.slot}(n,{members:p,context:a.context}),q=p.some(e=>void 0===e.workspace);return(0,t.jsxs)(t.Fragment,{children:[0===a.offers.length?(0,t.jsx)("p",{role:"status",className:"rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:"No machine answers with what it offers yet, so there is no workspace to pick. Join a machine under Trierarchs, or wait for its trierarch to report."}):null,q&&Object.keys(v).length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:h,children:"Workspace for every member without one"}),(0,t.jsxs)(y.Select,{items:{"":"Pick a workspace",...v},value:"",disabled:r,onValueChange:e=>{let t="string"==typeof e?m(e):void 0;void 0!==t&&x(e=>e.map(e=>void 0===e.workspace?{...e,workspace:t}:e))},children:[(0,t.jsx)(y.SelectTrigger,{id:h,"data-testid":"form-squadron-workspace-all",children:(0,t.jsx)(y.SelectValue,{})}),(0,t.jsx)(y.SelectContent,{children:Object.entries(v).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s},e))})]})]}):null,(0,t.jsx)("div",{className:"-mx-1 flex max-h-[55vh] flex-col gap-2 overflow-y-auto px-1 max-sm:max-h-none max-sm:flex-1","data-testid":"form-squadron-members",children:p.map(e=>(0,t.jsx)(E,{member:e,offers:a.offers,workspaces:v,...void 0===a.machineLabels?{}:{machineLabels:a.machineLabels},isOpen:f.has(e.slot)||T===e.slot,onOpenChange:t=>{b(s=>{let a=new Set(s);return t?a.add(e.slot):a.delete(e.slot),a})},isDisabled:r,...T===e.slot&&void 0!==n?{error:n}:{},onChange:e=>{x(t=>t.map(t=>t.slot===e.slot?e:t))}},e.slot))}),void 0!==n&&void 0===T?(0,t.jsx)(C.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:n}):null,(0,t.jsxs)(j.DialogFooter,{className:"items-center border-t border-border pt-3",children:[(0,t.jsxs)("span",{className:"mr-auto text-meta tabular-nums","data-testid":"form-squadron-ready","aria-live":"polite",children:[k," of ",N," ",1===N?"member":"members"," ready"]}),(0,t.jsx)(g.Button,{type:"button",disabled:r,onClick:i,children:"Back"}),(0,t.jsx)(g.Button,{variant:"primary",isLoading:r,disabled:!S,"data-testid":"form-squadron-submit",onClick:()=>{u(p)},children:r?"Forming":"Form squadron"})]})]})}function P({blueprints:e,templates:a,isPending:r,error:n,onSubmit:i,initial:o,crew:l,onPicked:d}){let[c,m]=(0,s.useState)(1),[u,h]=(0,s.useState)(o?.key??e[0]?.key),p=e.find(e=>e.key===u)??e[0],[v,N]=(0,s.useState)(o?.version??p?.versions[0]?.version),S=p?.versions.find(e=>e.version===v)??p?.versions[0];if(!p||!S)return null;if(1===c){let s=Object.fromEntries(p.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsx)(j.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(j.DialogDescription,{children:"Step 1 of 2. Pick a blueprint and the version to form it from."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-meta font-medium",children:"Blueprint"}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Blueprint",className:"flex flex-col gap-2",children:e.map(e=>{let s=e.versions[0],a=e.key===p.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,"data-testid":"form-squadron-blueprint",onClick:()=>{h(e.key),N(e.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,t.jsxs)("span",{className:"text-body font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"font-mono text-meta text-muted-foreground",children:["v",s?.version,", latest"]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:s?.description})]},e.key)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(y.Select,{items:s,value:String(S.version),onValueChange:e=>{N(Number(e))},children:[(0,t.jsx)(y.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(y.SelectValue,{})}),(0,t.jsx)(y.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s},e))})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Older versions stay available. Squadrons keep the version they were formed with."})]}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(g.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(g.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{d?.({repository:S.repository,name:S.name,version:S.version}),m(2)},children:void 0===l?"Preview roles":"Next: the members"})]})]})}let T={repository:S.repository,name:S.name,version:S.version};if(void 0!==l)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(j.DialogDescription,{children:["Step 2 of 2. Each member, prefilled from its template and the blueprint. A workspace and every parameter are needed; the rest is optional. Forming commissions ",(0,b.memberCount)(S)," member ships and a flagship, and requests a crew for each member."]})]}),"ready"===l.state?(0,t.jsx)(D,{drafts:l.members,crew:l,isPending:r,...void 0===n?{}:{error:n},onBack:()=>{m(1)},onSubmit:e=>{i(T,e)}}):(0,t.jsxs)(t.Fragment,{children:["loading"===l.state?(0,t.jsx)("p",{className:"text-meta text-muted-foreground","data-testid":"form-squadron-members-loading",children:"Reading each member’s crew settings from its files."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.InlineError,{variant:"field",title:"Couldn’t read the members’ crew settings",description:l.error??"Try again in a moment."}),(0,t.jsx)("div",{children:(0,t.jsx)(g.Button,{size:"sm",icon:(0,t.jsx)(f.RotateCw,{}),onClick:l.onRetry,children:"Try again"})})]}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(g.Button,{type:"button",onClick:()=>{m(1)},children:"Back"}),(0,t.jsx)(g.Button,{variant:"primary",disabled:!0,"data-testid":"form-squadron-submit",children:"Form squadron"})]})]})]});let q=(0,b.rolePreviews)(S,a);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(j.DialogDescription,{children:["Step 2 of 2. ",(0,b.memberCount)(S)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(k.Table,{children:[(0,t.jsx)(k.TableHeader,{children:(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableHead,{children:"Role"}),(0,t.jsx)(k.TableHead,{children:"Template"}),(0,t.jsx)(k.TableHead,{children:"Members"}),(0,t.jsx)(k.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(k.TableBody,{children:q.map(e=>(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(k.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(k.TableCell,{children:e.count}),(0,t.jsx)(k.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,b.checkInText)(e.checkInMinutes)})]},e.role))})]}),(0,t.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,t.jsx)(x.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:["The flagship is named as the squadron, ",(0,t.jsxs)("span",{className:"font-mono",children:[S.name,"-"]})," plus six random characters: the squadron's address. Members are named by role."]})]}),(0,t.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!==n&&(0,t.jsx)(C.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:n}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(g.Button,{type:"button",disabled:r,onClick:()=>{m(1)},children:"Back"}),(0,t.jsx)(g.Button,{variant:"primary",isLoading:r,"data-testid":"form-squadron-submit",onClick:()=>{i(T)},children:r?"Forming":"Form squadron"})]})]})}function M(e){let{isOpen:s,onOpenChange:a,isPending:r}=e;return(0,t.jsx)(j.Dialog,{open:s,onOpenChange:e=>{r||a(e)},children:(0,t.jsx)(j.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:v.dialogSurface.phoneFullScreen,children:(0,t.jsx)(P,{...e})})})}e.s(["FormSquadron",0,function({blueprints:e,templates:n,isOpen:i,onOpenChange:o,initial:l,onFormed:c}){let m=(0,p.useHasTrierarchPlugin)(),x=(0,h.useFormSquadron)(),[f,b]=(0,s.useState)(),g=(0,h.useBlueprintCrew)(m?f:void 0),j=(0,p.useMachines)(),v=(0,r.useLabelContext)(),w=void 0===v||void 0===j.data?void 0:(0,u.machineLabelsInputOf)(v,j.data);return(0,t.jsx)(M,{blueprints:e,templates:n,...void 0===l?{}:{initial:l},isOpen:i,onOpenChange:o,isPending:x.isPending,...null===x.error?{}:{error:x.error.message},onPicked:e=>{x.reset(),b(e)},...m?{crew:{state:g.isError||j.isError?"error":void 0===g.data||void 0===j.data?"loading":"ready",members:g.data??[],offers:(0,a.offersOf)(j.data??[]),...void 0===v?{}:{context:v},...void 0===w?{}:{machineLabels:w},...null===g.error?null===j.error?{}:{error:j.error.message}:{error:g.error.message},onRetry:()=>{g.refetch(),j.refetch()}}}:{},onSubmit:(e,t)=>{x.mutate({blueprint:e,...void 0===t?{}:{members:Object.fromEntries(t.map(e=>[e.slot,{crew:{...""===e.harness?{}:{harness:e.harness},...void 0===e.workspace?{}:{workspace:e.workspace},...""===e.firstPrompt.trim()?{}:{firstPrompt:e.firstPrompt},options:e.options,machineLabels:d(e,v)},parameters:Object.fromEntries(e.parameters.map(e=>[e.name,e.value]))}]))}},{onSuccess:e=>{c(e.squadronId)}})}})}],71164)},87792,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),r=e.i(77880),n=e.i(36779),i=e.i(15034),o=e.i(85538);e.s(["ListLayout",0,function({title:e,description:l,titleMeta:d,primaryAction:c,toolbar:m,live:u,nav:h,onCompose:p,onSearch:x,account:f,banner:b,children:g}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,needsCrewCount:h.needsCrewCount,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,hasSettings:h.hasSettings,...f}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(r.Header,{breadcrumb:e,live:u,onCompose:p,onSearch:x}),b,(0,t.jsx)(o.TopBar,{title:e,live:u,account:f,onSearch:x,actions:p?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:p,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),d]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),c?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:c}):null]}),m,g]})]}),(0,t.jsx)(i.TabBar,{active:"overview"===h.active||"needs-crew"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])},18310,51588,e=>{"use strict";function t(e){let t=/^github\.com\/([^/]+\/[^/]+)$/.exec(e);return t?.[1]===void 0?{label:e,isGitHub:!1}:{label:t[1],isGitHub:!0}}function s(e,t){let s=new Map;for(let{name:a,version:r}of e.filter(e=>e.repository===t))s.set(a,[...s.get(a)??[],r]);return[...s].map(([e,t])=>({name:e,versions:t.toSorted((e,t)=>e-t)})).toSorted((e,t)=>e.name.localeCompare(t.name))}e.s(["leftOutLabel",0,function(e){let{kind:t,name:s,version:a}=e;return"blueprint"===t?`blueprint ${s} v${String(a)}`:`${t} ${s}@${String(a)}`},"repositoryContents",0,function(e,t){return{templates:s(e.templates,t),blueprints:s(e.blueprints,t),leftOut:e.problems.filter(e=>e.repository===t)}},"repositoryLabel",0,t,"versionFileUrl",0,function(e){let{label:s,isGitHub:a}=t(e.repository);return a?`https://github.com/${s}/blob/${e.commit}/${encodeURI(e.file)}`:void 0}],18310);var a=e.i(43476),r=e.i(56420);let n={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"}]]};n.node;let i=(0,r.default)(n);function o(){return(0,a.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",fill:"currentColor",className:"size-(--size-icon-sm) shrink-0",children:(0,a.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"})})}e.s(["RepositoryName",0,function({name:e,href:s}){let{label:r,isGitHub:n}=t(e),l=(0,a.jsxs)(a.Fragment,{children:[n?(0,a.jsx)(o,{}):(0,a.jsx)(i,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"truncate",children:r})]}),d="inline-flex min-w-0 items-center gap-1.5 font-medium";return void 0===s?(0,a.jsx)("span",{title:e,className:d,children:l}):(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",title:e,className:`${d} hover:underline`,children:l})}],51588)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function i(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let a={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,n){let{className:i,render:l,style:u,...c}=e,[d,h]=t.useState("idle"),f=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:h}),[d,h]),p=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:a});return(0,o.jsx)(s.Provider,{value:f,children:p})});var u=e.i(67865),c=e.i(46376),d=e.i(37584),h=e.i(74354),f=e.i(23910),p=e.i(56789);let m={...a,...h.transitionStatusMapping},g=t.forwardRef(function(e,n){let{className:s,render:a,onLoadingStatusChange:o,keepMounted:l=!1,style:h,sizes:g,srcSet:y,src:v,...b}=e,{setImageLoadingStatus:x}=i(),[k,S]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:i},a){let o=t.useState("idle"),l=o[1];return(0,c.useIsoLayoutEffect)(()=>{if(!a)return p.NOOP;if(!e&&!i)return l("error"),p.NOOP;let t=!0,o=new window.Image,u=e=>()=>{t&&l(e)};return l("loading"),o.onload=u("loaded"),o.onerror=u("error"),r&&(o.referrerPolicy=r),o.crossOrigin=n??null,s&&(o.sizes=s),i&&(o.srcset=i),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[a,e,i,s,n,r,l]),o}(v,e,!l),C="loaded"===k,{mounted:E,transitionStatus:R,setMounted:j}=(0,f.useTransitionStatus)(C),w=t.useRef(null),M=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!l)return;let e=M.current;M.current=!1;let t=w.current;if(!t)return;if(!t.complete)return void S("loading");let r=t.naturalWidth>0?"loaded":"error";S(r),"loaded"===r&&e&&j(!0)},[l,v,y,g,b.crossOrigin,b.referrerPolicy,a,S,j]);let O=l?{"data-loading":"loading"===k?"":void 0,"data-error":"error"===k?"":void 0,"aria-hidden":"loaded"!==k||void 0,onLoad(){S("loaded")},onError(){S("error")}}:void 0,P=(0,u.useStableCallback)(e=>{o?.(e),x(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==k&&P(k)},[k,P]),(0,c.useIsoLayoutEffect)(()=>()=>x("idle"),[x]),(0,d.useOpenChangeComplete)({enabled:!C,open:C,ref:w,onComplete(){C||j(!1)}});let A=l||E,N={};void 0!==g&&(N.sizes=g),void 0!==y&&(N.srcSet=y),void 0!==v&&(N.src=v);let T=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:k,transitionStatus:l&&"ending"===R?void 0:R},ref:[n,w],props:[O,b,N],stateAttributesMapping:m,enabled:A});return A?T:null});var y=e.i(39957);let v=t.forwardRef(function(e,n){let{className:s,render:o,delay:l=0,style:u,...c}=e,{imageLoadingStatus:d}=i(),[h,f]=t.useState(0===l),p=(0,y.useTimeout)();return t.useEffect(()=>(l>0?p.start(l,()=>f(!0)):f(!0),p.clear),[p,l]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:a,enabled:"loaded"!==d&&(0===l||h)})});e.s(["Fallback",0,v,"Image",0,g,"Root",0,l],14751);var b=e.i(14751);e.s(["Avatar",0,b],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),i=e.i(94603),a=e.i(80862);let o=null;function l(e,t=!1,u=!1){let c=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{c.cancel();let l=(0,i.resolveRef)(e);if(null==l)return;let d=()=>{if(!u)return void n.flushSync(r);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,n.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{s?.aborted||r()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function h(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||d()},()=>{s?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?h():d())})}if(t){let e=a.startingStyle;if(!l.hasAttribute(e))return void c.request(h);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),h())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(h)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:i,batch:a=!1,onComplete:o}=e,u=(0,r.useStableCallback)(o),c=l(i,s,a);t.useEffect(()=>{if(!n)return;let e=new AbortController;return c(u,e.signal),()=>{e.abort()}},[n,s,u,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,i=!1,a=!1){let[o,l]=t.useState(e&&s?"idle":void 0),[u,c]=t.useState(e&&!a);return e&&!u&&(c(!0),l("starting")),e||!u||"ending"===o||i||l("ending"),e||u||"ending"!==o||l(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&u&&"ending"!==o&&i){let e=n.AnimationFrame.request(()=>{l("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,u,o,i]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{l(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&u&&"idle"!==o&&l("starting");let t=n.AnimationFrame.request(()=>{l("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,u,o]),{mounted:u,setMounted:c,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},37750,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let n=(0,t.default)(r);e.s(["AppWindow",0,n],37750)},71567,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let n=(0,t.default)(r);e.s(["Bot",0,n],71567)},92150,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let n=(0,t.default)(r);e.s(["Boxes",0,n],92150)},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},83035,e=>{"use strict";var t=e.i(56420);let r={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"]};r.node;let n=(0,t.default)(r);e.s(["SquareTerminal",0,n],83035)},94831,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let n=(0,t.default)(r);e.s(["Unplug",0,n],94831)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809),a=e.r(43476),o=i._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),h=e.r(5550),f=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function y(t){var r;let n,s,i,[y,b]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,o.useRef)(null),{href:k,as:S,children:C,prefetch:E=null,passHref:R,replace:j,shallow:w,scroll:M,onClick:O,onMouseEnter:P,onTouchStart:A,legacyBehavior:N=!1,onNavigate:T,transitionTypes:I,ref:_,unstable_dynamicOnHover:z,...L}=t;n=C,N&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let q=o.default.useContext(u.AppRouterContext),D=!1!==E,F=!1===E?"none":!0===E?"full":"auto",$="none"!==F?"auto"===F?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,Q="string"==typeof(r=S||k)?r:(0,l.formatUrl)(r);if(N){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=o.default.Children.only(n)}let U=N?s&&"object"==typeof s&&s.ref:_,B,H=o.default.useCallback(e=>(null!==q&&(x.current=(0,p.mountLinkInstance)(e,Q,q,$,D,b,B)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[D,Q,q,$,b,B]),V={ref:(0,c.useMergedRef)(H,U),onClick(t){N||"function"!=typeof O||O(t),N&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!q||t.defaultPrevented||function(t,r,n,s,i,a,l,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);o.default.startTransition(()=>{h(r,s?"replace":"push",!1===i?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,l,u)})}}(t,Q,x,j,M,T,I,F)},onMouseEnter(e){N||"function"!=typeof P||P(e),N&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),q&&D&&(0,p.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){N||"function"!=typeof A||A(e),N&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),q&&D&&(0,p.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,d.isAbsoluteUrl)(Q)?V.href=Q:N&&!R&&("a"!==s.type||"href"in s.props)||(V.href=(0,h.addBasePath)(Q)),i=N?o.default.cloneElement(s,V):(0,a.jsx)("a",{...L,...V,children:n}),(0,a.jsx)(v.Provider,{value:y,children:i})}let v=(0,o.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=i(e,n)),t&&(s.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return h},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return S}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&h(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),s=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),s&&"/"!==s[0]&&(s="/"+s)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${s}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var r=e.i(66250),n=e.i(2820),s=e.i(56736),i=e.i(9793),a=e.i(84324),o=e.i(64951),l=e.i(77173);let u=e.i(13488).DialogTrigger;var c=e.i(74217),d=e.i(25326);class h extends d.DialogHandle{}e.s(["Backdrop",()=>n.DialogBackdrop,"Close",()=>s.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,h,"Popup",()=>a.DialogPopup,"Portal",()=>o.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>l.DialogTitle,"Trigger",0,u,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var f=e.i(34604),f=f,p=e.i(90063),m=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(f.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(f.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:r,children:n,...s}){return(0,t.jsxs)(f.Portal,{children:[(0,t.jsx)(f.Backdrop,{"data-slot":"alert-dialog-overlay",className:m.dialogSurface.overlay}),(0,t.jsx)(f.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(m.dialogSurface.popup({size:r}),e),...s,children:n})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(f.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(m.dialogSurface.description,e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(m.dialogSurface.footer,e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(m.dialogSurface.header,e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(f.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(m.dialogSurface.title,e),...r})}],24010)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),i=e.i(56420);let a={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};a.node;let o=(0,i.default)(a);e.s(["UserRound",0,o],26478);var l=e.i(90063);let u=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:i="",className:a}){let c=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(u({kind:e,size:n}),a),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(o,{"aria-hidden":!0}):i.replaceAll("-","").slice(0,2)})})}],94859)},61966,8734,e=>{"use strict";var t=e.i(43476),r=e.i(89664),n=e.i(56420);let s={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"}]]};s.node;let i=(0,n.default)(s);e.s(["Copy",0,i],8734);var a=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:n,size:s="xs",isLabeled:l=!1,onCopied:u,onCopyFailed:c,className:d,"data-testid":h}){let[f,p]=(0,a.useState)(!1);async function m(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}p(!0),u?.(),setTimeout(()=>{p(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:s,isIconOnly:!l,"aria-label":n,title:l?void 0:n,icon:f?(0,t.jsx)(r.Check,{"aria-hidden":!0}):(0,t.jsx)(i,{"aria-hidden":!0}),className:d,"data-testid":h,onClick:()=>{m()},children:l?f?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:f?"Copied.":""})]})}],61966)},95960,e=>{"use strict";var t=e.i(43476),r=e.i(92150),n=e.i(49287),s=e.i(86875),i=e.i(63676),a=e.i(90063);let o={"trierarch-plugin":s.ShipWheel,squadrons:r.Boxes,ship:n.Ship};e.s(["LabelChip",0,function({chip:e,onRemove:r,testId:n,className:s,trailing:l}){let u="none"===e.mark?null:o[e.mark],c=`${e.key}=${e.value}`,d="none"===e.mark?"you":e.ownerName;return(0,t.jsxs)("span",{"data-slot":"label-chip","data-testid":n,title:`${c}, by ${d}`,className:(0,a.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",s),children:[null===u?null:(0,t.jsx)(u,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),l,void 0===r?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${c}`,onClick:r,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(i.X,{"aria-hidden":!0})})]})}])},63481,e=>{"use strict";var t=e.i(43476),r=e.i(37750),n=e.i(71567),s=e.i(56420);let i={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"}]]};i.node;let a=(0,s.default)(i),o={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"}]]};o.node;let l=(0,s.default)(o),u={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"}]]};u.node;let c=(0,s.default)(u),d={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"}]]};d.node;let h=(0,s.default)(d),f={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"}]]};f.node;let p=(0,s.default)(f);var m=e.i(83035),g=e.i(94831),y=e.i(90063),v=e.i(66616),b=e.i(40798);let x={DEVICE:l,CLOUD:a,SERVER:p,OTHER:c},k={coding:m.SquareTerminal,chat:h,bot:n.Bot,console:r.AppWindow},S={md:"text-body",sm:"text-meta"};e.s(["LocationTag",0,function({kind:e,description:r=null,harness:n=null,isCompact:s=!1,size:i="md",className:a}){let o=(0,y.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",S[i],a);if(null===e)return(0,t.jsxs)("span",{"data-slot":"location-tag",className:o,children:[(0,t.jsx)(g.Unplug,{"aria-hidden":!0}),"No session"]});let l=x[e],u=(0,b.locationKindWord)(e),c=null===r?u:`${u} \xb7 ${r}`;if(null!==n){let e=(0,v.harnessKind)(n),s=void 0===e?void 0:k[e],i=(0,v.harnessWord)(n);return(0,t.jsxs)("span",{"data-slot":"location-tag",className:o,title:null===r?`${i} \xb7 ${u}`:`${i} \xb7 ${u}: ${r}`,children:[void 0===s?null:(0,t.jsx)(s,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate text-foreground",children:i}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(l,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:u}),null===r?null:(0,t.jsxs)("span",{className:"sr-only",children:[": ",r]})]})}return s?(0,t.jsxs)("span",{"data-slot":"location-tag",className:o,title:c,children:[(0,t.jsx)(l,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"sr-only",children:[u,": "]}),(0,t.jsx)("span",{className:"truncate text-foreground",children:r??u})]}):(0,t.jsxs)("span",{"data-slot":"location-tag",className:o,children:[(0,t.jsx)(l,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[u,null===r?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,t.jsx)("span",{className:"sr-only",children:", "}),(0,t.jsx)("span",{className:"text-foreground",children:r})]})]})]})}],63481)},66616,e=>{"use strict";let t={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function r(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":r(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,r])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),r=e.i(19273),n=e.i(12598),s=e.i(81384),i=e.i(73664),a=e.i(27001),o=e.i(54440),l=e.i(71645),u=e.i(15823),c=e.i(40143),d=e.i(69230);function h(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var f=class extends u.Subscribable{#e;#t;#r;#n;#s;#i;#a;#o;#l;#u=[];constructor(e,t,r){super(),this.#e=e,this.#n=r,this.#r=[],this.#s=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#s.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#n=t,c.notifyManager.batch(()=>{let e=this.#s,t=this.#d(this.#r);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),s=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,r)=>t!==e[r]),o=i||a,l=!!o||s.some((e,t)=>{let n=this.#t[t];return!n||!(0,r.shallowEqualObjects)(e,n)});(o||l)&&(o&&(this.#u=t,this.#s=n),this.#t=s,this.hasListeners()&&(o&&(h(e,n).forEach(e=>{e.destroy()}),h(n,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#s.map(e=>e.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(e,t){let r=this.#d(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),s=r.map(e=>e.defaultedQueryOptions.queryHash);return[n,e=>this.#f(e??n,t,s),()=>this.#p(n,r)]}#p(e,t){let r=new Set;return t.map((n,s)=>{let i=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{r.has(e)||(r.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#f(e,t,n){if(t){let s=this.#l,i=void 0!==n&&void 0!==s&&(s.length!==n.length||n.some((e,t)=>e!==s[t]));return(this.#t!==this.#o||i||t!==this.#a)&&(this.#a=t,this.#o=this.#t,void 0!==n&&(this.#l=n),this.#i=(0,r.replaceEqualDeep)(this.#i,t(e))),this.#i}return e}#m(){return!this.#n?.combine||this.#s.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#d(e){let t=new Map;this.#s.forEach(e=>{let r=e.options.queryHash;if(!r)return;let n=t.get(r);n?n.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let n=this.#e.defaultQueryOptions(e),s=t.get(n.queryHash)?.shift()??new d.QueryObserver(this.#e,n);r.push({defaultedQueryOptions:n,observer:s})}),r}#c(e,t){let r=this.#s.indexOf(e);-1!==r&&(this.#t=this.#t.slice(),this.#t[r]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#m(),t=this.#i,r=e?t:this.#f(this.#p(this.#t,this.#u),this.#n?.combine);(e||t!==r)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),m=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?r.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?r.skipToken:{shipId:e},{refetchInterval:m.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let u=(0,g.useTRPC)(),h=function({queries:e,...t}){let u=(0,n.useQueryClient)(void 0),h=(0,s.useIsRestoring)(),p=(0,i.useQueryErrorResetBoundary)(),m=!1!==t.subscribed,g=l.useMemo(()=>e.map(e=>{let t=u.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":m?"optimistic":void 0,t}),[e,u,h,m]);g.forEach(e=>{(0,o.ensureSuspenseTimers)(e);let t=u.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,a.useClearResetErrorBoundary)(p);let[y]=l.useState(()=>new f(u,g,t)),[v,b,x]=y.getOptimisticResult(g,t.combine),k=!h&&m;l.useSyncExternalStore(l.useCallback(e=>k?y.subscribe(c.notifyManager.batchCalls(e)):r.noop,[y,k]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),l.useEffect(()=>{y.setQueries(g,t)},[g,t,y]);let S=v.some((e,t)=>(0,o.shouldSuspend)(g[t],e))?v.flatMap((e,t)=>{let r=g[t];if(r&&(0,o.shouldSuspend)(r,e)){let e=new d.QueryObserver(u,r);return(0,o.fetchOptimistic)(r,e,p)}return[]}):[];if(S.length>0)throw Promise.all(S);let C=v.find((e,t)=>{let r=g[t];return r&&(0,a.getHasError)({result:e,errorResetBoundary:p,throwOnError:r.throwOnError,query:u.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(C)throw C.error;return b(x())}({queries:e.flatMap(e=>{let r=(0,t.idSchema)("ship").safeParse(e);return r.success?[r.data]:[]}).map(e=>u.fleet.ship.queryOptions({shipId:e},{refetchInterval:m.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of h)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86247,e=>{"use strict";var t=e.i(56420);let i={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"]};i.node;let s=(0,t.default)(i);e.s(["Ellipsis",0,s],86247)},18236,e=>{"use strict";var t=e.i(56420);let i={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"]};i.node;let s=(0,t.default)(i);e.s(["FileKey",0,s],18236)},58925,e=>{"use strict";var t=e.i(56420);let i={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"}]]};i.node;let s=(0,t.default)(i);e.s(["KeyRound",0,s],58925)},68997,e=>{"use strict";var t=e.i(56420);let i={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"]};i.node;let s=(0,t.default)(i);e.s(["Pen",0,s],68997)},15331,71139,73330,e=>{"use strict";var t=e.i(56420);let i={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"}]]};i.node;let s=(0,t.default)(i);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,t.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,t){let i=new Date(e.sentAt);switch(e.state){case"waiting":{let e=(0,r.relativeTime)(i,t);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()-i.getTime()))<6e4?`${String(Math.round(n/1e3))} s`:(0,r.duration)(i,s)}`;case"received":return"Received, not answered with pong";case"undeliverable":return"Ping not answered: undeliverable"}}],73330)},83035,e=>{"use strict";var t=e.i(56420);let i={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"]};i.node;let s=(0,t.default)(i);e.s(["SquareTerminal",0,s],83035)},68401,e=>{"use strict";var t=e.i(56420);let i={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"}]]};i.node;let s=(0,t.default)(i);e.s(["Tags",0,s],68401)},37817,e=>{"use strict";var t=e.i(56420);let i={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"}]]};i.node;let s=(0,t.default)(i);e.s(["Undo2",0,s],37817)},49319,e=>{"use strict";var t=e.i(56420);let i={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"}]]};i.node;let s=(0,t.default)(i);e.s(["UserMinus",0,s],49319)},82303,e=>{"use strict";var t=e.i(56420);let i={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"}]]};i.node;let s=(0,t.default)(i);e.s(["Users",0,s],82303)},91703,e=>{"use strict";var t=e.i(43476),i=e.i(83035),s=e.i(90063),n=e.i(61966);e.s(["CodeBlock",0,function({label:e,code:a,isWrapped:r=!1,copyValue:o,copyLabel:l=`Copy ${e.toLowerCase()}`,onCopied:d,onCopyFailed:c,codeTestId:h,copyTestId:u}){return(0,t.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(i.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e})]}),(0,t.jsx)(n.CopyButton,{value:o??a,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":u})]}),(0,t.jsx)("pre",{"data-testid":h,className:(0,s.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",r?"break-all whitespace-pre-wrap":"whitespace-pre"),children:a})]})}])},61966,8734,e=>{"use strict";var t=e.i(43476),i=e.i(89664),s=e.i(56420);let n={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"}]]};n.node;let a=(0,s.default)(n);e.s(["Copy",0,a],8734);var r=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:s,size:n="xs",isLabeled:l=!1,onCopied:d,onCopyFailed:c,className:h,"data-testid":u}){let[p,m]=(0,r.useState)(!1);async function x(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}m(!0),d?.(),setTimeout(()=>{m(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:n,isIconOnly:!l,"aria-label":s,title:l?void 0:s,icon:p?(0,t.jsx)(i.Check,{"aria-hidden":!0}):(0,t.jsx)(a,{"aria-hidden":!0}),className:h,"data-testid":u,onClick:()=>{x()},children:l?p?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:p?"Copied.":""})]})}],61966)},1009,e=>{"use strict";var t=e.i(43476);e.s(["ConsequenceList",0,function({consequences:e}){return(0,t.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:e.map(({icon:e,text:i})=>(0,t.jsxs)("li",{className:"flex gap-2",children:[(0,t.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{children:i})]},i))})}])},56478,e=>{"use strict";var t=e.i(43476),i=e.i(66616),s=e.i(91703);e.s(["CrewLines",0,function({crewLines:e,subject:n,testIdPrefix:a,onCopied:r,onCopyFailed:o}){return e.map(({harness:e,line:l})=>(0,t.jsx)(s.CodeBlock,{label:`Crew line, ${(0,i.harnessWord)(e)} with the aeolus plugin`,code:l,isWrapped:!0,copyLabel:`Copy the ${(0,i.harnessWord)(e)} crew line for ${n}`,codeTestId:`${a}-${e}`,copyTestId:`${a}-${e}-copy`,onCopied:r,onCopyFailed:o},e))}])},69374,e=>{"use strict";var t=e.i(43476),i=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,i.useId)(),c=(0,i.useId)();return(0,t.jsxs)("div",{"data-testid":l,className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(a.Label,{htmlFor:d,className:"text-meta",children:["Type ",(0,t.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:e})," to confirm"]}),(0,t.jsx)(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,t.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 t=e.i(43476),i=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:y,error:b,onConfirm:j}=e,v=u[x],w=m?`The session on ${m}`:"The session crewing it";return(0,t.jsx)(o.AlertDialog,{open:g,onOpenChange:e=>{y||f(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":v.testId,className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:[v.title," ",p,"?"]}),(0,t.jsxs)(o.AlertDialogDescription,{children:[w," loses this ship now."]})]}),(0,t.jsx)(c.ConsequenceList,{consequences:function(e){let{shipName:t,inFlightCount:o,mode:l="release"}=e;return[{icon: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:i.CircleDashed,text:`${t} 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===b?null:(0,t.jsx)(h.InlineError,{title:v.failed,description:`${b} Nothing changed; the session still holds the ship.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:y}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",isLoading:y,onClick:j,children:y?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),y=e.i(90063),b=e.i(65160),j=e.i(22212),v=e.i(12470),w=e.i(91727);function k({shipName:e,activeNames:i,isPending:s,error:n,onSubmit:a}){let r=(0,f.useId)(),o=(0,f.useId)(),[d,c]=(0,f.useState)(""),u=(0,b.checkShipName)(d,{activeNames:i,current:e}),C="invalid"===u.kind||"reserved"===u.kind||"taken"===u.kind,N="available"===u.kind;return(0,t.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),N&&a(d)},children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:["Rename ",e]}),(0,t.jsx)(j.DialogDescription,{children:"The ship keeps its id, inbox and history."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(w.Label,{htmlFor:r,children:"New name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[d.length," / ",p.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(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,b.asHandle)(e.target.value))}}),"available"===u.kind?(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):C?(0,t.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,t.jsx)("p",{id:o,"aria-live":"polite",className:(0,y.classNames)("text-meta",C?"text-destructive-text":"text-muted-foreground"),children:u.message})]}),(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg p-3 text-tone-waiting-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("p",{className:"text-body font-medium",children:["Ships that address ",e," by name stop reaching it"]}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Messages already sent are unaffected, because they are stored by ship id."})]})]}),void 0===n?null:(0,t.jsx)(h.InlineError,{title:"Couldn’t rename the ship",description:`${n} Nothing changed.`}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(l.Button,{type:"button",disabled:s}),children:"Cancel"}),(0,t.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:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(j.Dialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(j.DialogContent,{"data-testid":"rename-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.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,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}):(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:(0,r.abandonedLine)(e)}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Each is marked Abandoned and its sender can see that."})]})]})}function z(e){var i;let{shipName:s,openDeliveries:a,isCrewed:d,isPending:u,error:p,onConfirm:m}=e,[x,g]=(0,f.useState)(""),y=a>0,b=!y||(0,r.isTypedMatch)(s,x);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Retire ",s,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:"Retiring ends this ship for good. Its history stays available read-only. This can’t be undone."})]}),(0,t.jsx)(M,{openDeliveries:a}),(0,t.jsx)(c.ConsequenceList,{consequences:(i=e.labelLines??[],[...d?[{icon:D.UserX,text:"The session crewing it loses it now."}]:[],...i.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."}])}),y?(0,t.jsx)(I.TypedConfirm,{expected:s,value:x,onValueChange:g}):null,void 0===p?null:(0,t.jsx)(h.InlineError,{title:"Couldn’t retire the ship",description:`${p} Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:u}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:u,disabled:!b,onClick:m,children:(0,r.retireButtonLabel)(a)})]})]})}e.s(["RetireDialog",0,function(e){let{isOpen:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(o.AlertDialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(o.AlertDialogContent,{"data-testid":"retire-dialog",className:d.dialogSurface.phoneSheet,children:(0,t.jsx)(z,{...e})})})}],39844)},48287,e=>{"use strict";var t=e.i(43476),i=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:t,blueprint:i}){let s=0===t.length?`no ${e}`:`${String(t.length)} ${e}`;return void 0===i?`The squadron then has ${s}.`:`The squadron then has ${s}; blueprint ${i.label} has ${String(i.count)}.`}function f(e){let{squadronId:h,member:f,othersOfRole:y,blueprint:b,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===y.length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.AlertDialogHeader,{children:[(0,t.jsxs)(d.AlertDialogTitle,{children:["Remove ",f.name," from ",h,"?"]}),(0,t.jsx)(d.AlertDialogDescription,{children:S?(0,t.jsx)(t.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,t.jsx)(t.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),S?(0,t.jsxs)("div",{role:"alert",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-meta text-tone-attention-fg",children:[(0,t.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"font-medium",children:(0,o.abandonedLine)(j)}),(0,t.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,t.jsx)(u.ConsequenceList,{consequences:[{icon:i.Archive,text:`Its ship ${f.name} is retired. Its history stays read-only.`},{icon:a.Users,text:g({role:f.role,othersOfRole:y,blueprint:b})}]}),M&&(0,t.jsxs)("p",{"data-testid":"remove-member-last-of-role",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:[(0,t.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"font-medium",children:["The last ",f.role,"."]})," ",(0,t.jsxs)("span",{className:"text-foreground",children:[g({role:f.role,othersOfRole:y,blueprint:b})," Work for the role waits until a member is added."]})]})]}),!S&&(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(s.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),S?(0,t.jsx)(m.TypedConfirm,{expected:f.name,value:N,onValueChange:D}):null,void 0!==k&&(0,t.jsx)(p.InlineError,{title:"Couldn’t remove the member",description:`${k} Nothing changed.`}),(0,t.jsxs)(d.AlertDialogFooter,{children:[(0,t.jsx)(d.AlertDialogClose,{render:(0,t.jsx)(c.Button,{disabled:w}),children:"Cancel"}),(0,t.jsx)(c.Button,{variant:"destructive",isLoading:w,disabled:!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:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(d.AlertDialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(d.AlertDialogContent,{"data-testid":"remove-member-dialog",className:h.dialogSurface.phoneSheet,children:(0,t.jsx)(f,{...e})})})}])},5894,e=>{"use strict";var t=e.i(43476),i=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),y=e.i(80581),b=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),z=e.i(29244),T=e.i(39874),L=e.i(48287),A=e.i(88280),R=e.i(39844),P=e.i(82532);function O({action:e,className:i}){let s=e.isPrimary?"primary":e.isDestructive||"rename"===e.key?"ghost":"secondary";return void 0!==e.href?(0,t.jsx)(N.Button,{size:"xs",variant:s,nativeButton:!1,"data-testid":e.testId,className:i,render:(0,t.jsx)(m.default,{href:e.href}),children:e.label}):(0,t.jsx)(N.Button,{size:"xs",variant:s,"data-testid":e.testId,disabled:e.isDisabled,isLoading:e.isLoading,className:i,onClick:e.onSelect,children:e.label})}function $(e,t){let i=e[t-1],s=e[t];return void 0!==i&&void 0!==s&&(!0===i.isMenuOnly&&!0!==s.isMenuOnly||!0===s.isDestructive&&!0!==i.isDestructive)}function q({layout:e,ship:i,actions:s}){if("next"===e){let e=s.find(e=>"prompt"===e.key||"crew-line"===e.key&&!0===e.isPrimary);return e?(0,t.jsx)(O,{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,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2 max-sm:justify-start",children:e.map(e=>(0,t.jsx)(O,{action:e},e.key))})}let a=(0,t.jsx)(N.Button,{size:"sheet"===e?"touch":"xs",variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${i.name}`,icon:(0,t.jsx)(n.Ellipsis,{}),"data-testid":"fleet-actions"});return"sheet"===e?(0,t.jsxs)(S.Sheet,{children:[(0,t.jsx)(S.SheetTrigger,{render:a}),(0,t.jsxs)(S.SheetContent,{side:"bottom","data-testid":"fleet-row-sheet",children:[(0,t.jsx)(S.SheetHeader,{children:(0,t.jsx)(S.SheetTitle,{children:i.name})}),(0,t.jsx)("ul",{className:"flex flex-col pb-2",children:s.map((e,i)=>(0,t.jsx)("li",{className:$(s,i)?"mt-1 border-t border-border pt-1":void 0,children:(0,t.jsxs)(S.SheetClose,{render:void 0===e.href?(0,t.jsx)("button",{type:"button",disabled:e.isDisabled,onClick:e.onSelect}):(0,t.jsx)(m.default,{href:e.href}),"data-testid":e.testId,className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch disabled:opacity-45 [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel.replace(/…$/,"")]})},e.key))}),(0,t.jsx)("div",{className:"px-4 pb-4",children:(0,t.jsx)(S.SheetClose,{render:(0,t.jsx)(N.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]}):(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsx)(D.DropdownMenuTrigger,{render:a}),(0,t.jsx)(D.DropdownMenuContent,{children:s.map((e,i)=>(0,t.jsxs)(x.Fragment,{children:[$(s,i)?(0,t.jsx)(D.DropdownMenuSeparator,{}):null,void 0===e.href?(0,t.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,disabled:e.isDisabled,variant:e.isDestructive?"destructive":"default",onClick:e.onSelect,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]}):(0,t.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,render:(0,t.jsx)(m.default,{href:e.href}),children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]})]},e.key))})]})}e.s(["ShipActions",0,function({ship:e,layout:n="buttons"}){var m,N;let D=(0,f.useAccess)(),[S,O]=(0,x.useState)(),[$,F]=(0,x.useState)(!1),[B,U]=(0,x.useState)(void 0),H=(0,g.useGetStartingPrompt)(),E=(0,g.useReleaseShip)(),K=(0,g.useRetireShip)(),V=(0,g.useRecrewShip)(),G=(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(t=>"disbanded"!==t.state&&(t.flagship.shipId===e.id||t.members.some(t=>t.shipId===e.id))),et=void 0!==ee&&ee.flagship.shipId!==e.id,ei=(0,j.useShip)(et&&"retired"!==e.status?e.id:void 0),es=ee?.members.find(t=>t.shipId===e.id),en=(0,T.useNewCrewLineFlow)(ee&&es?{squadronId:ee.id,member:es,ship:ei.data}:void 0),ea="unknown"===Q||"connected"===Q&&!Y.isFetched,er=()=>{O(void 0)},eo=H.data??V.data,el=eo?"shown":H.isError?"error":"issuing",ed=e=>()=>{E.reset(),K.reset(),V.reset(),G.reset(),Z.reset(),O(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:()=>{F(!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,b.canPing)(e)?[{key:"ping",label:"Ping",menuLabel:"Ping",icon:l.Radio,testId:"fleet-ship-ping",onSelect:()=>{X.mutate({shipId:e.id},{onSuccess:({isNew:t})=>{(0,I.showToast)(t?{title:`Pinged ${e.name}`,description:"Its session answers with pong on its next turn.",tone:"success"}:{title:`A ping already waits for ${e.name}`,description:"Pings never stack: this is the one shown.",tone:"info"})},onError:t=>{(0,I.showToast)({title:`Couldn’t ping ${e.name}`,description:t.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(),V.reset(),U((0,C.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),O("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:i.Archive,testId:"fleet-ship-retire",onSelect:ed("retire"),isDestructive:!0,needs:"canManage"})),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{layout:n,ship:e,actions:(m=ex,N=D,m.filter(e=>void 0===e.needs||N[e.needs]))}),(0,t.jsx)(z.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||V.isPending,error:("recrew"===S?V.error:E.error)?.message,onConfirm:()=>{"recrew"===S?V.mutate({shipId:e.id},{onSuccess:()=>{U(void 0),O("prompt")}}):E.mutate({shipId:e.id},{onSuccess:er})}}),(0,t.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,y.retireLabelLines)((0,y.retiredLabelsOf)(e,_))}),ee&&es&&(0,t.jsx)(L.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,t.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:G.isPending,error:G.error?.message,onSubmit:t=>{G.mutate({shipId:e.id,name:t},{onSuccess:er})}}),(0,t.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(),V.reset(),er())},onConfirm:()=>{V.reset(),H.mutate({shipId:e.id})}}),en.dialog,$&&(0,t.jsx)(M.ComposeMessage,{isOpen:!0,onOpenChange:F,toShipId:e.id})]})}])},82532,e=>{"use strict";var t=e.i(43476),i=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,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,t.jsx)(s.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," If you lose it, get a new one; this one then stops working."]})]}),(0,t.jsx)(l.CodeBlock,{label:`Starting prompt for ${e}`,code:n,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e}`,codeTestId:"starting-prompt-text",copyTestId:"starting-prompt-copy",onCopied:c,onCopyFailed:h}),(0,t.jsx)(u.CrewLines,{crewLines:r,subject:e,testIdPrefix:"starting-prompt-crew-line",onCopied:c,onCopyFailed:h}),(0,t.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.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:i,state:s,prompt:a,crewLines:l,replacesUnclaimed:u,error:x,isOpen:g,onOpenChange:f,onConfirm:y}=e,b="issuing"===s;return(0,t.jsx)(d.Dialog,{open:g,onOpenChange:e=>{b||f(e)},children:(0,t.jsxs)(d.DialogContent,{size:"md","data-testid":"starting-prompt-dialog",className:c.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsxs)(d.DialogTitle,{children:["Starting prompt for ",i]}),(0,t.jsxs)(d.DialogDescription,{children:["Paste it into the agent session that should crew this ship, or a crew line into Claude Code or Codex with the aeolus plugin. Any earlier prompt for ",i," stops working now."]})]}),"error"!==s&&u?(0,t.jsxs)("p",{className:"rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:["This prompt stops the one issued"," ",(0,t.jsx)("time",{dateTime:u.issuedAt,children:(0,r.shortDateTime)(new Date(u.issuedAt))})," ","working."]}):null,b?(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a starting prompt..."}),(0,t.jsx)(h.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(h.Skeleton,{className:"h-40 w-full rounded-lg"})]}):null,"shown"===s&&void 0!==a&&void 0!==l?(0,t.jsx)(m,{shipName:i,prompt:a,crewLines:l}):null,"error"===s?(0,t.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,t.jsxs)(d.DialogFooter,{children:["issuing"===s||"shown"===s?(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary",disabled:b}),children:"Done"}):null,"error"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(n.RotateCw,{}),onClick:y,children:"Try again"})]}):null]})]})})}])},84156,e=>{"use strict";e.s(["isUnclaimedPromptOut",0,function(e){return null!==e.startingPrompt&&!e.startingPrompt.isClaimed}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79432,19002,11147,e=>{"use strict";var t=e.i(56420);let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let i=(0,t.default)(s);e.s(["Activity",0,i],79432);let r={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};r.node;let n=(0,t.default)(r);e.s(["CirclePause",0,n],19002);let a={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};a.node;let l=(0,t.default)(a);e.s(["OctagonPause",0,l],11147)},37750,e=>{"use strict";var t=e.i(56420);let s={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"}]]};s.node;let i=(0,t.default)(s);e.s(["AppWindow",0,i],37750)},71567,e=>{"use strict";var t=e.i(56420);let s={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"}]]};s.node;let i=(0,t.default)(s);e.s(["Bot",0,i],71567)},26091,e=>{"use strict";var t=e.i(56420);let s={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};s.node;let i=(0,t.default)(s);e.s(["FileText",0,i],26091)},31458,e=>{"use strict";var t=e.i(56420);let s={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};s.node;let i=(0,t.default)(s);e.s(["Flag",0,i],31458)},69309,e=>{"use strict";var t=e.i(56420);let s={name:"plug",size:24,node:[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]};s.node;let i=(0,t.default)(s);e.s(["Plug",0,i],69309)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var s=e.i(66250),i=e.i(2820),r=e.i(56736),n=e.i(9793),a=e.i(84324),l=e.i(64951),o=e.i(77173);let d=e.i(13488).DialogTrigger;var c=e.i(74217),u=e.i(25326);class h extends u.DialogHandle{}e.s(["Backdrop",()=>i.DialogBackdrop,"Close",()=>r.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,h,"Popup",()=>a.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>o.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var p=e.i(34604),p=p,m=e.i(90063),f=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(p.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(p.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:i,...r}){return(0,t.jsxs)(p.Portal,{children:[(0,t.jsx)(p.Backdrop,{"data-slot":"alert-dialog-overlay",className:f.dialogSurface.overlay}),(0,t.jsx)(p.Popup,{"data-slot":"alert-dialog-content",className:(0,m.classNames)(f.dialogSurface.popup({size:s}),e),...r,children:i})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(p.Description,{"data-slot":"alert-dialog-description",className:(0,m.classNames)(f.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.classNames)(f.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.classNames)(f.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(p.Title,{"data-slot":"alert-dialog-title",className:(0,m.classNames)(f.dialogSurface.title,e),...s})}],24010)},75774,e=>{"use strict";var t=e.i(43476),s=e.i(71645),i=e.i(10649),r=e.i(9677),n=e.i(66616),a=e.i(91727),l=e.i(46033),o=e.i(43988),d=e.i(17981),c=e.i(4032);function u({id:e,label:s,isOptional:i,hint:r,error:n,children:l}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(a.Label,{htmlFor:e,children:[s,i?(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"}):null]}),l,void 0===r?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:r}),void 0===n?null:(0,t.jsx)(d.InlineError,{variant:"field",title:n})]})}function h({id:e,items:s,value:i,onPick:r,isDisabled:n,testId:a}){return(0,t.jsxs)(l.Select,{items:s,value:i,disabled:n,onValueChange:e=>{"string"==typeof e&&r(e)},children:[(0,t.jsx)(l.SelectTrigger,{id:e,className:"h-(--size-control) w-full","data-testid":a,children:(0,t.jsx)(l.SelectValue,{})}),(0,t.jsx)(l.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(l.SelectItem,{value:e,children:s},e))})]})}e.s(["CrewSettingsFields",0,function({offers:e,values:a,onChange:l,squadrons:d,refusal:p,isDisabled:m=!1,machineLabels:f}){var g;let x={harness:(0,s.useId)(),workspace:(0,s.useId)(),options:(0,s.useId)(),firstPrompt:(0,s.useId)(),squadron:(0,s.useId)()},y=e.find(e=>e.harness===a.harness),b=e=>p?.field===e?p.reason:void 0,w=(0,i.promptBytes)(a.firstPrompt),v=w>r.FIRST_PROMPT_MAX_BYTES,j=Object.fromEntries([...(y?.repositories??[]).map(e=>[`worktree:${e}`,`${e} \xb7 new worktree`]),...(y?.folders??[]).map(e=>[`folder:${e}`,`${e} \xb7 folder, as it is`])]);return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"crew-settings-fields",children:[(0,t.jsx)(u,{id:x.harness,label:"Harness",error:b("harness"),children:(0,t.jsx)(h,{id:x.harness,items:Object.fromEntries(e.map(e=>[e.harness,(0,n.harnessWord)(e.harness)])),value:a.harness,isDisabled:m,testId:"crew-settings-harness",onPick:t=>{l((0,i.withHarness)(a,{harness:t,offers:e}))}})}),(0,t.jsx)(u,{id:x.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:b("workspace"),children:(0,t.jsx)(h,{id:x.workspace,items:j,value:void 0===(g=a.workspace)?"":"worktree"===g.kind?`worktree:${g.repository}`:`folder:${g.name}`,isDisabled:m,testId:"crew-settings-workspace",onPick:e=>{l({...a,workspace:function(e){let[t,...s]=e.split(":"),i=s.join(":");return"worktree"===t?{kind:"worktree",repository:i}:"folder"===t?{kind:"folder",name:i}:void 0}(e)})}})}),void 0===f?null:(0,t.jsx)(c.MachineLabelsField,{shipName:f.shipName,picked:f.chipsOf(a.machineLabels),groups:f.groups,match:f.matchOf(a.machineLabels),isDisabled:m,onAdd:e=>{l({...a,machineLabels:[...a.machineLabels,e]})},onRemove:e=>{l({...a,machineLabels:a.machineLabels.filter(t=>t!==e)})}}),(y?.options??[]).map((e,s)=>(0,t.jsx)(u,{id:`${x.options}-${String(s)}`,label:e.name,error:0===s?b("options"):void 0,children:(0,t.jsx)(h,{id:`${x.options}-${String(s)}`,items:Object.fromEntries(e.values.map(t=>[t,t===e.defaultValue?`${t} (default)`:t])),value:a.options[e.name]??"",isDisabled:m,testId:`crew-settings-option-${e.name}`,onPick:t=>{l({...a,options:{...a.options,[e.name]:t}})}})},e.name)),(0,t.jsx)(u,{id:x.firstPrompt,label:"First prompt",isOptional:!0,hint:(0,t.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,t.jsx)("span",{children:"The session starts with it, on its first start only."}),(0,t.jsxs)("span",{className:"tabular-nums",children:[(0,i.byteSize)(w)," of ",(0,i.byteSize)(r.FIRST_PROMPT_MAX_BYTES)]})]}),error:v?`A first prompt is at most ${(0,i.byteSize)(r.FIRST_PROMPT_MAX_BYTES)}.`:b("firstPrompt"),children:(0,t.jsx)(o.Textarea,{id:x.firstPrompt,rows:3,disabled:m,"aria-invalid":!!v||void 0,"data-testid":"crew-settings-first-prompt",value:a.firstPrompt,onChange:e=>{l({...a,firstPrompt:e.target.value})}})}),void 0===d?null:(0,t.jsx)(u,{id:x.squadron,label:"Squadron",isOptional:!0,hint:"The session starts with that squadron’s crew line and template.",error:b("squadron"),children:(0,t.jsx)(h,{id:x.squadron,items:{"":"None",...Object.fromEntries(d.map(e=>[e,e]))},value:a.squadron,isDisabled:m,testId:"crew-settings-squadron",onPick:e=>{l({...a,squadron:e})}})})]})}])},63481,e=>{"use strict";var t=e.i(43476),s=e.i(37750),i=e.i(71567),r=e.i(56420);let n={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"}]]};n.node;let a=(0,r.default)(n),l={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"}]]};l.node;let o=(0,r.default)(l),d={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"}]]};d.node;let c=(0,r.default)(d),u={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"}]]};u.node;let h=(0,r.default)(u),p={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"}]]};p.node;let m=(0,r.default)(p);var f=e.i(83035),g=e.i(94831),x=e.i(90063),y=e.i(66616),b=e.i(40798);let w={DEVICE:o,CLOUD:a,SERVER:m,OTHER:c},v={coding:f.SquareTerminal,chat:h,bot:i.Bot,console:s.AppWindow},j={md:"text-body",sm:"text-meta"};e.s(["LocationTag",0,function({kind:e,description:s=null,harness:i=null,isCompact:r=!1,size:n="md",className:a}){let l=(0,x.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",j[n],a);if(null===e)return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(g.Unplug,{"aria-hidden":!0}),"No session"]});let o=w[e],d=(0,b.locationKindWord)(e),c=null===s?d:`${d} \xb7 ${s}`;if(null!==i){let e=(0,y.harnessKind)(i),r=void 0===e?void 0:v[e],n=(0,y.harnessWord)(i);return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:null===s?`${n} \xb7 ${d}`:`${n} \xb7 ${d}: ${s}`,children:[void 0===r?null:(0,t.jsx)(r,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate text-foreground",children:n}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:d}),null===s?null:(0,t.jsxs)("span",{className:"sr-only",children:[": ",s]})]})}return r?(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:c,children:[(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"sr-only",children:[d,": "]}),(0,t.jsx)("span",{className:"truncate text-foreground",children:s??d})]}):(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[d,null===s?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,t.jsx)("span",{className:"sr-only",children:", "}),(0,t.jsx)("span",{className:"text-foreground",children:s})]})]})]})}],63481)},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),i=e.i(19002),r=e.i(11147),n=e.i(90063),a=e.i(49635),l=e.i(93361);let o={working:s.Activity,blocked:r.OctagonPause,idle:i.CirclePause},d={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:s,variant:i,isTimeInTitle:r=!1,testId:c}){let u="full"===i,h=(0,n.classNames)("flex min-w-0 items-center gap-1.5",u?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,n.classNames)(h,"text-muted-foreground"),children:"No report yet"});let p=o[e.state],m=d[l.REPORT_TONES[e.state]],f=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:r?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportText)(e),className:h,children:[(0,t.jsx)(p,{"aria-hidden":!0,className:(0,n.classNames)("size-(--size-icon-sm) shrink-0",m)}),(0,t.jsx)("span",{className:(0,n.classNames)("shrink-0 font-medium",m),children:l.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),r?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,a.fullDateTime)(f),className:"shrink-0 text-muted-foreground tabular-nums",children:u?`\xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportAge)(f,s)})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),s=e.i(71645),i=e.i(46150);let r={one:"delivery",many:"deliveries"};function n(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,i.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function a(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${n(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,i.counted)(e,r)} will be abandoned`},"inFlightLine",0,n,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,a,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,i.counted)(e,r)}`}],26808);var l=e.i(48695),o=e.i(15905),d=e.i(10818),c=e.i(25398),u=e.i(22212),h=e.i(94945),p=e.i(19321),m=e.i(66616),f=e.i(61966),g=e.i(60592);function x({crewLines:e,subject:i,testIdPrefix:r,onCopied:n,onCopyFailed:a}){let[l,o]=(0,s.useState)(e[0]?.harness),d=e.find(e=>e.harness===l)??e[0];if(!d)return null;let c=(0,m.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(g.Tabs,{value:d.harness,onValueChange:t=>{let s=e.find(e=>e.harness===t);s&&o(s.harness)},children:(0,t.jsx)(g.TabsList,{"aria-label":`Crew ${i} from`,children:e.map(e=>(0,t.jsx)(g.TabsTrigger,{value:e.harness,"data-testid":`${r}-${e.harness}-tab`,children:(0,m.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${r}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(f.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${i}`,isLabeled:!0,onCopied:n,onCopyFailed:a,"data-testid":`${r}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,x],82880);var y=e.i(17981),b=e.i(26091);function w({note:e,model:s,template:i,testId:r}){return null===e&&null===s?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(b.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===i?"":` \xb7 ${i}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":r,children:e}),null!==s&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:s})]})]})]})}function v({memberName:e,template:s,launchNote:i,model:r,crewLines:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{note:i,model:r,template:s,testId:"crew-line-launch-note"}),(0,t.jsx)(x,{crewLines:n,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function j({memberName:e,state:s,template:i,launchNote:r=null,model:n=null,crewLines:a,error:l,isOpen:d,onOpenChange:m,onConfirm:f}){let g="issuing"===s;return(0,t.jsx)(u.Dialog,{open:d,onOpenChange:e=>{g||m(e)},children:(0,t.jsxs)(u.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:h.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsxs)(u.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(u.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),g&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(p.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(p.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===s&&void 0!==a&&(0,t.jsx)(v,{memberName:e,template:i,launchNote:r,model:n,crewLines:a}),"error"===s&&(0,t.jsx)(y.InlineError,{title:"Couldn’t issue a crew line",description:`${l??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(u.DialogFooter,{children:[("shown"===s||g)&&(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary","data-testid":"crew-line-done",disabled:g}),children:"Done"}),"error"===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:f,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,w],3067),e.s(["CrewLineDialog",0,j],42211);var k=e.i(24010);function S({memberName:e,replacedText:s,isOpen:i,onOpenChange:r,onConfirm:n}){return(0,t.jsx)(k.AlertDialog,{open:i,onOpenChange:r,children:(0,t.jsxs)(k.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:h.dialogSurface.phoneSheet,children:[(0,t.jsxs)(k.AlertDialogHeader,{children:[(0,t.jsxs)(k.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(k.AlertDialogDescription,{children:s??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(k.AlertDialogFooter,{children:[(0,t.jsx)(k.AlertDialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:n,children:"Get new crew line"})]})]})})}function N(e){let i=(0,l.useNewCrewLine)(),[r,n]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(void 0),h=()=>{e&&i.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},p=i.data?"shown":i.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(i.reset(),u(a(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S,{memberName:e.member.name,replacedText:c,isOpen:o,onOpenChange:d,onConfirm:()=>{d(!1),n(!0),h()}}),(0,t.jsx)(j,{memberName:e.member.name,state:p,template:e.template,launchNote:i.data?.launchNote,model:i.data?.model,crewLines:i.data?.crewLines,error:i.error?.message,isOpen:r,onOpenChange:e=>{n(e),e||i.reset()},onConfirm:h})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:s,...i}){let r=N(i);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!r.isReady,"data-testid":s,onClick:r.start,children:"Get new crew line"}),r.dialog]})},"useNewCrewLineFlow",0,N],39874)},9176,e=>{"use strict";var t=e.i(86165),s=e.i(265);e.s(["usePluginShipIds",0,function(){let e=(0,t.useSquadronsSettings)(),i=(0,s.useTrierarchPluginSettings)();return new Set([e.data,i.data].flatMap(e=>{if(e?.configured!==!0)return[];let t=e.connection.ship?.shipId??e.connection.lastShipId;return null===t?[]:[t]}))}])},93361,e=>{"use strict";e.i(31627);var t=e.i(94661),s=e.i(49635);let i={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,i,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,t){let i=Math.max(0,t.getTime()-e.getTime());return i<6e4?`${String(Math.floor(i/1e3))} s`:i<36e5?`${String(Math.floor(i/6e4))} min`:i<864e5?`${String(Math.floor(i/36e5))} h`:(0,s.relativeTime)(e,t)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String((0,t.reportDetailsBytes)(e))} bytes`},"reportText",0,function(e){let t=i[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,t){let i=(0,s.relativeTime)(e,t);return`reported ${"Just now"===i?"just now":i}`}])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),s=e.i(19273),i=e.i(12598),r=e.i(81384),n=e.i(73664),a=e.i(27001),l=e.i(54440),o=e.i(71645),d=e.i(15823),c=e.i(40143),u=e.i(69230);function h(e,t){let s=new Set(t);return e.filter(e=>!s.has(e))}var p=class extends d.Subscribable{#e;#t;#s;#i;#r;#n;#a;#l;#o;#d=[];constructor(e,t,s){super(),this.#e=e,this.#i=s,this.#s=[],this.#r=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#r.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#s=e,this.#i=t,c.notifyManager.batch(()=>{let e=this.#r,t=this.#u(this.#s);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let i=t.map(e=>e.observer),r=i.map(e=>e.getCurrentResult()),n=e.length!==i.length,a=i.some((t,s)=>t!==e[s]),l=n||a,o=!!l||r.some((e,t)=>{let i=this.#t[t];return!i||!(0,s.shallowEqualObjects)(e,i)});(l||o)&&(l&&(this.#d=t,this.#r=i),this.#t=r,this.hasListeners()&&(l&&(h(e,i).forEach(e=>{e.destroy()}),h(i,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){let s=this.#u(e),i=s.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),r=s.map(e=>e.defaultedQueryOptions.queryHash);return[i,e=>this.#p(e??i,t,r),()=>this.#m(i,s)]}#m(e,t){let s=new Set;return t.map((i,r)=>{let n=e[r];return i.defaultedQueryOptions.notifyOnChangeProps?n:i.observer.trackResult(n,e=>{s.has(e)||(s.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#p(e,t,i){if(t){let r=this.#o,n=void 0!==i&&void 0!==r&&(r.length!==i.length||i.some((e,t)=>e!==r[t]));return(this.#t!==this.#l||n||t!==this.#a)&&(this.#a=t,this.#l=this.#t,void 0!==i&&(this.#o=i),this.#n=(0,s.replaceEqualDeep)(this.#n,t(e))),this.#n}return e}#f(){return!this.#i?.combine||this.#r.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#u(e){let t=new Map;this.#r.forEach(e=>{let s=e.options.queryHash;if(!s)return;let i=t.get(s);i?i.push(e):t.set(s,[e])});let s=[];return e.forEach(e=>{let i=this.#e.defaultQueryOptions(e),r=t.get(i.queryHash)?.shift()??new u.QueryObserver(this.#e,i);s.push({defaultedQueryOptions:i,observer:r})}),s}#c(e,t){let s=this.#r.indexOf(e);-1!==s&&(this.#t=this.#t.slice(),this.#t[s]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#n,s=e?t:this.#p(this.#m(this.#t,this.#d),this.#i?.combine);(e||t!==s)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},m=e.i(66027),f=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.message.queryOptions(void 0===e?s.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.ship.queryOptions(void 0===e?s.skipToken:{shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let d=(0,g.useTRPC)(),h=function({queries:e,...t}){let d=(0,i.useQueryClient)(void 0),h=(0,r.useIsRestoring)(),m=(0,n.useQueryErrorResetBoundary)(),f=!1!==t.subscribed,g=o.useMemo(()=>e.map(e=>{let t=d.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":f?"optimistic":void 0,t}),[e,d,h,f]);g.forEach(e=>{(0,l.ensureSuspenseTimers)(e);let t=d.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,m,t)}),(0,a.useClearResetErrorBoundary)(m);let[x]=o.useState(()=>new p(d,g,t)),[y,b,w]=x.getOptimisticResult(g,t.combine),v=!h&&f;o.useSyncExternalStore(o.useCallback(e=>v?x.subscribe(c.notifyManager.batchCalls(e)):s.noop,[x,v]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),o.useEffect(()=>{x.setQueries(g,t)},[g,t,x]);let j=y.some((e,t)=>(0,l.shouldSuspend)(g[t],e))?y.flatMap((e,t)=>{let s=g[t];if(s&&(0,l.shouldSuspend)(s,e)){let e=new u.QueryObserver(d,s);return(0,l.fetchOptimistic)(s,e,m)}return[]}):[];if(j.length>0)throw Promise.all(j);let k=y.find((e,t)=>{let s=g[t];return s&&(0,a.getHasError)({result:e,errorResetBoundary:m,throwOnError:s.throwOnError,query:d.getQueryCache().get(s.queryHash),suspense:s.suspense})});if(k)throw k.error;return b(w())}({queries:e.flatMap(e=>{let s=(0,t.idSchema)("ship").safeParse(e);return s.success?[s.data]:[]}).map(e=>d.fleet.ship.queryOptions({shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))}),m=new Map;for(let e of h)e.data&&m.set(e.data.id,e.data);return m}],53573)}]);
|