@usine/server 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -21
- package/README.md +54 -20
- package/dist/backend.d.ts +26 -5
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +41 -16
- package/dist/backend.js.map +1 -1
- package/dist/backup.d.ts +6 -3
- package/dist/backup.d.ts.map +1 -1
- package/dist/backup.js +26 -8
- package/dist/backup.js.map +1 -1
- package/dist/cli.d.ts +77 -11
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +280 -31
- package/dist/cli.js.map +1 -1
- package/dist/command.d.ts +22 -0
- package/dist/command.d.ts.map +1 -0
- package/dist/command.js +51 -0
- package/dist/command.js.map +1 -0
- package/dist/detach.d.ts +83 -0
- package/dist/detach.d.ts.map +1 -0
- package/dist/detach.js +320 -0
- package/dist/detach.js.map +1 -0
- package/dist/export-run.d.ts +1 -1
- package/dist/export-run.d.ts.map +1 -1
- package/dist/export-run.js +3 -3
- package/dist/export-run.js.map +1 -1
- package/dist/failure-message.d.ts +19 -0
- package/dist/failure-message.d.ts.map +1 -0
- package/dist/failure-message.js +127 -0
- package/dist/failure-message.js.map +1 -0
- package/dist/http.d.ts +14 -5
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +86 -33
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/instance/environment.d.ts +17 -0
- package/dist/instance/environment.d.ts.map +1 -0
- package/dist/instance/environment.js +51 -0
- package/dist/instance/environment.js.map +1 -0
- package/dist/instance/id.d.ts +17 -0
- package/dist/instance/id.d.ts.map +1 -0
- package/dist/instance/id.js +35 -0
- package/dist/instance/id.js.map +1 -0
- package/dist/instance/lock.d.ts +27 -0
- package/dist/instance/lock.d.ts.map +1 -0
- package/dist/instance/lock.js +127 -0
- package/dist/instance/lock.js.map +1 -0
- package/dist/instance/manifest.d.ts +52 -0
- package/dist/instance/manifest.d.ts.map +1 -0
- package/dist/instance/manifest.js +131 -0
- package/dist/instance/manifest.js.map +1 -0
- package/dist/instance/operator-api.d.ts +30 -0
- package/dist/instance/operator-api.d.ts.map +1 -0
- package/dist/instance/operator-api.js +47 -0
- package/dist/instance/operator-api.js.map +1 -0
- package/dist/instance/ports.d.ts +23 -0
- package/dist/instance/ports.d.ts.map +1 -0
- package/dist/instance/ports.js +81 -0
- package/dist/instance/ports.js.map +1 -0
- package/dist/instance/record.d.ts +82 -0
- package/dist/instance/record.d.ts.map +1 -0
- package/dist/instance/record.js +116 -0
- package/dist/instance/record.js.map +1 -0
- package/dist/instance/state.d.ts +45 -0
- package/dist/instance/state.d.ts.map +1 -0
- package/dist/instance/state.js +79 -0
- package/dist/instance/state.js.map +1 -0
- package/dist/instance/systemd.d.ts +36 -0
- package/dist/instance/systemd.d.ts.map +1 -0
- package/dist/instance/systemd.js +61 -0
- package/dist/instance/systemd.js.map +1 -0
- package/dist/logger.d.ts +3 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +27 -0
- package/dist/logger.js.map +1 -0
- package/dist/main.js +38 -18
- package/dist/main.js.map +1 -1
- package/dist/registry.d.ts +20 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +37 -0
- package/dist/registry.js.map +1 -0
- package/dist/reload-signal.d.ts +8 -0
- package/dist/reload-signal.d.ts.map +1 -0
- package/dist/reload-signal.js +21 -0
- package/dist/reload-signal.js.map +1 -0
- package/dist/restart.d.ts +19 -0
- package/dist/restart.d.ts.map +1 -0
- package/dist/restart.js +105 -0
- package/dist/restart.js.map +1 -0
- package/dist/shutdown.d.ts +5 -2
- package/dist/shutdown.d.ts.map +1 -1
- package/dist/shutdown.js +11 -5
- package/dist/shutdown.js.map +1 -1
- package/dist/status.d.ts +12 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +99 -0
- package/dist/status.js.map +1 -0
- package/dist/stop.d.ts +81 -0
- package/dist/stop.d.ts.map +1 -0
- package/dist/stop.js +195 -0
- package/dist/stop.js.map +1 -0
- package/dist/system-sleep.d.ts +9 -0
- package/dist/system-sleep.d.ts.map +1 -0
- package/dist/system-sleep.js +42 -0
- package/dist/system-sleep.js.map +1 -0
- package/dist/tracing.d.ts +22 -0
- package/dist/tracing.d.ts.map +1 -0
- package/dist/tracing.js +61 -0
- package/dist/tracing.js.map +1 -0
- package/dist/up.d.ts +2 -2
- package/dist/up.d.ts.map +1 -1
- package/dist/up.js +62 -24
- package/dist/up.js.map +1 -1
- package/dist/upgrade.d.ts +58 -0
- package/dist/upgrade.d.ts.map +1 -0
- package/dist/upgrade.js +237 -0
- package/dist/upgrade.js.map +1 -0
- package/dist/web/assets/CompositeItem-DU6IyNMY.js +1 -0
- package/dist/web/assets/ToolbarRootContext-Cytu6o2e.js +1 -0
- package/dist/web/assets/X.es-B7iqdxa_.js +1 -0
- package/dist/web/assets/_agent-BVKD5odk.js +1 -0
- package/dist/web/assets/_loop-BFLzamuo.js +1 -0
- package/dist/web/assets/_name-Bh4AQ9sR.js +6 -0
- package/dist/web/assets/_name-CMVsmWzq.js +1 -0
- package/dist/web/assets/_name-DCkgEma_.js +1 -0
- package/dist/web/assets/_name-Ds_pWi15.js +1 -0
- package/dist/web/assets/_number-B9aYwvcQ.js +1 -0
- package/dist/web/assets/_run-BZWt47QS.js +8 -0
- package/dist/web/assets/_worker-Dgfufm5p.js +1 -0
- package/dist/web/assets/action-rCd1FeAz.js +1 -0
- package/dist/web/assets/agents-Drbg6qpH.js +1 -0
- package/dist/web/assets/agents-_6-dEjrY.js +1 -0
- package/dist/web/assets/button-DVWXde__.js +1 -0
- package/dist/web/assets/collapsible-IOhZV1qg.js +1 -0
- package/dist/web/assets/core-wi-Hu_JV.js +12 -0
- package/dist/web/assets/drawer-BiqnR_8i.js +1 -0
- package/dist/web/assets/dropdown-menu-C9D1kRkO.js +1 -0
- package/dist/web/assets/edit-and-retry-BgOR6mvP.js +1 -0
- package/dist/web/assets/engine-javascript-D-6se_EF.js +141 -0
- package/dist/web/assets/error-alert-9tKpTE3v.js +1 -0
- package/dist/web/assets/file-error-SjG2jLJ9.js +1 -0
- package/dist/web/assets/fill-cell-ClM88KFD.js +1 -0
- package/dist/web/assets/heading-lX1a1LNN.js +1 -0
- package/dist/web/assets/index-BymNZU1Q.js +10 -0
- package/dist/web/assets/index-Dyjfp3ET.css +2 -0
- package/dist/web/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- package/dist/web/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- package/dist/web/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- package/dist/web/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- package/dist/web/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- package/dist/web/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- package/dist/web/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/web/assets/label-badge-aIGT1Bry.js +1 -0
- package/dist/web/assets/list-v8WJp2Eq.js +1 -0
- package/dist/web/assets/loops-BFoFf_og.js +1 -0
- package/dist/web/assets/mark-CC3RwMy_.js +1 -0
- package/dist/web/assets/markdown-BnyfnuCL.js +29 -0
- package/dist/web/assets/matchContext-BquevSJS.js +2 -0
- package/dist/web/assets/model-BerBT6R0.js +1 -0
- package/dist/web/assets/moves-Dg9sshX5.js +1 -0
- package/dist/web/assets/overview-C_tFKGZ8.js +1 -0
- package/dist/web/assets/page-DWnGi6wA.js +301 -0
- package/dist/web/assets/project-not-found-CodaBVdu.js +1 -0
- package/dist/web/assets/pull-request-marks-DE00nqGW.js +1 -0
- package/dist/web/assets/queries-B1SHA_r4.js +1 -0
- package/dist/web/assets/reload-Dsl0zjJ7.js +1 -0
- package/dist/web/assets/repositories-BdxmD192.js +1 -0
- package/dist/web/assets/repositories-D4wYJfa_.js +1 -0
- package/dist/web/assets/route-B_gphTYG.js +1 -0
- package/dist/web/assets/route-Cc7dKnn5.js +1 -0
- package/dist/web/assets/routes-BLy5TGH_.js +65 -0
- package/dist/web/assets/run-again-BTKagSXR.js +1 -0
- package/dist/web/assets/section-B3pWIIBa.js +1 -0
- package/dist/web/assets/section-CD-MB5r3.js +1 -0
- package/dist/web/assets/section-Id99HktI.js +1 -0
- package/dist/web/assets/settings-YrDysQXW.js +1 -0
- package/dist/web/assets/slots-BraHmbNr.js +1 -0
- package/dist/web/assets/status-badge-DnvNo1tG.js +1 -0
- package/dist/web/assets/strings-CW2XaR5f.js +1 -0
- package/dist/web/assets/table-BjyI4fVI.js +1 -0
- package/dist/web/assets/tasks-DCL8kLmD.js +1 -0
- package/dist/web/assets/transcript-sxRJzx6t.js +5 -0
- package/dist/web/assets/usage-CLQJdX9-.js +1 -0
- package/dist/web/assets/use-now-0P8TUXeg.js +1 -0
- package/dist/web/assets/useAnchoredPopupScrollLock-CQ83Wy-r.js +1 -0
- package/dist/web/assets/useNavigate-BW1WdocJ.js +1 -0
- package/dist/web/assets/usePositioner-rNCxnHO-.js +1 -0
- package/dist/web/assets/useTimeout-_TcdZXP6.js +1 -0
- package/dist/web/assets/with-selector-DoElmmtd.js +1 -0
- package/dist/web/assets/workers-BH5CBOR3.js +1 -0
- package/dist/web/index.html +16 -10
- package/package.json +17 -12
- package/dist/web/assets/_name-DdyMEUN6.js +0 -6
- package/dist/web/assets/_name-eoobiMh0.js +0 -1
- package/dist/web/assets/_name-pUxlKZt5.js +0 -1
- package/dist/web/assets/badge-t7m0Vk1K.js +0 -146
- package/dist/web/assets/button-BoOukj77.js +0 -1
- package/dist/web/assets/core-CLXRiB63.js +0 -12
- package/dist/web/assets/empty-DbVYU7bi.js +0 -1
- package/dist/web/assets/engine-javascript-h-x4hGa4.js +0 -141
- package/dist/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/web/assets/index-CVBBoW6r.css +0 -2
- package/dist/web/assets/index-CsW8KcJW.js +0 -10
- package/dist/web/assets/loops-DghpuoiG.js +0 -1
- package/dist/web/assets/operator-copy-DIsVXn17.js +0 -1
- package/dist/web/assets/overview-DmCIVPwN.js +0 -1
- package/dist/web/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/dist/web/assets/routes-BDyP7vCr.js +0 -1
- package/dist/web/assets/run-drawer-B-xhTXe4.js +0 -157
- package/dist/web/assets/status-badge-yblcElE0.js +0 -1
- package/dist/web/assets/table-B8cLYNvq.js +0 -1
- package/dist/web/assets/useCompositeItem-HmBmWxUW.js +0 -1
- package/dist/web/assets/with-selector-N6m4X0X_.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";import{Gt as t,Lt as n,Rt as r,l as i,m as a}from"./page-DWnGi6wA.js";import{D as o,G as s}from"./button-DVWXde__.js";import{o as c,r as l}from"./overview-C_tFKGZ8.js";var u=e(),d=({approval:e,className:s})=>{if(e===null)return null;let l=r(e.source),d=n(l,({approver:e})=>e);return(0,u.jsxs)(`span`,{className:o(`text-muted-foreground`,s),children:[(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:t(d,{onNone:()=>`Approved`,onSome:e=>`Approved by ${e}`})}),` · `,(0,u.jsx)(`time`,{dateTime:e.approvedAt,title:a(e.approvedAt),className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:i(e.approvedAt)}),t(l,{onNone:()=>null,onSome:({channel:e})=>(0,u.jsxs)(u.Fragment,{children:[` · `,(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:c[e]})]})})]})},f=({run:e,source:n,className:r})=>{if(e.runAgain===null)return null;let{from:c,requestedBy:d}=e.runAgain,f=c.slice(0,8);return(0,u.jsxs)(`span`,{className:o(`text-muted-foreground`,r),children:[(0,u.jsx)(`span`,{className:`whitespace-nowrap`,children:t(d,{onNone:()=>`Run again`,onSome:e=>`Run again by ${e}`})}),` · `,(0,u.jsx)(`time`,{dateTime:e.openedAt,title:a(e.openedAt),className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:i(e.openedAt)}),` · `,(0,u.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`from run`,` `,n===`link`?(0,u.jsx)(s,{to:`/projects/$owner/$name/runs/$run`,params:{...l(e.repository),run:c},className:`relative z-10 font-mono text-xs text-primary underline-offset-4 hover:underline`,children:f}):(0,u.jsx)(`span`,{className:`font-mono text-xs`,children:f})]})]})};export{d as n,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";import{n as t}from"./useNavigate-BW1WdocJ.js";import{D as n,G as r}from"./button-DVWXde__.js";import{r as i}from"./overview-C_tFKGZ8.js";import{o as a}from"./table-BjyI4fVI.js";var o=e(),s=({id:e,title:t,count:r,countTone:i=`muted`,note:a,actions:s,children:c})=>(0,o.jsxs)(`section`,{"aria-labelledby":e,className:`flex min-w-0 flex-col gap-2`,children:[(0,o.jsxs)(`header`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,o.jsx)(`h2`,{id:e,className:`text-lg font-semibold`,children:t}),r!==void 0&&r>0&&(0,o.jsx)(`span`,{className:n(`text-sm tabular-nums`,i===`needs-you`?`text-needs-you`:`text-muted-foreground`),children:r}),a!==void 0&&(0,o.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground tabular-nums`,children:a}),s!==void 0&&(0,o.jsx)(`div`,{className:n(`self-center`,a===void 0&&`ml-auto`),children:s})]}),c]}),c=({children:e})=>(0,o.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e}),l=({run:e,children:t})=>(0,o.jsx)(r,{to:`/projects/$owner/$name/runs/$run`,params:{...i(e.repository),run:e.id},onClick:e=>e.stopPropagation(),className:`block min-w-0 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,children:t}),u=({run:e,className:r,children:s})=>{let c=t();return(0,o.jsx)(a,{className:n(e===null?`hover:bg-transparent`:`cursor-pointer hover:bg-muted/60 has-[a:focus-visible]:bg-muted/60`,r),onClick:e===null?void 0:t=>{t.target instanceof Element&&t.target.closest(`a, button`)!==null||c({to:`/projects/$owner/$name/runs/$run`,params:{...i(e.repository),run:e.id}})},children:s})};export{u as i,c as n,l as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";var t=e(),n=`relative hover:bg-muted/60 has-[a[data-row-link]:focus-visible]:bg-muted/60`,r=`rounded-sm outline-none after:absolute after:inset-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,i=({id:e,title:n,count:r})=>(0,t.jsxs)(`h2`,{id:e,className:`flex items-baseline gap-2`,children:[(0,t.jsx)(`span`,{className:`text-lg font-semibold`,children:n}),(0,t.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:r})]}),a=({title:e,children:n})=>(0,t.jsxs)(`div`,{className:`flex max-w-prose flex-col gap-1 border-t py-3`,children:[(0,t.jsx)(`p`,{className:`font-medium`,children:e}),(0,t.jsx)(`p`,{className:`text-muted-foreground`,children:n})]});export{r as i,i as n,n as r,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";import{i as t,t as n}from"./page-DWnGi6wA.js";import{D as r}from"./button-DVWXde__.js";import{B as i,H as a,U as o,V as s,m as c,p as l}from"./index-BymNZU1Q.js";import{r as u}from"./status-badge-DnvNo1tG.js";import{o as d}from"./table-BjyI4fVI.js";var f=e(),p=({title:e,leading:r,counts:i,marks:a,file:o,actions:s,children:u})=>(0,f.jsxs)(n,{width:`full`,children:[(0,f.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-x-6 gap-y-3`,children:[(0,f.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,f.jsx)(t,{title:e,leading:r,counts:i,children:a}),o!==void 0&&(0,f.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:o})]}),(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,(0,f.jsx)(l,{})]})]}),(0,f.jsx)(c,{}),u]}),m=({facts:e,children:t})=>(0,f.jsxs)(`div`,{className:`grid gap-x-10 gap-y-8 pt-2 lg:grid-cols-[minmax(0,1fr)_21rem]`,children:[(0,f.jsx)(`div`,{className:`flex min-w-0 flex-col gap-8 max-lg:order-2`,children:t}),(0,f.jsx)(`aside`,{className:`min-w-0 max-lg:order-1 lg:border-l lg:pl-6`,children:e})]}),h=({title:e,aside:t,children:n})=>(0,f.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,f.jsxs)(`header`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,f.jsx)(`h2`,{className:`text-md font-semibold`,children:e}),t!==void 0&&(0,f.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t})]}),n]}),g=({children:e})=>(0,f.jsx)(`dl`,{className:`grid grid-cols-[6.5rem_minmax(0,1fr)] gap-x-3 gap-y-3 text-sm`,children:e}),_=({label:e,children:t})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,f.jsx)(`dd`,{className:`min-w-0 wrap-anywhere`,children:t})]}),v=({children:e})=>(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:e}),y=({entries:e,className:t})=>(0,f.jsx)(`dl`,{className:r(`grid grid-cols-[max-content_minmax(0,1fr)] gap-x-4 gap-y-1.5 rounded-lg bg-card px-3 py-2.5 font-mono text-xs [font-variant-ligatures:none] ring-1 ring-border`,t),children:e.map(([e,t])=>(0,f.jsxs)(`div`,{className:`contents`,children:[(0,f.jsxs)(`dt`,{className:`text-muted-foreground`,children:[e,`:`]}),(0,f.jsx)(`dd`,{className:`whitespace-pre-wrap text-foreground wrap-anywhere`,children:t})]},e))}),b=({open:e,children:t})=>(0,f.jsx)(d,{className:`cursor-pointer hover:bg-muted/60 has-[a:focus-visible]:bg-muted/60`,onClick:e,children:t}),x=`rounded-sm font-medium whitespace-nowrap outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,S=()=>(0,f.jsx)(u,{state:`Failed`,label:`Not loaded`}),C=({title:e,children:t})=>(0,f.jsx)(i,{className:`items-start p-0 py-6 text-left`,children:(0,f.jsxs)(a,{className:`items-start`,children:[(0,f.jsx)(o,{className:`text-md font-semibold tracking-normal`,children:e}),(0,f.jsx)(s,{className:`text-sm text-muted-foreground`,children:t})]})});export{g as a,S as c,x as d,_ as i,b as l,m as n,y as o,h as r,C as s,p as t,v as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";import{Xt as t}from"./page-DWnGi6wA.js";import{f as n}from"./index-BymNZU1Q.js";import{t as r}from"./section-Id99HktI.js";var i=e(),a=e=>(0,i.jsx)(`span`,{className:`text-muted-foreground`,children:e}),o=e=>(0,i.jsx)(`code`,{className:`font-mono text-xs`,children:e}),s=e=>[[`Polling`,[{key:`settings.poll_interval`,value:o(e.pollInterval),effect:`Seconds between the starts of two GitHub poll cycles.`}]],[`Attempts`,[{key:`settings.max_children`,value:o(e.maxChildren),effect:`Maximum child sessions per attempt. Starting one more fails the attempt.`},{key:`settings.max_attempt_minutes`,value:e.maxAttemptMinutes===null?a(`Not set`):o(e.maxAttemptMinutes),effect:e.maxAttemptMinutes===null?`No wall-clock ceiling.`:`Minutes an attempt may run before the runaway guard fails it.`},{key:`settings.max_attempt_tokens`,value:e.maxAttemptTokens===null?a(`Not set`):o(e.maxAttemptTokens),effect:e.maxAttemptTokens===null?`No token ceiling.`:`Tokens an attempt may use, parent and children combined, before the runaway guard fails it.`}]],[`Parent`,[{key:`settings.parent_model`,value:e.parentModel===null?a(`Not set`):o(e.parentModel),effect:e.parentModel===null?`Chosen by Pi unless the agent file sets parent_model.`:`Parent model when the agent file sets no parent_model.`},{key:`settings.parent_effort`,value:e.parentEffort===null?a(`Not set`):o(e.parentEffort),effect:e.parentEffort===null?`parent_effort from the agent file, or effort if it is not set.`:`Parent effort when the agent file sets no parent_effort.`}]],[`Operator`,[{key:`operator`,value:e.operator===null?a(`Not set`):o(e.operator),effect:e.operator===null?`Approvals from the UI record no approver; messages show as local operator.`:`The GitHub login recorded on approvals and messages from the UI, and the only login that can answer an ask on GitHub.`}]],[`Webhooks`,[{key:`webhooks.mode`,value:o(e.webhooks),effect:`Parsed and validated but not used: this version reads GitHub changes by polling only. A change applies after usine up restarts.`},...e.webhooksPublicUrl===null?[]:[{key:`webhooks.public_url`,value:o(e.webhooksPublicUrl),effect:`Where GitHub would deliver webhooks.`}]]],[`Tracing`,e.tracing===null?[{key:`tracing.otlp_url`,value:a(`Not set`),effect:`No span export. A change applies after usine up restarts.`}]:[{key:`tracing.otlp_url`,value:o(e.tracing.otlpUrl),effect:`Collector endpoint that receives every span as OTLP/HTTP protobuf. A change applies after usine up restarts.`},{key:`tracing.service_name`,value:o(e.tracing.serviceName),effect:`The service.name resource attribute of every exported span.`}]]],c=({configuration:e})=>(0,i.jsx)(r,{title:`Settings`,children:(0,i.jsx)(`div`,{className:`flex max-w-4xl flex-col gap-8 pt-2`,children:s(e.settings).map(([e,t])=>(0,i.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,i.jsx)(`h2`,{className:`text-md font-semibold`,children:e}),(0,i.jsx)(`dl`,{className:`border-t`,children:t.map(({key:e,value:t,effect:n})=>(0,i.jsxs)(`div`,{className:`grid gap-x-6 gap-y-1 border-b py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,i.jsx)(`dt`,{className:`font-mono text-xs leading-5 text-muted-foreground`,children:e}),(0,i.jsxs)(`dd`,{className:`flex flex-col gap-0.5 wrap-anywhere`,children:[(0,i.jsx)(`span`,{children:t}),(0,i.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n})]})]},e))})]},e))})}),l=()=>{let{data:e}=t(n());return(0,i.jsx)(c,{configuration:e})};export{l as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";import{D as t}from"./button-DVWXde__.js";var n=e(),r=({slots:e})=>(0,n.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex gap-1`,children:Array.from({length:Math.max(e.capacity,e.leased)},(r,i)=>(0,n.jsx)(`span`,{className:t(`size-2.5 rounded-xs ring-1 ring-inset`,i<e.leased?`bg-run-active ring-run-active`:`ring-input`)},i))});export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";import{D as t}from"./button-DVWXde__.js";var n=e(),r=e=>{switch(e){case`Succeeded`:case`clear`:case`live`:return`text-run-succeeded`;case`Running`:case`Pending`:case`Queued`:case`active`:return`text-run-active`;case`Waiting`:return`text-run-waiting`;case`needs-you`:return`text-needs-you`;case`Failed`:return`text-run-failed`;case`Canceled`:case`paused`:return`text-run-canceled`;default:return`text-muted-foreground`}},i=({state:e,className:i})=>(0,n.jsx)(`span`,{"data-slot":`state-mark`,"aria-hidden":`true`,className:t(`inline-block size-1.5 shrink-0 rounded-full bg-current`,r(e),e===`Running`&&`animate-pulse motion-reduce:animate-none`,i)}),a=({state:e,label:t=e})=>(0,n.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-foreground`,children:[(0,n.jsx)(i,{state:e}),t]}),o=()=>(0,n.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-needs-you`,children:[(0,n.jsx)(i,{state:`needs-you`}),`Needs attention`]});export{i as n,a as r,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,m as n}from"./page-DWnGi6wA.js";var r={hetzner:`Hetzner`,boat:`Boat`},i={hetzner:`server`,boat:`sandbox`},a=(t,n)=>`Creating a ${r[t.provider]} machine, started ${e(t.since,n)}`,o={capacity:`no capacity`,quota:`quota reached`,refused:`refused by the provider`,provider:`provider error`,unreachable:`unreachable`,timeout:`SSH timeout`},s=({reason:e})=>e===`check`?`Preflight failed on the first machine of the day`:`Machine creation failed: ${o[e]}`,c=(e,r)=>new Date(e).toDateString()===new Date(r).toDateString()?n(e).slice(11):t(e),l=({blocked:e,retryAt:t},n)=>`${e?`Next try`:`Pause ended`} at ${c(t,n)}`,u=({failures:e,failedAt:t},n)=>`${e===1?`Failed once`:`Failed ${e} times in a row`}, last at ${c(t,n)}`;export{r as a,l as i,u as n,i as o,a as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,E as t}from"./matchContext-BquevSJS.js";import{D as n}from"./button-DVWXde__.js";e();var r=t();function i({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,r.jsx)(`table`,{"data-slot":`table`,className:n(`w-full caption-bottom text-sm`,e),...t})})}function a({className:e,...t}){return(0,r.jsx)(`thead`,{"data-slot":`table-header`,className:n(`[&_tr]:border-b`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`tbody`,{"data-slot":`table-body`,className:n(`[&_tr:last-child]:border-0`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`tr`,{"data-slot":`table-row`,className:n(`border-b transition-colors hover:bg-muted/40 has-aria-expanded:bg-muted/40 data-[state=selected]:bg-muted`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`th`,{"data-slot":`table-head`,className:n(`h-9 px-2 text-left align-middle text-xs font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`td`,{"data-slot":`table-cell`,className:n(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}export{a,c as i,o as n,s as o,l as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t,E as n}from"./matchContext-BquevSJS.js";import{Jt as r,Xt as i,Y as a,_ as o,a as s,h as c,i as l,m as u,t as d,u as f}from"./page-DWnGi6wA.js";import{A as p,B as m,C as h,D as g,E as _,F as v,G as y,I as b,K as x,L as S,O as C,R as w,T,Tt as E,U as D,Yt as O,Zt as k,_n as A,hn as j,i as M,j as ee,k as te,mt as ne,nt as re,q as ie,t as ae,w as oe}from"./mark-CC3RwMy_.js";import{D as N,G as se,M as P,P as F,_ as ce,k as I}from"./button-DVWXde__.js";import{a as le}from"./useTimeout-_TcdZXP6.js";import{a as ue,c as de,i as fe,l as pe,n as me,o as he,r as ge,t as _e}from"./usePositioner-rNCxnHO-.js";import{n as ve,r as ye}from"./overview-C_tFKGZ8.js";import{J as be,n as xe}from"./index-BymNZU1Q.js";import{t as Se}from"./use-now-0P8TUXeg.js";import{t as Ce}from"./heading-lX1a1LNN.js";import{t as we}from"./pull-request-marks-DE00nqGW.js";import{n as L}from"./status-badge-DnvNo1tG.js";import{t as Te}from"./usage-CLQJdX9-.js";import{a as Ee,i as R,n as De,o as z,r as B,t as Oe}from"./table-BjyI4fVI.js";import{t as ke}from"./fill-cell-ClM88KFD.js";import{n as Ae}from"./section-B3pWIIBa.js";import{c as je,d as Me,g as Ne,h as Pe,i as Fe,l as Ie,m as Le,p as Re,r as ze,s as Be,u as Ve}from"./model-BerBT6R0.js";import{n as He,r as Ue,t as We}from"./queries-B1SHA_r4.js";import{t as Ge}from"./project-not-found-CodaBVdu.js";import{i as Ke,r as qe}from"./section-CD-MB5r3.js";function V(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Je(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function H(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Je(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:V(r,i,a,o)}}function U(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function W(e){return V(e.left,e.top,e.right,e.bottom)}function Ye(e,t,n){let{lines:r}=H(e.getClientRects());if(r.length<2)return;let i=U(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function Xe(e,t,n){let{lines:r,fallback:i}=H(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return W(r[n.lineIndex]);if(a!=null&&o!=null){let e=U(r,a,o);if(e!==-1)return W(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return V(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return V(l,f.top,u,p.bottom)}function Ze(e){return`contextElement`in e&&e.contextElement?e.contextElement:ce(e)?e:void 0}function Qe(e,t){function n(t){G(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function G(e,t,n,r){let i=Ye(t,n,r);return e.current=i,i}function $e(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=Ze(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=Xe(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var K=e(t(),1),q=K.createContext(void 0);function J(e){let t=K.useContext(q);if(t===void 0&&!e)throw Error(P(50));return t}var et={...oe,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},tt=class extends T{constructor(e,t,n){let r=new C;super(nt(e,r,t,n),rt(r),et)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;ee(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&G(n,t.trigger,r.clientX,r.clientY)}})}};function nt(e,t,n,r=!1){return{...h(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function rt(e){return{popupRef:K.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}var Y=n();function X(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=w((e,r)=>new tt({open:n,openProp:t,activeTriggerId:c,triggerIdProp:s},e,r));u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),m=u.useState(`mounted`),h=u.useState(`payload`);v(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:g}=b(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});I(()=>{d&&(f??u.set(`payload`,void 0))},[u,f,d]),K.useImperativeHandle(a,()=>({unmount:g,close:()=>u.setOpen(!1,E(ne))}),[g,u]);let _=d||m||o!=null;return(0,Y.jsxs)(q.Provider,{value:u,children:[o&&(0,Y.jsx)(p,{handle:o,store:u}),_&&(0,Y.jsx)(it,{store:u}),typeof l==`function`?l({payload:h}):l]})}function it({store:e}){let t=e.useState(`floatingRootContext`),n=D(t);return S(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}var at=_(function(e){return J(!0)?(0,Y.jsx)(X,{...e}):(0,Y.jsx)(x,{children:(0,Y.jsx)(X,{...e})})}),ot=K.createContext(void 0);function st(){let e=K.useContext(ot);if(e===void 0)throw Error(P(48));return e}var ct=K.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return J().useState(`mounted`)||n?(0,Y.jsx)(ot.Provider,{value:n,children:(0,Y.jsx)(be,{ref:t,...r})}):null}),lt=g(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...u}=e,d=J(!0),f=pe(c)??d;if(!f)throw Error(P(89));let p=j(o),h=f.useState(`isTriggerActive`,p),g=f.useState(`isOpenedByTrigger`,p),_=f.useState(`floatingRootContext`),v=f.context.inlineRectCoordsRef,y=K.useRef(null),b=i??600,x=a??300,{registerTrigger:S,isMountedByThisTrigger:C}=m(p,y,f,{payload:s,closeDelay:x}),w=ue(_,{mouseOnly:!0,move:!1,handleClose:fe(),delay:()=>({open:b,close:x}),triggerElementRef:y,isActiveTrigger:h,isClosing:()=>f.select(`transitionStatus`)===`ending`}),T=de(_,{delay:b}),E={open:g},D=f.useState(`triggerProps`,C),O=Qe(v,g);return F(`a`,e,{state:E,ref:[t,S,y],props:[w,T.reference,D,O,{id:p},u],stateAttributesMapping:k})}),ut=K.createContext(void 0);function dt(){let e=K.useContext(ut);if(e===void 0)throw Error(P(49));return e}var ft=K.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=re,style:g,..._}=e,v=J(),b=st(),x=ie(),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=v.useState(`adaptiveOrigin`),O=v.context.inlineRectCoordsRef,k=ge({anchor:i,floatingRootContext:w,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,nodeId:x,collisionAvoidance:h,adaptiveOrigin:D,inline:$e(O)}),A=k.update;I(()=>{S&&C&&A()},[S,C,A]);let j={open:S,side:k.side,align:k.align,anchorHidden:k.anchorHidden,instant:T},M=_e(e,j,{styles:k.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!C,inert:!S});return(0,Y.jsx)(ut.Provider,{value:k,children:(0,Y.jsx)(y,{id:x,children:M})})}),pt=K.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=J(),{side:s,align:c}=dt(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`closeDelay`);return le({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),he(p,{closeDelay:m}),F(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[te,f,me(d),a],stateAttributesMapping:O})});function mt({...e}){return(0,Y.jsx)(at,{"data-slot":`hover-card`,...e})}function ht({...e}){return(0,Y.jsx)(lt,{"data-slot":`hover-card-trigger`,...e})}function gt({className:e,side:t=`bottom`,sideOffset:n=4,align:r=`center`,alignOffset:i=4,...a}){return(0,Y.jsx)(ct,{"data-slot":`hover-card-portal`,children:(0,Y.jsx)(ft,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,Y.jsx)(pt,{"data-slot":`hover-card-content`,className:N(`z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-xs/relaxed text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var _t=`relative z-10 rounded-sm underline-offset-4 outline-none hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,vt=({usage:e,label:t,note:n,children:r})=>(0,Y.jsxs)(mt,{children:[(0,Y.jsx)(ht,{delay:200,"aria-label":t,render:(0,Y.jsx)(`button`,{type:`button`,className:_t}),children:r}),(0,Y.jsxs)(gt,{align:`end`,className:`w-[26rem] max-w-[calc(100vw-2rem)] p-3 font-sans text-xs shadow-raised`,children:[n!==null&&(0,Y.jsxs)(`p`,{className:`pb-2 text-muted-foreground`,children:[n,`.`]}),(0,Y.jsx)(Te,{pools:e.pools})]})]}),Z=`hidden @5xl:table-cell`,Q=`hidden @4xl:table-cell`,yt=`@md:w-max @md:max-w-(--side)`,bt=({reason:e})=>a(e,{AwaitingApproval:()=>`Waiting`,SuppressedForOperator:()=>`needs-you`,CycleBudgetUsedUp:()=>`needs-you`,RunFailed:()=>`Failed`,ClosedUnchanged:({run:e})=>e.state,LoopPaused:()=>`paused`,WaitingForStop:({run:e})=>e.state,QueuedForWorker:({run:e})=>e.state,AwaitingPoll:()=>`Pending`}),xt=({last:e,status:t},n)=>{let r=Fe(e),i=t=>({state:bt(t),words:`${e.loop!==t.loop&&!He(t)?`${t.loop} `:``}${Ue(t,n)}`,at:null});return a(t,{Running:({run:e})=>({state:`Running`,words:`Running ${e.loop}`,at:r}),AwaitingApproval:()=>({state:`Waiting`,words:`Waiting for approval`,at:r}),Queued:({run:e})=>({state:e.state,words:e.state,at:r}),Stalled:({stall:e})=>i(e),Idle:({stall:e})=>i(e),NeedsAttention:()=>({state:`needs-you`,words:`Needs attention`,at:r}),Done:()=>({state:`Done`,words:`Done`,at:r}),Ended:({run:e})=>({state:e.state,words:e.state,at:r})})},St=({row:e,now:t})=>{let{state:n,words:r,at:i}=xt(e,t);return(0,Y.jsxs)(`span`,{className:N(`flex items-start gap-1.5 text-xs/5 font-medium`,yt),children:[n===`Done`?(0,Y.jsx)(ae,{item:e.task,linked:!1,numbered:!1,className:`mt-0.75`}):(0,Y.jsx)(L,{state:n,className:`mt-1.75`}),(0,Y.jsxs)(`span`,{className:`min-w-0 wrap-break-word`,children:[r,i!==null&&(0,Y.jsxs)(Y.Fragment,{children:[` `,(0,Y.jsxs)(`span`,{className:`font-normal whitespace-nowrap text-muted-foreground`,children:[`·`,` `,(0,Y.jsx)(`time`,{dateTime:i,title:u(i),className:`font-mono tabular-nums`,children:s(i,t)})]})]})]})]})},Ct=()=>(0,Y.jsx)(`span`,{className:`absolute left-full text-muted-foreground`,children:`*`}),wt=({usage:e})=>{if(e.cost===null)return null;let t=ze(e),n=o(e.cost.usd);return(0,Y.jsxs)(vt,{usage:e,label:`Estimated cost: ${t?`at least `:``}${n}. Show per pool`,note:t?Pe:null,children:[n,t&&(0,Y.jsx)(Ct,{})]})},Tt=({task:e,now:t})=>{let{usage:n}=e;if(e.runs.every(({attempts:e})=>e.length===0))return null;let r=n.unmeasured>0;return(0,Y.jsxs)(`span`,{className:`relative`,title:r?Ne:`Total attempt time`,children:[f(je(n,t)),r&&(0,Y.jsx)(Ct,{})]})},Et=`py-3 align-top whitespace-normal`,$=`py-3 text-right align-top font-mono text-xs/5 whitespace-nowrap tabular-nums`,Dt=({task:e})=>{let t=Ie(e);return(0,Y.jsxs)(`span`,{className:N(`flex items-baseline gap-2`,yt),children:[(0,Y.jsx)(`span`,{className:`truncate`,title:t.map(({loop:e})=>e).join(` · `),children:t.map(({loop:e,state:t},n)=>(0,Y.jsxs)(K.Fragment,{children:[n>0&&(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:` · `}),(0,Y.jsx)(L,{state:t,className:`mr-1.5 align-middle`}),e,(0,Y.jsxs)(`span`,{className:`sr-only`,children:[` `,t]})]},e))}),(0,Y.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular-nums`,children:e.runs.length})]})},Ot=({row:e,repository:t,now:n})=>(0,Y.jsxs)(z,{className:qe,children:[(0,Y.jsx)(ke,{className:`py-3 align-top`,children:(0,Y.jsx)(se,{"data-row-link":!0,to:`/projects/$owner/$name/tasks/$number`,params:{...ye(t),number:Ve(e.task)},className:N(`block min-w-0`,Ke),children:(0,Y.jsx)(Ce,{variant:`row`,item:r(M(e.task).origin),title:e.task.title,linked:!1})})}),(0,Y.jsx)(B,{className:Et,children:(0,Y.jsx)(St,{row:e,now:n})}),(0,Y.jsx)(B,{className:N(`py-3 align-top`,Z),children:(0,Y.jsx)(Dt,{task:e.task})}),(0,Y.jsx)(B,{className:N(`py-3 text-right align-top`,Z),children:(0,Y.jsx)(we,{pullRequests:M(e.task).pullRequests,className:`relative z-10 justify-end`})}),(0,Y.jsx)(B,{className:$,children:(0,Y.jsx)(Tt,{task:e.task,now:n})}),(0,Y.jsx)(B,{className:N($,Q),children:e.task.usage.pools.length>0&&(0,Y.jsx)(vt,{usage:e.task.usage,label:`Tokens: ${c(e.task.usage.tokens)}. Show per pool`,note:null,children:c(e.task.usage.tokens)})}),(0,Y.jsx)(B,{className:N($,Q),children:(0,Y.jsx)(wt,{usage:e.task.usage})})]}),kt=({totals:e})=>(0,Y.jsx)(`p`,{className:`-mt-2 text-sm text-muted-foreground tabular-nums`,children:Le(e).map(({figure:e,words:t,lowerBound:n},r)=>(0,Y.jsxs)(K.Fragment,{children:[r>0&&`, `,n===null?e:(0,Y.jsx)(`span`,{title:n,children:`${e}*`}),` `,t]},t))}),At=[`@md:[--side:clamp(7rem,calc((100cqw-26rem-var(--rest))/var(--sides)),13rem)]`,`[--rest:7rem] [--sides:1] @4xl:[--rest:16.5rem] @5xl:[--rest:23rem] @5xl:[--sides:2]`].join(` `),jt=({project:e,stalled:t})=>{let n=Se(3e4),r=Me(e.board.lanes,t);return(0,Y.jsxs)(d,{width:`full`,children:[(0,Y.jsx)(l,{title:`Tasks`,counts:Be(r)}),r.length===0?(0,Y.jsx)(Ae,{children:`No runs yet`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(kt,{totals:Re(r,n)}),(0,Y.jsx)(`div`,{className:`@container -mx-2`,children:(0,Y.jsxs)(Oe,{"aria-label":`${e.repository} tasks`,className:At,children:[(0,Y.jsx)(Ee,{children:(0,Y.jsxs)(z,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(R,{children:`Task`}),(0,Y.jsx)(R,{children:`Status`}),(0,Y.jsx)(R,{className:Z,children:`Runs`}),(0,Y.jsx)(R,{className:N(`text-right`,Z),children:`Pull request`}),(0,Y.jsx)(R,{className:`text-right`,children:`Elapsed time`}),(0,Y.jsx)(R,{className:N(`text-right`,Q),children:`Tokens`}),(0,Y.jsx)(R,{className:N(`text-right`,Q),children:`Estimated cost`})]})}),(0,Y.jsx)(De,{children:r.map(t=>(0,Y.jsx)(Ot,{row:t,repository:e.repository,now:n},t.task.itemKey))})]})})]})]})},Mt=()=>{let{repository:e}=xe.useParams(),{data:t}=i(ve()),n=A(We()),r=t.projects.find(t=>t.repository===e);return r===void 0?(0,Y.jsx)(Ge,{}):(0,Y.jsx)(jt,{project:r,stalled:n.data?.notMoving??[]})};export{Mt as component};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{A as e,D as t,E as n}from"./matchContext-BquevSJS.js";import{$ as r,Bt as i,Ct as a,D as o,Ft as s,Gt as c,It as l,Jt as u,Kt as d,Lt as f,M as p,Mt as m,N as h,Rt as g,Tt as ee,Ut as te,Vt as ne,Wt as _,X as v,Y as y,Yt as re,_t as ie,at as ae,bn as oe,dt as b,et as se,it as ce,j as le,k as x,lt as ue,m as S,mt as C,n as w,nt as de,o as fe,ot as T,qt as E,r as pe,rt as me,s as D,st as O,u as he,xt as k,y as ge,zt as A}from"./page-DWnGi6wA.js";import{o as _e,t as ve}from"./error-alert-9tKpTE3v.js";import{_n as ye,i as be,o as xe,s as Se}from"./mark-CC3RwMy_.js";import{D as j,W as Ce,t as M}from"./button-DVWXde__.js";import{d as we,i as Te,n as Ee,r as De,t as Oe,u as ke}from"./dropdown-menu-C9D1kRkO.js";import{a as Ae,o as je}from"./strings-CW2XaR5f.js";import{c as Me,f as Ne,h as N,l as P,m as Pe,u as Fe,y as Ie}from"./overview-C_tFKGZ8.js";import{D as Le,O as Re,at as ze,k as Be,lt as Ve,st as He}from"./index-BymNZU1Q.js";import{t as F}from"./use-now-0P8TUXeg.js";import{t as Ue}from"./heading-lX1a1LNN.js";import{t as We}from"./pull-request-marks-DE00nqGW.js";import{n as I}from"./status-badge-DnvNo1tG.js";import{n as Ge}from"./usage-CLQJdX9-.js";import{t as Ke}from"./markdown-BnyfnuCL.js";var L=e(t(),1),qe=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M188,86.11V84c0-14.62-10.83-27.55-30.51-36.4C140.87,40.12,119,36,96,36S51.13,40.12,34.51,47.6C14.83,56.45,4,69.38,4,84v40c0,14.62,10.83,27.55,30.51,36.4A131.67,131.67,0,0,0,68,169.88V172c0,14.62,10.83,27.55,30.51,36.4C115.13,215.88,137,220,160,220s44.87-4.12,61.49-11.6C241.17,199.55,252,186.62,252,172V132C252,109.86,226.71,92.08,188,86.11ZM228,132c0,7.75-21.77,22.48-61.81,23.88C180.33,147.4,188,136.3,188,124V110.44C213.88,115.15,228,125.48,228,132ZM107.37,147.63c-3.63.24-7.42.37-11.37.37-5.08,0-9.89-.22-14.43-.61a10.94,10.94,0,0,0-1.14-.09c-1.51-.14-3-.3-4.43-.48V130.93A187,187,0,0,0,96,132a187,187,0,0,0,20-1.07v15.89c-2.49.3-5.07.56-7.75.75C108,147.58,107.66,147.6,107.37,147.63ZM164,117.14V124c0,4.78-8.28,12.21-24,17.54v-15a115.32,115.32,0,0,0,17.49-6.13Q160.93,118.86,164,117.14ZM96,60c44,0,68,15.85,68,24s-24,24-68,24S28,92.15,28,84,52,60,96,60ZM28,124v-6.86q3.08,1.71,6.51,3.26A115.32,115.32,0,0,0,52,126.53v15C36.28,136.21,28,128.78,28,124Zm64,48v0c1.33,0,2.66,0,4,0q5.44,0,10.77-.32,4.45,1.57,9.23,2.86v15C100.28,184.21,92,176.78,92,172Zm48,22.82V178.94A186.45,186.45,0,0,0,160,180a187,187,0,0,0,20-1.07v15.89a170.08,170.08,0,0,1-40,0Zm64-5.28v-15a115.32,115.32,0,0,0,17.49-6.13q3.44-1.54,6.51-3.26V172C228,176.78,219.72,184.21,204,189.54Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M240,132c0,19.88-35.82,36-80,36-19.6,0-37.56-3.17-51.47-8.44h0C146.76,156.85,176,142,176,124V96.72h0C212.52,100.06,240,114.58,240,132ZM176,84c0-19.88-35.82-36-80-36S16,64.12,16,84s35.82,36,80,36S176,103.88,176,84Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M184,89.57V84c0-25.08-37.83-44-88-44S8,58.92,8,84v40c0,20.89,26.25,37.49,64,42.46V172c0,25.08,37.83,44,88,44s88-18.92,88-44V132C248,111.3,222.58,94.68,184,89.57ZM232,132c0,13.22-30.79,28-72,28-3.73,0-7.43-.13-11.08-.37C170.49,151.77,184,139,184,124V105.74C213.87,110.19,232,122.27,232,132ZM72,150.25V126.46A183.74,183.74,0,0,0,96,128a183.74,183.74,0,0,0,24-1.54v23.79A163,163,0,0,1,96,152,163,163,0,0,1,72,150.25Zm96-40.32V124c0,8.39-12.41,17.4-32,22.87V123.5C148.91,120.37,159.84,115.71,168,109.93ZM96,56c41.21,0,72,14.78,72,28s-30.79,28-72,28S24,97.22,24,84,54.79,56,96,56ZM24,124V109.93c8.16,5.78,19.09,10.44,32,13.57v23.37C36.41,141.4,24,132.39,24,124Zm64,48v-4.17c2.63.1,5.29.17,8,.17,3.88,0,7.67-.13,11.39-.35A121.92,121.92,0,0,0,120,171.41v23.46C100.41,189.4,88,180.39,88,172Zm48,26.25V174.4a179.48,179.48,0,0,0,24,1.6,183.74,183.74,0,0,0,24-1.54v23.79a165.45,165.45,0,0,1-48,0Zm64-3.38V171.5c12.91-3.13,23.84-7.79,32-13.57V172C232,180.39,219.59,189.4,200,194.87Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M184,89.57V84c0-25.08-37.83-44-88-44S8,58.92,8,84v40c0,20.89,26.25,37.49,64,42.46V172c0,25.08,37.83,44,88,44s88-18.92,88-44V132C248,111.3,222.58,94.68,184,89.57ZM56,146.87C36.41,141.4,24,132.39,24,124V109.93c8.16,5.78,19.09,10.44,32,13.57Zm80-23.37c12.91-3.13,23.84-7.79,32-13.57V124c0,8.39-12.41,17.4-32,22.87Zm-16,71.37C100.41,189.4,88,180.39,88,172v-4.17c2.63.1,5.29.17,8,.17,3.88,0,7.67-.13,11.39-.35A121.92,121.92,0,0,0,120,171.41Zm0-44.62A163,163,0,0,1,96,152a163,163,0,0,1-24-1.75V126.46A183.74,183.74,0,0,0,96,128a183.74,183.74,0,0,0,24-1.54Zm64,48a165.45,165.45,0,0,1-48,0V174.4a179.48,179.48,0,0,0,24,1.6,183.74,183.74,0,0,0,24-1.54ZM232,172c0,8.39-12.41,17.4-32,22.87V171.5c12.91-3.13,23.84-7.79,32-13.57Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M224.56,103.81C213.43,97.75,198.47,93.39,182,91.34V84c0-12.12-9.58-23.1-27-30.93C139.16,45.93,118.2,42,96,42S52.84,45.93,37,53.07C19.58,60.9,10,71.88,10,84v40c0,12.12,9.58,23.1,27,30.93,10.49,4.72,23.21,8,37,9.73V172c0,12.12,9.58,23.1,27,30.93C116.84,210.07,137.8,214,160,214s43.16-3.93,59-11.07c17.39-7.83,27-18.81,27-30.93V132C246,121.35,238.39,111.34,224.56,103.81Zm-5.74,10.54C228.61,119.68,234,126,234,132c0,14.19-30.39,30-74,30a166.9,166.9,0,0,1-21.21-1.34A110.79,110.79,0,0,0,155,154.93c17.39-7.83,27-18.81,27-30.93V103.43C196.4,105.36,209.3,109.16,218.82,114.35ZM108.16,153.58c-3.92.27-8,.42-12.16.42-5.3,0-10.4-.24-15.28-.67a2.22,2.22,0,0,0-.37,0c-3.58-.33-7-.77-10.35-1.3V124.12A178,178,0,0,0,96,126a178,178,0,0,0,26-1.88V152c-4.34.69-8.91,1.22-13.69,1.56ZM170,105.89V124c0,9.54-13.75,19.8-36,25.51V121.85a115,115,0,0,0,21-6.92A66.2,66.2,0,0,0,170,105.89ZM96,54c43.61,0,74,15.81,74,30s-30.39,30-74,30S22,98.19,22,84,52.39,54,96,54ZM22,124V105.89a66.2,66.2,0,0,0,15,9,115,115,0,0,0,21,6.92v27.66C35.75,143.8,22,133.54,22,124Zm64,48v-6.28c3.3.18,6.63.28,10,.28q5.91,0,11.66-.37A123.17,123.17,0,0,0,122,169.84v27.67C99.75,191.8,86,181.54,86,172Zm48,28V172.1a177.84,177.84,0,0,0,26,1.9,178,178,0,0,0,26-1.88V200a170,170,0,0,1-52,0Zm64-2.49V169.85a115,115,0,0,0,21-6.92,66.2,66.2,0,0,0,15-9V172C234,181.54,220.25,191.8,198,197.51Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M184,89.57V84c0-25.08-37.83-44-88-44S8,58.92,8,84v40c0,20.89,26.25,37.49,64,42.46V172c0,25.08,37.83,44,88,44s88-18.92,88-44V132C248,111.3,222.58,94.68,184,89.57ZM232,132c0,13.22-30.79,28-72,28-3.73,0-7.43-.13-11.08-.37C170.49,151.77,184,139,184,124V105.74C213.87,110.19,232,122.27,232,132ZM72,150.25V126.46A183.74,183.74,0,0,0,96,128a183.74,183.74,0,0,0,24-1.54v23.79A163,163,0,0,1,96,152,163,163,0,0,1,72,150.25Zm96-40.32V124c0,8.39-12.41,17.4-32,22.87V123.5C148.91,120.37,159.84,115.71,168,109.93ZM96,56c41.21,0,72,14.78,72,28s-30.79,28-72,28S24,97.22,24,84,54.79,56,96,56ZM24,124V109.93c8.16,5.78,19.09,10.44,32,13.57v23.37C36.41,141.4,24,132.39,24,124Zm64,48v-4.17c2.63.1,5.29.17,8,.17,3.88,0,7.67-.13,11.39-.35A121.92,121.92,0,0,0,120,171.41v23.46C100.41,189.4,88,180.39,88,172Zm48,26.25V174.4a179.48,179.48,0,0,0,24,1.6,183.74,183.74,0,0,0,24-1.54v23.79a165.45,165.45,0,0,1-48,0Zm64-3.38V171.5c12.91-3.13,23.84-7.79,32-13.57V172C232,180.39,219.59,189.4,200,194.87Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M180,93.11V84c0-22.43-36.9-40-84-40S12,61.57,12,84v40c0,19.14,26.86,34.72,64,38.89V172c0,22.43,36.9,40,84,40s84-17.57,84-40V132C244,113.12,217.87,97.37,180,93.11ZM236,132c0,15.45-30.54,32-76,32a165.71,165.71,0,0,1-28-2.34v-1.39c28.61-6.31,48-20,48-36.27V101.17C212.22,105,236,117.93,236,132ZM108.19,155.59Q102.3,156,96,156c-5.47,0-10.72-.25-15.73-.69l-.27,0h0c-4.16-.38-8.16-.9-12-1.56V121.8A174.87,174.87,0,0,0,96,124a174.87,174.87,0,0,0,28-2.2v31.92a155,155,0,0,1-15.52,1.85ZM172,101.32V124c0,10.88-15.16,22.3-40,28.11V120.27C149.63,116.38,163.75,109.69,172,101.32ZM96,52c45.46,0,76,16.55,76,32s-30.54,32-76,32S20,99.45,20,84,50.54,52,96,52ZM20,124V101.32c8.25,8.37,22.37,15.06,40,19v31.84C35.16,146.3,20,134.88,20,124Zm64,48v-8.4c3.91.26,7.92.4,12,.4s8.06-.14,12-.39a123.93,123.93,0,0,0,16,4.63v31.87C99.16,194.3,84,182.88,84,172Zm48,29.72V169.77A174.48,174.48,0,0,0,160,172a174.87,174.87,0,0,0,28-2.2v31.92a173.07,173.07,0,0,1-56,0ZM236,172c0,10.88-15.16,22.3-40,28.11V168.27c17.63-3.89,31.75-10.58,40-19Z`}))]]),Je=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,44a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,44Zm0,168a72,72,0,1,1,72-72A72.08,72.08,0,0,1,128,212ZM164.49,99.51a12,12,0,0,1,0,17l-28,28a12,12,0,0,1-17-17l28-28A12,12,0,0,1,164.49,99.51ZM92,16A12,12,0,0,1,104,4h48a12,12,0,0,1,0,24H104A12,12,0,0,1,92,16Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216,136a88,88,0,1,1-88-88A88,88,0,0,1,216,136Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M128,40a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,40Zm0,176a80,80,0,1,1,80-80A80.09,80.09,0,0,1,128,216ZM173.66,90.34a8,8,0,0,1,0,11.32l-40,40a8,8,0,0,1-11.32-11.32l40-40A8,8,0,0,1,173.66,90.34ZM96,16a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,16Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,40a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,40Zm45.66,61.66-40,40a8,8,0,0,1-11.32-11.32l40-40a8,8,0,0,1,11.32,11.32ZM96,16a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,16Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,42a94,94,0,1,0,94,94A94.11,94.11,0,0,0,128,42Zm0,176a82,82,0,1,1,82-82A82.1,82.1,0,0,1,128,218ZM172.24,91.76a6,6,0,0,1,0,8.48l-40,40a6,6,0,1,1-8.48-8.48l40-40A6,6,0,0,1,172.24,91.76ZM98,16a6,6,0,0,1,6-6h48a6,6,0,0,1,0,12H104A6,6,0,0,1,98,16Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,40a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,40Zm0,176a80,80,0,1,1,80-80A80.09,80.09,0,0,1,128,216ZM173.66,90.34a8,8,0,0,1,0,11.32l-40,40a8,8,0,0,1-11.32-11.32l40-40A8,8,0,0,1,173.66,90.34ZM96,16a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,16Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,44a92,92,0,1,0,92,92A92.1,92.1,0,0,0,128,44Zm0,176a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,220ZM170.83,93.17a4,4,0,0,1,0,5.66l-40,40a4,4,0,1,1-5.66-5.66l40-40A4,4,0,0,1,170.83,93.17ZM100,16a4,4,0,0,1,4-4h48a4,4,0,0,1,0,8H104A4,4,0,0,1,100,16Z`}))]]),Ye=L.forwardRef((e,t)=>L.createElement(Ce,{ref:t,...e,weights:qe}));Ye.displayName=`CoinsIcon`;var Xe=L.forwardRef((e,t)=>L.createElement(Ce,{ref:t,...e,weights:Je}));Xe.displayName=`TimerIcon`;var Ze=O({number:ce,title:T,url:T,state:T,body:k(me(T)),author:k(me(O({login:T}))),labels:k(O({nodes:v(O({name:T}))}))}),Qe=ue(o),$e=b(Ze),R=e=>_($e(e),e=>({kind:e.url.includes(`/pull/`)?`Pull request`:`Issue`,number:e.number,title:e.title,url:e.url,state:e.state.charAt(0)+e.state.slice(1).toLowerCase(),author:g(e.author?.login),labels:e.labels?.nodes.map(({name:e})=>e)??[],body:l(g(e.body),e=>e.trim()!==``)})),et=new Map([[`Issue Open`,`issue-open`],[`Issue Closed`,`issue-closed`],[`Pull request Open`,`pr-open`],[`Pull request Closed`,`pr-closed`],[`Pull request Merged`,`pr-merged`]]),tt=({kind:e,number:t,url:n,state:r})=>({kind:e===`Pull request`?`pr`:`issue`,number:t,url:n,state:et.get(`${e} ${r}`)??null}),nt=(e,t,n)=>_(Qe(e.itemKey),([,r,i])=>{let a=ne(f(Se(t,e.itemKey),({items:t})=>g(t.find(({itemKey:t})=>t===e.itemKey)))),o=ne(l(n===void 0?d():R(n),e=>e.number===i));return{number:i,url:a?.url??o?.url??`https://github.com/${r}/issues/${i}`,title:g(a?.title??o?.title),pullRequest:a===void 0?o?.kind===`Pull request`:a.kind===`pr`}}),rt=(e,t)=>c(R(t),{onNone:()=>`Opened by ${e}`,onSome:({kind:t,number:n,state:r,labels:i})=>`${e} matched ${t.toLowerCase()} #${n}: ${r.toLowerCase()}${i.length===0?``:`, labeled ${i.join(`, `)}`}`}),it=(e,t,n,r)=>{let i=_(n,be),a=c(n,{onNone:()=>[],onSome:({items:e})=>e}),o=f(g(e.pullRequestUrl),e=>xe(e,a)),d=_(t,({number:e,url:t,pullRequest:n})=>a.find(t=>t.number===e)??{kind:r===null?n||s(o,t=>t.number===e)?`pr`:`issue`:r.startsWith(`pr-`)?`pr`:`issue`,number:e,url:t,state:r}),p=c(i,{onNone:()=>d,onSome:({origin:e})=>u(e)});return{heading:p,title:_(i,({origin:e})=>e.title),pullRequest:l(E(o,()=>l(d,({kind:e})=>e===`pr`)),e=>!s(p,({number:t})=>t===e.number))}},z=n(),at=(e,t)=>A(f(t,({title:e})=>e),()=>`${e.loop} on ${e.repository}`),ot=({endedMillis:e,since:t})=>{let n=F(1e3);return(0,z.jsx)(z.Fragment,{children:he(e+Math.max(0,n-Date.parse(t)))})},st=({duration:e})=>(0,z.jsxs)(`span`,{title:e.unmeasured===0?`Total attempt time`:`${e.unmeasured} ${e.unmeasured===1?`attempt`:`attempts`} not counted: no recorded end time`,className:`font-mono text-xs tabular-nums`,children:[e.unmeasured>0&&`at least `,e.runningSince===null?he(e.endedMillis):(0,z.jsx)(ot,{endedMillis:e.endedMillis,since:e.runningSince})]}),ct=({detail:e})=>{let{machine:t,run:n}=e;return t===null||t.state!==`ready`||t.id===null||t.attemptId===null||t.attemptId!==n.attempts.at(-1)?.id?null:(0,z.jsx)(`span`,{className:`font-mono text-xs`,title:`${Ae[t.provider]} ${je[t.provider]} ${t.id}`,children:t.id})},lt=({detail:e,overview:t,placement:n,shared:r,actions:i,as:a,className:o})=>{let{run:s}=e,c=nt(s,t,e.eventPayload),l=it(s,c,Se(t,s.itemKey),e.settledItemState);return(0,z.jsx)(pe,{actionsBeside:n===`page`?`lg`:`never`,...o===void 0?{}:{className:o},eyebrow:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(w,{icon:Ve,title:`Loop`,children:s.loop}),(0,z.jsx)(w,{icon:ze,title:`Agent`,children:s.agent})]}),heading:(0,z.jsx)(Ue,{variant:`page`,item:l.heading,title:A(l.title,()=>at(s,c)),...a===void 0?{}:{as:a},...r?{style:{viewTransitionName:`run-title`}}:{}}),facts:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-2 font-medium text-foreground`,style:r?{viewTransitionName:`run-state`}:void 0,children:[(0,z.jsx)(I,{state:s.state}),Ie(s,e.unconfirmedStop,e.machine)]}),(0,z.jsx)(We,{pullRequests:re(l.pullRequest)}),e.worker!==null&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(w,{icon:Xe,children:(0,z.jsx)(st,{duration:e.duration})}),n===`page`&&e.usage.sessions.length>0&&(0,z.jsx)(w,{icon:Ye,children:(0,z.jsx)(Ge,{usage:e.usage,attempts:s.attempts})}),(0,z.jsxs)(w,{icon:He,title:`Worker`,children:[e.worker,(0,z.jsx)(ct,{detail:e})]})]}),s.loopPaused&&(0,z.jsx)(`span`,{children:`Loop paused`})]}),actions:i})},ut=e=>y(e,{Approve:()=>N.approve,Retry:()=>N.retry,EditRetry:()=>`Edit and retry`,RunAgain:()=>N.runAgain,EditRunAgain:()=>`Edit and run again`,Resolve:({question:e})=>e?`Mark answered`:`Mark resolved`,Cancel:()=>N.cancel}),dt=e=>{let t=e.attempts.at(-1),n=t?.outcome?._tag===`Failed`?t.outcome.failure._tag:null,r=[...e.canApprove?[{_tag:`Approve`}]:[],...e.canRetry?[{_tag:`Retry`},{_tag:`EditRetry`}]:[],...e.canRunAgain?[{_tag:`RunAgain`},{_tag:`EditRunAgain`}]:[],...e.canResolveFailure&&t!==void 0?[{_tag:`Resolve`,attemptId:t.id,question:n===`QuestionFailure`}]:[],...e.canCancel?[{_tag:`Cancel`}]:[]],i=e=>e.flatMap(e=>r.filter(t=>t._tag===e)),a=(()=>{if(e.canApprove){let[e=null]=i([`Approve`]);return{primary:e,secondary:null,more:i([`Cancel`])}}if(e.state===`Failed`){let t=e.canResolveFailure&&(n===`QuestionFailure`||n===`BlockedFailure`),[r=null,a=null,...o]=i(t?[`Resolve`,`EditRetry`,`Retry`]:[`Retry`,`EditRetry`,`Resolve`]);return{primary:r,secondary:a,more:o}}let[t=null,...r]=i(e.canRunAgain?[`RunAgain`,`EditRunAgain`]:[`Cancel`]);return{primary:null,secondary:t,more:r}})(),o=new Set([a.primary,a.secondary,...a.more]);return{...a,more:[...a.more,...r.filter(e=>!o.has(e))]}},ft=({detail:e,onEdit:t,openRun:n,className:r})=>{let{run:i,agentDefinitionChanged:a}=e,o=(0,L.useId)(),s=Re(),c=Be(),[l,u]=(0,L.useState)(!1),d=s.isPending||c.isPending,f=e=>s.mutate({runId:i.id,request:e},{onSuccess:()=>u(!1)}),p=e=>y(e,{Approve:()=>f({action:`approve`}),Retry:()=>f({action:`retry`}),EditRetry:()=>t(`retry`),RunAgain:()=>c.mutate(Le(i),{onSuccess:e=>{e._tag===`Claimed`&&n(e.runId)}}),EditRunAgain:()=>t(`runAgain`),Resolve:({attemptId:e})=>f({action:`resolveFailure`,attemptId:e}),Cancel:()=>u(!0)}),{primary:m,secondary:h,more:g}=dt(i);return m===null&&h===null&&g.length===0?null:(0,z.jsxs)(`div`,{className:j(`max-w-sm space-y-2`,r),children:[(0,z.jsx)(`div`,{role:`group`,"aria-label":`Run actions`,className:`flex flex-wrap items-center gap-2`,children:l?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(M,{variant:`destructive`,disabled:d,onClick:()=>f({action:`cancel`}),children:N.confirmCancel}),(0,z.jsx)(M,{variant:`ghost`,disabled:d,onClick:()=>u(!1),children:N.keepRunning})]}):(0,z.jsxs)(z.Fragment,{children:[m!==null&&(0,z.jsx)(M,{disabled:d,"aria-describedby":m._tag===`Retry`?o:void 0,onClick:()=>p(m),children:ut(m)}),h!==null&&(0,z.jsx)(M,{variant:h._tag===`Cancel`?`ghost`:`outline`,disabled:d,"aria-describedby":h._tag===`Retry`?o:void 0,onClick:()=>p(h),children:ut(h)}),g.length>0&&(0,z.jsxs)(Oe,{children:[(0,z.jsx)(ke,{disabled:d,render:(0,z.jsx)(M,{variant:`ghost`,size:`icon`,className:`text-muted-foreground hover:text-foreground aria-expanded:text-foreground`}),"aria-label":`More actions`,children:(0,z.jsx)(we,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,z.jsx)(Ee,{align:`end`,className:`w-auto min-w-44`,children:(0,z.jsx)(De,{children:g.map(e=>(0,z.jsx)(Te,{"aria-describedby":e._tag===`Retry`?o:void 0,variant:e._tag===`Cancel`?`destructive`:`default`,onClick:()=>p(e),children:ut(e)},e._tag))})})]})]})}),i.canRetry&&(0,z.jsxs)(`div`,{className:`space-y-1 text-xs wrap-anywhere text-muted-foreground`,children:[(0,z.jsx)(`p`,{id:o,children:Pe(i.agentBrain)}),a&&(0,z.jsxs)(`p`,{children:[`The loaded definition of `,i.agent,` has changed. Edit and retry uses the current definition.`]})]}),c.data?._tag===`CycleBlocked`&&(0,z.jsx)(`p`,{role:`status`,className:`text-xs text-needs-you`,children:`No run opened: cycle budget used up. Reset it in Needs attention`}),s.isError&&(0,z.jsx)(ve,{message:s.error.message}),c.isError&&(0,z.jsx)(ve,{message:c.error.message})]})},pt=(e,t,n)=>{let r=new Set(e.map(({sequence:e})=>e)),i=[...new Map([...t,...e].map(e=>[e.sequence,e])).values()].sort((e,t)=>e.sequence-t.sequence),a=new Map,o=new Map,s=(e,t)=>JSON.stringify([e,t]);for(let e of i){let t=e.payload;if(t._tag!==`SessionEvent`)continue;let i=t.event;if(i._tag===`PoolRateLimitsUpdated`||i._tag===`SessionTokensUpdated`)continue;let c=s(e.attemptId,i.session.id),l=a.get(c);l===void 0&&(l={attemptId:e.attemptId,session:i.session,first:e,harnessSession:d(),latestSequence:e.sequence,status:n.has(e.attemptId)?`Stopped`:`Live`,held:!1,paused:!1,idle:!1,events:[],interventions:[]},a.set(c,l),i.session._tag===`ParentSession`&&o.set(e.attemptId,l)),l.latestSequence=e.sequence,i._tag===`SessionStarted`&&(l.harnessSession=i.harnessSession),i._tag===`SessionFinished`&&(l.status=`Finished`),i._tag===`SessionIdle`&&(l.idle=!0),i._tag===`SessionResumed`&&(l.idle=!1),r.has(e.sequence)&&l.events.push({sequence:e.sequence,receivedAt:e.receivedAt,event:i})}let c=[],l=(e,t)=>JSON.stringify([e,t.inputSequence]),u=new Map;for(let{attemptId:e,payload:t}of i)(t._tag===`InterventionApplied`||t._tag===`InterventionRejected`)&&u.set(l(e,t),t);let f=new Set;for(let e of i){let t=e.payload;if(t._tag!==`InterventionApplied`&&t._tag!==`InterventionRejected`)continue;let n=l(e.attemptId,t),i={...e,payload:u.get(n)??t},d=t.intervention.target,p=d._tag===`Parent`?o.get(e.attemptId):a.get(s(e.attemptId,d.sessionId)),m=r.has(e.sequence)&&!f.has(n);m&&f.add(n),p===void 0?m&&c.push(i):(e.sequence>p.latestSequence&&(p.latestSequence=e.sequence),t._tag===`InterventionApplied`&&(p.held=t.state.held,p.paused=t.state.paused),m&&p.interventions.push(i))}return{groups:a,unmatched:c}},mt=e=>({key:`event:${e.sequence}`,attemptId:e.attemptId,sequence:e.sequence,latestSequence:e.sequence,receivedAt:e.receivedAt}),B=(e,t,n)=>({_tag:`Notice`,...mt(e),...t,origin:n,queued:null}),V=e=>`${e} ${e===1?`retry`:`retries`}`,ht=(e,t)=>{let n=[],r=new Map;for(let i of e.events){let a=i.event,o={...i,attemptId:e.attemptId};if(a._tag===`ToolStarted`||a._tag===`ToolFinished`){let n=JSON.stringify([e.attemptId,e.session.id,a.callId]),s=r.get(n),c=s?.start??d();r.set(n,{_tag:`Tool`,...mt(o),key:n,sequence:s?.sequence??i.sequence,receivedAt:s?.receivedAt??i.receivedAt,name:a.tool,start:a._tag===`ToolStarted`?u({receivedAt:i.receivedAt,input:a.input}):c,state:a._tag===`ToolFinished`?{_tag:a.isError?`Error`:`Finished`,receivedAt:i.receivedAt,output:a.output}:s?.state??{_tag:t===`Live`?`Running`:`Stopped`}});continue}if(a._tag===`ProviderRetrying`||a._tag===`ProviderRecovered`){n.push(B(o,a._tag===`ProviderRetrying`?{kind:`status`,label:`${e.session.agent}: provider unreachable`,detail:a.message,format:`plain`,tone:`warning`}:{kind:`status`,label:`${e.session.agent}: provider reachable again`,detail:`After ${V(a.retries)}`,format:`plain`,tone:`plain`},{_tag:`Provider`,session:e.session,event:a}));continue}let s=y(a,{TextOutput:({text:t})=>({kind:`message`,label:e.session.agent,detail:t,format:`markdown`,tone:`plain`}),SessionStarted:()=>({kind:`status`,label:`${e.session.agent} started`,detail:fe(e.session.brain),format:`plain`,tone:`plain`}),SessionIdle:()=>({kind:`status`,label:`${e.session.agent} idle`,detail:`Session open for operator input`,format:`plain`,tone:`plain`}),SessionResumed:()=>({kind:`status`,label:`${e.session.agent} resumed`,detail:``,format:`plain`,tone:`plain`}),SessionFinished:()=>({kind:`status`,label:`${e.session.agent} finished`,detail:``,format:`plain`,tone:`plain`})});n.push(B(o,s,{_tag:`Session`,session:e.session,event:a._tag}))}return[...n,...r.values()].sort((e,t)=>e.sequence-t.sequence)},gt=e=>{let{action:t,operator:n,target:r}=e.payload.intervention,i=e.payload._tag===`InterventionRejected`,a=t._tag===`OperatorMessage`||t._tag===`Steer`,o=e.payload._tag===`InterventionApplied`&&e.payload.state.queued?r._tag===`Parent`?`parent`:`child`:null,s=`${n} released the ${r._tag===`Parent`?`parent`:`child`}`;return{...B(e,{kind:a?`message`:`status`,label:i?`${n} · not delivered`:a?n:t._tag===`Release`?s:`${n} paused the session`,detail:i?`${a?`${t.message}\n\n`:``}${e.payload.message}`:a?t.message:``,format:a?`markdown`:`plain`,tone:i?`failed`:`plain`},{_tag:`Operator`,operator:n}),queued:o}},_t=(e,t,n=[])=>{let r=new Set(t.filter(({outcome:e})=>e!==null).map(({id:e})=>e));for(let{attemptId:t,payload:n}of e)(n._tag===`Final`||n._tag===`Failed`||n._tag===`Interrupted`)&&r.add(t);let{groups:i,unmatched:o}=pt(e,n,r),s=[];for(let t of[...e].sort((e,t)=>e.sequence-t.sequence)){let e=t.payload;e._tag!==`InterventionApplied`&&e._tag!==`InterventionRejected`&&(t.direction!==`inbound`||t.operator===void 0||e._tag===`Cancel`)&&e._tag!==`SessionEvent`&&s.push(B(t,y(e,{Started:({parentModel:e,conflictingSalvage:t})=>({kind:`status`,label:`Attempt started`,detail:c(t,{onNone:()=>e,onSome:t=>`${e}. ${Me(t)}`}),format:`plain`,tone:`plain`}),Final:({result:e})=>({kind:`status`,label:`Attempt finished`,detail:e.message,format:`markdown`,tone:`plain`}),Failed:({failure:e})=>({kind:`status`,label:`Attempt failed`,detail:P(e),format:`plain`,tone:`failed`}),Cancel:()=>({kind:`status`,label:`Cancel requested`,detail:`Attempt stopping`,format:`plain`,tone:`plain`}),Interrupted:()=>({kind:`status`,label:`Interrupted`,detail:`Acknowledged by the parent session`,format:`plain`,tone:`plain`}),Steer:({message:e})=>({kind:`message`,label:`Operator`,detail:e,format:`markdown`,tone:`plain`}),Interrupt:()=>({kind:`status`,label:`Interrupt requested`,detail:`Sent by the operator`,format:`plain`,tone:`plain`}),OperatorMessage:({message:e})=>({kind:`message`,label:`Operator`,detail:e,format:`markdown`,tone:`plain`}),Release:()=>({kind:`status`,label:`Released`,detail:`Held child released by the operator`,format:`plain`,tone:`plain`}),WorkerUnresponsive:({worker:e,lastAnsweredAt:t,reason:n})=>({kind:`status`,label:`${e} silent since ${D(a(t))}`,detail:n,format:`plain`,tone:`warning`}),WorkerResponsive:({worker:e,lastAnsweredAt:n})=>({kind:`status`,label:`${e} answering again`,detail:`Silent for ${he(Date.parse(t.receivedAt)-ee(n))}`,format:`plain`,tone:`plain`})}),{_tag:`Envelope`,payload:e}))}let l=[];for(let[e,t]of i)l.push({_tag:`Session`,...mt(t.first),key:e,latestSequence:t.latestSequence,session:t.session,harnessSession:t.harnessSession,status:t.status,held:t.status===`Live`&&t.held,paused:t.status===`Live`&&t.paused,idle:t.status===`Live`&&t.idle,entries:[...ht(t,t.status),...t.interventions.map(e=>gt(e))].sort((e,t)=>e.sequence-t.sequence)});return s.push(...o.map(e=>{let t=gt(e),n=e.payload.intervention.target;return{...t,label:`${t.label} · ${n._tag===`Parent`?`parent`:n.sessionId}`}})),{sessions:l,terminalAttempts:r,items:[...s,...l.flatMap(e=>e.session._tag===`ChildSession`?[e]:e.entries)].sort((e,t)=>e.sequence-t.sequence)}},vt=e=>{if(e.status!==`Live`)return e.status;if(e.paused)return`Paused`;if(e.held)return e.idle?`Held, waiting for input`:`Held, working`;if(e.idle)return`Waiting for input`;let t=[...e.entries].reverse().find(e=>e._tag===`Tool`&&e.state._tag===`Running`);return t?._tag===`Tool`?`Running ${t.name}`:`Working`},H=ae(T,se),yt=O({type:de([`text`,`inputText`]),text:T}),U=e=>C(H)(e)?e:{},W=e=>C(T)(e)?e:void 0,bt=e=>{if(e===`cwd`)return`Working directory`;if(e===`durationMs`)return`Duration (ms)`;let t=e.replace(/([a-z])([A-Z])/gu,`$1 $2`).replaceAll(`_`,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)},G=(e,t,n=`text`)=>({_tag:`Code`,label:e,text:t,language:n}),K=(e,t,n=[])=>{let r=Object.entries(t).filter(([e])=>!n.includes(e)).map(([e,t])=>({label:bt(e),value:t}));return r.length===0?[]:[{_tag:`Fields`,label:e,fields:r}]},q=(e,t,n=`text`)=>{if(e==null)return[];if(C(T)(e))return[G(t,e,n)];if(Array.isArray(e))return e.flatMap(e=>C(yt)(e)?[G(t,e.text,n)]:q(e,t,n));if(!C(H)(e))return[{_tag:`Fields`,label:t,fields:[{label:`Value`,value:e}]}];let r=[],i={};for(let[a,o]of Object.entries(e))a===`content`&&Array.isArray(o)?r.push(...q(o,t,n)):[`text`,`stdout`,`stderr`,`aggregatedOutput`,`message`].includes(a)?r.push(...q(o,a===`text`?t:bt(a),n)):a===`error`?r.push(...q(o,`Error`)):i[a]=o;return[...r,...K(t,i)]},xt=O({oldText:T,newText:T}),St=O({path:T,diff:T,kind:O({type:T})}),J=b(v(St)),Ct=r.check(ie(1)),Y=e=>/\.[cm]?tsx?$/iu.test(e)?`typescript`:/\.json$/iu.test(e)?`json`:`text`,wt=e=>q(e,`Confirmation`).map(e=>e._tag===`Code`?{_tag:`Text`,label:e.label,text:e.text}:e),X=(e,t,n)=>{let r=U(e),i=U(t),a=J(i.changes??r.changes),o=W(r.path)??W(r.file_path),s=C(Ct)(r.offset)?r.offset:void 0,l=C(Ct)(r.limit)?r.limit:void 0,u=s??(r.offset===void 0?1:void 0),d=n===`read`&&(s!==void 0||l!==void 0)?[u===void 0?``:`From line ${u}`,l===void 0?``:`up to ${l} ${l===1?`line`:`lines`}`].filter(e=>e!==``).join(` · `):``,f=[o??`File details unavailable`,d].filter(e=>e!==``).join(` · `),p=W(U(i.details).patch)??W(U(i.details).diff),m=b(v(xt))(r.edits),h=A(m,()=>C(T)(r.old_string)&&C(T)(r.new_string)?[{oldText:r.old_string,newText:r.new_string}]:[]);return{activity:{_tag:`Files`,operation:i.type===`fileChange`||r.type===`fileChange`?`change`:n,paths:c(a,{onNone:()=>o===void 0?[]:[o],onSome:e=>e.map(({path:e})=>e)})},title:{read:`Read file`,edit:`Edit file`,write:`Write file`}[n],subject:n===`read`?f:o??c(a,{onNone:()=>`File details unavailable`,onSome:e=>e.length===1?e[0]?.path??`File details unavailable`:`${e.length} files`}),input:[...K(`Options`,r,[`path`,`file_path`,`edits`,`old_string`,`new_string`,`content`,`changes`,`type`,`id`,`status`,...n===`read`&&s!==void 0?[`offset`]:[],...n===`read`&&l!==void 0?[`limit`]:[]]),...(p===void 0?h:[]).flatMap(({oldText:e,newText:t},n)=>[G(h.length===1?`Before`:`Before ${n+1}`,e,Y(o??``)),G(h.length===1?`After`:`After ${n+1}`,t,Y(o??``))]),...C(T)(r.content)?[G(`Content`,r.content,Y(o??``))]:[],...t===void 0?c(J(r.changes),{onNone:()=>[],onSome:e=>e.map(({path:e,diff:t})=>G(e,t,`diff`))}):[]],output:c(J(i.changes),{onNone:()=>p===void 0?n===`read`?q(t,o??`Output`,Y(o??``)):wt(t):[G(o??`Changes`,p,`diff`),...wt(Object.fromEntries(Object.entries(i).filter(([e])=>e!==`details`))),...K(`Metadata`,U(i.details),[`patch`,`diff`])],onSome:e=>e.map(({path:e,diff:t,kind:n})=>G(`${e} · ${n.type}`,t,`diff`))})}},Tt=e=>{switch(e.toLowerCase()){case`bash`:case`powershell`:case`shell`:case`command`:return`command`;case`read`:return`read`;case`edit`:case`file_change`:return`edit`;case`write`:return`write`;case`grep`:case`glob`:case`find`:case`ls`:case`web_search`:return`search`;case`subagent`:case`agent`:case`task`:return`agent`;default:return`tool`}},Et=({input:e,output:t})=>{let n=U(e??t),r=U(t),i=W(n.command)??W(r.command);return{activity:{_tag:`Command`,command:i},title:`Command`,subject:i??`Command details unavailable`,input:[...i===void 0?[]:[G(`Command`,i,`bash`)],...K(`Options`,n,[`command`,`type`,`id`,`status`,`aggregatedOutput`,`exitCode`,`durationMs`,`processId`,`source`,`commandActions`])],output:r.type===`commandExecution`?[...q(r.aggregatedOutput,`Output`),...K(`Execution`,r,[`type`,`id`,`status`,`command`,`cwd`,`aggregatedOutput`,`processId`,`source`,`commandActions`])]:q(t,`Output`)}},Dt=({input:e,output:t,name:n})=>{let r=U(e??t),i=U(t),a=U(r.action);return{activity:{_tag:`Search`},title:n.toLowerCase()===`ls`?`List files`:`Search`,subject:W(r.pattern)??W(r.query)??W(a.query)??W(a.url)??W(r.path)??`Search details unavailable`,input:K(`Search`,r,[`type`,`id`]),output:i.type===`webSearch`?K(`Search`,i,[`type`,`id`]):q(t,`Results`)}},Ot=({input:e,output:t})=>{let n=U(e),r=W(n.task)??W(n.prompt);return{activity:{_tag:`Delegation`},title:`Delegate`,subject:W(n.description)??r??`Delegated task`,input:[...r===void 0?[]:[{_tag:`Text`,label:`Task`,text:r}],...K(`Agent`,n,[`task`,`prompt`])],output:q(t,`Report`).map(e=>e._tag===`Code`?{_tag:`Text`,label:e.label,text:e.text}:e)}},kt=({input:e,output:t,name:n})=>{let r=U(e),i=U(t),a=r.type===`mcpToolCall`||r.type===`dynamicToolCall`||i.type===`mcpToolCall`||i.type===`dynamicToolCall`,o=a?r.arguments??i.arguments:e;return{activity:{_tag:`Tool`},title:(a?[W(r.server)??W(i.server)??W(r.namespace)??W(i.namespace),W(r.tool)??W(i.tool)].filter(e=>e!==void 0).join(` · `):n)||n,subject:C(H)(o)?`${Object.keys(o).length} parameters`:C(T)(o)?o:`Tool details`,input:q(o,`Parameters`),output:a?[...q(i.result??i.contentItems,`Output`),...q(i.error,`Error`)]:q(t,`Output`)}},Z=e=>{let t={name:e.name,input:c(e.start,{onNone:()=>void 0,onSome:({input:e})=>e}),output:y(e.state,{Running:()=>void 0,Stopped:()=>void 0,Finished:({output:e})=>e,Error:({output:e})=>e})},n=Tt(e.name);return{category:n,...{command:Et,read:({input:e,output:t})=>X(e,t,`read`),edit:({input:e,output:t})=>X(e,t,`edit`),write:({input:e,output:t})=>X(e,t,`write`),search:Dt,agent:Ot,tool:kt}[n](t)}},Q=(e,t)=>{let n=Math.max(0,Math.floor((t-Date.parse(e))/1e3));if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m ${n%60}s`:`${Math.floor(r/60)}h ${r%60}m`},At=({since:e,className:t})=>{let n=F(1e3);return(0,z.jsx)(`time`,{dateTime:e,"aria-live":`off`,className:j(`font-mono tabular-nums`,t),title:`Since ${S(e)}`,children:Q(e,n)})},jt=e=>{if(e.status!==`Live`)return{label:e.status,detail:``,since:d()};if(e.paused||e.held||e.idle)return{label:vt(e),detail:``,since:d()};let t=[...e.entries].reverse().find(e=>e._tag===`Tool`&&e.state._tag===`Running`);if(t?._tag!==`Tool`)return{label:`Working`,detail:``,since:d()};let n=Z(t);return{label:{command:`Running command`,read:`Reading file`,edit:`Editing file`,write:`Writing file`,search:`Searching`,agent:`Delegating`,tool:`Running ${n.title}`}[n.category],detail:n.subject,since:_(t.start,({receivedAt:e})=>e)}},Mt=e=>{let t=e.filter(({status:e})=>e===`Live`);return t.filter(({session:e})=>e._tag===`ChildSession`).sort((e,t)=>t.latestSequence-e.latestSequence)[0]??t.find(({session:e})=>e._tag===`ParentSession`)},Nt=({chapter:e})=>{let t=F(1e3),n=Mt(e.sessions),r=n===void 0?{label:`Parent session starting`,detail:``,since:d()}:jt(n);return(0,z.jsxs)(`div`,{role:`status`,"aria-label":`Current activity`,className:`min-w-0 space-y-0.5 text-xs`,children:[(0,z.jsxs)(`p`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsx)(I,{state:`Running`}),n!==void 0&&(0,z.jsx)(`span`,{className:`shrink-0 font-medium text-foreground`,children:n.session._tag===`ParentSession`?`Parent`:n.session.agent}),(0,z.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:r.label}),c(r.since,{onNone:()=>null,onSome:e=>(0,z.jsx)(`span`,{"aria-live":`off`,className:`ml-auto shrink-0 font-mono tabular-nums text-muted-foreground`,title:`Started ${S(e)}`,children:Q(e,t)})})]}),r.detail!==``&&(0,z.jsx)(`p`,{className:`truncate pl-3.5 font-mono text-muted-foreground`,title:r.detail,children:r.detail}),c(e.lastActivityAt,{onNone:()=>null,onSome:e=>(0,z.jsxs)(`p`,{"aria-live":`off`,className:`pl-3.5 text-muted-foreground`,children:[`Last activity `,Q(e,t),` ago`]})}),e.connectivity.map(e=>(0,z.jsx)(Pt,{warning:e,now:t},e._tag===`WorkerSilent`?e.worker:`${e.agent}:${e.since}`))]})},Pt=({warning:e,now:t})=>{let n=y(e,{WorkerSilent:({worker:e,lastAnsweredAt:t})=>({text:`${e} silent since ${D(t)}`,since:t,detail:null}),ProviderRetrying:({agent:e,retries:t,since:n,message:r})=>({text:`${e}: provider unreachable, ${V(t)} since ${D(n)}`,since:n,detail:r})});return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`p`,{className:`flex min-w-0 items-baseline gap-2 pl-3.5`,children:[(0,z.jsxs)(`span`,{className:`min-w-0 text-warning`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:`Warning: `}),n.text]}),(0,z.jsx)(`span`,{"aria-live":`off`,className:`ml-auto shrink-0 font-mono tabular-nums text-muted-foreground`,title:`Since ${S(n.since)}`,children:Q(n.since,t)})]}),n.detail!==null&&(0,z.jsx)(`p`,{className:`truncate pl-3.5 text-muted-foreground`,title:n.detail,children:n.detail})]})},Ft=(e,t)=>{let n=new Map(e.map(e=>[e.sequence,e]));for(let e of t)n.has(e.sequence)||n.set(e.sequence,e);return[...n.values()].sort((e,t)=>e.sequence-t.sequence)},It=(e,t,n)=>[...e.filter(({attemptId:e})=>e!==t),...n].sort((e,t)=>e.before-t.before),Lt=(e,t,n)=>new x({...e,transcript:Ft(e.transcript,t.transcript),earlierTranscript:It(e.earlierTranscript,n.attemptId,t.earlierTranscript)}),Rt=e=>{let t=new Map;for(let n of e){if(n.payload._tag!==`SessionEvent`)continue;let e=n.payload.event;e._tag===`PoolRateLimitsUpdated`&&t.set(e.pool,{pool:e.pool,windows:m([e.rateLimits.primary,e.rateLimits.secondary])})}return[...t.values()]},zt=e=>{let t=null,n=new Map;for(let{payload:r,receivedAt:i}of e)if(r._tag===`WorkerUnresponsive`)t={_tag:`WorkerSilent`,worker:r.worker,lastAnsweredAt:a(r.lastAnsweredAt)};else if(r._tag===`WorkerResponsive`)t=null;else if(r._tag===`SessionEvent`){let e=r.event;e._tag===`ProviderRetrying`?n.set(e.session.id,{_tag:`ProviderRetrying`,sessionId:e.session.id,agent:e.session.agent,message:e.message,retries:e.retries,since:n.get(e.session.id)?.since??i}):(e._tag===`ProviderRecovered`||e._tag===`SessionIdle`||e._tag===`SessionFinished`)&&n.delete(e.session.id)}return[...t===null?[]:[t],...n.values()]},Bt=/^\s*\[usine:(blocked|question|failed)\]/u,Vt=e=>{let t=Bt.exec(e)?.[1];return t===`blocked`||t===`question`?t:null},Ht=e=>e.replace(Bt,``).trimStart(),Ut=e=>Ht(e).replace(/\s+/gu,` `).trim(),Wt=e=>e.replace(/^\s{0,3}(?:#{1,6}\s+|[-*+]\s+|\d+[.)]\s+|>\s?)/u,``).replace(/!?\[([^\]]*)\]\([^)]*\)/gu,`$1`).replace(/`([^`]*)`/gu,`$1`).replace(/(\*\*|__)(.+?)\1/gu,`$2`).replace(/(^|[\s(])\*(\S(?:.*?\S)?)\*(?=[\s).,;:!?]|$)/gu,`$1$2`).trim(),Gt=e=>e.replace(/```[\s\S]*?(?:```|$)/gu,`
|
|
2
|
+
`).split(`
|
|
3
|
+
`).map(Wt).filter(e=>e!==``).join(` `),$=e=>{let t=Ht(e).replace(/```[\s\S]*?(?:```|$)/gu,`
|
|
4
|
+
`).split(`
|
|
5
|
+
`).map(Wt).filter(e=>e!==``)[0]??``;return/^(.*?[.!?…])(?=\s|$)/u.exec(t)?.[1]??t},Kt=32,qt=12,Jt=e=>{if(e.length<=Kt)return e;let t=/^(.+?)(?:[,;:]\s|\s[—–-]\s)/u.exec(e)?.[1];if(t!==void 0&&t.length>=qt&&t.length<=Kt)return t;let n=e.slice(0,33).lastIndexOf(` `);return`${(n>0?e.slice(0,n):e.split(` `)[0]??e).replace(/[\s,;:.—–-]+$/u,``)}…`},Yt=e=>({name:e.session._tag===`ParentSession`?`Parent`:e.session.agent,sessionKey:e.key}),Xt=e=>e.origin._tag===`Envelope`&&(e.origin.payload._tag===`Final`||e.origin.payload._tag===`Failed`||e.origin.payload._tag===`Interrupted`),Zt=e=>y(e,{Succeeded:({message:e})=>i(e),Failed:({failure:e})=>e._tag===`AgentFailure`||e._tag===`BlockedFailure`||e._tag===`QuestionFailure`?P(e):null,Canceled:()=>null}),Qt=(e,t)=>{let n=t?.salvage??null,r=e?.origin._tag===`Envelope`&&e.origin.payload._tag===`Final`?u(e.origin.payload.result.message):d(),i=t?.outcome;if(i!=null)return y(i,{Succeeded:()=>({_tag:`Succeeded`,message:r}),Failed:({failure:e})=>({_tag:`Failed`,failure:e,salvage:n}),Canceled:()=>({_tag:`Canceled`,salvage:n})});if(e?.origin._tag!==`Envelope`)return null;let a=e.origin.payload;return a._tag===`Final`?{_tag:`Succeeded`,message:r}:a._tag===`Failed`?{_tag:`Failed`,failure:a.failure,salvage:n}:a._tag===`Interrupted`?{_tag:`Canceled`,salvage:n}:null},$t=({direction:e,payload:t})=>e===`outbound`&&t._tag!==`WorkerUnresponsive`&&t._tag!==`WorkerResponsive`&&(t._tag!==`SessionEvent`||t.event._tag!==`PoolRateLimitsUpdated`&&t.event._tag!==`ProviderRetrying`),en=e=>e.detail===``?e.label:`${e.label}. ${e.detail}`,tn=e=>e._tag===`Envelope`?e.payload._tag===`WorkerUnresponsive`?{_tag:`WorkerSilent`}:e.payload._tag===`WorkerResponsive`?{_tag:`WorkerAnswers`}:null:null,nn=(e,t,n,r,i)=>{let a=[],o=t===null?null:Zt(t),s=o===null?null:Ut(o),c=new Set,l=null,f=[],p=null,m=new Map,h=()=>{let[e,...t]=f;e!==void 0&&p!==null&&a.push({_tag:`Burst`,key:`burst:${e.key}`,speaker:p,tools:[e,...t]}),f=[],p=null};for(let{entry:t,session:n}of e){if(t._tag===`Tool`){let e=n??{name:`Parent`,sessionKey:null};if(Z(t).category===`agent`){h(),a.push({_tag:`Delegation`,key:t.key,speaker:e,tool:t});continue}p!==null&&p.sessionKey!==e.sessionKey&&h(),p=e,f.push(t);continue}if(Xt(t))continue;let e=t.origin,r={key:t.key,sequence:t.sequence,latestSequence:t.latestSequence,receivedAt:t.receivedAt};if(e._tag===`Session`){let i=n??{name:e.session.agent,sessionKey:null};if(e.event===`TextOutput`){let n=Ut(t.detail);if(s!==null&&n===s){l??={receivedAt:t.receivedAt,speaker:i};continue}let o=e.session._tag===`ChildSession`;if(!o&&c.has(n))continue;o&&c.add(n),h();let u=Vt(t.detail);a.push({_tag:`Message`,...r,speaker:i,from:`agent`,text:Ht(t.detail),format:t.format,undelivered:!1,queued:null,blocked:u===`blocked`,question:u===`question`});continue}(e.event===`SessionIdle`||e.event===`SessionResumed`)&&(h(),a.push({_tag:`Note`,...r,speaker:i,text:e.event===`SessionIdle`?`Waiting for operator input`:`Resumed`,tone:`plain`,connectivity:null}))}else if(e._tag===`Provider`){let i=n??{name:e.session.agent,sessionKey:null},o=e.event;if(h(),o._tag===`ProviderRecovered`){m.delete(e.session.id),a.push({_tag:`Note`,...r,speaker:i,text:`Provider reachable again after ${V(o.retries)}`,tone:`plain`,connectivity:null});continue}let s=`Provider unreachable, ${V(o.retries)} so far. ${o.message}`,c=m.get(e.session.id),l=c===void 0?void 0:a[c];if(c===a.length-1&&l?._tag===`Note`){a[c]={...l,latestSequence:t.latestSequence,text:s};continue}m.set(e.session.id,a.length),a.push({_tag:`Note`,...r,speaker:i,text:s,tone:`warning`,connectivity:{_tag:`ProviderRetrying`,sessionId:e.session.id}})}else if(e._tag===`Envelope`&&e.payload._tag===`Started`){let t=e.payload.conflictingSalvage;te(t)&&(h(),a.push({_tag:`Note`,...r,speaker:null,text:Me(t.value),tone:`plain`,connectivity:null}))}else h(),a.push(t.kind===`message`?{_tag:`Message`,...r,speaker:{name:e._tag===`Operator`?e.operator:t.label,sessionKey:n?.sessionKey??null},from:`operator`,text:t.detail,format:t.format,undelivered:t.tone===`failed`,queued:t.queued,blocked:!1,question:!1}:{_tag:`Note`,...r,speaker:null,text:en(t),tone:t.tone,connectivity:tn(e)})}if(h(),t!==null){let e=n===void 0?d():u({key:n.key,sequence:n.sequence,latestSequence:n.latestSequence,receivedAt:n.receivedAt});a.push({_tag:`Ending`,key:n?.key??`ending:${i}`,position:e,receivedAt:E(g(l?.receivedAt),()=>E(_(e,({receivedAt:e})=>e),()=>g(r?.endedAt))),speaker:l?.speaker??null,end:t,outOfMemory:r?.outOfMemory??null})}return a},rn=(e,t,n)=>{let r=new Map;for(let t of e.sessions)for(let e of t.entries)r.set(e.key,t);let i=e.items.flatMap(e=>e._tag===`Session`?e.entries:[e]).sort((e,t)=>e.sequence-t.sequence),a=[...[...t].sort((e,t)=>e.number-t.number).map(({id:e})=>e),...i.map(({attemptId:e})=>e)];return{chapters:[...new Set(a)].map(a=>{let o=t.find(({id:e})=>e===a),s=i.filter(e=>e.attemptId===a),c=[...s].reverse().find(e=>e._tag===`Notice`&&Xt(e)),l=s.find(e=>e._tag===`Notice`&&e.origin._tag===`Envelope`&&e.origin.payload._tag===`Started`),f=Qt(c,o),p=n.filter(e=>e.attemptId===a),m=[...p].reverse().find($t),h=f===null&&!e.terminalAttempts.has(a);return{key:`attempt:${a}`,attemptId:a,attempt:g(o),live:h,parentModel:l?._tag===`Notice`&&l.origin._tag===`Envelope`&&l.origin.payload._tag===`Started`?u(l.origin.payload.parentModel):d(),sessions:e.sessions.filter(e=>e.attemptId===a).sort((e,t)=>Number(e.session._tag===`ChildSession`)-Number(t.session._tag===`ChildSession`)||e.sequence-t.sequence),rows:nn(s.map(e=>{let t=r.get(e.key);return{entry:e,session:t===void 0?null:Yt(t)}}),f,c,o,a),meters:Rt(p),endedAt:E(g(o?.endedAt),()=>g(c?.receivedAt)),lastActivityAt:g(m?.receivedAt),connectivity:h?zt(p):[]}})}},an=e=>e.rows.flatMap(e=>{let t=(t,n)=>[{key:e.key,...t,text:n,label:Jt(n)}];if(e._tag===`Message`){let{sessionKey:n,name:r}=e.speaker;return e.from===`operator`?t({sessionKey:n,kind:`operator`,speaker:r,tone:e.undelivered?`failed`:`plain`},$(e.text)):t({sessionKey:n,kind:e.blocked?`blocker`:e.question?`question`:`turn`,speaker:r,tone:e.blocked?`failed`:`plain`},$(e.text))}if(e._tag===`Note`)return e.connectivity===null&&e.tone!==`failed`?[]:t({sessionKey:e.speaker?.sessionKey??null,kind:e.connectivity===null?`operator`:`notice`,speaker:e.speaker?.name??null,tone:e.tone},$(e.text));if(e._tag!==`Ending`)return[];let n=(n,r)=>t({sessionKey:e.speaker?.sessionKey??null,kind:`ending`,speaker:null,tone:r},n);return y(e.end,{Succeeded:({message:e})=>n(c(e,{onNone:()=>`Succeeded`,onSome:$}),`plain`),Failed:({failure:e})=>n($(P(e)),`failed`),Canceled:()=>n(`Canceled`,`plain`)})}),on=e=>{let t=[];for(let n of an(e)){let e=t.at(-1);n.kind===`turn`?e?._tag===`Turns`&&e.sessionKey===n.sessionKey?t[t.length-1]={...e,turns:[...e.turns,n]}:t.push({_tag:`Turns`,key:`turns:${n.key}`,speaker:n.speaker??`Parent`,sessionKey:n.sessionKey,turns:[n]}):t.push({_tag:`Mark`,checkpoint:n})}return t},sn=e=>e.chapters.flatMap(e=>{let t=new Set(an(e).map(({key:e})=>e)),n=(t,n=!1)=>({id:t,attemptId:e.attemptId,checkpoint:n});return[n(e.key),n(`history:${e.attemptId}`),n(`empty:${e.attemptId}`),...e.rows.map(e=>n(e.key,t.has(e.key))),n(`activity:${e.attemptId}`)]}),cn=(e,t)=>{let n=new Set(t),r=e.findIndex(({id:e})=>n.has(e)),i=e[r];if(i===void 0)return null;let a=e.slice(0,r+1).reverse().find(e=>e.attemptId===i.attemptId&&e.checkpoint);return{attemptId:i.attemptId,checkpointKey:a?.id??null}},ln=({failure:e,className:t})=>(0,z.jsxs)(`div`,{className:j(`rounded-lg border border-destructive/25 bg-destructive/8 px-3 pt-2 pb-2.5 text-sm`,t),children:[(0,z.jsx)(`p`,{className:`font-medium text-destructive`,children:Fe(e)}),(0,z.jsx)(Ke,{className:`wrap-anywhere`,children:P(e)})]}),un=({salvage:e})=>(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground wrap-anywhere`,children:e===null?`No salvage branch`:y(e,{Pushed:({ref:e,commit:t})=>(0,z.jsxs)(z.Fragment,{children:[`Unfinished work pushed to `,(0,z.jsx)(`span`,{className:`font-mono`,children:e}),` at`,` `,(0,z.jsx)(`span`,{className:`font-mono`,children:t.slice(0,7)})]}),PartlyPushed:({ref:e,commit:t,path:n,message:r})=>(0,z.jsxs)(z.Fragment,{children:[`Unfinished work pushed to `,(0,z.jsx)(`span`,{className:`font-mono`,children:e}),` at`,` `,(0,z.jsx)(`span`,{className:`font-mono`,children:t.slice(0,7)}),`, except files kept at`,` `,(0,z.jsx)(`span`,{className:`font-mono`,children:n}),`. `,r]}),Retained:({path:e,message:t})=>(0,z.jsxs)(z.Fragment,{children:[`Salvage incomplete: unfinished work at `,(0,z.jsx)(`span`,{className:`font-mono`,children:e}),`, retried at each startup while the worker is configured. Last error: `,t]}),Rejected:({path:e,message:t})=>(0,z.jsxs)(z.Fragment,{children:[`Salvage rejected: unfinished work at `,(0,z.jsx)(`span`,{className:`font-mono`,children:e}),`. The remote refused its push, so startup doesn't retry it until its commit changes. Error:`,` `,t]})})}),dn=({end:e})=>y(e,{Failed:({failure:e,salvage:t})=>(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(ln,{failure:e}),(0,z.jsx)(un,{salvage:t})]}),Succeeded:({message:e})=>(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsxs)(`p`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,z.jsx)(I,{state:`Succeeded`}),`Succeeded`]}),c(e,{onNone:()=>null,onSome:e=>(0,z.jsx)(Ke,{className:`text-md wrap-anywhere`,children:e})})]}),Canceled:({salvage:e})=>(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsxs)(`p`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,z.jsx)(I,{state:`Canceled`}),`Canceled`]}),(0,z.jsx)(un,{salvage:e})]})}),fn=({kills:e})=>(0,z.jsxs)(`p`,{className:`text-xs text-warning wrap-anywhere`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:`Warning: `}),Ne(e)]}),pn=({end:e,outOfMemory:t})=>t===null?(0,z.jsx)(dn,{end:e}):(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(dn,{end:e}),(0,z.jsx)(fn,{kills:t})]}),mn=async(e,t)=>{let n=await t(e);if(e._tag===`ColdTranscriptRequest`)return n;let r=n.transcript;for(;!n.run.canCancel;){let e=n.transcript.at(-1);if(e===void 0)break;n=await t(new h({after:e.sequence})),r=Ft(r,n.transcript)}return new x({...n,transcript:r})},hn=(e,t)=>{let n=oe();return ye({queryKey:[`run`,e],queryFn:async()=>{let t=[`run`,e],r=n.getQueryData(t)?.transcript.at(-1)?.sequence,i=await mn(r===void 0?new le:new h({after:r}),t=>ge(n=>n.detail({params:{runId:e},query:t}))),a=n.getQueryData(t);return r===void 0||a===void 0?i:new x({...i,transcript:Ft(a.transcript,i.transcript),earlierTranscript:a.earlierTranscript})},structuralSharing:!1,enabled:t,refetchInterval:e=>e.state.data?.run.canCancel===!0&&1e3})},gn=e=>{let t=oe();return _e({mutationFn:t=>ge(n=>n.detail({params:{runId:e},query:new p(t)})),onSuccess:(n,r)=>{t.setQueryData([`run`,e],e=>e===void 0?e:Lt(e,n,r))}})};export{tt as _,rn as a,Zt as c,At as d,Z as f,R as g,lt as h,on as i,Gt as l,ft as m,hn as n,sn as o,_t as p,pn as r,cn as s,gn as t,Nt as u,rt as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t,E as n}from"./matchContext-BquevSJS.js";import{_ as r,h as i,p as a}from"./page-DWnGi6wA.js";import{$ as o,A as s,B as c,C as l,Ct as u,D as d,E as f,F as p,G as m,I as h,K as g,L as _,M as v,N as y,O as b,P as x,R as S,T as C,Tt as w,U as T,W as E,Xt as D,Yt as O,Z as k,Zt as A,at as j,f as M,hn as N,k as P,mt as F,nt as I,p as L,q as R,v as z,w as B,z as V}from"./mark-CC3RwMy_.js";import{A as H,D as ee,M as U,P as W,r as te,v as ne}from"./button-DVWXde__.js";import{a as G,p as re,t as ie}from"./useTimeout-_TcdZXP6.js";import{a as ae,i as oe,l as se,n as ce,o as le,r as ue,t as de}from"./usePositioner-rNCxnHO-.js";import{a as fe,n as pe,o as me,r as he,t as ge}from"./useAnchoredPopupScrollLock-CQ83Wy-r.js";import{t as _e}from"./ToolbarRootContext-Cytu6o2e.js";var K=e(t(),1),q=K.createContext(void 0);function J(e){let t=K.useContext(q);if(t===void 0&&!e)throw Error(U(47));return t}var ve=e(re(),1),ye={...B,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!B.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&B.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>B.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},be=class extends C{constructor(e,t,n){let r=new b;super(xe(e,r,t,n),Se(r),ye)}setOpen=(e,t)=>{let n=t.reason===u,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=v(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=x(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),ve.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function xe(e,t,n,r=!1){let i={...l(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function Se(e){return{popupRef:K.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:K.createRef(),beforeTriggerFocusGuardRef:K.createRef(),beforeContentFocusGuardRef:K.createRef(),stickIfOpenTimeout:new ie,stickIfOpen:!0,triggerElements:e}}var Y=n(),Ce=f(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:c,triggerId:l,defaultTriggerId:u=null}=e,d=Te(c,{modal:o,open:r,openProp:n,activeTriggerId:u,triggerIdProp:l});d.useControlledProp(`openProp`,n),d.useControlledProp(`triggerIdProp`,l);let f=d.useState(`open`),m=d.useState(`mounted`),g=d.useState(`payload`);d.useContextCallback(`onOpenChange`,i),d.useContextCallback(`onOpenChangeComplete`,a),V(d,f),p(d);let{forceUnmount:_}=h(f,d,()=>{d.context.stickIfOpen=!0,d.set(`openChangeReason`,null)});d.useSyncedValues({modal:o}),K.useEffect(()=>{f||d.context.stickIfOpenTimeout.clear()},[d,f]),K.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:()=>d.setOpen(!1,w(F))}),[_,d]);let v=f||m||c!=null;return(0,Y.jsxs)(q.Provider,{value:d,children:[c&&(0,Y.jsx)(s,{handle:c,store:d}),v&&(0,Y.jsx)(Ee,{store:d,modal:o}),typeof t==`function`?t({payload:g}):t]})});function we(e){return J(!0)?(0,Y.jsx)(Ce,{props:e}):(0,Y.jsx)(g,{children:(0,Y.jsx)(Ce,{props:e})})}function Te(e,t){let n=S((e,n)=>new be(t,e,n));return K.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Ee({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=T(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference,a=r.floating;return _(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}var De=d(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:s=!0,handle:l,payload:u,openOnHover:d=!1,delay:f=300,closeDelay:p=0,id:m,...h}=e,g=J(!0),_=se(l)??g;if(!_)throw Error(U(74));let v=N(m),y=_.useState(`isTriggerActive`,v),b=_.useState(`floatingRootContext`),x=_.useState(`isOpenedByTrigger`,v),S=_.useState(`triggerPopupId`,v),C=K.useRef(null),{registerTrigger:w,isMountedByThisTrigger:T}=c(v,C,_,{payload:u,disabled:a,openOnHover:d,closeDelay:p}),E=_.useState(`isPressOpenedByTrigger`,v),O=_.useState(`isTouchPressOpen`,d),k=_.useState(`hasTriggerFocusGuards`,v),M=ae(b,{enabled:!a&&d&&!O,mouseOnly:!0,move:!1,handleClose:oe(),restMs:f,delay:{close:p},triggerElementRef:C,isActiveTrigger:y,isClosing:()=>_.select(`transitionStatus`)===`ending`}),P=H(()=>_.context.stickIfOpen),F=me(b,{stickIfOpen:P}),I=fe(()=>_.select(`open`),e=>{_.set(`openMethod`,e)}),L=_.useState(`triggerProps`,T),{getButtonProps:R,buttonRef:z}=te({disabled:a,native:s}),B={open(e){return E?D.open(e):A.open(e)}},{handlePreFocusGuardFocus:V,handleFocusTargetFocus:ee}=he(_,C),ne=W(`button`,e,{state:{disabled:a,open:x},ref:[z,t,w,C],props:[F.reference,M,L,I,{[o]:``,id:v,"aria-haspopup":`dialog`,"aria-expanded":x,"aria-controls":S},h,R],stateAttributesMapping:B}),G=(0,Y.jsx)(K.Fragment,{children:ne},v);return k?(0,Y.jsxs)(K.Fragment,{children:[(0,Y.jsx)(j,{ref:_.context.beforeTriggerFocusGuardRef,onFocus:V}),G,(0,Y.jsx)(j,{ref:_.context.triggerFocusTargetRef,onFocus:ee})]}):G}),X=K.createContext(void 0);function Oe(){let e=K.useContext(X);if(e===void 0)throw Error(U(45));return e}var ke=K.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return J().useState(`mounted`)||n?(0,Y.jsx)(X.Provider,{value:n,children:(0,Y.jsx)(k,{ref:t,...r})}):null}),Ae=K.createContext(void 0);function je(){let e=K.useContext(Ae);if(!e)throw Error(U(46));return e}var Me=K.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:h,disableAnchorTracking:g=!1,collisionAvoidance:_=I,...v}=e,y=J(),b=Oe(),x=R(),S=y.useState(`floatingRootContext`),C=y.useState(`mounted`),w=y.useState(`open`),T=y.useState(`openChangeReason`),E=y.useState(`activeTriggerElement`),D=y.useState(`modal`),O=y.useState(`openMethod`),k=y.useState(`positionerElement`),A=y.useState(`instantType`),j=y.useState(`transitionStatus`),N=y.useState(`adaptiveOrigin`),P=ue({anchor:a,floatingRootContext:S,positionMethod:o,mounted:C,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:h,disableAnchorTracking:g,keepMounted:b,nodeId:x,collisionAvoidance:_,adaptiveOrigin:N}),F=S.useState(`domReferenceElement`);pe({store:y,domReference:F,positionerElement:k,open:w});let z=D===!0&&T!==`trigger-hover`;ge(w&&z,O===`touch`,k,E);let B=y.useStateSetter(`positionerElement`),V={open:w,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:A},H=de(e,V,{styles:P.positionerStyles,transitionStatus:j,props:v,refs:[t,B],hidden:!C,inert:!w});return(0,Y.jsxs)(Ae.Provider,{value:P,children:[C&&z&&(0,Y.jsx)(M,{inert:L(!w),cutout:E}),(0,Y.jsx)(m,{id:x,children:H})]})}),Ne=K.createContext(void 0);function Pe(){let[e,t]=K.useState(0),n=H(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:K.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var Fe=K.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=J(),l=je(),u=_e(!0)!=null,{context:d,hasClosePart:f}=Pe(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),b=c.useState(`descriptionElementId`),x=c.useState(`modal`),S=c.useState(`mounted`),C=c.useState(`openChangeReason`),w=c.useState(`activeTriggerElement`),T=c.useState(`floatingRootContext`),D=T.useState(`floatingId`),k=c.useState(`disabled`),A=c.useState(`openOnHover`),j=c.useState(`closeDelay`);G({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),le(T,{enabled:A&&!k,closeDelay:j});let M=a===void 0?y(c.context.popupRef):a,N=x!==!1&&f;c.useSyncedValue(`focusManagerModal`,N);let F=c.useStateSetter(`popupElement`),I={open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},L=W(`div`,e,{state:I,ref:[t,c.context.popupRef,F],props:[_,{id:D,role:`dialog`,...P,"aria-labelledby":v,"aria-describedby":b,onKeyDown(e){u&&z.has(e.key)&&e.stopPropagation()}},ce(g),s],stateAttributesMapping:O});return(0,Y.jsx)(E,{context:T,openInteractionType:m,modal:N,disabled:!S||C===`trigger-hover`,initialFocus:M,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:ne(w)?w:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Y.jsx)(Ne.Provider,{value:d,children:L})})});function Ie({...e}){return(0,Y.jsx)(we,{"data-slot":`popover`,...e})}function Z({...e}){return(0,Y.jsx)(De,{"data-slot":`popover-trigger`,...e})}function Le({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,Y.jsx)(ke,{children:(0,Y.jsx)(Me,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,Y.jsx)(Fe,{"data-slot":`popover-content`,className:ee(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-lg bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var Q=new Intl.NumberFormat(`en`),Re=({cost:e})=>e===null?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`font-mono text-foreground tabular-nums`,children:r(e.usd)}),e.estimate&&(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:` estimate`})]}),ze=({session:e})=>e._tag===`ParentSession`?`Parent`:e.agent,Be=`grid grid-cols-[minmax(0,1fr)_auto_7rem] items-baseline gap-x-3 py-0.5`,Ve=`grid grid-cols-[minmax(0,1fr)_auto_10rem] items-baseline gap-x-3 py-0.5`,He=e=>`unpriced`in e&&e.unpriced,$=({pools:e})=>{let t=e.some(e=>He(e)&&e.cost!==null);return(0,Y.jsxs)(`section`,{"aria-label":`Tokens per pool`,children:[(0,Y.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per pool`}),e.map(e=>(0,Y.jsxs)(`div`,{className:t?Ve:Be,children:[(0,Y.jsx)(`span`,{className:`truncate text-foreground`,children:a(e.pool)}),(0,Y.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:Q.format(e.tokens)}),(0,Y.jsxs)(`span`,{className:`text-right`,children:[He(e)&&e.cost!==null&&(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:`at least `}),(0,Y.jsx)(Re,{cost:e.cost})]})]},e.pool))]})},Ue=({usage:e,attempts:t})=>(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)($,{pools:e.pools}),(0,Y.jsxs)(`section`,{"aria-label":`Tokens per session`,className:`border-t pt-2.5`,children:[(0,Y.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per session`}),t.map(t=>{let n=e.sessions.filter(({attemptId:e})=>e===t.id);return n.length===0?null:(0,Y.jsxs)(`div`,{className:`pb-1`,children:[(0,Y.jsxs)(`h3`,{className:`pt-1 text-muted-foreground`,children:[`Attempt `,t.number]}),n.map(e=>(0,Y.jsxs)(`div`,{className:Be,children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Y.jsx)(`span`,{className:`shrink-0 text-foreground`,children:ze(e)}),(0,Y.jsx)(`span`,{className:`truncate font-mono text-muted-foreground`,children:e.session.brain.model})]}),(0,Y.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:Q.format(e.tokens)}),(0,Y.jsx)(`span`,{className:`text-right`,children:(0,Y.jsx)(Re,{cost:e.cost})})]},e.session.id))]},t.id)})]}),(0,Y.jsx)(`p`,{className:`text-muted-foreground`,children:`Tokens are output and uncached input. Dollars are the price each harness reports, or for Codex, the OpenAI API price.`})]}),We=({usage:e,attempts:t})=>(0,Y.jsxs)(Ie,{children:[(0,Y.jsxs)(Z,{"aria-label":`Tokens: ${Q.format(e.tokens)}. Show per pool and session`,className:`rounded-sm text-primary underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/70`,children:[(0,Y.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,children:i(e.tokens)}),` tokens`]}),(0,Y.jsx)(Le,{align:`start`,className:`w-[26rem] max-w-[calc(100vw-2rem)] gap-3 p-3 text-xs shadow-raised`,children:(0,Y.jsx)(Ue,{usage:e,attempts:t})})]});export{Z as a,Le as i,We as n,Ie as r,$ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t}from"./matchContext-BquevSJS.js";var n=e(t(),1),r=e=>{let[t,r]=(0,n.useState)(Date.now);return(0,n.useEffect)(()=>{let t=setInterval(()=>r(Date.now()),e);return()=>clearInterval(t)},[e]),t};export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t}from"./matchContext-BquevSJS.js";import{Dt as n,Gt as r,It as i,Ot as a,Rt as o,Tt as s,d as c,gn as l,ln as u,pn as d,pt as f,wt as p}from"./mark-CC3RwMy_.js";import{A as m,R as h,k as g}from"./button-DVWXde__.js";import{d as _,n as v,o as y,p as b}from"./useTimeout-_TcdZXP6.js";var x=e(t(),1);function S(e,t){let n=x.useRef(e),r=m(t);g(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function C(e,t={}){let{enabled:n=!0,event:a=`click`,toggle:c=!0,ignoreMouse:l=!1,stickIfOpen:d=!0,touchOpenDelay:f=0,reason:m=p}=t,g=e.context.dataRef,y=x.useRef(void 0),b=_(),S=v(),C=x.useMemo(()=>{function t(t,n,r,i){let a=s(m,n,r);t&&i===`touch`&&f>0?S.start(f,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let i=g.current.openEvent,a=e.select(`domReferenceElement`)!==n;return t&&a||!t||!c?!0:i&&(typeof d==`function`?d():d)?!r(i.type):!1}return{onPointerDown(e){y.current=i(e.pointerType,!0)&&o(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(o){let s=y.current,c=o.nativeEvent,d=e.select(`open`);if(o.button!==0||a===`click`||i(s,!0)&&l)return;let f=n(d,o.currentTarget,e=>e===`click`||e===`mousedown`),p=u(c),m=r(p);if(m||s===`virtual`){t(f,c,m?p:o.currentTarget,s);return}let h=o.currentTarget;b.request(()=>{t(f,c,h,s)})},onClick(r){if(a===`mousedown-only`)return;let o=y.current;a===`mousedown`&&o?y.current=void 0:i(o,!0)&&l||t(n(e.select(`open`),r.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),r.nativeEvent,r.currentTarget,o)},onKeyDown(){y.current=void 0}}},[g,a,l,m,e,d,c,b,S,f]);return x.useMemo(()=>n?{reference:C}:h,[n,C])}function w(e){let t=x.useRef(``),n=x.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:x.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function T(e,t){let{onClick:n,onPointerDown:r}=w(m((n,r)=>{(typeof e==`function`?e():e)||t(r||(d?`touch`:``))}));return x.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function E(e){let[t,n]=x.useState(null),r=T(e,n);return S(e,t=>{t&&!e&&n(null)}),x.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var D=e(b(),1);function O(e,t){function r(r,i,a){let o=r.currentTarget;D.flushSync(()=>{e.setOpen(!1,s(f,r.nativeEvent,o))}),n(o.isConnected?o:t.current,i,a)?.focus()}function i(t){r(t,-1,e.select(`positionerElement`))}function o(t){let n=e.select(`positionerElement`);n&&a(t,n)?e.context.beforeContentFocusGuardRef.current?.focus():r(t,1,n)}return{handlePreFocusGuardFocus:i,handleFocusTargetFocus:o}}function k(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=x.useRef(null),o=x.useRef(null),s=y(r);g(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),g(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var A=20;function j(e,t,n,r){let[i,a]=x.useState(!1);g(()=>{if(!e||!t||n==null){a(!1);return}let r=l(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-A)},[e,t,n]),c(e&&(!t||i),r)}export{T as a,E as i,k as n,C as o,O as r,j as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t,i as n}from"./matchContext-BquevSJS.js";var r=e(t(),1),i=r.use,a=r.useLayoutEffect;function o(e){let t=n();return r.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function s(e){let t=n(),i=o(),s=r.useRef(null);return a(()=>{s.current!==e&&(i(e),s.current=e)},[t,e,i]),null}export{a as i,o as n,i as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t}from"./matchContext-BquevSJS.js";import{Bt as n,Ct as r,Gt as i,Ht as a,It as o,J as s,Jt as c,Kt as l,St as u,Tt as d,Ut as f,Y as p,cn as m,ct as h,et as g,fn as _,gn as v,it as y,ln as b,mn as x,on as S,ot as C,sn as w,st as T,u as E}from"./mark-CC3RwMy_.js";import{A as D,C as O,H as k,P as A,R as j,T as M,_ as N,c as ee,d as P,f as F,g as te,h as I,k as L,l as R,m as z,p as B,s as V,u as ne,v as H,w as re,x as ie,y as U,z as ae}from"./button-DVWXde__.js";import{n as oe}from"./with-selector-DoElmmtd.js";import{f as se,n as ce,p as le,t as W}from"./useTimeout-_TcdZXP6.js";var G=e(t(),1),ue=oe(),de=e(le(),1),fe=Math.min,K=Math.max,q=Math.round,pe=Math.floor,J=e=>({x:e,y:e}),me={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function he(e,t,n){return K(e,fe(t,n))}function Y(e,t){return typeof e==`function`?e(t):e}function X(e){return e.split(`-`)[0]}function Z(e){return e.split(`-`)[1]}function ge(e){return e===`x`?`y`:`x`}function _e(e){return e===`y`?`height`:`width`}function Q(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ve(e){return ge(Q(e))}function ye(e,t,n){n===void 0&&(n=!1);let r=Z(e),i=ve(e),a=_e(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Oe(o)),[o,Oe(o)]}function be(e){let t=Oe(e);return[xe(e),t,xe(t)]}function xe(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Se=[`left`,`right`],Ce=[`right`,`left`],we=[`top`,`bottom`],Te=[`bottom`,`top`];function Ee(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ce:Se:t?Se:Ce;case`left`:case`right`:return t?we:Te;default:return[]}}function De(e,t,n,r){let i=Z(e),a=Ee(X(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(xe)))),a}function Oe(e){let t=X(e);return me[t]+e.slice(t.length)}function ke(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ae(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ke(e)}function je(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Me(e,t){return t!=null&&!o(t)?0:typeof e==`function`?e():e}function Ne(e,t,n){let r=Me(e,n);return typeof r==`number`?r:r?.[t]}function Pe(e){return typeof e==`function`?e():e}function Fe(e,t){return t||e===`click`||e===`mousedown`}function Ie(e){return e?.includes(`mouse`)&&e!==`mousedown`}function Le(e){let t=G.useCallback(t=>e===void 0?ae:e.subscribeStore(t),[e]),n=G.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,ue.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Re=x&&_;function ze(e,t={}){let{enabled:n=!0,delay:r}=t,{events:a,dataRef:o}=e.context,s=G.useRef(!1),c=G.useRef(null),p=G.useRef(!0),g=ce();G.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=I(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&H(t)&&t===S(v(t))&&(s.current=!0,c.current=t)}function a(){p.current=!0}function o(){p.current=!1}return T(h(r,`blur`,i),Re&&h(r,`keydown`,a,!0),Re&&h(r,`pointerdown`,o,!0))},[e,n]),G.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);N(t)&&(c.current=t,s.current=!0)}}return a.on(`openchange`,t),()=>{a.off(`openchange`,t)}},[a,n,e]);let _=G.useMemo(()=>{function t(){s.current=!1,c.current=null}return{onMouseLeave(){t()},onFocus(n){let a=n.currentTarget;if(s.current){if(c.current===a)return;t()}let o=b(n.nativeEvent);if(N(o)){if(Re&&!n.relatedTarget){if(!p.current&&!i(o))return}else if(!l(o))return}let m=f(n.relatedTarget,e.context.triggerElements),{nativeEvent:h,currentTarget:_}=n;e.select(`open`)&&m||!r?e.setOpen(!0,d(u,h,_)):g.start(r,()=>{s.current||e.setOpen(!0,d(u,h,_))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,a=N(r)&&r.hasAttribute(y(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;g.start(0,()=>{let t=e.select(`domReferenceElement`),n=S(v(t));(r||n!==t)&&(m(o.current.floatingContext?.refs.floating.current,n)||m(t,n)||a||f(r??n,e.context.triggerElements)||e.setOpen(!1,d(u,i)))})}}},[o,r,e,g]);return G.useMemo(()=>n?{reference:_,trigger:_}:{},[n,_])}var Be=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new W;restTimeout=new W;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Ve=new WeakMap;function He(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Ve.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Ve.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Ue(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Ve.get(n);a&&a!==e&&He(a),He(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Ve.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function We(e){let t=e.context.dataRef.current,n=k(()=>t.hoverInteractionState??Be.create()).current;return t.hoverInteractionState||=n,se(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ge(e,t={}){let{enabled:i=!0,closeDelay:o=0,nodeId:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),g=e.useState(`domReferenceElement`),{dataRef:_}=e.context,y=p(),x=s(),S=We(e),C=ce(),E=D(()=>Fe(_.current.openEvent?.type,S.interactedInside)),O=D(()=>Ie(_.current.openEvent?.type)),k=D(()=>{He(S)});L(()=>{l||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,k())},[l,S,k]),G.useEffect(()=>k,[k]),L(()=>{if(i&&l&&S.handleCloseOptions?.blockPointerEvents&&O()&&N(g)&&u){let e=g,t=u,n=v(u),r=y?.nodesRef.current.find(e=>e.id===x)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=S.pointerEventsScopeElement===t?null:S.pointerEventsScopeElement,a=r===t?null:r,o=S.handleCloseOptions?.getScope?.()??i??a??w(e,`[data-rootownerid]`)??n.body;return Ue(S,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{k()}}},[i,l,g,u,S,O,y,x,k]),G.useEffect(()=>{if(!i)return;function t(){return!!(y&&x&&n(y.nodesRef.current,x).length>0)}function s(t){let n=Ne(o,`close`,S.pointerType),i=()=>{e.setOpen(!1,d(r,t)),y?.events.emit(`floating.closed`,t)};n?S.openChangeTimeout.start(n,i):(S.openChangeTimeout.clear(),i())}function l(e){let t=b(e);a(t)?S.interactedInside=w(t,`[aria-haspopup]`)!=null:S.interactedInside=!1}function p(){S.openChangeTimeout.clear(),C.clear(),y?.events.off(`floating.closed`,v),k()}function g(r){if(t()&&y){y.events.on(`floating.closed`,v);return}if(f(r.relatedTarget,e.context.triggerElements))return;let i=_.current.floatingContext?.nodeId??c,a=r.relatedTarget;y&&i&&N(a)&&n(y.nodesRef.current,i,!1).some(e=>m(e.context?.elements.floating,a))||(S.handler?S.handler(r):(k(),O()&&!E()&&s(r)))}function v(n){y&&x&&!t()&&C.start(0,()=>{y.events.off(`floating.closed`,v),e.setOpen(!1,d(r,n)),y.events.emit(`floating.closed`,n)})}let D=u;return T(D&&h(D,`mouseenter`,p),D&&h(D,`mouseleave`,g),D&&h(D,`pointerdown`,l,!0),()=>{y?.events.off(`floating.closed`,v)})},[i,u,e,_,o,c,O,E,k,S,y,x,C])}var Ke={current:null};function qe(e,t={}){let{enabled:n=!0,delay:i=0,handleClose:a=null,mouseOnly:s=!1,restMs:c=0,move:l=!0,triggerElementRef:u=Ke,externalTree:g,isActiveTrigger:_=!0,getHandleCloseContext:y,isClosing:x,shouldOpen:S,guardStaleOpen:w=!1}=t,{dataRef:E,events:O}=e.context,k=p(g),A=We(e),j=G.useRef(!1),M=C(a),ee=C(i),P=C(c),F=C(n),te=C(S),I=C(x),L=D(()=>Fe(E.current.openEvent?.type,A.interactedInside)),R=D(()=>te.current?.()!==!1),z=D((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!m(t,n);if(!N(r))return!1;let a=r;return i.hasMatchingElement(e=>m(e,a))&&(!t||!m(t,a))}),B=D(()=>{A.handler&&=(v(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,A.handler),void 0)}),V=D(()=>{He(A)});return _&&(A.handleCloseOptions=a?.__options),G.useEffect(()=>B,[B]),G.useEffect(()=>{if(!n)return;function e(e){e.open?j.current=!1:(j.current=e.reason===r,B(),A.openChangeTimeout.clear(),A.restTimeout.clear(),A.blockMouseMove=!0,A.restTimeoutPending=!1)}return O.on(`openchange`,e),()=>{O.off(`openchange`,e)}},[n,O,A,B]),G.useEffect(()=>{if(!n)return;function t(t,n=!0){let i=Ne(ee.current,`close`,A.pointerType);i?A.openChangeTimeout.start(i,()=>{e.setOpen(!1,d(r,t)),k?.events.emit(`floating.closed`,t)}):n&&(A.openChangeTimeout.clear(),e.setOpen(!1,d(r,t)),k?.events.emit(`floating.closed`,t))}let i=u.current??(_?e.select(`domReferenceElement`):null);if(!N(i))return;function a(t){if(A.openChangeTimeout.clear(),A.blockMouseMove=!1,s&&!o(A.pointerType))return;let n=Pe(P.current),i=Ne(ee.current,`open`,A.pointerType),a=b(t),c=t.currentTarget??null,l=e.select(`domReferenceElement`),u=c;if(N(a)&&!e.context.triggerElements.hasElement(a)){for(let t of e.context.triggerElements.elements())if(m(t,a)){u=t;break}}N(c)&&N(l)&&!e.context.triggerElements.hasElement(c)&&m(c,l)&&(u=l);let f=u!=null&&z(l,u,a),p=e.select(`open`),h=I.current?.()??e.select(`transitionStatus`)===`ending`,g=!p&&h&&j.current,_=!f&&N(u)&&N(l)&&m(l,u)&&g,v=n>0&&!i,y=f&&(p||g)||_,x=!p||f;y?R()&&e.setOpen(!0,d(r,t,u)):v||(i?A.openChangeTimeout.start(i,()=>{x&&R()&&e.setOpen(!0,d(r,t,u))}):x&&R()&&e.setOpen(!0,d(r,t,u)))}function c(n){if(L()){V();return}B();let r=e.select(`domReferenceElement`),i=v(r);A.restTimeout.clear(),A.restTimeoutPending=!1;let a=E.current.floatingContext??y?.();if(!f(n.relatedTarget,e.context.triggerElements)){if(M.current&&a){e.select(`open`)||A.openChangeTimeout.clear();let r=u.current;A.handler=M.current({...a,tree:k,x:n.clientX,y:n.clientY,onClose(){V(),B(),F.current&&!L()&&r===e.select(`domReferenceElement`)&&t(n,!0)}}),i.addEventListener(`mousemove`,A.handler),A.handler(n)}else(A.pointerType!==`touch`||!m(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function p(e){m(i,e.relatedTarget)||(A.openChangeTimeout.clear(),A.restTimeout.clear(),A.restTimeoutPending=!1)}let g=w?h(i,`mouseout`,p):void 0;return l?T(h(i,`mousemove`,a,{once:!0}),h(i,`mouseenter`,a),h(i,`mouseleave`,c),g):T(h(i,`mouseenter`,a),h(i,`mouseleave`,c),g)},[B,V,E,ee,e,n,M,A,_,z,L,s,l,P,u,k,F,y,I,R,w]),G.useMemo(()=>{if(!n)return;function t(e){A.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,i=t.currentTarget,a=e.select(`domReferenceElement`),c=e.select(`open`),l=z(a,i,t.target);if(s&&!o(A.pointerType))return;if(c&&l&&A.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=A.handleCloseOptions?.getScope?.()??i.ownerDocument.body;Ue(A,{scopeElement:e,referenceElement:i,floatingElement:t})}}let u=Pe(P.current);if(c&&!l||u===0||!l&&A.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;A.restTimeout.clear();function f(){if(A.restTimeoutPending=!1,L())return;let t=e.select(`open`);!A.blockMouseMove&&(!t||l)&&R()&&e.setOpen(!0,d(r,n,i))}A.pointerType===`touch`?de.flushSync(()=>{f()}):l&&c?f():(A.restTimeoutPending=!0,A.restTimeout.start(u,f))}}},[n,A,L,z,s,e,P,R])}var Je=.1,Ye=Je*Je,$=.5;function Xe(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ze(e,t,n,r,i,a,o,s,c,l){let u=!1;return Xe(e,t,n,r,i,a)&&(u=!u),Xe(e,t,i,a,o,s)&&(u=!u),Xe(e,t,o,s,c,l)&&(u=!u),Xe(e,t,c,l,n,r)&&(u=!u),u}function Qe(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function $e(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function et(e={}){let{blockPointerEvents:t=!1}=e,r=new W,i=({x:e,y:t,placement:i,elements:a,onClose:o,nodeId:s,tree:c})=>{let l=i?.split(`-`)[0],u=!1,d=null,f=null,p=typeof performance<`u`?performance.now():0;function h(e,t){let n=performance.now(),r=n-p;if(d===null||f===null||r===0)return d=e,f=t,p=n,!1;let i=e-d,a=t-f,o=i*i+a*a,s=r*r*Ye;return d=e,f=t,p=n,o<s}function g(){r.clear(),o()}return function(i){r.clear();let o=a.domReference,d=a.floating;if(!o||!d||l==null||e==null||t==null)return;let{clientX:f,clientY:p}=i,_=b(i),v=i.type===`mouseleave`,y=m(d,_),x=m(o,_);if(y&&(u=!0,!v))return;if(x&&(u=!1,!v)){u=!0;return}if(v&&N(i.relatedTarget)&&m(d,i.relatedTarget))return;function S(){return!!(c&&n(c.nodesRef.current,s).length>0)}function C(){S()||g()}if(S())return;let w=o.getBoundingClientRect(),T=d.getBoundingClientRect(),E=e>T.right-T.width/2,D=t>T.bottom-T.height/2,O=T.width>w.width,k=T.height>w.height,A=(O?w:T).left,j=(O?w:T).right,M=(k?w:T).top,ee=(k?w:T).bottom;if(l===`top`&&t>=w.bottom-1||l===`bottom`&&t<=w.top+1||l===`left`&&e>=w.right-1||l===`right`&&e<=w.left+1){C();return}let P=!1;switch(l){case`top`:P=$e(f,p,A,w.top+1,j,T.bottom-1);break;case`bottom`:P=$e(f,p,A,T.top+1,j,w.bottom-1);break;case`left`:P=$e(f,p,T.right-1,ee,w.left+1,M);break;case`right`:P=$e(f,p,w.right-1,ee,T.left+1,M)}if(P)return;if(u&&!Qe(f,p,w)||!v&&h(f,p)){C();return}let F=!1;switch(l){case`top`:{let n=O?$/2:$*4,r=O||E?e+n:e-n,i=O?e-n:E?e+n:e-n,a=t+$+1,o=E||O?T.bottom-$:T.top,s=E?O?T.bottom-$:T.top:T.bottom-$;F=Ze(f,p,r,a,i,a,T.left,o,T.right,s);break}case`bottom`:{let n=O?$/2:$*4,r=O||E?e+n:e-n,i=O?e-n:E?e+n:e-n,a=t-$,o=E||O?T.top+$:T.bottom,s=E?O?T.top+$:T.bottom:T.top+$;F=Ze(f,p,r,a,i,a,T.left,o,T.right,s);break}case`left`:{let n=k?$/2:$*4,r=k||D?t+n:t-n,i=k?t-n:D?t+n:t-n,a=e+$+1,o=D||k?T.right-$:T.left,s=D?k?T.right-$:T.left:T.right-$;F=Ze(f,p,o,T.top,s,T.bottom,a,r,a,i);break}case`right`:{let n=k?$/2:$*4,r=k||D?t+n:t-n,i=k?t-n:D?t+n:t-n,a=e-$,o=D||k?T.left+$:T.right,s=D?k?T.left+$:T.right:T.left+$;F=Ze(f,p,a,r,a,i,o,T.top,s,T.bottom);break}}F?u||r.start(40,C):C()}};return i.__options={...e,blockPointerEvents:t},i}function tt(e,t,n){let{reference:r,floating:i}=e,a=Q(t),o=ve(t),s=_e(o),c=X(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Z(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function nt(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Y(t,e),p=Ae(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=je(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=je(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var rt=50,it=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:nt},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=tt(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<rt&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=tt(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},at=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Y(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=X(r),_=Q(o),v=X(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Oe(o)]:be(o)),x=p!==`none`;!d&&x&&b.push(...De(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ye(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Q(t)||T.every(e=>Q(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Q(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},ot=new Set([`left`,`top`]);async function st(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=X(n),s=Z(n),c=Q(n)===`y`,l=ot.has(o)?-1:1,u=a&&c?-1:1,d=Y(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ct=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await st(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},lt=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Y(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Q(i),p=ge(f),m=u[p],h=u[f],g=(e,t)=>he(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},ut=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Y(e,t),u={x:n,y:r},d=Q(i),f=ge(d),p=u[f],m=u[d],h=Y(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ot.has(X(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},dt=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Y(e,t),c=await i.detectOverflow(t,s),l=X(n),u=Z(n),d=Q(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=fe(p-c[m],g),y=fe(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*K(c.left,c.right):S=p-2*K(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function ft(e){let t=V(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=H(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=q(n)!==a||q(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function pt(e){return N(e)?e:e.contextElement}function mt(e){let t=pt(e);if(!H(t))return J(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ft(t),o=(a?q(n.width):n.width)/r,s=(a?q(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ht=J(0);function gt(e){let t=I(e);return!M()||!t.visualViewport?ht:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _t(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===I(e)}function vt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=pt(e),o=J(1);t&&(r?N(r)&&(o=mt(r)):o=mt(e));let s=_t(a,n,r)?gt(a):J(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=I(a),t=N(r)?I(r):r,n=e,i=ne(n);for(;i&&t!==n;){let e=mt(i),t=i.getBoundingClientRect(),r=V(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=I(i),i=ne(n)}}return je({width:u,height:d,x:c,y:l})}function yt(e,t){let n=F(e).scrollLeft;return t?t.left+n:vt(R(e)).left+n}function bt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-yt(e,n),y:n.top+t.scrollTop}}function xt(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=R(r),s=t?re(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=J(1),u=J(0),d=H(r);if((d||!a)&&((P(r)!==`body`||ie(o))&&(c=F(r)),d)){let e=vt(r);l=mt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?bt(o,c):J(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function St(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ct(e){let t=F(e),n=e.ownerDocument.body,r=K(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=K(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+yt(e),o=-t.scrollTop;return V(n).direction===`rtl`&&(a+=K(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var wt=25;function Tt(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=I(e),a=R(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!M()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(yt(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=wt&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Et(e,t){let n=vt(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=mt(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Dt(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Tt(e,n,t);else if(t===`document`)r=Ct(R(e));else if(N(t))r=Et(t,n);else{let n=gt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return je(r)}function Ot(e,t){let n=t.get(e);if(n)return n;let r=B(e,[],!1).filter(e=>N(e)&&P(e)!==`body`),i=null,a=V(e).position===`fixed`,o=a?z(e):e;for(;N(o)&&!U(o);){let e=V(o),t=te(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=z(o)}return t.set(e,r),r}function kt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?re(t)?[]:Ot(t,this._c):[].concat(n),r],o=Dt(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Dt(t,a[e],i);s=K(n.top,s),c=fe(n.right,c),l=fe(n.bottom,l),u=K(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function At(e){let{width:t,height:n}=ft(e);return{width:t,height:n}}function jt(e,t,n){let r=H(t),i=R(t),a=n===`fixed`,o=vt(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=J(0);if((r||!a)&&((P(t)!==`body`||ie(i))&&(s=F(t)),r)){let e=vt(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=yt(i));let l=i&&!r&&!a?bt(i,s):J(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Mt(e){return V(e).position===`static`}function Nt(e,t){if(!H(e)||V(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return R(e)===n&&(n=n.ownerDocument.body),n}function Pt(e,t){let n=I(e);if(re(e))return n;if(!H(e)){let t=z(e);for(;t&&!U(t);){if(N(t)&&!Mt(t))return t;t=z(t)}return n}let r=Nt(e,t);for(;r&&O(r)&&Mt(r);)r=Nt(r,t);return r&&U(r)&&Mt(r)&&!te(r)?n:r||ee(e)||n}var Ft=async function(e){let t=this.getOffsetParent||Pt,n=this.getDimensions,r=await n(e.floating);return{reference:jt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function It(e){return V(e).direction===`rtl`}var Lt={convertOffsetParentRelativeRectToViewportRelativeRect:xt,getDocumentElement:R,getClippingRect:kt,getOffsetParent:Pt,getElementRects:Ft,getClientRects:St,getDimensions:At,getScale:mt,isElement:N,isRTL:It};function Rt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zt(e,t,n){let r=null,i,a=R(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=pe(d),h=pe(a.clientWidth-(u+f)),g=pe(a.clientHeight-(d+p)),_=pe(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:K(0,fe(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Rt(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=I(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Bt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=pt(e),u=i||a?[...l?B(l):[],...t?B(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?zt(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?vt(e):null;c&&g();function g(){let t=vt(e);h&&!Rt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Vt=ct,Ht=lt,Ut=at,Wt=dt,Gt=ut,Kt=(e,t,n)=>{let r=new Map,i=n??{},a={...Lt,...i.platform,_c:r};return it(e,t,{...i,platform:a})},qt=typeof document<`u`?G.useLayoutEffect:function(){};function Jt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Jt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Yt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xt(e,t){let n=Yt(e);return Math.round(t*n)/n}function Zt(e){let t=G.useRef(e);return qt(()=>{t.current=e}),t}function Qt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=G.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=G.useState(r);Jt(f,r)||p(r);let[m,h]=G.useState(null),[g,_]=G.useState(null),v=G.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=G.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=G.useRef(null),C=G.useRef(null),w=G.useRef(u),T=c!=null,E=Zt(c),D=Zt(i),O=Zt(l),k=G.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Kt(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Jt(w.current,t)&&(w.current=t,de.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);qt(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=G.useRef(!1);qt(()=>(A.current=!0,()=>{A.current=!1}),[]),qt(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=G.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=G.useMemo(()=>({reference:b,floating:x}),[b,x]),N=G.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Xt(M.floating,u.x),r=Xt(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Yt(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return G.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var $t=(e,t)=>{let n=Vt(e);return{name:n.name,fn:n.fn,options:[e,t]}},en=(e,t)=>{let n=Ht(e);return{name:n.name,fn:n.fn,options:[e,t]}},tn=(e,t)=>({fn:Gt(e).fn,options:[e,t]}),nn=(e,t)=>{let n=Ut(e);return{name:n.name,fn:n.fn,options:[e,t]}},rn=(e,t)=>{let n=Wt(e);return{name:n.name,fn:n.fn,options:[e,t]}};function an(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=G.useState(null),d=G.useRef(null),f=p(n),m=G.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),h=Qt({...e,elements:{...m,...l&&{reference:l}}}),g=G.useCallback(e=>{let t=N(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),h.refs.setReference(t)},[h.refs]),_=G.useMemo(()=>({...h.refs,setPositionReference:g,domReference:d}),[h.refs,g]),v=G.useMemo(()=>({...h.elements,domReference:o}),[h.elements,o]),y=G.useMemo(()=>({...h,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:_,elements:v,nodeId:t,rootStore:r}),[h,_,v,t,r,s,c]);return L(()=>{o&&(d.current=o)},[o]),L(()=>{r.context.dataRef.current.floatingContext=y;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),G.useMemo(()=>({...h,context:y,refs:_,elements:v,rootStore:r}),[h,_,v,y,r])}var on=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Y(e,t)||{};if(l==null)return{};let d=Ae(u),f={x:n,y:r},p=ve(i),m=_e(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=he(D,k,O),j=!c.arrow&&Z(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),sn=(e,t)=>{let{name:n,fn:r}=on(e);return{name:n,fn:r,options:[e,t]}},cn={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},ln={sideX:`left`,sideY:`top`},un=`--available-width`,dn=`--available-height`,fn=`--anchor-width`,pn=`--anchor-height`,mn=`--transform-origin`,hn=un,gn=dn;function _n(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function vn(e,t,n){let{rects:r,placement:i}=e;return{side:_n(t,X(i),n),align:Z(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function yn(e){return bn(e,an)}function bn(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:y,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:w}=e,T=_.side||`flip`,O=_.align||`flip`,k=_.fallbackAxisSide||`end`,A=y?.crossAxis??!1,j=y?.rootBoundary,M=typeof n==`function`?n:void 0,N=D(M),ee=M?N:n,P=C(n),F=C(g),te=E()===`rtl`,[R,z]=G.useState(null);!g&&R!==null&&z(null);let B=S===`placement`,V=R?X(R):null,ne=R&&B?Z(R)||`center`:null,H=V||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":te?`left`:`right`,"inline-start":te?`right`:`left`}[i],re=ne||o,ie=re===`center`?H:`${H}-${re}`,U=l;typeof U==`number`?U={top:U,right:U,bottom:U,left:U}:U&&={top:U.top||0,right:U.right||0,bottom:U.bottom||0,left:U.left||0};let ae=+(i===`bottom`),oe=+(i===`top`),se=+(i===`right`),ce=+(i===`left`),le={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:U},W=G.useRef(null),ue=C(a),de=C(s),fe=typeof a==`function`?0:a,K=typeof s==`function`?0:s,q=[];p&&q.push(p),q.push($t(e=>{let t=vn(e,i,te),n=typeof ue.current==`function`?ue.current(t):ue.current,r=typeof de.current==`function`?de.current(t):de.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[fe,K,te,i]));let pe=O===`none`&&T!==`shift`,J=!pe&&(u||A||T===`shift`),me=T===`none`?null:nn({...le,padding:{top:U.top+1+ae,right:U.right+1+ce,bottom:U.bottom+1+oe,left:U.left+1+se},mainAxis:!A&&T===`flip`,crossAxis:O===`flip`&&`alignment`,fallbackAxisSideDirection:k}),he=pe?null:en({...le,rootBoundary:j,mainAxis:O!==`none`,crossAxis:J,limiter:u||A?void 0:tn(e=>{if(!W.current)return{};let{width:t,height:n}=W.current.getBoundingClientRect(),r=Q(X(e.placement)),i=r===`y`?t:n,a=r===`y`?U.left+U.right:U.top+U.bottom;return{offset:i/2+a/2}})},[le,u,A,j,U,O]);T===`shift`||O===`shift`||re===`center`?q.push(he,me):q.push(me,he),q.push(rn({...le,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!F.current)return;let i=e.style;i.setProperty(hn,`${t}px`),i.setProperty(gn,`${n}px`);let a=I(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(fn,`${u}px`),i.setProperty(pn,`${d}px`)}}),sn(e=>({element:W.current||v(e.elements.floating).createElement(`div`),padding:W.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=X(r),u=Z(r),d=Q(l)===`y`,f=W.current,p=typeof a==`function`?a(vn(e,i,te)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return J&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(mn,d?`${m} ${h}`:`${h} ${m}`),{}}},cn,x),L(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let Y=G.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:ge,elements:_e,x:ve,y:ye,middlewareData:be,update:xe,placement:Se,context:Ce,isPositioned:we,floatingStyles:Te}=t({rootContext:h,open:m?g:void 0,placement:ie,middleware:q,strategy:r,whileElementsMounted:m?void 0:(...e)=>Bt(...e,Y),nodeId:b,externalTree:w}),{sideX:Ee,sideY:De}=be.adaptiveOrigin||ln,Oe=we?r:`fixed`,ke=G.useMemo(()=>{let e;return e=we?x?{position:Oe,[Ee]:ve,[De]:ye}:{...Te,position:Oe}:{position:Oe,top:0,left:0},e[hn]=`100vw`,e[gn]=`100vh`,we||(e.opacity=0),e},[x,Oe,Ee,ve,De,ye,Te,we]),Ae=G.useRef(null);L(()=>{if(!g)return;let e=P.current,t=typeof e==`function`?e():e,n=(xn(t)?t.current:t)||null;n!==Ae.current&&(ge.setPositionReference(n),Ae.current=n)},[g,ge,ee,P]),G.useEffect(()=>{if(!g)return;let e=P.current;typeof e!=`function`&&xn(e)&&e.current!==Ae.current&&(ge.setPositionReference(e.current),Ae.current=e.current)},[g,ge,ee,P]),G.useEffect(()=>{if(m&&g&&_e.reference&&_e.floating)return Bt(_e.reference,_e.floating,xe,Y)},[m,g,_e,xe,Y]);let je=X(Se),Me=_n(i,je,te),Ne=Z(Se)||`center`,Pe=!!be.hide?.referenceHidden;L(()=>{S&&g&&we&&(je!==H||B&&Ne!==re)&&z(Se)},[S,B,g,we,Se,je,Ne,H,re]);let Fe=G.useMemo(()=>({position:`absolute`,top:be.arrow?.y,left:be.arrow?.x}),[be.arrow]),Ie=be.arrow?.centerOffset!==0;return G.useMemo(()=>({positionerStyles:ke,arrowStyles:Fe,arrowRef:W,arrowUncentered:Ie,side:Me,align:Ne,physicalSide:je,anchorHidden:Pe,refs:ge,context:Ce,isPositioned:we,update:xe}),[ke,Fe,W,Ie,Me,Ne,je,Pe,ge,Ce,we,xe])}function xn(e){return e!=null&&`current`in e}function Sn(e){return e===`starting`?g:j}function Cn(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let l={...n};return s&&(l.pointerEvents=`none`),A(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:l},Sn(r),i],stateAttributesMapping:c})}export{qe as a,ze as c,et as i,Le as l,Sn as n,Ge as o,yn as r,We as s,Cn as t,Ne as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t,O as n}from"./matchContext-BquevSJS.js";import{A as r,H as i,L as a,k as o,z as s}from"./button-DVWXde__.js";var c=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return l(e,t,null,n)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),l=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=c()})),u=e(l(),1),d=e(t(),1);function f(e){d.useEffect(e,a)}var p=null;globalThis.requestAnimationFrame;var m=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},h=class e{static create(){return new e}static request(e){return m.request(e)}static cancel(e){return m.cancel(e)}currentId=p;request(e){this.cancel(),this.currentId=m.request(()=>{this.currentId=p,e()})}cancel=()=>{this.currentId!==p&&(m.cancel(this.currentId),this.currentId=p)};disposeEffect=()=>this.cancel};function g(){let e=i(h.create).current;return f(e.disposeEffect),e}function _(e){return e==null?e:`current`in e?e.current:e}function v(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var y=`data-starting-style`,b=`data-ending-style`,x=null;function S(e){if(!x){let e=[];x=e,queueMicrotask(()=>{x=null,u.flushSync(()=>{for(let t of e)t()})})}x.push(e)}function C(e,t=!1,n=!1){let i=g();return r((r,a=null)=>{i.cancel();let o=_(e);if(o==null)return;let c=o,l=()=>{n?S(()=>{a?.aborted||r()}):u.flushSync(r)};if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function d(){Promise.all(v(c).map(e=>e.finished.then(s))).then(()=>{a?.aborted||l()},()=>{a?.aborted||(v(c).some(e=>e.pending||e.playState!==`finished`)?d():l())})}if(t){let e=y;if(!c.hasAttribute(e)){i.request(d);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),d())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else i.request(d)})}function w(e){let{enabled:t=!0,open:n,ref:i,batch:a=!1,onComplete:o}=e,s=r(o),c=C(i,n,a);d.useEffect(()=>{if(!t)return;let e=new AbortController;return c(s,e.signal),()=>{e.abort()}},[t,n,s,c])}var T={[y]:``},E={[b]:``},D={transitionStatus(e){return e===`starting`?T:e===`ending`?E:null}};function O(e,t=!1,n=!1,r=!1){let[i,a]=d.useState(e&&t?`idle`:void 0),[s,c]=d.useState(e&&!r);return e&&!s&&(c(!0),a(`starting`)),!e&&s&&i!==`ending`&&!n&&a(`ending`),!e&&!s&&i===`ending`&&a(void 0),o(()=>{if(!e&&s&&i!==`ending`&&n){let e=h.request(()=>{a(`ending`)});return()=>{h.cancel(e)}}},[e,s,i,n]),o(()=>{if(!e||t||i===void 0)return;let n=h.request(()=>{a(void 0)});return()=>{h.cancel(n)}},[t,e,i]),o(()=>{if(!e||!t)return;e&&s&&i!==`idle`&&a(`starting`);let n=h.request(()=>{a(`idle`)});return()=>{h.cancel(n)}},[t,e,s,i]),{mounted:s,setMounted:c,transitionStatus:i}}var k=0,A=class e{static create(){return new e}currentId=k;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=k,t()},e)}isStarted(){return this.currentId!==k}clear=()=>{this.currentId!==k&&(clearTimeout(this.currentId),this.currentId=k)};disposeEffect=()=>this.clear};function j(){let e=i(A.create).current;return f(e.disposeEffect),e}export{w as a,y as c,g as d,f,D as i,_ as l,j as n,C as o,l as p,O as r,b as s,A as t,h as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,O as t}from"./matchContext-BquevSJS.js";var n=t((t=>{var n=e();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;t.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),r=t(((e,t)=>{t.exports=n()})),i=t((t=>{var n=e(),i=r();function a(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:a,s=i.useSyncExternalStore,c=n.useRef,l=n.useEffect,u=n.useMemo,d=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=c(null);if(a.current===null){var f={hasValue:!1,value:null};a.current=f}else f=a.current;a=u(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,o(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var a=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,a[0],a[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),a=t(((e,t)=>{t.exports=i()}));export{r as n,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./matchContext-BquevSJS.js";import{Xt as t,l as n}from"./page-DWnGi6wA.js";import{n as r}from"./useNavigate-BW1WdocJ.js";import{G as i}from"./button-DVWXde__.js";import{i as a,t as o}from"./strings-CW2XaR5f.js";import{C as s,S as c,T as l,f as u,w as d}from"./index-BymNZU1Q.js";import{t as f}from"./use-now-0P8TUXeg.js";import{r as p}from"./status-badge-DnvNo1tG.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./table-BjyI4fVI.js";import{t as b}from"./fill-cell-ClM88KFD.js";import{d as x,l as S,t as C}from"./section-Id99HktI.js";import{t as w}from"./slots-BraHmbNr.js";var T=e(),E={passed:{state:`Succeeded`,label:`Passed`},degraded:{state:`Waiting`,label:`Degraded`},deferred:{state:`Deferred`,label:`Deferred`},failed:{state:`Failed`,label:`Failed`}},D=({worker:e})=>{let{state:t,checkedAt:r}=s(e);return t===`unchecked`?(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`Not checked`}):(0,T.jsxs)(`span`,{className:`inline-flex flex-wrap items-baseline gap-x-2`,children:[(0,T.jsx)(p,{...E[t]}),r!==null&&(0,T.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground tabular-nums`,children:n(r)})]})},O=({worker:e})=>{let t=f(15e3),n=r(),s={worker:e.name};return(0,T.jsxs)(S,{open:()=>void n({to:`/configuration/workers/$worker`,params:s}),children:[(0,T.jsx)(v,{className:`py-3`,children:(0,T.jsx)(i,{to:`/configuration/workers/$worker`,params:s,onClick:e=>e.stopPropagation(),className:x,children:e.name})}),(0,T.jsx)(v,{children:d[e.kind]}),(0,T.jsx)(v,{className:`hidden font-mono text-xs @2xl:table-cell`,children:l(e)}),(0,T.jsx)(v,{className:`tabular-nums`,children:e.slots===null?(0,T.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.maxConcurrentAttempts,` max`]}):(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,T.jsx)(w,{slots:e.slots}),(0,T.jsxs)(`span`,{className:`max-sm:sr-only`,children:[e.slots.leased,` of `,e.slots.capacity]})]})}),(0,T.jsxs)(b,{className:`whitespace-normal`,children:[(0,T.jsx)(D,{worker:e}),e.provisioning?.blocked===!0&&(0,T.jsxs)(`p`,{className:`text-xs text-destructive tabular-nums`,title:e.provisioning.message,children:[o(e.provisioning),`.`,` `,a(e.provisioning,t)]})]})]})},k=({configuration:e})=>{let t=e.workers.some(({slots:e})=>e!==null);return(0,T.jsxs)(C,{title:`Workers`,counts:c(e.workers.length,`worker`),children:[!t&&(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempts run until the GitHub App is set up.`}),(0,T.jsx)(`div`,{className:`@container -mx-2`,children:(0,T.jsxs)(y,{children:[(0,T.jsx)(m,{children:(0,T.jsxs)(_,{className:`hover:bg-transparent`,children:[(0,T.jsx)(h,{children:`Worker`}),(0,T.jsx)(h,{children:`Kind`}),(0,T.jsx)(h,{className:`hidden @2xl:table-cell`,children:`Location`}),(0,T.jsx)(h,{children:`Slots in use`}),(0,T.jsx)(h,{children:`Last preflight`})]})}),(0,T.jsx)(g,{children:e.workers.map(e=>(0,T.jsx)(O,{worker:e},e.name))})]})}),e.removedWorkers.length>0&&(0,T.jsx)(`ul`,{className:`flex flex-col gap-1 text-muted-foreground`,children:e.removedWorkers.map(({name:e,running:t})=>(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:e}),` removed by a reload,`,` `,c(t,`attempt`),` still running`]},e))})]})},A=()=>{let{data:e}=t(u());return(0,T.jsx)(k,{configuration:e})};export{A as component};
|
package/dist/web/index.html
CHANGED
|
@@ -3,17 +3,23 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<meta name="theme-color" content="#
|
|
6
|
+
<meta name="theme-color" content="#181825" />
|
|
7
7
|
<title>usine</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/button-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/with-selector-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
16
|
-
<link rel="
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BymNZU1Q.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/matchContext-BquevSJS.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/button-DVWXde__.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/page-DWnGi6wA.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/error-alert-9tKpTE3v.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/with-selector-DoElmmtd.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/useTimeout-_TcdZXP6.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/strings-CW2XaR5f.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/overview-C_tFKGZ8.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/mark-CC3RwMy_.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/useNavigate-BW1WdocJ.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/reload-Dsl0zjJ7.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/X.es-B7iqdxa_.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/usePositioner-rNCxnHO-.js">
|
|
22
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Dyjfp3ET.css">
|
|
17
23
|
</head>
|
|
18
24
|
<body>
|
|
19
25
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usine/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "The usine orchestrator as a headless server: a thin CLI over @usine/orchestrator that serves the web UI.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/basaltbytes/usine.git",
|
|
@@ -12,25 +12,30 @@
|
|
|
12
12
|
"usine": "./dist/main.js"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
15
|
+
"dist",
|
|
16
|
+
"!dist/tsconfig.tsbuildinfo"
|
|
16
17
|
],
|
|
17
18
|
"type": "module",
|
|
18
19
|
"publishConfig": {
|
|
19
20
|
"access": "public"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@effect/platform-node": "4.0.
|
|
23
|
-
"effect": "4.0.
|
|
24
|
-
"
|
|
25
|
-
"@usine/
|
|
26
|
-
"@usine/
|
|
27
|
-
"@usine/
|
|
28
|
-
"@usine/
|
|
29
|
-
"@usine/orchestrator": "0.
|
|
23
|
+
"@effect/platform-node": "4.0.6",
|
|
24
|
+
"@effect/platform-node-shared": "4.0.6",
|
|
25
|
+
"effect": "4.0.6",
|
|
26
|
+
"@usine/config": "0.4.0",
|
|
27
|
+
"@usine/core": "0.5.0",
|
|
28
|
+
"@usine/durable": "0.2.0",
|
|
29
|
+
"@usine/expression": "0.4.0",
|
|
30
|
+
"@usine/orchestrator": "0.4.0",
|
|
31
|
+
"@usine/github": "0.3.0",
|
|
32
|
+
"@usine/engine": "0.5.0"
|
|
30
33
|
},
|
|
31
34
|
"devDependencies": {
|
|
32
35
|
"typescript": "7.0.2",
|
|
33
|
-
"vitest": "
|
|
36
|
+
"vitest": "5.0.5",
|
|
37
|
+
"yaml": "2.9.1",
|
|
38
|
+
"@usine/executor": "0.4.0",
|
|
34
39
|
"@usine/tsconfig": "0.0.0",
|
|
35
40
|
"@usine/web": "0.0.0"
|
|
36
41
|
},
|