@open-mercato/cezar 0.20.0-pr2192.5251 → 0.20.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/dist/server/agent-setup-routes.d.ts +14 -14
- package/dist/server/dashboard.d.ts +54 -54
- package/dist/server/server.d.ts +68 -68
- package/dist/server/worktree-lifecycle.d.ts +90 -90
- package/dist/telemetry-service.json +1 -0
- package/dist/workflows/run-env-keys.d.ts +8 -0
- package/dist/workflows/run-env-keys.js +14 -0
- package/dist/workflows/run-env-keys.js.map +1 -0
- package/package.json +5 -5
- package/web/dist/assets/{active-forge-KyXM3uG9.js → active-forge-CkAcQPDz.js} +1 -1
- package/web/dist/assets/{agent-task-pickers-UkVtTCna.js → agent-task-pickers-BXCIulS3.js} +1 -1
- package/web/dist/assets/{alert-dialog-DT465VL4.js → alert-dialog-B2Vi6MQZ.js} +1 -1
- package/web/dist/assets/{ask-card-DVv8mY_R.js → ask-card-DPIjQSs8.js} +1 -1
- package/web/dist/assets/{assets-view-D22vr-oN.js → assets-view-CsFjfV2n.js} +1 -1
- package/web/dist/assets/{automation-format-KxcnBz7L.js → automation-format-CMG-6CYi.js} +1 -1
- package/web/dist/assets/{automations-route-3gfbxDq2.js → automations-route-Dd7F6b4F.js} +1 -1
- package/web/dist/assets/{button-CEskWahs.js → button-CJXK1JqU.js} +1 -1
- package/web/dist/assets/{centered-state-Cpzaj75Y.js → centered-state-DE6sgEMs.js} +1 -1
- package/web/dist/assets/{chip-CEZRGBV7.js → chip-DTCkrr8F.js} +1 -1
- package/web/dist/assets/{collapsible-ZLdkcdMa.js → collapsible-DHALizq-.js} +1 -1
- package/web/dist/assets/{command-CcbuBum7.js → command-CwP_dLx3.js} +1 -1
- package/web/dist/assets/{commit-list-BSjLQA6p.js → commit-list-BJeaIEp4.js} +1 -1
- package/web/dist/assets/{compare-variants-C9soYpuE.js → compare-variants-CYv97XSw.js} +1 -1
- package/web/dist/assets/{composer-Bz8ZfbHr.js → composer-C-aBJhY0.js} +1 -1
- package/web/dist/assets/{composer-attachments-BD2enHFJ.js → composer-attachments-ChelZhq4.js} +1 -1
- package/web/dist/assets/{dashboard-Bl6qWW8i.js → dashboard-Dh65_Yi7.js} +1 -1
- package/web/dist/assets/{dialog-nn9sCNvn.js → dialog-DVZE8yAO.js} +1 -1
- package/web/dist/assets/{diff-FrEDv09S.js → diff-aKT-mpn8.js} +2 -2
- package/web/dist/assets/{diff-stat-zisAayZW.js → diff-stat-DPetRUXO.js} +1 -1
- package/web/dist/assets/{diff-view-BeoeZVcx.js → diff-view-m4TvXu0y.js} +1 -1
- package/web/dist/assets/{dist-B_KqW6o6.js → dist-Bsi6zLdE.js} +1 -1
- package/web/dist/assets/{dropdown-menu-ayNafd3n.js → dropdown-menu-BKvUsb5Y.js} +1 -1
- package/web/dist/assets/{file-preview-Dzc3RFUx.js → file-preview-C2EkjhOh.js} +1 -1
- package/web/dist/assets/{follow-up-engine-Dul_3U9s.js → follow-up-engine-BnRCTyQ4.js} +1 -1
- package/web/dist/assets/{git-tab-loading-DG4p-eF4.js → git-tab-loading-DpG2D8Vl.js} +1 -1
- package/web/dist/assets/{github-DvZE0hDJ.js → github-CWRtsamJ.js} +1 -1
- package/web/dist/assets/{host-usage-GTjB03IM.js → host-usage-B8ohHYHR.js} +1 -1
- package/web/dist/assets/{icon-tooltip-DRhwcic2.js → icon-tooltip-DYk5cjLx.js} +1 -1
- package/web/dist/assets/{impact-control-CTdtyfcn.js → impact-control-ClslFBBA.js} +1 -1
- package/web/dist/assets/{impact-model-CpNcUgTV.js → impact-model-DCDyRxcf.js} +1 -1
- package/web/dist/assets/{index-BMA7ZpLG.js → index-BfbbA0lF.js} +4 -4
- package/web/dist/assets/{input-BtDLUR9Q.js → input-DofKzJZl.js} +1 -1
- package/web/dist/assets/{loading-state-BTvZxCb2.js → loading-state-NiNQtJ5H.js} +1 -1
- package/web/dist/assets/{manager-avatar-Ct1uVuvZ.js → manager-avatar-CKfqcoJQ.js} +1 -1
- package/web/dist/assets/{manager-chat-BfxPyXv3.js → manager-chat-BdigDKYZ.js} +1 -1
- package/web/dist/assets/{manager-index-CeMdRtKd.js → manager-index-D0TOmxr6.js} +1 -1
- package/web/dist/assets/{manager-new-Bs8_CMUR.js → manager-new-CCet_7u8.js} +1 -1
- package/web/dist/assets/{manager-settings-Bv2EqZvs.js → manager-settings-I1AeATjr.js} +1 -1
- package/web/dist/assets/{managers-DDPXJoKR.js → managers-Dr63u21Y.js} +1 -1
- package/web/dist/assets/{markdown-3rt1rOmI.js → markdown-CXJIKz2i.js} +1 -1
- package/web/dist/assets/{markdown-LlPZylt7.js → markdown-YSf01kqC.js} +1 -1
- package/web/dist/assets/{mascot-picker-BuGxdrpW.js → mascot-picker-C4s7n9Fc.js} +1 -1
- package/web/dist/assets/{new-task-form-BoiK41PS.js → new-task-form-2p4cXcVQ.js} +1 -1
- package/web/dist/assets/{picker-pill-CzANlEqt.js → picker-pill-Dv9H0dRF.js} +1 -1
- package/web/dist/assets/{pill-C2wRS9lg.js → pill-CoDPUIcJ.js} +1 -1
- package/web/dist/assets/{popover-DPba6FvD.js → popover-DUg9gBOn.js} +1 -1
- package/web/dist/assets/{project-router-CnMbTz-a.js → project-router-B1Q3upIJ.js} +1 -1
- package/web/dist/assets/{project-terminal-sfYncenW.js → project-terminal-DbIohh5G.js} +2 -2
- package/web/dist/assets/{provider-auth-alert-DbNH_-XT.js → provider-auth-alert-GxIEkIvw.js} +1 -1
- package/web/dist/assets/{queries-DVZ1lYAo.js → queries-BQUz3Wnb.js} +1 -1
- package/web/dist/assets/{reasoning-effort-pill-al6bbPpw.js → reasoning-effort-pill-BOV3C0If.js} +1 -1
- package/web/dist/assets/{reference-chip-DdxKs2_A.js → reference-chip-BpbybBvl.js} +1 -1
- package/web/dist/assets/{reference-conflict-action-Ci4LDmIm.js → reference-conflict-action-ByDYwT-Y.js} +1 -1
- package/web/dist/assets/{repo-git-BcEGYBrc.js → repo-git-ikURCYEK.js} +1 -1
- package/web/dist/assets/{run-actions-CDKK-8MP.js → run-actions-ChUnbFA7.js} +1 -1
- package/web/dist/assets/{run-diff-JJOUeclX.js → run-diff-B08Fk7dR.js} +1 -1
- package/web/dist/assets/{scroll-within-CfS_Ia4E.js → scroll-within-DMA4ZbQV.js} +1 -1
- package/web/dist/assets/{segmented-Chb1Y4ie.js → segmented-DI7abdqX.js} +1 -1
- package/web/dist/assets/{select-DG3hFvx2.js → select-DL5E3ZAD.js} +1 -1
- package/web/dist/assets/{sheet-DirfZrZD.js → sheet-DPwaj6sk.js} +1 -1
- package/web/dist/assets/{skills-CxWFZgjH.js → skills-BNiKFlUw.js} +1 -1
- package/web/dist/assets/{spinner-CwKcijCN.js → spinner-hSpq0sPM.js} +1 -1
- package/web/dist/assets/{status-dot-CZAbXsOs.js → status-dot-AP_4obOJ.js} +1 -1
- package/web/dist/assets/{tabs-r4PCzkHp.js → tabs-DrhZb97I.js} +1 -1
- package/web/dist/assets/{task-commits-CHnonzuD.js → task-commits-Di0Mc8MX.js} +1 -1
- package/web/dist/assets/{task-graph-DZAjkdmH.js → task-graph-Bpi3lEER.js} +1 -1
- package/web/dist/assets/{task-notes-CHs_WZf5.js → task-notes-DCHLinAF.js} +1 -1
- package/web/dist/assets/{task-workspace-DWGBLHlR.js → task-workspace-DHl5akxu.js} +3 -3
- package/web/dist/assets/{telemetry-onLa6CTl.js → telemetry-3DhVDxf8.js} +1 -1
- package/web/dist/assets/{terminal-drawer-DV7kUP0D.js → terminal-drawer-CEktqC3z.js} +1 -1
- package/web/dist/assets/{terminal-pane-DQAHtCtb.js → terminal-pane-CmmTwiTX.js} +1 -1
- package/web/dist/assets/{terminal-scope-CEQdw5Tz.js → terminal-scope-okFE6qRP.js} +1 -1
- package/web/dist/assets/{textarea-BqeSvPOp.js → textarea-DDyYxCcO.js} +1 -1
- package/web/dist/assets/{thread-items-CNxMLcOo.js → thread-items-C-4IW5zi.js} +1 -1
- package/web/dist/assets/{toaster-4t61QM_C.js → toaster-BoJZiTRl.js} +1 -1
- package/web/dist/assets/{tracker-B7u8exjG.js → tracker-bQUG9SkJ.js} +1 -1
- package/web/dist/assets/{tree-pane-resize-XHzIJDtc.js → tree-pane-resize-xgVK7J9r.js} +1 -1
- package/web/dist/assets/utils-Dp6vCdiU.js +55 -0
- package/web/dist/assets/{workflow-graph-BaZd6m6v.js → workflow-graph-CGMeFErv.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-YFVatYLd.js → worktree-lifecycle-C18dBDW4.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-operation-CYHhFvQF.js → worktree-lifecycle-operation-_xqKBVKB.js} +1 -1
- package/web/dist/assets/{zoomable-image-D4B6jvp-.js → zoomable-image-BiM5LfTG.js} +1 -1
- package/web/dist/index.html +46 -46
- package/web/dist/assets/utils-DWwoYTjU.js +0 -60
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r,Bi as i,D as a,Dn as o,Do as s,F as c,It as l,Kt as u,Lr as d,M as f,N as p,O as m,Un as h,Y as g,ai as _,cn as v,go as y,ii as b,in as ee,k as x,oi as S,r as C,ri as te,sa as ne,si as w,vo as T,xo as E,yo as D}from"./queries-DVZ1lYAo.js";import{c as O,n as k,t as A,wt as j}from"./utils-DWwoYTjU.js";import{S as re,i as ie,t as M}from"./project-router-CnMbTz-a.js";import{t as ae}from"./segmented-Chb1Y4ie.js";import{a as oe,i as N,o as se,r as ce,t as le}from"./sheet-DirfZrZD.js";import{t as ue}from"./arrow-left-BfRd_mrv.js";import{l as de,s as fe}from"./reference-chip-DdxKs2_A.js";import{j as pe}from"./run-actions-CDKK-8MP.js";import{H as P,V as me,t as F}from"./button-CEskWahs.js";import{t as he}from"./chevron-left-D0UFBpi5.js";import{r as ge}from"./dist-B_KqW6o6.js";import{i as _e,n as ve,o as ye,s as be,t as xe}from"./select-DG3hFvx2.js";import{t as Se}from"./circle-check-BpDFgE5h.js";import{_ as Ce}from"./dropdown-menu-ayNafd3n.js";import{t as I}from"./workflow-BEP63Wt4.js";import{t as L}from"./external-link-BE6y205O.js";import{m as we}from"./impact-model-CpNcUgTV.js";import{t as Te}from"./git-pull-request-DUnpdU6m.js";import{t as Ee}from"./loader-circle-CPBhhDbB.js";import{t as R}from"./message-square-B-MD-8rD.js";import{_ as De,a as Oe,b as ke,c as Ae,d as je,i as z,l as Me,o as B,x as V}from"./composer-Bz8ZfbHr.js";import{t as H}from"./play-CmVAj_fu.js";import{t as Ne}from"./refresh-cw-BIgmYimN.js";import{t as Pe}from"./search-BjsZLqse.js";import{t as U}from"./tag-k3n7EuAm.js";import{t as W}from"./textarea-BqeSvPOp.js";import{t as Fe}from"./triangle-alert-CIzim6ZN.js";import{t as Ie}from"./user-round-V2FYByS8.js";import{t as G}from"./x-BqECUykl.js";import{t as Le}from"./zap-2VEI5zT4.js";import{i as K,r as Re,t as q}from"./popover-DPba6FvD.js";import{t as ze}from"./icon-tooltip-DRhwcic2.js";import{a as J,i as Be,n as Ve,o as He,r as Ue,t as We}from"./dialog-nn9sCNvn.js";import{l as Ge}from"./loading-state-BTvZxCb2.js";import{r as Y}from"./toaster-4t61QM_C.js";import{m as Ke}from"./telemetry-onLa6CTl.js";import{r as X}from"./format-BUbPQpzw.js";import{t as qe}from"./status-dot-CZAbXsOs.js";import{a as Je,o as Ye,r as Xe,s as Ze,t as Qe}from"./command-CcbuBum7.js";import{n as $e,t as et}from"./use-submit-shortcut-Cfam5eE7.js";import{t as tt}from"./centered-state-Cpzaj75Y.js";import{t as nt}from"./chip-CEZRGBV7.js";import{t as rt}from"./lib-BQXq3kEf.js";import{t as it}from"./markdown-LlPZylt7.js";import{A as at,C as ot,D as st,E as ct,M as lt,O as ut,S as dt,T as ft,_ as pt,b as mt,g as ht,h as gt,j as _t,k as vt,m as yt,rt as bt,v as xt,x as St,y as Ct}from"./index-BMA7ZpLG.js";import{i as wt,n as Tt,r as Et,t as Dt}from"./agent-task-pickers-UkVtTCna.js";import{t as Ot}from"./diff-FrEDv09S.js";import{t as kt}from"./impact-control-CTdtyfcn.js";var Z=e(t(),1),Q=n();function At({item:e}){let t=l(),n=g(),i=o(Array.isArray(t.data)?t.data:[],e,n);return(0,Q.jsxs)(`section`,{"data-slot":`gh-related-tasks`,"aria-label":`Related tasks`,className:`mt-6 text-sm`,children:[(0,Q.jsx)(`h3`,{className:`eyebrow mb-2 text-muted-foreground`,children:`Related tasks`}),i.length===0?(0,Q.jsx)(`p`,{"data-slot":`gh-related-empty`,className:`text-soft-foreground`,children:t.isPending?`Loading…`:`No retained tasks reference this yet.`}):(0,Q.jsx)(`ul`,{className:`divide-y divide-border rounded-md border border-border`,children:i.map(e=>{let t=r(e);return(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(M,{to:`/tasks/${encodeURIComponent(e.id)}`,"data-slot":`gh-related-task`,className:`flex items-center gap-2 px-3 py-2 hover:bg-accent`,children:[(0,Q.jsx)(qe,{tone:t.tone,pulse:t.pulse,"aria-label":t.label,role:`img`}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:h(e)}),e.archived?(0,Q.jsx)(`span`,{className:`text-micro text-soft-foreground`,children:`archived`}):null,(0,Q.jsxs)(`span`,{className:`shrink-0 text-label text-muted-foreground`,children:[t.label,` · `,X(e.createdAt),` ago`]})]})},e.id)})})]})}var jt=class extends Error{};function Mt({src:e,alt:t,srcSet:n,...r}){y();let i=O(),a=typeof e==`string`?e:``,o=j(a),s=D({queryKey:[`github-asset`,i,a],queryFn:async({signal:e})=>{let t=await b(a,{signal:e},i);if(!t.available&&t.retryable)throw new jt;return t},enabled:o,staleTime:5*6e4,gcTime:6e4,retry:(e,t)=>t instanceof jt&&e<16,retryDelay:1e3});return o?s.data?.available?(0,Q.jsx)(`img`,{...r,src:s.data.dataUrl,alt:t}):(0,Q.jsxs)(`span`,{role:`img`,"aria-label":t||`Image`,children:[t||`Image`,s.isPending?` (loading…)`:` (unavailable)`]}):(0,Q.jsx)(`img`,{...r,src:e,alt:t})}function Nt({children:e}){return(0,Q.jsx)(it,{imageComponent:Mt,children:e})}function Pt({item:e}){if(e.kind!==`issue`||e.assignees===void 0&&e.linkedPrs===void 0)return null;let t=`inline-flex min-w-0 max-w-full items-center gap-1 rounded border border-border/70 px-1.5 py-0.5`;return(0,Q.jsxs)(`div`,{"aria-label":`Issue #${e.number} ownership`,role:`group`,className:`flex min-w-0 flex-wrap items-center gap-1 px-2.5 pb-2 pl-8 text-meta text-muted-foreground`,children:[e.assignees===void 0?null:(0,Q.jsxs)(`span`,{className:t,title:e.assignees.length?`Assigned to ${e.assignees.map(e=>`@${e}`).join(`, `)}`:void 0,children:[(0,Q.jsx)(Ie,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.assignees.length?`Assigned to ${e.assignees.map(e=>`@${e}`).join(`, `)}`:e.assigneesTruncated?`Assignees`:`Unassigned`})]}),e.assigneesTruncated&&k(e.url)?(0,Q.jsx)(`a`,{className:A(t,`hover:text-foreground focus-visible:outline focus-visible:outline-ring`),href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`More assignees for issue #${e.number}`,children:`More assignees…`}):null,e.linkedPrs?.map(e=>{let n=e.state===`merged`?`Merged`:e.state===`closed`?`Closed`:e.isDraft?`Draft`:`Open`,r=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Te,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Q.jsxs)(`span`,{className:`truncate`,children:[`PR #`,e.number,` · `,n]})]}),i=A(t,e.state===`merged`?`text-success`:e.state===`open`&&!e.isDraft?`text-info`:``);return k(e.url)?(0,Q.jsx)(`a`,{className:A(i,`hover:underline focus-visible:outline focus-visible:outline-ring`),href:e.url,target:`_blank`,rel:`noopener noreferrer`,title:`${e.title} — ${e.url}`,"aria-label":`PR #${e.number} · ${n}: ${e.title}`,children:r},e.url):(0,Q.jsx)(`span`,{className:i,children:r},e.url)}),e.linkedPrsTruncated&&k(e.url)?(0,Q.jsx)(`a`,{className:A(t,`hover:text-foreground focus-visible:outline focus-visible:outline-ring`),href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`More linked pull requests for issue #${e.number}`,children:`More linked PRs…`}):null]})}function Ft({item:e,workflows:t,skills:n,workflow:r,onWorkflowChange:i,selectedSkills:a,onSkillsChange:o,engine:s,onEngineChange:l,queuedRunId:u,onQueued:f}){let p=E(),m=ee(),h=e.kind===`pr`?`PR`:`issue`,g=a.filter(e=>n.some(t=>t.name===e)),[_]=(0,Z.useState)(()=>lt(e)),[v,y]=(0,Z.useState)(()=>Ct(e.url)||_),b=xt(s),x=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{St(e.url,v===_?``:v)},[e.url,v,_]);let S=c(),te=(0,Z.useMemo)(()=>Oe(Ae(m.data?.promptTemplates),S.data?.capabilities),[m.data?.promptTemplates,S.data?.capabilities]),w=e=>{let t=x.current,n=v===_?v.length:t?.selectionStart??v.length,r=B(v,n,e);y(r.text),requestAnimationFrame(()=>{x.current?.focus(),x.current?.setSelectionRange(r.caret,r.caret)})},D=z(te,g),O=(0,Z.useRef)(v);O.current=v;let k=(0,Z.useRef)(``);(0,Z.useEffect)(()=>{let e=Me(O.current,k.current,D,_);k.current=e.applied,e.text!==O.current&&y(e.text)},[D,_]);let A=T({mutationFn:async()=>b.canRun?d(at(e,r,g,v,ht(b))):null,onSuccess:t=>{if(t===null)return;Ke(`github`);let n=`runs`in t?t.runs[0]:t;n&&f(e.url,n.id),Y(`Added to the queue — ${h} #${e.number}`),g.length>0&&m.data!==void 0&&ne({skillUsage:g.reduce((e,t)=>je(e,t),m.data.skillUsage)}).then(()=>p.invalidateQueries({queryKey:C.uiState})).catch(()=>{}),St(e.url,``),y(_),k.current=``,p.invalidateQueries({queryKey:C.runs.all})},onError:e=>Y(e.message,{tone:`danger`})}),j=e=>{et({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),!A.isPending&&b.canRun&&A.mutate())},re=e=>o(a.includes(e)?a.filter(t=>t!==e):[...a,e]);return(0,Q.jsxs)(`section`,{"data-slot":`gh-hand`,className:`mt-7 rounded-lg border border-border bg-card p-4`,children:[(0,Q.jsxs)(`h3`,{className:`flex items-center gap-1.5 eyebrow text-soft-foreground`,children:[(0,Q.jsx)(Le,{"aria-hidden":`true`,className:`size-3.5 text-violet`}),`Hand this to the agent`]}),(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2`,children:[(0,Q.jsx)(Tt,{workflows:t,value:r,onChange:i}),(0,Q.jsx)(Dt,{skills:n,skillUsage:m.data?.skillUsage,selected:g,onToggle:re}),(0,Q.jsx)(gt,{pick:s,onChange:l,disabled:A.isPending||!b.canRun,accounts:!0}),(0,Q.jsx)(Et,{resolved:b,dataSlot:`gh-provider-gate`}),(0,Q.jsx)(yt,{templates:te,onInsert:w})]}),g.length>0?(0,Q.jsx)(`div`,{"data-slot":`gh-skill-chips`,className:`mt-2.5 flex flex-wrap gap-1.5`,children:g.map(e=>(0,Q.jsx)(ze,{label:`Remove this skill`,children:(0,Q.jsxs)(`button`,{type:`button`,"data-slot":`gh-skill-chip`,"data-skill":e,"aria-label":`Remove skill ${e}`,onClick:()=>re(e),className:`inline-flex h-[26px] items-center gap-1 rounded-full border border-border bg-muted px-2 font-mono text-meta font-medium text-foreground transition-colors hover:bg-danger/10 hover:text-danger`,children:[e,(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`})]})},e))}):null,(0,Q.jsx)(W,{ref:x,"data-slot":`gh-custom-prompt`,"aria-label":`Custom prompt`,"aria-keyshortcuts":`Control+Enter Meta+Enter`,value:v,onChange:e=>y(e.target.value),onKeyDown:j,placeholder:`Instructions for the agent… (#${e.number} and its link are always sent)`,className:`mt-3 min-h-20 text-ui`}),(0,Q.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-2.5`,children:[(0,Q.jsxs)(F,{variant:`contrast`,"data-action":`gh-run`,disabled:A.isPending||!b.canRun,onClick:()=>A.mutate(),children:[(0,Q.jsx)(H,{"aria-hidden":`true`,className:`size-3.5`}),`Run agent on this `,h]}),(0,Q.jsx)(`kbd`,{"aria-hidden":`true`,className:`rounded-[5px] border border-b-2 border-border bg-card px-[5px] py-px font-mono text-micro font-medium text-muted-foreground`,children:$e()}),u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`span`,{"data-slot":`gh-queued`,className:`flex items-center gap-1 text-label font-medium text-muted-foreground`,children:[(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5`}),`queued`]}),(0,Q.jsx)(M,{to:`/tasks/${u}`,"data-slot":`gh-view-run`,className:`text-label font-semibold text-violet hover:underline`,children:`View task →`})]}):null]})]})}var It=10;function Lt(e){let[t,n]=(0,Z.useState)(0),r=(0,Z.useRef)(null),i=(0,Z.useRef)(!1),a=e=>{i.current=!1,e.pointerType===`touch`&&(r.current={id:e.pointerId,x:e.clientX,y:e.clientY,axis:null})},o=e=>{let t=r.current;if(!t||t.id!==e.pointerId)return;let a=e.clientX-t.x,o=e.clientY-t.y;if(t.axis===null){if(Math.abs(a)<It&&Math.abs(o)<It)return;t.axis=Math.abs(a)>Math.abs(o)?`x`:`y`}t.axis===`x`&&(i.current=!0,n(Math.max(-112,Math.min(0,a))))},s=(t,i)=>{let a=r.current;!a||a.id!==t.pointerId||(r.current=null,n(0),!i&&a.axis===`x`&&t.clientX-a.x<=-72&&e())};return{offset:t,handlers:{onPointerDown:a,onPointerMove:o,onPointerUp:e=>s(e,!1),onPointerCancel:e=>s(e,!0),onClickCapture:e=>{i.current&&(i.current=!1,e.preventDefault(),e.stopPropagation())},onKeyDown:()=>{i.current=!1}}}}function Rt({offset:e}){return e===0?null:(0,Q.jsxs)(`span`,{"aria-hidden":`true`,"data-slot":`gh-swipe-reveal`,className:A(`absolute inset-y-0 right-0 flex items-center gap-1.5 rounded-md px-4 text-xs font-semibold transition-colors`,e<=-72?`bg-violet text-violet-foreground`:`bg-violet/15 text-violet`),children:[(0,Q.jsx)(H,{className:`size-3.5`}),`Run…`]})}function zt({item:e,open:t,onOpenChange:n,workflows:r,skills:i,engine:a,onQueued:o}){let s=E(),c=ee(),l=xt(a),[u,f]=(0,Z.useState)(``),p=T({mutationFn:async e=>({pick:e,created:await d(at(e.target,e.workflow,e.skill?[e.skill]:[],lt(e.target),ht(l)))}),onSuccess:({pick:e,created:t})=>{Ke(`github`);let r=`runs`in t?t.runs[0]:t;r&&o(e.target.url,r.id),Y(`Added to the queue — ${e.target.kind===`pr`?`PR`:`issue`} #${e.target.number}`),n(!1),f(``),e.skill&&c.data!==void 0&&ne({skillUsage:je(c.data.skillUsage,e.skill)}).then(()=>s.invalidateQueries({queryKey:C.uiState})).catch(()=>{}),s.invalidateQueries({queryKey:C.runs.all})},onError:e=>Y(e.message,{tone:`danger`})}),m=(t,n)=>{!e||p.isPending||!l.canRun||p.mutate({target:e,workflow:t,skill:n})},h=p.isPending||!l.canRun,g=V(r,u),_=ke([...i],u,c.data?.skillUsage);return(0,Q.jsx)(le,{open:t,onOpenChange:e=>{e||f(``),n(e)},children:(0,Q.jsxs)(ce,{side:`bottom`,"data-slot":`gh-swipe-sheet`,onOpenAutoFocus:e=>e.preventDefault(),className:`max-h-[85dvh] gap-0 rounded-t-xl pb-[env(safe-area-inset-bottom)]`,children:[(0,Q.jsxs)(oe,{className:`pb-2`,children:[(0,Q.jsxs)(se,{className:`truncate text-base`,children:[`Run agent on `,e?`${e.kind===`pr`?`PR`:`issue`} #${e.number}`:`…`]}),(0,Q.jsxs)(N,{className:`truncate text-xs`,children:[e?.title??``,` — tap a workflow or skill to start.`]})]}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2 px-4 pb-2`,children:[(0,Q.jsx)(Et,{resolved:l,dataSlot:`gh-swipe-provider-gate`}),(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(Pe,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-soft-foreground`}),(0,Q.jsx)(`input`,{type:`search`,"data-slot":`gh-swipe-filter`,"aria-label":`Filter workflows and skills`,placeholder:`Filter workflows and skills…`,value:u,onChange:e=>f(e.target.value),className:`w-full rounded-md border border-input bg-card py-2 pr-2 pl-7 text-body outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`})]})]}),(0,Q.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 pb-4`,children:[g.length>0?(0,Q.jsx)(Bt,{label:`Workflows`,children:g.map(e=>(0,Q.jsx)(Vt,{slot:`gh-swipe-workflow`,name:e.name,description:e.description,icon:(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-4 shrink-0 text-violet`}),disabled:h,onClick:()=>m(e.name,null)},e.name))}):null,_.length>0?(0,Q.jsx)(Bt,{label:`Skills`,children:_.map(e=>(0,Q.jsx)(Vt,{slot:`gh-swipe-skill`,name:e.name,description:e.description,icon:(0,Q.jsx)(pe,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),disabled:h,onClick:()=>m(null,e.name)},e.name))}):null,g.length===0&&_.length===0?(0,Q.jsxs)(`p`,{className:`px-2 py-3 text-sm text-soft-foreground`,children:[`Nothing matches “`,u.trim(),`”.`]}):null]})]})})}function Bt({label:e,children:t}){return(0,Q.jsxs)(`section`,{className:`pt-2`,children:[(0,Q.jsx)(`h3`,{className:`px-2 pb-1 eyebrow text-soft-foreground`,children:e}),(0,Q.jsx)(`ul`,{className:`flex flex-col`,children:t})]})}function Vt({slot:e,name:t,description:n,icon:r,disabled:i,onClick:a}){return(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`button`,{type:`button`,"data-slot":e,"data-name":t,disabled:i,onClick:a,className:`flex min-h-11 w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-muted active:bg-muted disabled:opacity-55`,children:[r,(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate font-mono text-ui font-medium`,children:t}),n?(0,Q.jsx)(`span`,{className:`truncate text-label text-muted-foreground`,children:n}):null]})]})})}var Ht=50,Ut=100,Wt=350;function Gt(e,t){let[n,r]=(0,Z.useState)(e);return(0,Z.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}var Kt=600;function qt(e,t){let[n,r]=(0,Z.useState)(null),i=(0,Z.useRef)(t);return(0,Z.useEffect)(()=>{i.current=t}),(0,Z.useEffect)(()=>{if(!e||!n||typeof IntersectionObserver>`u`)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&i.current()},{root:n.closest(`[data-slot="gh-list"]`),rootMargin:`0px 0px ${Kt}px 0px`});return t.observe(n),()=>t.disconnect()},[e,n]),r}function Jt({view:e,changes:t=!1,index:n=!1}){let{n:r}=re(),i=x(Ht),o=c().data?.capabilities?.automations===!0,l=(0,Z.useMemo)(()=>{let e=i.data?.pages;if(!e||e.length===0)return;let t=e[0],n=e[e.length-1];if(!(!t||!n))return{...t,available:t.available??!1,issues:e.flatMap(e=>e.issues??[]),prs:e.flatMap(e=>e.prs??[]),labelColors:Object.assign({},...e.map(e=>e.labelColors??{})),issuesNextCursor:n.issuesNextCursor,prsNextCursor:n.prsNextCursor}},[i.data]),d=ee(),f=d.data?.githubSort===`oldest`?`oldest`:`newest`,m=(0,Z.useMemo)(()=>l?.available?vt(l.prs,f):[],[l,f]),h=r===void 0?null:Number.parseInt(r,10),g=(0,Z.useMemo)(()=>{if(!l?.available)return[];let t=new Set;e===`prs`&&h!==null&&Number.isInteger(h)&&t.add(h);for(let e of m){if(t.size>=Ut)break;t.add(e.number)}return[...t]},[l,m,e,h]),y=a(g,e===`prs`),b=y.data?.available?y.data.checks:void 0,S=E(),w=e=>{S.setQueryData(C.uiState,t=>({...t,githubView:e})),ne({githubView:e}).then(e=>S.setQueryData(C.uiState,e)).catch(e=>{Y(e instanceof Error?e.message:String(e),{tone:`danger`}),S.invalidateQueries({queryKey:C.uiState})})},D=e=>{S.setQueryData(C.uiState,t=>({...t,githubSort:e})),ne({githubSort:e}).then(e=>S.setQueryData(C.uiState,e)).catch(e=>{Y(e instanceof Error?e.message:String(e),{tone:`danger`}),S.invalidateQueries({queryKey:C.uiState})})},O=(0,Z.useRef)(null),k=T({mutationFn:()=>te({refresh:!0,limit:Ht}),onSuccess:()=>{S.invalidateQueries({queryKey:C.githubPages(Ht)}),S.invalidateQueries({queryKey:C.githubChecks(g)});let e=O.current;if(!e){S.removeQueries({queryKey:[`github`,`comments`]});return}let t=C.githubComments(e.kind,e.number);_(e.kind,e.number,{refresh:!0}).then(e=>S.setQueryData(t,e)).catch(()=>{}),S.removeQueries({queryKey:[`github`,`comments`],predicate:e=>e.queryHash!==s(t)})},onError:e=>Y(e.message,{tone:`danger`})}),j=v(),oe=u(),[N,se]=(0,Z.useState)(()=>mt().workflow),[ce,le]=(0,Z.useState)(()=>mt().skills),[ue,fe]=pt();(0,Z.useEffect)(()=>{dt({workflow:N,skills:[...ce]})},[N,ce]);let pe=j.data?.workflows;(0,Z.useEffect)(()=>{pe&&N!==null&&!pe.some(e=>e.name===N)&&se(null)},[pe,N]);let P=oe.data,me=d.data?.skillUsage,he=(0,Z.useMemo)(()=>De(P??[],me),[P,me]),[ge,_e]=(0,Z.useState)(new Map),[ve,ye]=(0,Z.useState)(null),[be,xe]=(0,Z.useState)(!1),Se=(0,Z.useCallback)(e=>{ye(e),xe(!0)},[]),Ce=(0,Z.useCallback)((e,t)=>_e(n=>new Map(n).set(e,t)),[]),[I,L]=(0,Z.useState)(``),[R,Oe]=(0,Z.useState)([]),ke=I.trim()!==``||R.length>0,Ae=(0,Z.useRef)(null),je=qt(i.hasNextPage&&!i.isFetchingNextPage&&!i.isFetchNextPageError&&!ke,()=>void i.fetchNextPage()),z=Gt(I,Wt),Me=(0,Z.useMemo)(()=>l?.available?e===`issues`?vt(l.issues,f):m:[],[l,e,f,m]),B=ut(z,(0,Z.useMemo)(()=>ct(Me,{query:z,labels:R}).length,[Me,z,R])),V=p(e===`issues`?`issue`:`pr`,z,B);if(n&&d.data?.githubView===`prs`)return(0,Q.jsx)(ie,{to:`/github/prs`,replace:!0});if(!l)return i.isError?(0,Q.jsx)(`div`,{"data-route":`github`,className:`flex min-h-full flex-col`,children:(0,Q.jsx)(tt,{icon:(0,Q.jsx)(Fe,{}),tone:`danger`,title:`Could not load GitHub`,subtitle:i.error.message})}):(0,Q.jsx)(ot,{});if(O.current=null,!l.available)return(0,Q.jsx)(`div`,{"data-route":`github`,className:`flex min-h-full flex-col`,children:(0,Q.jsx)(tt,{icon:(0,Q.jsx)(bt,{}),tone:`neutral`,title:`GitHub is unavailable here`,subtitle:l.reason??`unknown reason`,actions:(0,Q.jsx)(F,{variant:`outline`,"data-action":`gh-retry`,disabled:k.isPending,onClick:()=>k.mutate(),children:`Try again`}),children:(0,Q.jsxs)(`p`,{className:`text-label leading-relaxed text-muted-foreground`,children:[`The tab needs the `,(0,Q.jsx)(`span`,{className:`font-mono`,children:`gh`}),` CLI, logged in (`,(0,Q.jsx)(`span`,{className:`font-mono`,children:`gh auth login`}),`), and a repo with a GitHub remote. Everything else in the cockpit works without it.`]})})});let H=Me,U=ct(H,{query:I,labels:R}),W=B&&V.data?.available?V.data:null,Ie=new Set(U.map(e=>e.number)),G=W?vt(ct(W.items,{labels:R}).filter(e=>!Ie.has(e.number)),f):[],Le=I.trim()!==``&&I.trim()!==z.trim()||B&&V.isPending,K={...W?.labelColors??{},...l.labelColors??{}},Re=ft(H),q=r===void 0?null:Number.parseInt(r,10),J=q===null?U[0]??G[0]??null:H.find(e=>e.number===q)??G.find(e=>e.number===q)??null;O.current=J?{kind:J.kind,number:J.number}:null;let Be=e===`issues`?`/github`:`/github/prs`,Ve=B&&(V.data?.available===!1||V.isError),He=V.data?.available===!1?V.data.reason??`unknown reason`:V.error instanceof Error?V.error.message:`the search request failed`,Ue=ke?Le?(0,Q.jsxs)(`p`,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(Ee,{"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}),`Searching GitHub for “`,I.trim(),`”…`]}):G.length>0?null:Ve?(0,Q.jsxs)(`p`,{children:[`No open `,e===`issues`?`issues`:`pull requests`,` match your filter, and GitHub could not be searched: `,He,`.`]}):W?(0,Q.jsxs)(`p`,{children:[`No `,e===`issues`?`issues`:`pull requests`,` match your filter — open, closed or merged.`]}):(0,Q.jsxs)(`p`,{children:[`No open `,e===`issues`?`issues`:`pull requests`,` match your filter.`]}):(0,Q.jsxs)(`p`,{children:[`No open `,e===`issues`?`issues`:`pull requests`,`.`]});return(0,Q.jsx)(wt,{name:`gh`,route:`github`,selected:r!==void 0,list:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`header`,{"data-slot":`gh-header`,className:`sticky top-0 z-10 border-b border-border bg-background/95 px-4 pt-3 backdrop-blur`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,Q.jsx)(`h1`,{className:`text-lg font-semibold`,children:`GitHub`}),l.repo?(0,Q.jsx)(`span`,{"data-slot":`gh-repo`,className:`min-w-0 truncate font-mono text-meta text-soft-foreground`,children:l.repo}):null,o?(0,Q.jsx)(M,{to:`/automations/new`,className:`ml-auto shrink-0 text-label font-medium text-violet hover:underline`,children:`Set up automations`}):null,(0,Q.jsx)(ze,{label:`Refresh from GitHub`,children:(0,Q.jsx)(nt,{"data-slot":`gh-refresh`,"aria-label":`Refresh from GitHub`,disabled:k.isPending,onClick:()=>k.mutate(),icon:(0,Q.jsx)(Ne,{"aria-hidden":`true`,className:A(`size-3`,k.isPending&&`motion-safe:animate-spin`)}),className:A(`shrink-0`,!o&&`ml-auto`),children:l.syncedAt?`synced ${X(l.syncedAt)} ago`:`refresh`})})]}),(0,Q.jsxs)(`div`,{"data-slot":`gh-tabs`,className:`mt-2.5 flex items-end gap-1`,children:[(0,Q.jsxs)(we,{to:`/github`,active:e===`issues`,onClick:()=>w(`issues`),children:[`Issues · `,Yt(l.issuesTotal??l.issues.length)]}),(0,Q.jsxs)(we,{to:`/github/prs`,active:e===`prs`,onClick:()=>w(`prs`),children:[`Pull requests · `,Yt(l.prsTotal??l.prs.length)]})]}),(0,Q.jsxs)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-2 pb-3`,children:[(0,Q.jsxs)(`div`,{className:`relative min-w-[11rem] flex-1`,children:[(0,Q.jsx)(Pe,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-soft-foreground`}),(0,Q.jsx)(`input`,{type:`search`,"data-slot":`gh-search`,"aria-label":`Search ${e}`,placeholder:`Search #id, title, author…`,value:I,onChange:e=>L(e.target.value),className:`w-full rounded-md border border-input bg-card py-1 pr-2 pl-7 text-ui outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`})]}),(0,Q.jsx)(Qt,{options:Re,colors:K,selected:R,onChange:Oe}),(0,Q.jsx)(ae,{slot:`gh-sort`,label:`Sort order`,value:f,options:[{value:`newest`,label:`Newest`},{value:`oldest`,label:`Oldest`}],onChange:D,className:`shrink-0`})]})]}),U.length===0?Ue&&(0,Q.jsx)(`div`,{"data-slot":`gh-empty`,className:`px-4 py-4 text-body text-muted-foreground`,children:Ue}):(0,Q.jsx)(`div`,{ref:e=>{Ae.current=e?.closest(`[data-slot="gh-list"]`)??null},"data-slot":`gh-rows`,"data-virtualized":`true`,className:`px-2 py-2`,children:(0,Q.jsx)(rt,{scrollRef:Ae,children:U.map(t=>(0,Q.jsx)(`div`,{className:`pb-0.5`,children:(0,Q.jsx)(Xt,{item:t,view:e,colors:K,active:J?.url===t.url,queued:ge.has(t.url),checks:t.kind===`pr`?b?.[t.number]??t.checks:t.checks,onSwipe:Se})},t.url))})}),i.hasNextPage&&!ke&&U.length>0?(0,Q.jsx)(`div`,{ref:je,"data-slot":`gh-load-more`,className:`flex min-h-6 items-center justify-center gap-1.5 px-4 pb-3 text-label text-muted-foreground`,children:i.isFetchingNextPage?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ee,{"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}),`Loading more…`]}):i.isFetchNextPageError?(0,Q.jsxs)(Q.Fragment,{children:[`Could not load more.`,(0,Q.jsx)(`button`,{type:`button`,"data-slot":`gh-load-more-retry`,onClick:()=>void i.fetchNextPage(),className:`font-medium text-violet hover:underline`,children:`Retry`})]}):null}):null,G.length>0?(0,Q.jsxs)(`div`,{"data-slot":`gh-search-hits`,children:[(0,Q.jsxs)(`p`,{className:`px-4 pt-2 pb-1 eyebrow text-soft-foreground`,children:[`Found on GitHub`,W?.truncated?` (first matches)`:``]}),(0,Q.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:G.map(t=>(0,Q.jsx)(Xt,{item:t,view:e,colors:K,active:J?.url===t.url,queued:ge.has(t.url),checks:t.kind===`pr`?b?.[t.number]??t.checks:t.checks,onSwipe:Se},t.url))})]}):null,(0,Q.jsx)(zt,{item:ve,open:be,onOpenChange:xe,workflows:j.data?.workflows??[],skills:he,engine:ue,onQueued:Ce})]}),detail:(0,Q.jsx)(Q.Fragment,{children:J?(0,Q.jsx)(en,{item:J,listPath:Be,colors:K,changes:t,checks:J.kind===`pr`?b?.[J.number]??J.checks:J.checks,children:(0,Q.jsx)(Ft,{item:J,workflows:j.data?.workflows??[],skills:he,workflow:N,onWorkflowChange:se,selectedSkills:ce,onSkillsChange:le,engine:ue,onEngineChange:fe,queuedRunId:ge.get(J.url)??null,onQueued:Ce},J.url)}):(0,Q.jsx)(tt,{icon:e===`issues`?(0,Q.jsx)(de,{}):(0,Q.jsx)(Te,{}),tone:`neutral`,heading:`h2`,title:q===null?`Nothing selected`:`Not found`,subtitle:q===null?`No open ${e===`issues`?`issues`:`pull requests`} to show.`:`#${q} is not among the open ${e===`issues`?`issues`:`pull requests`}. Search for ${q} above to look it up on GitHub, closed and merged included.`})})})}function Yt(e){return String(e)}var Xt=(0,Z.memo)(function({item:e,view:t,colors:n,active:r,queued:i,checks:a,onSwipe:o}){let s=e.kind===`issue`?de:Te,c=E(),l=Lt(()=>o?.(e)),u=()=>{c.prefetchQuery({queryKey:C.githubComments(e.kind,e.number),queryFn:({signal:t})=>_(e.kind,e.number,{},{signal:t}),staleTime:6e4})};return(0,Q.jsxs)(`li`,{className:A(`relative rounded-md`,l.offset!==0&&`overflow-hidden`),children:[o?(0,Q.jsx)(Rt,{offset:l.offset}):null,(0,Q.jsxs)(M,{to:`${t===`issues`?`/github/issues`:`/github/prs`}/${e.number}`,draggable:!0,onDragStart:t=>{try{t.dataTransfer.setData(`text/plain`,_t(e)),t.dataTransfer.effectAllowed=`copy`}catch{}},...o?l.handlers:{},style:l.offset?{transform:`translateX(${l.offset}px)`}:void 0,onMouseEnter:u,onFocus:u,"data-slot":`gh-row`,"data-number":e.number,"aria-current":r?`page`:void 0,title:`Drag into the composer to prefill a task`,className:A(`relative flex touch-pan-y flex-col gap-1 rounded-md bg-background px-2.5 py-2 transition-colors hover:bg-muted`,r&&`bg-muted`),children:[(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Q.jsx)(`span`,{className:A(`min-w-0 truncate text-ui font-medium`,r&&`font-semibold`),children:e.title})]}),(0,Q.jsxs)(`span`,{className:`flex items-center gap-2 pl-[22px] font-mono text-micro text-muted-foreground`,children:[(0,Q.jsxs)(`span`,{children:[`#`,e.number]}),(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:e.author}),(0,Q.jsx)(`span`,{children:X(e.createdAt)}),(0,Q.jsx)(yn,{count:e.comments}),a?(0,Q.jsx)(xn,{checks:a}):null,i?(0,Q.jsx)(`span`,{"data-slot":`gh-queued-flag`,className:`font-sans font-medium text-violet`,children:`↗ run queued`}):null]}),e.labels.length>0?(0,Q.jsx)(`span`,{className:`flex flex-wrap gap-1 pl-[22px]`,children:e.labels.map(e=>(0,Q.jsx)($t,{label:e,color:n[e]},e))}):null]}),(0,Q.jsx)(Pt,{item:e})]})},Zt);function Zt(e,t){return e.item===t.item&&e.view===t.view&&e.active===t.active&&e.queued===t.queued&&e.checks===t.checks&&e.onSwipe===t.onSwipe&&t.item.labels.every(n=>e.colors[n]===t.colors[n])}function Qt({options:e,colors:t,selected:n,onChange:r}){let[i,a]=(0,Z.useState)(!1),o=e=>r(n.includes(e)?n.filter(t=>t!==e):[...n,e]);return(0,Q.jsxs)(q,{open:i,onOpenChange:a,children:[(0,Q.jsx)(K,{asChild:!0,children:(0,Q.jsx)(nt,{"data-slot":`gh-label-filter`,disabled:e.length===0,active:n.length>0,chevron:!0,icon:(0,Q.jsx)(U,{"aria-hidden":`true`,className:`size-3`}),className:`shrink-0`,children:n.length>0?`Labels · ${n.length}`:`Labels`})}),(0,Q.jsx)(Re,{align:`end`,sideOffset:6,className:`w-60 p-0`,children:(0,Q.jsxs)(Qe,{children:[(0,Q.jsx)(Je,{placeholder:`Filter labels…`}),(0,Q.jsxs)(Ze,{className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[(0,Q.jsx)(Xe,{children:`No labels.`}),n.length>0?(0,Q.jsxs)(Ye,{value:`__clear__`,onSelect:()=>r([]),className:`text-soft-foreground`,children:[`Clear `,n.length,` filter`,n.length>1?`s`:``]}):null,e.map(e=>{let r=n.includes(e);return(0,Q.jsxs)(Ye,{value:e,onSelect:()=>o(e),children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`size-2.5 shrink-0 rounded-full border`,style:st(t[e])}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),r?(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-violet`}):null]},e)})]})]})})]})}function $t({label:e,color:t}){return(0,Q.jsx)(`span`,{"data-slot":`gh-label`,"data-label":e,style:st(t),className:`rounded-full border px-1.5 py-px text-micro font-medium`,children:e})}function en({item:e,listPath:t,colors:n,children:r,changes:i,checks:a}){let o=e.kind===`pr`?`pull request`:`issue`,s=m(e.kind,e.number),c=s.data?.detail?.body??e.body,l=s.data?.detail?.additions??e.additions,u=s.data?.detail?.deletions??e.deletions,d=e.kind===`pr`&&!!(l||u);return(0,Q.jsxs)(`article`,{"data-slot":`gh-detail-inner`,className:`min-w-0 px-4 py-4 md:px-7 md:py-5`,children:[(0,Q.jsxs)(M,{to:t,"data-slot":`gh-back`,className:`mb-3 inline-flex items-center gap-1.5 text-label font-medium text-muted-foreground hover:text-foreground md:hidden`,children:[(0,Q.jsx)(ue,{"aria-hidden":`true`,className:`size-3.5`}),`Back to the list`]}),(0,Q.jsxs)(`p`,{"data-slot":`gh-meta`,className:`flex flex-wrap items-center gap-x-1.5 font-mono text-micro text-soft-foreground`,children:[(0,Q.jsxs)(`span`,{children:[`#`,e.number]}),`·`,(0,Q.jsx)(`span`,{children:o}),`·`,(0,Q.jsxs)(`span`,{children:[`opened by `,e.author]}),`·`,(0,Q.jsxs)(`span`,{children:[X(e.createdAt),` ago`]}),e.comments?(0,Q.jsxs)(Q.Fragment,{children:[`·`,(0,Q.jsx)(yn,{count:e.comments})]}):null,d?(0,Q.jsxs)(Q.Fragment,{children:[`·`,(0,Q.jsxs)(`span`,{"data-slot":`gh-diffstat`,children:[(0,Q.jsxs)(`span`,{className:`text-success`,children:[`+`,l??0]}),` `,(0,Q.jsxs)(`span`,{className:`text-danger`,children:[`−`,u??0]})]})]}):null,`·`,k(e.url)?(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-open-link`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})]}):(0,Q.jsx)(`span`,{"data-slot":`gh-open-link`,className:`text-muted-foreground`,children:`open on GitHub`})]}),(0,Q.jsx)(`h2`,{className:`mt-2 text-xl leading-snug font-semibold`,children:e.title}),e.kind===`pr`?(0,Q.jsxs)(`nav`,{"aria-label":`Pull request detail`,className:`mt-4 flex border-b border-border`,children:[(0,Q.jsx)(we,{to:`/github/prs/${e.number}`,active:!i,children:`Conversation`}),(0,Q.jsx)(we,{to:`/github/prs/${e.number}/changes`,active:i,children:`Changes`})]}):null,e.labels.length>0||a?(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1.5`,children:[e.labels.map(e=>(0,Q.jsx)($t,{label:e,color:n[e]},e)),a?(0,Q.jsx)(bn,{checks:a,url:e.url}):null]}):null,i&&e.kind===`pr`?(0,Q.jsx)(an,{item:e}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{"data-slot":`gh-body`,className:`mt-5 text-sm`,children:c?(0,Q.jsx)(Nt,{children:c}):(0,Q.jsx)(`p`,{className:`text-soft-foreground`,children:`(no description)`})}),(0,Q.jsx)(on,{item:e,colors:n}),e.kind===`pr`?(0,Q.jsx)(nn,{number:e.number}):null,e.kind===`pr`?(0,Q.jsx)(rn,{number:e.number}):null,r]}),(0,Q.jsx)(At,{item:e})]})}var $={squash:`Squash and merge`,merge:`Create a merge commit`,rebase:`Rebase and merge`};function tn({state:e}){let t=`size-4 shrink-0`;return e===`passing`?(0,Q.jsx)(Se,{"aria-hidden":`true`,"data-slot":`gh-merge-status-passing`,className:A(t,`text-success`)}):e===`failing`?(0,Q.jsx)(fe,{"aria-hidden":`true`,"data-slot":`gh-merge-status-failing`,className:A(t,`text-danger`)}):e===`pending`?(0,Q.jsx)(Ee,{"aria-hidden":`true`,"data-slot":`gh-merge-status-pending`,className:A(t,`animate-spin text-warning`)}):(0,Q.jsx)(Ce,{"aria-hidden":`true`,"data-slot":`gh-merge-status-unknown`,className:A(t,`text-soft-foreground`)})}function nn({number:e}){let t=c().data?.forge,n=t===null?`Assess impact needs a GitHub remote — none was detected.`:t?.available===!1?`Assess impact needs GitHub: ${t.reason??`it is unreachable`}.`:void 0;return(0,Q.jsx)(`section`,{"data-slot":`gh-impact`,"aria-label":`Change impact`,className:`mt-6 rounded-lg border border-border bg-card p-3`,children:(0,Q.jsx)(kt,{subject:{kind:`pr`,number:e},unavailable:n})})}function rn({number:e}){let t=E(),n=D({queryKey:C.githubMergeState(e),queryFn:({signal:t})=>w(e,{},{signal:t}),retry:!1}),r=n.data?.available?n.data.mergeState:null,[a,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(!1),d=T({mutationFn:()=>w(e,{refresh:!0}),onSuccess:n=>t.setQueryData(C.githubMergeState(e),n),onError:e=>Y(e instanceof Error?e.message:String(e),{tone:`danger`})}),f=a&&r?.methods.includes(a)?a:r?.defaultMethod??r?.methods[0]??null,p=T({mutationFn:()=>{if(!r||!f)throw Error(`No merge method is available.`);return i(e,{method:f,expectedHeadSha:r.headSha,...l&&r.canOverride?{overrideRules:!0}:{}})},onSuccess:()=>{c(!1),Y(`Pull request #${e} merged`),t.invalidateQueries({queryKey:C.githubMergeState(e)}),t.invalidateQueries({queryKey:C.githubPages(Ht)}),t.invalidateQueries({queryKey:C.githubComments(`pr`,e)})},onError:n=>{Y(n instanceof Error?n.message:String(n),{tone:`danger`}),t.invalidateQueries({queryKey:C.githubMergeState(e)})}});if(n.isPending)return(0,Q.jsx)(Ge,{"data-slot":`gh-merge-loading`,className:`mt-6 h-32 w-full`});if(!r)return(0,Q.jsxs)(`section`,{"data-slot":`gh-merge-unavailable`,className:`mt-6 rounded-lg border border-border bg-card p-4 text-sm`,children:[(0,Q.jsx)(`p`,{className:`font-medium`,children:`Merge status unavailable`}),(0,Q.jsx)(`p`,{className:`mt-1 text-label text-muted-foreground`,children:n.data?.available===!1?n.data.reason:`GitHub could not load merge requirements.`})]});let m=r.state===`merged`?`Merged`:r.state===`closed`?`Closed`:r.isDraft?`Draft`:r.mergeable===`conflicting`?`Conflicts must be resolved`:r.canMerge?`Ready to merge`:`Merge blocked`,h=r.reviewDecision===`approved`||r.reviewDecision===`not-required`?`passing`:r.reviewDecision===`unknown`?`unknown`:`failing`,g=r.mergeable===`mergeable`?`passing`:r.mergeable===`conflicting`?`failing`:`unknown`,_=!!(f&&(r.canMerge||r.canOverride&&l));return(0,Q.jsxs)(`section`,{"data-slot":`gh-merge-box`,"aria-live":`polite`,className:`mt-6 rounded-lg border border-border bg-card p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[r.canMerge?(0,Q.jsx)(P,{"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-success`}):(0,Q.jsx)(Fe,{"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-warning`}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Q.jsx)(`h3`,{className:`font-semibold`,children:m}),(0,Q.jsxs)(F,{type:`button`,variant:`ghost`,size:`sm`,disabled:d.isPending,onClick:()=>d.mutate(),children:[(0,Q.jsx)(Ne,{"aria-hidden":`true`,className:A(`size-3.5`,d.isPending&&`animate-spin`)}),`Refresh`]})]}),(0,Q.jsxs)(`p`,{className:`mt-1 font-mono text-meta text-soft-foreground`,children:[r.headRef,` (`,r.headSha.slice(0,7),`) → `,r.baseRef]}),(0,Q.jsxs)(`ul`,{className:`mt-3 space-y-2 text-xs`,children:[(0,Q.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(tn,{state:h}),(0,Q.jsxs)(`span`,{children:[`Reviews: `,r.reviewDecision.replaceAll(`-`,` `)]})]}),(0,Q.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(tn,{state:g}),(0,Q.jsxs)(`span`,{children:[`Conflicts: `,r.mergeable===`conflicting`?`present`:r.mergeable===`mergeable`?`none`:`unknown`]})]}),r.checks.length===0&&r.checksTier!==`none`?(0,Q.jsx)(`li`,{children:`No checks configured`}):r.checks.map(e=>(0,Q.jsxs)(`li`,{className:`flex items-center justify-between gap-3`,children:[(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(tn,{state:e.state}),(0,Q.jsxs)(`span`,{children:[e.name,` · `,e.state,e.required===!0?` · required`:e.required===null?` · requiredness unknown`:``]})]}),e.url&&k(e.url)?(0,Q.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-muted-foreground underline`,children:`details`}):null]},e.name)),r.checksTier===`aggregate`||r.checksTier===`none`?(0,Q.jsxs)(`li`,{"data-slot":`gh-merge-checks-degraded`,className:`flex items-start gap-2`,children:[(0,Q.jsx)(tn,{state:`unknown`}),(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[r.checksTier===`aggregate`?`Only the rolled-up check state is readable here — per-check detail is not.`:`This token cannot read the checks on this pull request.`,r.checksReason?(0,Q.jsx)(`span`,{className:`mt-0.5 block break-words text-soft-foreground`,children:r.checksReason}):null]})]}):null,r.blockers.filter(e=>!(e.code===`checks-unknown`&&r.checksTier===`none`)).map(e=>(0,Q.jsx)(`li`,{className:`text-soft-foreground`,children:e.message},e.code))]}),r.canOverride?(0,Q.jsxs)(`label`,{className:`mt-4 flex cursor-pointer items-start gap-2 rounded-md border border-warning/40 bg-warning/5 p-3 text-xs`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked),className:`mt-0.5 size-4 accent-primary`}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`span`,{className:`block font-medium`,children:`Merge without waiting for requirements`}),(0,Q.jsx)(`span`,{className:`mt-0.5 block text-soft-foreground`,children:`GitHub will allow this only if your permissions can bypass the repository rules.`})]})]}):null,r.state===`open`&&r.methods.length>0?(0,Q.jsxs)(`div`,{className:`mt-4 flex flex-col gap-2 sm:flex-row`,children:[(0,Q.jsxs)(xe,{value:f??void 0,onValueChange:e=>o(e),children:[(0,Q.jsx)(ye,{"aria-label":`Merge method`,"data-slot":`gh-merge-method`,className:`w-full min-w-0 sm:flex-1`,children:(0,Q.jsx)(be,{placeholder:`Merge method`})}),(0,Q.jsx)(ve,{children:r.methods.map(e=>(0,Q.jsx)(_e,{value:e,children:$[e]},e))})]}),(0,Q.jsx)(F,{disabled:!_,onClick:()=>c(!0),children:f?$[f]:`Merge`})]}):null]})]}),(0,Q.jsx)(We,{open:s,onOpenChange:c,children:(0,Q.jsxs)(Ve,{"data-slot":`gh-merge-confirm`,showCloseButton:!1,children:[(0,Q.jsxs)(J,{children:[(0,Q.jsxs)(He,{children:[f?$[f]:`Merge`,` pull request #`,e,`?`]}),(0,Q.jsxs)(Ue,{children:[`This will merge “`,r.title,`” into `,r.baseRef,`. GitHub will re-check the exact reviewed head before changing the repository.`,l&&r.canOverride?` You are asking GitHub to bypass unmet repository requirements; GitHub may refuse if your permissions do not allow it.`:``]})]}),p.error?(0,Q.jsx)(`p`,{className:`text-sm text-danger`,children:p.error.message}):null,(0,Q.jsxs)(Be,{children:[(0,Q.jsx)(F,{variant:`outline`,disabled:p.isPending,onClick:()=>c(!1),children:`Cancel`}),(0,Q.jsx)(F,{disabled:p.isPending,onClick:()=>p.mutate(),children:p.isPending?`Merging…`:f?$[f]:`Merge`})]})]})})]})}function an({item:e}){let t=E(),n=f(e.number),[r,i]=(0,Z.useState)(``),[a,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(!1),l=n.data,u=l?.available?l.files.filter(e=>e.path.toLowerCase().includes(r.toLowerCase())):[],d=u.findIndex(e=>e.path===a);(0,Z.useEffect)(()=>{u.length>0&&!u.some(e=>e.path===a)&&o(u[0].path)},[l?.available?l.headSha:``,r]);let p=async()=>{let n=l?.available?l.headSha:null,r=await S(e.number,{refresh:!0});t.setQueryData([`github`,`pr-changes`,e.number],r),r.available&&n&&n!==r.headSha&&(o(r.files[0]?.path??null),Y(`The reviewed revision changed.`))};if(n.isPending)return(0,Q.jsx)(`p`,{"aria-live":`polite`,className:`mt-6 text-sm text-muted-foreground`,children:`Loading changed files…`});if(n.isError||!l)return(0,Q.jsx)(`p`,{className:`mt-6 text-sm text-danger`,children:`Changed files could not be loaded.`});if(!l.available)return(0,Q.jsx)(`p`,{className:`mt-6 text-sm text-muted-foreground`,children:l.reason});let m=u.map(e=>({path:e.path,...e.previousPath?{oldPath:e.previousPath}:{},status:e.status===`removed`?`deleted`:e.status===`changed`?`modified`:e.status,adds:e.additions,dels:e.deletions,binary:e.patchUnavailableReason===`binary`,patch:e.patch??``})),h=k(e.url)?`${e.url}/files`:null,g=u.find(e=>e.path===a);return(0,Q.jsxs)(`section`,{"data-slot":`gh-pr-changes`,className:`mt-5 min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,Q.jsxs)(`strong`,{children:[l.files.length,` changed files`]}),(0,Q.jsxs)(`span`,{className:`text-success`,children:[`+`,l.additions]}),(0,Q.jsxs)(`span`,{className:`text-danger`,children:[`−`,l.deletions]}),(0,Q.jsx)(ze,{label:l.headSha,children:(0,Q.jsxs)(`span`,{className:`font-mono text-muted-foreground`,children:[`head `,l.headSha.slice(0,8)]})}),(0,Q.jsx)(F,{type:`button`,variant:`outline`,size:`sm`,className:`ml-auto min-h-11`,onClick:()=>void p(),children:`Refresh`})]}),l.truncated?(0,Q.jsxs)(`p`,{role:`status`,className:`mt-3 rounded-md border border-warning/40 bg-warning/10 p-3 text-xs`,children:[l.reason??`This response is incomplete.`,` `,h?(0,Q.jsx)(`a`,{href:h,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Open all files on GitHub`}):null]}):null,(0,Q.jsxs)(`div`,{className:`mt-4 grid min-w-0 gap-4 lg:grid-cols-[240px_minmax(0,1fr)]`,children:[(0,Q.jsxs)(`aside`,{className:`min-w-0`,children:[(0,Q.jsx)(`input`,{"aria-label":`Filter changed files`,value:r,onChange:e=>i(e.target.value),placeholder:`Filter files…`,className:`min-h-11 w-full rounded-md border border-input bg-background px-3 text-sm`}),(0,Q.jsxs)(q,{open:s,onOpenChange:c,children:[(0,Q.jsx)(K,{asChild:!0,children:(0,Q.jsxs)(F,{type:`button`,variant:`outline`,"data-slot":`gh-file-picker`,"aria-label":`Select changed file`,className:`mt-2 min-h-11 w-full justify-between font-normal lg:hidden`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-ui`,children:a??`Choose a file`}),(0,Q.jsx)(ge,{"aria-hidden":`true`,className:`size-4 shrink-0 opacity-50`})]})}),(0,Q.jsx)(Re,{align:`start`,className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,Q.jsxs)(Qe,{children:[(0,Q.jsx)(Je,{placeholder:`Find a file…`}),(0,Q.jsxs)(Ze,{className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[(0,Q.jsx)(Xe,{children:`No files.`}),u.map(e=>(0,Q.jsxs)(Ye,{value:e.path,onSelect:()=>{o(e.path),c(!1)},className:`font-mono text-ui`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.path}),a===e.path?(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-violet`}):null]},e.path))]})]})})]}),(0,Q.jsx)(`ul`,{className:`mt-2 hidden max-h-[60vh] overflow-auto lg:block`,children:u.map(e=>(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>o(e.path),className:A(`min-h-11 w-full truncate rounded px-2 text-left font-mono text-ui`,a===e.path&&`bg-muted font-medium`),title:e.path,children:[e.status,`· `,e.path,` `,(0,Q.jsxs)(`span`,{className:`text-success`,children:[`+`,e.additions]}),` `,(0,Q.jsxs)(`span`,{className:`text-danger`,children:[`−`,e.deletions]})]})},e.path))})]}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`mb-2 flex justify-end gap-1`,children:[(0,Q.jsx)(F,{"aria-label":`Previous file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:d<=0,onClick:()=>o(u[d-1]?.path??null),children:(0,Q.jsx)(he,{})}),(0,Q.jsx)(F,{"aria-label":`Next file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:d<0||d>=u.length-1,onClick:()=>o(u[d+1]?.path??null),children:(0,Q.jsx)(me,{})})]}),u.length===0?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No changed files match this filter.`}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ot,{files:m.filter(e=>e.path===a),wrap:!0,className:`min-w-0`}),g&&!g.patch?(0,Q.jsxs)(`p`,{className:`rounded-b border border-border p-3 text-xs text-muted-foreground`,children:[`Patch unavailable: `,g.patchUnavailableReason??`not-provided`,`.`]}):null]})]})]})]})}function on({item:e,colors:t}){let n=m(e.kind,e.number),r=n.data,i=(0,Z.useMemo)(()=>{let e=[...(r?.comments??[]).map(e=>({row:`comment`,comment:e})),...(r?.events??[]).map(e=>({row:`event`,event:e}))],t=e=>{let t=Date.parse(sn(e));return Number.isNaN(t)?-1/0:t};return e.sort((e,n)=>t(e)-t(n))},[r?.comments,r?.events]);return n.isPending?(0,Q.jsxs)(`section`,{"data-slot":`gh-thread-loading`,className:`mt-6 border-t border-border pt-5`,children:[(0,Q.jsx)(Ge,{className:`mb-3 h-3 w-24`}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Q.jsx)(Ge,{className:`h-14 w-full`}),(0,Q.jsx)(Ge,{className:`h-14 w-full`})]})]}):!r||!r.available?(0,Q.jsxs)(`section`,{"data-slot":`gh-thread-error`,className:`mt-6 border-t border-border pt-5 text-label text-muted-foreground`,children:[(0,Q.jsxs)(`span`,{children:[`Couldn’t load comments — `,r?.reason??(n.error instanceof Error?n.error.message:`could not load comments`),`. `]}),(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})]})]}):i.length===0?null:(0,Q.jsxs)(`section`,{"data-slot":`gh-thread`,className:`mt-6 border-t border-border pt-5`,children:[(0,Q.jsxs)(`h3`,{"data-slot":`gh-thread-header`,className:`mb-4 eyebrow text-soft-foreground`,children:[`Activity · `,r.comments.length,` comment`,r.comments.length===1?``:`s`]}),(0,Q.jsx)(`ul`,{className:`flex flex-col gap-5`,children:cn(i).map(e=>e.group===`commits`?(0,Q.jsx)(ln,{commits:e.commits,colors:t},e.commits[0].id):e.entry.row===`comment`?(0,Q.jsx)(hn,{comment:e.entry.comment},`${e.entry.comment.kind}-${e.entry.comment.id}`):(0,Q.jsx)(dn,{event:e.entry.event,colors:t},e.entry.event.id))}),r.truncated?(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-thread-truncated`,className:`mt-4 inline-flex items-center gap-0.5 text-label text-muted-foreground hover:text-foreground hover:underline`,children:[`thread truncated — open on GitHub`,(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})]}):null]})}var sn=e=>e.row===`comment`?e.comment.createdAt:e.event.createdAt;function cn(e){let t=[],n=[],r=()=>{n.length!==0&&(n.length===1?t.push({group:`single`,entry:{row:`event`,event:n[0]}}):t.push({group:`commits`,commits:n}),n=[])};for(let i of e){if(i.row===`event`&&i.event.kind===`committed`&&i.row===`event`){let e=n[n.length-1];e&&e.actor!==i.event.actor&&r(),n.push(i.event);continue}r(),t.push({group:`single`,entry:i})}return r(),t}function ln({commits:e,colors:t}){let[n,r]=(0,Z.useState)(!1),i=e[0]?.actor??`?`;return n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`true`,className:`min-w-0`,children:(0,Q.jsxs)(`button`,{type:`button`,"aria-expanded":!0,onClick:()=>r(!1),className:`flex items-center gap-1.5 font-mono text-meta text-soft-foreground hover:text-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:un.committed}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Q.jsxs)(`span`,{children:[`added `,e.length,` commits`]})]})}),e.map(e=>(0,Q.jsx)(dn,{event:e,colors:t},e.id))]}):(0,Q.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`false`,className:`min-w-0`,children:(0,Q.jsxs)(`button`,{type:`button`,"aria-expanded":!1,onClick:()=>r(!0),className:`flex items-center gap-1.5 font-mono text-meta text-soft-foreground hover:text-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:un.committed}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Q.jsxs)(`span`,{children:[`added `,e.length,` commits`]}),(0,Q.jsx)(`span`,{className:`shrink-0`,children:X(e[e.length-1].createdAt)})]})})}var un={committed:`⚙`,labeled:`◆`,unlabeled:`◇`,assigned:`◍`,unassigned:`◌`,merged:`⑃`,closed:`⊘`,reopened:`⊙`,head_ref_force_pushed:`↻`,"cross-referenced":`↗`,renamed:`✎`};function dn({event:e,colors:t}){return(0,Q.jsxs)(`li`,{"data-slot":`gh-event-row`,"data-kind":e.kind,className:A(`flex min-w-0 items-center gap-1.5 font-mono text-meta text-soft-foreground`,e.kind===`merged`&&`text-accent-foreground`),children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:un[e.kind]}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.actor}),(0,Q.jsx)(fn,{event:e,colors:t}),(0,Q.jsx)(`span`,{className:`shrink-0`,children:X(e.createdAt)}),e.url?(0,Q.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open ${e.kind} on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})}):null]})}function fn({event:e,colors:t}){switch(e.kind){case`committed`:return(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`shrink-0`,children:`committed`}),e.sha?(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}):null,e.message?(0,Q.jsx)(`span`,{className:`truncate font-sans text-foreground`,children:e.message}):null,(0,Q.jsx)(pn,{checks:e.checks})]});case`labeled`:case`unlabeled`:return(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`shrink-0`,children:e.kind===`labeled`?`added the`:`removed the`}),e.label?(0,Q.jsx)(`span`,{"data-slot":`gh-event-label`,style:st(e.label.color??t[e.label.name]),className:`max-w-[12rem] truncate rounded-full border px-1.5 py-px font-sans text-micro`,children:e.label.name}):null,(0,Q.jsx)(`span`,{className:`shrink-0`,children:`label`})]});case`assigned`:case`unassigned`:return(0,Q.jsxs)(`span`,{className:`truncate`,children:[e.kind===`assigned`?`assigned`:`unassigned`,` `,e.subject??`someone`]});case`merged`:return(0,Q.jsx)(`span`,{children:`merged this`});case`closed`:return(0,Q.jsx)(`span`,{children:`closed this`});case`reopened`:return(0,Q.jsx)(`span`,{children:`reopened this`});case`head_ref_force_pushed`:return(0,Q.jsx)(`span`,{children:`force-pushed`});case`renamed`:return(0,Q.jsxs)(`span`,{className:`truncate`,children:[`renamed this to `,e.subject??`—`]});case`cross-referenced`:return(0,Q.jsxs)(`span`,{className:`truncate`,children:[`referenced this in `,e.refNumber?`#${e.refNumber}`:`another thread`,e.refTitle?` ${e.refTitle}`:``]})}}function pn({checks:e}){return e?(0,Q.jsx)(`span`,{"data-slot":`gh-commit-checks`,"data-checks":e,"aria-label":`checks ${e}`,className:A(`shrink-0`,vn[e]),children:_n[e]}):null}var mn={approved:{label:`approved`,tone:`border-success/40 text-success`},changes_requested:{label:`changes requested`,tone:`border-danger/40 text-danger`},commented:{label:`commented`,tone:`border-border text-muted-foreground`},dismissed:{label:`dismissed`,tone:`border-border text-muted-foreground`}};function hn({comment:e}){let t=e.reviewState?mn[e.reviewState]:null;return(0,Q.jsxs)(`li`,{"data-slot":`gh-thread-entry`,"data-kind":e.kind,className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-mono text-meta text-soft-foreground`,children:[(0,Q.jsx)(gn,{url:e.avatarUrl,login:e.author}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.author}),(0,Q.jsx)(`span`,{children:X(e.createdAt)}),t?(0,Q.jsx)(`span`,{"data-slot":`gh-review-chip`,"data-review-state":e.reviewState,className:A(`rounded-full border px-1.5 py-px font-sans text-micro font-medium`,t.tone),children:t.label}):null,(0,Q.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open comment on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})})]}),(0,Q.jsx)(`div`,{"data-slot":`gh-thread-body`,className:`text-sm`,children:e.body?(0,Q.jsx)(Nt,{children:e.body}):(0,Q.jsx)(`p`,{className:`text-soft-foreground`,children:`(no body)`})})]})}function gn({url:e,login:t}){let[n,r]=(0,Z.useState)(!1);return e&&!n?(0,Q.jsx)(`img`,{src:e,alt:``,width:16,height:16,loading:`lazy`,onError:()=>r(!0),"data-slot":`gh-avatar`,className:`size-4 shrink-0 rounded-full`}):(0,Q.jsx)(`span`,{"data-slot":`gh-avatar-fallback`,"aria-hidden":`true`,className:`flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-[8px] font-semibold text-muted-foreground uppercase`,children:t.slice(0,1)||`?`})}var _n={passing:`✓`,failing:`✗`,pending:`○`},vn={passing:`text-success`,failing:`text-danger`,pending:`text-warning`};function yn({count:e}){return e?(0,Q.jsxs)(`span`,{"data-slot":`gh-comment-count`,"data-count":e,"aria-label":`${e} comment${e===1?``:`s`}`,className:`inline-flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(R,{"aria-hidden":`true`,className:`size-3`}),e]}):null}function bn({checks:e,url:t}){let n=A(`text-meta font-medium`,vn[e],t&&`hover:underline`),r=`${_n[e]} checks ${e}`;return t?(0,Q.jsx)(`a`,{href:`${t}/checks`,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-checks`,"data-checks":e,className:n,children:r}):(0,Q.jsx)(`span`,{"data-slot":`gh-checks`,"data-checks":e,className:n,children:r})}function xn({checks:e}){return(0,Q.jsx)(`span`,{"data-slot":`gh-row-checks`,"data-checks":e,"aria-label":`checks ${e}`,className:A(`shrink-0 font-sans text-meta font-semibold`,vn[e]),children:_n[e]})}export{Jt as GithubRoute};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r,Bi as i,D as a,Dn as o,Do as s,F as c,It as l,Kt as u,Lr as d,M as f,N as p,O as m,Un as h,Y as g,ai as _,cn as v,go as y,ii as b,in as ee,k as x,oi as S,r as C,ri as te,sa as ne,si as w,vo as T,xo as E,yo as D}from"./queries-BQUz3Wnb.js";import{c as O,n as k,t as A,wt as j}from"./utils-Dp6vCdiU.js";import{S as re,i as ie,t as M}from"./project-router-B1Q3upIJ.js";import{t as ae}from"./segmented-DI7abdqX.js";import{a as oe,i as N,o as se,r as ce,t as le}from"./sheet-DPwaj6sk.js";import{t as ue}from"./arrow-left-BfRd_mrv.js";import{l as de,s as fe}from"./reference-chip-BpbybBvl.js";import{j as pe}from"./run-actions-ChUnbFA7.js";import{H as P,V as me,t as F}from"./button-CJXK1JqU.js";import{t as he}from"./chevron-left-D0UFBpi5.js";import{r as ge}from"./dist-Bsi6zLdE.js";import{i as _e,n as ve,o as ye,s as be,t as xe}from"./select-DL5E3ZAD.js";import{t as Se}from"./circle-check-BpDFgE5h.js";import{_ as Ce}from"./dropdown-menu-BKvUsb5Y.js";import{t as I}from"./workflow-BEP63Wt4.js";import{t as L}from"./external-link-BE6y205O.js";import{m as we}from"./impact-model-DCDyRxcf.js";import{t as Te}from"./git-pull-request-DUnpdU6m.js";import{t as Ee}from"./loader-circle-CPBhhDbB.js";import{t as R}from"./message-square-B-MD-8rD.js";import{_ as De,a as Oe,b as ke,c as Ae,d as je,i as z,l as Me,o as B,x as V}from"./composer-C-aBJhY0.js";import{t as H}from"./play-CmVAj_fu.js";import{t as Ne}from"./refresh-cw-BIgmYimN.js";import{t as Pe}from"./search-BjsZLqse.js";import{t as U}from"./tag-k3n7EuAm.js";import{t as W}from"./textarea-DDyYxCcO.js";import{t as Fe}from"./triangle-alert-CIzim6ZN.js";import{t as Ie}from"./user-round-V2FYByS8.js";import{t as G}from"./x-BqECUykl.js";import{t as Le}from"./zap-2VEI5zT4.js";import{i as K,r as Re,t as q}from"./popover-DUg9gBOn.js";import{t as ze}from"./icon-tooltip-DYk5cjLx.js";import{a as J,i as Be,n as Ve,o as He,r as Ue,t as We}from"./dialog-DVZE8yAO.js";import{l as Ge}from"./loading-state-NiNQtJ5H.js";import{r as Y}from"./toaster-BoJZiTRl.js";import{m as Ke}from"./telemetry-3DhVDxf8.js";import{r as X}from"./format-BUbPQpzw.js";import{t as qe}from"./status-dot-AP_4obOJ.js";import{a as Je,o as Ye,r as Xe,s as Ze,t as Qe}from"./command-CwP_dLx3.js";import{n as $e,t as et}from"./use-submit-shortcut-Cfam5eE7.js";import{t as tt}from"./centered-state-DE6sgEMs.js";import{t as nt}from"./chip-DTCkrr8F.js";import{t as rt}from"./lib-BQXq3kEf.js";import{t as it}from"./markdown-YSf01kqC.js";import{A as at,C as ot,D as st,E as ct,M as lt,O as ut,S as dt,T as ft,_ as pt,b as mt,g as ht,h as gt,j as _t,k as vt,m as yt,rt as bt,v as xt,x as St,y as Ct}from"./index-BfbbA0lF.js";import{i as wt,n as Tt,r as Et,t as Dt}from"./agent-task-pickers-BXCIulS3.js";import{t as Ot}from"./diff-aKT-mpn8.js";import{t as kt}from"./impact-control-ClslFBBA.js";var Z=e(t(),1),Q=n();function At({item:e}){let t=l(),n=g(),i=o(Array.isArray(t.data)?t.data:[],e,n);return(0,Q.jsxs)(`section`,{"data-slot":`gh-related-tasks`,"aria-label":`Related tasks`,className:`mt-6 text-sm`,children:[(0,Q.jsx)(`h3`,{className:`eyebrow mb-2 text-muted-foreground`,children:`Related tasks`}),i.length===0?(0,Q.jsx)(`p`,{"data-slot":`gh-related-empty`,className:`text-soft-foreground`,children:t.isPending?`Loading…`:`No retained tasks reference this yet.`}):(0,Q.jsx)(`ul`,{className:`divide-y divide-border rounded-md border border-border`,children:i.map(e=>{let t=r(e);return(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(M,{to:`/tasks/${encodeURIComponent(e.id)}`,"data-slot":`gh-related-task`,className:`flex items-center gap-2 px-3 py-2 hover:bg-accent`,children:[(0,Q.jsx)(qe,{tone:t.tone,pulse:t.pulse,"aria-label":t.label,role:`img`}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:h(e)}),e.archived?(0,Q.jsx)(`span`,{className:`text-micro text-soft-foreground`,children:`archived`}):null,(0,Q.jsxs)(`span`,{className:`shrink-0 text-label text-muted-foreground`,children:[t.label,` · `,X(e.createdAt),` ago`]})]})},e.id)})})]})}var jt=class extends Error{};function Mt({src:e,alt:t,srcSet:n,...r}){y();let i=O(),a=typeof e==`string`?e:``,o=j(a),s=D({queryKey:[`github-asset`,i,a],queryFn:async({signal:e})=>{let t=await b(a,{signal:e},i);if(!t.available&&t.retryable)throw new jt;return t},enabled:o,staleTime:5*6e4,gcTime:6e4,retry:(e,t)=>t instanceof jt&&e<16,retryDelay:1e3});return o?s.data?.available?(0,Q.jsx)(`img`,{...r,src:s.data.dataUrl,alt:t}):(0,Q.jsxs)(`span`,{role:`img`,"aria-label":t||`Image`,children:[t||`Image`,s.isPending?` (loading…)`:` (unavailable)`]}):(0,Q.jsx)(`img`,{...r,src:e,alt:t})}function Nt({children:e}){return(0,Q.jsx)(it,{imageComponent:Mt,children:e})}function Pt({item:e}){if(e.kind!==`issue`||e.assignees===void 0&&e.linkedPrs===void 0)return null;let t=`inline-flex min-w-0 max-w-full items-center gap-1 rounded border border-border/70 px-1.5 py-0.5`;return(0,Q.jsxs)(`div`,{"aria-label":`Issue #${e.number} ownership`,role:`group`,className:`flex min-w-0 flex-wrap items-center gap-1 px-2.5 pb-2 pl-8 text-meta text-muted-foreground`,children:[e.assignees===void 0?null:(0,Q.jsxs)(`span`,{className:t,title:e.assignees.length?`Assigned to ${e.assignees.map(e=>`@${e}`).join(`, `)}`:void 0,children:[(0,Q.jsx)(Ie,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.assignees.length?`Assigned to ${e.assignees.map(e=>`@${e}`).join(`, `)}`:e.assigneesTruncated?`Assignees`:`Unassigned`})]}),e.assigneesTruncated&&k(e.url)?(0,Q.jsx)(`a`,{className:A(t,`hover:text-foreground focus-visible:outline focus-visible:outline-ring`),href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`More assignees for issue #${e.number}`,children:`More assignees…`}):null,e.linkedPrs?.map(e=>{let n=e.state===`merged`?`Merged`:e.state===`closed`?`Closed`:e.isDraft?`Draft`:`Open`,r=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Te,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Q.jsxs)(`span`,{className:`truncate`,children:[`PR #`,e.number,` · `,n]})]}),i=A(t,e.state===`merged`?`text-success`:e.state===`open`&&!e.isDraft?`text-info`:``);return k(e.url)?(0,Q.jsx)(`a`,{className:A(i,`hover:underline focus-visible:outline focus-visible:outline-ring`),href:e.url,target:`_blank`,rel:`noopener noreferrer`,title:`${e.title} — ${e.url}`,"aria-label":`PR #${e.number} · ${n}: ${e.title}`,children:r},e.url):(0,Q.jsx)(`span`,{className:i,children:r},e.url)}),e.linkedPrsTruncated&&k(e.url)?(0,Q.jsx)(`a`,{className:A(t,`hover:text-foreground focus-visible:outline focus-visible:outline-ring`),href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`More linked pull requests for issue #${e.number}`,children:`More linked PRs…`}):null]})}function Ft({item:e,workflows:t,skills:n,workflow:r,onWorkflowChange:i,selectedSkills:a,onSkillsChange:o,engine:s,onEngineChange:l,queuedRunId:u,onQueued:f}){let p=E(),m=ee(),h=e.kind===`pr`?`PR`:`issue`,g=a.filter(e=>n.some(t=>t.name===e)),[_]=(0,Z.useState)(()=>lt(e)),[v,y]=(0,Z.useState)(()=>Ct(e.url)||_),b=xt(s),x=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{St(e.url,v===_?``:v)},[e.url,v,_]);let S=c(),te=(0,Z.useMemo)(()=>Oe(Ae(m.data?.promptTemplates),S.data?.capabilities),[m.data?.promptTemplates,S.data?.capabilities]),w=e=>{let t=x.current,n=v===_?v.length:t?.selectionStart??v.length,r=B(v,n,e);y(r.text),requestAnimationFrame(()=>{x.current?.focus(),x.current?.setSelectionRange(r.caret,r.caret)})},D=z(te,g),O=(0,Z.useRef)(v);O.current=v;let k=(0,Z.useRef)(``);(0,Z.useEffect)(()=>{let e=Me(O.current,k.current,D,_);k.current=e.applied,e.text!==O.current&&y(e.text)},[D,_]);let A=T({mutationFn:async()=>b.canRun?d(at(e,r,g,v,ht(b))):null,onSuccess:t=>{if(t===null)return;Ke(`github`);let n=`runs`in t?t.runs[0]:t;n&&f(e.url,n.id),Y(`Added to the queue — ${h} #${e.number}`),g.length>0&&m.data!==void 0&&ne({skillUsage:g.reduce((e,t)=>je(e,t),m.data.skillUsage)}).then(()=>p.invalidateQueries({queryKey:C.uiState})).catch(()=>{}),St(e.url,``),y(_),k.current=``,p.invalidateQueries({queryKey:C.runs.all})},onError:e=>Y(e.message,{tone:`danger`})}),j=e=>{et({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),!A.isPending&&b.canRun&&A.mutate())},re=e=>o(a.includes(e)?a.filter(t=>t!==e):[...a,e]);return(0,Q.jsxs)(`section`,{"data-slot":`gh-hand`,className:`mt-7 rounded-lg border border-border bg-card p-4`,children:[(0,Q.jsxs)(`h3`,{className:`flex items-center gap-1.5 eyebrow text-soft-foreground`,children:[(0,Q.jsx)(Le,{"aria-hidden":`true`,className:`size-3.5 text-violet`}),`Hand this to the agent`]}),(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2`,children:[(0,Q.jsx)(Tt,{workflows:t,value:r,onChange:i}),(0,Q.jsx)(Dt,{skills:n,skillUsage:m.data?.skillUsage,selected:g,onToggle:re}),(0,Q.jsx)(gt,{pick:s,onChange:l,disabled:A.isPending||!b.canRun,accounts:!0}),(0,Q.jsx)(Et,{resolved:b,dataSlot:`gh-provider-gate`}),(0,Q.jsx)(yt,{templates:te,onInsert:w})]}),g.length>0?(0,Q.jsx)(`div`,{"data-slot":`gh-skill-chips`,className:`mt-2.5 flex flex-wrap gap-1.5`,children:g.map(e=>(0,Q.jsx)(ze,{label:`Remove this skill`,children:(0,Q.jsxs)(`button`,{type:`button`,"data-slot":`gh-skill-chip`,"data-skill":e,"aria-label":`Remove skill ${e}`,onClick:()=>re(e),className:`inline-flex h-[26px] items-center gap-1 rounded-full border border-border bg-muted px-2 font-mono text-meta font-medium text-foreground transition-colors hover:bg-danger/10 hover:text-danger`,children:[e,(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`})]})},e))}):null,(0,Q.jsx)(W,{ref:x,"data-slot":`gh-custom-prompt`,"aria-label":`Custom prompt`,"aria-keyshortcuts":`Control+Enter Meta+Enter`,value:v,onChange:e=>y(e.target.value),onKeyDown:j,placeholder:`Instructions for the agent… (#${e.number} and its link are always sent)`,className:`mt-3 min-h-20 text-ui`}),(0,Q.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-2.5`,children:[(0,Q.jsxs)(F,{variant:`contrast`,"data-action":`gh-run`,disabled:A.isPending||!b.canRun,onClick:()=>A.mutate(),children:[(0,Q.jsx)(H,{"aria-hidden":`true`,className:`size-3.5`}),`Run agent on this `,h]}),(0,Q.jsx)(`kbd`,{"aria-hidden":`true`,className:`rounded-[5px] border border-b-2 border-border bg-card px-[5px] py-px font-mono text-micro font-medium text-muted-foreground`,children:$e()}),u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`span`,{"data-slot":`gh-queued`,className:`flex items-center gap-1 text-label font-medium text-muted-foreground`,children:[(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5`}),`queued`]}),(0,Q.jsx)(M,{to:`/tasks/${u}`,"data-slot":`gh-view-run`,className:`text-label font-semibold text-violet hover:underline`,children:`View task →`})]}):null]})]})}var It=10;function Lt(e){let[t,n]=(0,Z.useState)(0),r=(0,Z.useRef)(null),i=(0,Z.useRef)(!1),a=e=>{i.current=!1,e.pointerType===`touch`&&(r.current={id:e.pointerId,x:e.clientX,y:e.clientY,axis:null})},o=e=>{let t=r.current;if(!t||t.id!==e.pointerId)return;let a=e.clientX-t.x,o=e.clientY-t.y;if(t.axis===null){if(Math.abs(a)<It&&Math.abs(o)<It)return;t.axis=Math.abs(a)>Math.abs(o)?`x`:`y`}t.axis===`x`&&(i.current=!0,n(Math.max(-112,Math.min(0,a))))},s=(t,i)=>{let a=r.current;!a||a.id!==t.pointerId||(r.current=null,n(0),!i&&a.axis===`x`&&t.clientX-a.x<=-72&&e())};return{offset:t,handlers:{onPointerDown:a,onPointerMove:o,onPointerUp:e=>s(e,!1),onPointerCancel:e=>s(e,!0),onClickCapture:e=>{i.current&&(i.current=!1,e.preventDefault(),e.stopPropagation())},onKeyDown:()=>{i.current=!1}}}}function Rt({offset:e}){return e===0?null:(0,Q.jsxs)(`span`,{"aria-hidden":`true`,"data-slot":`gh-swipe-reveal`,className:A(`absolute inset-y-0 right-0 flex items-center gap-1.5 rounded-md px-4 text-xs font-semibold transition-colors`,e<=-72?`bg-violet text-violet-foreground`:`bg-violet/15 text-violet`),children:[(0,Q.jsx)(H,{className:`size-3.5`}),`Run…`]})}function zt({item:e,open:t,onOpenChange:n,workflows:r,skills:i,engine:a,onQueued:o}){let s=E(),c=ee(),l=xt(a),[u,f]=(0,Z.useState)(``),p=T({mutationFn:async e=>({pick:e,created:await d(at(e.target,e.workflow,e.skill?[e.skill]:[],lt(e.target),ht(l)))}),onSuccess:({pick:e,created:t})=>{Ke(`github`);let r=`runs`in t?t.runs[0]:t;r&&o(e.target.url,r.id),Y(`Added to the queue — ${e.target.kind===`pr`?`PR`:`issue`} #${e.target.number}`),n(!1),f(``),e.skill&&c.data!==void 0&&ne({skillUsage:je(c.data.skillUsage,e.skill)}).then(()=>s.invalidateQueries({queryKey:C.uiState})).catch(()=>{}),s.invalidateQueries({queryKey:C.runs.all})},onError:e=>Y(e.message,{tone:`danger`})}),m=(t,n)=>{!e||p.isPending||!l.canRun||p.mutate({target:e,workflow:t,skill:n})},h=p.isPending||!l.canRun,g=V(r,u),_=ke([...i],u,c.data?.skillUsage);return(0,Q.jsx)(le,{open:t,onOpenChange:e=>{e||f(``),n(e)},children:(0,Q.jsxs)(ce,{side:`bottom`,"data-slot":`gh-swipe-sheet`,onOpenAutoFocus:e=>e.preventDefault(),className:`max-h-[85dvh] gap-0 rounded-t-xl pb-[env(safe-area-inset-bottom)]`,children:[(0,Q.jsxs)(oe,{className:`pb-2`,children:[(0,Q.jsxs)(se,{className:`truncate text-base`,children:[`Run agent on `,e?`${e.kind===`pr`?`PR`:`issue`} #${e.number}`:`…`]}),(0,Q.jsxs)(N,{className:`truncate text-xs`,children:[e?.title??``,` — tap a workflow or skill to start.`]})]}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2 px-4 pb-2`,children:[(0,Q.jsx)(Et,{resolved:l,dataSlot:`gh-swipe-provider-gate`}),(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(Pe,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-soft-foreground`}),(0,Q.jsx)(`input`,{type:`search`,"data-slot":`gh-swipe-filter`,"aria-label":`Filter workflows and skills`,placeholder:`Filter workflows and skills…`,value:u,onChange:e=>f(e.target.value),className:`w-full rounded-md border border-input bg-card py-2 pr-2 pl-7 text-body outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`})]})]}),(0,Q.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 pb-4`,children:[g.length>0?(0,Q.jsx)(Bt,{label:`Workflows`,children:g.map(e=>(0,Q.jsx)(Vt,{slot:`gh-swipe-workflow`,name:e.name,description:e.description,icon:(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-4 shrink-0 text-violet`}),disabled:h,onClick:()=>m(e.name,null)},e.name))}):null,_.length>0?(0,Q.jsx)(Bt,{label:`Skills`,children:_.map(e=>(0,Q.jsx)(Vt,{slot:`gh-swipe-skill`,name:e.name,description:e.description,icon:(0,Q.jsx)(pe,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),disabled:h,onClick:()=>m(null,e.name)},e.name))}):null,g.length===0&&_.length===0?(0,Q.jsxs)(`p`,{className:`px-2 py-3 text-sm text-soft-foreground`,children:[`Nothing matches “`,u.trim(),`”.`]}):null]})]})})}function Bt({label:e,children:t}){return(0,Q.jsxs)(`section`,{className:`pt-2`,children:[(0,Q.jsx)(`h3`,{className:`px-2 pb-1 eyebrow text-soft-foreground`,children:e}),(0,Q.jsx)(`ul`,{className:`flex flex-col`,children:t})]})}function Vt({slot:e,name:t,description:n,icon:r,disabled:i,onClick:a}){return(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`button`,{type:`button`,"data-slot":e,"data-name":t,disabled:i,onClick:a,className:`flex min-h-11 w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-muted active:bg-muted disabled:opacity-55`,children:[r,(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate font-mono text-ui font-medium`,children:t}),n?(0,Q.jsx)(`span`,{className:`truncate text-label text-muted-foreground`,children:n}):null]})]})})}var Ht=50,Ut=100,Wt=350;function Gt(e,t){let[n,r]=(0,Z.useState)(e);return(0,Z.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}var Kt=600;function qt(e,t){let[n,r]=(0,Z.useState)(null),i=(0,Z.useRef)(t);return(0,Z.useEffect)(()=>{i.current=t}),(0,Z.useEffect)(()=>{if(!e||!n||typeof IntersectionObserver>`u`)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&i.current()},{root:n.closest(`[data-slot="gh-list"]`),rootMargin:`0px 0px ${Kt}px 0px`});return t.observe(n),()=>t.disconnect()},[e,n]),r}function Jt({view:e,changes:t=!1,index:n=!1}){let{n:r}=re(),i=x(Ht),o=c().data?.capabilities?.automations===!0,l=(0,Z.useMemo)(()=>{let e=i.data?.pages;if(!e||e.length===0)return;let t=e[0],n=e[e.length-1];if(!(!t||!n))return{...t,available:t.available??!1,issues:e.flatMap(e=>e.issues??[]),prs:e.flatMap(e=>e.prs??[]),labelColors:Object.assign({},...e.map(e=>e.labelColors??{})),issuesNextCursor:n.issuesNextCursor,prsNextCursor:n.prsNextCursor}},[i.data]),d=ee(),f=d.data?.githubSort===`oldest`?`oldest`:`newest`,m=(0,Z.useMemo)(()=>l?.available?vt(l.prs,f):[],[l,f]),h=r===void 0?null:Number.parseInt(r,10),g=(0,Z.useMemo)(()=>{if(!l?.available)return[];let t=new Set;e===`prs`&&h!==null&&Number.isInteger(h)&&t.add(h);for(let e of m){if(t.size>=Ut)break;t.add(e.number)}return[...t]},[l,m,e,h]),y=a(g,e===`prs`),b=y.data?.available?y.data.checks:void 0,S=E(),w=e=>{S.setQueryData(C.uiState,t=>({...t,githubView:e})),ne({githubView:e}).then(e=>S.setQueryData(C.uiState,e)).catch(e=>{Y(e instanceof Error?e.message:String(e),{tone:`danger`}),S.invalidateQueries({queryKey:C.uiState})})},D=e=>{S.setQueryData(C.uiState,t=>({...t,githubSort:e})),ne({githubSort:e}).then(e=>S.setQueryData(C.uiState,e)).catch(e=>{Y(e instanceof Error?e.message:String(e),{tone:`danger`}),S.invalidateQueries({queryKey:C.uiState})})},O=(0,Z.useRef)(null),k=T({mutationFn:()=>te({refresh:!0,limit:Ht}),onSuccess:()=>{S.invalidateQueries({queryKey:C.githubPages(Ht)}),S.invalidateQueries({queryKey:C.githubChecks(g)});let e=O.current;if(!e){S.removeQueries({queryKey:[`github`,`comments`]});return}let t=C.githubComments(e.kind,e.number);_(e.kind,e.number,{refresh:!0}).then(e=>S.setQueryData(t,e)).catch(()=>{}),S.removeQueries({queryKey:[`github`,`comments`],predicate:e=>e.queryHash!==s(t)})},onError:e=>Y(e.message,{tone:`danger`})}),j=v(),oe=u(),[N,se]=(0,Z.useState)(()=>mt().workflow),[ce,le]=(0,Z.useState)(()=>mt().skills),[ue,fe]=pt();(0,Z.useEffect)(()=>{dt({workflow:N,skills:[...ce]})},[N,ce]);let pe=j.data?.workflows;(0,Z.useEffect)(()=>{pe&&N!==null&&!pe.some(e=>e.name===N)&&se(null)},[pe,N]);let P=oe.data,me=d.data?.skillUsage,he=(0,Z.useMemo)(()=>De(P??[],me),[P,me]),[ge,_e]=(0,Z.useState)(new Map),[ve,ye]=(0,Z.useState)(null),[be,xe]=(0,Z.useState)(!1),Se=(0,Z.useCallback)(e=>{ye(e),xe(!0)},[]),Ce=(0,Z.useCallback)((e,t)=>_e(n=>new Map(n).set(e,t)),[]),[I,L]=(0,Z.useState)(``),[R,Oe]=(0,Z.useState)([]),ke=I.trim()!==``||R.length>0,Ae=(0,Z.useRef)(null),je=qt(i.hasNextPage&&!i.isFetchingNextPage&&!i.isFetchNextPageError&&!ke,()=>void i.fetchNextPage()),z=Gt(I,Wt),Me=(0,Z.useMemo)(()=>l?.available?e===`issues`?vt(l.issues,f):m:[],[l,e,f,m]),B=ut(z,(0,Z.useMemo)(()=>ct(Me,{query:z,labels:R}).length,[Me,z,R])),V=p(e===`issues`?`issue`:`pr`,z,B);if(n&&d.data?.githubView===`prs`)return(0,Q.jsx)(ie,{to:`/github/prs`,replace:!0});if(!l)return i.isError?(0,Q.jsx)(`div`,{"data-route":`github`,className:`flex min-h-full flex-col`,children:(0,Q.jsx)(tt,{icon:(0,Q.jsx)(Fe,{}),tone:`danger`,title:`Could not load GitHub`,subtitle:i.error.message})}):(0,Q.jsx)(ot,{});if(O.current=null,!l.available)return(0,Q.jsx)(`div`,{"data-route":`github`,className:`flex min-h-full flex-col`,children:(0,Q.jsx)(tt,{icon:(0,Q.jsx)(bt,{}),tone:`neutral`,title:`GitHub is unavailable here`,subtitle:l.reason??`unknown reason`,actions:(0,Q.jsx)(F,{variant:`outline`,"data-action":`gh-retry`,disabled:k.isPending,onClick:()=>k.mutate(),children:`Try again`}),children:(0,Q.jsxs)(`p`,{className:`text-label leading-relaxed text-muted-foreground`,children:[`The tab needs the `,(0,Q.jsx)(`span`,{className:`font-mono`,children:`gh`}),` CLI, logged in (`,(0,Q.jsx)(`span`,{className:`font-mono`,children:`gh auth login`}),`), and a repo with a GitHub remote. Everything else in the cockpit works without it.`]})})});let H=Me,U=ct(H,{query:I,labels:R}),W=B&&V.data?.available?V.data:null,Ie=new Set(U.map(e=>e.number)),G=W?vt(ct(W.items,{labels:R}).filter(e=>!Ie.has(e.number)),f):[],Le=I.trim()!==``&&I.trim()!==z.trim()||B&&V.isPending,K={...W?.labelColors??{},...l.labelColors??{}},Re=ft(H),q=r===void 0?null:Number.parseInt(r,10),J=q===null?U[0]??G[0]??null:H.find(e=>e.number===q)??G.find(e=>e.number===q)??null;O.current=J?{kind:J.kind,number:J.number}:null;let Be=e===`issues`?`/github`:`/github/prs`,Ve=B&&(V.data?.available===!1||V.isError),He=V.data?.available===!1?V.data.reason??`unknown reason`:V.error instanceof Error?V.error.message:`the search request failed`,Ue=ke?Le?(0,Q.jsxs)(`p`,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(Ee,{"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}),`Searching GitHub for “`,I.trim(),`”…`]}):G.length>0?null:Ve?(0,Q.jsxs)(`p`,{children:[`No open `,e===`issues`?`issues`:`pull requests`,` match your filter, and GitHub could not be searched: `,He,`.`]}):W?(0,Q.jsxs)(`p`,{children:[`No `,e===`issues`?`issues`:`pull requests`,` match your filter — open, closed or merged.`]}):(0,Q.jsxs)(`p`,{children:[`No open `,e===`issues`?`issues`:`pull requests`,` match your filter.`]}):(0,Q.jsxs)(`p`,{children:[`No open `,e===`issues`?`issues`:`pull requests`,`.`]});return(0,Q.jsx)(wt,{name:`gh`,route:`github`,selected:r!==void 0,list:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`header`,{"data-slot":`gh-header`,className:`sticky top-0 z-10 border-b border-border bg-background/95 px-4 pt-3 backdrop-blur`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,Q.jsx)(`h1`,{className:`text-lg font-semibold`,children:`GitHub`}),l.repo?(0,Q.jsx)(`span`,{"data-slot":`gh-repo`,className:`min-w-0 truncate font-mono text-meta text-soft-foreground`,children:l.repo}):null,o?(0,Q.jsx)(M,{to:`/automations/new`,className:`ml-auto shrink-0 text-label font-medium text-violet hover:underline`,children:`Set up automations`}):null,(0,Q.jsx)(ze,{label:`Refresh from GitHub`,children:(0,Q.jsx)(nt,{"data-slot":`gh-refresh`,"aria-label":`Refresh from GitHub`,disabled:k.isPending,onClick:()=>k.mutate(),icon:(0,Q.jsx)(Ne,{"aria-hidden":`true`,className:A(`size-3`,k.isPending&&`motion-safe:animate-spin`)}),className:A(`shrink-0`,!o&&`ml-auto`),children:l.syncedAt?`synced ${X(l.syncedAt)} ago`:`refresh`})})]}),(0,Q.jsxs)(`div`,{"data-slot":`gh-tabs`,className:`mt-2.5 flex items-end gap-1`,children:[(0,Q.jsxs)(we,{to:`/github`,active:e===`issues`,onClick:()=>w(`issues`),children:[`Issues · `,Yt(l.issuesTotal??l.issues.length)]}),(0,Q.jsxs)(we,{to:`/github/prs`,active:e===`prs`,onClick:()=>w(`prs`),children:[`Pull requests · `,Yt(l.prsTotal??l.prs.length)]})]}),(0,Q.jsxs)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-2 pb-3`,children:[(0,Q.jsxs)(`div`,{className:`relative min-w-[11rem] flex-1`,children:[(0,Q.jsx)(Pe,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-soft-foreground`}),(0,Q.jsx)(`input`,{type:`search`,"data-slot":`gh-search`,"aria-label":`Search ${e}`,placeholder:`Search #id, title, author…`,value:I,onChange:e=>L(e.target.value),className:`w-full rounded-md border border-input bg-card py-1 pr-2 pl-7 text-ui outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`})]}),(0,Q.jsx)(Qt,{options:Re,colors:K,selected:R,onChange:Oe}),(0,Q.jsx)(ae,{slot:`gh-sort`,label:`Sort order`,value:f,options:[{value:`newest`,label:`Newest`},{value:`oldest`,label:`Oldest`}],onChange:D,className:`shrink-0`})]})]}),U.length===0?Ue&&(0,Q.jsx)(`div`,{"data-slot":`gh-empty`,className:`px-4 py-4 text-body text-muted-foreground`,children:Ue}):(0,Q.jsx)(`div`,{ref:e=>{Ae.current=e?.closest(`[data-slot="gh-list"]`)??null},"data-slot":`gh-rows`,"data-virtualized":`true`,className:`px-2 py-2`,children:(0,Q.jsx)(rt,{scrollRef:Ae,children:U.map(t=>(0,Q.jsx)(`div`,{className:`pb-0.5`,children:(0,Q.jsx)(Xt,{item:t,view:e,colors:K,active:J?.url===t.url,queued:ge.has(t.url),checks:t.kind===`pr`?b?.[t.number]??t.checks:t.checks,onSwipe:Se})},t.url))})}),i.hasNextPage&&!ke&&U.length>0?(0,Q.jsx)(`div`,{ref:je,"data-slot":`gh-load-more`,className:`flex min-h-6 items-center justify-center gap-1.5 px-4 pb-3 text-label text-muted-foreground`,children:i.isFetchingNextPage?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ee,{"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}),`Loading more…`]}):i.isFetchNextPageError?(0,Q.jsxs)(Q.Fragment,{children:[`Could not load more.`,(0,Q.jsx)(`button`,{type:`button`,"data-slot":`gh-load-more-retry`,onClick:()=>void i.fetchNextPage(),className:`font-medium text-violet hover:underline`,children:`Retry`})]}):null}):null,G.length>0?(0,Q.jsxs)(`div`,{"data-slot":`gh-search-hits`,children:[(0,Q.jsxs)(`p`,{className:`px-4 pt-2 pb-1 eyebrow text-soft-foreground`,children:[`Found on GitHub`,W?.truncated?` (first matches)`:``]}),(0,Q.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:G.map(t=>(0,Q.jsx)(Xt,{item:t,view:e,colors:K,active:J?.url===t.url,queued:ge.has(t.url),checks:t.kind===`pr`?b?.[t.number]??t.checks:t.checks,onSwipe:Se},t.url))})]}):null,(0,Q.jsx)(zt,{item:ve,open:be,onOpenChange:xe,workflows:j.data?.workflows??[],skills:he,engine:ue,onQueued:Ce})]}),detail:(0,Q.jsx)(Q.Fragment,{children:J?(0,Q.jsx)(en,{item:J,listPath:Be,colors:K,changes:t,checks:J.kind===`pr`?b?.[J.number]??J.checks:J.checks,children:(0,Q.jsx)(Ft,{item:J,workflows:j.data?.workflows??[],skills:he,workflow:N,onWorkflowChange:se,selectedSkills:ce,onSkillsChange:le,engine:ue,onEngineChange:fe,queuedRunId:ge.get(J.url)??null,onQueued:Ce},J.url)}):(0,Q.jsx)(tt,{icon:e===`issues`?(0,Q.jsx)(de,{}):(0,Q.jsx)(Te,{}),tone:`neutral`,heading:`h2`,title:q===null?`Nothing selected`:`Not found`,subtitle:q===null?`No open ${e===`issues`?`issues`:`pull requests`} to show.`:`#${q} is not among the open ${e===`issues`?`issues`:`pull requests`}. Search for ${q} above to look it up on GitHub, closed and merged included.`})})})}function Yt(e){return String(e)}var Xt=(0,Z.memo)(function({item:e,view:t,colors:n,active:r,queued:i,checks:a,onSwipe:o}){let s=e.kind===`issue`?de:Te,c=E(),l=Lt(()=>o?.(e)),u=()=>{c.prefetchQuery({queryKey:C.githubComments(e.kind,e.number),queryFn:({signal:t})=>_(e.kind,e.number,{},{signal:t}),staleTime:6e4})};return(0,Q.jsxs)(`li`,{className:A(`relative rounded-md`,l.offset!==0&&`overflow-hidden`),children:[o?(0,Q.jsx)(Rt,{offset:l.offset}):null,(0,Q.jsxs)(M,{to:`${t===`issues`?`/github/issues`:`/github/prs`}/${e.number}`,draggable:!0,onDragStart:t=>{try{t.dataTransfer.setData(`text/plain`,_t(e)),t.dataTransfer.effectAllowed=`copy`}catch{}},...o?l.handlers:{},style:l.offset?{transform:`translateX(${l.offset}px)`}:void 0,onMouseEnter:u,onFocus:u,"data-slot":`gh-row`,"data-number":e.number,"aria-current":r?`page`:void 0,title:`Drag into the composer to prefill a task`,className:A(`relative flex touch-pan-y flex-col gap-1 rounded-md bg-background px-2.5 py-2 transition-colors hover:bg-muted`,r&&`bg-muted`),children:[(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Q.jsx)(`span`,{className:A(`min-w-0 truncate text-ui font-medium`,r&&`font-semibold`),children:e.title})]}),(0,Q.jsxs)(`span`,{className:`flex items-center gap-2 pl-[22px] font-mono text-micro text-muted-foreground`,children:[(0,Q.jsxs)(`span`,{children:[`#`,e.number]}),(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:e.author}),(0,Q.jsx)(`span`,{children:X(e.createdAt)}),(0,Q.jsx)(yn,{count:e.comments}),a?(0,Q.jsx)(xn,{checks:a}):null,i?(0,Q.jsx)(`span`,{"data-slot":`gh-queued-flag`,className:`font-sans font-medium text-violet`,children:`↗ run queued`}):null]}),e.labels.length>0?(0,Q.jsx)(`span`,{className:`flex flex-wrap gap-1 pl-[22px]`,children:e.labels.map(e=>(0,Q.jsx)($t,{label:e,color:n[e]},e))}):null]}),(0,Q.jsx)(Pt,{item:e})]})},Zt);function Zt(e,t){return e.item===t.item&&e.view===t.view&&e.active===t.active&&e.queued===t.queued&&e.checks===t.checks&&e.onSwipe===t.onSwipe&&t.item.labels.every(n=>e.colors[n]===t.colors[n])}function Qt({options:e,colors:t,selected:n,onChange:r}){let[i,a]=(0,Z.useState)(!1),o=e=>r(n.includes(e)?n.filter(t=>t!==e):[...n,e]);return(0,Q.jsxs)(q,{open:i,onOpenChange:a,children:[(0,Q.jsx)(K,{asChild:!0,children:(0,Q.jsx)(nt,{"data-slot":`gh-label-filter`,disabled:e.length===0,active:n.length>0,chevron:!0,icon:(0,Q.jsx)(U,{"aria-hidden":`true`,className:`size-3`}),className:`shrink-0`,children:n.length>0?`Labels · ${n.length}`:`Labels`})}),(0,Q.jsx)(Re,{align:`end`,sideOffset:6,className:`w-60 p-0`,children:(0,Q.jsxs)(Qe,{children:[(0,Q.jsx)(Je,{placeholder:`Filter labels…`}),(0,Q.jsxs)(Ze,{className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[(0,Q.jsx)(Xe,{children:`No labels.`}),n.length>0?(0,Q.jsxs)(Ye,{value:`__clear__`,onSelect:()=>r([]),className:`text-soft-foreground`,children:[`Clear `,n.length,` filter`,n.length>1?`s`:``]}):null,e.map(e=>{let r=n.includes(e);return(0,Q.jsxs)(Ye,{value:e,onSelect:()=>o(e),children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`size-2.5 shrink-0 rounded-full border`,style:st(t[e])}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),r?(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-violet`}):null]},e)})]})]})})]})}function $t({label:e,color:t}){return(0,Q.jsx)(`span`,{"data-slot":`gh-label`,"data-label":e,style:st(t),className:`rounded-full border px-1.5 py-px text-micro font-medium`,children:e})}function en({item:e,listPath:t,colors:n,children:r,changes:i,checks:a}){let o=e.kind===`pr`?`pull request`:`issue`,s=m(e.kind,e.number),c=s.data?.detail?.body??e.body,l=s.data?.detail?.additions??e.additions,u=s.data?.detail?.deletions??e.deletions,d=e.kind===`pr`&&!!(l||u);return(0,Q.jsxs)(`article`,{"data-slot":`gh-detail-inner`,className:`min-w-0 px-4 py-4 md:px-7 md:py-5`,children:[(0,Q.jsxs)(M,{to:t,"data-slot":`gh-back`,className:`mb-3 inline-flex items-center gap-1.5 text-label font-medium text-muted-foreground hover:text-foreground md:hidden`,children:[(0,Q.jsx)(ue,{"aria-hidden":`true`,className:`size-3.5`}),`Back to the list`]}),(0,Q.jsxs)(`p`,{"data-slot":`gh-meta`,className:`flex flex-wrap items-center gap-x-1.5 font-mono text-micro text-soft-foreground`,children:[(0,Q.jsxs)(`span`,{children:[`#`,e.number]}),`·`,(0,Q.jsx)(`span`,{children:o}),`·`,(0,Q.jsxs)(`span`,{children:[`opened by `,e.author]}),`·`,(0,Q.jsxs)(`span`,{children:[X(e.createdAt),` ago`]}),e.comments?(0,Q.jsxs)(Q.Fragment,{children:[`·`,(0,Q.jsx)(yn,{count:e.comments})]}):null,d?(0,Q.jsxs)(Q.Fragment,{children:[`·`,(0,Q.jsxs)(`span`,{"data-slot":`gh-diffstat`,children:[(0,Q.jsxs)(`span`,{className:`text-success`,children:[`+`,l??0]}),` `,(0,Q.jsxs)(`span`,{className:`text-danger`,children:[`−`,u??0]})]})]}):null,`·`,k(e.url)?(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-open-link`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})]}):(0,Q.jsx)(`span`,{"data-slot":`gh-open-link`,className:`text-muted-foreground`,children:`open on GitHub`})]}),(0,Q.jsx)(`h2`,{className:`mt-2 text-xl leading-snug font-semibold`,children:e.title}),e.kind===`pr`?(0,Q.jsxs)(`nav`,{"aria-label":`Pull request detail`,className:`mt-4 flex border-b border-border`,children:[(0,Q.jsx)(we,{to:`/github/prs/${e.number}`,active:!i,children:`Conversation`}),(0,Q.jsx)(we,{to:`/github/prs/${e.number}/changes`,active:i,children:`Changes`})]}):null,e.labels.length>0||a?(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1.5`,children:[e.labels.map(e=>(0,Q.jsx)($t,{label:e,color:n[e]},e)),a?(0,Q.jsx)(bn,{checks:a,url:e.url}):null]}):null,i&&e.kind===`pr`?(0,Q.jsx)(an,{item:e}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{"data-slot":`gh-body`,className:`mt-5 text-sm`,children:c?(0,Q.jsx)(Nt,{children:c}):(0,Q.jsx)(`p`,{className:`text-soft-foreground`,children:`(no description)`})}),(0,Q.jsx)(on,{item:e,colors:n}),e.kind===`pr`?(0,Q.jsx)(nn,{number:e.number}):null,e.kind===`pr`?(0,Q.jsx)(rn,{number:e.number}):null,r]}),(0,Q.jsx)(At,{item:e})]})}var $={squash:`Squash and merge`,merge:`Create a merge commit`,rebase:`Rebase and merge`};function tn({state:e}){let t=`size-4 shrink-0`;return e===`passing`?(0,Q.jsx)(Se,{"aria-hidden":`true`,"data-slot":`gh-merge-status-passing`,className:A(t,`text-success`)}):e===`failing`?(0,Q.jsx)(fe,{"aria-hidden":`true`,"data-slot":`gh-merge-status-failing`,className:A(t,`text-danger`)}):e===`pending`?(0,Q.jsx)(Ee,{"aria-hidden":`true`,"data-slot":`gh-merge-status-pending`,className:A(t,`animate-spin text-warning`)}):(0,Q.jsx)(Ce,{"aria-hidden":`true`,"data-slot":`gh-merge-status-unknown`,className:A(t,`text-soft-foreground`)})}function nn({number:e}){let t=c().data?.forge,n=t===null?`Assess impact needs a GitHub remote — none was detected.`:t?.available===!1?`Assess impact needs GitHub: ${t.reason??`it is unreachable`}.`:void 0;return(0,Q.jsx)(`section`,{"data-slot":`gh-impact`,"aria-label":`Change impact`,className:`mt-6 rounded-lg border border-border bg-card p-3`,children:(0,Q.jsx)(kt,{subject:{kind:`pr`,number:e},unavailable:n})})}function rn({number:e}){let t=E(),n=D({queryKey:C.githubMergeState(e),queryFn:({signal:t})=>w(e,{},{signal:t}),retry:!1}),r=n.data?.available?n.data.mergeState:null,[a,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(!1),d=T({mutationFn:()=>w(e,{refresh:!0}),onSuccess:n=>t.setQueryData(C.githubMergeState(e),n),onError:e=>Y(e instanceof Error?e.message:String(e),{tone:`danger`})}),f=a&&r?.methods.includes(a)?a:r?.defaultMethod??r?.methods[0]??null,p=T({mutationFn:()=>{if(!r||!f)throw Error(`No merge method is available.`);return i(e,{method:f,expectedHeadSha:r.headSha,...l&&r.canOverride?{overrideRules:!0}:{}})},onSuccess:()=>{c(!1),Y(`Pull request #${e} merged`),t.invalidateQueries({queryKey:C.githubMergeState(e)}),t.invalidateQueries({queryKey:C.githubPages(Ht)}),t.invalidateQueries({queryKey:C.githubComments(`pr`,e)})},onError:n=>{Y(n instanceof Error?n.message:String(n),{tone:`danger`}),t.invalidateQueries({queryKey:C.githubMergeState(e)})}});if(n.isPending)return(0,Q.jsx)(Ge,{"data-slot":`gh-merge-loading`,className:`mt-6 h-32 w-full`});if(!r)return(0,Q.jsxs)(`section`,{"data-slot":`gh-merge-unavailable`,className:`mt-6 rounded-lg border border-border bg-card p-4 text-sm`,children:[(0,Q.jsx)(`p`,{className:`font-medium`,children:`Merge status unavailable`}),(0,Q.jsx)(`p`,{className:`mt-1 text-label text-muted-foreground`,children:n.data?.available===!1?n.data.reason:`GitHub could not load merge requirements.`})]});let m=r.state===`merged`?`Merged`:r.state===`closed`?`Closed`:r.isDraft?`Draft`:r.mergeable===`conflicting`?`Conflicts must be resolved`:r.canMerge?`Ready to merge`:`Merge blocked`,h=r.reviewDecision===`approved`||r.reviewDecision===`not-required`?`passing`:r.reviewDecision===`unknown`?`unknown`:`failing`,g=r.mergeable===`mergeable`?`passing`:r.mergeable===`conflicting`?`failing`:`unknown`,_=!!(f&&(r.canMerge||r.canOverride&&l));return(0,Q.jsxs)(`section`,{"data-slot":`gh-merge-box`,"aria-live":`polite`,className:`mt-6 rounded-lg border border-border bg-card p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[r.canMerge?(0,Q.jsx)(P,{"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-success`}):(0,Q.jsx)(Fe,{"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-warning`}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Q.jsx)(`h3`,{className:`font-semibold`,children:m}),(0,Q.jsxs)(F,{type:`button`,variant:`ghost`,size:`sm`,disabled:d.isPending,onClick:()=>d.mutate(),children:[(0,Q.jsx)(Ne,{"aria-hidden":`true`,className:A(`size-3.5`,d.isPending&&`animate-spin`)}),`Refresh`]})]}),(0,Q.jsxs)(`p`,{className:`mt-1 font-mono text-meta text-soft-foreground`,children:[r.headRef,` (`,r.headSha.slice(0,7),`) → `,r.baseRef]}),(0,Q.jsxs)(`ul`,{className:`mt-3 space-y-2 text-xs`,children:[(0,Q.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(tn,{state:h}),(0,Q.jsxs)(`span`,{children:[`Reviews: `,r.reviewDecision.replaceAll(`-`,` `)]})]}),(0,Q.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(tn,{state:g}),(0,Q.jsxs)(`span`,{children:[`Conflicts: `,r.mergeable===`conflicting`?`present`:r.mergeable===`mergeable`?`none`:`unknown`]})]}),r.checks.length===0&&r.checksTier!==`none`?(0,Q.jsx)(`li`,{children:`No checks configured`}):r.checks.map(e=>(0,Q.jsxs)(`li`,{className:`flex items-center justify-between gap-3`,children:[(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(tn,{state:e.state}),(0,Q.jsxs)(`span`,{children:[e.name,` · `,e.state,e.required===!0?` · required`:e.required===null?` · requiredness unknown`:``]})]}),e.url&&k(e.url)?(0,Q.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-muted-foreground underline`,children:`details`}):null]},e.name)),r.checksTier===`aggregate`||r.checksTier===`none`?(0,Q.jsxs)(`li`,{"data-slot":`gh-merge-checks-degraded`,className:`flex items-start gap-2`,children:[(0,Q.jsx)(tn,{state:`unknown`}),(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[r.checksTier===`aggregate`?`Only the rolled-up check state is readable here — per-check detail is not.`:`This token cannot read the checks on this pull request.`,r.checksReason?(0,Q.jsx)(`span`,{className:`mt-0.5 block break-words text-soft-foreground`,children:r.checksReason}):null]})]}):null,r.blockers.filter(e=>!(e.code===`checks-unknown`&&r.checksTier===`none`)).map(e=>(0,Q.jsx)(`li`,{className:`text-soft-foreground`,children:e.message},e.code))]}),r.canOverride?(0,Q.jsxs)(`label`,{className:`mt-4 flex cursor-pointer items-start gap-2 rounded-md border border-warning/40 bg-warning/5 p-3 text-xs`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked),className:`mt-0.5 size-4 accent-primary`}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`span`,{className:`block font-medium`,children:`Merge without waiting for requirements`}),(0,Q.jsx)(`span`,{className:`mt-0.5 block text-soft-foreground`,children:`GitHub will allow this only if your permissions can bypass the repository rules.`})]})]}):null,r.state===`open`&&r.methods.length>0?(0,Q.jsxs)(`div`,{className:`mt-4 flex flex-col gap-2 sm:flex-row`,children:[(0,Q.jsxs)(xe,{value:f??void 0,onValueChange:e=>o(e),children:[(0,Q.jsx)(ye,{"aria-label":`Merge method`,"data-slot":`gh-merge-method`,className:`w-full min-w-0 sm:flex-1`,children:(0,Q.jsx)(be,{placeholder:`Merge method`})}),(0,Q.jsx)(ve,{children:r.methods.map(e=>(0,Q.jsx)(_e,{value:e,children:$[e]},e))})]}),(0,Q.jsx)(F,{disabled:!_,onClick:()=>c(!0),children:f?$[f]:`Merge`})]}):null]})]}),(0,Q.jsx)(We,{open:s,onOpenChange:c,children:(0,Q.jsxs)(Ve,{"data-slot":`gh-merge-confirm`,showCloseButton:!1,children:[(0,Q.jsxs)(J,{children:[(0,Q.jsxs)(He,{children:[f?$[f]:`Merge`,` pull request #`,e,`?`]}),(0,Q.jsxs)(Ue,{children:[`This will merge “`,r.title,`” into `,r.baseRef,`. GitHub will re-check the exact reviewed head before changing the repository.`,l&&r.canOverride?` You are asking GitHub to bypass unmet repository requirements; GitHub may refuse if your permissions do not allow it.`:``]})]}),p.error?(0,Q.jsx)(`p`,{className:`text-sm text-danger`,children:p.error.message}):null,(0,Q.jsxs)(Be,{children:[(0,Q.jsx)(F,{variant:`outline`,disabled:p.isPending,onClick:()=>c(!1),children:`Cancel`}),(0,Q.jsx)(F,{disabled:p.isPending,onClick:()=>p.mutate(),children:p.isPending?`Merging…`:f?$[f]:`Merge`})]})]})})]})}function an({item:e}){let t=E(),n=f(e.number),[r,i]=(0,Z.useState)(``),[a,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(!1),l=n.data,u=l?.available?l.files.filter(e=>e.path.toLowerCase().includes(r.toLowerCase())):[],d=u.findIndex(e=>e.path===a);(0,Z.useEffect)(()=>{u.length>0&&!u.some(e=>e.path===a)&&o(u[0].path)},[l?.available?l.headSha:``,r]);let p=async()=>{let n=l?.available?l.headSha:null,r=await S(e.number,{refresh:!0});t.setQueryData([`github`,`pr-changes`,e.number],r),r.available&&n&&n!==r.headSha&&(o(r.files[0]?.path??null),Y(`The reviewed revision changed.`))};if(n.isPending)return(0,Q.jsx)(`p`,{"aria-live":`polite`,className:`mt-6 text-sm text-muted-foreground`,children:`Loading changed files…`});if(n.isError||!l)return(0,Q.jsx)(`p`,{className:`mt-6 text-sm text-danger`,children:`Changed files could not be loaded.`});if(!l.available)return(0,Q.jsx)(`p`,{className:`mt-6 text-sm text-muted-foreground`,children:l.reason});let m=u.map(e=>({path:e.path,...e.previousPath?{oldPath:e.previousPath}:{},status:e.status===`removed`?`deleted`:e.status===`changed`?`modified`:e.status,adds:e.additions,dels:e.deletions,binary:e.patchUnavailableReason===`binary`,patch:e.patch??``})),h=k(e.url)?`${e.url}/files`:null,g=u.find(e=>e.path===a);return(0,Q.jsxs)(`section`,{"data-slot":`gh-pr-changes`,className:`mt-5 min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,Q.jsxs)(`strong`,{children:[l.files.length,` changed files`]}),(0,Q.jsxs)(`span`,{className:`text-success`,children:[`+`,l.additions]}),(0,Q.jsxs)(`span`,{className:`text-danger`,children:[`−`,l.deletions]}),(0,Q.jsx)(ze,{label:l.headSha,children:(0,Q.jsxs)(`span`,{className:`font-mono text-muted-foreground`,children:[`head `,l.headSha.slice(0,8)]})}),(0,Q.jsx)(F,{type:`button`,variant:`outline`,size:`sm`,className:`ml-auto min-h-11`,onClick:()=>void p(),children:`Refresh`})]}),l.truncated?(0,Q.jsxs)(`p`,{role:`status`,className:`mt-3 rounded-md border border-warning/40 bg-warning/10 p-3 text-xs`,children:[l.reason??`This response is incomplete.`,` `,h?(0,Q.jsx)(`a`,{href:h,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Open all files on GitHub`}):null]}):null,(0,Q.jsxs)(`div`,{className:`mt-4 grid min-w-0 gap-4 lg:grid-cols-[240px_minmax(0,1fr)]`,children:[(0,Q.jsxs)(`aside`,{className:`min-w-0`,children:[(0,Q.jsx)(`input`,{"aria-label":`Filter changed files`,value:r,onChange:e=>i(e.target.value),placeholder:`Filter files…`,className:`min-h-11 w-full rounded-md border border-input bg-background px-3 text-sm`}),(0,Q.jsxs)(q,{open:s,onOpenChange:c,children:[(0,Q.jsx)(K,{asChild:!0,children:(0,Q.jsxs)(F,{type:`button`,variant:`outline`,"data-slot":`gh-file-picker`,"aria-label":`Select changed file`,className:`mt-2 min-h-11 w-full justify-between font-normal lg:hidden`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-ui`,children:a??`Choose a file`}),(0,Q.jsx)(ge,{"aria-hidden":`true`,className:`size-4 shrink-0 opacity-50`})]})}),(0,Q.jsx)(Re,{align:`start`,className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,Q.jsxs)(Qe,{children:[(0,Q.jsx)(Je,{placeholder:`Find a file…`}),(0,Q.jsxs)(Ze,{className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[(0,Q.jsx)(Xe,{children:`No files.`}),u.map(e=>(0,Q.jsxs)(Ye,{value:e.path,onSelect:()=>{o(e.path),c(!1)},className:`font-mono text-ui`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.path}),a===e.path?(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-violet`}):null]},e.path))]})]})})]}),(0,Q.jsx)(`ul`,{className:`mt-2 hidden max-h-[60vh] overflow-auto lg:block`,children:u.map(e=>(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>o(e.path),className:A(`min-h-11 w-full truncate rounded px-2 text-left font-mono text-ui`,a===e.path&&`bg-muted font-medium`),title:e.path,children:[e.status,`· `,e.path,` `,(0,Q.jsxs)(`span`,{className:`text-success`,children:[`+`,e.additions]}),` `,(0,Q.jsxs)(`span`,{className:`text-danger`,children:[`−`,e.deletions]})]})},e.path))})]}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`mb-2 flex justify-end gap-1`,children:[(0,Q.jsx)(F,{"aria-label":`Previous file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:d<=0,onClick:()=>o(u[d-1]?.path??null),children:(0,Q.jsx)(he,{})}),(0,Q.jsx)(F,{"aria-label":`Next file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:d<0||d>=u.length-1,onClick:()=>o(u[d+1]?.path??null),children:(0,Q.jsx)(me,{})})]}),u.length===0?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No changed files match this filter.`}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ot,{files:m.filter(e=>e.path===a),wrap:!0,className:`min-w-0`}),g&&!g.patch?(0,Q.jsxs)(`p`,{className:`rounded-b border border-border p-3 text-xs text-muted-foreground`,children:[`Patch unavailable: `,g.patchUnavailableReason??`not-provided`,`.`]}):null]})]})]})]})}function on({item:e,colors:t}){let n=m(e.kind,e.number),r=n.data,i=(0,Z.useMemo)(()=>{let e=[...(r?.comments??[]).map(e=>({row:`comment`,comment:e})),...(r?.events??[]).map(e=>({row:`event`,event:e}))],t=e=>{let t=Date.parse(sn(e));return Number.isNaN(t)?-1/0:t};return e.sort((e,n)=>t(e)-t(n))},[r?.comments,r?.events]);return n.isPending?(0,Q.jsxs)(`section`,{"data-slot":`gh-thread-loading`,className:`mt-6 border-t border-border pt-5`,children:[(0,Q.jsx)(Ge,{className:`mb-3 h-3 w-24`}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Q.jsx)(Ge,{className:`h-14 w-full`}),(0,Q.jsx)(Ge,{className:`h-14 w-full`})]})]}):!r||!r.available?(0,Q.jsxs)(`section`,{"data-slot":`gh-thread-error`,className:`mt-6 border-t border-border pt-5 text-label text-muted-foreground`,children:[(0,Q.jsxs)(`span`,{children:[`Couldn’t load comments — `,r?.reason??(n.error instanceof Error?n.error.message:`could not load comments`),`. `]}),(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})]})]}):i.length===0?null:(0,Q.jsxs)(`section`,{"data-slot":`gh-thread`,className:`mt-6 border-t border-border pt-5`,children:[(0,Q.jsxs)(`h3`,{"data-slot":`gh-thread-header`,className:`mb-4 eyebrow text-soft-foreground`,children:[`Activity · `,r.comments.length,` comment`,r.comments.length===1?``:`s`]}),(0,Q.jsx)(`ul`,{className:`flex flex-col gap-5`,children:cn(i).map(e=>e.group===`commits`?(0,Q.jsx)(ln,{commits:e.commits,colors:t},e.commits[0].id):e.entry.row===`comment`?(0,Q.jsx)(hn,{comment:e.entry.comment},`${e.entry.comment.kind}-${e.entry.comment.id}`):(0,Q.jsx)(dn,{event:e.entry.event,colors:t},e.entry.event.id))}),r.truncated?(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-thread-truncated`,className:`mt-4 inline-flex items-center gap-0.5 text-label text-muted-foreground hover:text-foreground hover:underline`,children:[`thread truncated — open on GitHub`,(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})]}):null]})}var sn=e=>e.row===`comment`?e.comment.createdAt:e.event.createdAt;function cn(e){let t=[],n=[],r=()=>{n.length!==0&&(n.length===1?t.push({group:`single`,entry:{row:`event`,event:n[0]}}):t.push({group:`commits`,commits:n}),n=[])};for(let i of e){if(i.row===`event`&&i.event.kind===`committed`&&i.row===`event`){let e=n[n.length-1];e&&e.actor!==i.event.actor&&r(),n.push(i.event);continue}r(),t.push({group:`single`,entry:i})}return r(),t}function ln({commits:e,colors:t}){let[n,r]=(0,Z.useState)(!1),i=e[0]?.actor??`?`;return n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`true`,className:`min-w-0`,children:(0,Q.jsxs)(`button`,{type:`button`,"aria-expanded":!0,onClick:()=>r(!1),className:`flex items-center gap-1.5 font-mono text-meta text-soft-foreground hover:text-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:un.committed}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Q.jsxs)(`span`,{children:[`added `,e.length,` commits`]})]})}),e.map(e=>(0,Q.jsx)(dn,{event:e,colors:t},e.id))]}):(0,Q.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`false`,className:`min-w-0`,children:(0,Q.jsxs)(`button`,{type:`button`,"aria-expanded":!1,onClick:()=>r(!0),className:`flex items-center gap-1.5 font-mono text-meta text-soft-foreground hover:text-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:un.committed}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Q.jsxs)(`span`,{children:[`added `,e.length,` commits`]}),(0,Q.jsx)(`span`,{className:`shrink-0`,children:X(e[e.length-1].createdAt)})]})})}var un={committed:`⚙`,labeled:`◆`,unlabeled:`◇`,assigned:`◍`,unassigned:`◌`,merged:`⑃`,closed:`⊘`,reopened:`⊙`,head_ref_force_pushed:`↻`,"cross-referenced":`↗`,renamed:`✎`};function dn({event:e,colors:t}){return(0,Q.jsxs)(`li`,{"data-slot":`gh-event-row`,"data-kind":e.kind,className:A(`flex min-w-0 items-center gap-1.5 font-mono text-meta text-soft-foreground`,e.kind===`merged`&&`text-accent-foreground`),children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:un[e.kind]}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.actor}),(0,Q.jsx)(fn,{event:e,colors:t}),(0,Q.jsx)(`span`,{className:`shrink-0`,children:X(e.createdAt)}),e.url?(0,Q.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open ${e.kind} on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})}):null]})}function fn({event:e,colors:t}){switch(e.kind){case`committed`:return(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`shrink-0`,children:`committed`}),e.sha?(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}):null,e.message?(0,Q.jsx)(`span`,{className:`truncate font-sans text-foreground`,children:e.message}):null,(0,Q.jsx)(pn,{checks:e.checks})]});case`labeled`:case`unlabeled`:return(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`shrink-0`,children:e.kind===`labeled`?`added the`:`removed the`}),e.label?(0,Q.jsx)(`span`,{"data-slot":`gh-event-label`,style:st(e.label.color??t[e.label.name]),className:`max-w-[12rem] truncate rounded-full border px-1.5 py-px font-sans text-micro`,children:e.label.name}):null,(0,Q.jsx)(`span`,{className:`shrink-0`,children:`label`})]});case`assigned`:case`unassigned`:return(0,Q.jsxs)(`span`,{className:`truncate`,children:[e.kind===`assigned`?`assigned`:`unassigned`,` `,e.subject??`someone`]});case`merged`:return(0,Q.jsx)(`span`,{children:`merged this`});case`closed`:return(0,Q.jsx)(`span`,{children:`closed this`});case`reopened`:return(0,Q.jsx)(`span`,{children:`reopened this`});case`head_ref_force_pushed`:return(0,Q.jsx)(`span`,{children:`force-pushed`});case`renamed`:return(0,Q.jsxs)(`span`,{className:`truncate`,children:[`renamed this to `,e.subject??`—`]});case`cross-referenced`:return(0,Q.jsxs)(`span`,{className:`truncate`,children:[`referenced this in `,e.refNumber?`#${e.refNumber}`:`another thread`,e.refTitle?` ${e.refTitle}`:``]})}}function pn({checks:e}){return e?(0,Q.jsx)(`span`,{"data-slot":`gh-commit-checks`,"data-checks":e,"aria-label":`checks ${e}`,className:A(`shrink-0`,vn[e]),children:_n[e]}):null}var mn={approved:{label:`approved`,tone:`border-success/40 text-success`},changes_requested:{label:`changes requested`,tone:`border-danger/40 text-danger`},commented:{label:`commented`,tone:`border-border text-muted-foreground`},dismissed:{label:`dismissed`,tone:`border-border text-muted-foreground`}};function hn({comment:e}){let t=e.reviewState?mn[e.reviewState]:null;return(0,Q.jsxs)(`li`,{"data-slot":`gh-thread-entry`,"data-kind":e.kind,className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-mono text-meta text-soft-foreground`,children:[(0,Q.jsx)(gn,{url:e.avatarUrl,login:e.author}),(0,Q.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.author}),(0,Q.jsx)(`span`,{children:X(e.createdAt)}),t?(0,Q.jsx)(`span`,{"data-slot":`gh-review-chip`,"data-review-state":e.reviewState,className:A(`rounded-full border px-1.5 py-px font-sans text-micro font-medium`,t.tone),children:t.label}):null,(0,Q.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open comment on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Q.jsx)(L,{"aria-hidden":`true`,className:`size-2.5`})})]}),(0,Q.jsx)(`div`,{"data-slot":`gh-thread-body`,className:`text-sm`,children:e.body?(0,Q.jsx)(Nt,{children:e.body}):(0,Q.jsx)(`p`,{className:`text-soft-foreground`,children:`(no body)`})})]})}function gn({url:e,login:t}){let[n,r]=(0,Z.useState)(!1);return e&&!n?(0,Q.jsx)(`img`,{src:e,alt:``,width:16,height:16,loading:`lazy`,onError:()=>r(!0),"data-slot":`gh-avatar`,className:`size-4 shrink-0 rounded-full`}):(0,Q.jsx)(`span`,{"data-slot":`gh-avatar-fallback`,"aria-hidden":`true`,className:`flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-[8px] font-semibold text-muted-foreground uppercase`,children:t.slice(0,1)||`?`})}var _n={passing:`✓`,failing:`✗`,pending:`○`},vn={passing:`text-success`,failing:`text-danger`,pending:`text-warning`};function yn({count:e}){return e?(0,Q.jsxs)(`span`,{"data-slot":`gh-comment-count`,"data-count":e,"aria-label":`${e} comment${e===1?``:`s`}`,className:`inline-flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(R,{"aria-hidden":`true`,className:`size-3`}),e]}):null}function bn({checks:e,url:t}){let n=A(`text-meta font-medium`,vn[e],t&&`hover:underline`),r=`${_n[e]} checks ${e}`;return t?(0,Q.jsx)(`a`,{href:`${t}/checks`,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-checks`,"data-checks":e,className:n,children:r}):(0,Q.jsx)(`span`,{"data-slot":`gh-checks`,"data-checks":e,className:n,children:r})}function xn({checks:e}){return(0,Q.jsx)(`span`,{"data-slot":`gh-row-checks`,"data-checks":e,"aria-label":`checks ${e}`,className:A(`shrink-0 font-sans text-meta font-semibold`,vn[e]),children:_n[e]})}export{Jt as GithubRoute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Cn as r,F as i,Mi as a,hn as o,pn as s,yo as c}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Cn as r,F as i,Mi as a,hn as o,pn as s,yo as c}from"./queries-BQUz3Wnb.js";import{T as l}from"./utils-Dp6vCdiU.js";import{t as u}from"./use-desktop-BNN3U2y9.js";var d=e(t(),1);function f(e){let t=e.container;if(t===void 0)return{hasContainer:!1,cpuLimited:!1,cpuCores:e.cpuCount,...e.cpuPct===void 0?{}:{cpuPct:e.cpuPct},cpuIsEffective:!1,memLimited:!1,memTotalBytes:e.memTotalBytes,...e.memUsedBytes===void 0?{}:{memUsedBytes:e.memUsedBytes},memIsEffective:!1,cgroupUnknown:e.cgroupProbe===`unavailable`};let n=t.cpuQuotaCores!==void 0||t.cpuAffinityCores!==void 0,r=t.cpuQuotaCores===void 0?t.cpuAffinityCores===void 0?void 0:`cpuset`:`quota`,i=n?Math.min(e.cpuCount,e.hostCpuCount??1/0,t.cpuQuotaCores??1/0,t.cpuAffinityCores??1/0):e.cpuCount,a=t.memLimitBytes!==void 0,o=n?t.cpuPct:e.cpuPct,s=a?t.memUsedBytes:e.memUsedBytes;return{hasContainer:!0,source:t.source,cpuLimited:n,...r===void 0?{}:{cpuLimitKind:r},cpuCores:i,...o===void 0?{}:{cpuPct:o},cpuIsEffective:n,memLimited:a,memTotalBytes:a?t.memLimitBytes??e.memTotalBytes:e.memTotalBytes,...s===void 0?{}:{memUsedBytes:s},memIsEffective:a,...e.hostCpuCount===void 0?{}:{hostCpuCount:e.hostCpuCount},cgroupUnknown:e.cgroupProbe===`unavailable`}}function p(e){let t=Math.round(e*10)/10;return`${Number.isInteger(t)?t:t.toFixed(1)} CPU`}function m(e,t){let n=r(t);if(e===void 0)return`— / ${n}`;let i=r(e),a=n.split(` `)[1];return a!==void 0&&i.endsWith(` ${a}`)?`${i.slice(0,-(a.length+1))}/${n}`:`${i}/${n}`}var h=n(),g=2500,_=2e3,v=(e,t)=>new Promise((n,r)=>{if(t?.aborted){r(new DOMException(`Aborted`,`AbortError`));return}let i=()=>{clearTimeout(a),r(new DOMException(`Aborted`,`AbortError`))},a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);t?.addEventListener(`abort`,i,{once:!0})});async function y(e){let t=await a({signal:e});return t.cpuPct===void 0?(await v(g,e),a({signal:e})):t}function b(){let e=i().data;if(e!==void 0)return e.capabilities?.localHandoff===!0?`local`:`remote`}var x=Object.freeze([]),S=Object.freeze({history:x});function C(){let e=S,t,n=new Set,r=()=>{for(let e of n)e()},i=!1,a=()=>{document.visibilityState!==`hidden`&&(document.removeEventListener(`visibilitychange`,a),i=!1,r())},o=()=>{if(typeof document>`u`||document.visibilityState!==`hidden`)return r();i||(i=!0,document.addEventListener(`visibilitychange`,a))};return{subscribe(e){return n.add(e),()=>n.delete(e)},get:()=>e,push(n,r,i){let a=e,s=t!==void 0&&t!==i;t=i;let c=a.latest?.sampledAt===n.sampledAt;if(c&&a.latest===n&&a.lastFrameAt===r&&!s)return;let l=a.history[a.history.length-1],u=!c&&l!==void 0&&Date.parse(n.sampledAt)-Date.parse(l.sampledAt)>8e3,d=i!==`route`,p=s||u||!d?[]:a.history,m=f(n).cpuPct,h=p[p.length-1];e={latest:n,lastFrameAt:r,history:d&&m!==void 0&&h?.sampledAt!==n.sampledAt?[...p,{sampledAt:n.sampledAt,receivedAt:r,cpuPct:m}].slice(-30):p,...a.topicUnavailable===!0?{topicUnavailable:!0}:{}},o()},markTopicUnavailable(){e.topicUnavailable!==!0&&(e={...e,topicUnavailable:!0},r())},reset(){t=void 0,e=S,r()}}}var w=(0,d.createContext)(null);function T({children:e}){let[t]=(0,d.useState)(C);return(0,h.jsxs)(w.Provider,{value:t,children:[e,(0,h.jsx)(E,{})]})}function E(){return P(),null}var D=()=>()=>void 0;function O(){let e=(0,d.useContext)(w);return(0,d.useSyncExternalStore)(e?e.subscribe:D,()=>e?.get().latest,()=>void 0)}function k(){let e=(0,d.useContext)(w);return(0,d.useSyncExternalStore)(e?e.subscribe:D,()=>e?.get().history??S.history,()=>S.history)}function A(){let e=(0,d.useContext)(w);return(0,d.useSyncExternalStore)(e?e.subscribe:D,()=>e?.get().lastFrameAt,()=>void 0)}function j(){let e=(0,d.useContext)(w);return(0,d.useSyncExternalStore)(e?e.subscribe:D,()=>e?.get().topicUnavailable===!0,()=>!1)}function M(){let e=O(),t=A(),[n,r]=(0,d.useState)(()=>Date.now());if((0,d.useEffect)(()=>{let e=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(e)},[]),e===void 0)return;let i=Date.parse(e.sampledAt);return Number.isNaN(i)?t===void 0?void 0:Math.max(0,Math.round((n-t)/1e3)):Math.max(0,Math.round((n-i)/1e3))}function N(e,t){let n=(0,d.useContext)(w),r=b(),i=j();(0,d.useEffect)(()=>{if(!(!n||!t||r!==`local`))return o(`host`,t=>{let r=l.safeParse(t);r.success&&n.push(r.data,Date.now(),e)},()=>n.markTopicUnavailable())},[n,t,r,e]);let u=c({queryKey:[...s.hostUsage,`poll`],queryFn:({signal:e})=>a({signal:e}),enabled:n!==null&&t&&r===`local`&&i,refetchInterval:_,staleTime:0,retry:!1}).data;(0,d.useEffect)(()=>{!n||u===void 0||n.push(u,Date.now(),e)},[n,u,e])}function P(){N(`root`,u())}function F(e={}){N(`card`,e.enabled??!0)}function I(){let e=(0,d.useContext)(w),t=b(),n=c({queryKey:s.hostUsage,queryFn:({signal:e})=>y(e),enabled:t===`remote`,staleTime:0,retry:!1}),r=n.data;return(0,d.useEffect)(()=>{!e||r===void 0||e.push(r,Date.now(),`route`)},[e,r]),n}export{j as a,I as c,p as d,m as f,M as i,F as l,k as n,b as o,A as r,O as s,T as t,f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Dp6vCdiU.js";import{A as i,C as a,D as o,E as s,L as c,N as l,T as u,a as d,i as f,j as p,k as m,o as h,r as g,s as _,x as v,z as y}from"./button-CJXK1JqU.js";var b=e(t(),1),x=n(),[S,C]=i(`Tooltip`,[_]),w=_(),T=`TooltipProvider`,E=700,D=`tooltip.open`,[O,k]=S(T),A=e=>{let{__scopeTooltip:t,delayDuration:n=E,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,x.jsx)(O,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};A.displayName=T;var j=`Tooltip`,[M,N]=S(j),P=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,l=k(j,e.__scopeTooltip),d=w(t),[f,p]=b.useState(null),m=u(),g=b.useRef(0),_=s??l.disableHoverableContent,v=c??l.delayDuration,y=b.useRef(!1),[S,C]=o({prop:r,defaultProp:i??!1,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(D))):l.onClose(),a?.(e)},caller:j}),T=b.useMemo(()=>S?y.current?`delayed-open`:`instant-open`:`closed`,[S]),E=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,C(!0)},[C]),O=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,C(!1)},[C]),A=b.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,C(!0),g.current=0},v)},[v,C]);return b.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]),(0,x.jsx)(h,{...d,children:(0,x.jsx)(M,{scope:t,contentId:m,open:S,stateAttribute:T,trigger:f,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?A():E()},[l.isOpenDelayedRef,A,E]),onTriggerLeave:b.useCallback(()=>{_?O():(window.clearTimeout(g.current),g.current=0)},[O,_]),onOpen:E,onClose:O,disableHoverableContent:_,children:n})})};P.displayName=j;var F=`TooltipTrigger`,I=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=N(F,n),a=k(F,n),o=w(n),s=y(t,b.useRef(null),i.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,x.jsx)(g,{asChild:!0,...o,children:(0,x.jsx)(l.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:m(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:m(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:m(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:m(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:m(e.onBlur,i.onClose),onClick:m(e.onClick,i.onClose)})})});I.displayName=F;var L=`TooltipPortal`,[ee,R]=S(L,{forceMount:void 0}),z=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=N(L,t);return(0,x.jsx)(ee,{scope:t,forceMount:n,children:(0,x.jsx)(s,{present:n||a.open,children:(0,x.jsx)(v,{asChild:!0,container:i,children:r})})})};z.displayName=L;var B=`TooltipContent`,V=b.forwardRef((e,t)=>{let n=R(B,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=N(B,e.__scopeTooltip);return(0,x.jsx)(s,{present:r||o.open,children:o.disableHoverableContent?(0,x.jsx)(H,{side:i,...a,ref:t}):(0,x.jsx)(te,{side:i,...a,ref:t})})}),te=b.forwardRef((e,t)=>{let n=N(B,e.__scopeTooltip),r=k(B,e.__scopeTooltip),i=b.useRef(null),a=y(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=K(r,G(r,n.getBoundingClientRect())),a=q(t.getBoundingClientRect()),o=ae([...i,...a]);s(o),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!J(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,x.jsx)(H,{...e,ref:a})}),[ne,re]=S(j,{isInside:!1}),ie=c(`TooltipContent`),H=b.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=N(B,n),u=w(n),{onClose:f}=l;return b.useEffect(()=>(document.addEventListener(D,f),()=>document.removeEventListener(D,f)),[f]),b.useEffect(()=>{if(l.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,f]),(0,x.jsx)(a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,x.jsxs)(d,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,x.jsx)(ie,{children:r}),(0,x.jsx)(ne,{scope:n,isInside:!0,children:(0,x.jsx)(p,{id:l.contentId,role:`tooltip`,children:i||r})})]})})});V.displayName=B;var U=`TooltipArrow`,W=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=w(n);return re(U,n).isInside?null:(0,x.jsx)(f,{...i,...r,ref:t})});W.displayName=U;function G(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function K(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function q(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function J(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ae(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),oe(t)}function oe(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var se=A,ce=P,le=I,ue=z,Y=V,de=W;function X({delayDuration:e=0,...t}){return(0,x.jsx)(se,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function Z({...e}){return(0,x.jsx)(ce,{"data-slot":`tooltip`,...e})}function Q({...e}){return(0,x.jsx)(le,{"data-slot":`tooltip-trigger`,...e})}var fe=`max-w-[280px]`;function $({className:e,sideOffset:t=0,children:n,...i}){return(0,x.jsx)(ue,{children:(0,x.jsxs)(Y,{"data-slot":`tooltip-content`,sideOffset:t,className:r(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-contrast px-3 py-1.5 text-label text-balance text-contrast-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-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-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,fe,e),...i,children:[n,(0,x.jsx)(de,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-contrast fill-contrast`})]})})}function pe({label:e,side:t=`bottom`,delay:n=300,children:r}){return(0,x.jsx)(X,{delayDuration:n,children:(0,x.jsxs)(Z,{children:[(0,x.jsx)(Q,{asChild:!0,children:r}),(0,x.jsx)($,{side:t,sideOffset:6,"data-slot":`icon-tooltip`,children:e})]})})}export{Q as a,X as i,Z as n,$ as r,pe as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r,Ii as i,It as a,L as o,Xt as s,r as c,xo as l}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r,Ii as i,It as a,L as o,Xt as s,r as c,xo as l}from"./queries-BQUz3Wnb.js";import{t as u}from"./utils-Dp6vCdiU.js";import{l as d,t as f}from"./project-router-B1Q3upIJ.js";import{t as p}from"./button-CJXK1JqU.js";import{h as m,i as h,r as g}from"./impact-model-DCDyRxcf.js";import{t as _}from"./loader-circle-CPBhhDbB.js";import{t as v}from"./refresh-cw-BIgmYimN.js";import{t as y}from"./icon-tooltip-DYk5cjLx.js";import{t as b}from"./status-dot-AP_4obOJ.js";var x=e(t(),1),S=n(),C=r({status:`running`});function w({subject:e,unavailable:t,className:n}){let r=i(e),w=o(e),T=w.data?.run?.id,E=a((0,x.useMemo)(()=>e=>T?e.find(e=>e.id===T)?.status:void 0,[T])).data,D=h(w.data,{pending:w.isPending,error:w.error,liveStatus:E}),O=l(),k=w.data?.run?.status;(0,x.useEffect)(()=>{E===void 0||k===void 0||E===k||O.invalidateQueries({queryKey:c.runs.impactSubject(r)})},[k,r,E,O]);let A=(0,x.useId)(),j=s(),[M,N]=(0,x.useState)(null),P=M?.key===r?M.message:void 0,F=t??P,I=d(),L=()=>{F||j.isPending||j.mutate({subject:e},{onError:e=>N({key:r,message:e instanceof Error?e.message:String(e)})})},R=(e,t)=>(0,S.jsxs)(p,{type:`button`,size:`sm`,variant:t,"data-action":`impact-assess`,disabled:!!F||j.isPending,"aria-busy":j.isPending||void 0,"aria-describedby":F?A:void 0,onClick:L,children:[j.isPending?(0,S.jsx)(_,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):e===`Re-assess`?(0,S.jsx)(v,{"aria-hidden":`true`}):(0,S.jsx)(m,{"aria-hidden":`true`}),e]});return(0,S.jsxs)(`div`,{"data-slot":`impact-control`,"data-state":D.kind===`open`&&D.stale?`stale`:D.kind,className:u(`flex flex-wrap items-center gap-2 text-label`,n),children:[D.kind===`loading`?(0,S.jsx)(`span`,{className:`text-soft-foreground`,children:`Checking impact…`}):D.kind===`error`?(0,S.jsxs)(`span`,{"data-slot":`impact-error`,className:`text-danger`,children:[`Could not check impact: `,D.message]}):D.kind===`assessing`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`span`,{"data-slot":`impact-assessing`,"data-tone":C.tone,role:`status`,className:`inline-flex items-center gap-1.5 font-medium text-muted-foreground`,children:[(0,S.jsx)(b,{tone:C.tone,pulse:C.pulse}),`Assessing…`]}),(0,S.jsx)(p,{asChild:!0,size:`sm`,variant:`outline`,children:(0,S.jsx)(f,{"data-action":`impact-go-to-task`,to:`/tasks/${D.runId}`,children:`Go to task`})})]}):D.kind===`open`?(0,S.jsxs)(S.Fragment,{children:[D.stale?(0,S.jsx)(y,{label:`The subject changed since this assessment`,children:(0,S.jsxs)(`span`,{"data-slot":`impact-stale`,"data-tone":`pending`,tabIndex:0,className:`inline-flex items-center gap-1.5 rounded-sm font-medium text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:[(0,S.jsx)(b,{tone:`pending`}),`Stale`]})}):null,(0,S.jsx)(p,{type:`button`,size:`sm`,variant:D.stale?`outline`:`primary`,"data-action":`impact-open`,onClick:()=>I(g(D.runId)),children:`Open impact`}),R(`Re-assess`,D.stale?`primary`:`outline`),(0,S.jsx)(`span`,{"data-slot":`impact-meta`,className:`font-mono text-meta text-soft-foreground`,children:D.meta})]}):(0,S.jsxs)(S.Fragment,{children:[R(`Assess impact`,`primary`),D.note?(0,S.jsxs)(`span`,{"data-slot":`impact-note`,className:`text-soft-foreground`,children:[D.note,` `,D.runId?(0,S.jsx)(f,{to:`/tasks/${D.runId}`,className:`underline underline-offset-2 hover:text-foreground`,children:`Go to task`}):null]}):null]}),F&&D.kind!==`loading`&&D.kind!==`error`&&D.kind!==`assessing`?(0,S.jsx)(`span`,{id:A,"data-slot":`impact-reason`,className:`basis-full text-soft-foreground`,children:F}):null]})}export{w as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Dp6vCdiU.js";import{t as i}from"./project-router-B1Q3upIJ.js";import{t as a}from"./createLucideIcon-BHp8sXmF.js";import{t as o}from"./button-CJXK1JqU.js";import{r as s}from"./dist-Bsi6zLdE.js";import{i as c,p as l,r as u,t as d}from"./dropdown-menu-BKvUsb5Y.js";import{n as f,r as p}from"./active-forge-CkAcQPDz.js";import{n as m,t as h}from"./upload-BE8GV7hh.js";import{n as g,t as _}from"./git-pull-request-DUnpdU6m.js";import{t as v}from"./git-pull-request-draft-BdwbaFQ3.js";import{t as y}from"./loader-circle-CPBhhDbB.js";import{t as b}from"./refresh-cw-BIgmYimN.js";import{a as x,i as S,n as C,r as w,t as T}from"./icon-tooltip-DYk5cjLx.js";import{r as E}from"./format-BUbPQpzw.js";import{t as D}from"./diff-stat-DPetRUXO.js";var O=a(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),k=a(`file-diff`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),A=a(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),j=a(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),M=n();function N({to:e,active:t=!1,onClick:n,children:a}){return(0,M.jsx)(i,{to:e,"aria-current":t?`page`:void 0,onClick:n,className:r(`-mb-px flex h-8 items-center rounded-t-md border-b-2 px-2 text-ui font-medium md:px-3`,t?`border-foreground font-semibold text-foreground`:`border-transparent text-muted-foreground hover:bg-muted hover:text-foreground`),children:a})}var P=e(t(),1);function F({mode:e,wrap:t,preview:n=!1,onModeChange:i,onWrapChange:a,onPreviewChange:s}){return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`span`,{"data-slot":`diff-mode-toggle`,role:`group`,"aria-label":`Diff layout`,className:`flex items-center rounded-md border border-border p-0.5`,children:[(0,M.jsx)(I,{current:e,value:`unified`,onModeChange:i}),(0,M.jsx)(I,{current:e,value:`split`,onModeChange:i})]}),s?(0,M.jsx)(S,{delayDuration:300,children:(0,M.jsxs)(C,{children:[(0,M.jsx)(x,{asChild:!0,children:(0,M.jsx)(o,{variant:`ghost`,size:`icon-sm`,"data-slot":`markdown-preview-toggle`,"aria-pressed":n,"aria-label":`Preview Markdown`,className:r(n&&`bg-muted text-foreground`),onClick:()=>s(!n),children:(0,M.jsx)(O,{"aria-hidden":`true`})})}),(0,M.jsx)(w,{side:`bottom`,sideOffset:6,"data-slot":`markdown-preview-tooltip`,children:n?`Show Markdown as a diff`:`Preview Markdown`})]})}):null,(0,M.jsx)(S,{delayDuration:300,children:(0,M.jsxs)(C,{children:[(0,M.jsx)(x,{asChild:!0,children:(0,M.jsx)(o,{variant:`ghost`,size:`icon-sm`,"data-slot":`wrap-toggle`,"aria-pressed":t,"aria-label":`Wrap long lines`,className:r(t&&`bg-muted text-foreground`),onClick:()=>a(!t),children:(0,M.jsx)(j,{"aria-hidden":`true`})})}),(0,M.jsx)(w,{side:`bottom`,sideOffset:6,children:t?`Keep long lines on one line`:`Wrap long lines`})]})})]})}function I({current:e,value:t,onModeChange:n}){let i=e===t;return(0,M.jsx)(`button`,{type:`button`,"data-mode":t,"aria-pressed":i,onClick:()=>n(t),className:r(`rounded-[5px] px-2 py-0.5 text-meta font-medium capitalize`,i?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`),children:t})}function L({branch:e}){return(0,M.jsxs)(`span`,{"data-slot":`branch-chip`,className:`flex min-w-0 items-center gap-1 rounded-sm border border-border bg-card px-1.5 py-px font-mono text-meta font-medium`,children:[(0,M.jsx)(p,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,M.jsx)(`span`,{className:`truncate`,children:e})]})}function R({branch:e,stat:t,mode:n,wrap:r,preview:i,onModeChange:a,onWrapChange:o,onPreviewChange:s}){return(0,M.jsxs)(`div`,{"data-slot":`git-toolbar`,className:`flex flex-wrap items-center gap-x-2.5 gap-y-1.5 border-b border-border px-4 py-2 md:px-6`,children:[e?(0,M.jsx)(L,{branch:e}):null,t?(0,M.jsx)(U,{stat:t}):null,(0,M.jsx)(`span`,{className:`ml-auto flex items-center gap-1`,children:(0,M.jsx)(`span`,{className:`hidden items-center gap-1 md:flex`,children:(0,M.jsx)(F,{mode:n,wrap:r,preview:i,onModeChange:a,onWrapChange:o,onPreviewChange:s})})})]})}function z({action:e,pending:t=null,variant:n=`outline`,onAction:i}){if(!e)return null;let a=e.alternatives??[],f=t!==null;return(0,M.jsxs)(`span`,{"data-slot":`git-button`,className:`inline-flex items-center`,children:[(0,M.jsx)(H,{action:e,busyAs:f?t:null,variant:n,onAction:i,className:a.length>0?`rounded-r-none`:void 0}),a.length>0?(0,M.jsxs)(d,{children:[(0,M.jsx)(l,{asChild:!0,children:(0,M.jsx)(o,{variant:n,size:`sm`,disabled:f,"aria-label":`More ways to ${e.label.toLowerCase()}`,className:`-ml-px rounded-l-none px-1.5`,children:(0,M.jsx)(s,{"aria-hidden":`true`})})}),(0,M.jsx)(u,{align:`end`,"data-slot":`git-button-menu`,children:a.map(e=>(0,M.jsxs)(c,{"data-action":e.id,disabled:!e.enabled,onSelect:()=>i(e.id),className:r(e.reason&&`flex-wrap`),children:[B[e.id],e.label,e.reason?(0,M.jsx)(`span`,{"data-slot":`git-alternative-reason`,className:`basis-full pl-6 text-label text-muted-foreground`,children:e.reason}):null]},e.id))})]}):null]})}var B={land:(0,M.jsx)(m,{"aria-hidden":`true`}),commit:(0,M.jsx)(m,{"aria-hidden":`true`}),"commit-push":(0,M.jsx)(h,{"aria-hidden":`true`}),push:(0,M.jsx)(h,{"aria-hidden":`true`}),"create-pr":(0,M.jsx)(_,{"aria-hidden":`true`}),"create-draft-pr":(0,M.jsx)(v,{"aria-hidden":`true`}),"update-branch":(0,M.jsx)(b,{"aria-hidden":`true`}),"resolve-conflicts":(0,M.jsx)(g,{"aria-hidden":`true`}),"fix-checks":(0,M.jsx)(f,{"aria-hidden":`true`})},V={land:`Committing and pushing…`,commit:`Committing…`,"commit-push":`Committing and pushing…`,push:`Pushing…`,"create-pr":`Creating PR…`,"create-draft-pr":`Creating draft PR…`,"update-branch":`Updating branch…`,"resolve-conflicts":`Resolving conflicts…`,"fix-checks":`Fixing errors…`};function H({action:e,busyAs:t,variant:n,onAction:i,className:a}){let s=!e.enabled&&t===null,c=(0,M.jsx)(o,{variant:n,size:`sm`,"data-action":e.id,className:r(a,s&&`cursor-not-allowed opacity-50 hover:bg-card`),disabled:t!==null,"aria-disabled":s||void 0,"aria-busy":t!==null||void 0,onClick:s?void 0:()=>i(e.id),children:t?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(y,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}),V[t]]}):(0,M.jsxs)(M.Fragment,{children:[B[e.id],e.label]})});return s&&e.reason?(0,M.jsx)(T,{label:e.reason,children:c}):c}function U({stat:e}){return(0,M.jsx)(`span`,{"data-slot":`changes-stat`,children:(0,M.jsx)(D,{stat:{adds:W(e.adds),dels:W(e.dels),files:e.files}})})}function W(e){let[t,n]=(0,P.useState)(e),r=(0,P.useRef)(e);return(0,P.useEffect)(()=>{let t=r.current;if(t===e)return;if(typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||typeof requestAnimationFrame!=`function`){r.current=e,n(e);return}let i=performance.now(),a=0,o=s=>{let c=Math.min(1,(s-i)/350),l=1-(1-c)**3;n(Math.round(t+(e-t)*l)),c<1?a=requestAnimationFrame(o):r.current=e};return a=requestAnimationFrame(o),()=>{cancelAnimationFrame(a),r.current=e,n(e)}},[e]),t}var G=`impact.html`,K=/^\.ai\/specs\/(?:[^/]+\/)*[^/]+\.md$/;function q(e){return!e||!K.test(e)?!1:!e.split(`/`).some(e=>e===`..`||e===`.`||e===``)}var J=new Set([`queued`,`running`,`waiting`]);function Y(e,t){if(t.error)return{kind:`error`,message:t.error.message};if(t.pending||e===void 0)return{kind:`loading`};if(e.run===null)return{kind:`assess`};let n=e.run.id,r=t.liveStatus??e.run.status,i=e.artifacts.find(e=>e.name===G);if(!i&&J.has(r))return{kind:`assessing`,runId:n};if(!i)return{kind:`assess`,runId:n,note:r===`failed`?`The last assessment failed without a report.`:r===`cancelled`?`The last assessment was stopped before its report.`:`The last assessment ended without a report.`};let a=X(e.subject.kind===`pr`?e.subject.headSha:e.subject.blobSha,i.updatedAt,e.versions,t.now);return{kind:`open`,runId:n,stale:e.stale===!0,meta:a}}function X(e,t,n,r=Date.now()){let i=E(t,r),a=[e.slice(0,7),i?`${i} ago`:``],o=n?.at(-1);return o&&a.push(`v${o.version}`),a.filter(Boolean).join(` · `)}function Z(e){return`/tasks/${e}/assets/${G}`}var Q=`cez-impact-auto-switched`;function $(){try{let e=JSON.parse(sessionStorage.getItem(Q)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}function ee(e){return $().includes(e)}function te(e){try{let t=[...$().filter(t=>t!==e),e].slice(-50);sessionStorage.setItem(Q,JSON.stringify(t))}catch{}}export{O as _,q as a,B as c,R as d,L as f,k as g,A as h,Y as i,V as l,N as m,ee as n,te as o,F as p,Z as r,U as s,G as t,z as u};
|