PageSourceSearch

https://www.007icu.top/assets/Verify-CHf1aFKf.js

js 007icu.top collected 2026-10-09 04:34:04 UTC 147,940 bytes, 1,945 lines download raw bytes

1import{n as e,o as t}from"./rolldown-runtime-CMxvf4Kt.js";import{Bt as n}from"../i18n/i18n-ar-O-z3xW8i.js";import{F as r,G as i,K as a,L as o,U as s,X as c}from"../vendor/vendor-data-runtime-nLFaCKB0.js";import{Yi as l,ct as u,nt as d}from"../vendor/vendor-ai-runtime-DrDK77gy.js";import{n as f,t as p}from"./agent-Doq2Q6Wt.js";import{Ao as m,Vn as h,a as g,i as _,jo as v}from"./app-const-BzFqCjOv.js";import{A as y,D as b,Do as x,Fn as S,Io as C,Oo as w,Ro as T,X as E,bo as D,go as O,to as k,vo as A,wo as j,zn as ee}from"./ScrollArea-CdDxdn_v.js";import{Er as te,I as ne,Ia as re,Ji as ie,Ka as ae,Sa as oe,Un as se,Wi as ce,ei as le,fa as ue,fi as de,ir as fe,n as M,oi as pe,qn as me,ui as he}from"./es-D7HWafs1.js";import{n as ge,r as _e,xn as ve}from"./es-D3_QMuVV.js";import{a as ye,d as be,l as xe,v as Se,y as Ce}from"../vendor/vendor-react-Bwss5s6Y.js";import{Ch as we,Cm as Te,Dh as Ee,Do as De,Fh as Oe,Fo as ke,Gn as Ae,Gs as je,La as Me,Lf as Ne,Li as N,Lo as P,Nh as Pe,Th as Fe,Ti as Ie,Ui as F,Ur as Le,Vc as Re,Vm as ze,Vs as Be,Ys as Ve,_f as He,_h as Ue,_i as We,ad as Ge,dh as Ke,et as I,ha as qe,hi as Je,hn as Ye,ho as Xe,jh as Ze,jm as Qe,jt as $e,kg as et,km as tt,ko as nt,lf as rt,ln as it,lp as at,pa as ot,qc as st,qg as ct,ql as lt,ra as ut,rd as dt,rh as ft,ro as pt,rt as mt,ru as ht,sg as gt,st as _t,su as vt,ti as yt,tp as bt,tt as xt,tu as St,xd as Ct,y_ as wt,yc as Tt,yd as Et,yh as Dt,yi as Ot,ym as kt,ys as At}from"../vendor/vendor-icons-BXJMWD35.js";import{O as L,_ as jt,a as Mt,h as Nt,n as Pt,s as Ft,v as It,x as Lt}from"./base-ui-Bi3Dz7GG.js";import{h as Rt,n as zt}from"./icons-Bz1tvWUu.js";import{Wn as Bt,Yn as Vt}from"./agent-Dh3-_0ai.js";import{s as Ht,t as Ut}from"./swr-C_leGIiU.js";import{a as Wt,j as Gt,lt as Kt}from"./keys-BAizXMAH.js";import{D as qt,E as Jt}from"./selectors-BZArZxfP.js";import{Eo as Yt,Ot as Xt,jt as Zt,n as Qt}from"./store-JX60g0Lu.js";import{i as $t,m as en,n as tn}from"./global-DfKpeTkj.js";import{t as nn}from"./selectors-BLjUqOPJ.js";import{r as rn}from"./store-DZ_eFvAj.js";import{n as an}from"./file-DreLu7dP.js";import{At as on,Bo as sn,Di as cn,Er as ln,Et as un,Ft as dn,Mt as fn,Nt as pn,Oi as mn,Pt as hn,Tt as gn,Vo as _n,is as vn,jt as yn,lr as bn,rs as xn,wt as Sn}from"./index-Doip7UYu.js";import{n as Cn,t as wn}from"./ModelSelect-C_RYxAXZ.js";import{n as Tn,t as En}from"./useWorkspaceAwareNavigate--pLVtz2A.js";import{n as Dn,t as On}from"./useResourceAccess-CBiX3hN_.js";import{n as kn,t as An}from"./RouteMeta-D2xi3f7m.js";import{n as jn,t as Mn}from"./NavItem-CU9Ck_x6.js";import{n as Nn,r as Pn}from"./SkeletonList-CDk0uYF0.js";var Fn,In,Ln=e((()=>{D(),Fn=t(m()),In=({ref:e,size:t=16,className:n,style:r,ringColor:i=x.colorBorder,...a})=>(0,Fn.jsx)(`svg`,{className:w(`anticon`,n),color:`currentColor`,height:t,ref:e,style:{flex:`none`,lineHeight:1,...r},viewBox:`0 0 1024 1024`,width:t,xmlns:`http://www.w3.org/2000/svg`,...a,children:(0,Fn.jsxs)(`g`,{fill:`none`,children:[(0,Fn.jsx)(`circle`,{cx:`512`,cy:`512`,fill:`none`,r:`400`,stroke:i,strokeWidth:`128`}),(0,Fn.jsx)(`path`,{d:`M912 512C912 290.92 733.08 112 512 112`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`128`,children:(0,Fn.jsx)(`animateTransform`,{attributeName:`transform`,dur:`1s`,from:`0 512 512`,repeatCount:`indefinite`,to:`360 512 512`,type:`rotate`})})]})})})),Rn,zn=e((()=>{Rn=e=>{if(!e)return`txt`;switch(e.toLowerCase().split(`.`).pop()){case`js`:case`mjs`:case`cjs`:return`javascript`;case`ts`:return`typescript`;case`tsx`:return`tsx`;case`jsx`:return`jsx`;case`py`:case`pyw`:return`python`;case`java`:return`java`;case`kt`:case`kts`:return`kotlin`;case`scala`:return`scala`;case`groovy`:return`groovy`;case`c`:case`h`:return`c`;case`cpp`:case`cxx`:case`cc`:case`hpp`:case`hxx`:return`cpp`;case`cs`:return`csharp`;case`go`:return`go`;case`rs`:return`rust`;case`rb`:return`ruby`;case`php`:return`php`;case`swift`:return`swift`;case`sh`:case`bash`:case`zsh`:return`bash`;case`html`:case`htm`:return`html`;case`css`:return`css`;case`scss`:return`scss`;case`sass`:return`sass`;case`less`:return`less`;case`json`:return`json`;case`xml`:return`xml`;case`yaml`:case`yml`:return`yaml`;case`toml`:return`toml`;case`md`:case`mdx`:return`markdown`;case`sql`:return`sql`;case`lua`:return`lua`;case`r`:return`r`;case`dart`:return`dart`;case`elixir`:case`ex`:case`exs`:return`elixir`;case`erl`:case`hrl`:return`erlang`;case`clj`:case`cljs`:case`cljc`:return`clojure`;case`vim`:return`vim`;case`dockerfile`:return`dockerfile`;case`graphql`:case`gql`:return`graphql`;default:return`txt`}}})),Bn,Vn,Hn=e((()=>{Bn=t(v()),Vn=e=>{let[t,n]=(0,Bn.useState)(null),[r,i]=(0,Bn.useState)(!0),[a,o]=(0,Bn.useState)(null);return(0,Bn.useEffect)(()=>
1{if(!e){i(!1);return}(async()=>{try{i(!0);let t=await fetch(e);if(!t.ok)throw Error(`Failed to load file: ${t.statusText}`);n(await t.text()),o(null)}catch(e){o(e instanceof Error?e:Error(`Unknown error`)),n(null)}finally{i(!1)}})()},[e]),{error:a,fileData:t,loading:r}}})),Un,Wn,Gn,Kn,qn=e((()=>{M(),D(),Un=t(v()),h(),Wn=t(m()),Gn=j(({css:e,cssVar:t})=>({banner:e`
2    position: relative;
3    overflow: hidden;
4    height: 60px;
5  `,bannerInner:e`
6    filter: blur(44px);
7  `,clickableAvatar:e`
8    cursor: pointer;
9  `,clickableTitle:e`
10    cursor: pointer;
11
12    &:hover {
13      color: ${t.colorPrimary};
14    }
15  `,container:e`
16    overflow: hidden;
17    width: 280px;
18    background: ${t.colorBgElevated};
19  `,description:e`
20    overflow: hidden;
21
22    max-height: 80px;
23
24    font-size: 12px;
25    line-height: 1.5;
26    color: ${t.colorTextSecondary};
27    text-overflow: ellipsis;
28  `,descriptionSkeleton:e`
29    .ant-skeleton-paragraph {
30      margin-block-start: 4px !important;
31    }
32
33    .ant-skeleton-paragraph > li {
34      height: 12px !important;
35    }
36
37    .ant-skeleton-paragraph > li + li {
38      margin-block-start: 6px !important;
39    }
40  `,header:e`
41    position: relative;
42    margin-block-start: -24px;
43    padding-inline: 16px;
44  `,name:e`
45    font-size: 16px;
46    font-weight: 600;
47    color: ${t.colorText};
48  `})),Kn=(0,Un.memo)(({avatar:e,backgroundColor:t,description:n,headerAction:r,loading:i,onHeaderClick:a,title:o,children:s})=>(0,Wn.jsxs)(A,{className:Gn.container,children:[(0,Wn.jsx)(O,{className:Gn.banner,style:{background:x.colorFillTertiary},children:(0,Wn.jsx)(oe,{emojiScaleWithBackground:!0,avatar:e||`/avatars/agent-default.png`,background:t??void 0,className:Gn.bannerInner,shape:`square`,size:400})}),(0,Wn.jsxs)(A,{className:Gn.header,gap:8,children:[(0,Wn.jsx)(oe,{emojiScaleWithBackground:!0,avatar:e||`/avatars/agent-default.png`,background:t??void 0,className:a?Gn.clickableAvatar:void 0,shape:`square`,size:48,style:{border:`2px solid ${x.colorBgElevated}`},onClick:a}),(0,Wn.jsxs)(A,{gap:2,children:[(0,Wn.jsxs)(A,{horizontal:!0,align:`center`,justify:`space-between`,children:[(0,Wn.jsx)(S,{ellipsis:!0,className:`${Gn.name} ${a?Gn.clickableTitle:``}`,onClick:a,children:o}),r]}),n?(0,Wn.jsx)(ee,{title:n,children:(0,Wn.jsx)(S,{className:Gn.description,ellipsis:{rows:2},children:n})}):i?(0,Wn.jsx)(me,{active:!0,className:Gn.descriptionSkeleton,paragraph:{rows:2,width:[`100%`,`60%`]},title:!1}):null]})]}),s]}))})),Jn,R,Yn,Xn,Zn=e((()=>{bn(),M(),zt(),D(),I(),Jn=t(v()),r(),a(),Cn(),On(),En(),sn(),Gt(),f(),Xt(),qn(),R=t(m()),Yn=j(({css:e,cssVar:t})=>({footer:e`
49    padding-block: 12px;
50    padding-inline: 16px;
51    border-block-start: 1px solid ${t.colorBorderSecondary};
52  `,section:e`
53    padding-block: 12px;
54    padding-inline: 16px;
55  `,sectionTitle:e`
56    margin-block-end: 8px;
57
58    font-size: 11px;
59    font-weight: 600;
60    color: ${t.colorTextTertiary};
61    text-transform: uppercase;
62  `,statItem:e`
63    color: ${t.colorTextSecondary};
64  `,trigger:e`
65    border-radius: ${t.borderRadius};
66
67    &[data-popup-open] {
68      background: ${t.colorFillTertiary};
69    }
70  `})),Xn=(0,Jn.memo)(({agent:e,agentId:t,groupId:n,children:r,trigger:i=`click`})=>{let{t:a}=o(`chat`),s=Tn(),[l,u]=(0,Jn.useState)(!1),[d,f]=(0,Jn.useState)(!1),{allowed:m}=_n(`edit_own_content`),{canEditResource:h,isAccessResolved:g}=Dn(`agent`,l?t:void 0),{canEditResource:_,isAccessResolved:v}=Dn(`agentGroup`,l?n:void 0),b=m&&g&&h&&(!n||v&&_),x=Zt(e=>e.updateMemberAgentConfig),{data:C,isLoading:w}=c(l&&b?Wt.detail(t):null,()=>p.getAgentConfigById(t),{revalidateOnFocus:!1}),T={avatar:C?.avatar??e?.avatar,backgroundColor:C?.backgroundColor??e?.backgroundColor,description:C?.description??e?.description,model:C?.model??e?.model,provider:C?.provider??e?.provider,title:C?.title??e?.title},E=async e=>{if(!(!n||!b)){f(!0);try{await x(n,t,{model:e.model,provider:e.provider})}finally{f(!1)}}},D=()=>{!n||!b||b&&(u(!1),s(`/group/${n}/profile?tab=${t}`))},O=()=>{u(!1),s(`/agent/${t}/profile`)},j=!(T.title||T.avatar||T.description)&&w,ee=C?.plugins?.length??0,te=C?.knowledgeBases?.length??0,ne=C?.files?.length??0,ie=ee>0||te>0||ne>0,ae=b&&n?T.model&&(0,R.jsxs)(A,{className:Yn.section,gap:4,children:[(0,R.jsx)(`div`,{className:Yn.sectionTitle,children:a(`groupSidebar.agentProfile.model`)}),(0,R.jsx)(wn,{loading:d,value:{model:T.model,provider:T.provider??void 0},onChange:E})]}):b&&!n&&w&&!C?(0,R.jsxs)(A,{horizontal:!0,align:`center`,className:Yn.footer,gap:14,children:[(0,R.jsx)(me.Button,{active:!0,size:`small`,style:{height:16,width:90}}),(0,R.jsx)(me.Button,{active:!0,size:`small`,style:{height:16,width:60}})]}):b&&(T.model||ie)?(0,R.jsxs)(A,{horizontal:!0,align:`center`,className:Yn.footer,gap:14,wrap:`wrap`,children:[T.model&&(0,R.jsxs)(A,{horizontal:!0,align:`center`,className:Yn.statItem,gap:6,children:[(0,R.jsx)(ln,{model:T.model,size:14}),(0,R.jsx)(S,{fontSize:12,type:`secondary`,children:T.model})]}),ee>0&&(0,R.jsxs)(A,{horizontal:!0,align:`center`,className:Yn.statItem,gap:4,children:[(0,R.jsx)(k,{icon:Rt,size:13}),(0,R.jsx)(S,{fontSize:12,type:`secondary`,children:a(`agentProfile.skills`,{count:ee})})]}),te>0&&(0,R.jsxs)(A,{horizontal:!0,align:`center`,className:Yn.statItem,gap:4,children:[(0,R.jsx)(k,{icon:ct,size:13}),(0,R.jsx)(S,{fontSize:12,type:`secondary`,children:a(`agentProfile.knowledgeBases`,{count:te})})]}),ne>0&&(0,R.jsxs)(A,{horizontal:!0,align:`center`,className:Yn.statItem,gap:4,children:[(0,R.jsx)(k,{icon:He,size:13}),(0,R.jsx)(S,{fontSize:12,type:`secondary`,children:a(`agentProfile.files`,{count:ne})})]})]}):null,oe=j?(0,R.jsx)(`div`,{style:{padding:16,width:280},children:(0,R.jsx)(me,{active:!0,avatar:!0,paragraph:{rows:2}})}):(0,R.jsx)(Kn,{avatar:T.avatar,backgroundColor:T.backgroundColor,description:T.description,loading:w&&!T.description,title:T.title||a(`defaultSession`,{ns:`common`}),headerAction:n&&b?(0,R.jsx)(A,{horizontal:!0,align:`center`,justify:`flex-end`,style:{paddingBlockStart:0},children:(0,R.jsx)(re,{icon:Ie,size:`small`,title:a(`groupSidebar.agentProfile.settings`),onClick:D})}):void 0,onHeaderClick:b?O:void 0,children:ae});return(0,R.jsx)(y,{classNames:i===`click`?{trigger:Yn.trigger}:void 0,content:oe,nativeButton:!1,open:l,placement:i===`hover`?`top`:`right`,trigger:i,styles:{content:{borderRadius:12,overflow:`hidden`,padding:0}},onOpenChange:u,children:r})})})),Qn,$n,er,tr,nr,rr,ir,ar=e((()=>{D(),Qn=t(v()),r(),$n=t(m()),er=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:null,tr=e=>!e||/^[\w.-]+\.(?:gif|jpe?g|mp4|png|webm|webp)$/i.test(e),nr=e=>{let t=er(er(e)?.comparison);if(!t)return null;let n=t.role;return typeof t.id!=`string`||n!==`before`&&n!==`after`?null:{id:t.
70id,label:typeof t.label==`string`?t.label:void 0,layout:t.layout===`vertical`?`vertical`:`horizontal`,role:n}},rr=j(({css:e})=>({card:e`
71    overflow: hidden;
72    display: grid;
73    grid-template-columns: repeat(2, minmax(0, 1fr));
74    gap: 1px;
75
76    width: 100%;
77    border: 1px solid ${x.colorBorderSecondary};
78    border-radius: ${x.borderRadius};
79
80    background: ${x.colorBorderSecondary};
81
82    @media (width <= 640px) {
83      grid-template-columns: 1fr;
84    }
85  `,cardVertical:e`
86    grid-template-columns: 1fr;
87  `,side:e`
88    display: flex;
89    flex-direction: column;
90    min-width: 0;
91    background: ${x.colorBgContainer};
92  `,label:e`
93    display: flex;
94    gap: 8px;
95    align-items: baseline;
96
97    padding-block: 7px;
98    padding-inline: 10px;
99
100    font-size: 12px;
101  `,labelBefore:e`
102    border-block-end: 1px solid ${x.colorErrorBorder};
103    color: ${x.colorErrorText};
104    background: ${x.colorErrorBg};
105  `,labelAfter:e`
106    border-block-end: 1px solid ${x.colorSuccessBorder};
107    color: ${x.colorSuccessText};
108    background: ${x.colorSuccessBg};
109  `,role:e`
110    flex: none;
111    font-weight: 600;
112  `,caption:e`
113    min-width: 0;
114    opacity: 0.85;
115  `,content:e`
116    flex: 1;
117    min-width: 0;
118
119    img,
120    video {
121      display: block;
122      width: 100%;
123      border: none !important;
124      border-radius: 0 !important;
125    }
126  `})),ir=(0,Qn.memo)(({after:e,before:t,layout:n=`horizontal`})=>{let{t:r}=o(`verify`);return(0,$n.jsx)(`div`,{className:w(rr.card,n===`vertical`&&rr.cardVertical),children:[[`before`,t],[`after`,e]].map(([e,t])=>(0,$n.jsxs)(`div`,{className:rr.side,children:[(0,$n.jsxs)(`div`,{className:w(rr.label,e===`before`?rr.labelBefore:rr.labelAfter),children:[(0,$n.jsx)(`span`,{className:rr.role,children:r(`report.evidence.comparison.${e}`)}),t.caption&&(0,$n.jsx)(`span`,{className:rr.caption,children:t.caption})]}),(0,$n.jsx)(`div`,{className:rr.content,children:t.content})]},e))})}),ir.displayName=`EvidenceComparisonCard`})),or,sr,cr,lr,ur,dr,fr,pr,mr=e((()=>{_(),or=e=>{switch(e){case`planned`:return`draft`;case`verifying`:return`verifying`;case`failed`:return`failed`;case`repairing`:return`repairing`;case`errored`:return`errored`;case`passed`:case`delivered`:return`passed`;default:return`idle`}},sr={failed:0,not_executed:2,passed:3,uncertain:1},cr=e=>{let t=e.verdict??e.status;return t===`passed`||t===`failed`||t===`uncertain`?t:`uncertain`},lr=(e,t)=>{let n=new Map(t.map(e=>[e.checkItemId,e])),r=(e??[]).map(e=>{let t=n.get(e.id);return{id:e.id,planItem:e,result:t,state:t?cr(t):`not_executed`}}),i=new Set(r.map(e=>e.id)),a=t.filter(e=>!i.has(e.checkItemId)).map(e=>({id:e.checkItemId,result:e,state:cr(e)}));return[...r,...a].sort((e,t)=>sr[e.state]-sr[t.state])},ur=e=>{if(!e?.length)return[];let t=[];for(let n of e){let e=g(n);e&&!t.includes(e)&&t.push(e)}return t},dr=(e=[])=>({failed:e.filter(e=>e.status===`failed`||e.verdict===`failed`).length,passed:e.filter(e=>e.status===`passed`||e.verdict===`passed`).length,total:e.length}),fr=(e,t)=>`color-mix(in srgb, ${e} ${t}%, transparent)`,pr=(e,t)=>{let n=e=>`radial-gradient(60% 90% at 100% 0%, ${fr(e,8)} 0%, ${fr(e,0)} 52%), ${t.colorBgElevated}`;switch(e){case`passed`:return n(t.colorSuccess);case`failed`:return n(t.colorError);case`draft`:case`verifying`:case`errored`:case`repairing`:return n(t.colorWarning);default:return}}})),hr,z,gr,B,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti=e((()=>{d(),M(),Pt(),D(),I(),hr=t(v()),r(),ye(),vn(),Hn(),zn(),ar(),Sn(),mr(),z=t(m()),gr=e=>{try{return new URL(e).pathname.split(`/`).pop()||`document`}catch{return`document`}},B=j(({css:e})=>({scroll:e`
127    overflow: auto;
128    width: 100%;
129    height: 100%;
130  `,page:e`
131    width: 100%;
132    max-width: 880px;
133    margin-inline: auto;
134    padding-block: 32px 64px;
135
136    /* Start-aligned with the 46px gutter a check row's body sits at, so the hero
137       prose and the expanded check prose share one text edge. */
138    padding-inline: 46px 32px;
139  `,heroLine:e`
140    display: flex;
141    flex-wrap: wrap;
142    gap: 12px;
143    align-items: center;
144  `,pill:e`
145    display: inline-flex;
146    gap: 6px;
147    align-items: center;
148
149    padding-block: 5px;
150    padding-inline: 13px;
151    border-radius: 999px;
152
153    font-size: 13px;
154    font-weight: 600;
155    line-height: 1;
156  `,summary:e`
157    max-width: 100%;
158    color: ${x.colorText};
159  `,meta:e`
160    display: flex;
161    flex-wrap: wrap;
162    gap: 8px 16px;
163    margin-block-start: 4px;
164  `,metaItem:e`
165    display: inline-flex;
166    gap: 6px;
167    align-items: baseline;
168
169    font-size: 12px;
170    color: ${x.colorTextTertiary};
171
172    code {
173      font-family: ${x.fontFamilyCode};
174      font-size: 12px;
175      color: ${x.colorTextSecondary};
176      word-break: break-word;
177    }
178  `,liveBanner:e`
179    display: inline-flex;
180    gap: 8px;
181    align-items: center;
182
183    width: fit-content;
184    margin-block-start: 4px;
185    padding-block: 6px;
186    padding-inline: 12px;
187    border: 1px solid ${x.colorInfoBorder};
188    border-radius: 999px;
189
190    font-size: 12px;
191    color: ${x.colorInfoText};
192
193    background: ${x.colorInfoBg};
194  `,interactionCost:e`
195    --klm-blue-1: color-mix(in srgb, ${x.colorInfo} 70%, ${x.colorBgContainer});
196    --klm-blue-2: ${x.colorInfo};
197    --klm-blue-3: color-mix(in srgb, ${x.colorInfo} 84%, ${x.colorText});
198    --klm-blue-4: color-mix(in srgb, ${x.colorInfo} 68%, ${x.colorText});
199    --klm-blue-5: color-mix(in srgb, ${x.colorInfo} 54%, ${x.colorText});
200    --klm-blue-6: color-mix(in srgb, ${x.colorInfo} 42%, ${x.colorText});
201
202    display: flex;
203    flex-direction: column;
204    gap: 12px;
205    width: 100%;
206  `,interactionCostHeader:e`
207    display: flex;
208    flex-wrap: wrap;
209    gap: 8px 12px;
210    align-items: center;
211    justify-content: flex-end;
212  `,interactionCostModel:e`
213    font-family: ${x.fontFamilyCode};
214    font-size: 12px;
215    color: ${x.colorTextTertiary};
216  `,interactionMetrics:e`
217    display: grid;
218    grid-template-columns: repeat(3, minmax(0, 1fr));
219    gap: 8px;
220
221    @media (width <= 520px) {
222      grid-template-columns: 1fr;
223    }
224  `,interactionMetric:e`
225    min-width: 0;
226    padding-block: 9px;
227    padding-inline: 10px;
228    border: 1px solid ${x.colorBorderSecondary};
229    border-radius: ${x.borderRadiusSM};
230  `,interactionMetricLabel:e`
231    display: block;
232    margin-block-end: 4px;
233    font-size: 12px;
234    color: ${x.colorTextTertiary};
235  `,interactionMetricValue:e`
236    font-size: 18px;
237    font-weight: 650;
238    font-variant-numeric: tabular-nums;
239    line-height: 1.2;
240    color: ${x.colorText};
241  `,operatorList:e`
242    display: flex;
243    flex-wrap: wrap;
244    gap: 8px 14px;
245  `,operatorChip:e`
246    --operator-color: ${x.colorTextSecondary};
247
248    display: inline-flex;
249    gap: 5px;
250    align-items: baseline;
251
252    font-family: ${x.fontFamilyCode};
253    font-size: 12px;
254    color: color-mix(in srgb, var(--operator-color) 72%, ${x.colorTextSecondary});
255
256    &::before {
257      content: '';
258
259      flex: 0 0 auto;
260
261      width: 6px;
262      height: 6px;
263      margin-block-start: 0.5em;
264      border-radius: 50%;
265
266      background: var(--operator-color);
267    }
268
269    b {
270      font-weight: 650;
271      color: var(--operator-color);
272    }
273
274    &[data-operator='K'] {
275      --operator-color: var(--klm-blue-1);
276    }
277
278    &[data-operator='P'] {
279      --operator-color: var(--klm-blue-2);
280    }
281
282    &[data-operator='M'] {
283      --operator-color: var(--klm-blue-3);
284    }
285
286    &[data-operator='H'] {
287      --operator-color: var(--klm-blue-4);
288    }
289
290    &[data-operator='T_chars'] {
291      --operator-color: var(--klm-blue-5);
292    }
293
294    &[data-operator='R_ms'] {
295      --operator-color: var(--klm-blue-6);
296    }
297  `,phaseList:e`
298    display: flex;
299    flex-direction: column;
300    gap: 8px;
301  `,phaseRow:e`
302    display: grid;
303    grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.6fr) auto;
304    gap: 10px;
305    align-items: center;
306
307    @media (width <= 640px) {
308      grid-template-columns: 1fr;
309      gap: 5px;
310    }
311  `,phaseName:e`
312    overflow: hidden;
313
314    font-size: 12px;
315    color: ${x.colorTextSecondary};
316    text-overflow: ellipsis;
317    white-space: nowrap;
318  `,phaseTrack:e`
319    overflow: hidden;
320    display: flex;
321
322    height: 8px;
323    border-radius: 999px;
324
325    background: transparent;
326    box-shadow: inset 0 0 0 1px ${x.colorBorderSecondary};
327  `,phaseSegment:e`
328    --operator-color: ${x.colorTextSecondary};
329
330    flex: 0 0 auto;
331    min-width: 2px;
332    height: 100%;
333    background: var(--operator-color);
334
335    &[data-operator='K'] {
336      --operator-color: var(--klm-blue-1);
337    }
338
339    &[data-operator='P'] {
340      --operator-color: var(--klm-blue-2);
341    }
342
343    &[data-operator='M'] {
344      --operator-color: var(--klm-blue-3);
345    }
346
347    &[data-operator='H'] {
348      --operator-color: var(--klm-blue-4);
349    }
350
351    &[data-operator='T_chars'] {
352      --operator-color: var(--klm-blue-5);
353    }
354
355    &[data-operator='R_ms'] {
356      --operator-color: var(--klm-blue-6);
357    }
358  `,phaseValue:e`
359    font-size: 12px;
360    font-variant-numeric: tabular-nums;
361    color: ${x.colorTextTertiary};
362  `,codingScope:e`
363    display: flex;
364    flex-direction: column;
365    gap: 6px;
366
367    min-width: 0;
368    max-width: 100%;
369    margin-block-start: 4px;
370  `,scopePullRequestLine:e`
371    display: flex;
372    min-width: 0;
373    max-width: 100%;
374  `,scopeMetaLine:e`
375    display: flex;
376    flex-wrap: wrap;
377    gap: 6px 14px;
378    align-items: center;
379
380    min-width: 0;
381    max-width: 100%;
382  `,branchChip:e`
383    display: inline-flex;
384    flex: 0 1 auto;
385    gap: 6px;
386    align-items: center;
387
388    min-width: 0;
389    max-width: 360px;
390
391    color: ${x.colorTextTertiary};
392
393    code {
394      overflow: hidden;
395
396      min-width: 0;
397
398      font-family: ${x.fontFamilyCode};
399      font-size: 12px;
400      color: ${x.colorTextSecondary};
401      text-overflow: ellipsis;
402      white-space: nowrap;
403    }
404
405    svg {
406      flex: 0 0 auto;
407      color: ${x.colorTextQuaternary};
408    }
409  `,commitChip:e`
410    display: inline-flex;
411    flex: 0 0 auto;
412    gap: 6px;
413    align-items: center;
414
415    color: ${x.colorTextTertiary};
416
417    code {
418      font-family: ${x.fontFamilyCode};
419      font-size: 12px;
420      color: ${x.colorTextTertiary};
421    }
422
423    svg {
424      flex: 0 0 auto;
425      color: ${x.colorTextQuaternary};
426    }
427  `,prChip:e`
428    /* Resting: number secondary, title tertiary, icon quaternary — a quiet chip.
429       Hover lifts the WHOLE thing to the primary text color at once (a clearly
430       perceptible emphasis, not a one-gray-step nudge), and never the global
431       link-blue. Vars so number/title/icon rise together. */
432    --pr-number-color: ${x.colorTextSecondary};
433    --pr-title-color: ${x.colorTextTertiary};
434    --pr-icon-color: ${x.colorTextQuaternary};
435
436    cursor: default;
437
438    display: inline-flex;
439    flex: 0 1 auto;
440    gap: 6px;
441    align-items: center;
442
443    /* Owns its own line, so the title gets the full column before ellipsizing. */
444    min-width: 0;
445    max-width: 100%;
446
447    font-size: 12px;
448    color: var(--pr-number-color);
449    text-decoration: none;
450
451    transition: color 0.15s;
452
453    &[data-link='true'] {
454      cursor: pointer;
455    }
456
457    &[data-link='true']:hover {
458      --pr-number-color: ${x.colorText};
459      --pr-title-color: ${x.colorText};
460      --pr-icon-color: ${x.colorTextSecondary};
461
462      /* Re-assert over the global \`a:hover\` link-blue — the chip's hover is a
463         text-emphasis step, never a recolor. */
464      color: var(--pr-number-color);
465    }
466
467    > svg:first-child {
468      flex: 0 0 auto;
469      color: var(--pr-icon-color);
470      transition: color 0.15s;
471    }
472  `,prNumber:e`
473    flex: 0 0 auto;
474    color: var(--pr-number-color);
475    transition: color 0.15s;
476  `,prTitle:e`
477    overflow: hidden;
478    flex: 1 1 auto;
479
480    min-width: 0;
481
482    color: var(--pr-title-color);
483    text-overflow: ellipsis;
484    white-space: nowrap;
485
486    transition: color 0.15s;
487  `,scopeMetaItem:e`
488    display: inline-flex;
489    gap: 6px;
490    align-items: center;
491
492    min-width: 0;
493    max-width: 100%;
494
495    font-size: 12px;
496    line-height: 1.45;
497    color: ${x.colorTextTertiary};
498
499    code {
500      overflow: hidden;
501
502      min-width: 0;
503
504      font-family: ${x.fontFamilyCode};
505      font-size: 12px;
506      color: ${x.colorTextSecondary};
507      text-overflow: ellipsis;
508      white-space: nowrap;
509    }
510
511    svg {
512      flex: 0 0 auto;
513      color: ${x.colorTextQuaternary};
514    }
515  `,scopeEntry:e`
516    max-width: 260px;
517  `,originLink:e`
518    cursor: pointer;
519    color: ${x.colorTextTertiary};
520    text-decoration: none;
521
522    &:hover {
523      color: ${x.colorLink};
524    }
525
526    &:hover svg {
527      color: ${x.colorLink};
528    }
529  `,surfaceList:e`
530    display: flex;
531    flex-wrap: wrap;
532    gap: 4px;
533  `,surfaceChip:e`
534    display: inline-flex;
535    gap: 4px;
536    align-items: center;
537
538    padding-block: 1px;
539    padding-inline: 6px;
540    border-radius: ${x.borderRadiusSM};
541
542    font-size: 12px;
543    color: ${x.colorTextSecondary};
544
545    background: ${x.colorFillTertiary};
546
547    svg {
548      color: ${x.colorTextTertiary};
549    }
550  `,stats:e`
551    position: sticky;
552    z-index: 10;
553    inset-block-start: 0;
554
555    display: flex;
556    flex-wrap: wrap;
557    gap: 8px;
558    align-items: center;
559
560    margin-block: 20px 12px;
561    padding-block: 12px;
562
563    background: color-mix(in srgb, ${x.colorBgContainer} 88%, transparent);
564    backdrop-filter: blur(8px);
565  `,chip:e`
566    cursor: pointer;
567
568    display: inline-flex;
569    gap: 7px;
570    align-items: center;
571
572    height: 28px;
573    padding-inline: 12px;
574    border: 1px solid ${x.colorBorderSecondary};
575    border-radius: 999px;
576
577    font-size: 12px;
578    color: ${x.colorTextSecondary};
579
580    background: transparent;
581
582    transition: background 0.12s ease;
583
584    b {
585      font-weight: 600;
586      font-variant-numeric: tabular-nums;
587      color: ${x.colorText};
588    }
589
590    &:hover {
591      background: ${x.colorFillTertiary};
592    }
593
594    &[data-active='true'] {
595      border-color: ${x.colorBorder};
596      color: ${x.colorText};
597      background: ${x.colorFillTertiary};
598    }
599  `,dot:e`
600    width: 7px;
601    height: 7px;
602    border-radius: 999px;
603  `,score:e`
604    cursor: default;
605    margin-inline-start: auto;
606    border-color: transparent;
607    color: ${x.colorTextTertiary};
608
609    b {
610      color: ${x.colorTextSecondary};
611    }
612  `,checks:e`
613    overflow: hidden;
614    border: 1px solid ${x.colorBorderSecondary};
615    border-radius: ${x.borderRadius};
616    background: ${x.colorBgContainer};
617  `,row:e`
618    border-block-end: 1px solid ${x.colorBorderSecondary};
619
620    &:last-child {
621      border-block-end: none;
622    }
623  `,rowHead:e`
624    cursor: pointer;
625
626    display: grid;
627    grid-template-columns: 20px minmax(0, 1fr) auto;
628    gap: 10px;
629    align-items: center;
630
631    width: 100%;
632    padding-block: 11px;
633    padding-inline: 16px;
634    border: none;
635
636    text-align: start;
637
638    background: none;
639
640    &:hover {
641      background: ${x.colorFillQuaternary};
642    }
643  `,rowTitle:e`
644    overflow: hidden;
645
646    font-size: 14px;
647    color: ${x.colorText};
648    text-overflow: ellipsis;
649    white-space: nowrap;
650
651    &[data-failed='true'] {
652      font-weight: 600;
653    }
654  `,rowSide:e`
655    display: flex;
656    gap: 8px;
657    align-items: center;
658  `,softTag:e`
659    padding-block: 1px;
660    padding-inline: 7px;
661    border-radius: 4px;
662
663    font-size: 12px;
664    color: ${x.colorTextTertiary};
665
666    background: ${x.colorFillTertiary};
667  `,chev:e`
668    color: ${x.colorTextQuaternary};
669    transition: transform 0.15s ease;
670
671    &[data-open='true'] {
672      transform: rotate(90deg);
673    }
674  `,rowBody:e`
675    display: flex;
676    flex-direction: column;
677    gap: 12px;
678
679    padding-block: 2px 16px;
680    padding-inline: 46px 16px;
681  `,reasoning:e`
682    font-size: 13px;
683    line-height: 1.6;
684    color: ${x.colorTextSecondary};
685  `,suggestion:e`
686    padding-inline-start: 10px;
687    border-inline-start: 2px solid ${x.colorBorder};
688
689    font-size: 13px;
690    line-height: 1.6;
691    color: ${x.colorTextSecondary};
692  `,planDetail:e`
693    display: grid;
694    grid-template-columns: auto minmax(0, 1fr);
695    gap: 4px 8px;
696
697    font-size: 13px;
698    line-height: 1.6;
699    color: ${x.colorTextTertiary};
700  `,planDetailLabel:e`
701    color: ${x.colorTextQuaternary};
702    white-space: nowrap;
703  `,notExecutedHint:e`
704    font-size: 13px;
705    line-height: 1.6;
706    color: ${x.colorTextTertiary};
707  `,narrative:e`
708    margin-block-start: 24px;
709
710    &:not([open]) > :not(summary) {
711      display: none;
712    }
713  `,narrativeSummary:e`
714    cursor: pointer;
715    user-select: none;
716
717    display: inline-flex;
718    gap: 6px;
719    align-items: center;
720
721    font-size: 12px;
722    color: ${x.colorTextTertiary};
723    list-style: none;
724
725    &::-webkit-details-marker {
726      display: none;
727    }
728
729    &:hover {
730      color: ${x.colorText};
731    }
732  `,narrativeBody:e`
733    margin-block-start: 12px;
734    padding: 16px;
735    border: 1px solid ${x.colorBorderSecondary};
736    border-radius: ${x.borderRadius};
737
738    background: ${x.colorBgContainer};
739  `,interactionCostBody:e`
740    margin-block-start: 12px;
741  `,evidenceList:e`
742    display: flex;
743    flex-direction: column;
744    gap: 6px;
745    align-items: flex-start;
746
747    width: 100%;
748  `,evidenceFile:e`
749    cursor: pointer;
750
751    display: grid;
752    grid-template-columns: 18px minmax(0, 1fr);
753    gap: 8px;
754    align-items: center;
755
756    width: min(100%, 520px);
757    padding-block: 7px;
758    padding-inline: 10px;
759    border: 1px solid ${x.colorBorderSecondary};
760    border-radius: ${x.borderRadius};
761
762    text-align: start;
763
764    background: ${x.colorFillQuaternary};
765
766    &:hover {
767      border-color: ${x.colorLink};
768      color: ${x.colorLink};
769    }
770  `,evidenceFileIcon:e`
771    display: flex;
772    color: ${x.colorTextTertiary};
773  `,evidenceFileBody:e`
774    display: flex;
775    flex-direction: column;
776    min-width: 0;
777  `,evidenceFileName:e`
778    overflow: hidden;
779
780    font-size: 13px;
781    line-height: 1.35;
782    color: ${x.colorText};
783    text-overflow: ellipsis;
784    white-space: nowrap;
785  `,evidenceFileDesc:e`
786    overflow: hidden;
787
788    margin-block-start: 2px;
789
790    font-size: 12px;
791    line-height: 1.35;
792    color: ${x.colorTextTertiary};
793    text-overflow: ellipsis;
794    white-space: nowrap;
795  `,evidenceText:e`
796    overflow: auto;
797
798    max-height: 200px;
799    padding-block: 8px;
800    padding-inline: 12px;
801    border-radius: ${x.borderRadius};
802
803    font-family: ${x.fontFamilyCode};
804    font-size: 12px;
805    white-space: pre-wrap;
806
807    background: ${x.colorFillQuaternary};
808  `,evidenceVideo:e`
809    align-self: flex-start;
810
811    width: auto;
812    max-width: 100%;
813    max-height: 360px;
814    border: 1px solid ${x.colorBorderSecondary};
815    border-radius: ${x.borderRadiusLG};
816
817    object-fit: contain;
818  `,evChip:e`
819    display: inline-flex;
820    gap: 4px;
821    align-items: center;
822
823    padding-block: 1px;
824    padding-inline: 6px;
825    border-radius: 999px;
826
827    font-size: 12px;
828    font-variant-numeric: tabular-nums;
829    color: ${x.colorTextTertiary};
830
831    background: ${x.colorFillTertiary};
832  `,evidenceDoc:e`
833    overflow: hidden;
834
835    width: 100%;
836    height: 320px;
837    border: 1px solid ${x.colorBorderSecondary};
838    border-radius: ${x.borderRadius};
839  `,docViewer:e`
840    overflow: auto;
841    height: 100%;
842    padding-block: 12px;
843    padding-inline: 16px;
844  `})),_r={failed:{bg:x.colorErrorBg,color:x.colorErrorText,dot:x.colorError,icon:_t,labelKey:`report.verdict.failed`},not_executed:{bg:x.colorFillTertiary,color:x.colorTextTertiary,dot:x.colorTextQuaternary,icon:ft,labelKey:`report.verdict.notExecuted`},passed:{bg:x.colorSuccessBg,color:x.colorSuccessText,dot:x.colorSuccess,icon:Pe,labelKey:`report.verdict.passed`},uncertain:{bg:x.colorWarningBg,color:x.colorWarningText,dot:x.colorWarning,icon:ze,labelKey:`report.verdict.uncertain`}},vr={bot:et,cli:Ae,desktop:At,mobile:yt,web:dt},yr=new Set([`gif`,`screenshot`]),br=e=>
844!!(e.fileUrl&&(yr.has(e.type)||e.type===`video`)),xr=e=>!!e.content||br(e),Sr=e=>e===`video`?`video`:yr.has(e)?`image`:`file`,Cr={file:He,image:ht,video:$e},wr=[`image`,`video`,`file`],Tr=new Set([`delivered`,`errored`,`failed`,`passed`]),Er={planned:`report.status.planned`,repairing:`report.status.repairing`,unverified:`report.status.unverified`,verifying:`report.status.verifying`},Dr=[`K`,`P`,`M`,`H`,`T_chars`,`R_ms`],Or={H:.4,K:.2,M:1.35,P:1.1,R_ms:.001,T_chars:.2},kr=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,Ar=e=>typeof e==`string`&&e.length>0?e:void 0,jr=e=>{let t=u(e);return t?{H:kr(t.H),K:kr(t.K),M:kr(t.M),P:kr(t.P),R_ms:kr(t.R_ms),T_chars:kr(t.T_chars)}:{}},Mr=e=>{let t=u(e);if(!t)return;let n=Object.entries(t).flatMap(([e,t])=>{let n=kr(t);return n===void 0?[]:[[e,n]]});return n.length>0?Object.fromEntries(n):void 0},Nr=(e,t)=>{let n=u(e);if(!n)return null;let r=kr(n.seconds),i=kr(n.activeSeconds),a=kr(n.waitSeconds);return r!==void 0||i!==void 0||a!==void 0?{actionCount:kr(n.actionCount),activeSeconds:i,checkItemId:Ar(n.checkItemId),id:Ar(n.id)??`phase-${t+1}`,label:Ar(n.label),operators:jr(n.operators),seconds:r,waitSeconds:a}:null},Pr=e=>{let t=u(u(e)?.interactionCost);if(!t)return null;let n=kr(t.totalSeconds);return n===void 0?null:{actionCount:kr(t.actionCount),activeSeconds:kr(t.activeSeconds)??0,model:Ar(t.model)??`goms-klm`,operators:jr(t.operators),phases:Array.isArray(t.phases)?t.phases.map((e,t)=>Nr(e,t)).filter(e=>!!e):[],scope:Ar(t.scope),sourceTrace:Ar(t.sourceTrace),timingSeconds:Mr(t.timingSeconds),totalSeconds:n,waitSeconds:kr(t.waitSeconds)??0}},Fr=e=>`${e>=10?e.toFixed(1):e.toFixed(2)}s`,Ir=e=>e.seconds??(e.activeSeconds??0)+(e.waitSeconds??0),Lr=(e,t,n)=>e===`R_ms`?t/1e3:e===`T_chars`?t*(n?.T_chars??n?.T_char??Or[e]):t*(n?.[e]??Or[e]),Rr=(e,t)=>e===`R_ms`?Fr(t/1e3):e===`T_chars`?`${Math.round(t)} chars`:Number.isInteger(t)?String(t):t.toFixed(2),zr=(e,t)=>Dr.flatMap(n=>{let r=e.operators?.[n];if(r===void 0||r<=0)return[];let i=Lr(n,r,t);return i>0?[{key:n,seconds:i,value:r}]:[]}),Br=(e,t,n)=>e.fileName||(e.fileUrl?gr(e.fileUrl):``)||e.description||t(`report.evidence.inlineFallback`,{index:n}),Vr=e=>br(e)?nr(e.metadata):null,Hr=(0,hr.memo)(({fileName:e,url:t})=>{let{t:n}=o(`verify`),{fileData:r,loading:i,error:a}=Vn(t);return i?(0,z.jsx)(O,{flex:1,height:`100%`,children:(0,z.jsx)(xn,{debugId:`verify-document-viewer`})}):a||r===null?(0,z.jsxs)(O,{flex:1,gap:8,height:`100%`,children:[(0,z.jsx)(S,{type:`secondary`,children:n(`report.document.failed`)}),(0,z.jsx)(`a`,{href:t,rel:`noreferrer`,target:`_blank`,children:n(`report.document.openOriginal`)})]}):(0,z.jsx)(A,{className:B.docViewer,children:(0,z.jsx)(fe,{wrap:!0,language:Rn(e||gr(t)),showLanguage:!1,variant:`borderless`,children:r})})}),Ur=(0,hr.memo)(({cost:e})=>{let{t}=o(`verify`),n=e.phases??[],r=Math.max(...n.map(Ir),0),i=[{label:t(`report.interaction.total`),value:Fr(e.totalSeconds)},{label:t(`report.interaction.active`),value:Fr(e.activeSeconds)},{label:t(`report.interaction.wait`),value:Fr(e.waitSeconds)}];return(0,z.jsxs)(`section`,{className:B.interactionCost,children:[(0,z.jsx)(`div`,{className:B.interactionCostHeader,children:(0,z.jsx)(`span`,{className:B.interactionCostModel,children:e.model})}),(0,z.jsx)(`div`,{className:B.interactionMetrics,children:i.map(e=>(0,z.jsxs)(`div`,{className:B.interactionMetric,children:[(0,z.jsx)(`span`,{className:B.interactionMetricLabel,children:e.label}),(0,z.jsx)(`span`,{className:B.interactionMetricValue,children:e.value})]},e.label))}),(0,z.jsx)(`div`,{className:B.operatorList,children:Dr.map(n=>{let r=e.operators[n];return r===void 0?null:(0,z.jsxs)(`span`,{className:B.operatorChip,"data-operator":n,children:[(0,z.jsx)(`span`,{children:t(`report.interaction.operator.${n}`)}),(0,z.jsx)(`b`,{children:Rr(n,r)})]},n)})}),n.length>0&&(0,z.jsx)(`div`,{className:B.phaseList,children:n.map(n=>{let i=Ir(n),a=n.activeSeconds??0,o=n.waitSeconds??0,s=r>0?a/r*100:0,c=r>0?o/r*100:0,l=zr(n,e.timingSeconds);return(0,z.jsxs)(`div`,{className:B.phaseRow,children:[(0,z.jsx)(`span`,{className:B.phaseName,title:n.label??n.id,children:n.label??n.id}),(0,z.jsx)(`span`,{className:B.phaseTrack,children:l.length>0?l.map(e=>(0,z.jsx)(`span`,{className:B.phaseSegment,"data-operator":e.key,style:{width:`${r>0?e.seconds/r*100:0}%`},title:`${t(`report.interaction.operator.${e.key}`)} ${Fr(e.seconds)}`},e.key)):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:B.phaseSegment,style:{width:`${s}%`}}),(0,z.jsx)(`span`,{className:B.phaseSegment,"data-operator":`R_ms`,style:{width:`${c}%`}})]})}),(0,z.jsx)(`span`,{className:B.phaseValue,children:Fr(i)})]},n.id)})})]})}),Ur.displayName=`InteractionCostPanel`,Wr=(0,hr.memo)(({evidence:e,flat:t,index:n})=>{let{t:r}=o(`verify`),i=Br(e,r,n),a=e.description&&e.description!==i?e.description:null;return(0,z.jsxs)(A,{gap:6,children:[!br(e)&&(0,z.jsx)(S,{strong:!0,fontSize:13,children:i}),a&&!t&&(0,z.jsx)(S,{fontSize:13,type:`secondary`,children:a}),e.fileUrl&&yr.has(e.type)?(0,z.jsx)(A,{align:t?void 0:`flex-start`,style:{maxWidth:`100%`}
844,children:(0,z.jsx)(se,{preview:!0,alt:e.description??i,src:e.fileUrl,variant:t?`borderless`:`outlined`,style:t?{borderRadius:0,maxWidth:`100%`,width:`100%`}:{maxWidth:`100%`}})}):e.fileUrl&&e.type===`video`?(0,z.jsx)(`video`,{controls:!0,className:B.evidenceVideo,src:e.fileUrl}):e.fileUrl?(0,z.jsx)(`div`,{className:B.evidenceDoc,children:(0,z.jsx)(Hr,{fileName:e.fileName,url:e.fileUrl})}):e.content?(0,z.jsx)(`div`,{className:B.evidenceText,children:e.content}):(0,z.jsx)(`span`,{className:B.softTag,children:e.type})]})}),Gr=(0,hr.memo)(({evidence:e,index:t,onClick:n})=>{let{t:r}=o(`verify`),i=Br(e,r,t),a=e.description&&e.description!==i?e.description:null;return(0,z.jsxs)(`button`,{className:B.evidenceFile,title:r(`report.evidence.openDetail`,{name:i}),type:`button`,onClick:n,children:[(0,z.jsx)(`span`,{className:B.evidenceFileIcon,children:(0,z.jsx)(k,{icon:Cr[Sr(e.type)],size:13})}),(0,z.jsxs)(`span`,{className:B.evidenceFileBody,children:[(0,z.jsx)(`span`,{className:B.evidenceFileName,children:i}),a&&(0,z.jsx)(`span`,{className:B.evidenceFileDesc,children:a})]})]})}),Gr.displayName=`EvidenceFileButton`,Kr=(0,hr.memo)(({evidence:e,onClose:t,open:n,title:r})=>(0,z.jsx)(he,{destroyOnHidden:!0,containerMaxWidth:`100%`,open:n,placement:`right`,title:r,width:`min(1120px, calc(100vw - 48px))`,styles:{body:{height:`100%`,padding:0},bodyContent:{height:`100%`,minHeight:0,overflow:`hidden`}},onClose:t,children:(0,z.jsx)(A,{gap:20,height:`100%`,paddingBlock:12,paddingInline:16,style:{overflow:`auto`},children:e.map((e,t)=>(0,z.jsx)(Wr,{evidence:e,index:t+1},e.id))})})),Wr.displayName=`EvidenceItem`,qr=(0,hr.memo)(({after:e,before:t})=>{let n=Vr(t)?.layout??Vr(e)?.layout,r=(e,t)=>({caption:Vr(e)?.label??(tr(e.description)?void 0:e.description??void 0),content:(0,z.jsx)(Wr,{flat:!0,evidence:e,index:t})});return(0,z.jsx)(ir,{after:r(e,2),before:r(t,1),layout:n})}),qr.displayName=`EvidenceComparisonView`,Kr.displayName=`EvidenceDrawer`,Jr=(0,hr.memo)(({defaultOpen:e,row:t})=>{let{t:n}=o(`verify`),{planItem:r,result:i,state:a}=t,[s,c]=(0,hr.useState)(e),[l,u]=(0,hr.useState)(null),d=_r[a],f=i?.evidence??[],p=f.length,m=r?.verifierConfig??{},h=m.requiredEvidence??[],g=f.reduce((e,t)=>(e[Sr(t.type)]+=1,e),{file:0,image:0,video:0}),_=i?.required??r?.required??!0,v=!!i?.toulmin?.evidence||!!i?.suggestion||!!m.method||!!m.expected||h.length>0||a===`not_executed`||p>0,y=l?f.findIndex(e=>e.id===l):-1,b=y>=0?f[y]:null,x=new Map;for(let e of f){let t=Vr(e);if(!t)continue;let n=x.get(t.id)??{};n[t.role]=e,x.set(t.id,n)}let S=new Set([...x.values()].filter(e=>e.before&&e.after).flatMap(e=>[e.before.id,e.after.id]));return(0,z.jsxs)(`div`,{className:B.row,children:[(0,z.jsxs)(`button`,{className:B.rowHead,type:`button`,onClick:()=>v&&c(e=>!e),children:[(0,z.jsx)(`span`,{style:{color:d.dot,display:`flex`},children:(0,z.jsx)(k,{icon:d.icon,size:16})}),(0,z.jsx)(`span`,{className:B.rowTitle,"data-failed":a===`failed`,children:i?.checkItemTitle||r?.title||t.id}),(0,z.jsxs)(`span`,{className:B.rowSide,children:[wr.map(e=>g[e]>0?(0,z.jsxs)(`span`,{className:B.evChip,title:`${n(`report.evidence.category.${e}`)} × ${g[e]}`,children:[(0,z.jsx)(k,{icon:Cr[e],size:12}),g[e]]},e):null),a===`not_executed`&&(0,z.jsx)(`span`,{className:B.softTag,children:n(`report.verdict.notExecuted`)}),!_&&(0,z.jsx)(`span`,{className:B.softTag,children:n(`report.check.optional`)}),v&&(0,z.jsx)(k,{className:B.chev,"data-open":s,icon:Ee,size:14})]})]}),s&&v&&(0,z.jsxs)(`div`,{className:B.rowBody,children:[(m.method||m.expected||h.length>0)&&(0,z.jsxs)(`div`,{className:B.planDetail,children:[m.method&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:B.planDetailLabel,children:n(`report.plan.method`)}),(0,z.jsx)(`span`,{children:m.method})]}),m.expected&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:B.planDetailLabel,children:n(`report.plan.expected`)}),(0,z.jsx)(`span`,{children:m.expected})]}),h.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:B.planDetailLabel,children:n(`report.plan.requiredEvidence`)}),(0,z.jsx)(`span`,{className:B.surfaceList,children:h.map(e=>(0,z.jsxs)(`span`,{className:B.surfaceChip,title:e.hint,children:[(0,z.jsx)(k,{icon:Cr[Sr(e.type)],size:12}),n(`report.evidence.medium.${e.type}`)]},e.type))})]})]}),a===`not_executed`&&(0,z.jsx)(`p`,{className:B.notExecutedHint,children:n(`report.plan.notExecutedHint`)}),i?.toulmin?.evidence&&(0,z.jsx)(`p`,{className:B.reasoning,children:i.toulmin.evidence}),i?.suggestion&&(0,z.jsx)(`p`,{className:B.suggestion,children:i.suggestion}),p>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:B.evidenceList,children:[[...x.entries()].map(([e,t])=>t.before&&t.after?(0,z.jsx)(qr,{after:t.after,before:t.before},e):null),f.map((e,t)=>S.has(e.id)?null:xr(e)?(0,z.jsx)(Wr,{evidence:e,index:t+1},e.id):(0,z.jsx)(Gr,{evidence:e,index:t+1,onClick:()=>u(e.id)},e.id))]}),b&&(0,z.jsx)(Kr,{evidence:[b],open:!!b,title:Br(b,n,y+1),onClose:()=>u(null)})]})]})]})}),Jr.displayName=`CheckRow`,Yr=(0,hr.memo)(({action:e,description:t,icon:n,title:r})=>(0,z.jsxs)(O,{gap:16,height:`100%`,style:{minHeight:`70vh`},width:`100%`,children:[(0,z.jsx)(te,{description:t,icon:n,title:r}),e]})),Xr=e=>{if(!e)return;let t=new Date(e);
844return Number.isNaN(t.getTime())?e:t.toLocaleString()},Zr=e=>{if(e)try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?t.toString():void 0}catch{return}},Qr=(e,t)=>e.number===void 0||e.number===null?t(`report.scope.pullRequest`):t(`report.scope.pullRequestNumber`,{number:String(e.number).replace(/^#/,``)}),$r=(0,hr.memo)(({context:e,origin:t})=>{let{t:n}=o(`verify`);if(!e)return null;let{branch:r,commit:i,entry:a,pullRequest:s,testedAt:c}=e,l=!!(s&&(s.number!==void 0||s.title||s.url)),u=Xr(c),d=ur(e.surfaces),f=t?.topicId;if(!(r||i||a||l||d.length>0||u||f))return null;let p=Zr(s?.url),m=l&&s?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(k,{icon:Ge,size:15}),(0,z.jsx)(`span`,{className:B.prNumber,children:Qr(s,n)}),s.title&&(0,z.jsx)(`span`,{className:B.prTitle,children:s.title}),p&&(0,z.jsx)(k,{icon:bt,size:13})]}):null,h=i&&i.length>12?i.slice(0,10):i;return(0,z.jsxs)(`div`,{className:B.codingScope,children:[m&&(0,z.jsx)(`div`,{className:B.scopePullRequestLine,children:p?(0,z.jsx)(`a`,{className:B.prChip,"data-link":!0,href:p,rel:`noreferrer`,target:`_blank`,title:s?.title??p,children:m}):(0,z.jsx)(`span`,{className:B.prChip,title:s?.title,children:m})}),(0,z.jsxs)(`div`,{className:B.scopeMetaLine,children:[r&&(0,z.jsxs)(`span`,{className:B.branchChip,title:r,children:[(0,z.jsx)(k,{icon:Ct,size:15}),(0,z.jsx)(`code`,{children:r})]}),i&&(0,z.jsxs)(`span`,{className:B.commitChip,title:i,children:[(0,z.jsx)(k,{icon:Et,size:14}),(0,z.jsx)(`code`,{children:h})]}),u&&(0,z.jsxs)(`span`,{className:B.scopeMetaItem,children:[(0,z.jsx)(k,{icon:gt,size:13}),(0,z.jsx)(`span`,{children:u})]}),d.length>0&&(0,z.jsx)(`span`,{className:B.surfaceList,children:d.map(e=>(0,z.jsxs)(`span`,{className:B.surfaceChip,children:[(0,z.jsx)(k,{icon:vr[e],size:12}),n(`report.surface.${e}`)]},e))}),a&&(0,z.jsxs)(`span`,{className:w(B.scopeMetaItem,B.scopeEntry),title:a,children:[(0,z.jsx)(k,{icon:Ae,size:13}),(0,z.jsx)(`code`,{children:a})]}),f&&(0,z.jsxs)(`a`,{className:w(B.scopeMetaItem,B.originLink),href:`/chat?topic=${f}`,rel:`noreferrer`,target:`_blank`,title:n(`report.scope.origin`),children:[(0,z.jsx)(k,{icon:Be,size:13}),(0,z.jsx)(k,{icon:bt,size:11})]})]})]})}),$r.displayName=`CodingScopeCard`,ei=(0,hr.memo)(({runId:e})=>{let{t}=o(`verify`),{runId:n}=Ce(),r=e??n??null,{data:i,error:a,isLoading:s,mutate:c}=on(r),[l,u]=(0,hr.useState)(`all`);(0,hr.useEffect)(()=>{let e=i?.run.status;if(!e||Tr.has(e))return;let t=window.setInterval(()=>void c(),5e3);return()=>window.clearInterval(t)},[i?.run.status,c]);let d=(0,hr.useMemo)(()=>i?lr(i.run.plan??null,i.results):[],[i]);if(!r)return(0,z.jsx)(Yr,{description:t(`report.missing.description`),icon:it,title:t(`report.missing.title`)});if(s)return(0,z.jsx)(xn,{debugId:`verify-report-viewer`});if(a)return(0,z.jsx)(Yr,{description:t(`report.error.description`),icon:_t,title:t(`report.error.title`),action:(0,z.jsx)(L,{icon:(0,z.jsx)(qe,{size:16}),onClick:()=>void c(),children:t(`report.actions.retry`)})});if(!i)return(0,z.jsx)(Yr,{description:t(`report.notFound.description`),icon:He,title:t(`report.notFound.title`)});let{run:f,report:p}=i,m=f.status&&!Tr.has(f.status)?f.status:null,h=d.reduce((e,t)=>(e[t.state]+=1,e),{failed:0,not_executed:0,passed:0,uncertain:0}),g=d.length>0,_=g?d.length:p?.totalChecks??0,v=g?h.passed:p?.passedChecks??0,y=g?h.failed:p?.failedChecks??0,b=g?h.uncertain:p?.uncertainChecks??0,C=p?.verdict??null,w=l===`all`?d:d.filter(e=>e.state===l),T=f.scenario===`coding`,E=Pr(f.metadata),D=i.isOwner?f.metadata?.origin:void 0,O=[{count:_,key:`all`,label:t(`report.filter.all`)},{count:y,dot:x.colorError,key:`failed`,label:t(`report.filter.failed`)},{count:b,dot:x.colorWarning,key:`uncertain`,label:t(`report.filter.uncertain`)},...h.not_executed>0?[{count:h.not_executed,dot:x.colorTextQuaternary,key:`not_executed`,label:t(`report.filter.notExecuted`)}]:[],{count:v,dot:x.colorSuccess,key:`passed`,label:t(`report.filter.passed`)}];return(0,z.jsx)(`div`,{className:B.scroll,children:(0,z.jsx)(`div`,{className:B.page,children:(0,z.jsxs)(`main`,{children:[(0,z.jsxs)(A,{gap:12,children:[(0,z.jsxs)(`div`,{className:B.heroLine,children:[(0,z.jsx)(S,{as:`h1`,style:{fontSize:24,lineHeight:1.3,margin:0},children:f.title||t(`report.titleFallback`)}),C&&(0,z.jsxs)(`span`,{className:B.pill,style:{background:_r[C].bg,color:_r[C].color},children:[(0,z.jsx)(k,{icon:_r[C].icon,size:15}),t(`report.verdict.${C}`)]})]}),!T&&f.goal&&(0,z.jsx)(S,{className:B.summary,children:f.goal}),p?.summary&&(0,z.jsx)(S,{className:B.summary,children:p.summary}
844),T&&(0,z.jsx)($r,{context:f.context,origin:D}),m&&(0,z.jsxs)(`div`,{className:B.liveBanner,children:[(0,z.jsx)(k,{icon:kt,size:14}),t(Er[m])]})]}),(0,z.jsxs)(`div`,{className:B.stats,children:[O.map(e=>(0,z.jsxs)(`button`,{className:B.chip,"data-active":l===e.key,type:`button`,onClick:()=>u(e.key),children:[e.dot&&(0,z.jsx)(`span`,{className:B.dot,style:{background:e.dot}}),e.label,` `,(0,z.jsx)(`b`,{children:e.count})]},e.key)),typeof p?.overallConfidence==`number`&&(0,z.jsxs)(`span`,{className:`${B.chip} ${B.score}`,children:[t(`report.stats.confidence`),` `,(0,z.jsxs)(`b`,{children:[Math.round(p.overallConfidence*100),`%`]})]})]}),w.length>0?(0,z.jsx)(`div`,{className:B.checks,children:w.map(e=>(0,z.jsx)(Jr,{row:e,defaultOpen:e.state===`failed`||e.state===`not_executed`||(e.result?.evidence??[]).some(br)},e.id))}):(0,z.jsx)(ae,{align:`center`,padding:24,children:(0,z.jsx)(S,{type:`secondary`,children:t(`report.filterEmpty`)})}),p?.content&&(0,z.jsxs)(`details`,{className:B.narrative,children:[(0,z.jsxs)(`summary`,{className:B.narrativeSummary,children:[(0,z.jsx)(k,{icon:Ee,size:13}),t(`report.sections.details`)]}),(0,z.jsx)(`div`,{className:B.narrativeBody,children:(0,z.jsx)(ne,{children:p.content})})]}),E&&(0,z.jsxs)(`details`,{className:B.narrative,children:[(0,z.jsxs)(`summary`,{className:B.narrativeSummary,children:[(0,z.jsx)(k,{icon:Ee,size:13}),t(`report.interaction.title`)]}),(0,z.jsx)(`div`,{className:B.interactionCostBody,children:(0,z.jsx)(Ur,{cost:E})})]})]})})})})})),ni,ri,ii,ai,oi,si,ci,li=e((()=>{M(),D(),I(),ni=t(v()),ri=t(m()),ii=j(({css:e})=>({badge:e`
845    position: absolute;
846    inset-block-start: -9px;
847    inset-inline-start: -9px;
848
849    display: inline-flex;
850    align-items: center;
851    justify-content: center;
852
853    width: 18px;
854    height: 18px;
855    border-radius: 50%;
856
857    font-size: 11px;
858    font-weight: 600;
859    line-height: 1;
860    color: #fff;
861
862    background: ${x.colorError};
863  `,badgeDelete:e`
864    cursor: pointer;
865
866    position: absolute;
867    inset-block-start: -9px;
868    inset-inline-end: -9px;
869
870    display: inline-flex;
871    align-items: center;
872    justify-content: center;
873
874    width: 18px;
875    height: 18px;
876    border: none;
877    border-radius: 50%;
878
879    color: #fff;
880
881    background: ${x.colorError};
882
883    &:hover {
884      filter: brightness(1.15);
885    }
886  `,canvas:e`
887    cursor: crosshair;
888    user-select: none;
889  `,editableRect:e`
890    pointer-events: auto;
891    cursor: move;
892  `,frame:e`
893    position: relative;
894
895    overflow: hidden;
896    display: inline-block;
897
898    /* Shrink-wrap the image exactly — a stretched frame skews every rect. */
899    align-self: flex-start;
900
901    width: fit-content;
902    max-width: 100%;
903    border: 1px solid ${x.colorBorderSecondary};
904    border-radius: ${x.borderRadiusLG};
905  `,image:e`
906    display: block;
907    max-width: 100%;
908  `,rect:e`
909    position: absolute;
910    border: 2px solid ${x.colorError};
911    border-radius: 4px;
912    box-shadow: 0 0 0 1px rgb(0 0 0 / 25%);
913  `,resizeHandle:e`
914    cursor: nwse-resize;
915
916    position: absolute;
917    inset-block-end: -6px;
918    inset-inline-end: -6px;
919
920    width: 12px;
921    height: 12px;
922    border: 2px solid ${x.colorError};
923    border-radius: 50%;
924
925    background: ${x.colorBgContainer};
926  `})),ai=e=>({height:`${e.height*100}%`,left:`${e.x*100}%`,top:`${e.y*100}%`,width:`${e.width*100}%`}),oi=(0,ni.memo)(({annotations:e,imageStyle:t,src:n})=>(0,ri.jsxs)(A,{gap:6,style:{maxWidth:`100%`,width:`fit-content`},children:[(0,ri.jsxs)(`div`,{className:ii.frame,children:[(0,ri.jsx)(`img`,{alt:``,className:ii.image,src:n,style:t}),e.map((t,n)=>(0,ri.jsx)(`div`,{className:ii.rect,style:ai(t.rect),children:e.length>1&&(0,ri.jsx)(`span`,{className:ii.badge,children:n+1})},n))]}),(0,ri.jsx)(A,{gap:2,children:e.map((t,n)=>t.comment&&(0,ri.jsxs)(S,{fontSize:12,type:`secondary`,children:[e.length>1?`${n+1}. `:``,t.comment]},n))})]})),oi.displayName=`AcceptanceAnnotatedImage`,si=e=>Math.min(Math.max(e,0),1),ci=(0,ni.memo)(({annotations:e,imageWidth:t,onDraw:n,onRemove:r,onUpdate:i,src:a})=>{let o=(0,ni.useRef)(null),[s,c]=(0,ni.useState)(null),l=(0,ni.useRef)(null),u=e=>
926{let t=o.current?.getBoundingClientRect();return!t||t.width===0||t.height===0?null:{x:si((e.clientX-t.left)/t.width),y:si((e.clientY-t.top)/t.height)}},d=(e,t)=>({height:Math.abs(e.y-t.y),width:Math.abs(e.x-t.x),x:Math.min(e.x,t.x),y:Math.min(e.y,t.y)});return(0,ri.jsxs)(`div`,{className:`${ii.frame} ${ii.canvas}`,style:t?{maxWidth:`none`}:void 0,onMouseUp:e=>{let t=l.current;if(l.current=null,c(null),t?.kind!==`draw`)return;let r=u(e);if(!r)return;let i=d(t.start,r);i.width<.01||i.height<.01||n(i)},onMouseDown:e=>{e.preventDefault();let t=u(e);t&&(l.current={kind:`draw`,start:t})},onMouseLeave:()=>{l.current=null,c(null)},onMouseMove:e=>{let t=l.current;if(!t)return;let n=u(e);if(!n)return;if(t.kind===`draw`){c(d(t.start,n));return}let{index:r,origin:a}=t;if(t.kind===`move`){i(r,{...a,x:Math.min(Math.max(a.x+(n.x-t.start.x),0),1-a.width),y:Math.min(Math.max(a.y+(n.y-t.start.y),0),1-a.height)});return}i(r,{height:Math.max(n.y-a.y,.01),width:Math.max(n.x-a.x,.01),x:a.x,y:a.y})},children:[(0,ri.jsx)(`img`,{alt:``,className:ii.image,draggable:!1,ref:o,src:a,style:t?{maxWidth:`none`,width:t}:void 0}),e.map((e,t)=>(0,ri.jsxs)(`div`,{className:`${ii.rect} ${ii.editableRect}`,style:ai(e.rect),onMouseDown:n=>{n.preventDefault(),n.stopPropagation();let r=u(n);r&&(l.current={index:t,kind:`move`,origin:e.rect,start:r})},children:[(0,ri.jsx)(`span`,{className:ii.badge,children:t+1}),(0,ri.jsx)(`button`,{className:ii.badgeDelete,type:`button`,onMouseDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation(),r(t)},children:(0,ri.jsx)(k,{icon:Ye,size:11})}),(0,ri.jsx)(`span`,{className:ii.resizeHandle,onMouseDown:n=>{n.preventDefault(),n.stopPropagation(),l.current={index:t,kind:`resize`,origin:e.rect}}})]},t)),s&&(0,ri.jsx)(`div`,{className:ii.rect,style:ai(s)})]})}),ci.displayName=`AcceptanceAnnotationCanvas`})),ui,di,fi,pi,mi,hi,gi,_i,vi,yi=e((()=>{M(),Pt(),ge(),D(),I(),ui=t(v()),r(),an(),di=t(m()),fi=10*1024*1024,pi=j(({css:e})=>({remove:e`
927    cursor: pointer;
928
929    position: absolute;
930    z-index: 2;
931    inset-block-start: -6px;
932    inset-inline-end: -6px;
933
934    display: flex;
935    align-items: center;
936    justify-content: center;
937
938    width: 18px;
939    height: 18px;
940    padding: 0;
941    border: none;
942    border-radius: 50%;
943
944    color: #fff;
945
946    opacity: 0;
947    background: ${x.colorError};
948
949    transition: opacity 0.15s;
950  `,thumb:e`
951    position: relative;
952
953    overflow: hidden;
954
955    width: 56px;
956    height: 56px;
957    border: 1px solid ${x.colorBorderSecondary};
958    border-radius: ${x.borderRadius};
959
960    &:hover .acceptance-attach-remove {
961      opacity: 1;
962    }
963
964    img {
965      display: block;
966      width: 100%;
967      height: 100%;
968      object-fit: cover;
969    }
970  `,thumbLoading:e`
971    display: flex;
972    align-items: center;
973    justify-content: center;
974
975    color: ${x.colorTextTertiary};
976
977    background: ${x.colorFillQuaternary};
978  `})),mi=e=>e.filter(e=>e.type.startsWith(`image/`)),hi=(e=6)=>{let{t}=o(`verify`),{message:n}=ve.useApp(),r=rn(e=>e.uploadWithProgress),[i,a]=(0,ui.useState)([]),[s,c]=(0,ui.useState)(0),l=(0,ui.useCallback)(async o=>{let s=mi(o);if(s.length===0)return;let l=e-i.length;if(l<=0){n.info(t(`acceptance.review.attachLimit`,{count:e}));return}await Promise.all(s.slice(0,l).map(async e=>{if(e.size>fi){n.error(t(`acceptance.review.attachTooLarge`));return}c(e=>e+1);try{let t=await r({file:e});t?.id&&t.url&&a(n=>[...n,{id:t.id,name:e.name,url:t.url}])}catch(e){console.error(`[acceptance] attachment upload failed`,e),n.error(t(`acceptance.review.attachFailed`))}finally{c(e=>e-1)}}))},[i.length,e,n,t,r]),u=(0,ui.useCallback)(e=>{let t=[...e.clipboardData.items].filter(e=>e.kind===`file`&&e.type.startsWith(`image/`)).map(e=>e.getAsFile()).filter(e=>!!e);t.length!==0&&(e.preventDefault(),l(t))},[l]),d=(0,ui.useCallback)(e=>a(t=>t.filter(t=>t.id!==e)),[]);return{attachments:i,fileIds:i.map(e=>e.id),handlePaste:u,remove:d,uploadFiles:l,uploading:s>0}},gi=(0,ui.memo)(({attachments:e,disabled:t,onRemove:n,uploading:r})=>e.length===0&&!r?null:(0,di.jsxs)(A,{horizontal:!0,gap:8,wrap:`wrap`,children:[e.map(e=>(0,di.jsxs)(`div`,{className:pi.thumb,children:[(0,di.jsx)(se,{alt:e.name??``,preview:!1,src:e.url}),!t&&(0,di.jsx)(`button`,{className:w(`acceptance-attach-remove`,pi.remove),t
978ype:`button`,onClick:()=>n(e.id),children:(0,di.jsx)(k,{icon:_t,size:12})})]},e.id)),r&&(0,di.jsx)(`div`,{className:w(pi.thumb,pi.thumbLoading),children:(0,di.jsx)(k,{spin:!0,icon:Re,size:16})})]})),gi.displayName=`AcceptanceAttachmentStrip`,_i=(0,ui.memo)(({disabled:e,onFiles:t})=>{let{t:n}=o(`verify`);return(0,di.jsx)(_e,{multiple:!0,accept:`image/*`,disabled:e,showUploadList:!1,beforeUpload:(e,n)=>(e===n[0]&&t(n),!1),children:(0,di.jsx)(L,{disabled:e,icon:(0,di.jsx)(k,{icon:vt}),size:`small`,type:`text`,children:n(`acceptance.review.attach`)})})}),_i.displayName=`AcceptanceAttachmentUploadButton`,vi=(0,ui.memo)(({attachments:e})=>{let t=(e??[]).filter(e=>e.url);return t.length===0?null:(0,di.jsx)(A,{horizontal:!0,gap:6,wrap:`wrap`,children:t.map(e=>(0,di.jsx)(`div`,{className:pi.thumb,children:(0,di.jsx)(se,{alt:e.name??``,src:e.url})},e.id))})}),vi.displayName=`AcceptanceAttachmentThumbs`})),bi,V,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki=e((()=>{M(),Pt(),D(),s(),I(),bi=t(v()),r(),li(),yi(),V=t(m()),xi=j(({css:e})=>({canvasWrap:e`
979    position: relative;
980
981    .acceptance-annotate-fullscreen {
982      position: absolute;
983      z-index: 5;
984      inset-block-start: 8px;
985      inset-inline-end: 8px;
986
987      border: 1px solid ${x.colorBorderSecondary};
988
989      opacity: 0;
990      background: ${x.colorBgContainer};
991
992      transition: opacity 0.2s;
993    }
994
995    &:hover {
996      .acceptance-annotate-fullscreen {
997        opacity: 1;
998      }
999    }
1000  `,fullscreenBody:e`
1001    display: flex;
1002    flex: 1;
1003    gap: 16px;
1004    min-height: 0;
1005  `,regionIndex:e`
1006    flex: none;
1007
1008    width: 18px;
1009    height: 18px;
1010    border-radius: 50%;
1011
1012    font-size: 11px;
1013    font-weight: 600;
1014    line-height: 18px;
1015    color: #fff;
1016    text-align: center;
1017
1018    background: ${x.colorError};
1019  `,sidePanel:e`
1020    overflow-y: auto;
1021    display: flex;
1022    flex: none;
1023    flex-direction: column;
1024    gap: 12px;
1025
1026    width: 320px;
1027    min-width: 0;
1028  `,thumb:e`
1029    cursor: pointer;
1030
1031    overflow: hidden;
1032
1033    width: 72px;
1034    height: 48px;
1035    border: 2px solid transparent;
1036    border-radius: ${x.borderRadius};
1037
1038    img {
1039      display: block;
1040      width: 100%;
1041      height: 100%;
1042      object-fit: cover;
1043    }
1044  `,thumbActive:e`
1045    border-color: ${x.colorPrimary};
1046  `,viewport:e`
1047    overflow: auto;
1048    display: flex;
1049    flex: 1;
1050
1051    min-width: 0;
1052    border: 1px solid ${x.colorBorderSecondary};
1053    border-radius: ${x.borderRadiusLG};
1054
1055    background: ${x.colorFillQuaternary};
1056  `,viewportInner:e`
1057    margin: auto;
1058  `,zoomBar:e`
1059    position: absolute;
1060    z-index: 5;
1061    inset-block-end: 16px;
1062    inset-inline-start: 50%;
1063    transform: translateX(-50%);
1064
1065    display: flex;
1066    gap: 4px;
1067    align-items: center;
1068
1069    padding-block: 4px;
1070    padding-inline: 8px;
1071    border: 1px solid ${x.colorBorderSecondary};
1072    border-radius: 99px;
1073
1074    background: ${x.colorBgElevated};
1075    box-shadow: ${x.boxShadowSecondary};
1076  `,zoomLabel:e`
1077    min-width: 44px;
1078
1079    font-size: 12px;
1080    font-variant-numeric: tabular-nums;
1081    color: ${x.colorTextSecondary};
1082    text-align: center;
1083  `})),Si=0,Ci=()=>++Si,wi=e=>`acceptance-reject-draft:${e}`,Ti=e=>{if(!e)return null;try{let t=localStorage.getItem(wi(e));return t?JSON.parse(t):null}catch{return null}},Ei=[.5,.75,1,1.5,2,3,4],Di=(0,bi.memo)(({checkTitle:e,draftKey:t,evidence:n,onConfirm:r})=>{let{t:i}=o(`verify`),{close:a}=Lt(),[s]=(0,bi.useState)(()=>Ti(t)),[c,l]=(0,bi.useState)(s?.comment??``),[u,d]=(0,bi.useState)(!1),[f,p]=(0,bi.useState)(n[0]?.id),[m,h]=(0,bi.useState)(()=>(s?.annotations??[]).filter(e=>n.some(t=>t.id===e.evidenceId)).map(e=>({...e,key:Ci()}))),{attachments:g,fileIds:_,handlePaste:v,remove:y,uploadFiles:b,uploading:C}=hi(),[T,E]=(0,bi.useState)(!1),[D,O]=(0,bi.useState)(1),k=(0,bi.useRef)(null),[j,ee]=(0,bi.useState)(),te=(0,bi.useRef)([]);(0,bi.useLayoutEffect)(()=>{if(!T)return;let e,t=0,n=()=>{let r=k.current;if(!r){t=requestAnimationFrame(n);return}let i=()=>ee(r.clientWidth);i(),e=new ResizeObserver(i),e.observe(r)};return n(),()=>{cancelAnimationFrame(t),e?.disconnect()}},[T,f]),(0,bi.useEffect)(()=>{if(t)try{!c&&m.length===0?localStorage.removeItem(wi(t)):localStorage.setItem(wi(t),JSON.stringify({annotations:m,comment:c}))}catch{}},[m,c,t]);let ne=n.find(e=>e.id===f),ie=m.filter(e=>e.evidenceId===f),ae=e=>O(t=>{let n=Ei.findIndex(e=>Math.abs(e-t)<.001);return Ei[Math.min(Math.max((n===-1?2:n)+e,0),Ei.length-1)]}),oe=!!c.trim()||m.some(e=>e.comment.trim())||_.length>0,se=async()=>{d(!0);try{await r({annotations:m.filter(e=>e.comment.trim()).map(e=>({comment:e.comment.trim(),evidenceId:e.evidenceId,rect:e.rect})),comment:c.trim(),fileIds:_})&&(t&&localStorage.removeItem(wi(t)),a())}finally{d(!1)}},ce=n.length>0,ue={onDraw:e=>h(t=>[...t,{comment:``,evidenceId:ne.id,key:Ci(),rect:e}]),onRemove:e=>{let t=ie[e];t&&h(e=>e.filter(e=>e.key!==t.key))},onUpdate:(e,t)=>
1083{let n=ie[e];n&&h(e=>e.map(e=>e.key===n.key?{...e,rect:t}:e))}},de=ie.map((e,t)=>(0,V.jsxs)(A,{horizontal:!0,align:`flex-start`,gap:8,children:[(0,V.jsx)(`span`,{className:xi.regionIndex,style:{marginBlockStart:6},children:t+1}),(0,V.jsx)(le,{autoSize:{maxRows:5,minRows:1},style:{flex:1},value:e.comment,placeholder:i(`acceptance.review.annotationPlaceholder`,{index:t+1}),onChange:t=>h(n=>n.map(n=>n.key===e.key?{...n,comment:t.target.value}:n))})]},e.key)),fe=n.length>1&&(0,V.jsx)(A,{horizontal:!0,gap:8,wrap:`wrap`,children:n.map(e=>(0,V.jsx)(`div`,{className:w(xi.thumb,e.id===f&&xi.thumbActive),onClick:()=>p(e.id),children:(0,V.jsx)(`img`,{alt:``,src:e.fileUrl})},e.id))});return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(A,{flex:1,gap:16,paddingBlock:12,paddingInline:16,style:{minHeight:0,overflowY:`auto`},children:[(0,V.jsx)(S,{fontSize:13,type:`secondary`,children:i(`acceptance.review.rejectDescription`,{title:e})}),ce&&(0,V.jsxs)(A,{gap:8,children:[(0,V.jsxs)(A,{gap:2,children:[(0,V.jsx)(S,{strong:!0,fontSize:13,children:i(`acceptance.review.annotate`)}),(0,V.jsx)(S,{fontSize:12,type:`secondary`,children:i(`acceptance.review.annotateHint`)})]}),fe,ne&&(0,V.jsxs)(`div`,{className:xi.canvasWrap,children:[(0,V.jsx)(ci,{annotations:ie,src:ne.fileUrl,...ue}),(0,V.jsx)(re,{className:`acceptance-annotate-fullscreen`,icon:Tt,size:`small`,title:i(`acceptance.review.fullscreen`),onClick:()=>{O(1),te.current=m,E(!0)}})]}),de]}),(0,V.jsxs)(A,{gap:6,children:[ce&&(0,V.jsx)(S,{fontSize:12,type:`secondary`,children:i(`acceptance.review.supplement`)}),(0,V.jsx)(le,{autoSize:{maxRows:6,minRows:ce?2:3},placeholder:i(`acceptance.review.rejectPlaceholder`),value:c,onChange:e=>l(e.target.value),onPaste:v}),(0,V.jsxs)(A,{align:`flex-start`,gap:8,children:[(0,V.jsx)(_i,{disabled:u,onFiles:b}),(0,V.jsx)(gi,{attachments:g,disabled:u,uploading:C,onRemove:y})]})]})]}),(0,V.jsxs)(A,{horizontal:!0,gap:8,justify:`flex-end`,paddingBlock:12,paddingInline:16,style:{borderBlockStart:`1px solid ${x.colorBorderSecondary}`,flex:`none`},children:[(0,V.jsx)(L,{disabled:u,onClick:a,children:i(`acceptance.actions.cancel`)}),(0,V.jsx)(L,{disabled:!oe||C,loading:u,type:`primary`,onClick:se,children:i(`acceptance.review.confirmReject`)})]}),(0,V.jsx)(Nt,{centered:!0,destroyOnHidden:!0,footer:null,height:`94vh`,open:T,title:i(`acceptance.review.annotate`),width:`min(98vw, 1680px)`,styles:{body:{display:`flex`,flexDirection:`column`,gap:12,height:`100%`,minHeight:0,paddingBlock:12}},onCancel:()=>E(!1),children:ne&&(0,V.jsxs)(V.Fragment,{children:[fe,(0,V.jsxs)(`div`,{className:xi.fullscreenBody,style:{position:`relative`},children:[(0,V.jsx)(`div`,{className:xi.viewport,ref:k,children:(0,V.jsx)(`div`,{className:xi.viewportInner,children:(0,V.jsx)(ci,{annotations:ie,src:ne.fileUrl,imageWidth:j?Math.max(j*D-2,0):void 0,...ue})})}),(0,V.jsxs)(`div`,{className:xi.zoomBar,children:[(0,V.jsx)(re,{disabled:D<=Ei[0],icon:xt,size:`small`,title:i(`acceptance.review.zoomOut`),onClick:()=>ae(-1)}),(0,V.jsxs)(`span`,{className:xi.zoomLabel,children:[Math.round(D*100),`%`]}),(0,V.jsx)(re,{disabled:D>=Ei.at(-1),icon:mt,size:`small`,title:i(`acceptance.review.zoomIn`),onClick:()=>ae(1)})]}),(0,V.jsxs)(`div`,{className:xi.sidePanel,children:[(0,V.jsxs)(A,{gap:2,children:[(0,V.jsx)(S,{strong:!0,fontSize:13,children:i(`acceptance.review.regionComments`)}),(0,V.jsx)(S,{fontSize:12,type:`secondary`,children:i(`acceptance.review.annotateHint`)})]}),ie.length===0&&(0,V.jsx)(S,{fontSize:12,type:`secondary`,children:i(`acceptance.review.regionCommentsEmpty`)}),de]})]}),(0,V.jsxs)(A,{horizontal:!0,gap:8,justify:`flex-end`,style:{flex:`none`},children:[(0,V.jsx)(L,{onClick:()=>{h(te.current),E(!1)},children:i(`acceptance.actions.cancel`)}),(0,V.jsx)(L,{type:`primary`,onClick:()=>E(!1),children:i(`acceptance.review.fullscreenDone`)})]})]})})]})}),Di.displayName=`AcceptanceCheckRejectContent`,Oi=e=>It({content:(0,V.jsx)(Di,{...e}),footer:null,maskClosable:!0,styles:{backdrop:{backdropFilter:`blur(4px)`},content:{display:`flex`,flexDirection:`column`,minHeight:0,overflow:`hidden`,padding:0}},title:i(`acceptance.review.reject`,{ns:`verify`}),width:`min(92vw, 640px)`})})),Ai,H,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi=e((()=>{M(),Pt(),D(),s(),Ai=t(v()),r(),yi(),H=t(m()),ji=j(({css:e})=>({warning:e`
1084    padding-block: 10px;
1085    padding-inline: 14px;
1086    border-radius: ${x.borderRadiusLG};
1087    background: ${x.colorWarningBg};
1088  `})),Mi={backdrop:{backdropFilter:`blur(4px)`}},Ni=(0,Ai.memo)(({exceptions:e,onConfirm:t,subjectTitle:n})=>{let{t:r}=o(`verify`),{close:i}=Lt(),[a,s]=(0,Ai.useState)(!1);return(0,H.jsxs)(A,{gap:16,children:[(0,H.jsx)(S,{children:r(`acceptance.accept.summary`,{title:n})}),e.length>0&&(0,H.jsxs)(A,{className:ji.warning,gap:4,children:[(0,H.jsx)(S,{strong:!0,fontSize:13,children:r(`acceptance.accept.exceptionsTitle`,{count:e.length})}),e.map(e=>(0,H.jsxs)(S,{fontSize:12,type:`secondary`,children:[`· `,e]},e)),(0,H.jsx)(S,{fontSize:12,type:`secondary`,children:r(`acceptance.accept.exceptionsHint`)})]}),(0,H.jsxs)(A,{horizontal:!0,gap:8,justify:`flex-end`,children:[(0,H.jsx)(L,{disabled:a,onClick:i,children:r(`acceptance.actions.cancel`)}),(0,H.jsx)(L,{loading:a,type:`primary`,onClick:async()=>{s(!0);try{await t()&&i()}finally{s(!1)}},children:r(`acceptance.actions.confirmAccept`)})]})]})}),Ni.displayName=`AcceptanceAcceptContent`,Pi=e=>It({content:(0,H.jsx)(Ni,{...e}),footer:null,maskClosable:!0,styles:Mi,title:i(`acceptance.actions.accept`,{ns:`verify`}),width:`min(90vw, 480px)`}),Fi=(0,Ai.memo)(({onConfirm:e})=>{let{t}=o(`verify`),{close:n}=Lt(),[r,i]=(0,Ai.useState)(``),[a,s]=(0,Ai.useState)(!1);return(0,H.jsxs)(A,{gap:16,children:[(0,H.jsx)(S,{fontSize:13,type:`secondary`,children:t(`acceptance.reject.description`)}),(0,H.jsx)(le,{autoSize:{maxRows:6,minRows:3},placeholder:t(`acceptance.reject.placeholder`),value:r,onChange:e=>i(e.target.value)}),(0,H.jsxs)(A,{horizontal:!0,gap:8,justify:`flex-end`,children:[(0,H.jsx)(L,{disabled:a,onClick:n,children:t(`acceptance.actions.cancel`)}),(0,H.jsx)(L,{disabled:!r.trim(),loading:a,type:`primary`,onClick:async()=>{let t=r.trim();if(t){s(!0);try{await e(t)&&n()}finally{s(!1)}}},children:t(`acceptance.actions.confirmReject`)})]})]})}),Fi.displayName=`AcceptanceRejectContent`,Ii=e=>It({content:(0,H.jsx)(Fi,{...e}),footer:null,maskClosable:!0,styles:Mi,title:i(`acceptance.actions.reject`,{ns:`verify`}),width:`min(90vw, 480px)`}),Li=(0,Ai.memo)(({groupLabel:e,onConfirm:t})=>{let{t:n}=o(`verify`),{close:r}=Lt(),[i,a]=(0,Ai.useState)(``),[s,c]=(0,Ai.useState)(!1),{attachments:l,fileIds:u,handlePaste:d,remove:f,uploadFiles:p,uploading:m}=hi();return(0,H.jsxs)(A,{gap:16,children:[(0,H.jsx)(S,{fontSize:13,type:`secondary`,children:n(`acceptance.group.feedbackDescription`,{label:e})}),(0,H.jsxs)(A,{gap:8,children:[(0,H.jsx)(le,{autoSize:{maxRows:8,minRows:3},placeholder:n(`acceptance.group.feedbackPlaceholder`),value:i,onChange:e=>a(e.target.value),onPaste:d}),(0,H.jsxs)(A,{horizontal:!0,align:`center`,gap:8,wrap:`wrap`,children:[(0,H.jsx)(gi,{attachments:l,disabled:s,uploading:m,onRemove:f}),(0,H.jsx)(_i,{disabled:s,onFiles:p})]})]}),(0,H.jsxs)(A,{horizontal:!0,align:`center`,gap:8,justify:`flex-end`,children:[(0,H.jsx)(L,{disabled:s,onClick:r,children:n(`acceptance.actions.cancel`)}),(0,H.jsx)(L,{disabled:!i.trim()||m,loading:s,type:`primary`,onClick:async()=>{let e=i.trim();if(e){c(!0);try{await t(e,u)&&r()}finally{c(!1)}}},children:n(`acceptance.group.feedbackSubmit`)})]})]})}),Li.displayName=`AcceptanceGroupFeedbackContent`,Ri=e=>It({content:(0,H.jsx)(Li,{...e}),footer:null,maskClosable:!0,styles:Mi,title:i(`acceptance.group.feedbackTitle`,{ns:`verify`}),width:`min(90vw, 520px)`})})),Bi,Vi,U,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,W,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,ua=e((()=>{M(),Pt(),D(),Bi=t(n()),I(),Vi=t(v()),r(),ar(),li(),yi(),ki(),zi(),U=t(m()),Hi=e=>{let t=e.userReview;return t?t.action===`accept`?`accepted`:t.stale?`pending`:`rejected`:`pending`},Ui=e=>{let t=e.filter(e=>e.result);return t.length>0&&t.every(e=>Hi(e)===`accepted`)},Wi={failed:0,not_executed:2,passed:3,uncertain:1},Gi={failed:{color:x.colorError,icon:Qe},not_executed:{color:x.colorTextQuaternary,icon:ft},passed:{color:x.colorSuccess,icon:Pe},uncertain:{color:x.colorWarning,icon:ze}},Ki=e=>e.state===`failed`||e.state===`uncertain`,qi=new Set([`gif`,`screenshot`,`video`]),Ji=e=>!!e.fileUrl&&qi.has(e.type),Yi=e=>
1088e.evidence.some(Ji),W=j(({css:e})=>({caption:e`
1089    align-self: center;
1090    font-size: 12px;
1091    color: ${x.colorTextTertiary};
1092  `,chip:e`
1093    padding-inline: 6px;
1094    border-radius: 4px;
1095
1096    font-size: 11px;
1097    line-height: 18px;
1098    color: ${x.colorTextTertiary};
1099    white-space: nowrap;
1100
1101    background: ${x.colorFillTertiary};
1102  `,chipClickable:e`
1103    cursor: pointer;
1104
1105    &:hover {
1106      color: ${x.colorText};
1107      background: ${x.colorFillSecondary};
1108    }
1109  `,descClamp:e`
1110    overflow: hidden;
1111    display: -webkit-box;
1112    -webkit-box-orient: vertical;
1113    -webkit-line-clamp: 2;
1114  `,evidenceImage:e`
1115    overflow: hidden;
1116
1117    width: fit-content;
1118    max-width: 100%;
1119    border: 1px solid ${x.colorBorderSecondary};
1120    border-radius: ${x.borderRadiusLG};
1121  `,evidenceText:e`
1122    overflow: auto;
1123
1124    max-height: 200px;
1125    padding-block: 8px;
1126    padding-inline: 12px;
1127    border-radius: ${x.borderRadius};
1128
1129    font-family: ${x.fontFamilyCode};
1130    font-size: 12px;
1131    white-space: pre-wrap;
1132
1133    background: ${x.colorFillQuaternary};
1134  `,emptyCard:e`
1135    padding-block: 48px;
1136    padding-inline: 16px;
1137    border: 1px solid ${x.colorBorderSecondary};
1138    border-radius: ${x.borderRadiusLG};
1139
1140    background: ${x.colorBgContainer};
1141  `,celebrateIcon:e`
1142    @keyframes acceptance-celebrate-pop {
1143      0% {
1144        transform: scale(0.6);
1145        opacity: 0;
1146      }
1147
1148      60% {
1149        transform: scale(1.15);
1150      }
1151
1152      100% {
1153        transform: scale(1);
1154        opacity: 1;
1155      }
1156    }
1157
1158    animation: acceptance-celebrate-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
1159  `,groupCard:e`
1160    overflow: hidden;
1161    border: 1px solid ${x.colorBorderSecondary};
1162    border-radius: ${x.borderRadiusLG};
1163    background: ${x.colorBgContainer};
1164  `,groupHeader:e`
1165    cursor: pointer;
1166    padding-block: 10px;
1167    padding-inline: 16px;
1168    background: ${x.colorFillQuaternary};
1169
1170    .acceptance-group-actions {
1171      opacity: 0;
1172      transition: opacity 0.2s;
1173    }
1174
1175    &:hover {
1176      .acceptance-group-actions {
1177        opacity: 1;
1178      }
1179    }
1180  `,historyToggle:e`
1181    cursor: pointer;
1182
1183    display: inline-flex;
1184    gap: 4px;
1185    align-items: center;
1186
1187    width: fit-content;
1188
1189    font-size: 12px;
1190    color: ${x.colorTextTertiary};
1191
1192    &:hover {
1193      color: ${x.colorText};
1194    }
1195  `,row:e`
1196    border-block-start: 1px solid ${x.colorBorderSecondary};
1197  `,seqChip:e`
1198    flex: none;
1199
1200    font-family: ${x.fontFamilyCode};
1201    font-size: 11px;
1202    color: ${x.colorTextSecondary};
1203    letter-spacing: 0.02em;
1204  `,seqChipClickable:e`
1205    cursor: copy;
1206
1207    &:hover {
1208      color: ${x.colorText};
1209    }
1210  `,rowActions:e`
1211    opacity: 0;
1212    transition: opacity 0.2s;
1213  `,rowHeader:e`
1214    cursor: pointer;
1215    padding-block: 12px;
1216    padding-inline: 16px;
1217
1218    &:hover {
1219      .acceptance-row-actions {
1220        opacity: 1;
1221      }
1222    }
1223
1224    /* The hover wash marks the collapsed row as a click target. An OPEN row is
1225       in reading mode — a gray band flashing between the white body and the
1226       white page just severs the title from its content, so no wash there. */
1227    &:not([data-expanded]):hover {
1228      background: ${x.colorFillQuaternary};
1229    }
1230  `,stepDot:e`
1231    flex: none;
1232
1233    width: 9px;
1234    height: 9px;
1235    margin-block-start: 5px;
1236    border: 2px solid;
1237    border-radius: 50%;
1238
1239    background: ${x.colorBgContainer};
1240  `,stepRail:e`
1241    flex: 1;
1242    width: 1px;
1243    margin-block-start: 6px;
1244    background: ${x.colorBorderSecondary};
1245  `,titleEllipsis:e`
1246    overflow: hidden;
1247    text-overflow: ellipsis;
1248    white-space: nowrap;
1249  `})),Xi=e=>{let t={file:0,image:0,video:0};for(let n of e)n.type===`video`&&n.fileUrl?t.video+=1:Ji(n)?t.image+=1:t.file+=1;return t},Zi=[{icon:St,key:`image`,labelKey:`acceptance.evidence.image`},{icon:rt,key:`video`,labelKey:`acceptance.evidence.video`},{icon:He,key:`file`,labelKey:`acceptance.evidence.file`}],Qi=e=>!e||/^[\w.-]+\.(?:gif|jpe?g|mp4|png|webm|webp)$/i.test(e),$i=e=>e.fileWidth&&e.fileHeight?`${e.fileWidth} / ${e.fileHeight}`:void 0,ea=e=>
1249e.type===`video`?(0,U.jsx)(`video`,{controls:!0,src:e.fileUrl,style:{display:`block`,width:`100%`}}):(0,U.jsx)(se,{preview:!0,alt:e.description??e.fileName??e.type,loading:`lazy`,src:e.fileUrl,style:{aspectRatio:$i(e),borderRadius:0,width:`100%`},variant:`borderless`}),ta=(0,Vi.memo)(({evidence:e})=>{let t=[...e].sort((e,t)=>!!Ji(t)-+!!Ji(e));if(t.length===0)return null;let n=new Map;for(let e of t){if(!Ji(e))continue;let t=nr(e.metadata);if(!t)continue;let r=n.get(t.id)??{};r[t.role]=e,n.set(t.id,r)}let r=new Set([...n.values()].filter(e=>e.before&&e.after).flatMap(e=>[e.before.id,e.after.id])),i=e=>({caption:nr(e.metadata)?.label??(Qi(e.description)?void 0:e.description??void 0),content:ea(e)});return(0,U.jsx)(A,{gap:12,children:t.map(e=>{if(r.has(e.id)){let t=nr(e.metadata);if(t.role!==`before`)return null;let r=n.get(t.id);return(0,U.jsx)(ir,{after:i(r.after),before:i(r.before),layout:t.layout},t.id)}let t=!Qi(e.description)&&(0,U.jsx)(`span`,{className:W.caption,children:e.description});return e.fileUrl&&e.type===`video`?(0,U.jsxs)(A,{gap:4,style:{maxWidth:`100%`,width:`fit-content`},children:[(0,U.jsx)(`video`,{controls:!0,src:e.fileUrl,style:{borderRadius:8,maxHeight:360,maxWidth:`100%`,width:`auto`}}),t]},e.id):e.fileUrl&&qi.has(e.type)?(0,U.jsxs)(A,{gap:4,style:{maxWidth:`100%`,width:`fit-content`},children:[(0,U.jsx)(A,{className:W.evidenceImage,style:e.fileWidth&&e.fileHeight?{aspectRatio:$i(e),maxWidth:`100%`,width:e.fileWidth}:void 0,children:(0,U.jsx)(se,{alt:e.description??e.fileName??e.type,loading:`lazy`,src:e.fileUrl,variant:`borderless`,style:{borderRadius:0,maxWidth:`100%`,width:e.fileWidth&&e.fileHeight?`100%`:void 0}})}),t]},e.id):e.content?(0,U.jsxs)(A,{gap:4,children:[(0,U.jsx)(`div`,{className:W.evidenceText,children:e.content}),t]},e.id):null})})}),na=(0,Vi.memo)(({review:e})=>{let{t}=o(`verify`);return(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:6,children:[(0,U.jsx)(k,{color:x.colorTextQuaternary,icon:wt,size:13}),(0,U.jsx)(S,{fontSize:12,type:`secondary`,children:t(`acceptance.review.acceptedNote`,{time:(0,Bi.default)(e.createdAt).format(`MM-DD HH:mm`)})})]})}),ra=(0,Vi.memo)(({evidenceById:e,review:t})=>{let{t:n}=o(`verify`);if(t.action===`accept`)return(0,U.jsx)(na,{review:t});let r=new Map;for(let e of t.annotations??[]){let t=r.get(e.evidenceId)??[];t.push({comment:e.comment,rect:e.rect}),r.set(e.evidenceId,t)}return(0,U.jsxs)(A,{gap:8,children:[(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:6,children:[(0,U.jsx)(k,{color:x.colorError,icon:je,size:13}),(0,U.jsx)(S,{style:{color:x.colorError,fontSize:12},children:n(`acceptance.review.feedbackLabel`)}),(0,U.jsx)(S,{fontSize:12,type:`secondary`,children:(0,Bi.default)(t.createdAt).format(`MM-DD HH:mm`)})]}),t.comment&&(0,U.jsx)(S,{style:{fontSize:12},children:t.comment}),(0,U.jsx)(vi,{attachments:t.attachments}),[...r.entries()].map(([t,n])=>{let r=e.get(t);return r?.fileUrl?(0,U.jsx)(oi,{annotations:n,src:r.fileUrl,imageStyle:{aspectRatio:$i(r),height:r.fileHeight?Math.min(r.fileHeight,240):void 0,maxHeight:240}},t):n.filter(e=>e.comment).map((e,n)=>(0,U.jsx)(S,{fontSize:12,type:`secondary`,children:e.comment},`${t}-${n}`))})]})}),ia=e=>{let t=new Map;for(let n of e.timeline)for(let e of n.evidence)t.set(e.id,e);for(let n of e.evidence)t.set(n.id,n);return t},aa=(0,Vi.memo)(({check:e,evidenceById:t,historyReviews:n,onRound:r})=>{let{t:i}=o(`verify`),a=[...e.timeline.map(e=>({key:`run-${e.roundIndex}-${e.resultId}`,kind:`run`,roundIndex:e.roundIndex,step:e})),...n.map(e=>({key:`review-${e.id}`,kind:`review`,review:e,roundIndex:e.roundIndex}))].sort((e,t)=>e.roundIndex-t.roundIndex||(e.kind===`review`)-+(t.kind===`review`)||(e.kind===`review`&&t.kind===`review`?new Date(e.review.createdAt).getTime()-new Date(t.review.createdAt).getTime():0)).reverse();return(0,U.jsxs)(A,{children:[a.map((e,n)=>{let o=n===0,s=n===a.length-1;if(e.kind===`review`)return(0,U.jsxs)(A,{horizontal:!0,gap:12,children:[(0,U.jsxs)(A,{align:`center`,style:{flex:`none`,width:9},children:[(0,U.jsx)(`span`,{className:W.stepDot,style:{borderColor:e.review.action===`accept`?x.colorSuccess:x.colorError}}),!s&&(0,U.jsx)(`div`,{className:W.stepRail})]}),(0,U.jsx)(A,{flex:1,gap:6,style:{minWidth:0,paddingBlockEnd:s?0:20},children:(0,U.jsx)(ra,{evidenceById:t,review:e.review})})]},e.key);let{step:c}=e,l={failed:x.colorError,passed:x.colorSuccess,uncertain:x.colorWarning}[c.state]??x.colorTextQuaternary;return(0,U.jsxs)(A,{horizontal:!0,gap:12,children:[(0,U.jsxs)(A,{align:`center`,style:{flex:`none`,width:9},children:[(0,U.jsx)(`span`,{className:W.stepDot,style:{background:o?l:x.colorBgContainer,borderColor:o?l:x.colorTextQuaternary}}),!s&&(0,U.jsx)(`div`,{className:W.stepRail})]}),(0,U.jsxs)(A,{flex:1,gap:6,style:{minWidth:0,paddingBlockEnd:s?0:20},children:[(0,U.jsx)(ee,{title:i(`acceptance.history.jump`,{roun
1249d:c.roundIndex}),children:(0,U.jsx)(S,{strong:!0,style:{cursor:`pointer`,fontSize:12,lineHeight:`19px`},onClick:()=>r(c.roundIndex),children:i(`acceptance.round`,{round:c.roundIndex})})}),(0,U.jsx)(S,{style:{fontSize:12},children:c.title}),c.evidence.length>0&&(0,U.jsx)(A,{horizontal:!0,gap:8,wrap:`wrap`,children:c.evidence.map(e=>e.fileUrl&&qi.has(e.type)?(0,U.jsx)(A,{className:W.evidenceImage,children:(0,U.jsx)(se,{alt:e.description??e.type,loading:`lazy`,src:e.fileUrl,style:{borderRadius:0,maxHeight:160,maxWidth:280,width:`auto`},variant:`borderless`})},e.id):e.content?(0,U.jsx)(`div`,{className:W.evidenceText,style:{maxHeight:120,maxWidth:420},children:e.content},e.id):null)})]})]},e.key)}),e.result?.suggestion&&(0,U.jsxs)(A,{horizontal:!0,gap:12,style:{marginBlockStart:12},children:[(0,U.jsx)(S,{fontSize:12,style:{flex:`none`,minWidth:64},type:`secondary`,children:i(`acceptance.detail.suggestion`)}),(0,U.jsx)(S,{fontSize:12,type:`secondary`,children:e.result.suggestion})]})]})}),oa=(0,Vi.memo)(({canReview:e,check:t,expanded:n,onReview:r,onRound:i,onToggle:a,reviewPending:s})=>{let{t:c}=o(`verify`),[l,u]=(0,Vi.useState)(!1),[d,f]=(0,Vi.useState)(!1),[p,m]=(0,Vi.useState)(!1),h=Gi[t.state],g=Xi(t.evidence),_=Hi(t),v=e&&!!t.result,y=t.userReview&&!t.userReview.stale?t.reviews.at(-1):void 0,b=t.reviews.filter(e=>e!==y),C=ia(t),T=t.revisions>1||b.length>0,E=()=>Oi({checkTitle:`C${t.seq} · ${t.title}`,draftKey:t.id,evidence:t.evidence.filter(e=>Ji(e)).map(e=>({fileUrl:e.fileUrl,id:e.id})),onConfirm:({annotations:e,comment:n,fileIds:i})=>r({action:`reject`,annotations:e.length>0?e:void 0,checkItemIds:[t.id],comment:n||void 0,fileIds:i.length>0?i:void 0})}),D=async e=>{e.stopPropagation(),m(!0);let i=await r({action:`accept`,checkItemIds:[t.id]});m(!1),i&&n&&a()},O=_===`rejected`?je:t.state===`passed`&&_===`accepted`?Oe:h.icon,j=(0,U.jsx)(k,{color:_===`rejected`?x.colorError:h.color,icon:O,size:16,style:{flex:`none`}});return(0,U.jsxs)(A,{className:W.row,"data-check-row":t.id,children:[(0,U.jsxs)(A,{horizontal:!0,align:`center`,className:W.rowHeader,"data-expanded":n?``:void 0,gap:10,onClick:a,children:[_===`rejected`?(0,U.jsx)(ee,{title:c(`acceptance.review.rejectedHint`),children:j}):j,(0,U.jsx)(ee,{title:c(d?`acceptance.checks.copied`:`acceptance.checks.copySeq`),children:(0,U.jsxs)(`span`,{className:w(W.seqChip,W.seqChipClickable),onClick:e=>{e.stopPropagation(),ie(`C${t.seq}`),f(!0),setTimeout(()=>f(!1),1500)},children:[`C`,t.seq]})}),(0,U.jsxs)(A,{horizontal:!0,align:`center`,flex:1,gap:8,style:{minWidth:0},wrap:n?`wrap`:`nowrap`,children:[(0,U.jsx)(S,{className:n?void 0:W.titleEllipsis,style:{fontSize:13,minWidth:0},children:t.title}),!t.required&&(0,U.jsx)(ee,{title:c(`acceptance.checks.notRequiredHint`),children:(0,U.jsx)(ue,{size:`small`,children:c(`acceptance.checks.notRequired`)})}),v&&_===`pending`&&(0,U.jsxs)(A,{horizontal:!0,align:`center`,className:w(W.rowActions,`acceptance-row-actions`),gap:2,style:{...p?{opacity:1}:void 0,flex:`none`},children:[(0,U.jsx)(re,{disabled:s&&!p,icon:Pe,loading:p,size:`small`,title:c(`acceptance.review.accept`),onClick:D}),(0,U.jsx)(re,{disabled:s,icon:je,size:`small`,title:c(`acceptance.review.reject`),onClick:e=>{e.stopPropagation(),E()}})]})]}),(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:6,children:[_===`accepted`&&t.state!==`passed`&&(0,U.jsx)(ee,{title:c(`acceptance.review.acceptedNote`,{time:(0,Bi.default)(t.userReview.createdAt).format(`MM-DD HH:mm`)}),children:(0,U.jsx)(k,{color:x.colorTextQuaternary,icon:wt,size:14})}),Zi.map(({icon:e,key:t,labelKey:n})=>g[t]?(0,U.jsx)(ee,{title:c(n,{count:g[t]}),children:(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:3,style:{color:x.colorTextTertiary,fontSize:11},children:[(0,U.jsx)(k,{icon:e,size:13}),g[t]>1?g[t]:null]})},t):null),t.revisions>1&&(0,U.jsx)(ee,{title:[t.titleChanged?c(`acceptance.checks.iterated`,{count:t.revisions}):c(`acceptance.checks.rerun`,{count:t.revisions}),t.resultRound!==void 0&&t.resultRound!==null&&t.introducedAtRound!==t.resultRound?c(`acceptance.checks.introduced`,{round:t.introducedAtRound}
1249):null].filter(Boolean).join(` · `),children:(0,U.jsxs)(`span`,{className:w(W.chip,W.chipClickable),onClick:e=>{e.stopPropagation(),i(t.introducedAtRound)},children:[(0,U.jsx)(k,{icon:ot,size:10}),` `,t.revisions]})}),t.resultRound!==void 0&&t.resultRound!==null&&(0,U.jsx)(ee,{title:c(`acceptance.checks.finalRoundHint`),children:(0,U.jsx)(`span`,{className:w(W.chip,W.chipClickable),onClick:e=>{e.stopPropagation(),i(t.resultRound)},children:c(`acceptance.round`,{round:t.resultRound})})}),(0,U.jsx)(k,{color:x.colorTextQuaternary,icon:Ee,size:14,style:{transform:n?`rotate(90deg)`:`none`,transition:`transform 0.2s`}})]})]}),n&&(0,U.jsxs)(A,{gap:10,paddingBlock:`0 14px`,paddingInline:16,children:[t.result?.toulmin?.evidence&&(0,U.jsx)(S,{className:W.descClamp,fontSize:12,type:`secondary`,children:t.result.toulmin.evidence}),(0,U.jsx)(ta,{evidence:t.evidence}),t.result&&t.evidence.length===0&&(0,U.jsx)(A,{paddingBlock:6,paddingInline:10,style:{background:x.colorFillQuaternary,borderRadius:x.borderRadius,width:`100%`},children:(0,U.jsx)(S,{fontSize:12,type:`secondary`,children:c(`acceptance.evidence.empty`)})}),y&&(y.action===`accept`?(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:8,children:[(0,U.jsx)(na,{review:y}),v&&(0,U.jsx)(L,{disabled:s,size:`small`,type:`text`,onClick:e=>{e.stopPropagation(),E()},children:c(`acceptance.review.revertToReject`)})]}):(0,U.jsxs)(A,{gap:6,children:[(0,U.jsx)(ra,{evidenceById:C,review:y}),v&&(0,U.jsx)(A,{horizontal:!0,children:(0,U.jsx)(L,{disabled:s&&!p,loading:p,size:`small`,type:`text`,onClick:D,children:c(`acceptance.review.revertToAccept`)})})]})),v&&!y&&(0,U.jsxs)(A,{horizontal:!0,gap:4,justify:`flex-end`,children:[(0,U.jsx)(L,{disabled:s,size:`small`,type:`text`,onClick:e=>{e.stopPropagation(),E()},children:c(`acceptance.review.reject`)}),(0,U.jsx)(L,{disabled:s&&!p,icon:(0,U.jsx)(k,{icon:Pe}),loading:p,size:`small`,type:`fill`,onClick:D,children:c(`acceptance.review.accept`)})]}),T&&(0,U.jsxs)(`span`,{className:W.historyToggle,onClick:()=>u(e=>!e),children:[(0,U.jsx)(k,{icon:Ee,size:12,style:{transform:l?`rotate(90deg)`:`none`,transition:`transform 0.2s`}}),c(`acceptance.checks.iterationHistory`,{count:t.revisions})]}),l&&T&&(0,U.jsx)(aa,{check:t,evidenceById:C,historyReviews:b,onRound:i})]})]})}),sa=e=>{let t=Hi(e);return t===`accepted`?`accepted`:t===`rejected`?`needsFix`:`pending`},ca=(e,t)=>{let n=new Map;for(let r of e){let e=r.category?.trim(),i=e?`category:${e}`:`uncategorized`,a=e||t,o=n.get(i)??{checks:[],key:i,label:a};o.checks.push(r),n.set(i,o)}return[...n.values()]},la=(0,Vi.memo)(({canReview:e,checks:t,collapsedGroups:n,currentRound:r,expanded:i,filter:a,groupFeedback:s,onGroupFeedback:c,onReview:l,onRound:u,onToggleGroup:d,onToggleGroupItems:f,onToggleItem:p,reviewPending:m,round:h})=>{let{t:g}=o(`verify`),[_,v]=(0,Vi.useState)(null),y=e=>(a===`all`||sa(e)===a)&&(h==null||e.timeline.some(e=>e.roundIndex===h)),b=ca(t,g(`acceptance.group.uncategorized`)).map(e=>({...e,rows:e.checks.filter(y).sort((e,t)=>Wi[e.state]-Wi[t.state]||!!Yi(t)-+!!Yi(e)||e.introducedAtRound-t.introducedAtRound)})).filter(e=>e.rows.length>0);if(b.length===0){let e=a===`pending`&&Ui(t);return(0,U.jsx)(A,{align:`center`,className:W.emptyCard,gap:12,justify:`center`,children:e?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(k,{className:W.celebrateIcon,color:x.colorSuccess,icon:Xe,size:40}),(0,U.jsxs)(A,{align:`center`,gap:4,children:[(0,U.jsx)(S,{strong:!0,style:{color:x.colorSuccess,fontSize:15},children:g(`acceptance.checks.allAccepted.title`)}),(0,U.jsx)(S,{fontSize:13,type:`secondary`,children:g(`acceptance.checks.allAccepted.desc`)})]})]}):(0,U.jsx)(te,{icon:ft,description:g(a===`all`?`acceptance.checks.empty`:`acceptance.checks.emptyFilter.${a}`)})})}return(0,U.jsx)(A,{className:W.groupCard,children:b.map(({checks:t,key:a,label:o,rows:h},y)=>{let b=t.filter(e=>e.state===`passed`).length,C=n.has(a),w=h.some(e=>i.has(e.id)),T=t.filter(e=>e.result),E=T.filter(e=>Hi(e)!==`accepted`),D=T.filter(e=>Hi(e)===`accepted`).length,O=T.filter(e=>Hi(e)===`rejected`).length,j=t.filter(e=>Ki(e)).length,ee=b===t.length&&Ui(t),te=a===`uncategorized`?``:o,ne=s.filter(e=>e.category===te);return(0,U.jsxs)(Vi.Fragment,{children:[(0,U.jsxs)(A,{horizontal:!0,align:`center`,className:W.groupHeader,gap:8,style:{borderBlockStart:y>0?`1px solid ${x.colorBorderSecondary}`:`none`},onClick:()=>d(a),children:[(0,U.jsx)(S,{strong:!0,style:{fontSize:13},children:o}),ee?(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:4,style:{color:x.colorSuccess,fontSize:12},children:[(0,U.jsx)(k,{icon:wt,size:13}),g(`acceptance.group.allVerified`,{passed:b,total:t.length})]}):(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:8,children:[(0,U.jsx)(S,{fontSize:12,type:`secondary`,children:g(`acceptance.group.acceptedRatio`,{accepted:D,total:t.length})}),j>0&&(0,U.jsx)(S,{style:{color:x.colorError,fontSize:12},children:g(`acceptance.group.failedCount`,{count:j})}),O>0&&(0,U.jsx)(S,{style:{color:x.colorError,fontSize:12},children:g(`acceptance.group.rejectedCount`,{count:O})})]}),e&&T.length>0&&(E.length>0?(0,U.jsx)(L,{className:`acceptance-group-actions`,disabled:m&&_!==a,icon:(0,U.jsx)(k,{icon:wt}),loading:_===a,size:`small`,style:_===a?{opacity:1}:void 0,type:`text`,onClick:async e=>{e.stopPropagation(),v(a);let t=await l({action:`accept`,checkItemIds:E.map(e=>e.id)});v(null),t&&!C&&d(a)},children:g(`acceptance.review.acceptAll`)}):ee?null:(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:4,style:{color:x.colorSuccess,fontSize:12},children:[(0,U.jsx)(k,{icon:wt,size:13}),g(`acceptance.review.acceptAllDone`)]})),(0,U.jsx)(A,{flex:1}),e&&(0,U.jsx)(`span`,{className:`acceptance-group-actions`,children:(0,U.jsx)(re,{icon:Ve,size:`small`,title:g(`acceptance.group.feedbackAction`),onClick:e=>{e.stopPropagation(),Ri({groupLabel:o,onConfirm:(e,t)=>
1249c(te,e,t)})}})}),C?(0,U.jsx)(`div`,{style:{height:24,width:24}}):(0,U.jsx)(re,{icon:w?we:Dt,size:`small`,title:g(w?`acceptance.group.collapseItems`:`acceptance.group.expandItems`),onClick:e=>{e.stopPropagation(),f(w?h.map(e=>e.id):h.filter(e=>Hi(e)!==`accepted`).map(e=>e.id),!w)}}),(0,U.jsx)(k,{color:x.colorTextQuaternary,icon:Ee,size:14,style:{transform:C?`none`:`rotate(90deg)`,transition:`transform 0.2s`}})]}),!C&&ne.length>0&&(0,U.jsx)(A,{gap:10,paddingBlock:10,paddingInline:16,children:[...ne].reverse().map(e=>{let t=e.roundIndex<r;return(0,U.jsxs)(A,{gap:4,style:t?{opacity:.55}:void 0,children:[(0,U.jsxs)(A,{horizontal:!0,align:`center`,gap:6,children:[(0,U.jsx)(k,{color:t?x.colorTextQuaternary:x.colorError,icon:Ve,size:13}),(0,U.jsx)(S,{style:{color:t?x.colorTextTertiary:x.colorError,fontSize:12},children:g(`acceptance.group.feedbackLabel`)}),(0,U.jsx)(S,{fontSize:12,type:`secondary`,children:(0,Bi.default)(e.createdAt).format(`MM-DD HH:mm`)})]}),(0,U.jsx)(S,{style:{fontSize:12},children:e.comment}),(0,U.jsx)(vi,{attachments:e.attachments})]},`${e.createdAt}-${e.roundIndex}`)})}),!C&&h.map(t=>(0,U.jsx)(oa,{canReview:e,check:t,expanded:i.has(t.id),reviewPending:m,onReview:l,onRound:u,onToggle:()=>p(t.id)},t.id)),!C&&(0,U.jsx)(A,{align:`center`,paddingBlock:4,style:{borderBlockStart:`1px solid ${x.colorBorderSecondary}`},children:(0,U.jsx)(L,{icon:(0,U.jsx)(k,{icon:we}),size:`small`,style:{color:x.colorTextTertiary},type:`text`,onClick:()=>d(a),children:g(`acceptance.group.collapse`,{label:o})})})]},a)})})}),la.displayName=`AcceptanceCheckList`})),da,G,fa,pa,ma,ha=e((()=>{M(),Pt(),D(),I(),da=t(v()),r(),G=t(m()),fa=j(({css:e})=>({bar:e`
1250    position: sticky;
1251    z-index: 20;
1252    inset-block-end: 16px;
1253
1254    display: flex;
1255    gap: 10px;
1256    align-items: center;
1257
1258    padding-block: 12px;
1259    padding-inline: 16px;
1260    border: 1px solid ${x.colorBorderSecondary};
1261    border-radius: 14px;
1262
1263    background: ${x.colorBgElevated};
1264    box-shadow: ${x.boxShadowTertiary};
1265  `,completePop:e`
1266    @keyframes acceptance-decision-complete-pop {
1267      0% {
1268        transform: scale(0.5);
1269        opacity: 0;
1270      }
1271
1272      55% {
1273        transform: scale(1.18);
1274      }
1275
1276      100% {
1277        transform: scale(1);
1278        opacity: 1;
1279      }
1280    }
1281
1282    animation: acceptance-decision-complete-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
1283  `})),pa=(0,da.memo)(({done:e,total:t})=>{let n=2*Math.PI*9,r=t>0?Math.min(e/t,1):0;return e<=0?(0,G.jsx)(`svg`,{height:20,style:{flex:`none`},width:20,children:(0,G.jsx)(`circle`,{cx:20/2,cy:20/2,fill:`none`,r:9,stroke:x.colorTextQuaternary,strokeDasharray:`3 5`,strokeLinecap:`round`,strokeWidth:2})}):(0,G.jsxs)(`div`,{style:{flex:`none`,height:20,position:`relative`,width:20},children:[(0,G.jsxs)(`svg`,{height:20,width:20,children:[(0,G.jsx)(`circle`,{cx:20/2,cy:20/2,fill:`none`,r:9,stroke:x.colorFillSecondary,strokeWidth:2}),(0,G.jsx)(`circle`,{cx:20/2,cy:20/2,fill:`none`,r:9,stroke:x.colorPrimary,strokeDasharray:`${n*r} ${n}`,strokeLinecap:`round`,strokeWidth:2,style:{transition:`stroke-dasharray 0.3s ease`},transform:`rotate(-90 ${20/2} ${20/2})`})]}),(0,G.jsx)(A,{align:`center`,justify:`center`,style:{fontSize:10,fontVariantNumeric:`tabular-nums`,inset:0,position:`absolute`},children:(0,G.jsx)(`span`,{style:{color:x.colorTextSecondary,fontWeight:600},children:e})})]})}),pa.displayName=`AcceptanceProgressRing`,ma=(0,da.memo)(({acceptedCount:e,embedded:t,feedbackCount:n,needsFixCount:r,onAccept:i,onCopyReview:a,onOpenFeedback:s,onRejectComment:c,onRerun:l,pending:u,repairing:d,rerunAvailable:f,rerunPending:p,state:m,statusText:h,subText:g,totalCount:_})=>{let{t:v}=o(`verify`),y={accepted:{color:x.colorSuccess,icon:wt},live:d?{color:x.colorWarning,icon:qe}:{color:x.colorInfo,icon:Re},rejected:{color:x.colorError,icon:ut},settled:null}[m],b=_>0&&e>=_,C=n>0,w=e+r,T=m===`settled`&&!b&&w>=_&&r>0,E=b||T,D=(0,da.useRef)(null),O=D.current===!1&&E;return(0,da.useEffect)(()=>{D.current=E},[E]),(0,G.jsxs)(`div`,{className:fa.bar,children:[y?(0,G.jsx)(k,{color:y.color,icon:y.icon,size:22,spin:m===`live`,style:{flex:`none`}}):b?(0,G.jsx)(k,{className:O?fa.completePop:void 0,color:x.colorSuccess,icon:wt,size:22,style:{flex:`none`}}):T?(0,G.jsx)(k,{className:O?fa.completePop:void 0,color:x.colorWarning,icon:Ue,size:22,style:{flex:`none`}}):(0,G.jsx)(pa,{done:w,total:_}),(0,G.jsxs)(A,{gap:2,style:{flex:1,minWidth:0},children:[(0,G.jsx)(S,{ellipsis:!0,strong:!0,style:{fontSize:14},children:h}),g&&(0,G.jsx)(S,{ellipsis:!0,fontSize:12,type:`secondary`,children:g})]}),n>0&&(0,G.jsx)(L,{icon:(0,G.jsx)(k,{icon:st}),size:`small`,style:{flex:`none`},type:`text`,onClick:s,children:v(`acceptance.bar.feedback`,{count:n})}),m===`live`&&C&&!t&&(0,G.jsx)(L,{disabled:u,style:{flex:`none`},type:`fill`,onClick:a,children:v(`acceptance.bar.copyReview`)}),m===`settled`&&(C?(0,G.jsxs)(G.Fragment,{children:[!t&&(0,G.jsx)(L,{disabled:u,style:{flex:`none`},type:`fill`,onClick:a,children:v(`acceptance.bar.copyReview`)}),f&&(0,G.jsx)(L,{disabled:u,loading:p,style:{flex:`none`},type:`primary`,onClick:l,children:v(`acceptance.bar.rerun`)})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(L,{disabled:u,style:{flex:`none`},type:`text`,onClick:c,children:v(`acceptance.bar.rejectComment`)}),(0,G.jsx)(L,{disabled:u,style:{flex:`none`},type:b?`primary`:`fill`,onClick:i,children:v(`acceptance.actions.accept`)})]}))]})}),ma.displayName=`AcceptanceDecisionBar`})),ga,_a,va=e((()=>{ga=new Set,_a=(e,t,n)=>{let r=t??``,i=e.get(r)??ga,a=typeof n==`function`?n(i):n;
1283if(a===i)return e;let o=new Map(e);return o.set(r,a),o}})),ya,ba,K,xa,Sa,Ca,wa=e((()=>{M(),D(),ya=t(n()),ba=t(v()),r(),yi(),K=t(m()),xa=j(({css:e})=>({clickable:e`
1284    cursor: pointer;
1285
1286    &:hover {
1287      background: ${x.colorFillQuaternary};
1288    }
1289  `,meta:e`
1290    flex: none;
1291    font-size: 11px;
1292    color: ${x.colorTextQuaternary};
1293    white-space: nowrap;
1294  `,row:e`
1295    padding-block: 20px;
1296    padding-inline: 8px;
1297    border-block-end: 1px solid ${x.colorBorderSecondary};
1298    border-radius: ${x.borderRadius};
1299
1300    &:last-child {
1301      border-block-end: none;
1302    }
1303  `,sectionTitle:e`
1304    font-size: 12px;
1305    font-weight: 500;
1306    color: ${x.colorTextTertiary};
1307    letter-spacing: 0.04em;
1308  `,seq:e`
1309    flex: none;
1310    font-family: ${x.fontFamilyCode};
1311    font-size: 11px;
1312    color: ${x.colorTextSecondary};
1313  `})),Sa=(0,ba.memo)(({entry:e,onJumpToCheck:t})=>{let{t:n}=o(`verify`),r=e.kind===`check`,i=[e.annotationCount?n(`acceptance.feedback.annotations`,{count:e.annotationCount}):null,`${n(`acceptance.round`,{round:e.roundIndex})} · ${(0,ya.default)(e.createdAt).format(`MM-DD HH:mm`)}`].filter(Boolean);return(0,K.jsxs)(A,{className:w(xa.row,e.checkId&&xa.clickable),gap:8,style:e.stale?{opacity:.55}:void 0,onClick:e.checkId?()=>t(e.checkId):void 0,children:[(0,K.jsxs)(A,{horizontal:!0,align:`center`,gap:6,children:[r?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:xa.seq,children:[`C`,e.checkSeq]}),(0,K.jsx)(S,{ellipsis:!0,style:{fontSize:13,minWidth:0},children:e.title})]}):(0,K.jsx)(S,{ellipsis:!0,style:{fontSize:13,minWidth:0},children:e.groupLabel?n(`acceptance.feedback.group`,{label:e.groupLabel}):n(`acceptance.feedback.global`)}),(0,K.jsx)(A,{flex:1}),(0,K.jsx)(`span`,{className:xa.meta,children:i.join(` · `)})]}),e.comment&&(0,K.jsx)(S,{style:{fontSize:12},type:`secondary`,children:e.comment}),(0,K.jsx)(vi,{attachments:e.attachments})]})}),Ca=(0,ba.memo)(({entries:e,onClose:t,onJumpToCheck:n,open:r})=>{let{t:i}=o(`verify`),a=e.filter(e=>!e.stale),s=e.filter(e=>e.stale);return(0,K.jsx)(he,{open:r,placement:`right`,title:i(`acceptance.feedback.title`),width:`min(92vw, 440px)`,onClose:t,children:(0,K.jsxs)(A,{gap:20,children:[(0,K.jsxs)(A,{gap:4,children:[(0,K.jsx)(S,{className:xa.sectionTitle,children:i(`acceptance.feedback.current`,{count:a.length})}),a.length===0&&(0,K.jsx)(S,{fontSize:12,type:`secondary`,children:i(`acceptance.feedback.empty`)}),(0,K.jsx)(A,{children:a.map((e,t)=>(0,K.jsx)(Sa,{entry:e,onJumpToCheck:n},t))})]}),s.length>0&&(0,K.jsxs)(A,{gap:4,children:[(0,K.jsx)(S,{className:xa.sectionTitle,children:i(`acceptance.feedback.history`,{count:s.length})}),(0,K.jsx)(A,{children:s.map((e,t)=>(0,K.jsx)(Sa,{entry:e,onJumpToCheck:n},t))})]})]})})}),Ca.displayName=`AcceptanceFeedbackDrawer`})),Ta,Ea,q,Da,Oa,ka,Aa,ja=e((()=>{M(),D(),Ta=t(n()),I(),Ea=t(v()),r(),q=t(m()),Da=j(({css:e})=>({countBadge:e`
1314    padding-block: 1px;
1315    padding-inline: 7px;
1316    border-radius: 99px;
1317
1318    font-size: 12px;
1319    font-variant-numeric: tabular-nums;
1320    color: ${x.colorTextSecondary};
1321
1322    background: ${x.colorFillTertiary};
1323  `,round:e`
1324    padding-block: 10px;
1325    padding-inline: 12px;
1326    border: 1px solid ${x.colorBorderSecondary};
1327    border-radius: ${x.borderRadius};
1328
1329    transition:
1330      box-shadow 0.2s ease,
1331      border-color 0.2s ease;
1332  `,roundActive:e`
1333    border-color: ${x.colorPrimary};
1334    box-shadow: 0 0 0 2px ${x.colorPrimaryBg};
1335  `,roundClickable:e`
1336    cursor: pointer;
1337
1338    .acceptance-round-open-hint {
1339      opacity: 0;
1340      transition: opacity 0.2s ease;
1341    }
1342
1343    &:hover {
1344      border-color: ${x.colorBorder};
1345      background: ${x.colorFillQuaternary};
1346
1347      .acceptance-round-open-hint {
1348        opacity: 1;
1349      }
1350    }
1351  `})),Oa={errored:{color:x.colorWarning,icon:Ue},repairing:{color:x.colorWarning,icon:qe},verifying:{color:x.colorInfo,icon:Re}},ka=e=>{let t=e.run.status;return t===`verifying`||t===`repairing`||t===`errored`?!0:!e.report&&t!==`passed`&&t!==`failed`},Aa=(0,Ea.memo)(({hideCollapse:e,highlight:t,onCollapse:n,onOpenReport:r,reviewByRound:i,rounds:a})=>{let{t:s}
1351=o(`verify`),c=a.at(-1)?.run.roundIndex;return(0,q.jsxs)(A,{gap:12,padding:16,children:[(0,q.jsxs)(A,{horizontal:!0,align:`center`,gap:8,children:[(0,q.jsx)(k,{color:x.colorTextSecondary,icon:Ne,size:16}),(0,q.jsx)(S,{strong:!0,style:{fontSize:13},children:s(`acceptance.ledger.title`)}),(0,q.jsx)(`span`,{className:Da.countBadge,children:a.length}),(0,q.jsx)(A,{flex:1}),!e&&(0,q.jsx)(re,{icon:nt,size:`small`,title:s(`acceptance.ledger.collapse`),onClick:n})]}),[...a].reverse().map(e=>{let n=ka(e),a=e.run.status??`verifying`,o=n?Oa[a]??Oa.verifying:null,l=e.run.roundIndex==null?void 0:i.get(e.run.roundIndex),u=l?.total??0,d=l?.accepted??0,f=u>0&&d>=u,p=o?o.color:f?x.colorSuccess:x.colorTextTertiary,m=o?o.icon:f?Ke:tt,h=o?s(`acceptance.roundStatus.${a}`,{defaultValue:a}):s(f?`acceptance.ledger.accepted`:`acceptance.ledger.pending`),g=n||u===0?null:d>0?s(`acceptance.ledger.acceptedStats`,{accepted:d,total:u}):s(`acceptance.ledger.awaitingStats`,{total:u}),_=!!e.report;return(0,q.jsxs)(A,{"aria-label":_?s(`acceptance.ledger.viewReport`):void 0,gap:6,role:_?`button`:void 0,className:w(Da.round,_&&Da.roundClickable,t===e.run.roundIndex&&Da.roundActive),onClick:_?()=>r(e):void 0,children:[(0,q.jsxs)(A,{horizontal:!0,align:`center`,gap:8,children:[(0,q.jsx)(S,{strong:!0,style:{fontSize:13},children:s(`acceptance.round`,{round:e.run.roundIndex})}
1351),e.run.roundIndex===c&&(0,q.jsx)(S,{fontSize:12,type:`secondary`,children:s(`acceptance.ledger.latest`)}),(0,q.jsxs)(A,{horizontal:!0,align:`center`,gap:4,style:{color:p,fontSize:12},children:[(0,q.jsx)(k,{icon:m,size:13,spin:n}),h]}),(0,q.jsx)(A,{flex:1}),(0,q.jsx)(S,{fontSize:12,type:`secondary`,children:(0,Ta.default)(e.run.createdAt).format(`MM-DD HH:mm`)}),_&&(0,q.jsx)(k,{className:`acceptance-round-open-hint`,color:x.colorTextTertiary,icon:Ee,size:14})]}),e.run.title&&(0,q.jsx)(S,{fontSize:12,style:{lineHeight:1.5},type:`secondary`,children:e.run.title}),g&&(0,q.jsx)(S,{fontSize:12,type:`secondary`,children:g})]},e.run.id)})]})}),Aa.displayName=`AcceptanceLedgerPanel`})),Ma,J,Y,Na,Pa,Fa,Ia,La=e((()=>{M(),Pt(),D(),Ma=t(n()),I(),J=t(v()),r(),ye(),mn(),Zn(),Ut(),Gt(),hn(),Sn(),ti(),ua(),ha(),va(),wa(),ja(),zi(),Y=t(m()),Na=e=>`Use the LobeHub CLI to read the latest review feedback for acceptance ${e}:
1352
1353lh acceptance feedback ${e} --actionable
1354
1355Every entry it prints (per-check comments, circled-region annotations on the evidence screenshots, and attachments) is the full set of feedback to handle this round. Fix the code item by item; then re-run verification and ingest the new result back into the SAME acceptance (reuse the existing check ids, and use supersedes for any check whose meaning changed). Keep the final report in the same language the previous rounds used.`,Pa=j(({css:e})=>({banner:e`
1356    padding-block: 12px;
1357    padding-inline: 16px;
1358    border-radius: ${x.borderRadiusLG};
1359  `,card:e`
1360    overflow: hidden;
1361    border: 1px solid ${x.colorBorderSecondary};
1362    border-radius: ${x.borderRadiusLG};
1363    background: ${x.colorBgContainer};
1364  `,countBadge:e`
1365    padding-block: 1px;
1366    padding-inline: 7px;
1367    border-radius: 99px;
1368
1369    font-size: 12px;
1370    color: ${x.colorTextSecondary};
1371
1372    background: ${x.colorFillTertiary};
1373  `,ledgerToggle:e`
1374    position: absolute;
1375    z-index: 10;
1376    inset-block-start: 16px;
1377    inset-inline-end: 16px;
1378
1379    border: 1px solid ${x.colorBorderSecondary};
1380
1381    background: ${x.colorBgContainer};
1382
1383    &:hover {
1384      border-color: ${x.colorBorder};
1385    }
1386  `,page:e`
1387    position: relative;
1388
1389    overflow: hidden;
1390
1391    /* AppTheme's root is a centered flex column — without an explicit width the page
1392       shrinks to content width and the ledger hugs the shrunken edge, not the viewport */
1393    width: 100%;
1394    height: 100%;
1395
1396    background: ${x.colorBgContainer};
1397  `,requirementLabel:e`
1398    font-size: 12px;
1399    font-weight: 500;
1400    color: ${x.colorTextTertiary};
1401    letter-spacing: 0.04em;
1402  `,scopeChip:e`
1403    font-size: 12px;
1404    color: ${x.colorTextSecondary};
1405  `,scopeLink:e`
1406    cursor: pointer;
1407    color: ${x.colorTextSecondary};
1408
1409    &:hover {
1410      color: ${x.colorText};
1411      text-decoration: underline;
1412    }
1413  `,viewReportLink:e`
1414    cursor: pointer;
1415    font-size: 12px;
1416    color: ${x.colorTextQuaternary};
1417
1418    &:hover {
1419      color: ${x.colorTextSecondary};
1420    }
1421  `,summaryClamp:e`
1422    overflow: hidden;
1423    display: -webkit-box;
1424    -webkit-box-orient: vertical;
1425    -webkit-line-clamp: 3;
1426  `,verdictPill:e`
1427    display: inline-flex;
1428    gap: 5px;
1429    align-items: center;
1430
1431    padding-block: 2px;
1432    padding-inline: 10px;
1433    border-radius: 99px;
1434
1435    font-size: 12px;
1436    font-weight: 500;
1437  `})),Fa=new Set([`pending`,`planned`,`verifying`,`repairing`]),Ia=(0,J.memo)(({acceptanceId:e,onDraftToComposer:t})=>{let n=Ce(),r=e??n.acceptanceId,i=!!e,{t:a}=o(`verify`),{data:s,error:c,isLoading:l,mutate:u}=gn(r??null),{lg:d=!0}=C(),f=!d,p=i||f,[m,h]=xe(),[g,_]=(0,J.useState)(`all`),v=m.get(`filter`),y=[`all`,`pending`,`needsFix`,`accepted`].includes(v)?v:`all`,T=i?g:y,E=e=>{if(i){_(e);return}h(t=>{let n=new URLSearchParams(t);return e===`all`?n.delete(`filter`):n.set(`filter`,e),n},{replace:!0})},[D,j]=(0,J.useState)(null),[ee,ne]=(0,J.useState)(()=>new Map),[ae,se]=(0,J.useState)(()=>new Map),ce=ee.get(r??``)??ga,le=ae.get(r??``)??ga,fe=(0,J.useCallback)(e=>ne(t=>_a(t,r,e)),[r]),M=(0,J.useCallback)(e=>se(t=>_a(t,r,e)),[r]),pe=(0,J.useRef)(new Set),[me,ge]=(0,J.useState)(null),[_e,ve]=(0,J.useState)(!i);(0,J.useEffect)(()=>{f&&ve(!1)},[f]);let[ye,be]=(0,J.useState)(null),[Se,Te]=(0,J.useState)(!1),[Ee,Oe]=(0,J.useState)(!1),[ke,Ae]=(0,J.useState)(),[je,Me]=(0,J.useState)(!1),Ne=s?.acceptance.status;(0,J.useEffect)(()=>
1437{if(!Ne||!Fa.has(Ne))return;let e=setInterval(()=>void u(),5e3);return()=>clearInterval(e)},[Ne,u]),(0,J.useEffect)(()=>{if(!s||s.checks.length===0||pe.current.has(r??``))return;pe.current.add(r??``),fe(new Set(s.checks.filter(e=>Hi(e)!==`accepted`&&(Ki(e)||Yi(e))).map(e=>e.id))),M(new Set(ca(s.checks,a(`acceptance.group.uncategorized`)).filter(e=>Ui(e.checks)).map(e=>e.key)));let e=s.rounds.length>1?`pending`:`all`;i?_(e):!v&&e!==`all`&&h(t=>{let n=new URLSearchParams(t);return n.set(`filter`,e),n},{replace:!0})},[s,r,a,i,v,h,fe,M]);let N=(0,J.useMemo)(()=>{let e=s?.checks??[];return{accepted:e.filter(e=>sa(e)===`accepted`).length,exceptions:e.filter(e=>Ki(e)).length,failed:e.filter(e=>e.state===`failed`).length,needsFix:e.filter(e=>sa(e)===`needsFix`).length,notExecuted:e.filter(e=>e.state===`not_executed`).length,passed:e.filter(e=>e.state===`passed`).length,pending:e.filter(e=>sa(e)===`pending`).length,total:e.length,uncertain:e.filter(e=>e.state===`uncertain`).length}},[s]);if(l)return(0,Y.jsx)(O,{height:`100%`,children:(0,Y.jsx)(cn,{size:48})});if(c||!s)return(0,Y.jsx)(O,{height:`100%`,children:(0,Y.jsx)(te,{description:a(`acceptance.error.description`),title:a(`acceptance.error.title`),children:(0,Y.jsx)(L,{onClick:()=>void u(),children:a(`report.actions.retry`)})})});let{acceptance:P,checks:Pe,isOwner:Fe,latestReport:Ie,origin:F,rounds:Ve,subject:He}=s,Ue=Ve.at(-1),We=Ve.flatMap(e=>(e.run.decisionDetail?.groupFeedback??[]).map(t=>({...t,roundIndex:e.run.roundIndex??0}))),Ke=[...Ve].reverse().find(e=>(e.run.scenario??`coding`)===`coding`&&e.run.context)?.run.context,I=ca(Pe,a(`acceptance.group.uncategorized`)).map(e=>e.key),Je=I.length>0&&I.every(e=>le.has(e)),Ye=[a(`acceptance.stats.passed`,{count:N.passed}),N.uncertain>0?a(`acceptance.stats.uncertain`,{count:N.uncertain}):null,N.failed>0?a(`acceptance.stats.failed`,{count:N.failed}):null,N.notExecuted>0?a(`acceptance.stats.notExecuted`,{count:N.notExecuted}):null].filter(Boolean).join(` · `),Xe=P.status===`repairing`?{bg:x.colorWarningBg,color:x.colorWarning,icon:qe,label:a(`acceptance.status.repairing`),spin:!0}:Fa.has(P.status)?{bg:x.colorInfoBg,color:x.colorInfo,icon:Re,label:a(`acceptance.status.${P.status}`),spin:!0}:P.status===`accepted`?{bg:x.colorSuccessBg,color:x.colorSuccess,icon:wt,label:a(`acceptance.status.accepted`)}:P.status===`rejected`?{bg:x.colorErrorBg,color:x.colorError,icon:ut,label:a(`acceptance.status.rejected`)}:P.status===`errored`?{bg:x.colorWarningBg,color:x.colorWarning,icon:ze,label:a(`acceptance.status.errored`)}:{bg:x.colorInfoBg,color:x.colorInfo,icon:ft,label:a(`acceptance.verdict.inProgress`)},Ze=async e=>{try{return Te(!0),Ae(void 0),await e(),await u(),Ht(Kt.acceptances()),!0}catch(e){return Ae(e instanceof Error?e.message:a(`acceptance.actionError`)),!1}finally{Te(!1)}},Qe=e=>{ge(e),ve(!0)},$e=e=>Ze(()=>dn.reviewChecks({id:P.id,...e})),et=(e,t,n)=>Ze(()=>dn.addGroupFeedback({category:e,comment:t,fileIds:n.length>0?n:void 0,id:P.id})),tt=Fa.has(P.status)?`live`:P.status===`accepted`?`accepted`:P.status===`rejected`?`rejected`:`settled`,nt=Pe.filter(e=>e.result),rt=nt.length,it=nt.filter(e=>sa(e)===`accepted`).length,at=nt.filter(e=>sa(e)===`needsFix`).length,ot=rt-it-at,st=it+at,ct=(()=>{let e=new Map;for(let t of nt){let n=t.resultRound;if(n==null)continue;let r=e.get(n)??{accepted:0,total:0};r.total+=1,sa(t)===`accepted`&&(r.accepted+=1),e.set(n,r)}return e})(),lt={accepted:{statusText:a(`acceptance.banner.accepted`,{time:P.completedAt?(0,Ma.default)(P.completedAt).format(`YYYY-MM-DD HH:mm`):``}),subText:`${Ye} · ${a(`acceptance.banner.acceptedHint`,{count:Ve.length})}`},live:{statusText:a(`acceptance.status.${P.status}`),subText:a(`acceptance.banner.liveHint`)},rejected:{statusText:a(`acceptance.banner.rejected`),subText:Ue?.run.decisionDetail?.comment??a(`acceptance.banner.rejectedHint`)},settled:st===0?{statusText:a(`acceptance.bar.progressZero`,{total:rt}),subText:void 0}:ot===0?at===0?{statusText:a(`acceptance.bar.progressDone`,{total:rt}),subText:void 0}:{statusText:a(`acceptance.bar.needsFix`,{count:at}),subText:void 0}:{statusText:a(`acceptance.bar.progress`,{done:st,rest:ot,total:rt}),subText:void 0}}
1437[tt],dt=Ue?.run.roundIndex??0,pt=[...Pe.flatMap(e=>e.reviews.filter(e=>e.action===`reject`).map(t=>({annotationCount:t.annotations?.length||void 0,attachments:t.attachments,checkId:e.id,checkSeq:e.seq,comment:t.comment??``,createdAt:t.createdAt,kind:`check`,roundIndex:t.roundIndex,stale:t.roundIndex<dt,title:e.title}))),...We.map(e=>({attachments:e.attachments,comment:e.comment,createdAt:e.createdAt,groupLabel:e.category,kind:`group`,roundIndex:e.roundIndex,stale:e.roundIndex<dt}))].sort((e,t)=>t.createdAt.localeCompare(e.createdAt)),mt=pt.filter(e=>!e.stale).length,ht=e=>{Me(!1),fe(t=>new Set(t).add(e)),setTimeout(()=>{document.querySelector(`[data-check-row="${e}"]`)?.scrollIntoView({behavior:`smooth`,block:`center`})},80)},gt=()=>Pi({exceptions:Pe.filter(e=>Ki(e)).map(e=>e.title),onConfirm:()=>Ze(()=>dn.acceptDelivery(P.id)),subjectTitle:He.title??He.id}),_t=()=>Ii({onConfirm:e=>Ze(()=>dn.rejectDelivery(P.id,e))}),vt=Na(P.id),yt=async()=>{await ie(vt),b.success({placement:`bottom`,style:{marginBlockEnd:88},title:a(`acceptance.bar.copied`)})},bt=async()=>{if(i){t?.(vt)&&b.success({placement:`bottom`,style:{marginBlockEnd:88},title:a(`acceptance.bar.rerunDrafted`)});return}if(F?.topic){Oe(!0);try{await dn.dispatchAcceptanceRepair({agentId:F.agent?.id,content:vt,topicId:F.topic.id}),await dn.markAcceptanceRepairing(P.id),await u(),Ht(Kt.acceptances()),b.success({placement:`bottom`,style:{marginBlockEnd:88},title:a(`acceptance.bar.rerunSent`)})}catch(e){b.error(e instanceof Error?e.message:a(`acceptance.actionError`))}finally{Oe(!1)}}};return(0,Y.jsxs)(A,{horizontal:!0,className:Pa.page,children:[!_e&&(0,Y.jsx)(re,{className:Pa.ledgerToggle,icon:De,size:`small`,title:a(`acceptance.ledger.expand`),onClick:()=>ve(!0)}),(0,Y.jsx)(A,{flex:1,style:{minWidth:0,overflow:`auto`},children:(0,Y.jsxs)(A,{gap:16,paddingBlock:20,paddingInline:24,style:{margin:`0 auto`,maxWidth:920,width:`100%`},children:[(0,Y.jsxs)(A,{gap:10,children:[(0,Y.jsxs)(A,{horizontal:!0,align:`center`,gap:10,wrap:`wrap`,children:[(0,Y.jsxs)(`span`,{className:Pa.verdictPill,style:{background:Xe.bg,color:Xe.color},children:[(0,Y.jsx)(k,{icon:Xe.icon,size:13,spin:Xe.spin}),Xe.label]}),(0,Y.jsx)(S,{fontSize:12,type:`secondary`,children:[Ye,a(`acceptance.roundCount`,{count:Ve.length}),Ue?a(`acceptance.verdict.latestAt`,{time:(0,Ma.default)(Ue.run.createdAt).format(`MM-DD HH:mm`)}):null].filter(Boolean).join(` · `)})]}),(0,Y.jsxs)(A,{horizontal:!0,align:`center`,gap:10,children:[(0,Y.jsx)(S,{as:`h1`,style:{fontSize:18,margin:0},children:He.title??He.id}),(0,Y.jsx)(ue,{size:`small`,children:a(`acceptance.subject.${He.type}`)})]}),!i&&(F?.agent||F?.topic)&&(0,Y.jsxs)(A,{horizontal:!0,align:`center`,gap:16,wrap:`wrap`,children:[F.agent&&(0,Y.jsx)(Xn,{agentId:F.agent.id,trigger:`hover`,agent:{avatar:F.agent.avatar??void 0,backgroundColor:F.agent.backgroundColor??void 0,title:F.agent.title??void 0},children:(0,Y.jsxs)(A,{horizontal:!0,align:`center`,className:Pa.scopeChip,gap:6,style:{cursor:`default`,fontSize:14},children:[(0,Y.jsx)(oe,{avatar:F.agent.avatar??void 0,background:F.agent.backgroundColor??void 0,size:18}),F.agent.title??a(`acceptance.origin.agentFallback`)]})}),F.topic&&(0,Y.jsxs)(A,{horizontal:!0,align:`center`,className:w(Pa.scopeChip,Pa.scopeLink),gap:4,style:{fontSize:14},title:a(`acceptance.origin.openTopic`),onClick:()=>window.open(F.agent?`/agent/${F.agent.id}/${F.topic.id}`:`/chat?topic=${F.topic.id}`,`_blank`),children:[(0,Y.jsx)(k,{icon:Be,size:13}),F.topic.title??He.title??F.topic.id,(0,Y.jsx)(k,{icon:Le,size:12})]})]})]}),ke&&(0,Y.jsx)(S,{type:`danger`,children:ke}),(0,Y.jsxs)(A,{className:Pa.card,gap:12,padding:16,children:[(0,Y.jsxs)(A,{gap:4,children:[(0,Y.jsx)(S,{className:Pa.requirementLabel,children:a(`acceptance.requirementLabel`)}),(0,Y.jsx)(S,{style:{fontSize:15,lineHeight:1.7},children:P.requirement??a(`acceptance.requirementEmpty`)})]}),(Ie?.summary||Ke)&&(0,Y.jsxs)(A,{gap:8,paddingBlock:`12px 0`,style:{borderBlockStart:`1px solid ${x.colorBorderSecondary}`},children:[(0,Y.jsxs)(A,{horizontal:!0,align:`center`,gap:8,children:[(0,Y.jsxs)(S,{fontSize:12,type:`secondary`,children:[a(`acceptance.latestSummary`),Ue?` · ${a(`acceptance.round`,{round:Ue.run.roun
1437dIndex})}`:``]}),(0,Y.jsx)(A,{flex:1}),Ie&&(0,Y.jsx)(`span`,{className:Pa.viewReportLink,onClick:()=>be([...Ve].reverse().find(e=>e.report)??null),children:a(`acceptance.viewFullReport`)})]}),Ie?.summary&&(0,Y.jsx)(S,{className:Pa.summaryClamp,fontSize:13,type:`secondary`,children:Ie.summary}),Ke&&(0,Y.jsxs)(A,{horizontal:!0,align:`center`,gap:16,wrap:`wrap`,children:[Ke.branch&&(0,Y.jsxs)(A,{horizontal:!0,align:`center`,className:Pa.scopeChip,gap:4,children:[(0,Y.jsx)(k,{icon:Ct,size:13}),` `,Ke.branch]}),Ke.commit&&(0,Y.jsxs)(A,{horizontal:!0,align:`center`,className:Pa.scopeChip,gap:4,children:[(0,Y.jsx)(k,{icon:Et,size:13}),` `,Ke.commit.slice(0,10)]}),Ke.pullRequest?.number&&(Ke.pullRequest.url?(0,Y.jsx)(`a`,{className:w(Pa.scopeChip,Pa.scopeLink),href:Ke.pullRequest.url,rel:`noreferrer`,target:`_blank`,title:Ke.pullRequest.title??Ke.pullRequest.url,children:(0,Y.jsxs)(A,{horizontal:!0,align:`center`,gap:4,children:[(0,Y.jsx)(k,{icon:Ge,size:13}),` #`,Ke.pullRequest.number]})}):(0,Y.jsxs)(A,{horizontal:!0,align:`center`,className:Pa.scopeChip,gap:4,children:[(0,Y.jsx)(k,{icon:Ge,size:13}),` #`,Ke.pullRequest.number]}))]})]})]}),(0,Y.jsxs)(A,{horizontal:!0,align:`center`,gap:8,wrap:p?`nowrap`:`wrap`,children:[(0,Y.jsx)(S,{strong:!0,style:{fontSize:14,whiteSpace:`nowrap`},children:a(`acceptance.checks.title`)}),(0,Y.jsx)(`span`,{className:Pa.countBadge,children:N.total}),(0,Y.jsx)(A,{flex:1}),p?(0,Y.jsx)(Mt,{size:`small`,style:{height:34,width:118},value:T,variant:`filled`,options:[{label:a(`acceptance.filter.all`,{count:N.total}),value:`all`},{label:a(`acceptance.filter.pending`,{count:N.pending}),value:`pending`},{label:a(`acceptance.filter.needsFix`,{count:N.needsFix}),value:`needsFix`},{label:a(`acceptance.filter.accepted`,{count:N.accepted}),value:`accepted`}],onChange:e=>E(e)}):(0,Y.jsx)(Ft,{size:`small`,value:T,options:[{label:a(`acceptance.filter.all`,{count:N.total}),value:`all`},{label:a(`acceptance.filter.pending`,{count:N.pending}),value:`pending`},{label:a(`acceptance.filter.needsFix`,{count:N.needsFix}),value:`needsFix`},{label:a(`acceptance.filter.accepted`,{count:N.accepted}),value:`accepted`}],onChange:e=>E(e)}),Ve.length>1&&(0,Y.jsx)(Mt,{size:`small`,style:{height:34,width:110},value:D===null?`all`:String(D),variant:`filled`,options:[{label:a(`acceptance.filter.roundAll`),value:`all`},...[...Ve].reverse().map(e=>({label:a(`acceptance.round`,{round:e.run.roundIndex}),value:String(e.run.roundIndex)}))],onChange:e=>j(e===`all`?null:Number(e))}),(0,Y.jsx)(re,{icon:Je?Dt:we,size:`small`,title:a(Je?`acceptance.group.expandAll`:`acceptance.group.collapseAll`),onClick:()=>M(Je?new Set:new Set(I))})]}),(0,Y.jsx)(la,{canReview:Fe,checks:Pe,collapsedGroups:le,currentRound:Ue?.run.roundIndex??0,expanded:ce,filter:T,groupFeedback:We,reviewPending:Se,round:D,onGroupFeedback:et,onReview:$e,onRound:Qe,onToggleGroup:e=>M(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onToggleGroupItems:(e,t)=>fe(n=>{let r=new Set(n);for(let n of e)t?r.add(n):r.delete(n);return r}),onToggleItem:e=>fe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}),Fe&&(0,Y.jsx)(ma,{acceptedCount:it,embedded:i,feedbackCount:mt,needsFixCount:at,pending:Se,repairing:P.status===`repairing`,rerunAvailable:i||!!F?.topic,rerunPending:Ee,state:tt,statusText:lt.statusText,subText:lt.subText,totalCount:rt,onAccept:gt,onCopyReview:yt,onOpenFeedback:()=>Me(!0),onRejectComment:_t,onRerun:bt}),(0,Y.jsx)(A,{style:{height:8}})]})}),(0,Y.jsx)(Ca,{entries:pt,open:je,onClose:()=>Me(!1),onJumpToCheck:ht}),f?(0,Y.jsx)(he,{noHeader:!0,closable:!1,containerMaxWidth:`100%`,open:_e,placement:`right`,styles:{body:{padding:0}},width:`min(340px, 88vw)`,onClose:()=>ve(!1),children:(0,Y.jsx)(Aa,{highlight:me,reviewByRound:ct,rounds:Ve,onCollapse:()=>ve(!1),onOpenReport:be})}):(0,Y.jsx)(de,{defaultSize:{width:340},expand:_e,minWidth:300,placement:`right`,style:{flex:`none`,height:`100%`},onExpandChange:ve,children:(0,Y.jsx)(A,{style:{height:`100%`,overflow:`auto`},children:(0,Y.jsx)(Aa,{highlight:me,reviewByRound:ct,rounds:Ve,onCollapse:()=>ve(!1),onOpenReport:be})})}),(0,Y.jsx)(he,{destroyOnHidden:!0,noHeader:!0,containerMaxWidth:`100%`,open:ye!==null,placement:`right`,width:`min(960px, 92vw)`,styles:{body:{height:`100%`,padding:0},bodyContent:{height:`100%`,minHeight:0,overflow:`hidden`}},onClose:()=>be(null),children:ye&&(0,Y.jsx)(A,{style:{height:`100%`,position:`relative`},children:(0,Y.jsx)(ei,{runId:ye.run.id})})})]})}),Ia.displayName=`AcceptancePage`})),Ra,za,Ba=e((()=>{D(),Ra=t(v()),tn(),nn(),za=()=>{let[e,t]=$t(e=>[en.showVerifyReportPanel(e),e.updateSystemStatus]),{lg:n=!0}
1437=C(),r=!n,[i,a]=(0,Ra.useState)(!1);return(0,Ra.useEffect)(()=>{r||a(!1)},[r]),{expand:r?i:e,isNarrow:r,setExpand:e=>{r?a(e):t({showVerifyReportPanel:e})}}}})),Va,Ha,Ua,X,Wa,Ga,Ka,qa,Ja,Ya,Xa,Za,Qa,$a,eo=e((()=>{M(),Pt(),ge(),D(),Va=t(n()),Ha=t(l()),I(),Ua=t(v()),r(),ye(),jn(),Pn(),Ut(),Gt(),hn(),tn(),nn(),Sn(),X=t(m()),Wa=260,Ga=420,Ka=j(({css:e})=>({panel:e`
1438    height: 100%;
1439    background: ${x.colorBgLayout};
1440  `,head:e`
1441    flex: none;
1442    padding-block: 14px 6px;
1443    padding-inline: 12px;
1444  `,titleRow:e`
1445    display: flex;
1446    align-items: center;
1447    justify-content: space-between;
1448    padding-inline: 4px;
1449  `,collapseBtn:e`
1450    cursor: pointer;
1451
1452    display: inline-flex;
1453    align-items: center;
1454    justify-content: center;
1455
1456    width: 26px;
1457    height: 26px;
1458    border: none;
1459    border-radius: 4px;
1460
1461    color: ${x.colorTextTertiary};
1462
1463    background: none;
1464
1465    &:hover {
1466      color: ${x.colorText};
1467      background: ${x.colorFillTertiary};
1468    }
1469  `,search:e`
1470    display: flex;
1471    gap: 7px;
1472    align-items: center;
1473
1474    height: 32px;
1475    margin-block: 8px 4px;
1476    margin-inline: 4px;
1477    padding-inline: 10px;
1478    border: 1px solid ${x.colorBorderSecondary};
1479    border-radius: ${x.borderRadius};
1480
1481    background: ${x.colorBgContainer};
1482
1483    svg {
1484      flex: none;
1485      color: ${x.colorTextQuaternary};
1486    }
1487
1488    input {
1489      width: 100%;
1490      min-width: 0;
1491      border: none;
1492
1493      font-size: 13px;
1494      color: ${x.colorText};
1495
1496      background: none;
1497      outline: none;
1498
1499      &::placeholder {
1500        color: ${x.colorTextQuaternary};
1501      }
1502    }
1503  `,searchEmpty:e`
1504    display: flex;
1505    flex-direction: column;
1506    gap: 10px;
1507    align-items: flex-start;
1508
1509    padding-block: 24px;
1510    padding-inline: 12px;
1511  `,searchEmptyMsg:e`
1512    font-size: 12px;
1513    line-height: 1.6;
1514    color: ${x.colorTextTertiary};
1515    word-break: break-word;
1516  `,queryHl:e`
1517    font-weight: 600;
1518    color: ${x.colorTextSecondary};
1519    word-break: break-all;
1520  `,list:e`
1521    display: flex;
1522    flex-direction: column;
1523    gap: 2px;
1524
1525    padding-block: 6px 16px;
1526    padding-inline: 8px;
1527  `,spin:e`
1528    animation: acceptance-spin 1.1s linear infinite;
1529
1530    @keyframes acceptance-spin {
1531      to {
1532        transform: rotate(360deg);
1533      }
1534    }
1535  `,itemSub:e`
1536    display: flex;
1537    gap: 8px;
1538
1539    margin-block-start: 2px;
1540
1541    font-size: 12px;
1542    color: ${x.colorTextTertiary};
1543  `,editRow:e`
1544    padding-block: 4px;
1545    padding-inline: 4px;
1546  `,itemTitleInput:e`
1547    width: 100%;
1548    min-width: 0;
1549    height: 24px;
1550    padding-inline: 6px;
1551    border: 1px solid ${x.colorBorder};
1552    border-radius: 4px;
1553
1554    font-size: 13px;
1555    color: ${x.colorText};
1556
1557    background: ${x.colorBgContainer};
1558    outline: none;
1559
1560    &:focus {
1561      border-color: ${x.colorPrimary};
1562      box-shadow: 0 0 0 2px ${x.colorPrimaryBg};
1563    }
1564  `,emptyState:e`
1565    height: 100%;
1566    min-height: 240px;
1567    padding-block: 24px;
1568    padding-inline: 16px;
1569  `,retryBtn:e`
1570    cursor: pointer;
1571
1572    padding-block: 4px;
1573    padding-inline: 10px;
1574    border: 1px solid ${x.colorBorder};
1575    border-radius: 4px;
1576
1577    font-size: 12px;
1578    color: ${x.colorTextSecondary};
1579
1580    background: ${x.colorBgContainer};
1581
1582    &:hover {
1583      border-color: ${x.colorTextTertiary};
1584      color: ${x.colorText};
1585    }
1586  `})),qa=new Set([`pending`,`planned`,`verifying`,`repairing`]),Ja=e=>e===`repairing`?`repairing`:qa.has(e)?`running`:e===`accepted`?`accepted`:e===`rejected`?`bad`:e===`errored`?`unsure`:`awaiting`,Ya=new Set([`running`,`repairing`]),Xa={accepted:{color:x.colorSuccess,icon:wt},awaiting:{color:x.colorInfo,icon:ft},bad:{color:x.colorError,icon:Qe},repairing:{color:x.colorWarning,icon:qe},running:{color:x.colorInfo,icon:Re},unsure:{color:x.colorWarning,icon:ze}},Za=e=>{if(!e)return``;let t=(0,Va.default)(e);return(0,Va.default)().diff(t,`day`)<7?t.fromNow():t.format(`MMM D`)},Qa=(0,Ua.memo)(({active:e,item:t,onChanged:n})=>{let{t:r}=o([`verify`,`common`]),{message:i}=ve.useApp(),a=Se(),[s,c]=(0,Ua.useState)(!1),[l,u]=(0,Ua.useState)(!1),d=(0,Ua.useRef)(!1),f=Ja(t.status),p=Xa[f],m=t.subject.title||t.subjectId,[h,g]=(0,Ua.useState)(m),_=()=>Promise.all([n(),Ht(Kt.acceptanceBundle(t.id))]),v=()=>{g(m),c(!0)},y=()=>{d.current||(g(m),c(!1))},b=async()=>
1586{if(d.current)return;let e=h.trim();if(!e){i.error(r(`verify:acceptance.workspace.renameEmpty`)),g(m),c(!1);return}if(e===m){c(!1);return}d.current=!0,u(!0);try{await dn.renameAcceptance(t.id,e),await _(),i.success(r(`verify:acceptance.workspace.renameSuccess`)),c(!1)}catch(e){console.error(`[acceptance:rename]`,e),i.error(r(`verify:acceptance.workspace.renameError`))}finally{d.current=!1,u(!1)}},S=async e=>{u(!0);try{await dn.updateAcceptanceStatus(t.id,e),await _(),i.success(r(`verify:acceptance.workspace.statusSuccess`))}catch(e){console.error(`[acceptance:status]`,e),i.error(r(`verify:acceptance.workspace.statusError`))}finally{u(!1)}},C=()=>{jt({cancelText:r(`common:cancel`),content:r(`verify:acceptance.workspace.deleteConfirmDescription`,{title:m}),okButtonProps:{danger:!0},okText:r(`common:delete`),onOk:async()=>{u(!0);try{await dn.deleteAcceptance(t.id),e&&a(`/acceptance`,{replace:!0}),await n(),i.success(r(`verify:acceptance.workspace.deleteSuccess`))}catch(e){console.error(`[acceptance:delete]`,e),i.error(r(`verify:acceptance.workspace.deleteError`))}finally{u(!1)}},title:r(`verify:acceptance.workspace.deleteConfirmTitle`)})},w=t.status===`delivered`||t.status===`errored`?[{icon:(0,X.jsx)(k,{icon:Ke}),key:`accept`,label:r(`verify:acceptance.workspace.actions.markAccepted`),onClick:()=>void S(`accepted`)}]:t.status===`accepted`||t.status===`rejected`?[{icon:(0,X.jsx)(k,{icon:ut}),key:`reopen`,label:r(`verify:acceptance.workspace.actions.reopen`),onClick:()=>void S(`delivered`)}]:[],T=[{icon:(0,X.jsx)(k,{icon:pt}),key:`rename`,label:r(`verify:acceptance.workspace.actions.rename`),onClick:v},...w,...w.length>0?[{type:`divider`}]:[],{danger:!0,icon:(0,X.jsx)(k,{icon:Ye}),key:`delete`,label:r(`verify:acceptance.workspace.actions.delete`),onClick:C}];return s?(0,X.jsx)(`div`,{className:Ka.editRow,children:(0,X.jsx)(`input`,{autoFocus:!0,className:Ka.itemTitleInput,value:h,onBlur:()=>void b(),onChange:e=>g(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`&&(e.preventDefault(),b()),e.key===`Escape`&&(e.preventDefault(),y())}})}):(0,X.jsx)(Mn,{active:e,style:l?{opacity:.62,pointerEvents:`none`}:void 0,title:m,titleColor:x.colorText,actions:(0,X.jsx)(E,{iconSpaceMode:`group`,items:T,placement:`bottomRight`,popupProps:{style:{minWidth:160}},children:(0,X.jsx)(re,{icon:at,size:`small`,title:r(`verify:acceptance.workspace.actions.more`)})}),description:(0,X.jsxs)(A,{horizontal:!0,className:Ka.itemSub,gap:8,children:[(0,X.jsx)(`span`,{children:t.checkCount==null?r(`acceptance.status.${t.status}`):r(`acceptance.workspace.checkCount`,{count:t.checkCount})}),(0,X.jsx)(`span`,{children:Za(t.updatedAt??t.createdAt)})]}),icon:(0,X.jsx)(k,{className:Ya.has(f)?Ka.spin:void 0,icon:p.icon,size:16,style:{color:p.color}}),onClick:()=>a(`/acceptance/${t.id}`)},t.id)}),Qa.displayName=`AcceptanceRow`,$a=(0,Ua.memo)(({expand:e,isNarrow:t,setExpand:n})=>{let{t:r}=o(`verify`),{acceptanceId:i}=Ce(),{data:a,error:s,isLoading:c,mutate:l}=un(!0),[u,d]=(0,Ua.useState)(``),f=u.trim().toLowerCase(),p=f?(a??[]).filter(e=>(e.subject.title||e.subjectId).toLowerCase().includes(f)):a??[],[m,h]=$t(e=>[en.verifyReportPanelWidth(e),e.updateSystemStatus]);return(0,X.jsx)(de,{className:Ka.panel,defaultSize:{width:m},expand:e,maxWidth:Ga,minWidth:Wa,mode:t?`float`:`fixed`,placement:`left`,size:{height:`100%`,width:m},onExpandChange:n,onSizeChange:(e,t)=>
1586{if(!t)return;let n=typeof t.width==`string`?Number.parseInt(t.width):t.width;!n||(0,Ha.default)(n,m)||h({verifyReportPanelWidth:n})},children:(0,X.jsxs)(ce,{style:{flex:`none`,height:`100%`,minWidth:Wa},children:[(0,X.jsxs)(`div`,{className:Ka.head,children:[(0,X.jsxs)(`div`,{className:Ka.titleRow,children:[(0,X.jsx)(S,{strong:!0,style:{fontSize:15},children:r(`acceptance.workspace.title`)}),(0,X.jsx)(`button`,{"aria-label":r(`workspace.collapse`),className:Ka.collapseBtn,title:r(`workspace.collapse`),type:`button`,onClick:()=>n(!1),children:(0,X.jsx)(k,{icon:P,size:16})})]}),(0,X.jsxs)(`label`,{className:Ka.search,children:[(0,X.jsx)(k,{icon:N,size:13}),(0,X.jsx)(`input`,{placeholder:r(`workspace.search`),type:`search`,value:u,onChange:e=>d(e.target.value)})]})]}),(0,X.jsx)(A,{flex:1,style:{minHeight:0,overflowX:`hidden`,overflowY:`auto`},children:s?(0,X.jsxs)(O,{className:Ka.emptyState,gap:12,children:[(0,X.jsx)(te,{description:r(`workspace.loadError`),icon:it,title:r(`workspace.loadErrorTitle`)}),(0,X.jsx)(`button`,{className:Ka.retryBtn,type:`button`,onClick:()=>void l(),children:r(`workspace.retry`)})]}):c?(0,X.jsx)(Nn,{rows:6,style:{paddingBlock:6,paddingInline:8}}):p.length===0?f?(0,X.jsxs)(`div`,{className:Ka.searchEmpty,children:[(0,X.jsxs)(`span`,{className:Ka.searchEmptyMsg,children:[r(`workspace.searchEmptyPrefix`),(0,X.jsx)(`b`,{className:Ka.queryHl,children:u.trim()}),r(`workspace.searchEmptySuffix`)]}),(0,X.jsx)(`button`,{className:Ka.retryBtn,type:`button`,onClick:()=>d(``),children:r(`workspace.clearSearch`)})]}):(0,X.jsx)(O,{className:Ka.emptyState,children:(0,X.jsx)(te,{description:r(`acceptance.workspace.listEmpty`),icon:F,title:r(`acceptance.workspace.listEmptyTitle`)})}):(0,X.jsx)(`div`,{className:Ka.list,children:p.map(e=>(0,X.jsx)(Qa,{active:e.id===i,item:e,onChanged:l},e.id))})})]})})}),$a.displayName=`AcceptanceListPanel`})),to,no,ro,io,ao=e((()=>{M(),D(),I(),to=t(v()),r(),ye(),An(),Bt(),qt(),Ba(),eo(),no=t(m()),ro=j(({css:e})=>({expandBtn:e`
1587    cursor: pointer;
1588
1589    position: absolute;
1590    z-index: 20;
1591    inset-block-start: 12px;
1592    inset-inline-start: 12px;
1593
1594    display: inline-flex;
1595    align-items: center;
1596    justify-content: center;
1597
1598    width: 28px;
1599    height: 28px;
1600    border: 1px solid ${x.colorBorderSecondary};
1601    border-radius: 6px;
1602
1603    color: ${x.colorTextTertiary};
1604
1605    background: ${x.colorBgContainer};
1606
1607    &:hover {
1608      border-color: ${x.colorBorder};
1609      color: ${x.colorText};
1610    }
1611  `,main:e`
1612    position: relative;
1613
1614    flex: 1;
1615
1616    min-width: 0;
1617    height: 100%;
1618
1619    background: ${x.colorBgContainer};
1620  `})),io=(0,to.memo)(()=>{let{t:e}=o(`verify`),t=za(),n=Vt(Jt.isLoaded),r=Vt(Jt.isLogin),i=!!(n&&r);return(0,no.jsxs)(A,{horizontal:!0,height:`100dvh`,style:{overflow:`hidden`},width:`100%`,children:[(0,no.jsx)(kn,{}),i&&(0,no.jsx)($a,{...t}),(0,no.jsxs)(`div`,{className:ro.main,children:[i&&!t.expand&&(0,no.jsx)(`button`,{"aria-label":e(`workspace.expand`),className:ro.expandBtn,title:e(`workspace.expand`),type:`button`,onClick:()=>t.setExpand(!0),children:(0,no.jsx)(k,{icon:ke,size:16})}),(0,no.jsx)(be,{})]})]})}),io.displayName=`AcceptanceWorkspace`})),oo,so,co,lo=e((()=>{M(),I(),oo=t(v()),r(),so=t(m()),co=(0,oo.memo)(()=>{let{t:e}=o(`verify`);return(0,so.jsx)(O,{height:`100%`,width:`100%`,children:(0,so.jsx)(te,{description:e(`acceptance.workspace.emptyDetail.description`),icon:F,title:e(`acceptance.workspace.emptyDetail.title`)})})}),co.displayName=`AcceptanceEmptyDetail`})),uo,Z,fo,po,mo,ho=e((()=>{M(),Pt(),D(),I(),uo=t(v()),r(),Ln(),hn(),Yt(),Sn(),mr(),Z=t(m()),fo=j(({css:e,cssVar:t})=>({actions:e`
1621    margin-block-start: 12px;
1622    border-block-start: 1px solid ${t.colorBorderSecondary};
1623  `,body:e`
1624    padding-block: 0 12px;
1625    padding-inline: 12px;
1626    border-block-start: 1px solid ${t.colorBorderSecondary};
1627  `,bodyEmbedded:e`
1628    border-block-start: none;
1629  `,checkRow:e`
1630    display: grid;
1631    grid-template-columns: 20px minmax(0, 1fr) auto;
1632    gap: 8px;
1633    align-items: start;
1634
1635    padding-block: 12px;
1636
1637    &:not(:last-child) {
1638      border-block-end: 1px solid ${t.colorBorderSecondary};
1639    }
1640  `,chevron:e`
1641    flex: none;
1642    color: ${t.colorTextQuaternary};
1643  `,clickable:e`
1644    cursor: pointer;
1645    transition: background 150ms ${t.motionEaseOut};
1646
1647    &:hover {
1648      background: ${t.colorFillQuaternary};
1649    }
1650  `,desc:e`
1651    margin-block-start: 3px;
1652    font-size: 12px;
1653    line-height: 1.45;
1654    color: ${t.colorTextTertiary};
1655  `,dock:e`
1656    overflow: hidden;
1657    border: 1px solid ${t.colorBorder};
1658    border-radius: 16px;
1659    background: ${t.colorBgElevated};
1660  `,head:e`
1661    cursor: pointer;
1662
1663    display: flex;
1664    gap: 12px;
1665    align-items: center;
1666    justify-content: space-between;
1667
1668    padding-block: 11px;
1669    padding-inline: 12px;
1670  `,inputPanel:e`
1671    margin-block-start: 10px;
1672    padding: 10px;
1673    border: 1px solid ${t.colorBorderSecondary};
1674    border-radius: 12px;
1675
1676    background: ${t.colorFillQuaternary};
1677  `,sub:e`
1678    overflow: hidden;
1679
1680    font-size: 12px;
1681    color: ${t.colorTextTertiary};
1682    text-overflow: ellipsis;
1683    white-space: nowrap;
1684  `,title:e`
1685    font-size: 13px;
1686    font-weight: 700;
1687    color: ${t.colorText};
1688  `})),po=e=>{switch(e){case`passed`:return{color:`colorSuccess`,icon:Ke,spin:!1};case`running`:return{color:`colorInfo`,icon:Re,spin:!0};case`failed`:return{color:`colorError`,icon:Qe,spin:!1};case`skipped`:return{color:`colorTextQuaternary`,icon:Ue,spin:!1};default:return{color:`colorTextQuaternary`,icon:tt,spin:!1}}},mo=(0,uo.memo)(({operationId:e,embedded:t})=>{let{isDarkMode:n}=T(),{t:r}=o(`verify`),{data:i,mutate:a}=pn(e),{data:s,mutate:c}=fn(e),l=Qt(e=>e.openVerifyResult),[u,d]=(0,uo.useState)(!0),[f,p]=(0,uo.useState)(!1),[m,h]=(0,uo.useState)([]),[g,_]=(0,uo.useState)(``),[v,y]=(0,uo.useState)(!1),b=i?.verifyPlan??[],S=or(i?.verifyStatus),C=dr(s??[]),E=new Map((s??[]).map(e=>[e.checkItemId,e]));if(S===`idle`||b.length===0)return null;let D=async e=>{y(!0);try{await e(),await Promise.all([a(),c()])}finally{y(!1)}},O=()=>D(()=>dn.confirmPlan(e)),j=()=>D(()=>dn.skipPlan(e)),ee=()=>D(()=>dn.skipPlan(e)),te=()=>{h(b.map(e=>({...e}))),p(!0),d(!0)},ne=()=>D(async()=>{await dn.updateDraftItems(e,m.map((e,t)=>({...e,index:t}))),p(!1)}),ie={draft:r(`status.draft`,{total:b.length}
1688),errored:r(`status.errored`),failed:r(`status.failed`),passed:r(`status.passed`,{passed:C.passed,total:C.total}),repairing:r(`status.repairing`),verifying:r(`status.checking`,{passed:C.passed,total:C.total})}[S]??r(`status.idle`),ae=t=>{let r=E.get(t.id),i=po(r?.status),a=r?.toulmin?.reasoning||r?.suggestion;return(0,Z.jsxs)(`div`,{className:w(fo.checkRow,fo.clickable),onClick:()=>l(e,t.id),children:[r?.status===`running`?(0,Z.jsx)(In,{size:16,style:{color:x.colorWarning},ringColor:n?x.colorWarningBorder:`color-mix(in srgb, ${x.colorWarning} 45%, transparent)`}):(0,Z.jsx)(k,{color:x[i.color],icon:i.icon,size:16,spin:i.spin}),(0,Z.jsxs)(A,{style:{minWidth:0},children:[(0,Z.jsx)(`span`,{className:fo.title,style:{fontWeight:600},children:t.title}),a&&(0,Z.jsx)(`span`,{className:fo.desc,children:a})]}),(0,Z.jsx)(k,{className:fo.chevron,icon:Ee,size:16,style:{marginBlockStart:2}})]},t.id)},oe=()=>(0,Z.jsxs)(A,{gap:8,children:[m.map((e,t)=>(0,Z.jsxs)(A,{horizontal:!0,align:`center`,gap:7,children:[(0,Z.jsx)(pe,{placeholder:r(`editor.placeholder`),value:e.title,onChange:n=>{let r=[...m];r[t]={...e,title:n.target.value},h(r)}}),(0,Z.jsx)(re,{icon:Ye,size:`small`,onClick:()=>h(m.filter((e,n)=>n!==t))})]},e.id)),(0,Z.jsx)(L,{block:!0,icon:Me,size:`small`,type:`dashed`,onClick:()=>h([...m,{id:`tmp-${m.length}-${Date.now()}`,index:m.length,onFail:`manual`,required:!1,sourceCriterionId:null,sourceRubricId:null,title:``,verifierConfig:{},verifierType:`llm`}]),children:r(`editor.add`)}),(0,Z.jsxs)(A,{horizontal:!0,gap:8,children:[(0,Z.jsx)(L,{loading:v,size:`small`,type:`primary`,onClick:ne,children:r(`editor.save`)}),(0,Z.jsx)(L,{size:`small`,onClick:()=>p(!1),children:r(`editor.cancel`)})]})]}),se=()=>S===`draft`?(0,Z.jsxs)(A,{horizontal:!0,gap:8,style:{flexWrap:`wrap`,marginTop:12},children:[(0,Z.jsx)(L,{loading:v,size:`small`,type:`primary`,onClick:O,children:r(`dock.confirm`)}),(0,Z.jsx)(L,{size:`small`,onClick:te,children:r(`dock.edit`)}),(0,Z.jsx)(L,{size:`small`,onClick:j,children:r(`dock.skip`)})]}):S===`failed`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:fo.inputPanel,children:[(0,Z.jsx)(`div`,{style:{fontSize:12,fontWeight:600,marginBottom:6},children:r(`input.label`)}),(0,Z.jsx)(le,{placeholder:r(`input.placeholder`),rows:2,value:g,onChange:e=>_(e.target.value)}),(0,Z.jsx)(`div`,{className:fo.desc,style:{marginTop:6},children:r(`input.hint`)})]}),(0,Z.jsxs)(A,{horizontal:!0,gap:8,style:{flexWrap:`wrap`,marginTop:12},children:[(0,Z.jsx)(L,{size:`small`,onClick:te,children:r(`dock.edit`)}),(0,Z.jsx)(L,{danger:!0,loading:v,size:`small`,onClick:ee,children:r(`dock.forceDeliver`)})]})]}):S===`repairing`?(0,Z.jsx)(`div`,{className:fo.inputPanel,style:{marginTop:10},children:(0,Z.jsx)(`div`,{className:fo.desc,children:r(`dock.repairHint`)})}):null,ce=(0,Z.jsx)(`div`,{className:w(fo.body,t&&fo.bodyEmbedded),children:f?oe():(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(A,{gap:0,children:b.map(e=>ae(e))}),(()=>{let e=se();return e?(0,Z.jsx)(`div`,{className:fo.actions,children:e}):null})()]})});if(t)return ce;let ue=S===`passed`?Pe:S===`failed`||S===`errored`?Ot:We;return(0,Z.jsxs)(`div`,{className:fo.dock,children:[(0,Z.jsxs)(`div`,{className:fo.head,onClick:()=>d(e=>!e),children:[(0,Z.jsxs)(A,{horizontal:!0,align:`center`,gap:10,style:{minWidth:0},children:[(0,Z.jsx)(k,{icon:ue,size:18}),(0,Z.jsxs)(A,{style:{minWidth:0},children:[(0,Z.jsx)(A,{horizontal:!0,align:`center`,gap:8,children:(0,Z.jsx)(`span`,{className:fo.title,children:r(`dock.title`)})}),(0,Z.jsx)(`span`,{className:fo.sub,children:ie})]})]}),(0,Z.jsx)(k,{color:x.colorTextTertiary,icon:u?Ze:Fe,size:16})]}),u&&ce]})}),mo.displayName=`CheckerDock`})),go,_o,vo,yo,bo,xo=e((()=>{M(),D(),I(),go=t(v()),r(),Sn(),mr(),_o=t(m()),vo=j(({css:e,cssVar:t})=>({badge:e`
1689    display: inline-flex;
1690    flex: none;
1691    gap: 5px;
1692    align-items: center;
1693
1694    padding-block: 4px;
1695    padding-inline: 10px;
1696    border-radius: 999px;
1697
1698    font-size: 12px;
1699    font-weight: 600;
1700  `,body:e`
1701    padding-block: 12px;
1702    padding-inline: 16px;
1703
1704    font-size: 13px;
1705    line-height: 1.7;
1706    color: ${t.colorTextSecondary};
1707  `,card:e`
1708    overflow: hidden;
1709    border: 1px solid ${t.colorBorderSecondary};
1710    border-radius: 16px;
1711    background: ${t.colorBgContainer};
1712  `,cardFailed:e`
1713    border-color: ${t.colorErrorBorder};
1714  `,foot:e`
1715    display: flex;
1716    gap: 8px;
1717    align-items: center;
1718
1719    padding-block: 10px;
1720    padding-inline: 16px;
1721    border-block-start: 1px solid ${t.colorBorderSecondary};
1722
1723    font-size: 12px;
1724    color: ${t.colorTextTertiary};
1725  `,head:e`
1726    display: flex;
1727    gap: 14px;
1728    align-items: flex-start;
1729    justify-content: space-between;
1730
1731    padding-block: 14px;
1732    padding-inline: 16px;
1733    border-block-end: 1px solid ${t.colorBorderSecondary};
1734  `,sub:e`
1735    margin-block-start: 4px;
1736    font-size: 12px;
1737    line-height: 1.5;
1738    color: ${t.colorTextTertiary};
1739  `,title:e`
1740    font-size: 15px;
1741    font-weight: 700;
1742    color: ${t.colorText};
1743  `})),yo={draft:{badge:{color:`default`,icon:Je,key:`pending`},subKey:`result.pending.sub`},errored:{badge:{color:`warning`,icon:lt,key:`errored`},subKey:`result.errored.sub`},failed:{badge:{color:`error`,icon:_t,key:`failed`},subKey:`result.failed.sub`},idle:{badge:{color:`default`,icon:Je,key:`pending`},subKey:`result.pending.sub`},passed:{badge:{color:`success`,icon:Pe,key:`passed`},subKey:`result.passed.sub`},repairing:{badge:{color:`warning`,icon:qe,key:`repairing`},subKey:`result.repairing.sub`},verifying:{badge:{color:`default`,icon:Je,key:`pending`},subKey:`result.pending.sub`}},bo=(0,go.memo)(({operationId:e,round:t=1,embedded:n})=>{let{t:r}=o(`verify`),{data:i}=pn(e),{data:a}=fn(e),s=or(i?.verifyStatus),c=yo[s];if(!i?.verifyPlan?.length||!c)return null;let l=dr(a??[]),u={default:x.colorTextTertiary,error:x.colorError,success:x.colorSuccess,warning:x.colorWarning},d={default:x.colorTextSecondary,error:x.colorErrorTextActive,success:x.colorSuccessTextActive,warning:x.colorWarningTextActive},f=(0,_o.jsxs)(`div`,{className:vo.head,children:[(0,_o.jsxs)(A,{children:[(0,_o.jsxs)(A,{horizontal:!0,align:`center`,gap:7,children:[(0,_o.jsx)(k,{icon:We,size:16}),(0,_o.jsx)(`span`,{className:vo.title,children:r(`result.title`,{round:t})})]}),(0,_o.jsx)(`div`,{className:vo.sub,children:r(c.subKey,{passed:l.passed,total:l.total})})]}),(0,_o.jsxs)(`span`,{className:vo.badge,style:{background:`color-mix(in srgb, ${u[c.badge.color]} 12%, transparent)`,color:d[c.badge.color]},children:[(0,_o.jsx)(k,{icon:c.badge.icon,size:14}),r(`badge.${c.badge.key}`)]})]});return n?f:(0,_o.jsxs)(`div`,{className:w(vo.card,s===`failed`&&vo.cardFailed),children:[f,(0,_o.jsx)(`div`,{className:vo.body,children:(0,_o.jsx)(A,{gap:4,children:(i.verifyPlan??[]).map(e=>{let t=(a??[]).find(t=>t.checkItemId===e.id);return(0,_o.jsxs)(A,{horizontal:!0,align:`center`,gap:8,children:[(0,_o.jsx)(`span`,{children:e.title}),t?.verdict&&(0,_o.jsxs)(`span`,{style:{color:u[t.verdict===`passed`?`success`:`error`]},children:[`· `,t.verdict]})]},e.id)})})}),(0,_o.jsxs)(`div`,{className:vo.foot,children:[(0,_o.jsx)(k,{icon:lt,size:14}),(0,_o.jsx)(`span`,{children:r(`result.foot`)})]})]})}),bo.displayName=`RunResult`})),So,Co,wo,Q,To,Eo,$,Do,Oo,ko,Ao,jo,Mo,No=e((()=>{M(),Pt(),ge(),D(),So=t(n()),Co=t(l()),I(),wo=t(v()),r(),ye(),jn(),Pn(),Ut(),Gt(),hn(),tn(),nn(),Sn(),Q=t(m()),To=260,Eo=420,$=j(({css:e})=>({panel:e`
1744    height: 100%;
1745    background: ${x.colorBgLayout};
1746  `,head:e`
1747    flex: none;
1748    padding-block: 14px 6px;
1749    padding-inline: 12px;
1750  `,titleRow:e`
1751    display: flex;
1752    align-items: center;
1753    justify-content: space-between;
1754    padding-inline: 4px;
1755  `,collapseBtn:e`
1756    cursor: pointer;
1757
1758    display: inline-flex;
1759    align-items: center;
1760    justify-content: center;
1761
1762    width: 26px;
1763    height: 26px;
1764    border: none;
1765    border-radius: 4px;
1766
1767    color: ${x.colorTextTertiary};
1768
1769    background: none;
1770
1771    &:hover {
1772      color: ${x.colorText};
1773      background: ${x.colorFillTertiary};
1774    }
1775  `,search:e`
1776    display: flex;
1777    gap: 7px;
1778    align-items: center;
1779
1780    height: 32px;
1781    margin-block: 8px 4px;
1782    margin-inline: 4px;
1783    padding-inline: 10px;
1784    border: 1px solid ${x.colorBorderSecondary};
1785    border-radius: ${x.borderRadius};
1786
1787    background: ${x.colorBgContainer};
1788
1789    svg {
1790      flex: none;
1791      color: ${x.colorTextQuaternary};
1792    }
1793
1794    input {
1795      width: 100%;
1796      min-width: 0;
1797      border: none;
1798
1799      font-size: 13px;
1800      color: ${x.colorText};
1801
1802      background: none;
1803      outline: none;
1804
1805      &::placeholder {
1806        color: ${x.colorTextQuaternary};
1807      }
1808    }
1809  `,list:e`
1810    display: flex;
1811    flex-direction: column;
1812    gap: 2px;
1813
1814    padding-block: 6px 16px;
1815    padding-inline: 8px;
1816  `,editRow:e`
1817    padding-block: 4px;
1818    padding-inline: 4px;
1819  `,spin:e`
1820    animation: verify-spin 1.1s linear infinite;
1821
1822    @keyframes verify-spin {
1823      to {
1824        transform: rotate(360deg);
1825      }
1826    }
1827  `,itemSub:e`
1828    display: flex;
1829    gap: 8px;
1830
1831    margin-block-start: 2px;
1832
1833    font-size: 12px;
1834    color: ${x.colorTextTertiary};
1835  `,itemTitleInput:e`
1836    width: 100%;
1837    min-width: 0;
1838    height: 24px;
1839    padding-inline: 6px;
1840    border: 1px solid ${x.colorBorder};
1841    border-radius: 4px;
1842
1843    font-size: 13px;
1844    color: ${x.colorText};
1845
1846    background: ${x.colorBgContainer};
1847    outline: none;
1848
1849    &:focus {
1850      border-color: ${x.colorPrimary};
1851      box-shadow: 0 0 0 2px ${x.colorPrimaryBg};
1852    }
1853  `,counts:e`
1854    font-variant-numeric: tabular-nums;
1855
1856    em {
1857      font-style: normal;
1858      color: ${x.colorError};
1859    }
1860  `,empty:e`
1861    display: flex;
1862    flex-direction: column;
1863    gap: 10px;
1864    align-items: flex-start;
1865
1866    padding-block: 24px;
1867    padding-inline: 12px;
1868  `,emptyState:e`
1869    height: 100%;
1870    min-height: 240px;
1871    padding-block: 24px;
1872    padding-inline: 16px;
1873  `,emptyMsg:e`
1874    font-size: 12px;
1875    line-height: 1.6;
1876    color: ${x.colorTextTertiary};
1877    word-break: break-word;
1878  `,queryHl:e`
1879    font-weight: 600;
1880    color: ${x.colorTextSecondary};
1881    word-break: break-all;
1882  `,clearBtn:e`
1883    cursor: pointer;
1884
1885    padding-block: 4px;
1886    padding-inline: 10px;
1887    border: 1px solid ${x.colorBorder};
1888    border-radius: 4px;
1889
1890    font-size: 12px;
1891    color: ${x.colorTextSecondary};
1892
1893    background: ${x.colorBgContainer};
1894
1895    &:hover {
1896      border-color: ${x.colorTextTertiary};
1897      color: ${x.colorText};
1898    }
1899  `,loadMoreError:e`
1900    display: flex;
1901    flex-wrap: wrap;
1902    gap: 8px;
1903    align-items: center;
1904    justify-content: center;
1905
1906    padding-block: 10px;
1907    padding-inline: 12px;
1908
1909    font-size: 12px;
1910    color: ${x.colorTextTertiary};
1911  `})),Do=new Set([`planned`,`repairing`,`verifying`]),Oo=(e,t)=>e&&Do.has(e)?`running`:t===`passed`||e===`passed`||e===`delivered`?`ok`:t===`failed`||e===`failed`?`bad`:`unsure`,ko={bad:{color:x.colorError,icon:Qe},ok:{color:x.colorSuccess,icon:Ke},running:{color:x.colorInfo,icon:Re},unsure:{color:x.colorWarning,icon:ze}},Ao=e=>{if(!e)return``;let t=(0,So.default)(e);return(0,So.default)().diff(t,`day`)<7?t.fromNow():t.format(`MMM D`)},jo=(0,wo.memo)(({active:e,item:t,onReportsChanged:n})=>{let{t:r}=o([`verify`,`common`]),{message:i}=ve.useApp(),a=Se(),[s,c]=(0,wo.useState)(!1),[l,u]=(0,wo.useState)(t.run.title||``),[d,f]=(0,wo.useState)(!1),p=(0,wo.useRef)(!1),m=Oo(t.run.status??null,t.report?.verdict),h=ko[m],g=Array.isArray(t.run.plan)?t.run.plan.length:0,_=t.report?.totalChecks??g,v=t.report?.passedChecks??0,y=t.report?.failedChecks??0,b=t.run.title||r(`verify:reports.untitled`),S=m===`running`?r(`verify:list.running`):Ao(t.report?.generatedAt??t.run.createdAt),C=async()=>{await Promise.all([n(),Ht(Kt.reportBundle(t.run.id))])},w=()=>{u(b),c(!0)},T=()=>{p.current||(u(t.run.title||``),c(!1))},D=async()=>{if(p.current)return;let e=l.trim();if(!e){i.error(r(`verify:workspace.renameEmpty`)),u(t.run.title||``),c(!1);return}if(e===b){c(!1);return}p.current=!0,f(!0);try{await dn.updateRunTitle(t.run.id,e),await C(),i.success(r(`verify:workspace.renameSuccess`)),c(!1)}catch(e){console.error(`[verify:renameReport]`,e),i.error(r(`verify:workspace.renameError`))}finally{p.current=!1,f(!1)}},O=[{icon:(0,Q.jsx)(k,{icon:pt}),key:`rename`,label:r(`verify:workspace.actions.rename`),onClick:w},{danger:!0,icon:(0,Q.jsx)(k,{icon:Ye}),key:`delete`,label:r(`verify:workspace.actions.delete`),onClick:()=>{jt({cancelText:r(`common:cancel`),content:r(`verify:workspace.deleteConfirmDescription`,{title:b}),okButtonProps:{danger:!0},okText:r(`common:delete`),onOk:async()=>{f(!0);try{await dn.deleteRun(t.run.id),e&&a(`/verify`,{replace:!0}),await Promise.all([n(),Ht(Kt.reportBundle(t.run.id),null,{revalidate:!1})]),i.success(r(`verify:workspace.deleteSuccess`))}catch(e){console.error(`[verify:deleteReport]`,e),i.error(r(`verify:workspace.deleteError`))}finally{f(!1)}},title:r(`verify:workspace.deleteConfirmTitle`)})}}];return s?(0,Q.jsx)(`div`,{className:$.editRow,children:(0,Q.jsx)(`input`,{autoFocus:!0,className:$.itemTitleInput,value:l,onBlur:()=>void D(),onChange:e=>u(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`&&(e.preventDefault(),D()),e.key===`Escape`&&(e.preventDefault(),T())}})}):(0,Q.jsx)(Mn,{active:e,description:S||_>0&&m!==`running`?(0,Q.jsxs)(A,{horizontal:!0,className:$.itemSub,gap:8,children:[S?(0,Q.jsx)(`span`,{children:S}):null,_>0&&m!==`running`?(0,Q.jsxs)(`span`,{className:$.counts,children:[v,`/`,_,y>0?(0,Q.jsxs)(Q.Fragment,{children:[` · `,(0,Q.jsx)(`em`,{children:r(`verify:list.failedCount`,{count:y})})]}):null]}):null]}):void 0,style:d?{opacity:.62,pointerEvents:`none`}:void 0,title:b,titleColor:x.colorText,actions:(0,Q.jsx)(E,{iconSpaceMode:`group`,items:O,placement:`bottomRight`,popupProps:{style:{minWidth:140}},children:(0,Q.jsx)(re,{icon:at,size:`small`,title:r(`verify:workspace.actions.more`)})}),icon:(0,Q.jsx)(k,{className:m===`running`?$.spin:void 0,icon:h.icon,size:16,style:{color:h.color}}),onClick:()=>a(`/verify/${t.run.id}`)})}),jo.displayName=`ReportListItem`,Mo=(0,wo.memo)(({expand:e,isNarrow:t,setExpand:n})=>{let{t:r}=o(`verify`),{runId:i}=Ce(),[a,s]=(0,wo.useState)(``),[c,l]=(0,wo.useState)(``);(0,wo.useEffect)(()=>{let e=setTimeout(()=>l(a.trim()),300);return()=>clearTimeout(e)},[a]);let{items:u,error:d,hasMore:f,isLoadingInitial:p,isLoadingMore:m,loadMore:h,reload:g}=yn(c),[_,v]=$t(e=>[en.verifyReportPanelWidth(e),e.updateSystemStatus]),[y,b]=(0,wo.useState)(_);y!==_&&b(_);let x=(e,t)=>{if(!t)return;let n=typeof t.width==`string`?Number.parseInt(t.width):t.width;!n||(0,Co.default)(n,_)||(b(n),v({verifyReportPanelWidth:n}))},C=(0,wo.useRef)(null);return(0,wo.useEffect)(()=>{let e=C.current;if(!e||!f)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&f&&!m&&h()},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[f,m,h]),(0,Q.jsx)(de,{className:$.panel,defaultSize:{width:y},expand:e,maxWidth:Eo,minWidth:To,mode:t?`float`:`fixed`,placement:`left`,size:{height:`100%`,width:_},onExpandChange:n,onSizeChange:x,children:(0,Q.jsxs)(ce,{style:{flex:`none`,height:`100%`,minWidth:To},children:[(0,Q.jsxs)(`div`,{className:$.head,children:[(0,Q.jsxs)(`div`,{className:$.titleRow,children:[(0,Q.jsx)(S,{strong:!0,style:{fontSize:15},children:r(`workspace.title`)}),(0,Q.jsx)(`button`,{"aria-label":r(`workspace.collapse`),className:$.collapseBtn,title:r(`workspace.collapse`),type:`button`,onClick:()=>n(!1),children:(0,Q.jsx)(k,{icon:P,size:16})})]}),(0,Q.jsxs)(`label`,{className:$.search,children:[(0,Q.jsx)(k,{icon:N,size:13}),(0,Q.jsx)(`input`,{placeholder:r(`workspace.search`),type:`search`,value:a,onChange:e=>s(e.target.value)})]})]}),(0,Q.jsx)(A,{flex:1,style:{minHeight:0,overflowX:`hidden`,overflowY:`auto`}
1911,children:d&&u.length===0?(0,Q.jsxs)(O,{className:$.emptyState,gap:12,children:[(0,Q.jsx)(te,{description:r(`workspace.loadError`),icon:it,title:r(`workspace.loadErrorTitle`)}),(0,Q.jsx)(`button`,{className:$.clearBtn,type:`button`,onClick:()=>g(),children:r(`workspace.retry`)})]}):p?(0,Q.jsx)(Nn,{rows:6,style:{paddingBlock:6,paddingInline:8}}):u.length===0?c?(0,Q.jsxs)(`div`,{className:$.empty,children:[(0,Q.jsxs)(`span`,{className:$.emptyMsg,children:[r(`workspace.searchEmptyPrefix`),(0,Q.jsx)(`b`,{className:$.queryHl,children:c}),r(`workspace.searchEmptySuffix`)]}),(0,Q.jsx)(`button`,{className:$.clearBtn,type:`button`,onClick:()=>s(``),children:r(`workspace.clearSearch`)})]}):(0,Q.jsx)(O,{className:$.emptyState,children:(0,Q.jsx)(te,{description:r(`workspace.listEmpty`),icon:Te,title:r(`workspace.listEmptyTitle`)})}):(0,Q.jsxs)(`div`,{className:$.list,children:[u.map(e=>(0,Q.jsx)(jo,{active:e.run.id===i,item:e,onReportsChanged:g},e.run.id)),(0,Q.jsx)(`div`,{"aria-hidden":!0,ref:C,style:{height:1}}),m?(0,Q.jsx)(Nn,{rows:2,style:{paddingBlock:6,paddingInline:8}}):d?(0,Q.jsxs)(`div`,{className:$.loadMoreError,children:[(0,Q.jsx)(`span`,{children:r(`workspace.loadMoreError`)}),(0,Q.jsx)(`button`,{className:$.clearBtn,type:`button`,onClick:()=>g(),children:r(`workspace.retry`)})]}):null]})})]})})}),Mo.displayName=`ReportListPanel`})),Po,Fo,Io,Lo,Ro=e((()=>{M(),D(),I(),Po=t(v()),r(),ye(),An(),Bt(),qt(),No(),Ba(),Fo=t(m()),Io=j(({css:e})=>({expandBtn:e`
1912    cursor: pointer;
1913
1914    position: absolute;
1915    z-index: 20;
1916    inset-block-start: 12px;
1917    inset-inline-start: 12px;
1918
1919    display: inline-flex;
1920    align-items: center;
1921    justify-content: center;
1922
1923    width: 28px;
1924    height: 28px;
1925    border: 1px solid ${x.colorBorderSecondary};
1926    border-radius: 6px;
1927
1928    color: ${x.colorTextTertiary};
1929
1930    background: ${x.colorBgContainer};
1931
1932    &:hover {
1933      border-color: ${x.colorBorder};
1934      color: ${x.colorText};
1935    }
1936  `,main:e`
1937    position: relative;
1938
1939    flex: 1;
1940
1941    min-width: 0;
1942    height: 100%;
1943
1944    background: ${x.colorBgContainer};
1945  `})),Lo=(0,Po.memo)(()=>{let{t:e}=o(`verify`),t=za(),n=Vt(Jt.isLoaded),r=Vt(Jt.isLogin),i=!!(n&&r);return(0,Fo.jsxs)(A,{horizontal:!0,height:`100dvh`,style:{overflow:`hidden`},width:`100%`,children:[(0,Fo.jsx)(kn,{}),i&&(0,Fo.jsx)(Mo,{...t}),(0,Fo.jsxs)(`div`,{className:Io.main,children:[i&&!t.expand&&(0,Fo.jsx)(`button`,{"aria-label":e(`workspace.expand`),className:Io.expandBtn,title:e(`workspace.expand`),type:`button`,onClick:()=>t.setExpand(!0),children:(0,Fo.jsx)(k,{icon:ke,size:16})}),(0,Fo.jsx)(be,{})]})]})}),Lo.displayName=`VerifyWorkspace`})),zo,Bo,Vo,Ho=e((()=>{M(),I(),zo=t(v()),r(),Bo=t(m()),Vo=(0,zo.memo)(()=>{let{t:e}=o(`verify`);return(0,Bo.jsx)(O,{height:`100%`,width:`100%`,children:(0,Bo.jsx)(te,{description:e(`workspace.emptyDetail.description`),icon:Te,title:e(`workspace.emptyDetail.title`)})})}),Vo.displayName=`EmptyDetail`})),Uo=e((()=>{La(),ao(),lo(),ho(),ti(),xo(),mr(),Ro(),Ho()}));export{Hn as C,In as D,zn as E,Ln as O,Zn as S,Rn as T,ti as _,Ro as a,or as b,mo as c,lo as d,io as f,ei as g,La as h,Lo as i,ho as l,Ia as m,Vo as n,bo as o,ao as p,Ho as r,xo as s,Uo as t,co as u,mr as v,Vn as w,Xn as x,pr as y};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.