progon-agent 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension-bundle.json +3 -3
- package/extension-dist/background/background.js +82 -82
- package/extension-dist/card/card.html +7 -7
- package/extension-dist/card/card.js +3 -3
- package/extension-dist/chunks/shared-9kMbf8PO.js +1 -0
- package/extension-dist/chunks/shared-Bi_ASAsl.js +377 -0
- package/extension-dist/chunks/{shared-CwW6XlwM.js → shared-Bts1WtwM.js} +1 -1
- package/extension-dist/chunks/shared-BvwA-cm2.css +1 -0
- package/extension-dist/chunks/shared-Bwk7ZjOr.js +21 -0
- package/extension-dist/chunks/{shared-BJIubFtc.js → shared-CInXPYm9.js} +1 -1
- package/extension-dist/chunks/shared-CX8XGwZc.js +1 -0
- package/extension-dist/chunks/shared-CZrS2BT6.js +111 -0
- package/extension-dist/chunks/{shared-SnJc3X_h.js → shared-C_dmgeUK.js} +12 -18
- package/extension-dist/chunks/shared-CeuPJn47.js +227 -0
- package/extension-dist/chunks/{shared-Bdgj5eQ5.js → shared-CiEEQWpw.js} +1 -1
- package/extension-dist/chunks/shared-Cxo909tK.js +1 -0
- package/extension-dist/chunks/shared-DyRhAmgo.js +51 -0
- package/extension-dist/chunks/shared-Xq2emDMe.js +98 -0
- package/extension-dist/chunks/shared-_jlBqdBD.css +1 -0
- package/extension-dist/content/content.css +1 -1
- package/extension-dist/content/content.js +211 -211
- package/extension-dist/manifest.json +23 -23
- package/extension-dist/offscreen/offscreen.html +2 -2
- package/extension-dist/offscreen/offscreen.js +1 -1
- package/extension-dist/popup/popup.html +7 -7
- package/extension-dist/popup/popup.js +3 -3
- package/extension-dist/sidepanel/sidepanel.html +10 -10
- package/extension-dist/sidepanel/sidepanel.js +1 -1
- package/extension-dist/workspace/workspace.html +11 -11
- package/extension-dist/workspace/workspace.js +56 -55
- package/package.json +1 -1
- package/extension-dist/chunks/shared-B3hsjAeB.js +0 -371
- package/extension-dist/chunks/shared-BJOAkaqO.js +0 -1
- package/extension-dist/chunks/shared-BUQXvbGJ.css +0 -1
- package/extension-dist/chunks/shared-BiDh2lEA.js +0 -1
- package/extension-dist/chunks/shared-Ccz3X65G.js +0 -51
- package/extension-dist/chunks/shared-CdkSNWvx.js +0 -21
- package/extension-dist/chunks/shared-DCs5uS1P.js +0 -1
- package/extension-dist/chunks/shared-DdJtX3_m.js +0 -105
- package/extension-dist/chunks/shared-O0OgUhxM.js +0 -227
- package/extension-dist/chunks/shared-UK_0TOj7.js +0 -98
- package/extension-dist/chunks/shared-c_EHmnKR.css +0 -1
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./shared-hePW80VL.js";import{Aa as t,Ao as n,Co as r,Dr as i,E as a,Eo as o,Fi as s,Ga as c,Gi as l,Ha as u,Ii as d,Ja as f,Ka as p,Ki as m,Kr as h,Ma as g,Pr as _,So as v,Ua as y,Ui as b,Wa as x,Wi as S,Xr as C,Ya as w,Zi as T,_i as ee,_o as E,ai as D,ao as te,ar as ne,bi as O,bo as re,ca as k,ci as A,co as ie,cr as ae,di as oe,do as se,dr as ce,ei as j,eo as le,fi as ue,fo as de,gi as fe,go as pe,ha as me,hi as he,ho as ge,ia as _e,ii as ve,io as ye,ja as be,ka as xe,li as Se,lo as Ce,mi as we,mo as Te,oa as Ee,oi as De,oo as Oe,or as ke,po as Ae,qa as je,rr as Me,sa as Ne,si as Pe,so as Fe,sr as Ie,t as Le,ti as Re,to as ze,ui as Be,uo as Ve,ur as He,vi as Ue,wo as We,xi as Ge,yi as M,yo as Ke}from"./shared-O0OgUhxM.js";import{$n as qe,$t as Je,An as Ye,Bn as N,Dt as Xe,Gn as P,Jn as Ze,Ln as Qe,Mn as $e,Nn as et,On as tt,Pn as nt,Qn as rt,Qt as it,Rn as at,St as ot,Tt as st,Un as ct,Vn as F,Wn as lt,Xn as ut,Xt as dt,Zn as ft,_ as pt,_t as mt,an as ht,b as gt,dt as _t,g as vt,gt as yt,in as bt,jn as I,kn as xt,lt as St,nn as Ct,pt as wt,qn as Tt,qt as Et,rn as Dt,tn as Ot,vt as kt,wt as At,yn as jt}from"./shared-UK_0TOj7.js";import{A as Mt,B as Nt,C as Pt,D as Ft,E as It,F as Lt,G as Rt,H as zt,I as Bt,J as Vt,K as Ht,L as Ut,N as Wt,P as Gt,Q as Kt,R as qt,S as Jt,T as Yt,U as Xt,W as Zt,X as Qt,Y as $t,Z as en,b as tn,g as nn,q as rn,v as an,w as on,x as sn,y as cn,z as ln}from"./shared-DdJtX3_m.js";import{C as un,D as dn,E as fn,O as pn,S as mn,T as hn,a as gn,c as _n,d as vn,f as yn,i as bn,l as xn,m as Sn,n as Cn,o as wn,p as Tn,r as En,s as Dn,t as On,u as kn,w as An,x as jn}from"./shared-Ccz3X65G.js";import{i as Mn,n as Nn,r as Pn,t as Fn}from"./shared-BiDh2lEA.js";var In={NORMAL_CLOSURE:1e3,SERVER_RESTART:1001,AUTH_FAILED:4001,PROTOCOL_VIOLATION:4002,BACKPRESSURE:4003,CHANNEL_NOT_FOUND:4004,RATE_LIMIT:4005,HEARTBEAT_TIMEOUT:4006},Ln={kind:`this_browser`};function Rn(e,t){return e.kind===`runner`&&t.kind===`runner`?e.agentId===t.agentId:e.kind===t.kind}function zn(e){return e.kind!==`none`}var Bn={queued:{tone:`active`,blockState:`active`},launching:{tone:`active`,blockState:`active`},link_pending:{tone:`active`,blockState:`active`},crawling:{tone:`active`,blockState:`active`},running_batch:{tone:`active`,blockState:`active`},completed:{tone:`success`,blockState:`terminal`},failed:{tone:`error`,blockState:`terminal`},cancelled:{tone:`neutral`,blockState:`terminal`}};function Vn(e){return Bn[e]}function Hn(e){return Vn(e.stage).blockState}function Un(e){return{cancel:Hn(e)!==`terminal`,kill:e.status===`launching`||e.status===`in_progress`}}function Wn(e){return e.mine?e.lifecycle===`active`?e.online?null:`offline`:`notEnrolled`:`notOwner`}function Gn(e){return e.activeRun!==null||e.activeJob!=null}async function Kn(e,t,{pageSize:n,route:r}){let i=[],a=0,o=null;for(;o===null||a<o;){t.throwIfAborted();let s=await e({limit:n,offset:a},t);if(s.offset!==a||s.total<0||!Number.isInteger(s.total))throw Error(`${r} returned invalid pagination metadata`);if(s.items.length===0&&a<s.total)throw Error(`${r} returned an empty page before total was satisfied`);i.push(...s.items),a+=s.items.length,o=s.total}return i}async function qn(e,t){return Kn(e,t,{pageSize:100,route:`GET /agents`})}var Jn=`://`,Yn=`https://`;function Xn(e){let t=e.trim();if(t===``)return{ok:!1,reason:`empty`};if(t.includes(`*`))return{ok:!1,reason:`host_invalid`};let n=Zn(t);return n===null?{ok:!1,reason:`not_parsable`}:Qn(n)}function Zn(e){try{return new URL(e.includes(Jn)?e:`${Yn}${e}`)}catch{return null}}function Qn(e){if(!ze(e.protocol))return{ok:!1,reason:`scheme_not_navigable`};if(e.username!==``||e.password!==``)return{ok:!1,reason:`carries_credentials`};if(e.pathname!==`/`||e.search!==``||e.hash!==``)return{ok:!1,reason:`not_bare_origin`};let t=ye(e.hostname),n=le(t)&&t.includes(`:`)?`[${t}]`:t,r=e.port===``?``:`:${e.port}`;return{ok:!0,baseUrl:`${e.protocol}//${n}${r}`}}
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.574.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
var $n=M(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),er=M(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),tr=M(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),nr=M(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),rr=M(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),ir=M(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),ar=M(`ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]),or=M(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),sr=M(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),cr=M(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),lr=M(`chart-pie`,[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]]),ur=M(`circle-minus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),dr=M(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),fr=M(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),pr=M(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),mr=M(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),hr=M(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),gr=M(`fast-forward`,[[`path`,{d:`M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z`,key:`b19h5q`}],[`path`,{d:`M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z`,key:`h7h5ge`}]]),_r=M(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),vr=M(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),yr=M(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),br=M(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),xr=M(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Sr=M(`hand`,[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]),Cr=M(`hourglass`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]),wr=M(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),Tr=M(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Er=M(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Dr=M(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Or=M(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),kr=M(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Ar=M(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),jr=M(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),Mr=M(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),Nr=M(`monitor-play`,[[`path`,{d:`M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z`,key:`vbtd3f`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,key:`x3v2xh`}]]),Pr=M(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Fr=M(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Ir=M(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Lr=M(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Rr=M(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),zr=M(`radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),Br=M(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Vr=M(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Hr=M(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),Ur=M(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Wr=M(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Gr=M(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Kr=M(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),qr=M(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Jr=M(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Yr=M(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Xr=M(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Zr=M(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),Qr=M(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),$r=M(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),ei=M(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),ti=M(`wand`,[[`path`,{d:`M15 4V2`,key:`z1p9b7`}],[`path`,{d:`M15 16v-2`,key:`px0unx`}],[`path`,{d:`M8 9h2`,key:`1g203m`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M17.8 11.8 19 13`,key:`yihg8r`}],[`path`,{d:`M15 9h.01`,key:`x1ddxp`}],[`path`,{d:`M17.8 6.2 19 5`,key:`fd4us0`}],[`path`,{d:`m3 21 9-9`,key:`1jfql5`}],[`path`,{d:`M12.2 6.2 11 5`,key:`i3da3b`}]]),ni=M(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),L=/* @__PURE__ */ e(k(),1),ri=/* @__PURE__ */ new Set([`https:`,`http:`,`mailto:`]),ii=`\0LINK_HREF`,ai=`target="_blank" rel="noopener noreferrer"`
|
|
9
|
-
/**
|
|
10
|
-
* @license lucide-react v0.574.0 - ISC
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the ISC license.
|
|
13
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* @license lucide-react v0.574.0 - ISC
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the ISC license.
|
|
19
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* @license lucide-react v0.574.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* @license lucide-react v0.574.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* @license lucide-react v0.574.0 - ISC
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the ISC license.
|
|
37
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* @license lucide-react v0.574.0 - ISC
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the ISC license.
|
|
43
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* @license lucide-react v0.574.0 - ISC
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the ISC license.
|
|
49
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/
|
|
51
|
-
/**
|
|
52
|
-
* @license lucide-react v0.574.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/
|
|
57
|
-
/**
|
|
58
|
-
* @license lucide-react v0.574.0 - ISC
|
|
59
|
-
*
|
|
60
|
-
* This source code is licensed under the ISC license.
|
|
61
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/
|
|
63
|
-
/**
|
|
64
|
-
* @license lucide-react v0.574.0 - ISC
|
|
65
|
-
*
|
|
66
|
-
* This source code is licensed under the ISC license.
|
|
67
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/
|
|
69
|
-
/**
|
|
70
|
-
* @license lucide-react v0.574.0 - ISC
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the ISC license.
|
|
73
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* @license lucide-react v0.574.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/
|
|
81
|
-
/**
|
|
82
|
-
* @license lucide-react v0.574.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* @license lucide-react v0.574.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/
|
|
93
|
-
/**
|
|
94
|
-
* @license lucide-react v0.574.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/
|
|
99
|
-
/**
|
|
100
|
-
* @license lucide-react v0.574.0 - ISC
|
|
101
|
-
*
|
|
102
|
-
* This source code is licensed under the ISC license.
|
|
103
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/
|
|
105
|
-
/**
|
|
106
|
-
* @license lucide-react v0.574.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/
|
|
111
|
-
/**
|
|
112
|
-
* @license lucide-react v0.574.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/
|
|
117
|
-
/**
|
|
118
|
-
* @license lucide-react v0.574.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/
|
|
123
|
-
/**
|
|
124
|
-
* @license lucide-react v0.574.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/
|
|
129
|
-
/**
|
|
130
|
-
* @license lucide-react v0.574.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/
|
|
135
|
-
/**
|
|
136
|
-
* @license lucide-react v0.574.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/
|
|
141
|
-
/**
|
|
142
|
-
* @license lucide-react v0.574.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/
|
|
147
|
-
/**
|
|
148
|
-
* @license lucide-react v0.574.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/
|
|
153
|
-
/**
|
|
154
|
-
* @license lucide-react v0.574.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/
|
|
159
|
-
/**
|
|
160
|
-
* @license lucide-react v0.574.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/
|
|
165
|
-
/**
|
|
166
|
-
* @license lucide-react v0.574.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/
|
|
171
|
-
/**
|
|
172
|
-
* @license lucide-react v0.574.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/
|
|
177
|
-
/**
|
|
178
|
-
* @license lucide-react v0.574.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/
|
|
183
|
-
/**
|
|
184
|
-
* @license lucide-react v0.574.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/
|
|
189
|
-
/**
|
|
190
|
-
* @license lucide-react v0.574.0 - ISC
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the ISC license.
|
|
193
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/
|
|
195
|
-
/**
|
|
196
|
-
* @license lucide-react v0.574.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/
|
|
201
|
-
/**
|
|
202
|
-
* @license lucide-react v0.574.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/
|
|
207
|
-
/**
|
|
208
|
-
* @license lucide-react v0.574.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/
|
|
213
|
-
/**
|
|
214
|
-
* @license lucide-react v0.574.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/
|
|
219
|
-
/**
|
|
220
|
-
* @license lucide-react v0.574.0 - ISC
|
|
221
|
-
*
|
|
222
|
-
* This source code is licensed under the ISC license.
|
|
223
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
-
*/
|
|
225
|
-
/**
|
|
226
|
-
* @license lucide-react v0.574.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/
|
|
231
|
-
/**
|
|
232
|
-
* @license lucide-react v0.574.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/
|
|
237
|
-
/**
|
|
238
|
-
* @license lucide-react v0.574.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/
|
|
243
|
-
/**
|
|
244
|
-
* @license lucide-react v0.574.0 - ISC
|
|
245
|
-
*
|
|
246
|
-
* This source code is licensed under the ISC license.
|
|
247
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
-
*/
|
|
249
|
-
/**
|
|
250
|
-
* @license lucide-react v0.574.0 - ISC
|
|
251
|
-
*
|
|
252
|
-
* This source code is licensed under the ISC license.
|
|
253
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
-
*/
|
|
255
|
-
/**
|
|
256
|
-
* @license lucide-react v0.574.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/
|
|
261
|
-
/**
|
|
262
|
-
* @license lucide-react v0.574.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/
|
|
267
|
-
/**
|
|
268
|
-
* @license lucide-react v0.574.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/
|
|
273
|
-
/**
|
|
274
|
-
* @license lucide-react v0.574.0 - ISC
|
|
275
|
-
*
|
|
276
|
-
* This source code is licensed under the ISC license.
|
|
277
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
-
*/
|
|
279
|
-
/**
|
|
280
|
-
* @license lucide-react v0.574.0 - ISC
|
|
281
|
-
*
|
|
282
|
-
* This source code is licensed under the ISC license.
|
|
283
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
-
*/
|
|
285
|
-
/**
|
|
286
|
-
* @license lucide-react v0.574.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/
|
|
291
|
-
/**
|
|
292
|
-
* @license lucide-react v0.574.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/
|
|
297
|
-
/**
|
|
298
|
-
* @license lucide-react v0.574.0 - ISC
|
|
299
|
-
*
|
|
300
|
-
* This source code is licensed under the ISC license.
|
|
301
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
-
*/
|
|
303
|
-
/**
|
|
304
|
-
* @license lucide-react v0.574.0 - ISC
|
|
305
|
-
*
|
|
306
|
-
* This source code is licensed under the ISC license.
|
|
307
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
-
*/
|
|
309
|
-
/**
|
|
310
|
-
* @license lucide-react v0.574.0 - ISC
|
|
311
|
-
*
|
|
312
|
-
* This source code is licensed under the ISC license.
|
|
313
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
-
*/
|
|
315
|
-
/**
|
|
316
|
-
* @license lucide-react v0.574.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/
|
|
321
|
-
/**
|
|
322
|
-
* @license lucide-react v0.574.0 - ISC
|
|
323
|
-
*
|
|
324
|
-
* This source code is licensed under the ISC license.
|
|
325
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
-
*/
|
|
327
|
-
/**
|
|
328
|
-
* @license lucide-react v0.574.0 - ISC
|
|
329
|
-
*
|
|
330
|
-
* This source code is licensed under the ISC license.
|
|
331
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
332
|
-
*/
|
|
333
|
-
/**
|
|
334
|
-
* @license lucide-react v0.574.0 - ISC
|
|
335
|
-
*
|
|
336
|
-
* This source code is licensed under the ISC license.
|
|
337
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
-
*/
|
|
339
|
-
/**
|
|
340
|
-
* @license lucide-react v0.574.0 - ISC
|
|
341
|
-
*
|
|
342
|
-
* This source code is licensed under the ISC license.
|
|
343
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
-
*/
|
|
345
|
-
/**
|
|
346
|
-
* @license lucide-react v0.574.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/
|
|
351
|
-
;function oi(e){let t=/(!?)\[([^[\]<]+)\]\(/g,n=[],r=[],i=0,a=t.exec(e);for(;a!==null;){let o=a.index+a[0].length,s=ci(e,o);if(s!==-1){t.lastIndex=s+1;let c=e.slice(o,s).trim();a[1]!==`!`&&li(c)&&(n.push(ui(c)),r.push(e.slice(i,a.index)),r.push(`<a href="${ii}${n.length-1}\x00" ${ai}>${a[2]}</a>`),i=s+1)}a=t.exec(e)}return r.push(e.slice(i)),{html:r.join(``),hrefs:n}}function si(e,t){return e.replace(/\x00LINK_HREF(\d+)\x00/g,(e,n)=>{let r=t[Number.parseInt(n,10)];return r===void 0?e:r})}function ci(e,t){let n=1;for(let r=t;r<e.length;r++){let t=e[r];if(t===`<`)return-1;if(t===`(`)n++;else if(t===`)`&&(n--,n===0))return r}return-1}function li(e){if(e.includes(`\0`))return!1;let t;try{t=new URL(e)}catch{return!1}return ri.has(t.protocol)}function ui(e){return e.replace(/"/g,`"`).replace(/'/g,`'`)}var di=200,fi=/* @__PURE__ */ new Map,pi=/^[A-Za-z0-9][A-Za-z0-9+#._-]{0,19}$/,mi=/\n[ \t]*$/;function hi(e){let t=e.indexOf(`
|
|
352
|
-
`);if(t===-1)return{code:e.trim(),language:null};let n=e.slice(0,t).trim();return{code:e.slice(t+1).replace(mi,``),language:pi.test(n)?n.toLowerCase():null}}var gi="```",_i=`````;function vi(e,t){return`${e.slice(t+3)}\n`}function yi(e){let t=hi(e);return t.code.trim()!==``||t.language!==null||e.trim()===``?t:null}function bi(e,t){let n=e.lastIndexOf(`
|
|
353
|
-
`,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}function xi(e){let t=e.indexOf(gi);for(;t!==-1;){if(bi(e,t)){let n=yi(vi(e,t));if(n!==null)return{index:t,block:n}}t=e.indexOf(gi,t+3)}return null}var Si=`\0CODE_BLOCK`,Ci=/(\x00CODE_BLOCK\d+\x00)/,wi=`\0INLINE_CODE`;function Ti(e,t){let n=e.split(Ci);if(n.length===1)return null;let r=[],i=``,a=()=>{let e=i.trim();e!==``&&r.push({kind:`prose`,text:e}),i=``};return n.forEach((e,n)=>{if(n%2==0){i+=e;return}if(Number.parseInt(e.slice(11,-1),10)>=t){i+=e;return}a(),r.push({kind:`placeholder`,text:e})}),a(),r.some(e=>e.kind===`placeholder`)?r:null}var Ei=/^:?-+:?$/;function Di(e){var t,n;let r=e.trim();if(!r.includes(`|`))return null;let i=r.split(/(?<!\\)\|/);return((t=i[0])==null?void 0:t.trim())===``&&i.shift(),((n=i[i.length-1])==null?void 0:n.trim())===``&&i.pop(),i.length===0?null:i.map(e=>e.trim().replace(/\\\|/g,`|`))}function Oi(e){return e.every(e=>Ei.test(e))}function ki(e,t){let n=`<thead><tr>${e.map(e=>`<th>${e}</th>`).join(``)}</tr></thead>`,r=t.map(e=>`<tr>${e.map(e=>`<td>${e}</td>`).join(``)}</tr>`).join(``);return`<table>${n}${r===``?``:`<tbody>${r}</tbody>`}</table>`}function Ai(e,t){let n=(t==null?void 0:t.cache)??!0;if(n){let t=fi.get(e);if(t!==void 0)return t}let r=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),i=[];r=r.replace(/```([\s\S]*?)```/g,(e,t)=>{let n=yi(t);return n===null?`${_i}${t}${_i}`:(i.push(n),`${Si}${i.length-1}\x00`)});let a=xi(r);a!==null&&(i.push(a.block),r=`${r.slice(0,a.index)}${Si}${i.length-1}\x00`);let o=r.split(`
|
|
354
|
-
`),s=[],c=[],l=0,u=()=>{c.length!==0&&(s.push(`<p>${c.join(`<br>`)}</p>`),c.length=0)};for(;l<o.length;){let e=o[l];if(e.trim()===``){u(),l++;continue}let t=Di(e),n=o[l+1],r=n===void 0?null:Di(n);if(t&&r&&r.length===t.length&&Oi(r)){u(),l+=2;let e=[];for(;l<o.length;){let t=Di(o[l]);if(!t)break;e.push(t),l++}s.push(ki(t,e));continue}let a=e.match(/^(#{1,3})\s+(.+)$/);if(a){let e=a[1].length;u(),s.push(`<h${e}>${a[2]}</h${e}>`),l++;continue}if(e.match(/^[-*]\s+(.+)$/)){u();let e=[];for(;l<o.length;){let t=o[l].match(/^[-*]\s+(.+)$/);if(!t)break;e.push(`<li>${t[1]}</li>`),l++}s.push(`<ul>${e.join(``)}</ul>`);continue}if(e.match(/^(\d+)\.\s+(.+)$/)){u();let e=[];for(;l<o.length;){let t=o[l].match(/^(\d+)\.\s+(.+)$/);if(!t)break;e.push(`<li>${t[2]}</li>`),l++}s.push(`<ol>${e.join(``)}</ol>`);continue}if(e.includes(Si)){let t=Ti(e,i.length);if(t!==null){for(let e of t){if(e.kind===`prose`){c.push(e.text);continue}u(),s.push(e.text)}l++;continue}}c.push(e),l++}u(),r=s.join(``);let d=[];r=r.replace(/`([^`]+)`/g,(e,t)=>(d.push(t),`<code>${wi}${d.length-1}\x00</code>`));let f=oi(r);if(r=f.html,r=r.replace(/\x00INLINE_CODE(\d+)\x00/g,(e,t)=>{let n=d[Number.parseInt(t,10)];return n===void 0?e:n}),r=r.replace(/\*\*([^*]+)\*\*/g,`<strong>$1</strong>`),r=r.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g,`<em>$1</em>`),r=si(r,f.hrefs),r=r.replace(/\x00CODE_BLOCK(\d+)\x00/g,(e,t)=>{let n=i[parseInt(t,10)];return n===void 0?e:`<pre><code${n.language===null?``:` class="language-${n.language}"`}>${n.code}</code></pre>`}),n){if(fi.size>=di){let e=fi.keys().next().value;e!==void 0&&fi.delete(e)}fi.set(e,r)}return r}var ji=`wfl:`;function Mi(e){return e.startsWith(ji)}function Ni(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pi(e){return typeof e==`string`&&e.length>0}function Fi(e){if(!Ni(e))return null;let t=e.key;if(!Pi(t))return null;let n=e.label;if(!Ni(n)||typeof n.ru!=`string`||n.ru.trim().length===0||typeof n.en!=`string`||n.en.trim().length===0)return null;let r={ru:n.ru,en:n.en};switch(e.kind){case`text`:{let n=e.text;return typeof n!=`string`||n.length===0?null:{key:t,label:r,kind:`text`,text:n}}case`token`:{let n=e.token;return typeof n!=`string`||n.length===0?null:{key:t,label:r,kind:`token`,token:n}}case`list`:{let n=e.items;if(!Array.isArray(n)||n.length===0)return null;let i=[];for(let e of n){if(typeof e!=`string`||e.length===0)return null;i.push(e)}return{key:t,label:r,kind:`list`,items:i}}case`workflow`:{let n=e.workflowId,i=e.topic;if(typeof n!=`string`||n.length===0||!Ni(i)||i.kind!==`preset`)return null;let a=i.presetId;return typeof a!=`string`||a.length===0?null:{key:t,label:r,kind:`workflow`,workflowId:n,topic:{...i,kind:`preset`,presetId:a}}}default:return null}}function Ii(e){if(!Ni(e))return null;let t=e.facts;if(!Array.isArray(t))return null;let n=[];for(let e of t){let t=Fi(e);if(t===null)return null;n.push(t)}return{facts:n}}function Li(e){if(typeof e!=`object`||!e)return null;let t=e;return typeof t.ru==`string`&&t.ru.trim().length>0&&typeof t.en==`string`&&t.en.trim().length>0?{ru:t.ru,en:t.en}:null}function Ri(e,t){return e.includes(t)?e.filter(e=>e!==t):e}function zi(e,t){return e.includes(t)?e:[...e,t]}function Bi(e,t){return{answeredToolCallIds:zi(e.answeredToolCallIds,t),answeredByPageOnly:Ri(e.answeredByPageOnly,t),reofferedToolCallIds:Ri(e.reofferedToolCallIds,t)}}var Vi={pendingConfirmations:[],confirmationAnchors:{},confirmationStepAnchorId:null,answeredToolCallIds:[],answeredByPageOnly:[],reofferedToolCallIds:[],confirmationAnswerInFlight:!1};function Hi(e,t,n){return t.answeredToolCallIds===void 0||!t.answeredToolCallIds.includes(n)?!1:!e.reofferedToolCallIds.includes(n)||t.reofferedBeforeRead!==void 0&&t.reofferedBeforeRead.includes(n)}function Ui(e){return e.isStreaming||e.confirmationAnswerInFlight||e.permissionModeLane!==null}function Wi(e,t){return Mi(t)?e.confirmationAnswerInFlight||e.permissionModeLane!==null:Ui(e)}function Gi(e,t){let{toolCallId:n}=t,r=e.answeredByPageOnly.includes(n);if(e.answeredToolCallIds.includes(n)&&!r||e.pendingConfirmations.some(e=>e.toolCallId===n))return{kind:`redelivered`};let i=Ki(e);return{kind:`offered`,confirmation:{pendingConfirmations:[...e.pendingConfirmations,qi(t,i)],confirmationAnchors:{...e.confirmationAnchors,[n]:i},confirmationStepAnchorId:i,...r?{answeredToolCallIds:Ri(e.answeredToolCallIds,n),answeredByPageOnly:Ri(e.answeredByPageOnly,n),reofferedToolCallIds:zi(e.reofferedToolCallIds,n),pendingRefetch:!0}:{answeredToolCallIds:e.answeredToolCallIds,answeredByPageOnly:e.answeredByPageOnly,reofferedToolCallIds:e.reofferedToolCallIds}}}}function Ki(e){return e.streamingMessageId===null?e.confirmationStepAnchorId:e.streamingMessageId}function qi(e,t){let n=Li(e.title);return{toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,description:e.description,display:Ii(e.display),...n!==null&&{title:n},...e.operationTitles!==void 0&&{operationTitles:e.operationTitles},status:`open`,anchorMessageId:t}}function Ji(e){let t=e.pendingConfirmations;return t.some(e=>e.status===`open`)?{pendingConfirmations:t.map(e=>e.status===`open`?{...e,status:`rejecting`}:e)}:{pendingConfirmations:t}}function Yi(e,t){let n=e.pendingConfirmations.find(e=>e.toolCallId===t);return n===void 0||n.status!==`open`?e:{...e,pendingConfirmations:e.pendingConfirmations.map(e=>e.toolCallId===t?{...e,status:`resolving`}:e),confirmationAnswerInFlight:!0}}function Xi(e){return e.role===`assistant`&&e.content===``&&e.pendingActionStatus!==void 0}function Zi(e,t){let{messageId:n,status:r,anchorMessageId:i}=t;if(e.some(e=>e.id===n))return e.map(e=>e.id===n?{...e,pendingActionStatus:r}:e);let a={id:n,role:`assistant`,content:``,pendingActionStatus:r},o=i===null?-1:e.findIndex(e=>e.id===i);if(o===-1)return[...e,a];let s=o+1;for(;s<e.length;){let t=e[s];if(t===void 0||!Xi(t))break;s+=1}return[...e.slice(0,s),a,...e.slice(s)]}function Qi(e,t){let{messageId:n,toolCallId:r,status:i}=t,a=e.confirmationAnchors[r],o=Zi(e.messages,{messageId:n,status:i,anchorMessageId:a===void 0?null:a}),s=e.pendingConfirmations;return{messages:o,pendingConfirmations:s.some(e=>e.toolCallId===r)?s.filter(e=>e.toolCallId!==r):s,confirmationAnchors:Object.fromEntries(Object.entries(e.confirmationAnchors).filter(([e])=>e!==r)),...Bi(e,r)}}function $i(e){let t=e.pendingConfirmations,n=t.some(e=>e.status===`resolving`&&Mi(e.toolCallId))&&e.confirmationAnswerInFlight;return t.every(e=>e.status===`open`||e.status===`resolving`&&Mi(e.toolCallId))?{pendingConfirmations:t,pendingRefetch:e.pendingRefetch,confirmationAnswerInFlight:n}:{pendingConfirmations:t.flatMap(e=>e.status===`resolving`&&Mi(e.toolCallId)?[e]:e.status===`resolving`?[]:e.status===`rejecting`?[{...e,status:`open`}]:[e]),pendingRefetch:t.some(e=>e.status===`resolving`&&!Mi(e.toolCallId))?!0:e.pendingRefetch,confirmationAnswerInFlight:n}}function ea(e,t){let n=e.pendingConfirmations;return{pendingConfirmations:n.some(e=>e.toolCallId===t&&e.status===`resolving`)?n.map(e=>e.toolCallId===t&&e.status===`resolving`?{...e,status:`open`}:e):n,confirmationAnswerInFlight:!1}}function ta(e){return e.pendingConfirmations===void 0?Vi.pendingConfirmations:e.pendingConfirmations}function na(e,t){let n=ta(t);return!n.some(t=>e.answeredToolCallIds.includes(t.toolCallId))&&e.pendingConfirmations.every(r=>Hi(e,t,r.toolCallId)?!0:r.status===`open`&&n.some(e=>e.toolCallId===r.toolCallId))}function ra(e,t){let n=e.answeredToolCallIds,r=t.answeredToolCallIds,i={answeredToolCallIds:n,answeredByPageOnly:e.answeredByPageOnly,reofferedToolCallIds:e.reofferedToolCallIds};if(r===void 0)return i;let a=r.filter(r=>!n.includes(r)&&Hi(e,t,r));return a.length===0?i:{answeredToolCallIds:[...n,...a],answeredByPageOnly:[...e.answeredByPageOnly,...a],reofferedToolCallIds:e.reofferedToolCallIds.filter(e=>!a.includes(e))}}function ia(e,t){return{pendingConfirmations:ta(t),confirmationAnchors:Vi.confirmationAnchors,confirmationStepAnchorId:Vi.confirmationStepAnchorId,...ra(e,t),confirmationAnswerInFlight:e.confirmationAnswerInFlight}}function aa(e){return e.kind===`question`&&e.payload.origin===`assistant`}function oa(e){return(e.blocks??[]).flatMap(e=>{if(!aa(e))return[];let t=e.payload;return t.id!==e.id||!Array.isArray(t.questions)||![`pending`,`answered`,`cancelled`,`superseded`].includes(String(t.status))?[]:[e.payload]})}function sa(e){let t=/* @__PURE__ */ new Map;for(let n of e)for(let e of oa(n)){if(e.status!==`answered`)continue;let n=t.get(e.continuationTurnId);(n===void 0||e.continuationAttempt>n)&&t.set(e.continuationTurnId,e.continuationAttempt)}let n=!1,r=e.map(e=>{if(e.role!==`assistant`)return e;let r=t.get(e.id);return r===void 0||e.continuationAttempt===r||e.continuationAttempt!==void 0&&e.continuationAttempt>r?e:(n=!0,{...e,continuationAttempt:r})});return n?r:e}function ca(e,t){var n;let r=(n=e.find(e=>e.id===t))==null?void 0:n.continuationAttempt;for(let n of e)for(let e of oa(n))e.status===`answered`&&e.continuationTurnId===t&&(r===void 0||e.continuationAttempt>r)&&(r=e.continuationAttempt);return r}function la(e,t){return{id:e.id,role:`assistant`,content:``,continuationAttempt:t,...e.effort!==void 0&&{effort:e.effort},...e.blocks!==void 0&&{blocks:e.blocks}}}function ua(e,t){let n=e.find(e=>e.id===t.messageId),r=ca(e,t.messageId);return r!==void 0&&t.continuationAttempt<r?{kind:`lower-attempt`}:n!==void 0&&r===t.continuationAttempt&&t.replaceExisting!==!0?{kind:`same-attempt-replay`}:n===void 0?{kind:`accepted`,messages:[...e,{id:t.messageId,role:`assistant`,content:``,continuationAttempt:t.continuationAttempt,...t.effort!==void 0&&{effort:t.effort}}]}:{kind:`accepted`,messages:e.map(e=>e.id===t.messageId?la(e,t.continuationAttempt):e)}}function da(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n){for(let e of oa(n))if(e.status===`pending`)return e}}return null}function fa(e){return e.role===`assistant`||e.role===`agent`&&e.agentOrigin===`agent_question`}function pa(e,t){let n=[...e];for(let e of t){let t=n.findIndex(t=>t.id===e.id);t<0?n.push(e):e.revision>n[t].revision&&(n[t]=e)}return n}function ma(e,t){let n=new Map(t.messages.map(e=>[e.id,e]));return sa(e.map(e=>{if(!fa(e))return e;let r=n.get(e.id),i=pa(pa((r==null?void 0:r.blocks)??[],t.pendingMessageBlocks[e.id]??[]),e.blocks??[]);return i.length===0&&e.blocks===void 0?e:{...e,blocks:i}}))}function ha(e){let t={...e.pendingMessageBlocks},n=sa(e.messages.map(e=>{let n=t[e.id];return!n||!fa(e)?e:(delete t[e.id],{...e,blocks:pa(e.blocks??[],n)})})),r=da(n)??da(Object.entries(t).map(([e,t])=>({id:e,role:`assistant`,blocks:t})));return{...e,messages:n,pendingMessageBlocks:t,pendingQuestionBatch:r}}function ga(e,t){if(e.conversationId!==t.conversationId)return e;let{block:n,messageId:r}=t;if(!Number.isSafeInteger(n.revision)||n.revision<1)return e;let i=e.messages.find(e=>e.id===r);if(i&&!fa(i))return e;let a=((i==null?void 0:i.blocks)??e.pendingMessageBlocks[r]??[]).find(e=>e.id===n.id);if(a&&a.revision>=n.revision)return e;if(aa(n)){let i=oa({blocks:[n]})[0];if(!i||i.assistantMessageId!==r||i.conversationId!==t.conversationId)return e;if(i.status===`pending`&&e.pendingQuestionBatch&&e.pendingQuestionBatch.id!==i.id)return e.pendingRefetch?e:{...e,pendingRefetch:!0}}let o=pa(e.pendingMessageBlocks[r]??[],[n]);return ha({...e,pendingMessageBlocks:{...e.pendingMessageBlocks,[r]:o},pendingRefetch:!i||e.pendingRefetch})}function _a(e,t){return t.type!==`message-appended`&&t.type!==`block-upsert`||e.conversationId!==t.conversationId?!1:t.type===`message-appended`||!va(e,t.messageId)}function va(e,t){return e.messages.some(e=>e.id===t)}function ya(e,t){if(!_a(e,t))return e;if(va(e,t.messageId))return e.pendingRefetch?e:{...e,pendingRefetch:!0};let n=e.appendedRowsOwed.includes(t.messageId)?e.appendedRowsOwed:[...e.appendedRowsOwed,t.messageId];return e.pendingRefetch&&n===e.appendedRowsOwed?e:{...e,pendingRefetch:!0,appendedRowsOwed:n}}function ba(e,t){if(e.appendedRowsOwed.length===0)return null;let n=new Set(e.messages.map(e=>e.id)),r=new Set(e.appendedRowsOwed),i=t.messages.filter(e=>r.has(e.id)&&!n.has(e.id));if(i.length===0)return null;let a=new Map(t.messages.map((e,t)=>[e.id,t])),o=i.reduce((t,n)=>xa(t,n,a,e.streamingMessageId),e.messages),s=/* @__PURE__ */ new Set([...e.pendingConfirmations.map(e=>e.toolCallId),...e.answeredToolCallIds]),c=(t.pendingConfirmations??[]).filter(e=>Mi(e.toolCallId)&&!s.has(e.toolCallId)),l=new Set(i.map(e=>e.id));return{...e,messages:o,pendingConfirmations:c.length===0?e.pendingConfirmations:[...e.pendingConfirmations,...c],appendedRowsOwed:e.appendedRowsOwed.filter(e=>!l.has(e)),pendingRefetch:!0}}function xa(e,t,n,r){let i=n.get(t.id);if(i===void 0)return[...e,t];let a=e.findIndex(e=>{let t=n.get(e.id);return t!==void 0&&t>i}),o=r!==null&&!n.has(r)?e.findIndex(e=>e.id===r):-1,s=a>=0?a:o;return s<0?[...e,t]:[...e.slice(0,s),t,...e.slice(s)]}var Sa=/\S/,Ca={content:e=>Sa.test(e.content),thinkingText:e=>e.effort!==void 0&&mt(e.effort)&&e.thinkingText!==void 0&&e.thinkingText.length>0,toolCalls:e=>e.toolCalls!==void 0&&e.toolCalls.length>0,toolResults:(e,t)=>e.toolResults!==void 0&&e.toolResults.some(e=>t.isRenderableToolResult(e.result)),blocks:e=>e.blocks!==void 0&&e.blocks.length>0,pendingActionStatus:e=>e.pendingActionStatus!==void 0,attachments:e=>e.attachments!==void 0&&e.attachments.length>0};function wa(e,t){return Object.values(Ca).some(n=>n(e,t))}var Ta={conversationPermissionMode:null,permissionModeLane:null,completedPermissionModeLaneIds:/* @__PURE__ */ new Set};function Ea(e){return e.isStreaming||e.permissionModeLane!==null}function Da(e,t){return e===null||t.permissionModeVersion>e.permissionModeVersion}function Oa(e,t){return t.conversationId!==e.conversationId||!Da(e.conversationPermissionMode,t)?e:{...e,conversationPermissionMode:{permissionMode:t.permissionMode,permissionModeVersion:t.permissionModeVersion}}}function ka(e,t){return e===null?void 0:e.calls.find(e=>e.toolCallId===t)}function Aa(e,t){let n=e.completedPermissionModeLaneIds;return n.has(t)?n:new Set(n).add(t)}function ja(e,t){let{decisionLaneId:n,toolCallId:r}=t;if(e.completedPermissionModeLaneIds.has(n))return e;let i=e.permissionModeLane,a=i!==null&&i.decisionLaneId!==n,o=i===null||a?{decisionLaneId:n,calls:[]}:i,s=a&&i!==null?Aa(e,i.decisionLaneId):e.completedPermissionModeLaneIds;if(e.answeredToolCallIds.includes(r)||o.calls.some(e=>e.toolCallId===r))return o===i?e:{...e,permissionModeLane:o,completedPermissionModeLaneIds:s};let c=Ki(e);return{...e,permissionModeLane:{decisionLaneId:o.decisionLaneId,calls:[...o.calls,{toolCallId:r,offer:t,outcome:null,handedBack:!1}]},completedPermissionModeLaneIds:s,confirmationAnchors:{...e.confirmationAnchors,[r]:c},confirmationStepAnchorId:c}}function Ma(e,t){let n=e.permissionModeLane,r=ka(n,t);return n===null||r===void 0||r.handedBack?e:{...e,permissionModeLane:{...n,calls:n.calls.map(e=>e.toolCallId===t?{...e,handedBack:!0}:e)}}}function Na(e,t,n){let r=e.permissionModeLane,i=ka(r,t);return r===null||i===void 0||i.outcome===n?e:{...e,permissionModeLane:{...r,calls:r.calls.map(e=>e.toolCallId===t?{...e,outcome:n}:e)}}}function Pa(e,t){let n=e.permissionModeLane;return n===null||n.decisionLaneId!==t?e:{...e,permissionModeLane:null,completedPermissionModeLaneIds:Aa(e,t)}}function Fa(e){let t=e.permissionModeLane;if(t===null)return e;let n=new Set(e.pendingConfirmations.map(e=>e.toolCallId)),r=t.calls.filter(t=>t.outcome===null&&!t.handedBack&&!n.has(t.toolCallId)&&!e.answeredToolCallIds.includes(t.toolCallId)).map(t=>{let n=e.confirmationAnchors[t.toolCallId];return qi(t.offer,n===void 0?null:n)});return{...e,pendingConfirmations:r.length===0?e.pendingConfirmations:[...e.pendingConfirmations,...r],permissionModeLane:null,completedPermissionModeLaneIds:Aa(e,t.decisionLaneId)}}function Ia(e,t){var n;let r=e.conversationPermissionMode;if(t.permissionMode!==void 0&&t.permissionModeVersion!==void 0){if(t.permissionMode===null||t.permissionModeVersion===null)r=null;else{let e={permissionMode:t.permissionMode,permissionModeVersion:t.permissionModeVersion};Da(r,e)&&(r=e)}}let i=e.permissionModeLane,a=i!==null&&((n=t.decisionLaneCompletedIds)==null?void 0:n.includes(i.decisionLaneId))===!0;return{conversationPermissionMode:r,permissionModeLane:a?null:i,completedPermissionModeLaneIds:a&&i!==null?Aa(e,i.decisionLaneId):e.completedPermissionModeLaneIds}}function La(e){return!e.pendingSend&&!e.isStreaming}var Ra=[`agent_question`,`workflow_lead`],za={messages:[],isStreaming:!1,thinkingText:``,...Vi,...Ta,pendingQuestionBatch:null,pendingMessageBlocks:{},error:null,conversationId:null,streamingMessageId:null,thinkingStartedAt:null,pendingSend:!1,pendingRefetch:!1,appendedRowsOwed:[],ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null},Ba={thinkingText:``,thinkingStartedAt:null};function Va(e,t){if(e.streamingMessageId===null)return e;let n=e.streamingMessageId;return{...e,messages:e.messages.map(e=>e.id===n?t(e):e)}}function Ha(e){return typeof e==`object`&&!!e&&`mode`in e&&e.mode===`preview_confirm`&&`changeSetId`in e&&typeof e.changeSetId==`string`&&`projectId`in e&&typeof e.projectId==`string`}function Ua(e,t){return e.kind===`run_wait`&&typeof e.payload==`object`&&e.payload!==null&&`toolCallId`in e.payload&&e.payload.toolCallId===t}function Wa(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if((i==null?void 0:i.id)===t&&n(i))return!0}return!1}function Ga(e,t){let n=e[t];return typeof n==`string`?n:void 0}function Ka(e,t){let n=e[t];return typeof n==`number`&&Number.isInteger(n)&&n>=0?n:void 0}function qa(e){return e.pendingRefetch?e:{...e,pendingRefetch:!0}}function Ja(e,t){switch(t.type){case`conversation-permission-mode`:return Oa(e,t);case`action-required`:{if(t.decidedBy!==`permission_mode`)return null;let n=e.ignoredHydratedReplayMessageId,r=n===null?e:{...e,confirmationStepAnchorId:n},i=ja(r,t);return i===r?e:{...i,...Ba,isStreaming:!1,streamingMessageId:null,pendingSend:!1}}case`decision-complete`:return e.permissionModeLane!==null&&e.permissionModeLane.decisionLaneId===t.decisionLaneId?Pa(e,t.decisionLaneId):null;default:return null}}function Ya(e,t,n){let r=Ja(e,t);if(r!==null)return r;if(e.ignoredContinuationGeneration&&t.type!==`message-start`&&t.type!==`block-upsert`&&t.type!==`message-appended`&&(e.ignoredHydratedReplayMessageId===null||t.type!==`action-required`&&t.type!==`action-resolved`))return t.type===`done`?{...e,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null}:e;switch(t.type){case`text-delta`:return Va(e,e=>({...e,content:e.content+t.text}));case`reasoning-delta`:return{...e,thinkingText:e.thinkingText+t.text,thinkingStartedAt:e.thinkingStartedAt??Date.now()};case`reasoning-done`:{let t=e.thinkingStartedAt?Math.round((Date.now()-e.thinkingStartedAt)/1e3):0;return{...Va(e,n=>({...n,thinkingText:e.thinkingText,thinkingDuration:t})),thinkingText:``,thinkingStartedAt:null}}case`conversation-started`:return{...e,conversationId:t.conversationId};case`message-start`:{if(t.continuationAttempt!==void 0){let n=t.continuationAttempt,r=[...e.messages].reverse().find(e=>e.role===`user`),i=ua(e.messages,{messageId:t.messageId,continuationAttempt:n,replaceExisting:t.replaceExisting,effort:r==null?void 0:r.effort});return i.kind===`lower-attempt`?{...e,ignoredContinuationGeneration:!0,ignoredHydratedReplayMessageId:null}:i.kind===`same-attempt-replay`?e:{...e,...Ba,isStreaming:!0,streamingMessageId:t.messageId,error:null,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:i.messages}}let n=e.messages.findIndex(e=>e.id===t.messageId);if(n>=0&&!e.isStreaming){let r=e.messages[n];if(r.content.length>0)return{...e,ignoredContinuationGeneration:!0,ignoredHydratedReplayMessageId:t.messageId};if(r.role===`assistant`)return{...e,...Ba,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:e.messages.map((e,t)=>t===n?{id:e.id,role:`assistant`,content:``,...e.effort!==void 0&&{effort:e.effort},...e.blocks!==void 0&&{blocks:e.blocks}}:e)}}if(e.streamingMessageId&&e.messages.some(t=>t.id===e.streamingMessageId))return{...e,...Ba,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:e.messages.map(n=>n.id===e.streamingMessageId?{...n,id:t.messageId}:n)};let r=(()=>{let t=[...e.messages].reverse().find(e=>e.role===`user`);return t==null?void 0:t.effort})();return{...e,...Ba,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:[...e.messages,{id:t.messageId,role:`assistant`,content:``,...r!==void 0&&{effort:r}}]}}case`tool-call-complete`:{let n=Ka(t,`contentOffset`);return Va(e,e=>({...e,toolCalls:[...e.toolCalls??[],{toolCallId:t.toolCallId,toolName:t.toolName,...t.title!==void 0&&{title:t.title},...t.effect!==void 0&&{effect:t.effect},...t.operationTitles!==void 0&&{operationTitles:t.operationTitles},args:t.args,...n===void 0?{}:{contentOffset:n}}]}))}case`tool-result`:{let n=Va(e,e=>({...e,toolResults:[...e.toolResults??[],{toolCallId:t.toolCallId,result:t.result}]}));return!Ha(t.result)||e.streamingMessageId===null?n:{...n,confirmationAnchors:{...n.confirmationAnchors,[t.toolCallId]:e.streamingMessageId}}}case`action-required`:{let n=Ma(e,t.toolCallId),r=n.ignoredHydratedReplayMessageId,i=Gi(r===null?n:{...n,confirmationStepAnchorId:r},t);return i.kind===`redelivered`?n:{...n,...Ba,...i.confirmation,isStreaming:!1,streamingMessageId:null,pendingSend:!1,confirmationAnswerInFlight:n.confirmationAnswerInFlight}}case`action-resolved`:{let n=Na(e,t.toolCallId,t.status);if(t.status===`applied`||t.status===`partially_applied`||(n.pendingMessageBlocks[t.messageId]??[]).some(e=>Ua(e,t.toolCallId))||Wa(n.messages,t.messageId,e=>{var n,r;return((n=e.toolResults)==null?void 0:n.some(e=>e.toolCallId===t.toolCallId&&Ha(e.result)))===!0||((r=e.blocks)==null?void 0:r.some(e=>Ua(e,t.toolCallId)))===!0})){let e={...n.confirmationAnchors};return delete e[t.toolCallId],{...n,confirmationAnchors:e,...Bi(n,t.toolCallId)}}return{...n,...Qi(n,t)}}case`block-upsert`:return ga(e,t);case`message-appended`:return ya(e,t);case`done`:return{...e,...Ba,isStreaming:!1,streamingMessageId:null,pendingSend:!1,...$i(e)};case`error`:{let r=Ga(t,`errorCode`),i=Ga(t,`providerErrorCode`);return{...e,...Ba,error:{code:t.code,message:t.message,...r===void 0?{}:{errorCode:r},...i===void 0?{}:{providerErrorCode:i}},isStreaming:!1,streamingMessageId:null,pendingSend:!1,...$i(e),messages:e.messages.filter(t=>!(t.id===e.streamingMessageId&&t.role===`assistant`&&!wa(t,n)))}}default:return e}}function Xa(e){return function(t,n){switch(n.type){case`EVENT`:{let r=Ya(t,n.payload,e);return n.payload.type===`message-start`&&r!==t?ha(r):r}case`USER_MESSAGE`:{let{id:e,content:r,effort:i,attachments:a}=n.payload;return{...t,error:null,pendingSend:!0,...Ji(t),messages:[...t.messages,{id:e,role:`user`,content:r,...i!==void 0&&{effort:i},...a.length>0&&{attachments:a}}]}}case`ASSISTANT_PLACEHOLDER`:{let{id:e,effort:r}=n.payload,i=t.messages[t.messages.length-1],a=r===void 0?(i==null?void 0:i.role)===`user`?i.effort:void 0:r;return{...t,error:null,...Ba,messages:[...t.messages,{id:e,role:`assistant`,content:``,...a!==void 0&&{effort:a}}],isStreaming:!0,streamingMessageId:e}}case`CONFIRM_ACTION`:case`REJECT_ACTION`:return Yi(t,n.toolCallId);case`LEAD_DECISION_REFUSED`:return{...t,...ea(t,n.toolCallId)};case`DECISION_LANE_COMPLETE`:return t.confirmationAnswerInFlight?{...t,confirmationAnswerInFlight:!1}:t;case`CONVERSATION_PERMISSION_MODE`:return Oa(t,n.payload);case`PERMISSION_MODE_LANE_EXPIRED`:return Fa(t);case`HYDRATE_HISTORY`:{if(n.payload.conversationId!==t.conversationId)return t;if(!La(t)||n.payload.readDuringTurn===!0)return ba(t,n.payload)??qa(t);if(!na(t,n.payload))return qa(t);let e=ma(n.payload.messages,t),r=Object.fromEntries(Object.entries(t.pendingMessageBlocks).filter(([t])=>!e.some(e=>e.id===t))),i=da(e)??da(Object.entries(r).map(([e,t])=>({id:e,role:`assistant`,blocks:t})));return{...za,conversationId:t.conversationId,...ia(t,n.payload),...Ia(t,n.payload),messages:e,pendingQuestionBatch:i,pendingMessageBlocks:r,appendedRowsOwed:t.appendedRowsOwed.filter(t=>!e.some(e=>e.id===t))}}case`BIND_CONVERSATION`:return t.conversationId===n.payload.conversationId?t:{...za,conversationId:n.payload.conversationId};case`ADOPT_CONVERSATION`:return t.conversationId===null?{...t,conversationId:n.payload.conversationId}:t;case`RESET`:{let e=n.payload===void 0?null:n.payload.conversationId;return{...za,conversationId:e}}default:return t}}}function Za(e){return e.selectedOptionIds===void 0?e.customText===void 0?{questionId:e.questionId,skip:!0}:{questionId:e.questionId,customText:e.customText}:{questionId:e.questionId,selectedOptionIds:[...e.selectedOptionIds].sort()}}function Qa(e,t,n){return JSON.stringify({kind:`answer`,batchId:e,revision:t,answers:[...n].sort((e,t)=>e.questionId.localeCompare(t.questionId)).map(Za)})}function $a(e,t){return JSON.stringify({kind:`cancel`,batchId:e,revision:t})}async function eo(e,t){if(!e)throw Error(`Question retry identity requires a conversation`);let n=JSON.stringify([`chat-question-command-v1`,e,t]),r=new Uint8Array(await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(n)));r[6]=r[6]&15|128,r[8]=r[8]&63|128;let i=Array.from(r.slice(0,16),e=>e.toString(16).padStart(2,`0`)).join(``);return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}function to(){return{watched:{},hidden:!1}}function no(e){let t=e.type;throw Error(`jobStatusWatch: unhandled action type ${String(t)}`)}function ro(e,t){return Math.min(e.baseIntervalMs*e.backoffFactor**t,e.maxIntervalMs)}function io(e,t){return!e.terminal&&e.nextDueAt<=t}function ao(e,t,n){return{...e,watched:{...e.watched,[t]:n}}}function oo(e,t){return e.hidden?[]:Object.entries(e.watched).filter(([,e])=>io(e,t)).map(([e])=>e)}function so(e){if(e.hidden)return null;let t=null;for(let n of Object.values(e.watched))n.terminal||(t===null||n.nextDueAt<t)&&(t=n.nextDueAt);return t}function co(e){return function(t,n){switch(n.type){case`WATCH`:{let{agentJobId:r,seed:i,now:a}=n,o=t.watched[r];return o===void 0?{...t,watched:{...t.watched,[r]:{view:i,attempt:0,nextDueAt:a,terminal:i!==null&&e.isTerminal(i),error:null}}}:i===null||o.view!==null?t:ao(t,r,{...o,view:i,terminal:e.isTerminal(i)})}case`UNWATCH`:{let{agentJobId:e}=n;if(t.watched[e]===void 0)return t;let r={};for(let[n,i]of Object.entries(t.watched))n!==e&&(r[n]=i);return{...t,watched:r}}case`READ_OK`:{let{agentJobId:r,view:i,now:a}=n,o=t.watched[r];if(o===void 0)return t;if(e.isTerminal(i))return ao(t,r,{view:i,attempt:0,nextDueAt:a,terminal:!0,error:null});let s=o.view,c=s===null||e.activityStamp(s)!==e.activityStamp(i)?0:o.attempt+1;return ao(t,r,{view:i,attempt:c,nextDueAt:a+ro(e,c),terminal:!1,error:null})}case`READ_FAIL`:{let{agentJobId:r,error:i,now:a}=n,o=t.watched[r];if(o===void 0)return t;if(o.terminal)return ao(t,r,{...o,error:i});let s=o.attempt+1;return ao(t,r,{...o,attempt:s,nextDueAt:a+ro(e,s),error:i})}case`TICK`:{let{now:r}=n;if(t.hidden)return t;let i=Object.entries(t.watched).filter(([,e])=>io(e,r));if(i.length===0)return t;let a={...t.watched};for(let[t,n]of i)a[t]={...n,nextDueAt:r+ro(e,n.attempt)};return{...t,watched:a}}case`VISIBILITY`:{let{hidden:e,now:r}=n;if(e===t.hidden)return t;if(e)return{...t,hidden:!0};let i={};for(let[e,n]of Object.entries(t.watched))i[e]=n.terminal?n:{...n,nextDueAt:r};return{watched:i,hidden:!1}}default:return no(n)}}}var lo=class extends Error{constructor(e,t){super(`Chat command ${t} failed: ${e}`),this.name=`ChatTransportError`,this.code=e,this.requestId=t}};function uo(e){return e instanceof lo}var fo=3e4,po=class extends Error{constructor(e){super(`Chat capability load exceeded ${e}ms`),this.name=`CapabilityLoadTimeoutError`,this.timeoutMs=e}};function mo(e){return e instanceof po}function ho(e,t,n){let r=null,i=new Promise((e,i)=>{r=t.setTimeout(()=>i(new po(n)),n)});return Promise.race([e,i]).finally(()=>{r!==null&&t.clearTimeout(r)})}function go(e){return e.status===`ready`}function _o(e){return e.connectionStatus===`lost`||e.connectionStatus===`failed`?!1:e.isStreaming||go(e.capabilityLoad)}function vo(){return globalThis.crypto.randomUUID()}function yo(e){return e instanceof Error?e.message:String(e)}var bo=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},R=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},xo,So,Co,wo,To,Eo,Do,Oo,ko,Ao,jo,Mo,No,Po,Fo={status:`idle`};function Io(e,t){return e.status===`idle`||e.conversationId!==t?{status:`idle`}:e.status===`writing`?{status:`writing`}:{status:`failed`,attempted:e.attempted}}function Lo(e){let{conversationId:t,permissionModeWrite:n}=e,r=Io(n,t),i=r.status===`writing`&&n.status===`writing`?n.target:null;if(t!==null){let n=e.conversationPermissionMode;return n===null?{kind:`unknown`,read:`loading`}:{kind:`known`,scope:`conversation`,conversationId:t,value:i===null?n.permissionMode:i,version:n.permissionModeVersion,write:r}}let a=e.lastPermissionMode;return a===null?{kind:`unknown`,read:e.lastPermissionModeReadFailed?`failed`:`loading`}:{kind:`known`,scope:`last-choice`,conversationId:null,value:i===null?a:i,version:null,write:r}}var Ro=class{constructor(e){xo.add(this),So.set(this,void 0),Co.set(this,0),wo.set(this,0),To.set(this,null),Eo.set(this,0),Do.set(this,null),bo(this,So,e,`f`)}view(){return R(this,So,`f`).store.getSnapshot().permissionMode}async settledNewConversationMode(e){if(R(this,Do,`f`)===null)return e;for(;R(this,Do,`f`)!==null;)await R(this,Do,`f`);let t=this.view();return t.kind===`known`&&t.scope===`last-choice`?t.value:null}refresh(){let{store:e}=R(this,So,`f`);if(R(this,So,`f`).isDisposed()||e.state.conversationId!==null)return;let t=R(this,To,`f`);(t===null||t.epoch!==R(this,Co,`f`))&&R(this,xo,`m`,Oo).call(this)}rereadStale(){let{store:e}=R(this,So,`f`);R(this,So,`f`).isDisposed()||e.state.conversationId!==null||(e.update({lastPermissionMode:null}),R(this,xo,`m`,Oo).call(this))}set(e){if(R(this,So,`f`).isDisposed())return;let t=this.view();if(t.kind===`unknown`||t.write.status===`writing`)return;if(t.value===e){t.write.status===`failed`&&this.dismissFailure();return}bo(this,Eo,R(this,Eo,`f`)+1,`f`);let n=R(this,Eo,`f`),{conversationId:r}=t;R(this,So,`f`).store.update({permissionModeWrite:{status:`writing`,seq:n,conversationId:r,target:e}}),r===null?R(this,xo,`m`,Ao).call(this,n,e):R(this,xo,`m`,ko).call(this,n,r,e)}retry(){let e=R(this,So,`f`).store.state.permissionModeWrite;e.status===`failed`&&e.conversationId===R(this,So,`f`).store.state.conversationId&&(R(this,So,`f`).store.update({permissionModeWrite:Fo}),this.set(e.attempted))}dismissFailure(){R(this,So,`f`).store.state.permissionModeWrite.status===`failed`&&R(this,So,`f`).store.update({permissionModeWrite:Fo})}};So=/* @__PURE__ */ new WeakMap,Co=/* @__PURE__ */ new WeakMap,wo=/* @__PURE__ */ new WeakMap,To=/* @__PURE__ */ new WeakMap,Eo=/* @__PURE__ */ new WeakMap,Do=/* @__PURE__ */ new WeakMap,xo=/* @__PURE__ */ new WeakSet,Oo=function(){let{store:e,deps:t}=R(this,So,`f`);bo(this,Co,R(this,Co,`f`)+1,`f`);let n=R(this,Co,`f`);e.state.lastPermissionModeReadFailed&&e.update({lastPermissionModeReadFailed:!1});let r=()=>!R(this,So,`f`).isDisposed()&&n===R(this,Co,`f`),i={epoch:n,done:t.permissionModes.readLastChoice().then(e=>{r()&&R(this,xo,`m`,No).call(this,e)},n=>{t.logger.warn(`ChatSession: last permission mode read failed`,{error:yo(n)}),r()&&e.update({lastPermissionMode:null,lastPermissionModeReadFailed:!0})}).finally(()=>{R(this,To,`f`)===i&&bo(this,To,null,`f`)})};bo(this,To,i,`f`)},ko=function(e,t,n){let{deps:r}=R(this,So,`f`),i=R(this,xo,`m`,jo).call(this);r.permissionModes.setConversationMode(t,n).then(n=>{R(this,So,`f`).isDisposed()||(R(this,So,`f`).dispatch({type:`CONVERSATION_PERMISSION_MODE`,payload:{conversationId:t,...n}}),R(this,xo,`m`,Mo).call(this,i,n.permissionMode),R(this,xo,`m`,Po).call(this,e,Fo))},i=>{R(this,So,`f`).isDisposed()||(r.logger.warn(`ChatSession: conversation permission mode write failed`,{conversationId:t,error:yo(i)}),R(this,xo,`m`,Po).call(this,e,{status:`failed`,conversationId:t,attempted:n}))})},Ao=function(e,t){let{deps:n}=R(this,So,`f`),r=R(this,xo,`m`,jo).call(this),i=n.permissionModes.writeLastChoice(t).then(t=>{R(this,So,`f`).isDisposed()||(R(this,xo,`m`,Mo).call(this,r,t),R(this,xo,`m`,Po).call(this,e,Fo))},r=>{R(this,So,`f`).isDisposed()||(n.logger.warn(`ChatSession: last permission mode write failed`,{error:yo(r)}),R(this,xo,`m`,Po).call(this,e,{status:`failed`,conversationId:null,attempted:t}),R(this,So,`f`).store.state.conversationId===null&&R(this,xo,`m`,Oo).call(this))}).finally(()=>{R(this,Do,`f`)===i&&bo(this,Do,null,`f`)});bo(this,Do,i,`f`)},jo=function(){return bo(this,wo,R(this,wo,`f`)+1,`f`),R(this,wo,`f`)},Mo=function(e,t){bo(this,Co,R(this,Co,`f`)+1,`f`),e===R(this,wo,`f`)&&R(this,xo,`m`,No).call(this,t)},No=function(e){let{state:t}=R(this,So,`f`).store;(t.lastPermissionMode!==e||t.lastPermissionModeReadFailed)&&R(this,So,`f`).store.update({lastPermissionMode:e,lastPermissionModeReadFailed:!1})},Po=function(e,t){let n=R(this,So,`f`).store.state.permissionModeWrite;n.status===`writing`&&n.seq===e&&R(this,So,`f`).store.update({permissionModeWrite:t})};function zo(e,t){return e===t}function Bo(e,t){return t!==null&&t===e}function Vo(e,t){return e!==t&&e!==null}function Ho(e,t,n){return e||t?!1:n!==void 0&&n.role===`user`&&n.content.trim()!==``}var Uo=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Wo=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs=class{constructor(e,t,n,r){Go.add(this),Ko.set(this,void 0),qo.set(this,void 0),Jo.set(this,void 0),Yo.set(this,void 0),Xo.set(this,0),Zo.set(this,null),Qo.set(this,0),$o.set(this,0),es.set(this,0),ts.set(this,null),Uo(this,Ko,e,`f`),Uo(this,qo,t,`f`),Uo(this,Jo,n,`f`),Uo(this,Yo,r,`f`)}get generation(){return Wo(this,Xo,`f`)}get catchUpInFlight(){return Wo(this,Qo,`f`)>0}noteRowAnnounced(){Uo(this,ts,Wo(this,$o,`f`),`f`)}get rowsOwed(){return Wo(this,ts,`f`)!==null&&Wo(this,ts,`f`)>=Wo(this,es,`f`)}select(e,t){let{store:n,stallGuard:r,deps:i}=Wo(this,Ko,`f`),a=n.state.conversationId;if(e!==null&&e===a)return;let o=n.state.projectId;if(e!==null&&o===null){i.logger.error(`ChatSession: selection of a conversation with no project`,{conversationId:e});return}r.disarm(),Uo(this,Xo,Wo(this,Xo,`f`)+1,`f`),Uo(this,Qo,0,`f`),Uo(this,ts,null,`f`),Wo(this,qo,`f`).call(this);let s={historyLoad:{status:`idle`},restoredQuestionBatchIds:[],browserRunFailures:{},commandFailures:[],permissionModeWrite:Fo};if(e===null){Uo(this,Zo,null,`f`),Wo(this,Ko,`f`).dispatch({type:`RESET`,payload:{conversationId:null}}),n.update({conversationId:null,...s}),i.transport.close(),Wo(this,Yo,`f`).call(this);return}Uo(this,Zo,t===`stream-created`?e:null,`f`),Wo(this,Ko,`f`).dispatch(t===`stream-created`?{type:`ADOPT_CONVERSATION`,payload:{conversationId:e}}:{type:`BIND_CONVERSATION`,payload:{conversationId:e}}),n.update({conversationId:e,...s}),o!==null&&i.transport.open({conversationId:e,projectId:o,...i.open}).catch(t=>{i.logger.error(`ChatSession: transport.open failed`,{conversationId:e,error:yo(t)})}),t===`load-history`&&!Bo(e,Wo(this,Zo,`f`))&&this.readHistory(e,`selection`)}async readHistory(e,t){let{store:n,deps:r}=Wo(this,Ko,`f`),i=Wo(this,Xo,`f`);Uo(this,$o,Wo(this,$o,`f`)+1,`f`);let a=Wo(this,$o,`f`),o=()=>!Wo(this,Ko,`f`).isDisposed()&&i===Wo(this,Xo,`f`)&&zo(e,n.state.conversationId);t===`selection`?n.update({historyLoad:{status:`loading`,conversationId:e}}):Uo(this,Qo,Wo(this,Qo,`f`)+1,`f`);let s=n.state.chat.reofferedToolCallIds,c=!La(n.state.chat),l;try{let t=Wo(this,Jo,`f`).currentLaneId();l=await r.conversations.loadHistory(e,t===null?void 0:t)}catch(i){return o()?(r.logger.error(`ChatSession: history read failed`,{conversationId:e,mode:t,error:yo(i)}),Wo(this,Go,`m`,ns).call(this,a,e,t,null)?`superseded`:t===`catch-up`?`failed`:(this.select(null,`load-history`),n.update({historyLoad:{status:`failed`,conversationId:e,notFound:!1}}),`failed`)):`left`}finally{t===`catch-up`&&i===Wo(this,Xo,`f`)&&Uo(this,Qo,Wo(this,Qo,`f`)-1,`f`)}if(!o())return`left`;if(l.kind===`not-found`){r.logger.warn(`ChatSession: conversation no longer exists \u2014 forgotten`,{conversationId:e});let t=n.state.projectId;return t!==null&&r.memory.forget(t).catch(e=>{r.logger.error(`ChatSession: memory.forget failed`,{projectId:t,error:yo(e)})}),this.select(null,`load-history`),n.update({historyLoad:{status:`failed`,conversationId:e,notFound:!0}}),`failed`}let{page:u}=l;return Wo(this,Go,`m`,ns).call(this,a,e,t,u)?`superseded`:(Uo(this,es,a,`f`),t===`selection`&&n.update({historyLoad:{status:`idle`},restoredQuestionBatchIds:u.messages.flatMap(oa).map(e=>e.id)}),Wo(this,Ko,`f`).dispatch({type:`HYDRATE_HISTORY`,payload:{...u,conversationId:e,reofferedBeforeRead:s,readDuringTurn:c}}),Wo(this,Jo,`f`).onHistory(u),`applied`)}};Ko=/* @__PURE__ */ new WeakMap,qo=/* @__PURE__ */ new WeakMap,Jo=/* @__PURE__ */ new WeakMap,Yo=/* @__PURE__ */ new WeakMap,Xo=/* @__PURE__ */ new WeakMap,Zo=/* @__PURE__ */ new WeakMap,Qo=/* @__PURE__ */ new WeakMap,$o=/* @__PURE__ */ new WeakMap,es=/* @__PURE__ */ new WeakMap,ts=/* @__PURE__ */ new WeakMap,Go=/* @__PURE__ */ new WeakSet,ns=function(e,t,n,r){return e>=Wo(this,es,`f`)?!1:(Wo(this,Ko,`f`).deps.logger.debug(`ChatSession: history page superseded by a newer read`,{conversationId:t,mode:n,read:e,newestLandedRead:Wo(this,es,`f`)}),n===`selection`&&Wo(this,Ko,`f`).store.update({historyLoad:{status:`idle`},...r===null?{}:{restoredQuestionBatchIds:r.messages.flatMap(oa).map(e=>e.id)}}),!0)};function is(e,t){return e.runnerType===`extension`&&e.panelId===t}var as={streamStalled:`client.stream_stalled`,connectionLostDuringStream:`client.connection_lost_during_stream`,turnHeldUnsent:`client.turn_held_unsent`,permissionModeChanged:`client.permission_mode_changed`,browserApiActionFailed:`client.browser_api_action_failed`,atlasHostActionFailed:`client.atlas_host_action_failed`,aiRunHostActionFailed:`client.ai_run_host_action_failed`,workflowHostActionFailed:`client.workflow_host_action_failed`};function os(e){return e}function ss(e,t){return os({type:`error`,code:`internal`,message:t,fatal:!1,category:e===as.streamStalled?`transient`:`persistent`,errorCode:e})}function cs(){return ss(as.streamStalled,`stream made no progress`)}function ls(e){return os({type:`error`,code:e.errorCode,message:e.errorMessage===null?`chat-send rejected: ${e.errorCode}`:e.errorMessage,fatal:!1,category:`persistent`,errorCode:e.errorCode})}function us(){return{type:`done`,totalCreditsUsed:0}}var ds=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},fs=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},ps,ms,hs,gs,_s,vs,ys;function bs(e,t){let{conversationId:n,toolCallId:r}=t;switch(t.kind){case`api-request-in-browser`:case`api-step-in-browser`:{var i;let a=(i=e.executeApiHostAction)==null?void 0:i.bind(e);return a===void 0?null:async()=>{let e=await a(t);return e===null?null:{name:`chat-host-action-complete`,conversationId:n,toolCallId:r,historyId:e}}}case`atlas-crawl-in-tab`:{var a;let i=(a=e.executeAtlasHostAction)==null?void 0:a.bind(e);return i===void 0?null:async()=>{let e=await i(t);return e===null?null:{name:`chat-atlas-host-action-complete`,conversationId:n,toolCallId:r,atlasRunId:e}}}case`ai-run-in-browser`:{var o;let i=(o=e.executeAiRunHostAction)==null?void 0:o.bind(e);return i===void 0?null:async()=>{let e=await i(t);return e===null?null:{name:`chat-ai-host-action-complete`,conversationId:n,toolCallId:r,aiRunId:e}}}case`workflow-host-in-browser`:{var s;let n=(s=e.executeWorkflowHostAction)==null?void 0:s.bind(e);return n===void 0?null:async()=>(await n(t),null)}}}function xs(e){switch(e.kind){case`api-request-in-browser`:case`api-step-in-browser`:return as.browserApiActionFailed;case`atlas-crawl-in-tab`:return as.atlasHostActionFailed;case`ai-run-in-browser`:return as.aiRunHostActionFailed;case`workflow-host-in-browser`:return as.workflowHostActionFailed}}var Ss=class{constructor(e,t){ps.add(this),ms.set(this,void 0),hs.set(this,void 0),gs.set(this,/* @__PURE__ */ new Set),ds(this,ms,e,`f`),ds(this,hs,t,`f`)}reset(){fs(this,gs,`f`).clear()}handle(e){let{deps:t,store:n}=fs(this,ms,`f`),r=e.hostAction;if(r.toolCallId!==e.toolCallId||n.state.conversationId!==r.conversationId){t.logger.error(`ChatSession: deferred host action identity mismatch`,{toolCallId:e.toolCallId,conversationId:r.conversationId});return}if(!is(t.open,r.executorPanelId)){t.logger.debug(`ChatSession: deferred host action for another panel \u2014 not executed here`,{toolCallId:r.toolCallId,kind:r.kind});return}let i=t.browser===null?null:bs(t.browser,r);if(i===null){t.logger.error(`ChatSession: deferred action on a host without a browser port`,{toolCallId:r.toolCallId,kind:r.kind});return}let a=`${r.conversationId}:${r.toolCallId}`;fs(this,gs,`f`).has(a)||(fs(this,gs,`f`).add(a),fs(this,ps,`m`,vs).call(this,r,i).finally(()=>fs(this,gs,`f`).delete(a)))}};ms=/* @__PURE__ */ new WeakMap,hs=/* @__PURE__ */ new WeakMap,gs=/* @__PURE__ */ new WeakMap,ps=/* @__PURE__ */ new WeakSet,_s=function(e){return!fs(this,ms,`f`).isDisposed()&&fs(this,ms,`f`).store.state.conversationId===e.conversationId},vs=async function(e,t){let n;try{n=await t()}catch(t){fs(this,ms,`f`).deps.logger.error(`ChatSession: deferred host action failed`,{toolCallId:e.toolCallId,kind:e.kind,errorType:t instanceof Error?t.name:typeof t}),fs(this,ps,`m`,_s).call(this,e)&&fs(this,ms,`f`).feedLocalEvent(ss(xs(e),`deferred host action did not finish`));return}n!==null&&fs(this,ps,`m`,_s).call(this,e)&&await fs(this,ps,`m`,ys).call(this,e,n)},ys=async function(e,t){let{deps:n}=fs(this,ms,`f`),r;try{r=await n.transport.send({...t,requestId:fs(this,ms,`f`).newId()})}catch(t){n.logger.warn(`ChatSession: host action completion was not delivered`,{toolCallId:e.toolCallId,kind:e.kind,error:yo(t)});return}r.status!==`accepted`&&(n.logger.warn(`ChatSession: host action completion was rejected`,{toolCallId:e.toolCallId,kind:e.kind,errorCode:r.errorCode}),fs(this,ps,`m`,_s).call(this,e)&&fs(this,hs,`f`).refetchHistory())};var Cs={phase:`idle`},ws=`chat.busy`,Ts=1;function Es(e,t){if(t.type===`ABORTED`)return Cs;if(t.type===`CAPTURE_REQUESTED`)return{phase:`awaiting_turn_end`,req:t.req};switch(e.phase){case`idle`:return e;case`awaiting_turn_end`:return t.type===`TURN_SETTLED`?{phase:`capturing`,req:e.req}:e;case`capturing`:return t.type===`CAPTURE_DONE`&&t.captureRequestId===e.req.captureRequestId?{phase:`delivering`,req:e.req}:e;case`delivering`:return t.type===`DELIVERY_SETTLED`||t.type===`DELIVERY_REJECTED`?Cs:e;default:return e}}function Ds(e,t){return e===ws&&t<Ts}function Os(e){switch(e.phase){case`idle`:return`idle`;case`awaiting_turn_end`:case`capturing`:return`scanning`;case`delivering`:return`delivering`;default:return e}}var ks=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},z=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws=class{constructor(e){As.add(this),js.set(this,void 0),Ms.set(this,Cs),Ns.set(this,null),Ps.set(this,0),Fs.set(this,!1),Is.set(this,!1),Ls.set(this,null),ks(this,js,e,`f`)}get phase(){return z(this,Ms,`f`)}get failureReason(){let e=z(this,Ns,`f`);return z(this,Ms,`f`).phase!==`delivering`||e===null?null:e.status===`failed`?e.reason:null}request(e){z(this,As,`m`,Rs).call(this),z(this,As,`m`,Bs).call(this,{type:`CAPTURE_REQUESTED`,req:e})}onEvent(e){let t=z(this,Ms,`f`);if(t.phase===`delivering`&&z(this,Is,`f`)){(e.type===`done`||e.type===`error`)&&(ks(this,Is,!1,`f`),z(this,As,`m`,Bs).call(this,{type:`DELIVERY_SETTLED`}));return}if(e.type===`done`){if(t.phase===`awaiting_turn_end`){z(this,As,`m`,Bs).call(this,{type:`TURN_SETTLED`}),z(this,As,`m`,Hs).call(this,t.req);return}t.phase===`delivering`&&z(this,Fs,`f`)&&(ks(this,Fs,!1,`f`),z(this,As,`m`,Us).call(this,t.req))}}abort(){z(this,As,`m`,Rs).call(this),z(this,As,`m`,Bs).call(this,{type:`ABORTED`})}};js=/* @__PURE__ */ new WeakMap,Ms=/* @__PURE__ */ new WeakMap,Ns=/* @__PURE__ */ new WeakMap,Ps=/* @__PURE__ */ new WeakMap,Fs=/* @__PURE__ */ new WeakMap,Is=/* @__PURE__ */ new WeakMap,Ls=/* @__PURE__ */ new WeakMap,As=/* @__PURE__ */ new WeakSet,Rs=function(){var e;(e=z(this,Ls,`f`))==null||e.abort(),ks(this,Ls,null,`f`),ks(this,Ns,null,`f`),ks(this,Ps,0,`f`),ks(this,Fs,!1,`f`),ks(this,Is,!1,`f`)},zs=function(){return z(this,Ms,`f`).phase},Bs=function(e){let t=Es(z(this,Ms,`f`),e);t!==z(this,Ms,`f`)&&(ks(this,Ms,t,`f`),z(this,js,`f`).onChange())},Vs=function(e){let t=z(this,Ms,`f`);return t.phase!==`idle`&&t.req.captureRequestId===e.captureRequestId},Hs=function(e){z(this,js,`f`).browser.capturePage({toolCallId:e.toolCallId,captureRequestId:e.captureRequestId}).then(t=>{if(z(this,Ms,`f`).phase===`capturing`&&z(this,As,`m`,Vs).call(this,e)){if(z(this,As,`m`,Bs).call(this,{type:`CAPTURE_DONE`,captureRequestId:t.captureRequestId}),z(this,As,`m`,zs).call(this)!==`delivering`){z(this,js,`f`).logger.error(`page analysis: capture answered for another request`,{expected:e.captureRequestId,received:t.captureRequestId}),this.abort();return}t.status===`failed`&&z(this,js,`f`).logger.warn(`page analysis: capture failed \u2014 delivered as a failure report`,{captureRequestId:e.captureRequestId,reason:t.reason}),ks(this,Ns,t,`f`),ks(this,Ps,0,`f`),z(this,js,`f`).onChange(),z(this,As,`m`,Us).call(this,e)}},t=>{z(this,As,`m`,Vs).call(this,e)&&(z(this,js,`f`).logger.error(`page analysis: capture rejected`,{captureRequestId:e.captureRequestId,error:t instanceof Error?t.message:String(t)}),this.abort())})},Us=function(e){let t=z(this,Ns,`f`);if(t===null||t.captureRequestId!==e.captureRequestId){z(this,js,`f`).logger.error(`page analysis: delivering without the matching snapshot`,{captureRequestId:e.captureRequestId}),this.abort();return}let n=new AbortController;ks(this,Ls,n,`f`),z(this,js,`f`).deliver(t,n.signal).then(t=>{if(z(this,Ms,`f`).phase===`delivering`&&z(this,As,`m`,Vs).call(this,e))switch(t.kind){case`accepted`:ks(this,Is,!0,`f`);return;case`rejected`:if(Ds(t.ack.errorCode,z(this,Ps,`f`))){ks(this,Ps,z(this,Ps,`f`)+1,`f`),ks(this,Fs,!0,`f`);return}z(this,js,`f`).logger.warn(`page analysis: delivery rejected \u2014 dropped`,{captureRequestId:e.captureRequestId,errorCode:t.ack.errorCode}),z(this,As,`m`,Rs).call(this),z(this,As,`m`,Bs).call(this,{type:`DELIVERY_REJECTED`}),z(this,js,`f`).onDeliveryDropped(t.ack);return;case`transport-failed`:this.abort();return;case`abandoned`:return;default:return t}})};function Gs(e){if(typeof e!=`object`||!e||!(`defaultSelectionId`in e))return null;let t=e.defaultSelectionId;return t===null||typeof t==`string`?{defaultSelectionId:t}:null}var Ks=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},B=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},V,H,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc,uc,dc,fc,pc;function mc(e,t){return e===null||t===null?e===t:e.confirmAll===t.confirmAll?e.current===null||t.current===null?e.current===t.current:e.current.toolCallId===t.current.toolCallId&&e.current.verdict===t.current.verdict:!1}function hc(e){let t=e.errorCode;return typeof t==`string`?t:e.code}function gc(e){let t=e.toolCallId;return typeof t==`string`?t:null}function _c(e){if(typeof e!=`object`||!e)return null;let t=e;return t.accepted===!0&&typeof t.decisionLaneId==`string`?t.decisionLaneId:null}var vc=class{constructor(e,t,n,r){V.add(this),H.set(this,void 0),qs.set(this,void 0),Js.set(this,void 0),Ys.set(this,void 0),Xs.set(this,null),Zs.set(this,[]),Qs.set(this,/* @__PURE__ */ new Set),Ks(this,H,e,`f`),Ks(this,qs,t,`f`),Ks(this,Js,n,`f`),Ks(this,Ys,r,`f`)}get hasPendingDecision(){return B(this,Xs,`f`)!==null}get pendingDecisionLaneId(){var e;return((e=B(this,Xs,`f`))==null?void 0:e.decisionLaneId)??null}consumeHistoryCompletion(e){let t=B(this,Xs,`f`);t!==null&&t.decisionLaneId!==null&&e!=null&&e.includes(t.decisionLaneId)&&B(this,V,`m`,$s).call(this)}stop(){B(this,H,`f`).isDisposed()||(Ks(this,Zs,[],`f`),B(this,Qs,`f`).clear(),B(this,V,`m`,uc).call(this),B(this,Ys,`f`).abortPageAnalysis(),B(this,Js,`f`).stopAwaitingTurns(),B(this,H,`f`).store.state.conversationId!==null&&(B(this,H,`f`).stallGuard.noteCommand(`chat-stop`),B(this,V,`m`,lc).call(this,{name:`chat-stop`,requestId:B(this,H,`f`).newId()},`chat-stop`,null)))}answerConfirmation(e,t,n){B(this,V,`m`,ec).call(this,e,t,!1,!1,t===`confirm`?n:null)}answerChangeSet(e,t){B(this,V,`m`,ec).call(this,e,t,!0,!1,null)}rejectRunWait(e){B(this,V,`m`,ec).call(this,e,`reject`,!0,!1,null)}confirmAll(e,t=[]){if(B(this,H,`f`).isDisposed()||B(this,Xs,`f`)!==null||B(this,Zs,`f`).length>0)return;let n=new Set(B(this,H,`f`).store.state.chat.pendingConfirmations.filter(e=>e.status===`open`).map(e=>e.toolCallId));Ks(this,Qs,new Set(t),`f`),Ks(this,Zs,[...new Set(e)].filter(e=>n.has(e)||B(this,Qs,`f`).has(e)),`f`),this.maybeSendBulkConfirmation()}maybeSendBulkConfirmation(){B(this,V,`m`,rc).call(this),B(this,V,`m`,uc).call(this)}consumeDecisionOutcome(e){let t=B(this,V,`m`,ic).call(this,e);return B(this,V,`m`,uc).call(this),t}abandonPendingDecision(){let e=B(this,Xs,`f`);e!==null&&(Ks(this,Xs,null,`f`),Ks(this,Zs,[],`f`),B(this,Qs,`f`).clear(),B(this,H,`f`).deps.logger.warn(`ChatSession: tool decision abandoned \u2014 its lane ended locally`,{command:e.command,toolCallId:e.toolCallId,resolved:e.resolved}),e.resolved||B(this,Ys,`f`).refetchHistory(),B(this,V,`m`,uc).call(this))}forgetPendingDecision(){Ks(this,Xs,null,`f`),Ks(this,Zs,[],`f`),B(this,Qs,`f`).clear(),B(this,V,`m`,uc).call(this)}answerQuestion(e){return B(this,V,`m`,fc).call(this,{name:`chat-question-answer`,requestId:B(this,H,`f`).newId(),batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey,answers:e.answers,modelSelectionId:B(this,H,`f`).store.state.modelSelectionId})}cancelQuestion(e){return B(this,V,`m`,fc).call(this,{name:`chat-question-cancel`,requestId:B(this,H,`f`).newId(),batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey})}};H=/* @__PURE__ */ new WeakMap,qs=/* @__PURE__ */ new WeakMap,Js=/* @__PURE__ */ new WeakMap,Ys=/* @__PURE__ */ new WeakMap,Xs=/* @__PURE__ */ new WeakMap,Zs=/* @__PURE__ */ new WeakMap,Qs=/* @__PURE__ */ new WeakMap,V=/* @__PURE__ */ new WeakSet,$s=function(){Ks(this,Xs,null,`f`),B(this,H,`f`).dispatch({type:`DECISION_LANE_COMPLETE`}),B(this,V,`m`,uc).call(this)},ec=function(e,t,n,r,i){if(B(this,H,`f`).isDisposed()||B(this,Xs,`f`)!==null)return;let a=B(this,H,`f`).store.state.chat;if(Wi(a,e)||!n&&!a.pendingConfirmations.some(t=>t.toolCallId===e&&t.status===`open`))return;let o=t===`confirm`?`chat-tool-confirm`:`chat-tool-reject`;Ks(this,Xs,{command:o,verdict:t,toolCallId:e,requestId:B(this,H,`f`).newId(),edits:i,decisionLaneId:null,bulk:r,expiredResend:!1,resolved:!1},`f`),B(this,V,`m`,uc).call(this),n||B(this,H,`f`).dispatch({type:t===`confirm`?`CONFIRM_ACTION`:`REJECT_ACTION`,toolCallId:e}),B(this,V,`m`,tc).call(this,B(this,H,`f`).store.state.modelSelectionId)},tc=function(e){let t=B(this,Xs,`f`);if(t===null)return;Mi(t.toolCallId)||B(this,H,`f`).stallGuard.noteCommand(t.command);let n={requestId:t.requestId,toolCallId:t.toolCallId,modelSelectionId:e};B(this,V,`m`,lc).call(this,t.command===`chat-tool-confirm`?{name:`chat-tool-confirm`,...n,edits:t.edits}:{name:`chat-tool-reject`,...n},t.command,t.toolCallId)},nc=function(e,t,n,r,i){let a=B(this,Xs,`f`);return n.errorCode!==`selection_expired`||a===null||a.command!==e||a.toolCallId!==t||a.expiredResend?!1:(B(this,Ys,`f`).recoverSelection(n.result,{command:e,toolCallId:t}).then(o=>{if(r()&&B(this,Xs,`f`)===a){if(o===null){i({command:e,toolCallId:t,reason:`rejected`,errorCode:n.errorCode});return}Ks(this,Xs,{...a,requestId:B(this,H,`f`).newId(),expiredResend:!0},`f`),B(this,V,`m`,tc).call(this,o)}}),!0)},rc=function(){if(B(this,Xs,`f`)!==null||B(this,Zs,`f`).length===0)return;let e=B(this,H,`f`).store.state.chat;Ks(this,Zs,B(this,Zs,`f`).filter(t=>B(this,Qs,`f`).has(t)||e.pendingConfirmations.some(e=>e.toolCallId===t&&e.status===`open`)),`f`);let t=B(this,Zs,`f`).find(t=>!Wi(e,t));t!==void 0&&(Ks(this,Zs,B(this,Zs,`f`).filter(e=>e!==t),`f`),B(this,V,`m`,ec).call(this,t,`confirm`,B(this,Qs,`f`).has(t),!0,null))},ic=function(e){if(e.type===`error`){let t=gc(e);if(t!==null)return B(this,V,`m`,oc).call(this,e,t)}let t=B(this,Xs,`f`);if(t===null)return!1;if(e.type===`decision-complete`&&e.toolCallId===t.toolCallId&&e.decisionLaneId===t.decisionLaneId)return B(this,V,`m`,$s).call(this),!1;if(Mi(t.toolCallId))return B(this,V,`m`,ac).call(this,e);if((e.type===`error`||e.type===`done`)&&t.decisionLaneId===null)return B(this,H,`f`).deps.logger.debug(`ChatSession: pre-ack frame of a tool decision \u2014 ack decides`,{command:t.command,toolCallId:t.toolCallId,type:e.type}),!0;if(e.type===`error`&&t.resolved)return Ks(this,Zs,[],`f`),B(this,Qs,`f`).clear(),!1;if(e.type===`error`&&!t.resolved){Ks(this,Xs,null,`f`);let n=hc(e);return B(this,H,`f`).deps.logger.warn(`ChatSession: tool decision failed before it resolved`,{command:t.command,toolCallId:t.toolCallId,errorCode:n}),B(this,V,`m`,sc).call(this,{command:t.command,toolCallId:t.toolCallId,reason:`rejected`,errorCode:n}),!0}return e.type===`action-resolved`&&e.toolCallId===t.toolCallId&&(t.resolved=!0),e.type===`action-required`&&t.resolved||e.type===`done`&&(t.resolved||(Ks(this,Zs,[],`f`),B(this,Qs,`f`).clear(),B(this,Ys,`f`).refetchHistory())),!1},ac=function(e){let t=B(this,Xs,`f`);return t===null||e.type===`action-resolved`&&e.toolCallId===t.toolCallId&&(t.resolved=!0),!1},oc=function(e,t){let n=B(this,Xs,`f`),r=hc(e);return n===null||n.toolCallId!==t?(B(this,H,`f`).deps.logger.debug(`ChatSession: refusal of a card this client is not answering \u2014 dropped`,{toolCallId:t,errorCode:r,pendingToolCallId:n===null?null:n.toolCallId}),!0):(Ks(this,Xs,null,`f`),B(this,H,`f`).deps.logger.warn(`ChatSession: card decision refused`,{command:n.command,toolCallId:n.toolCallId,errorCode:r}),B(this,V,`m`,sc).call(this,{command:n.command,toolCallId:n.toolCallId,reason:`rejected`,errorCode:r}),!0)},sc=function(e){if(Ks(this,Zs,[],`f`),B(this,Qs,`f`).clear(),B(this,V,`m`,uc).call(this),B(this,V,`m`,dc).call(this,e.command,e.toolCallId,e),e.toolCallId!==null&&Mi(e.toolCallId)){B(this,H,`f`).dispatch({type:`LEAD_DECISION_REFUSED`,toolCallId:e.toolCallId});return}B(this,H,`f`).store.state.chat.isStreaming||B(this,H,`f`).feedLocalEvent(us())},cc=function(e,t){return uo(e)?e.code:(B(this,H,`f`).deps.logger.error(`ChatSession: transport.send broke its rejection contract`,{command:t,error:yo(e)}),`connection_closed`)},lc=function(e,t,n){let r=B(this,qs,`f`).generation,i=()=>!B(this,H,`f`).isDisposed()&&r===B(this,qs,`f`).generation,a=e=>{let r=B(this,Xs,`f`);if(r!==null&&r.command===t&&r.toolCallId===n){Ks(this,Xs,null,`f`),B(this,V,`m`,sc).call(this,e);return}B(this,V,`m`,dc).call(this,t,n,e)};B(this,H,`f`).deps.transport.send(e).then(e=>{if(i()){if(e.status===`accepted`){let r=B(this,Xs,`f`);if(r!==null&&r.command===t&&r.toolCallId===n){let i=_c(e.result);if(i===null){a({command:t,toolCallId:n,reason:`rejected`,errorCode:`invalid_decision_ack`});return}r.decisionLaneId=i}B(this,V,`m`,dc).call(this,t,n,null);return}(t!==`chat-tool-confirm`&&t!==`chat-tool-reject`||n===null||!B(this,V,`m`,nc).call(this,t,n,e,i,a))&&a({command:t,toolCallId:n,reason:`rejected`,errorCode:e.errorCode})}},e=>{i()&&a({command:t,toolCallId:n,reason:B(this,V,`m`,cc).call(this,e,t),errorCode:null})})},uc=function(){let e=B(this,Xs,`f`),t=B(this,Zs,`f`).length>0||e!==null&&e.bulk,n=e===null&&!t?null:{current:e===null?null:{toolCallId:e.toolCallId,verdict:e.verdict},confirmAll:t};mc(B(this,H,`f`).store.state.decisionProgress,n)||B(this,H,`f`).store.update({decisionProgress:n})},dc=function(e,t,n){let{store:r}=B(this,H,`f`),i=r.state.commandFailures,a=i.filter(n=>n.command!==e||n.toolCallId!==t);(n!==null||a.length!==i.length)&&r.update({commandFailures:n===null?a:[...a,n]})},fc=async function(e){let{deps:t}=B(this,H,`f`),n=B(this,qs,`f`).generation,r=null,i=new Promise(e=>{r=t.clock.setTimeout(()=>e({kind:`failed`,reason:`deadline`}),t.policy.questionActionDeadlineMs)}),a=B(this,V,`m`,pc).call(this,e,n,!1),o=await Promise.race([a,i]);return r!==null&&t.clock.clearTimeout(r),!B(this,H,`f`).isDisposed()&&n===B(this,qs,`f`).generation&&B(this,Ys,`f`).refetchHistory(),o},pc=async function e(t,n,r){let{deps:i}=B(this,H,`f`),a;try{a=await i.transport.send(t)}catch(e){return{kind:`failed`,reason:B(this,V,`m`,cc).call(this,e,t.name)}}if(a.status===`accepted`)return{kind:`accepted`};let o=()=>!B(this,H,`f`).isDisposed()&&n===B(this,qs,`f`).generation;if(a.errorCode===`selection_expired`&&t.name===`chat-question-answer`&&!r&&o()){let r=await B(this,Ys,`f`).recoverSelection(a.result,{command:t.name,batchId:t.batchId});if(r!==null&&o())return B(this,V,`m`,e).call(this,{...t,requestId:B(this,H,`f`).newId(),modelSelectionId:r},n,!0)}return{kind:`rejected`,errorCode:a.errorCode}};function yc(e){let{logger:t}=e;return async(n,r)=>{let i=await e.reloadCapabilities();if(i.status===`disposed`)return null;if(i.status===`failed`)return t.warn(`ChatSession: selection expired and the capability re-read failed`,{...r}),null;let a=e.resolveSelection(i.value);if(a!==null)return t.warn(`ChatSession: selection expired \u2014 the picked model resent under a fresh id`,{...r}),e.setModelSelection(a),a;let o=Gs(n);return o===null?(t.error(`ChatSession: selection_expired ack without a readable default`,{...r}),null):o.defaultSelectionId===null?null:(t.warn(`ChatSession: selection expired \u2014 the picked model is gone, server default used`,{...r}),e.setModelSelection(o.defaultSelectionId),o.defaultSelectionId)}}var bc=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},xc=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Sc,Cc,wc,Tc,Ec,Dc;function Oc(e){return{chat:za,projectId:null,conversationId:null,connectionStatus:e,capabilityLoad:{status:`loading`},modelSelectionId:null,modelSelectionRejected:null,unsentTurns:[],historyLoad:{status:`idle`},restoredQuestionBatchIds:[],browserRunFailures:{},commandFailures:[],decisionProgress:null,turnAckPending:!1,lastPermissionMode:null,lastPermissionModeReadFailed:!1,permissionModeWrite:Fo}}var kc=class{constructor(e,t){Sc.add(this),Cc.set(this,void 0),wc.set(this,null),Tc.set(this,/* @__PURE__ */ new Set),Ec.set(this,void 0),bc(this,Cc,e,`f`),bc(this,Ec,t,`f`)}get state(){return xc(this,Cc,`f`)}update(e){bc(this,Cc,{...xc(this,Cc,`f`),...e},`f`),this.invalidate()}invalidate(){bc(this,wc,null,`f`);for(let e of xc(this,Tc,`f`))e()}subscribe(e){return xc(this,Tc,`f`).add(e),()=>{xc(this,Tc,`f`).delete(e)}}clearListeners(){xc(this,Tc,`f`).clear()}getSnapshot(){return xc(this,wc,`f`)===null&&bc(this,wc,xc(this,Sc,`m`,Dc).call(this),`f`),xc(this,wc,`f`)}};Cc=/* @__PURE__ */ new WeakMap,wc=/* @__PURE__ */ new WeakMap,Tc=/* @__PURE__ */ new WeakMap,Ec=/* @__PURE__ */ new WeakMap,Sc=/* @__PURE__ */ new WeakSet,Dc=function(){let e=xc(this,Cc,`f`),t=Ac(e.chat.messages);return{chat:e.chat,projectId:e.projectId,conversationId:e.conversationId,connectionStatus:e.connectionStatus,capabilityLoad:e.capabilityLoad,canSendChatTurn:go(e.capabilityLoad),isComposerInteractive:_o({capabilityLoad:e.capabilityLoad,connectionStatus:e.connectionStatus,isStreaming:e.chat.isStreaming}),modelSelectionId:e.modelSelectionId,modelSelectionRejected:e.modelSelectionRejected,unsentTurns:e.unsentTurns,canRecoverDanglingTurn:e.historyLoad.status!==`loading`&&!e.turnAckPending&&!e.chat.pendingSend&&Ho(e.chat.isStreaming,e.chat.error!==null,t),historyLoad:e.historyLoad,restoredQuestionBatchIds:e.restoredQuestionBatchIds,pageAnalysis:xc(this,Ec,`f`).call(this),browserRunFailures:e.browserRunFailures,commandFailures:e.commandFailures,decisionProgress:e.decisionProgress,permissionMode:Lo({conversationId:e.conversationId,conversationPermissionMode:e.chat.conversationPermissionMode,lastPermissionMode:e.lastPermissionMode,lastPermissionModeReadFailed:e.lastPermissionModeReadFailed,permissionModeWrite:e.permissionModeWrite})}};function Ac(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role!==`agent`)return n}}var jc=/* @__PURE__ */ new Set([`text-delta`,`text-done`,`reasoning-delta`,`reasoning-done`,`tool-call-start`,`tool-call-input-progress`,`tool-call-complete`,`tool-result`,`tool-running`,`object-partial`,`object-complete`,`step-start`,`step-finish`,`stage`,`progress`,`usage`]);function Mc(e){let{clock:t,timeoutMs:n,onStall:r}=e,i=`idle`,a=null;function o(){a!==null&&(t.clearTimeout(a),a=null)}function s(){o(),i=`armed`,a=t.setTimeout(()=>{a=null,i=`idle`,r()},n)}function c(){i=`idle`,o()}return{get phase(){return i},observe(e){if(e.type===`message-start`){s();return}if(e.type===`done`||e.type===`error`){c();return}if(e.type===`action-required`){i!==`idle`&&(i=`paused`,o());return}jc.has(e.type)&&i!==`idle`&&s()},noteCommand(){i!==`idle`&&s()},disarm:c,arm:s,pause(){i=`paused`,o()}}}var Nc=`chat_attachments.`;function Pc(e,t){return e.startsWith(Nc)?{errorCode:e,params:Ni(t)?t:null}:null}function Fc(e){return e.map(e=>e.id)}function Ic(e,t){return e.length===t.length&&e.every((e,n)=>{var r;return e.id===((r=t[n])==null?void 0:r.id)})}var Lc={stallTimeoutMs:6e4,capabilityLoadDeadlineMs:2e4,questionActionDeadlineMs:35e3,sendReceiptWindowMs:6e5},Rc=`chat`,zc=class extends Error{constructor(e){super(e),this.name=`ChatPermissionModeStaleError`}};function Bc(e){let{clock:t,receiptWindowMs:n,onDeadline:r}=e,i=null;function a(){i!==null&&(t.clearTimeout(i),i=null)}function o(e){a();let o=null;for(let t of e)t.release===`on-reconnect`&&(o===null||t.firstSentAt<o)&&(o=t.firstSentAt);if(o===null)return;let s=Math.max(0,o+n-t.now());i=t.setTimeout(()=>{i=null,r()},s)}return{arm:o,disarm:a}}function Vc(e,t){return e.text===t.text&&Ic(e.attachments,t.attachments)&&e.launchEffort.effort===t.launchEffort.effort&&e.launchEffort.maxAgents===t.launchEffort.maxAgents&&Rn(e.place,t.place)}function Hc(e,t){let n=e[e.length-1];return n!==void 0&&Vc(n,t)?e:[...e,t]}function Uc(e,t){return[...e,t]}function Wc(e,t){return e.filter(e=>e.id!==t)}function Gc(e){for(let t of e)if(t.release===`on-reconnect`)return t;return null}function Kc(e,t,n){let r=e=>e.release===`on-reconnect`&&t-e.firstSentAt>=n;return e.some(r)?e.map(e=>r(e)?{id:e.id,text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,release:`manual`,inTranscript:!0,refusal:null}:e):e}var qc=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},U=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},W,G,Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl=`cmd.handler_error`,Cl=class extends Error{constructor(){super(`no permission mode shown on the new-conversation screen`),this.name=`NoPermissionModeError`}},wl=class{constructor(e,t,n){W.add(this),G.set(this,void 0),Jc.set(this,void 0),Yc.set(this,void 0),Xc.set(this,/* @__PURE__ */ new Set),Zc.set(this,/* @__PURE__ */ new Set),Qc.set(this,!1),$c.set(this,!1),el.set(this,0),tl.set(this,void 0),nl.set(this,0),rl.set(this,null),qc(this,G,e,`f`),qc(this,Jc,t,`f`),qc(this,Yc,n,`f`),qc(this,tl,Bc({clock:e.deps.clock,receiptWindowMs:e.deps.policy.sendReceiptWindowMs,onDeadline:()=>this.flushUndelivered()}),`f`)}dispose(){U(this,tl,`f`).disarm()}get isCreatingConversation(){return U(this,Qc,`f`)}get hasTurnAwaitingAck(){return U(this,Xc,`f`).size>0}get lastTurnUnboundAttachments(){let e=U(this,rl,`f`);return e===null||e.selectionGeneration!==U(this,Jc,`f`).generation?[]:e.attachments}resetForProject(){qc(this,rl,null,`f`),qc(this,el,U(this,el,`f`)+1,`f`),qc(this,Qc,!1,`f`),qc(this,$c,!1,`f`),U(this,Xc,`f`).clear(),U(this,Zc,`f`).clear(),U(this,W,`m`,xl).call(this),U(this,tl,`f`).disarm()}submit(e){let{store:t,deps:n}=U(this,G,`f`);if(U(this,G,`f`).isDisposed()||e.text.trim()===``)return{kind:`ignored`};let r=t.state;if(r.projectId===null)return n.logger.warn(`ChatSession: send refused \u2014 no project`),{kind:`refused`,reason:`no-project`,held:!1};if(!go(r.capabilityLoad))return n.logger.warn(`ChatSession: send refused \u2014 model capability set is not readable`,{capabilityStatus:r.capabilityLoad.status}),e.holdOnRefusal&&!e.resend&&U(this,W,`m`,ol).call(this,e),{kind:`refused`,reason:`capabilities-not-ready`,held:e.holdOnRefusal&&!e.resend};let i=r.conversationId;if(i===null&&U(this,Qc,`f`))return{kind:`ignored`};let a=null;if(i===null&&(a=U(this,Yc,`f`).newConversationPermissionMode(),a===null))return n.logger.warn(`ChatSession: send refused \u2014 no permission mode to create the chat in`),U(this,Yc,`f`).refreshLastPermissionMode(),e.holdOnRefusal&&!e.resend&&U(this,W,`m`,ol).call(this,e),{kind:`refused`,reason:`permission-mode-unknown`,held:e.holdOnRefusal&&!e.resend};qc(this,nl,U(this,nl,`f`)+1,`f`);let o=U(this,nl,`f`);return qc(this,rl,null,`f`),U(this,W,`m`,ul).call(this,e),a===null?(U(this,W,`m`,pl).call(this,e,o),U(this,W,`m`,hl).call(this,e,o)):U(this,W,`m`,fl).call(this,e,o,r.projectId,a),{kind:`sent`}}stopAwaitingTurns(){let e=U(this,Qc,`f`)&&!U(this,$c,`f`);if(U(this,Xc,`f`).size===0&&!e)return!1;e&&qc(this,$c,!0,`f`);for(let e of U(this,Xc,`f`))U(this,Zc,`f`).add(e);return U(this,Xc,`f`).clear(),U(this,W,`m`,xl).call(this),U(this,G,`f`).feedLocalEvent(us()),!0}flushUndelivered(){U(this,G,`f`).isDisposed()||(U(this,W,`m`,il).call(this),U(this,tl,`f`).arm(U(this,G,`f`).store.state.unsentTurns))}async deliverPageSnapshot(e,t){let{deps:n,store:r}=U(this,G,`f`);if(r.state.conversationId===null)return n.logger.error(`ChatSession: page snapshot with no conversation bound`),{kind:`transport-failed`};let i=U(this,Jc,`f`).generation,a=U(this,el,`f`),o=U(this,G,`f`).newId(),s=await U(this,W,`m`,al).call(this,e,o,r.state.modelSelectionId);if(s.kind!==`rejected`||s.ack.errorCode!==`selection_expired`)return s;let c=await U(this,Yc,`f`).recoverSelection(s.ack.result,{command:`chat-send`,requestId:o,pageSnapshot:!0});if(U(this,G,`f`).isDisposed())return{kind:`abandoned`};let l=i!==U(this,Jc,`f`).generation||a!==U(this,el,`f`);return t.aborted||l?(n.logger.warn(`ChatSession: page snapshot resend abandoned \u2014 delivery no longer current`,{requestId:o,reason:l?`chat-moved`:`aborted`}),{kind:`abandoned`}):c===null?s:U(this,W,`m`,al).call(this,e,U(this,G,`f`).newId(),c)}};G=/* @__PURE__ */ new WeakMap,Jc=/* @__PURE__ */ new WeakMap,Yc=/* @__PURE__ */ new WeakMap,Xc=/* @__PURE__ */ new WeakMap,Zc=/* @__PURE__ */ new WeakMap,Qc=/* @__PURE__ */ new WeakMap,$c=/* @__PURE__ */ new WeakMap,el=/* @__PURE__ */ new WeakMap,tl=/* @__PURE__ */ new WeakMap,nl=/* @__PURE__ */ new WeakMap,rl=/* @__PURE__ */ new WeakMap,W=/* @__PURE__ */ new WeakSet,il=function(){let{store:e,deps:t}=U(this,G,`f`),n=Kc(e.state.unsentTurns,t.clock.now(),t.policy.sendReceiptWindowMs);n!==e.state.unsentTurns&&(t.logger.warn(`ChatSession: undelivered turn outlived the server receipt \u2014 needs a Send`),e.update({unsentTurns:n}));let r=e.state;if(r.connectionStatus!==`connected`&&r.connectionStatus!==`restored`||r.conversationId===null||r.chat.isStreaming||r.chat.pendingSend||U(this,Xc,`f`).size>0)return;let i=Gc(r.unsentTurns);i!==null&&(e.update({unsentTurns:Wc(r.unsentTurns,i.id)}),U(this,G,`f`).dispatch({type:`ASSISTANT_PLACEHOLDER`,payload:{id:U(this,G,`f`).newId(),effort:i.launchEffort.effort}}),U(this,W,`m`,gl).call(this,{requestId:i.requestId,text:i.text,attachments:i.attachments,launchEffort:i.launchEffort,place:i.place,modelSelectionId:i.modelSelectionId,expiredResend:!1,firstSentAt:i.firstSentAt,turnSeq:null}))},al=async function(e,t,n){let{deps:r}=U(this,G,`f`);try{let i=await r.transport.send({name:`chat-send`,requestId:t,message:``,mode:Rc,launchEffort:{effort:yt,maxAgents:null},place:Ln,modelSelectionId:n,policyVersion:null,pageSnapshot:e,attachmentIds:[]});return i.status===`accepted`?{kind:`accepted`}:{kind:`rejected`,ack:i}}catch(e){return r.logger.warn(`ChatSession: page snapshot delivery failed`,{error:yo(e)}),{kind:`transport-failed`}}},ol=function(e){let{store:t}=U(this,G,`f`);t.update({unsentTurns:Hc(t.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,release:`manual`,inTranscript:!1,refusal:null})})},sl=function(e,t,n,r=as.turnHeldUnsent){let{store:i}=U(this,G,`f`);i.update({unsentTurns:Uc(i.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,release:`manual`,inTranscript:!0,refusal:n})}),U(this,G,`f`).feedLocalEvent(ss(r,t))},cl=function(e,t,n,r){let{store:i,deps:a}=U(this,G,`f`);a.logger.warn(`ChatSession: stopped turn the server never ran \u2014 held unsent`,{reason:n,attachmentCount:e.attachments.length}),U(this,W,`m`,ml).call(this,t),i.update({unsentTurns:Uc(i.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,release:`manual`,inTranscript:!0,refusal:r})})},ll=function(e,t){t.status!==`accepted`&&U(this,W,`m`,cl).call(this,e,e.turnSeq,`stopped, then chat-send rejected: ${t.errorCode}`,Pc(t.errorCode,t.result))},ul=function(e){e.resend||U(this,G,`f`).dispatch({type:`USER_MESSAGE`,payload:{id:U(this,G,`f`).newId(),content:e.text,effort:e.launchEffort.effort,attachments:e.attachments}}),U(this,G,`f`).dispatch({type:`ASSISTANT_PLACEHOLDER`,payload:{id:U(this,G,`f`).newId(),effort:e.launchEffort.effort}})},dl=async function(e,t,n){let r=await U(this,Yc,`f`).settledNewConversationPermissionMode(t);if(!n())return{kind:`left`};if(r===null)throw new Cl;return{kind:`created`,created:await U(this,G,`f`).deps.conversations.create(e,r)}},fl=function(e,t,n,r){let{deps:i}=U(this,G,`f`),a=U(this,el,`f`),o=U(this,Jc,`f`).generation,s=()=>!U(this,G,`f`).isDisposed()&&a===U(this,el,`f`)&&o===U(this,Jc,`f`).generation;qc(this,Qc,!0,`f`),qc(this,$c,!1,`f`);let c=()=>{if(a!==U(this,el,`f`))return!1;let e=U(this,$c,`f`);return qc(this,Qc,!1,`f`),qc(this,$c,!1,`f`),e};U(this,W,`m`,dl).call(this,n,r,s).then(r=>{let a=c();if(r.kind===`left`){i.logger.warn(`ChatSession: chat left before the conversation create \u2014 turn dropped`,{projectId:n});return}let{created:o}=r,l=o.id;if(!s()){i.logger.warn(`ChatSession: chat left during conversation create \u2014 turn dropped`,{conversationId:l});return}if(i.memory.remember(n,l).catch(e=>{i.logger.error(`ChatSession: memory.remember failed`,{projectId:n,error:yo(e)})}),U(this,Jc,`f`).select(l,`stream-created`),U(this,G,`f`).dispatch({type:`CONVERSATION_PERMISSION_MODE`,payload:{conversationId:l,permissionMode:o.permissionMode,permissionModeVersion:o.permissionModeVersion}}),a){U(this,W,`m`,cl).call(this,e,null,`stopped during conversation create \u2014 never sent`,null);return}U(this,W,`m`,pl).call(this,e,t),U(this,W,`m`,hl).call(this,e,t)},t=>{let r=c();if(s()){if(r){i.logger.warn(`ChatSession: conversation create failed for a stopped turn`,{projectId:n,error:yo(t)}),U(this,W,`m`,cl).call(this,e,null,`stopped during a failed conversation create \u2014 never sent`,null);return}if(t instanceof Cl){i.logger.warn(`ChatSession: conversation not created \u2014 no permission mode shown`,{projectId:n}),U(this,W,`m`,sl).call(this,e,`conversation create skipped: no permission mode shown`,null),U(this,Yc,`f`).refreshLastPermissionMode();return}if(t instanceof zc){i.logger.warn(`ChatSession: conversation not created \u2014 permission mode was stale`,{projectId:n}),U(this,W,`m`,sl).call(this,e,`conversation create refused: permission mode stale`,null,as.permissionModeChanged),U(this,Yc,`f`).rereadStaleLastPermissionMode();return}i.logger.error(`ChatSession: conversation create failed \u2014 turn held`,{projectId:n,error:yo(t)}),U(this,W,`m`,sl).call(this,e,`conversation create failed`,null)}})},pl=function(e,t){qc(this,rl,{turnSeq:t,attachments:e.attachments,selectionGeneration:U(this,Jc,`f`).generation},`f`)},ml=function(e){var t;e!==null&&((t=U(this,rl,`f`))==null?void 0:t.turnSeq)===e&&qc(this,rl,null,`f`)},hl=function(e,t){U(this,W,`m`,gl).call(this,{requestId:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,modelSelectionId:U(this,G,`f`).store.state.modelSelectionId,expiredResend:!1,firstSentAt:U(this,G,`f`).deps.clock.now(),turnSeq:t})},gl=async function(e){let{deps:t}=U(this,G,`f`),n=U(this,Jc,`f`).generation,r=U(this,el,`f`);U(this,Xc,`f`).add(e.requestId),U(this,W,`m`,xl).call(this);let i;try{i={kind:`ack`,ack:await t.transport.send({name:`chat-send`,requestId:e.requestId,message:e.text,mode:Rc,launchEffort:e.launchEffort,place:e.place,modelSelectionId:e.modelSelectionId,policyVersion:null,pageSnapshot:null,attachmentIds:Fc(e.attachments)})}}catch(n){uo(n)?i={kind:`failed`,code:n.code}:(t.logger.error(`ChatSession: transport.send broke its rejection contract`,{requestId:e.requestId,error:yo(n)}),i={kind:`failed`,code:`connection_closed`})}if(r!==U(this,el,`f`)||U(this,G,`f`).isDisposed())return;let a=U(this,Xc,`f`).delete(e.requestId);if(U(this,W,`m`,xl).call(this),i.kind===`ack`&&i.ack.status===`accepted`&&U(this,W,`m`,ml).call(this,e.turnSeq),U(this,Zc,`f`).delete(e.requestId)){i.kind===`ack`&&n===U(this,Jc,`f`).generation&&U(this,W,`m`,ll).call(this,e,i.ack);return}if(!a)return;if(n!==U(this,Jc,`f`).generation){t.logger.debug(`ChatSession: ack for a conversation no longer selected \u2014 ignored`,{requestId:e.requestId});return}if(i.kind===`failed`){U(this,W,`m`,_l).call(this,e,i.code);return}let{ack:o}=i;if(o.status===`accepted`){o.duplicate&&(t.logger.warn(`ChatSession: chat-send acked as duplicate \u2014 turn ended locally`,{requestId:e.requestId}),U(this,G,`f`).feedLocalEvent(us()),U(this,Yc,`f`).refetchHistory());return}U(this,W,`m`,vl).call(this,e,o)},_l=function(e,t){let{store:n,deps:r}=U(this,G,`f`);if(r.logger.warn(`ChatSession: chat-send undelivered \u2014 held for resend`,{requestId:e.requestId,code:t}),U(this,W,`m`,ml).call(this,e.turnSeq),n.update({unsentTurns:Uc(n.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,release:`on-reconnect`,requestId:e.requestId,modelSelectionId:e.modelSelectionId,firstSentAt:e.firstSentAt})}),U(this,G,`f`).feedLocalEvent(ss(as.turnHeldUnsent,`chat-send ${t}`)),t===`ack_timeout`){this.flushUndelivered();return}U(this,tl,`f`).arm(n.state.unsentTurns)},vl=function(e,t){if(t.errorCode===`selection_expired`&&!e.expiredResend){U(this,W,`m`,yl).call(this,e,t);return}U(this,W,`m`,bl).call(this,e,t)},yl=async function(e,t){let{deps:n}=U(this,G,`f`),r=U(this,Jc,`f`).generation,i=U(this,el,`f`);U(this,Xc,`f`).add(e.requestId),U(this,W,`m`,xl).call(this);let a=await U(this,Yc,`f`).recoverSelection(t.result,{command:`chat-send`,requestId:e.requestId});if(i!==U(this,el,`f`)||U(this,G,`f`).isDisposed())return;let o=U(this,Xc,`f`).delete(e.requestId);if(U(this,W,`m`,xl).call(this),U(this,Zc,`f`).delete(e.requestId)){r===U(this,Jc,`f`).generation&&U(this,W,`m`,ll).call(this,e,t);return}if(o&&r===U(this,Jc,`f`).generation){if(a===null){U(this,W,`m`,bl).call(this,e,t);return}U(this,W,`m`,gl).call(this,{requestId:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,modelSelectionId:a,expiredResend:!0,firstSentAt:n.clock.now(),turnSeq:e.turnSeq})}},bl=function(e,t){let{deps:n}=U(this,G,`f`);if(t.errorCode===Sl){n.logger.warn(`ChatSession: chat-send refused before it ran \u2014 turn held`,{requestId:e.requestId,errorCode:t.errorCode}),U(this,W,`m`,ml).call(this,e.turnSeq),U(this,W,`m`,sl).call(this,e,`chat-send rejected: ${t.errorCode}`,null);return}let r=Pc(t.errorCode,t.result);if(r!==null){n.logger.warn(`ChatSession: chat-send refused for its files \u2014 turn held`,{requestId:e.requestId,errorCode:t.errorCode,attachmentCount:e.attachments.length}),U(this,W,`m`,ml).call(this,e.turnSeq),U(this,W,`m`,sl).call(this,e,`chat-send rejected: ${t.errorCode}`,r);return}if(U(this,G,`f`).feedLocalEvent(ls(t)),t.errorCode===`model_not_allowed`){let r=Gs(t.result);r===null&&n.logger.error(`ChatSession: model_not_allowed ack without a readable default`,{requestId:e.requestId}),U(this,Yc,`f`).onModelNotAllowed(r===null?null:r.defaultSelectionId)}},xl=function(){let e=U(this,Xc,`f`).size>0;U(this,G,`f`).store.state.turnAckPending!==e&&U(this,G,`f`).store.update({turnAckPending:e})};function Tl(e){if(e.questionActionDeadlineMs<=3e4)throw Error(`ChatSession policy: questionActionDeadlineMs (${e.questionActionDeadlineMs}) must exceed the command ack window (${fo})`);if(e.stallTimeoutMs<=3e4)throw Error(`ChatSession policy: stallTimeoutMs (${e.stallTimeoutMs}) must exceed the command ack window (${fo})`)}function El(e){Tl(e.policy);let t=Xa(e.tools),n=!1,r=0,i=null,a=/* @__PURE__ */ new Set,o=null,s=e.browser===null?null:new Ws({browser:e.browser,deliver:(e,t)=>v.deliverPageSnapshot(e,t),logger:e.logger,onDeliveryDropped:e=>m.feedLocalEvent(ls(e)),onChange:()=>c.invalidate()}),c=new kc(Oc(e.transport.getStatus()),()=>s===null?{status:`idle`,failureReason:null}:{status:Os(s.phase),failureReason:s.failureReason}),l=Mc({clock:e.clock,timeoutMs:e.policy.stallTimeoutMs,onStall:()=>{if(c.state.chat.permissionModeLane!==null){p();return}e.logger.warn(`ChatSession: stream stalled \u2014 no progress within the window`,{conversationId:c.state.conversationId}),x(cs())}});function u(e){let n=c.state.chat.permissionModeLane,r=t(c.state.chat,e);r!==c.state.chat&&c.update({chat:r}),r.permissionModeLane!==n&&f(),w()}function d(e){l.observe(e),u({type:`EVENT`,payload:e}),c.state.chat.permissionModeLane!==null&&l.arm()}function f(){let{chat:e}=c.state;e.permissionModeLane!==null||e.isStreaming||e.pendingSend?l.arm():e.pendingConfirmations.some(e=>e.status===`open`)?l.pause():l.disarm()}function p(){var t;let{chat:n}=c.state;e.logger.warn(`ChatSession: permission-mode lane stalled \u2014 its calls go back to the user`,{conversationId:c.state.conversationId,decisionLaneId:(t=n.permissionModeLane)==null?void 0:t.decisionLaneId}),n.isStreaming||n.pendingSend?x(cs()):y.hasPendingDecision&&(y.abandonPendingDecision(),m.feedLocalEvent(us())),u({type:`PERMISSION_MODE_LANE_EXPIRED`}),T()}let m={deps:e,store:c,stallGuard:l,dispatch:u,feedLocalEvent:d,newId:vo,isDisposed:()=>n},h=new Ro(m),g=new rs(m,()=>{s==null||s.abort(),a.clear(),b.reset(),o=null,y.forgetPendingDecision()},{currentLaneId:()=>{let e=y.pendingDecisionLaneId;if(e!==null)return e;let t=c.state.chat.permissionModeLane;return t===null?null:t.decisionLaneId},onHistory:e=>y.consumeHistoryCompletion(e.decisionLaneCompletedIds)},()=>h.refresh()),_=yc({reloadCapabilities:A,resolveSelection:t=>e.capabilities.resolveSelection(t),setModelSelection:ie,logger:e.logger}),v=new wl(m,g,{onModelNotAllowed:ee,refetchHistory:T,recoverSelection:_,newConversationPermissionMode:()=>{let e=h.view();return e.kind===`known`&&e.scope===`last-choice`?e.value:null},settledNewConversationPermissionMode:e=>h.settledNewConversationMode(e),refreshLastPermissionMode:()=>h.refresh(),rereadStaleLastPermissionMode:()=>h.rereadStale()}),y=new vc(m,g,v,{abortPageAnalysis:()=>s==null?void 0:s.abort(),refetchHistory:T,recoverSelection:_}),b=new Ss(m,{refetchHistory:T});function x(e){y.abandonPendingDecision(),m.feedLocalEvent(e)}function S(){let{chat:e,conversationId:t}=c.state,n=La(e),r=e.pendingRefetch||g.rowsOwed,i=!n&&e.appendedRowsOwed.length>0;if(t===null||!r||!(n||i)){o=null;return}let a=`${t}|${n?`quiet`:e.appendedRowsOwed.join(`,`)}|${e.pendingConfirmations.map(e=>`${e.toolCallId}:${e.status}`).join(`,`)}`;a===o||g.catchUpInFlight||(o=a,C(t))}function C(e){let t=!La(c.state.chat);g.readHistory(e,`catch-up`).then(e=>{!n&&e===`applied`&&(g.rowsOwed||t)&&(o=null,S())})}function w(){n||(S(),y.maybeSendBulkConfirmation())}function T(){let e=c.state.conversationId;e!==null&&C(e)}function ee(e){c.update({modelSelectionId:null,modelSelectionRejected:{defaultSelectionId:e}}),A()}function E(t){let n=t.hostAction;if(n!==void 0){if(!is(e.open,n.executorPanelId)){e.logger.debug(`ChatSession: host action for another panel \u2014 not executed here`,{toolCallId:t.toolCallId,kind:n.kind});return}if(!a.has(t.toolCallId))switch(a.add(t.toolCallId),n.kind){case`capture-page`:if(s===null){e.logger.error(`ChatSession: capture-page action on a host without a browser port`,{toolCallId:t.toolCallId});return}s.request({captureRequestId:n.captureRequestId,toolCallId:t.toolCallId});return;case`run-in-tab`:D(t.toolCallId,n.kind,e=>e.runScenarioInTab({scenarioId:n.scenarioId,runId:n.runId,testRunId:n.testRunId}));return;case`run-batch-in-tab`:D(t.toolCallId,n.kind,e=>e.runScenarioBatchInTab({runs:n.runs,executionMode:n.executionMode,testRunId:n.testRunId}));return}}}function D(t,r,i){let a=e.browser;if(a===null){e.logger.error(`ChatSession: ${r} action on a host without a browser port`,{toolCallId:t});return}let o=g.generation,s=e=>{n||o!==g.generation||c.update({browserRunFailures:{...c.state.browserRunFailures,[t]:e}})};i(a).then(e=>{e.ok||s(e.reason)},n=>{e.logger.error(`ChatSession: ${r} request failed`,{toolCallId:t,error:yo(n)}),s(`no_response`)})}function te(t){if(_a(c.state.chat,t)&&g.noteRowAnnounced(),t.type===`conversation-started`&&t.conversationId!==c.state.conversationId){e.logger.error(`ChatSession: conversation-started names a conversation not bound`,{bound:c.state.conversationId,named:t.conversationId});return}y.consumeDecisionOutcome(t)||(d(t),t.type===`error`&&t.code===`model_not_allowed`&&ee(null),t.type===`tool-result`&&E(t),t.type===`host-action`&&b.handle(t),s==null||s.onEvent(t),t.type===`done`&&v.flushUndelivered())}function ne(e){if(c.update({connectionStatus:e}),e===`connected`||e===`restored`){v.flushUndelivered(),(y.pendingDecisionLaneId!==null||c.state.chat.permissionModeLane!==null)&&T();return}if(e!==`lost`&&e!==`failed`)return;if(e===`failed`&&y.pendingDecisionLaneId!==null){let{chat:t}=c.state;t.isStreaming||t.pendingSend?x(ss(as.connectionLostDuringStream,`socket ${e}`)):(y.abandonPendingDecision(),m.feedLocalEvent(us())),T();return}let{chat:t}=c.state;if(!v.hasTurnAwaitingAck&&(t.isStreaming||t.pendingSend)){if(y.hasPendingDecision){m.feedLocalEvent(ss(as.connectionLostDuringStream,`socket ${e}`));return}x(ss(as.connectionLostDuringStream,`socket ${e}`))}}function O(t){if(!n)switch(t.kind){case`event`:te(t.event);return;case`task-card`:return;case`status`:ne(t.status);return;case`resync-required`:e.logger.warn(`ChatSession: transport asked for a resync \u2014 re-reading history`),T();return;default:return t}}let re=e.transport.subscribe(O);function k(){if(i===null)throw Error(`ChatSession: a capability read was superseded with no newer read`);return i}function A(){if(n)return Promise.resolve({status:`disposed`});r+=1;let t=r;c.update({capabilityLoad:{status:`loading`}});let a=ho(e.capabilities.load(),e.clock,e.policy.capabilityLoadDeadlineMs).then(e=>n?{status:`disposed`}:t===r?(c.update({capabilityLoad:{status:`ready`,value:e}}),{status:`ready`,value:e}):k(),i=>n?{status:`disposed`}:t===r?(e.logger.warn(`ChatSession: capability load failed`,{error:yo(i)}),c.update({capabilityLoad:{status:`failed`,cause:i}}),{status:`failed`}):k());return i=a,a}function ie(e){n||c.update({modelSelectionId:e,modelSelectionRejected:null})}function ae(t){if(n)return;let r=c.state.projectId;if(r!==t){if(Vo(r,t)&&(g.select(null,`load-history`),v.resetForProject(),c.update({unsentTurns:[],modelSelectionRejected:null})),c.update({projectId:t}),t===null){e.transport.close();return}h.refresh(),e.memory.read(t).then(r=>{if(n||c.state.projectId!==t||r===null)return;let{conversationId:i,chat:a}=c.state;if(i!==null||v.isCreatingConversation||a.messages.length>0){e.logger.debug(`ChatSession: remembered conversation not opened \u2014 chat already in use`,{projectId:t,remembered:r});return}g.select(r,`load-history`)},n=>{e.logger.error(`ChatSession: memory.read failed \u2014 empty state`,{projectId:t,error:yo(n)})})}}function oe(t){if(n)return;let r=c.state.projectId;if(r===null){e.logger.error(`ChatSession: openConversation with no project`,{conversationId:t});return}t!==c.state.conversationId&&(c.state.chat.isStreaming&&y.stop(),e.memory.remember(r,t).catch(t=>{e.logger.error(`ChatSession: memory.remember failed`,{projectId:r,error:yo(t)})}),c.update({unsentTurns:[]}),g.select(t,`load-history`))}function se(){if(n)return;let t=c.state.projectId;t!==null&&e.memory.forget(t).catch(n=>{e.logger.error(`ChatSession: memory.forget failed`,{projectId:t,error:yo(n)})}),c.update({unsentTurns:[]}),g.select(null,`load-history`)}function ce(e,t){let{chat:r}=c.state;if(n||r.isStreaming||r.pendingSend||v.hasTurnAwaitingAck)return{kind:`ignored`};let i;for(let e=r.messages.length-1;e>=0&&i===void 0;--e){var a;((a=r.messages[e])==null?void 0:a.role)===`user`&&(i=r.messages[e])}return i===void 0||i.content.trim()===``?{kind:`ignored`}:v.submit({text:i.content,attachments:v.lastTurnUnboundAttachments,launchEffort:e,place:t,holdOnRefusal:!1,resend:!0})}function j(e){let t=c.state.unsentTurns.find(t=>t.id===e);if(n||t===void 0)return{kind:`ignored`};if(t.release===`on-reconnect`)return v.flushUndelivered(),c.state.unsentTurns.some(t=>t.id===e)?{kind:`ignored`}:{kind:`sent`};let r=v.submit({text:t.text,attachments:t.attachments,launchEffort:t.launchEffort,place:t.place,holdOnRefusal:!1,resend:t.inTranscript});return r.kind===`sent`&&c.update({unsentTurns:Wc(c.state.unsentTurns,e)}),r}return{getSnapshot:()=>c.getSnapshot(),subscribe:e=>c.subscribe(e),setProject:ae,openConversation:oe,startNewConversation:se,send:e=>v.submit({text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,holdOnRefusal:e.source===`external`,resend:!1}),retryLastTurn:ce,stop:()=>y.stop(),confirm:(e,t)=>y.answerConfirmation(e,`confirm`,t===void 0?null:t),confirmAll:(e,t)=>y.confirmAll(e,t),reject:e=>y.answerConfirmation(e,`reject`,null),confirmChangeSet:e=>y.answerChangeSet(e,`confirm`),rejectChangeSet:e=>y.answerChangeSet(e,`reject`),rejectRunWait:e=>y.rejectRunWait(e),answerQuestion:e=>y.answerQuestion(e),cancelQuestion:e=>y.cancelQuestion(e),sendUnsentTurn:j,discardUnsentTurn:e=>{n||c.update({unsentTurns:Wc(c.state.unsentTurns,e)})},retryUnsent:()=>{let e=c.state.unsentTurns[0];return e===void 0?{kind:`ignored`}:j(e.id)},setModelSelection:ie,setPermissionMode:e=>h.set(e),retryPermissionModeWrite:()=>h.retry(),dismissPermissionModeWriteFailure:()=>h.dismissFailure(),refreshLastPermissionMode:()=>h.refresh(),reloadCapabilities:()=>{A()},dispose:()=>{n||(n=!0,l.disarm(),v.dispose(),s==null||s.abort(),re(),e.transport.close(),c.clearListeners())}}}function Dl(){return{now:()=>Date.now(),setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e)}}var Ol=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},K=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl=5e3,zl=2e3,Bl=/* @__PURE__ */ new Set([In.AUTH_FAILED,In.PROTOCOL_VIOLATION,In.HEARTBEAT_TIMEOUT]),Vl=5,Hl=class{constructor(e){kl.add(this),Al.set(this,void 0),jl.set(this,`connecting`),Ml.set(this,/* @__PURE__ */ new Set),Nl.set(this,null),Pl.set(this,null),Fl.set(this,0),Ol(this,Al,e,`f`)}get status(){return K(this,jl,`f`)}onStatusChange(e){return K(this,Ml,`f`).add(e),()=>{K(this,Ml,`f`).delete(e)}}onConnected(){if(K(this,jl,`f`)!==`failed`){if(K(this,kl,`m`,Ll).call(this),Ol(this,Fl,0,`f`),K(this,jl,`f`)===`lost`){K(this,kl,`m`,Il).call(this,`restored`),Ol(this,Pl,K(this,Al,`f`).setTimeout(()=>{Ol(this,Pl,null,`f`),K(this,kl,`m`,Il).call(this,`connected`)},zl),`f`);return}K(this,kl,`m`,Il).call(this,`connected`)}}onDisconnected(e){if(K(this,jl,`f`)!==`failed`){if(e===In.CHANNEL_NOT_FOUND){K(this,kl,`m`,Ll).call(this),K(this,kl,`m`,Il).call(this,`failed`);return}if(Bl.has(e)){if(Ol(this,Fl,K(this,Fl,`f`)+1,`f`),K(this,Fl,`f`)>=Vl){K(this,kl,`m`,Ll).call(this),K(this,kl,`m`,Il).call(this,`failed`);return}}else Ol(this,Fl,0,`f`);if(e===In.NORMAL_CLOSURE){K(this,kl,`m`,Ll).call(this),K(this,kl,`m`,Il).call(this,`connecting`);return}K(this,kl,`m`,Il).call(this,`reconnecting`),K(this,Nl,`f`)===null&&K(this,jl,`f`)!==`lost`&&Ol(this,Nl,K(this,Al,`f`).setTimeout(()=>{Ol(this,Nl,null,`f`),K(this,jl,`f`)===`reconnecting`&&K(this,kl,`m`,Il).call(this,`lost`)},Rl),`f`)}}onReconnectStopped(){K(this,jl,`f`)!==`failed`&&(K(this,kl,`m`,Ll).call(this),K(this,kl,`m`,Il).call(this,`failed`))}reset(){K(this,jl,`f`)!==`failed`&&(K(this,kl,`m`,Ll).call(this),Ol(this,Fl,0,`f`),K(this,kl,`m`,Il).call(this,`connecting`))}dispose(){K(this,kl,`m`,Ll).call(this),K(this,Ml,`f`).clear()}};Al=/* @__PURE__ */ new WeakMap,jl=/* @__PURE__ */ new WeakMap,Ml=/* @__PURE__ */ new WeakMap,Nl=/* @__PURE__ */ new WeakMap,Pl=/* @__PURE__ */ new WeakMap,Fl=/* @__PURE__ */ new WeakMap,kl=/* @__PURE__ */ new WeakSet,Il=function(e){if(e===K(this,jl,`f`))return;let t=K(this,jl,`f`);Ol(this,jl,e,`f`);for(let n of K(this,Ml,`f`))n(e,t)},Ll=function(){K(this,Nl,`f`)!==null&&(K(this,Al,`f`).clearTimeout(K(this,Nl,`f`)),Ol(this,Nl,null,`f`)),K(this,Pl,`f`)!==null&&(K(this,Al,`f`).clearTimeout(K(this,Pl,`f`)),Ol(this,Pl,null,`f`))};var Ul=as.permissionModeChanged,Wl=/* @__PURE__ */ new Set([`client.turn_held_unsent`,Ul,`reports.projection_not_initialized`,`assistant.recover_last_message`]),Gl=/* @__PURE__ */ new Set([`workflows.agents_over_max`,`ai.reasoning_unsupported`]);function Kl(e){return{code:e.code,message:e.message,errorCode:e.errorCode??null,providerErrorCode:e.providerErrorCode??null}}function ql(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role===`user`)return n.id}return null}function Jl(e,t,n,r){if(e.kind===`needs-sign-in`)return n.placeholderSignIn;if(e.kind===`needs-project`||t.projectId===null)return n.placeholderNoProject;if(t.capabilityLoad.status===`failed`)return n.placeholderNoModels;switch(t.connectionStatus){case`reconnecting`:case`lost`:case`failed`:return n.placeholderOffline;case`connecting`:case`connected`:case`restored`:return r===null?n.placeholder:r}}function Yl(e){return e.status===`failed`?mo(e.cause)?{kind:`timed-out`}:{kind:`failed`}:null}function Xl(e,t){return e.upload({path:wn.attachmentUpload.path(t.projectId,t.fileName),contentType:t.mediaType,bytes:t.bytes,schema:xn,signal:t.signal,onProgress:t.onProgress})}var Zl=F({success:Qe(!0)});async function Ql(e,t){await e.request({method:wn.attachmentDelete.method,path:wn.attachmentDelete.path(t),schema:Zl})}function $l(e,t,n){return e.download({path:wn.attachmentContent.path(t),signal:n})}var eu={status:`idle`},tu={status:`loading`},nu={status:`failed`};function ru(e){return Sn(e)?`text/plain; charset=utf-8`:e}function iu(e){let{http:t,logger:n}=e,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Set,o=new AbortController,s=(e,t)=>{r.set(e,t);for(let e of a)e()};return{get(e){let t=r.get(e);return t===void 0?eu:t},load(e){let a=i.get(e.id);if(a!==void 0)return a;let c=r.get(e.id);if(c!==void 0&&c.status===`ready`)return Promise.resolve(c);let{signal:l}=o;s(e.id,tu);let u=$l(t,e.id,l).then(t=>{if(l.aborted)return eu;let n=new Blob([t.bytes.slice()],{type:ru(e.mediaType)}),r={status:`ready`,url:URL.createObjectURL(n)};return i.delete(e.id),s(e.id,r),r},t=>l.aborted?eu:(n.warn(`chat attachment content read failed`,{attachmentId:e.id,status:t instanceof On?t.status:null,errorCode:t instanceof On?t.errorCode:null}),i.delete(e.id),s(e.id,nu),nu));return i.set(e.id,u),u},subscribe(e){return a.add(e),()=>a.delete(e)},clear(){o.abort(),o=new AbortController,i.clear();for(let e of r.values())e.status===`ready`&&URL.revokeObjectURL(e.url);r.clear();for(let e of a)e()}}}var au=new Intl.PluralRules(`ru`),ou=new Intl.PluralRules(`en`);function q(e,t){switch(au.select(e)){case`one`:return t.one;case`few`:case`other`:return t.few;default:return t.many}}function J(e,t){return ou.select(e)===`one`?t.one:t.other}var su=e=>J(e,{one:`file`,other:`files`}),cu=e=>e===null?`The selected model`:`Model ${e}`,lu={units:{b:`B`,kb:`KB`,mb:`MB`},facts:{pdf:(e,t)=>`${e} ${J(e,{one:`page`,other:`pages`})}, ${t}`,image:(e,t,n)=>`${e}\u00D7${t}, ${n}`,text:e=>e},typeLabel:{"image/png":`PNG`,"image/jpeg":`JPEG`,"image/webp":`WebP`,"application/pdf":`PDF`,"text/plain":`TXT`,"text/markdown":`MD`},message:{listLabel:`Message files`,view:e=>`View \u201C${e}\u201D`,open:e=>`Open \u201C${e}\u201D in a new tab`,thumbnailLoading:e=>`Loading the thumbnail of \u201C${e}\u201D`,thumbnailFailed:`The thumbnail did not load`,openFailed:`Could not open.`,retry:`Retry`},viewer:{label:e=>`Viewing: ${e}`,openInTab:`Open in a new tab`,close:`Close the viewer`,previous:`Previous image`,next:`Next image`,position:(e,t)=>`${e} of ${t}`,loading:e=>`Loading \u201C${e}\u201D`,failed:`The image did not load`},conversation:{text:(e,t)=>`Model ${e} will not read the files of this conversation (${t}) \u2014 `,pick:`switch to another model`},unsent:{files:e=>`${e} ${su(e)}`,unsupported:(e,t)=>`${cu(e)} does not take these files: ${t} \u2014 switch to another`,noFiles:e=>`${cu(e)} does not take files \u2014 switch to another`,types:(e,t)=>`${cu(e)} does not take ${t} \u2014 switch to another`,reason:{fileBytes:e=>`a file is over ${e}`,imageBytes:e=>`an image is over ${e}`,requestBytes:e=>`the request is over ${e}`,filesBytes:e=>`the files together are over ${e}`,imageEdge:e=>`an image side is over ${e} px`,imagePatches:e=>`an image is over ${e} million pixels`,pdfPages:e=>`the PDF has over ${e} pages`,imagesCount:e=>`over ${e} images`,manyImagesEdge:e=>`with many images each side must be at most ${e} px`,contextWindow:`the files do not fit the model\u2019s window`,unknownSize:`the files are larger than the model takes`},notFound:`The files of this message are no longer available: an unsent file is kept for a day. Delete the message and attach the files again.`,alreadySent:`These files were already sent with another message. Delete the message and attach the files again.`}},uu=new Intl.NumberFormat(`en`),du=e=>uu.format(e),fu=e=>J(e,{one:`change`,other:`changes`}),pu=(e,t,n)=>`${du(e)} ${J(e,{one:t,other:n})}`,mu={title:`Changes`,cardAria:e=>`Changes: ${e.toLocaleLowerCase(`en`)}`,phaseAnnouncement:e=>`Change status: ${e.toLocaleLowerCase(`en`)}`,contextScenario:e=>`Scenario \u201C${e}\u201D`,contextProject:e=>`Project \u201C${e}\u201D`,marker:{inspecting:`Inspecting`,proposed:`Proposed`,awaiting:`Awaiting decision`,applying:`Applying`,applied:`Applied`,rejected:`Rejected`,partial:`Partially applied`,failed:`Not applied`,undone:`Undone`,superseded:`Superseded`,closed:`Closed`},earlyTitle:{searching:`Searching for a matching scenario\u2026`,search_results_shown:`Found several matches`,no_results:`Nothing matched`,item_selected:`Target selected`,inspecting:`Inspecting details\u2026`,ambiguity_choose_target:`Choose a target`},preparing:`The assistant is preparing a change\u2026`,changesCount:e=>`${du(e)} ${fu(e)}`,noResults:`Nothing matched.`,chooseTargetHint:`Choose which target was meant:`,selected:`Selected`,nothingChanged:`Nothing has changed yet.`,evidenceHeading:`Evidence`,entityLabelMissing:`label missing`,open:`Open`,openAria:e=>`Open: ${e}`,searchingAria:`Searching`,whatChanges:`What will change`,proposalEmpty:`No changes proposed yet.`,secretChip:`secret`,evidence:`Rationale`,cascadeTitle:`Also will be deleted`,cascadeEntity:{step:`Steps`,scenario_run:`Scenario runs`,api_folder:`Folders`,api_saved_request:`Saved requests`,checklist_item:`Checklist items`,checklist_item_step:`Checklist item steps`,test_run_result:`Test run results`},cascadeUnknown:e=>`Unknown entities (${e})`,cascadeCount:{step:e=>pu(e,`step`,`steps`),scenario_run:e=>pu(e,`scenario run`,`scenario runs`),api_folder:e=>pu(e,`folder`,`folders`),api_saved_request:e=>pu(e,`saved request`,`saved requests`),checklist_item:e=>pu(e,`checklist item`,`checklist items`),checklist_item_step:e=>pu(e,`item step`,`item steps`),test_run_result:e=>pu(e,`run result`,`run results`)},cascadeCountUnknown:(e,t)=>`${e}: ${du(t)}`,dock:{factScenario:`Scenario`,factProject:`Project`,factWithIt:`Along with it`,factEdits:`Edits`,recordWithIt:e=>`along with it ${e}`,editsCount:e=>pu(e,`edit`,`edits`),showInFeed:`Show in the feed`,showInFeedAria:e=>`Show in the feed: ${e}`,blockedUnworded:`Cannot confirm yet \u2014 see the record in the feed`,decided:{confirmDelete:`Deletion confirmed`,confirm:`Changes confirmed`,reject:`Rejected`}},killSwitch:{title:`Progon writes are turned off for this company.`,body:`A company admin can enable them in Settings \u2192 AI. You can review this plan, but it cannot be applied.`},disabledReason:{still_composing:`The proposal is being updated \u2014 confirm will be available shortly.`,awaiting_secret_value:`Waiting for the secret value \u2014 provide it securely to continue.`},provideSecurely:`Provide securely`,secretEnvMissing:`Cannot open secret input \u2014 the proposal names no environment the value is for.`,secretNameMissing:`Cannot open secret input \u2014 the proposal names no variable.`,secretOpenFailed:`Could not open the secret input page \u2014 try again.`,secretWaiting:`Waiting for input in Progon web`,secretWaitingText:`Finish there \u2014 the card updates when you come back.`,secretRefresh:`Refresh status`,secretReopen:`Opened just now \u2014 open again?`,confirm:`Confirm changes`,confirmDelete:`Confirm deletion`,reject:`Reject`,bugFiling:{title:`File a bug?`,confirm:`File bug`,capture:{ready:`Screenshot`,awaiting:`Screenshot still uploading`,unavailable:`No screenshot`,no_screen:`Request and response, no screen to capture`},address:e=>`address ${e}`,severity:e=>`Severity: ${e}`,factFinding:`Finding`,factSeverity:`Severity`,factWithIt:`With it`,severityWord:{critical:`critical`,high:`high`,medium:`medium`,low:`low`}},closedBy:{line:{launch_stopped:`Closed \u2014 the launch stopped`,finding_filed:`Closed \u2014 you filed this bug yourself`},launchStoppedNote:`An answer would change nothing now`,findingFiledNote:(e,t)=>`You filed bug #${String(e)} from this finding at ${t} \u2014 no answer needed`},rejectPlain:`Just reject`,rejectWithReason:`Reject with a comment`,reasonLabel:`Why?`,reasonHint:`(optional \u2014 helps the assistant propose a better option)`,commandFailed:{confirm:`Failed to confirm \u2014 try again.`,reject:`Failed to reject \u2014 try again.`,retry:`Retry failed \u2014 try again.`},applyingSubject:e=>`Applying ${du(e)} ${fu(e)}`,applyingGeneric:`Applying\u2026`,applyDuration:e=>`Apply time: ${du(e)} ms`,applyAria:`Changes are being applied`,applyDisclaimer:`Do not assume success until the server confirms. You can navigate away \u2014 this task will continue and update when you return.`,attempt:e=>`attempt ${du(e)}`,verified:`confirmed by the server`,appliedGroup:e=>`Applied (${du(e)})`,failedGroup:e=>`Failed or blocked (${du(e)})`,row:{applied:`Applied`,failed:`Failed to apply`,batch_aborted:`Rolled back`,pending:`Not attempted`,skipped:`Skipped`},applyError:{stale_guard:`The item changed after this proposal was composed.`,secret_expired_or_consumed:`The secret value has already been used or has expired.`,"assistant.change_set.batch_aborted":`Rolled back: another item in the same confirmation failed to apply.`,"assistant.change_set.apply_unexpected_error":`Unexpected error while applying.`,"assistant.ai_write_disabled":`Progon writes are turned off for this company.`,"variables.duplicate_name":`A variable with this name already exists.`},whatNext:`What to do next: retry the failed items, review any blocked ones, or revise your request.`,applyMissing:`Apply summary missing from snapshot.`,retryRemaining:e=>`Retry remaining (${du(e)})`,revise:`Revise request`,reviseDraftScenario:e=>`Propose a different change for \u201C${e}\u201D`,reviseDraftProject:e=>`Propose a different change in project \u201C${e}\u201D`,rejectedTitle:`No changes made.`,rejectedLead:`The proposal was rejected before apply. Your project data is unchanged.`,undoneTitle:`Changes undone`,undoneLead:`The applied changes were reverted to their previous state.`,superseded:`Superseded by a newer proposal.`,unknownState:`Task status not supported by this version`,undo:{action:`Undo changes`,until:e=>`Undo available until ${e}`,busy:`Undoing\u2026`,blocked:{stale:`Undo unavailable: the data changed after apply.`,expired:`Undo unavailable: the undo window has elapsed.`,kill_switch:`Undo unavailable: Progon writes are disabled for this company.`},unavailable:`Undo unavailable.`,error:{"change_sets.undo_stale":`Undo unavailable: the data changed after apply.`,"change_sets.undo_expired":`Undo unavailable: the undo window has elapsed.`,"change_sets.undo_not_eligible":`Undo unavailable.`,"assistant.ai_write_disabled":`Undo unavailable: Progon writes are disabled for this company.`},failed:`Failed to undo the changes. Try again.`,unknown:`Undo status unknown \u2014 reload the card.`,sideEffectsTitle:`Not reversed automatically:`,sideEffect:{test_plan_assignment_advance:`Test-plan assignment advancement`}},loadingAria:`Loading task status`,loadError:`Couldn't load task status.`,loadErrorText:`Nothing changed on the server.`,retry:`Retry`,unavailable:`Card unavailable`,unavailableText:`You have no access to this change, or it was deleted.`,unsupported:{title:`Changes card not supported`,body:`The answer came in a format this version cannot show. Reload the page or the extension.`},turn:{title:`Changes`,awaiting:e=>`awaiting decision ${du(e)}`,proposals:e=>`${du(e)} ${J(e,{one:`proposal`,other:`proposals`})}`,remaining:(e,t)=>`${du(e)} of ${du(t)} left`,applying:(e,t)=>`Applying ${du(e)} of ${du(t)}\u2026`,done:(e,t)=>`Done: ${du(e)} of ${du(t)}`,applied:e=>`${du(e)} applied`,rejected:e=>`${du(e)} rejected`,errors:e=>`${du(e)} ${J(e,{one:`error`,other:`errors`})}`,superseded:e=>`${du(e)} superseded`,closed:e=>`${du(e)} closed`,undone:e=>`${du(e)} undone`,loadFailed:e=>`${du(e)} failed to load`,confirmAll:e=>`Confirm all (${du(e)})`,rejectAll:`Reject all`,passFailures:e=>J(e,{one:`${du(e)} action failed \u2014 that card is unchanged`,other:`${du(e)} actions failed \u2014 those cards are unchanged`})}},hu=new Intl.NumberFormat(`en`),gu=new Intl.NumberFormat(`en`,{style:`percent`,maximumFractionDigits:0}),_u={title:`Coverage check`,caption:e=>`\u201C${e}\u201D`,cardAria:e=>`Coverage check: ${e}`,covered:`Fully covered`,partial:`Partially covered`,gaps:`Gaps`,tagWarningPill:`Tag filter caveat`,unknownItem:`Unknown`,similarity:e=>`${gu.format(e)} match`,steps:e=>`${hu.format(e)} ${J(e,{one:`step`,other:`steps`})}`,unsupported:{title:`Coverage card not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},vu=new Intl.NumberFormat(`en`),yu=e=>vu.format(e),bu={kind:{atlas_crawl:`Site crawl`,make_auto:`Scenario run`},stage:{queued:`Queued`,launching:`Launching`,link_pending:`Linking to the map`,crawling:`Exploring the site`,running_batch:`Running scenarios`,completed:`Completed`,failed:`Failed`,cancelled:`Stopped`},machineMissing:`Machine name not received`,activity:e=>`Active ${e}`,activityNone:`no activity`,foundCaption:`On the map`,found:{screens:e=>J(e,{one:`screen`,other:`screens`}),edges:e=>J(e,{one:`transition`,other:`transitions`}),notes:e=>J(e,{one:`note`,other:`notes`}),unexplored:e=>J(e,{one:`unexplored`,other:`unexplored`})},degraded:`The map cannot be read right now \u2014 counters are unavailable. The work continues.`,terminalPrefix:`Finished because`,terminalReason:{claim_timeout:`the agent never picked up the job`,launch_timeout:`the browser did not start in time`,launch_error:`the browser failed to start`,browser_gone:`the browser disappeared`,agent_lost:`the agent stopped responding`,max_duration:`the time limit was reached`,killed:`the agent browser was closed manually`,stalled:`the work made no progress`,capability_mismatch:`the agent does not support automatic mapping`,subject_rejected:`the server rejected the run`,model_timeout:`the model did not answer in time`,runs_not_started:`the runs did not start`,credits_exhausted:`credits ran out`,tab_closed:`the run tab was closed`,slot_taken:`another run took the machine slot`,ai_disabled:`an administrator turned Progon off`},openMap:`Open map`,openMapAria:e=>`Open the map of project \u201C${e}\u201D`,cancel:{atlas_crawl:`Stop`,make_auto:`Cancel batch`},kill:`Close agent browser`,cancelConfirm:{atlas_crawl:{question:`Stop the exploration?`,body:`The exploration will stop.`,bodyKept:`Everything the agent has already seen stays on the map.`,bodyQueued:`The job will be removed from the queue \u2014 nothing has started yet.`,keep:`Keep exploring`,confirm:`Stop`},make_auto:{question:`Cancel the batch?`,body:`The whole batch stops: the current run is interrupted and the scenarios still in the queue will not start. Mapping collected so far is kept.`,bodyKept:null,bodyQueued:`The batch will be removed from the queue \u2014 nothing has started yet.`,keep:`Keep batch`,confirm:`Cancel batch`}},killConfirm:{question:`Close the agent browser?`,body:{atlas_crawl:`The browser on the agent machine will be force-closed and the exploration will end as \u201Cbrowser closed manually\u201D. Use it if the agent did not stop after Stop.`,make_auto:`The browser on the agent machine will be force-closed and the batch will end as \u201Cbrowser closed manually\u201D. Use it if the agent did not stop after Cancel.`},keep:`Keep open`,confirm:`Close browser`},failed:{cancel:{atlas_crawl:`Could not stop the exploration.`,make_auto:`Could not cancel the batch.`},kill:`Could not close the agent browser.`,conflict:`The job has already changed \u2014 status refreshed.`},cardAria:e=>`Job: ${e}`,unsupported:{title:`Job status is not supported`,body:`The status came in a format this version cannot show. Reload the page or the extension.`},collection:{collectionAria:e=>`Jobs: ${yu(e)}`,roleCarousel:`job track`,roleSlide:`job`,previous:`Previous job`,next:`Next job`,goToSlide:`Job {index} of {total}`}},xu={explore_app:{id:`explore_app`,title:{ru:`\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u044C`,en:`Explore`},chip:{hint:{ru:`\u041E\u0431\u043E\u0439\u0442\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043A\u0430\u0440\u0442\u0443 \u044D\u043A\u0440\u0430\u043D\u043E\u0432`,en:`Walk through the app and build the screen map`},briefTemplate:{ru:`\u041E\u0431\u043E\u0439\u0434\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u0441\u0442\u0440\u043E\u0439 \u043A\u0430\u0440\u0442\u0443 \u044D\u043A\u0440\u0430\u043D\u043E\u0432.
|
|
355
|
-
\u0411\u0430\u0433 \u2014 \u0432\u0441\u0451, \u0447\u0442\u043E \u043B\u043E\u043C\u0430\u0435\u0442 \u043F\u0443\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438\u043B\u0438 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043E\u0448\u0438\u0431\u043A\u043E\u0439.
|
|
356
|
-
\u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Walk through the app and build the screen map.
|
|
357
|
-
A bug is anything that breaks the user's path or answers with an error.
|
|
358
|
-
Do not touch: `}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`],browserSuggested:!0},find_bugs:{id:`find_bugs`,title:{ru:`\u041D\u0430\u0439\u0442\u0438 \u0431\u0430\u0433\u0438`,en:`Find bugs`},chip:{hint:{ru:`\u0418\u0441\u043A\u0430\u0442\u044C \u0434\u0435\u0444\u0435\u043A\u0442\u044B \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0447\u0430\u0441\u0442\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F`,en:`Hunt for defects in the part of the app you name`},briefTemplate:{ru:`\u041D\u0430\u0439\u0434\u0438 \u0431\u0430\u0433\u0438 \u0432:
|
|
359
|
-
\u0411\u0430\u0433 \u2014 \u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u043F\u0440\u0438\u043D\u044F\u0442\u044B\u0439 \u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434, \u043E\u0448\u0438\u0431\u043A\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.
|
|
360
|
-
\u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Find bugs in:
|
|
361
|
-
A bug is wrong data, accepted invalid input, a server error.
|
|
362
|
-
Do not touch: `}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`],browserSuggested:!0},create_tests:{id:`create_tests`,title:{ru:`\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0442\u0435\u0441\u0442\u044B`,en:`Create tests`},chip:{hint:{ru:`\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B \u043F\u043E \u0442\u043E\u043C\u0443, \u0447\u0442\u043E \u0435\u0441\u0442\u044C \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438`,en:`Write scenarios and checklists from what the app has`},briefTemplate:{ru:`\u041D\u0430\u043F\u0438\u0448\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B \u0434\u043B\u044F:
|
|
363
|
-
\u041F\u043E \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044E \u043D\u0430 \u043F\u0443\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F, \u0447\u0435\u043A-\u043B\u0438\u0441\u0442 \u043D\u0430 \u044D\u043A\u0440\u0430\u043D.
|
|
364
|
-
\u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Write scenarios and checklists for:
|
|
365
|
-
One scenario per user path, one checklist per screen.
|
|
366
|
-
Do not touch: `}},defaultAllowedChanges:[`file_bugs`,`write_tests`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`],browserSuggested:!0},automate_scenarios:{id:`automate_scenarios`,title:{ru:`\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,en:`Automate`},chip:{hint:{ru:`\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438`,en:`Make scenarios automated`},briefTemplate:{ru:`\u0421\u0434\u0435\u043B\u0430\u0439 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438.
|
|
367
|
-
\u0415\u0441\u043B\u0438 \u0448\u0430\u0433 \u0443\u0441\u0442\u0430\u0440\u0435\u043B \u2014 \u043F\u043E\u043F\u0440\u0430\u0432\u044C \u0435\u0433\u043E \u0438 \u043D\u0430\u043F\u0438\u0448\u0438 \u0432 \u043E\u0442\u0447\u0451\u0442\u0435, \u0447\u0442\u043E \u043F\u043E\u043C\u0435\u043D\u044F\u043B.`,en:`Make the chosen scenarios automated.
|
|
368
|
-
If a step is outdated, fix it and say in the report what you changed.`}},defaultAllowedChanges:[`file_bugs`,`write_tests`],defaultCaptureApi:!1,suggestedScopeKinds:[`scenarios`],browserSuggested:!0},run_scenarios:{id:`run_scenarios`,title:{ru:`\u041F\u0440\u043E\u0433\u043D\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,en:`Run scenarios`},chip:{hint:{ru:`\u041F\u0440\u043E\u0433\u043D\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u0442\u044C, \u0447\u0442\u043E \u0443\u043F\u0430\u043B\u043E`,en:`Run scenarios and sort out what failed`},briefTemplate:{ru:`\u041F\u0440\u043E\u0433\u043E\u043D\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0438, \u0447\u0442\u043E \u0443\u043F\u0430\u043B\u043E: \u0431\u0430\u0433 \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0438\u043B\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0448\u0430\u0433.
|
|
369
|
-
\u0411\u0430\u0433\u0438 \u0437\u0430\u0432\u043E\u0434\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E \u0431\u0430\u0433\u0430\u043C \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F.`,en:`Run the scenarios and sort out what failed: a bug in the app or an outdated step.
|
|
370
|
-
File bugs only for bugs of the app.`}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!1,suggestedScopeKinds:[`test_run`,`test_plan`,`scenarios`],browserSuggested:!1},custom:{id:`custom`,title:{ru:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`,en:`AI task`},chip:null,defaultAllowedChanges:null,defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`,`test_run`,`test_plan`],browserSuggested:!1}},Su=[`explore_app`,`find_bugs`,`create_tests`,`automate_scenarios`,`run_scenarios`];function Cu(e){return Su.some(t=>Object.values(xu[t].chip.briefTemplate).includes(e))}function wu(e){return e.name===null?e.briefLine:e.name}function Tu(e,t){return e.presetId!==`custom`||e.brief.trim()===``?xu[e.presetId].title[t]:ku(e.brief)}var Eu=`\u2026`,Du=`\u00AB`,Ou=`\u00BB`;function ku(e){let t=e.trim().replace(/\s+/gu,` `);if(t===``)throw Error(`presetBriefLine: a blank brief has no line`);let n=Array.from(t);if(n.length<=100)return t;let r=n.slice(0,100),i=Au(r);if(i.length===0)return`${r.join(``)}${Eu}`;let a=r.slice(0,i[0]).join(``).trimEnd();if(a!==``)return`${a}${Eu}`;for(let e=r.length;;--e){let t=r.slice(0,e),n=Au(t).length;if(e+1+n<=100)return`${t.join(``).trimEnd()}${Eu}${Ou.repeat(n)}`}}function Au(e){let t=[];return e.forEach((e,n)=>{e===Du?t.push(n):e===Ou&&t.length>0&&t.pop()}),t}var ju={web_runs_prompt:`from Launches`,web_test_run_dialog:`from a test run`,web_map_dialog:`from the map`,web_scenarios_dialog:`from Scenarios`,chat:`from a chat`},Mu=e=>J(e,{one:`agent`,other:`agents`}),Nu={title:{make_auto:`Swarm \u00B7 Make Auto`,atlas:`Swarm \u00B7 Atlas`,preset:`AI task`},subtitle:(e,t,n)=>`${e} \u00B7 Max \u00B7 up to ${t} ${Mu(t)} \u00B7 since ${n}`,preset:{stopConfirm:{question:`Stop the task?`,body:`The agent window closes and running runs are cancelled. The report is marked \u00ABPartial\u00BB. What is done \u2014 bugs, findings, scenarios \u2014 stays.`,keep:`Keep running`,confirm:`Stop the task`,failed:`Could not stop the task`},scope:e=>{switch(e.kind){case`project`:return`Whole app`;case`scenarios`:return`${e.count} ${J(e.count,{one:`scenario`,other:`scenarios`})}`;case`test_run`:return e.name===null?`Test run #TR-${String(e.number).padStart(3,`0`)}`:`Test run \u201C${e.name}\u201D`;case`test_plan`:return`Test plan \u201C${e.name}\u201D`}},level:e=>e.effort===`max`?`Max \u00B7 ${e.maxAgents} ${Mu(e.maxAgents)}`:e.effort===`thinking`?`Thinking`:`Normal`,since:e=>`since ${e}`,counts:{findings:e=>J(e,{one:`finding`,other:`findings`}),bugs:e=>J(e,{one:`bug`,other:`bugs`}),undecided:e=>J(e,{one:`awaits a decision`,other:`await a decision`}),notDone:`not done`},awaitingBrowser:{sidePanel:`Connect this browser \u2014 the lead starts at once`,web:`You can continue from the Progon side panel in Chrome`},startingRunner:`Waiting for the runner to take the task`,pillAwaitingBrowser:`Waiting for a browser`,stripAwaitingBrowser:`The task is waiting for a browser`,panelWait:{title:e=>`\u201C${e}\u201D is waiting for a browser`,lostTitle:e=>`The browser disconnected \u2014 \u201C${e}\u201D is waiting`,lostDetail:e=>`The agent window closed at ${e}, the work done is saved`,origin:(e,t,n)=>`Launched ${ju[e]} at ${t} \u00B7 ${n}`,resume:`Continue in this browser`,openLaunch:`Launch page`},stripChatLeadAwaitingAnswer:`The assistant awaits your reply`,stripChatLeadAwaitingMessage:`The assistant awaits your message`,chatLeadIdle:`The assistant wakes up when the run ends`,partialCancelled:e=>`Incomplete: stopped at ${e}.`,partialFailed:e=>`Incomplete: ${e}.`,failureReason:{credits:`the company ran out of AI credits`,turnShape:`the lead answered outside the rules`,internal:`internal error of the lead`,initiatorUnavailable:`the initiator is unavailable`,other:e=>`the lead stopped with the error \u201C${e}\u201D`},beforeStop:(e,t)=>t===null?`Before the stop \u2014 ${e}.`:`Before the stop \u2014 ${e}, ${t}.`},topic:e=>e.kind===`atlas`?e.projectName:e.kind===`preset`?wu(e):e.scenarioName===null?`${e.scenarioCount} ${J(e.scenarioCount,{one:`scenario`,other:`scenarios`})}`:e.scenarioName.trim()===``?`Untitled scenario`:e.scenarioName,pill:{startingBrowser:`Connecting`,startingRunner:`Connecting`,running:`Running`,awaiting:`Awaiting reply`,browserLost:`Waiting for browser`,runnerLost:`Waiting for runner`,stopping:`Stopping`,completed:`Done`,failed:`Failed`,cancelled:`Stopped`},lead:{startingBrowser:`Waiting for the browser to take the swarm`,startingRunner:`Waiting for the runner to take the swarm`,active:`The lead is handing out work`,idle:`The agents are working, the lead awaits their reports`,awaiting:`The lead awaits your reply \u2014 the question is below`,stopping:`Closing the windows and stopping the tasks. What is done stays.`},startingRow:{browser:`Windows open in the background \u2014 focus stays with you`,runner:`Windows open in the runner's browser`},hostLost:{sidePanel:`The browser was closed \u2014 the agents' windows are closed, the queues are paused.`,web:`The browser is disconnected. You can continue from the Progon side panel in Chrome.`,runner:`The runner's job ended. Why \u2014 on the launch page, with \u00ABContinue on a runner\u00BB.`},worker:{name:e=>`Agent ${e}`,kind:{make_auto:`Make Auto`,atlas:`Atlas`,run:`Run`},task:e=>`task ${e}`,opening:`Window opening`,idle:`Awaiting a task`,busy:`Taking a task`,closing:`Window closing`,untitledScenario:`Untitled scenario`,crawl:e=>e===null?`Crawl`:`Crawl \u201C${e}\u201D`,progress:(e,t)=>`${e} of ${t}`,steps:e=>`${e} ${J(e,{one:`step`,other:`steps`})}`},end:{tally:(e,t)=>`Done ${e} of ${t}`,tallyBeforeStop:(e,t)=>`Done before the stop: ${e} of ${t}`,screens:e=>`${e} ${J(e,{one:`screen`,other:`screens`})} on the map`,cancelledBy:(e,t)=>`Stopped by ${e}, ${t}.`,reportPartial:`The report is marked \u00ABIncomplete\u00BB.`,failureReason:{credits:`The company ran out of AI credits.`,turnShape:`The lead answered outside the swarm\u2019s rules.`,internal:`Internal error of the lead.`,initiatorUnavailable:`The swarm stopped: the initiator is unavailable.`,other:e=>`The lead stopped with the error \u201C${e}\u201D.`}},actions:{open:`Swarm page`,openLaunch:`Launch page`,openReport:`Open report`,stop:`Stop`,resume:`Continue in this browser`,stopConfirm:{question:`Stop the swarm?`,body:`The windows close and the tasks stop. What is done \u2014 scenarios and screens on the map \u2014 stays.`,keep:`Keep running`,confirm:`Stop the swarm`},stopFailed:`Could not stop the swarm`},strip:{awaiting:`The lead awaits your reply`,toQuestion:`To the question`,lostBrowser:`Browser disconnected`,lostRunner:`Waiting for runner`,resume:`Continue`,startingBrowser:`Connecting the browser`,startingRunner:`Connecting the runner`,active:`The lead is handing out work`,idle:`The agents are working`,stopping:`The swarm is stopping`,toBlock:`To the swarm`,toBlockLabel:`Show the swarm block`,windows:e=>`${e} ${J(e,{one:`window`,other:`windows`})}`}},Pu={failed:e=>`Could not start the scenario: ${e}`,failedBatch:e=>`Could not start the scenarios: ${e}`,reason:{no_active_tab:`no active tab. Open the project page first.`,content_not_loaded:`the extension is not loaded on this page. Refresh it and try again.`,launch_refused:`the tab did not start the run: another run is in progress there, or it could not be prepared.`,no_response:`the extension did not answer the run request. Try again.`,test_run_tab_missing:`the tab with this run's test run is closed, or its test run has ended.`},unsupported:{title:`Run in tab not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},Fu=new Intl.NumberFormat(`en`),Iu=e=>Fu.format(e),Lu={title:`Run on agent`,cardAria:e=>`Run on agent: ${e}`,outcome:{refused:`Rejected`,refusedWithReason:e=>`Rejected: ${e}`,launched:(e,t)=>`Launched ${Iu(e)} of ${Iu(t)}`},confirmed:`Confirmed`,refusedHead:`Rejected`,refusedList:`Rejected scenarios`,launchedSummary:`Launched`,launchedList:`Launched scenarios`,unsupported:{title:`Run card not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},Ru={listLabel:(e,t)=>`${e} \u00B7 ${Iu(t)}`,token:{"stand.main":`Safe`,"stand.dangerous":`Full`,"scenarios.ad_hoc_batch":`A one-off batch of steps, not a saved scenario`,"environment.projectDefault":`The project's default`,"status.running":`Running`,"status.finished":`Finished`,"status.aborted":`Aborted`,"aiRunMode.mapping":`Bind steps to page elements`,"aiRunMode.agentic":`The agent walks through the scenario`,"window.headful":`With browser window`,"window.headless":`Without browser window`,"executor.extension":`Browser extension`,"executor.agent":`Runner`,"billingPeriod.monthly":`Monthly`,"billingPeriod.yearly":`Yearly`,"requestType.plan_change":`Plan change`,"requestType.topup":`Credit top-up`,"requestType.seats":`Additional seats`,"role.user":`User`,"allowedChange.file_bugs":`File bugs`,"allowedChange.write_tests":`Create and change scenarios and checklists`,"allowedChange.edit_project":`Other changes`,"scope.project":`Whole application`},warning:{"stand.dangerous":`Full access on an unattended machine: the agent will be able to change and delete any data, with nobody next to it. Enable this on a test stand only.`},unrecognized:`Value not recognized`},zu=new Intl.NumberFormat(`en`),Bu=e=>zu.format(e),Vu={title:`Scenario`,caption:e=>`SC-${String(e)}`,cardAria:(e,t)=>`Scenario ${e}: ${t}`,lifecycle:{draft:`Draft`,ready:`Live`,outdated:`Outdated`,archived:`Archived`},steps:e=>J(e,{one:`step`,other:`steps`}),runs:e=>J(e,{one:`run`,other:`runs`}),mapping:{label:{none:`Mapping: none`,partial:`Mapping: partial`,full:`Mapping: full`},hint:{none:`no step is linked yet`,partial:`some steps are linked to pages and elements`,full:`every step is linked`},hintNoSteps:`no steps`,tip:e=>`Steps mapped to pages and elements: ${e}`},open:`Open in workspace`,openShort:`Open`,openAria:e=>`Open in workspace: ${e}`,run:`Run`,runAria:e=>`Run: ${e}`,runCommand:e=>`Run scenario ${e}`,runNoSteps:`No steps to run \u2014 add steps in the workspace.`,expand:`Expand \u2014 steps and history`,expandShort:`Expand`,collapse:`Collapse`,tabsAria:`Scenario sections`,tabSteps:`Steps`,tabRuns:`Run history`,step:{aria:(e,t)=>`Step ${Bu(e)}: ${t}`,missingLabel:`step text is missing`,moreExpected:e=>`+${Bu(e)}`,expectedHeading:`Expected results`},stepsEmptyTitle:`No steps yet`,stepsEmptyHint:`Add steps in the workspace \u2014 record them in the extension, type them or import them.`,stepsShown:(e,t)=>`Showing ${Bu(e)} of ${Bu(t)}`,stepsLoadMore:e=>`Load ${Bu(e)} more`,stepsLoading:`Loading steps\u2026`,stepsLoadFailed:(e,t)=>`Could not load steps \u00B7 showing ${Bu(e)} of ${Bu(t)}`,runsEmptyTitle:`Never run`,runsEmptyHint:`Run the scenario \u2014 its run history appears here.`,runsEmptyHintNoSteps:`Add steps and run the scenario \u2014 its run history appears here.`,runsLoading:`Loading run history\u2026`,runsLoadFailed:`Could not load the run history`,runsShown:(e,t)=>`Showing ${Bu(e)} of ${Bu(t)}`,runsLoadMore:e=>`Show ${Bu(e)} more`,runStatus:{queued:`Queued`,launching:`Launching`,in_progress:`In progress`,completed:`Completed`,failed:`Failed`,cancelled:`Cancelled`},runMode:{manual:`Manual`,semi_auto:`Semi-auto`,auto:`Auto`},runProgress:(e,t)=>`step ${Bu(e)} of ${Bu(t)}`,runDurationUnavailable:`Duration unavailable`,runMomentUnavailable:`\u2014`,unsupported:{title:`Scenario card is not supported`,body:`The answer came in a format this version cannot show. Reload the page or the extension and ask in the chat again.`},collection:{collectionAria:e=>`Scenarios: ${Bu(e)}`,roleCarousel:`scenario track`,roleSlide:`scenario`,previous:`Previous scenario`,next:`Next scenario`,goToSlide:`Scenario {index} of {total}`}},Hu=new Intl.NumberFormat(`en`),Y=e=>Hu.format(e),Uu=e=>J(e,{one:`run`,other:`runs`}),Wu=e=>J(e,{one:`failure`,other:`failures`}),Gu=e=>J(e,{one:`pass`,other:`passes`}),Ku=e=>J(e,{one:`day`,other:`days`}),qu=e=>J(e,{one:`page`,other:`pages`}),Ju={not_enrolled:()=>`No machine is connected yet.`,none_ready:e=>`None of your machines (${Y(e)}) is ready for this work.`,one_ready:e=>`One machine is ready. Machines in total: ${Y(e)}.`,many_ready:e=>`Several machines are ready. Machines in total: ${Y(e)}.`},Yu={playback:`No playback`,atlas_crawl:`No site crawl`,make_auto:`No scenario auto-build`},Xu={common:{missingName:`name is missing`,open:`Open`,newTabSuffix:` (new tab)`,noOpenTarget:`no open target`,noOpenTargetHint:`There is no open target for this entity type`,moreActions:`More actions`,retry:`Retry`,commandFailure:{confirm:`Could not confirm \u2014`,reject:`Could not reject \u2014`,reason:{rejected:`the server did not accept the decision. Try again.`,ack_timeout:`the server did not answer. Try again.`,not_open:`the connection is not open yet. Try again.`,connection_closed:`the connection dropped. Try again.`}},entityType:{scenario:`Scenario`,bug:`Bug`,"checklist-item":`Checklist item`,checklist:`Checklist`,"saved-request":`API request`,collection:`Collection`,"shared-step":`Shared step`,run:`Test run`,"test-run":`Test run`,page:`Page`,"test-plan":`Test plan`,environment:`Environment`,variable:`Variable`,incident:`Incident`,"atlas-fact":`Map`,"api-folder":`API folder`,"api-endpoint":`API endpoint`,section:`Section`}},collection:{counter:`{index} / {total}`,counterUnknown:`{index}`,positionMore:`More`,scrubberAria:`Position in the track`,slideAria:`{index} of {total}`,slideAriaAtLeast:`{index} of {total}+`,slideAriaUnknown:`{index}, set size unknown`,loadedOf:`{loaded} of {total} shown`,loadedOfAtLeast:`{loaded} of {total}+ shown`,loadedOfUnknown:`{loaded} shown`,loadMore:`Load {remaining} more`,loadMoreUnknown:`Load more`,loading:`Loading the next page\u2026`,loadMoreFailed:`Could not load the next page`,retry:`Retry`,loadedMore:`{count} more loaded, {total} in total`,loadedMoreAtLeast:`{count} more loaded, at least {total} in total`,loadedMoreUnknown:`{count} more loaded`},report:{title:{metric_card:`Metric`,trend_card:`Trend`,finding_card:`Weak spot`,stability_row_card:`Scenario stability`,scenario_stability_card:`Scenario stability \u2014 details`,failure_breakdown_card:`Failure causes`,weak_spot_feature_card:`Weak area: feature`,weak_spot_page_card:`Weak area: page`,hotspot_card:`Bug hotspot`},window:{"7d":`7 days`,"14d":`14 days`,"30d":`30 days`,"90d":`90 days`},windowShort:{"7d":`7 d`,"14d":`14 d`,"30d":`30 d`,"90d":`90 d`},basisRuns:(e,t)=>`last ${Y(e)} ${Uu(e)} (up to ${Y(t)} ${Ku(t)})`,currentState:`current state`,noWindow:`window does not apply`,asOf:e=>`as of ${e}`,stamp:{source:(e,t)=>[`Source: ${e}`,...t].join(` \u00B7 `),metric:(e,t)=>`${e} \u00B7 version ${t}`,rule:(e,t)=>`rule ${e} \u00B7 version ${t}`,definition:e=>`definition version ${e}`,mapping:e=>`mapping version ${e}`,envelope:(e,t)=>`${e} \u00B7 version ${t}`},metric:{name:{pass_rate:`Run pass rate`,runs_total:`Runs`,runs_passed:`Passed runs`,runs_failed:`Failed runs`,runs_evaluated:`Runs in the denominator`,runs_infra:`Infrastructure runs`,runs_cancelled:`Cancelled runs`,runs_abandoned:`Abandoned runs`,run_duration_sum_ms:`Total run duration`,run_duration_count:`Runs with a known duration`,run_duration_avg:`Average run duration`,page_steps_executed:`Steps executed on the page`,page_steps_passed:`Steps passed on the page`,page_steps_failed:`Steps failed on the page`,page_steps_healed:`Self-healed steps on the page`,page_step_success_rate:`Page step success rate`,page_healed_rate:`Page self-healing share`,step_failures:`Step failures`,run_failures:`Run failures`,bugs_opened:`Bugs opened`,bugs_closed:`Bugs closed`,open_bugs:`Open bugs`,covered_pages:`Covered pages`,total_pages:`Total pages`,page_coverage_pct:`Page coverage`,unstable_scenarios:`Unstable scenarios`},missingName:`Metric without a name in this version`,missingNameDetail:e=>`metricId: ${e}`,unit:{percent:`%`,count:``,ms:`ms`,days:`d`},denominator:{pass_rate:e=>`of ${Y(e)} ${Uu(e)}`,runs_total:e=>`${Y(e)} ${Uu(e)}`,unstable_scenarios:e=>`of ${Y(e)} automated ${J(e,{one:`scenario`,other:`scenarios`})}`,open_bugs:e=>`${Y(e)} open`,page_coverage_pct:e=>`of ${Y(e)} ${qu(e)}`,generic:e=>`base: ${Y(e)}`},insufficient:`Not enough data in the window \u2014 the metric is not computed.`,noSeriesValue:`Not enough data in the window \u2014 no chart is drawn.`,deltaHint:`vs the previous period`,deltaPointsHint:` \u00B7 pp \u2014 percentage points, the difference of two percentages`,deltaPoints:e=>`${e} pp`,sparkAria:e=>`Trend: ${e}`,sparkGap:(e,t)=>`Not enough data on ${e}: ${Y(t)} ${Uu(t)}`,openReport:`Open the full report`},trend:{lastDay:e=>`Last day (${e})`,dayDenominator:e=>`day denominator: ${Y(e)}`,points:`Points`,empty:`No points \u2014 not a single day in the window had enough data.`,gaps:e=>`Days with no value: ${Y(e)} \u2014 the day denominator is below the minimum.`},finding:{severity:{critical:`critical`,high:`important`,watch:`watch`},sentence:{uncovered_high_priority:e=>({before:`Feature `,after:` (${e.priority} priority): ${Y(e.uncovered)} of ${Y(e.total)} ${qu(e.total)} not covered`}),consistently_failing_scenario:e=>({before:`Scenario `,after:` failed in the last ${Y(e.count)} ${Uu(e.count)} in a row`}),low_page_success:e=>({before:`Page `,after:`: step success ${e.rate} of ${Y(e.executions)} (threshold: ${e.threshold})`}),high_healed_rate:e=>({before:`Page `,after:`: ${e.rate} of passed steps needed self-healing (threshold: ${e.threshold})`}),stale_page:e=>({before:`Page `,after:` has not been checked for ${Y(e.days)} ${Ku(e.days)} (threshold: ${Y(e.threshold)})`}),open_bugs_no_verification_critical:e=>({before:`Page `,after:`: ${Y(e.count)} critical ${J(e.count,{one:`bug`,other:`bugs`})} and no passed check in ${e.window}`}),open_bugs_no_verification_high:e=>({before:`Page `,after:`: ${Y(e.count)} high-severity ${J(e.count,{one:`bug`,other:`bugs`})} and no passed check in ${e.window}`})},dominantCause:(e,t,n)=>`; main cause \u2014 ${e.toLocaleLowerCase(`en`)} (${Y(t)} of ${Y(n)} ${Wu(n)})`,unknownRule:`The rule of this weak spot is not supported by this version.`,incompleteEvidence:`The rule evidence is incomplete, so no statement is made.`,ruleIdDetail:e=>`ruleId: ${e}`,evidence:(e,t,n)=>`${Y(e)} \u00B7 ${t} \u00B7 threshold ${Y(n)}`,evidenceAria:`Evidence behind the statement`,evidenceRows:{denominator:`Denominator`,threshold:`Threshold`,window:`Window`,rule:`Rule`},open:{scenario:`Open the scenario`,page:`Open the page`,feature:`Open the feature`}},openAria:(e,t)=>`${e} \u201C${t}\u201D`,stability:{status:{consistently_failing:`consistently failing`,flaky:`flaky`,monitoring:`monitoring`,insufficient_history:`not enough history`,stable:`stable`},evidence:{flaky:(e,t,n)=>`Flaky \u2014 ${Y(e)} ${Wu(e)} and ${Y(t)} ${Gu(t)} in the last ${Y(n)} ${Uu(n)}`,consistently_failing:e=>J(e,{one:`Consistently failing \u2014 the last ${Y(e)} run failed`,other:`Consistently failing \u2014 the last ${Y(e)} runs failed in a row`}),monitoring:(e,t)=>`Monitoring \u2014 ${Y(e)} ${Wu(e)} out of ${Y(t)} ${Uu(t)}; flaky needs \u22652 failures and \u22652 passes at n\u22656`,insufficientHistory:e=>`Not enough history \u2014 ${Y(e)} ${Uu(e)}; classification needs \u22653`,insufficientHistoryWatermark:e=>`Not enough history \u2014 history is classified from ${e}: the scenario was edited`,stable:e=>`Stable \u2014 ${Y(e)} ${Uu(e)} with no failures`},stripAria:(e,t,n)=>`${Y(e)} ${Gu(e)}, ${Y(t)} ${Wu(t)} out of ${Y(n)}`,stripAriaBeforeChange:e=>` \u00B7 before the scenario was edited: ${Y(e)} ${Uu(e)}`,beforeChange:`before the scenario was edited`,success:`Success rate`,outOf:(e,t)=>`${Y(e)} of ${Y(t)}`,dominantCause:`Main cause`,noFailures:`no failures`,lastRun:`Last run`,historyReset:e=>`History is classified from ${e}: the scenario was edited.`,causesTitle:`Failure causes`,failures:e=>`${Y(e)} ${Wu(e)}`,healed:`Step self-healing`,aiExecuted:`AI-executed steps`,ofPassedSteps:(e,t)=>`${Y(e)} of ${Y(t)} passed ${J(t,{one:`step`,other:`steps`})}`,erFailed:`Failed expected results`,erFailedValue:(e,t)=>`in ${Y(e)} of ${Y(t)} ${Uu(t)}`,rawCodes:e=>`Cause codes \u00B7 mapping ${e}`,rawCode:(e,t)=>`${e} \u00D7${Y(t)}`,recentRuns:`Recent runs`,outcome:{passed:`passed`,failed:`failed`,infra:`infrastructure`,cancelled:`cancelled`,abandoned:`abandoned`},totalFailures:`Failures in total`,noCauses:`No failures.`},cause:{element_resolution:`Element lookup`,step_definition:`Step definition`,action_dispatch:`Action dispatch`,precondition:`Precondition not met`,infrastructure:`Infrastructure`,cancelled:`Cancelled`,unrecognized:`Unrecognized`},weakSpots:{coverage:`Coverage`,coverageValue:(e,t)=>`${Y(e)} of ${Y(t)} ${qu(t)}`,stepSuccess:`Step success rate`,ofSteps:(e,t)=>`${Y(e)} of ${Y(t)} ${J(t,{one:`step`,other:`steps`})}`,noExecutions:`no executions`,openBugs:`Open bugs`,findings:`Weak spots`,findingsNone:`none`,findingCount:{critical:e=>`${Y(e)} critical ${J(e,{one:`finding`,other:`findings`})}`,high:e=>`${Y(e)} important ${J(e,{one:`finding`,other:`findings`})}`,watch:e=>`${Y(e)} ${J(e,{one:`finding`,other:`findings`})} on watch`},pagesTitle:`Feature pages`,pagesCount:(e,t)=>`${Y(e)} of ${Y(t)}`,pageCovered:`covered`,pageNotCovered:`not covered`,pageBugs:e=>`bugs: ${Y(e)}`,pagesTruncated:(e,t)=>`Showing ${Y(e)} of ${Y(t)} feature pages.`,membership:`A page can belong to several features \u2014 per-feature sums do not add up.`,unassigned:`no feature`,priority:{critical:`Critical`,high:`High`,medium:`Medium`,low:`Low`,ignore:`Ignored`}},lastPassed:{label:`Last passed check`,never:`no passed checks yet`,today:`today`,yesterday:`yesterday`,daysAgo:e=>`${Y(e)} ${Ku(e)} ago`},hotspot:{open:`Open bugs`,opened:`Opened in the window`,closed:`Closed in the window`,closedHint:`Closures are counted from the reports release: earlier closures carry no close date, and rebuilding it from the change time would be made up.`,unmapped:`Unmapped`,unmappedHint:`Bugs whose element or page has been deleted.`,severityChip:{critical:e=>`${Y(e)} crit`,high:e=>`${Y(e)} high`,medium:e=>`${Y(e)} med`,low:e=>`${Y(e)} low`,none:e=>`${Y(e)} no severity`,unknown:(e,t)=>`${Y(e)} ${t}`}},envelope:{shownOfTotal:(e,t)=>`Showing ${Y(e)} of ${Y(t)} \u2014 the full list is in the report.`,truncated:`Not all rows are shown \u2014 the full list is in the report.`},unsupported:{title:`This report card is not supported`,body:`The report data arrived in a shape this version cannot show. Reload the page or update the extension \u2014 the numbers are still in Progon\u2019s reply text.`},collection:{collectionAria:e=>`Report cards: ${Y(e)}`,roleCarousel:`card track`,roleSlide:`card`,previous:`Previous card`,next:`Next card`,goToSlide:`Card {index} of {total}`}},runnerReadiness:{title:e=>`Machine readiness: ${e}`,job:{atlas_crawl:`site crawl`,make_auto:`scenario auto-build`,swarm:`agent swarm`},evaluatedAt:e=>`as of ${e}`,fleet:Ju,state:{not_owner:()=>`Not found`,pending_enroll:()=>`Awaiting connection`,offline:()=>`Offline`,capability_missing:e=>e===null?`Update needed`:Yu[e],queue_full:()=>`Queue full`,ready:()=>`Ready`},platform:{darwin:`macOS`,linux:`Linux`,win32:`Windows`},lastSeen:e=>`last seen ${e}`,lastSeenNever:`never came online`,machinesAria:e=>`Machines: ${Y(e)}`,noRunners:`The machine list is empty.`,truncated:(e,t)=>`Showing ${Y(e)} of ${Y(t)}.`,unsupported:{title:`This machine card is not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`},collection:{collectionAria:e=>`Readiness reports: ${Y(e)}`,roleCarousel:`readiness report track`,roleSlide:`report`,previous:`Previous report`,next:`Next report`,goToSlide:`Report {index} of {total}`}},runnerEnrollment:{title:e=>`Connect your machine: ${e}`,expiresAt:e=>`valid until ${e}`,step:{install:`Install the agent`,enroll:`Connect the machine`,approve:`Approve it in the browser`,start:`Start the daemon`},copy:`Copy`,copied:`Copied`,copyAria:{install:`Copy the install command`,enroll:`Copy the enroll command`,start:`Copy the start command`},copiedAria:{install:`Copied \u2014 the install command`,enroll:`Copied \u2014 the enroll command`,start:`Copied \u2014 the start command`},approveBefore:`The enroll command prints a confirmation code and an approval link shaped like`,approveAfter:`\u2014 open it in a browser signed in to Progon, check the code matches your terminal, name the machine and approve it.`,cadence:e=>`Approve the request within ${Y(e)} s.`,askAgain:`Once the machine is connected, ask in the chat again.`,unsupported:{title:`These connection instructions are not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`}},references:{title:`References`,groupAria:`References from the reply`,destination:{workbench:`in the workbench`,map:`on the map`,run:`opens the run`,list:`in the list`},action:{workbench:`Open in the workbench`,map:`Open on the map`,run:`Open the run`,list:`Open in the list`},noOpenAria:e=>`No open target: ${e}`,unsupported:{title:`References from the reply are not supported`,body:`The references arrived in a format this version cannot show. Reload the page or update the extension.`}},sectionLink:{title:`Project sections`,groupAria:`Project section links`,action:`Open the section`,sections:{scenarios:`Scenarios`,"shared-steps":`Shared Steps`,"api-collections":`API Requests`,"api-catalog":`API Requests`,checklists:`Checklists`,bugs:`Bugs`,"test-runs":`Test Runs`,map:`Project Map`},unrecognized:`Unrecognized section`,serverLabel:e=>`Section \u00B7 from the server: \u201C${e}\u201D`,noRoute:`no link`,noRouteHint:`No link could be built for this section`,noRouteAria:e=>`No link for the section: ${e}`,unsupported:{title:`This section link is not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension.`}},search:{title:`Found in the project`,evidence:`Why it matched`,openAria:e=>`Open: ${e}`,emptyTitle:`Nothing found`,emptyForQuery:e=>`Nothing matched \u201C${e}\u201D with enough confidence.`,emptyBody:`Searched across the available entity types \u2014 scenarios, bugs, checklist items.`,shownOfTotal:(e,t)=>`Showing ${Y(e)} of ${Y(t)}.`,shownOfAtLeast:(e,t)=>`Showing ${Y(e)} of ${Y(t)}+.`,shownUnknown:e=>`Showing ${Y(e)}.`,loadMore:e=>`Load ${Y(e)} more`,loadMoreUnknown:`Load more`,loading:`Loading the next page\u2026`,loadFailed:`Could not load the next page`,retry:`Retry`,unsupported:{title:`These search results are not supported`,body:`The search reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`},collection:{collectionAria:e=>`Found: ${Y(e)}`,roleCarousel:`result track`,roleSlide:`result`,previous:`Previous result`,next:`Next result`,goToSlide:`Result {index} of {total}`}},jobStatus:bu,workflow:Nu,scenario:Vu,coverage:_u,runInTab:Pu,runStartAgent:Lu,confirmation:Ru,changeSet:mu},Zu={byCode:{"agent_jobs.dispatch_key_spent":`This confirmation is used up: the exploration it started has finished. Ask for the exploration again.`,"agent_jobs.not_active":`The job has already finished \u2014 there is nothing to stop.`,"agent_jobs.not_found":`Job not found.`,"ai.bedrock_not_configured":`Amazon Bedrock is not configured`,"ai.capabilities.unknown_provider":`Unknown provider.`,"ai.company_not_found":`Company not found.`,"ai.completion_failed":`Progon request failed`,"ai.concurrency_gate_unavailable":`Progon is temporarily unavailable because of a problem on our side. Please try again later.`,"ai.credit_charge_failed":`Credits could not be charged for this request. Please try again or contact support.`,"ai.credit_estimate_invalid":`Credit estimate is invalid.`,"ai.credit_reservation_failed":`Could not reserve credits.`,"ai.credit_reservation_not_found":`Credit reservation not found.`,"ai.credit_reservation_not_open":`This credit reservation is no longer open.`,"ai.credits_insufficient":`Not enough credits`,"ai.element_html_required":`Element HTML is required`,"ai.frozen_model_lane_retired":`Frozen on a model lane the platform no longer operates. Launch it again on a current model.`,"ai.generation_failed":`Progon generation failed`,"ai.messages_required":`Messages are required`,"ai.model_not_allowed":`This model is not allowed`,"ai.model_not_configured":`No model is available for your account. Configure one in settings or contact your administrator.`,"ai.model_output_ceiling_below_thinking_budget":`The model's catalog output ceiling is below its thinking budget \u2014 an administrator must raise the ceiling or lower the budget.`,"ai.model_output_ceiling_missing":`This model has no response ceiling recorded in the catalog, and the provider requires one. Contact your administrator.`,"ai.model_plan_restricted":`Your plan does not allow this model`,"ai.plan_restricted":`Your plan does not allow this action`,"ai.provider_empty_response":`Provider returned an empty response`,"ai.provider_error":`Provider error`,"ai.provider_not_configured":`Provider is not configured`,"ai.reasoning_unsupported":`The model does not control reasoning \u2014 choose \u00ABNormal\u00BB in \u00ABEffort\u00BB and send again.`,"ai.user_company_missing":`User is not associated with a company`,"ai.user_concurrency_exceeded":`Too many requests are running at once. Wait for the current ones to finish and try again.`,"ai.user_credits_limit":`User credit limit reached`,"ai.user_disabled":`Progon is disabled for your account. Contact your administrator.`,"ai.user_model_not_allowed":`This model is not available for your account`,"ai.user_not_found":`User account not found.`,"ai_models.no_sendable_model":`No model is available for this run \u2014 pick one in the top bar or configure a key in settings.`,"ai_models.selection_not_sendable":`This model cannot be selected right now.`,"ai_settings.admin_required":`Admin access required.`,"ai_settings.api_key_missing":`No saved API key found.`,"ai_settings.company_key_required":`Company API key is required for this action.`,"ai_settings.company_not_found":`Company not found.`,"ai_settings.company_provider_required":`A company provider must be configured.`,"ai_settings.enterprise_required_company":`Company keys require an Enterprise plan.`,"ai_settings.enterprise_required_personal":`Personal keys require an Enterprise plan.`,"ai_settings.enterprise_required_user":`User keys require an Enterprise plan.`,"ai_settings.invalid_provider":`Invalid provider selected.`,"ai_settings.model_unavailable":`Selected model is not available for your account.`,"ai_settings.personal_provider_required":`A personal provider must be configured.`,"ai_settings.plan_not_found":`Plan not found.`,"ai_settings.provider_required":`Provider is required.`,"ai_settings.provider_unavailable":`Selected provider is not available.`,"ai_settings.unsupported_personal_provider":`Selected provider is not supported as a personal provider.`,"ai_settings.user_not_found":`User not found.`,"assistant.action_context_missing":`Cannot confirm: the conversation context is missing. Start a new conversation or reload.`,"assistant.conversations.invalid_cursor":`Invalid cursor.`,"assistant.conversations.not_found":`Conversation not found.`,"assistant.recover_last_message":`The previous answer was interrupted. Retry your last message.`,"assistant.search_session.not_found":`Search session not found or expired.`,"auth.company_forbidden":`Access denied to this company`,"auth.forbidden":`Insufficient permissions`,"auth.insufficient_scope":`Required permission scope is not granted.`,"auth.invalid_token":`Invalid or expired token`,"auth.login.company_inactive":`Company not found or deactivated`,"auth.login.email_not_verified":`Please verify your email to sign in`,"auth.login.email_rate_limited":`Too many login attempts for this email. Please try again later.`,"auth.login.invalid_credentials":`Invalid email or password`,"auth.login.missing_credentials":`Email and password are required`,"auth.login.rate_limited":`Too many login attempts. Please try again later.`,"auth.missing_header":`Missing or invalid authorization header`,"auth.refresh.token_required":`Refresh token is required.`,"auth.register.capacity_reached":`We are accepting a limited number of new accounts right now, so sign-ups are temporarily closed. Please try again later, or contact support if you need access sooner.`,"auth.register.capacity_unreadable":`Registration could not be completed because of a server error. Please try again, and contact support if it persists.`,"auth.register.company_required":`Company name is required.`,"auth.register.email_domain_blocked":`This email provider is not accepted for registration. Please sign up with a permanent work or personal address.`,"auth.register.email_invalid":`Invalid email address.`,"auth.register.email_taken":`A user with this email already exists`,"auth.register.invite_code_invalid":`This invite code is not valid. Check the code you entered, or request a new one.`,"auth.register.invite_required":`Registration is currently by invitation only. Use the invitation link you were sent, or contact support to request access.`,"auth.register.name_required":`First and last name are required.`,"auth.register.rate_limited":`Too many registration attempts. Please try again later.`,"auth.required":`Authentication required`,"auth.resend.email_required":`Email is required.`,"auth.resend.rate_limited":`Please wait before requesting another code.`,"auth.session_invalidated":`Your session has been invalidated. Please log in again.`,"auth.session_required":`This action requires session authentication.`,"auth.token_expired":`Your token has expired. Please log in again.`,"auth.token_revoked":`Your token has been revoked. Please log in again.`,"auth.user_unavailable":`User not found or deactivated`,"auth.verify_email.invalid_code":`Invalid verification code`,"auth.verify_email.rate_limited":`Too many verification attempts. Please try again later.`,"auth.verify_email.required":`Email and verification code are required.`,"auth.verify_email.too_many_attempts":`Too many attempts. Please request a new code`,"available_models.missing_disabled_selection_id":`Disabled selection ID is missing.`,"available_models.redis_unavailable":`Model availability service is temporarily unavailable.`,"available_models.unknown_key_source":`Unknown API key source.`,"chat.busy":`The assistant is still answering the previous message. Wait and try again.`,"chat_confirm.display_unresolvable":`The assistant referred to an object that does not exist in this project. Say exactly what to start or stop and try again.`,"chat_confirm.pending_action_stale":`This proposal is stale: it was made before an update and its parameters no longer fit the tool. Ask again and the assistant will prepare a fresh one.`,"client.connection_lost_during_stream":`The answer was cut off. Try again once the connection is back.`,"client.browser_api_action_failed":`Could not finish the browser API request. Check history: the request may have been sent.`,"client.atlas_host_action_failed":`Could not finish starting the exploration in this browser. Check Atlas runs before trying again.`,"client.ai_run_host_action_failed":`Could not finish starting the AI run in this browser. Check its status before trying again.`,"client.workflow_host_action_failed":`Could not connect the swarm in this browser. Open the swarm page and try again.`,"client.permission_mode_changed":`The confirmation mode was changed in another window. Check the switch and send the message again.`,"client.stream_stalled":`No answer for over a minute. Try again \u2014 the part of the answer already received stays above.`,"cmd.accept_timeout":`The server did not take the message in time. Try again.`,"company_models.default_must_be_enabled":`Model must be enabled in the allowlist before it can be set as default.`,"company_models.invalid_model_id":`Model not found.`,"company_models.plan_restricted":`This model requires a higher subscription plan.`,"conversation.project_id_required":`A project ID is required for this conversation.`,disconnected:`Connection lost. Please try again.`,"internal.invalid_token":`Invalid admin token.`,"internal.not_configured":`Internal API is not configured.`,"internal.operation_failed":`Internal operation failed.`,"internal.unexpected":`Unexpected error`,model_not_allowed:`That model isn't available for your plan \u2014 reverted to your default.`,"rate_limit.company_write_exceeded":`Company rate limit exceeded. Please retry later.`,"rate_limit.counter_upsert_failed":`Failed to update rate limit counter.`,"rate_limit.counter_upsert_invalid_count":`Rate limit counter returned an invalid value.`,"rate_limit.exceeded":`Too many requests. Please try again later.`,reconnect_failed:`Unable to reconnect. Please check your network and try again.`,reconnect_timeout:`Connection timed out. Please check your network and try again.`,selection_expired:`Message could not be sent. Please try again.`,"subscription.admin_api_error":`Unable to process request at this time.`,"subscription.admin_api_not_configured":`The upgrade request service is not configured.`,"subscription.admin_api_unavailable":`The upgrade request service is temporarily unavailable. Please try again later.`,"subscription.admin_required":`Admin access required.`,"subscription.company_not_found":`Company not found.`,"subscription.credits_maximum":`Maximum purchase is 100,000 credits.`,"subscription.credits_minimum":`Minimum purchase is 100 credits.`,"subscription.invalid_plan":`Invalid subscription plan.`,"subscription.payments_disabled":`Payment processing is temporarily unavailable. Please use the upgrade request form.`,"subscription.plan_config_missing":`Your subscription plan configuration could not be read, so this action cannot be completed. Please contact support.`,"subscription.plan_not_found":`Subscription plan not found.`,"subscription.request_already_open":`Your company already has an open upgrade request. Please wait for it to be resolved before submitting a new one.`,"subscription.seats_exceed_limit":`Cannot add seats: the maximum allowed for your plan would be exceeded.`,"subscription.seats_invalid":`Invalid seat count. Must be between 1 and 100.`,"subscription.seats_unlimited":`Your plan already includes unlimited seats.`,"ws.conversation_not_found":`Conversation not found.`,"ws.rate_limit_company":`Company connection limit reached. Please try again later.`,"ws.rate_limit_fleet":`Server connection limit reached. Please try again later.`,"ws.rate_limit_user":`Too many connections. Please try again later.`,"ws.run_not_found":`Progon run not found.`,"ws.runner_already_claimed":`Runner is already claimed for this run.`,"ws.runner_not_owner":`Runner claim was lost. Please reconnect.`,"ws.runner_restore_unavailable":`No active runner session to restore.`,"ws.runner_restore_window_expired":`Runner restore window has expired.`,"ws.session_not_found":`Session not found.`,"ws.unauthorized_channel":`Access denied or resource not found.`,"workflows.agents_over_max":`\u00ABMax agents\u00BB was lowered \u2014 \u00ABEffort\u00BB moved to the new maximum, send again.`,"workflows.not_found":`Swarm not found.`,"workflows.not_initiator_or_admin":`Only the person who launched the swarm or a company admin can stop it.`},byProviderCode:{"ai.zai.insufficient_balance":`Z.AI rejected the request \u2014 your account balance is insufficient, or the key and endpoint don't match. Check your Z.AI balance and key.`,"ai.zai.rate_limited":`Z.AI is rate-limiting requests. Please wait a moment and try again.`,"ai.zai.overloaded":`Z.AI is temporarily overloaded. Please wait a moment and try again.`,"ai.zai.quota_exhausted":`Your Z.AI usage quota is exhausted. Check your Z.AI plan limits.`,"ai.zai.plan_restricted":`This Z.AI key is restricted to a specific subscription or plan. Check your Z.AI plan.`,"ai.zai.content_policy":`Z.AI declined this request due to its content policy.`,"ai.zai.unknown_model":`The selected Z.AI model is not recognized. Pick a different GLM model.`,"ai.zai.auth_failed":`Z.AI authentication failed. Check that your API key is valid and active.`,"ai.zai.invalid_request":`Z.AI rejected the request as invalid. Check your input and try again.`,"ai.zai.context_overflow":`The conversation is too long for this Z.AI model. Start a new conversation or shorten your input.`,"ai.zai.vision_not_supported":`This Z.AI model does not support image input. Remove images or pick a vision-capable model.`,"ai.zai.abnormal_termination":`The Z.AI response ended unexpectedly. Please try again.`,"ai.zai.provider_error":`Z.AI returned an error. Please try again.`}},Qu=e=>J(e,{one:`message`,other:`messages`}),$u=e=>J(e,{one:`agent`,other:`agents`}),ed={cards:Xu,shell:{header:{title:`Progon`,history:`History`,newConversation:`New conversation`,noProject:`No project selected`},composer:{inputLabel:`Message to the assistant`,placeholder:`Ask Progon\u2026`,placeholderNoModels:`Sending is unavailable until the model list loads`,placeholderSignIn:`Sign in in the extension first`,placeholderNoProject:`Select a project first`,placeholderOffline:`No connection \u2014 sending is unavailable`,send:`Send`,stop:`Stop the answer`,placeholderWithFiles:`Write what to do with the files\u2026`,sendBlocked:{uploading:`Wait for the files to upload`,refused:`Remove the files that cannot be sent`,noText:`Write a message for the files`},settingsLabel:`Answer settings`,effort:{name:`Effort`,note:`The assistant's answers and its launches`,levels:{normal:`Normal`,thinking:`Thinking`,max:`Max`},rows:{normal:`Normal answers, launches by one agent`,thinking:`The assistant and the agent think deeper`,max:`Deeper, and launches by a swarm of agents`},footer:`Holds until the end of the conversation. A new conversation starts on \u00ABNormal\u00BB.`,chipMax:e=>`Max \u00B7 ${e} ${$u(e)}`,chipMaxShort:e=>`Max \u00B7 ${e}`,long:{normal:`Normal \u00B7 one agent`,thinking:`Thinking \u00B7 one agent`,max:e=>`Max \u00B7 ${e} ${$u(e)}`},chipLabel:e=>`Effort: ${e}`,reasonPlace:`Needs a browser: \u00ABMaximum\u00BB is the agents' windows`,agents:{label:`Agents`,limit:e=>`No more than ${e} \u2014`,settingsLink:`\u00ABSettings \u2192 AI \u2192 Agent swarm\u00BB`,groupLabel:`Number of agents`,fewer:`Fewer agents`,more:`More agents`}},permission:{groupLabel:`Action confirmations`,menuNote:`For this conversation`,chipLabel:e=>`Confirmations: ${e}`,ask:`Ask`,bypass:`No confirmations`,askHint:`Launches and irreversible edits wait for your confirmation.`,bypassHint:`Launches and edits run at once. Deletions still wait for confirmation.`,arrived:e=>`Confirmations: ${e}`},place:{name:`Where to work`,note:`For every launch from the message`,title:`Where the AI works in a browser: this browser, a runner or no browser`,chipLabel:e=>`Where to work: ${e}`,thisBrowser:`This browser`,thisBrowserRowOpensWindows:`Windows open in the background of this Chrome`,thisBrowserRowTasksOnly:`In the web chat \u2014 tasks only; runs and crawls go through a runner or the side panel`,none:`No browser`,noneRow:`API requests and server-side scenarios only`,runner:e=>`Runner ${e}`,runnerUnread:`Runner`,runnerGone:`Runner unavailable`,runnerGoneHint:`The chosen runner was deleted or is no longer available to you. Pick where to work.`,runnerFree:`Free`,runnerBusy:`Busy \u2014 the launch will queue`,runnerBlocked:{notOwner:`Only its owner can launch`,notEnrolled:`Not connected yet`,offline:`Offline`},fleetLoading:`Loading runners\u2026`,fleetFailed:`Could not load runners`,fleetRetry:`Retry`,fleetEmpty:`Your company has no runners`,othersGroup:e=>`Other people's runners (${e})`},hint:`Enter to send, Shift+Enter for a new line`,plainHint:`Enter to send`,attachments:{attach:`Attach a file`,trayLabel:`Files of the message`,remove:e=>`Remove the file \u00AB${e}\u00BB`,uploading:e=>`Uploading ${e}%`,uploadingLabel:e=>`Uploading ${e}`,pastedName:e=>`Screenshot ${e}`,drop:{title:`Drop to attach`,types:`PNG, JPEG, WebP, PDF, TXT, MD`,sizes:`Images and PDF up to 50 MB, text up to 4 MB`},retry:`Retry`,reupload:`Upload again`,pickModel:`switch to another`,refusal:{type:`This file cannot be attached: PNG, JPEG, WebP, PDF, TXT, MD are supported`,tooLarge:e=>`File too large: ${e}`,limit:{image:`an image \u2014 up to 50 MB`,pdf:`PDF \u2014 up to 50 MB`,text:`text \u2014 up to 4 MB`},fileName:`The file name is longer than 255 characters \u2014 rename the file and attach it again`,empty:`The file is empty`,textNotUtf8:`The text is not UTF-8 \u2014 save the file as UTF-8 and attach it again`,unreadable:`The file cannot be read \u2014 it may be damaged`,contentMismatch:e=>`The content does not look like ${e} \u2014 attach the real file`,pdfEncrypted:`The PDF is password-protected \u2014 remove the password and attach it again`,server:`The server did not accept the file`,failedNetwork:`Not uploaded: the connection was interrupted`,failedServer:`Not uploaded: the server did not answer`,expired:`An unsent file is kept for a day \u2014 this one is already deleted`,modelNoFiles:e=>`${e} does not take files \u2014 `,modelNoType:(e,t)=>`${e} does not take ${t} \u2014 `,modelFact:(e,t)=>`${e} does not take this file: ${t} \u2014 `},announce:{uploaded:e=>`The file \u00AB${e}\u00BB is uploaded`,refused:(e,t)=>`The file \u00AB${e}\u00BB cannot be sent: ${t}`}}},transcript:{copyAnswer:{label:`Copy answer`,done:`Answer copied`,failed:`Could not copy the answer`},activity:{done:e=>`Completed ${e} ${J(e,{one:`action`,other:`actions`})}`,doneOf:(e,t)=>`Completed ${e} of ${t} ${J(t,{one:`action`,other:`actions`})}`,doneShort:e=>`${e} done`,failedShort:e=>`${e} failed`,running:e=>`Running: ${e}`,failed:`failed`,unknown:`outcome unknown`},feedLabel:`Conversation feed`,scrollToBottom:`Scroll to bottom`,leadByline:`Swarm lead`,taskLeadByline:`Lead`,retry:`Retry`,thinking:`Thinking\u2026`,thoughtFor:e=>`Thought for ${e}s`,thinkingPhase:`Thinking\u2026`,toolCall:`Tool call`,toolCallCancelled:`Tool call cancelled`,toolCallStatus:{confirmed:`Action completed`,waitingForBrowser:`Waiting for the browser action`,stoppingBrowser:`Stopping the browser action\u2026`,failed:`Action failed`,rejected:`Rejected`,rejectedLeadGrant:`Not allowed \u2014 goes to the report \u00B7 you`,closed:`Closed: the launch stopped`,unknown:`Action outcome unknown`,launchedElsewhere:`Started in a new conversation`,openConversation:`Open the conversation`},unknownTool:{title:`Result not supported`,body:`This version cannot show the result of this action. Reload the page or update the extension.`},stopFailed:{rejected:`Could not stop the answer \u2014 the server did not accept the command. Try again.`,ack_timeout:`Could not stop the answer \u2014 the server did not respond. Try again.`,not_open:`Could not stop the answer \u2014 the connection is not open yet. Try again.`,connection_closed:`Could not stop the answer \u2014 the connection dropped. Try again.`},details:`Details`,cardsFailed:{title:`Could not show the cards of this answer.`,text:`The answer text above is intact.`,retry:`Show again`}},empty:{heading:`How can I help?`,subtext:`Ask about your testing or hand over a task`,footnote:`A click puts a task draft into the field \u2014 adjust it and send`,reportHeading:`Ask about this report`},errors:{classes:{rateLimit:{title:`Too many requests`,hint:`Wait a moment and try again`},credits:{title:`Limit reached`,hint:`Check your plan or limits in settings`},auth:{title:`Provider authorization failed`,hint:`Check the API key in settings`},connection:{title:`Provider unavailable`,hint:`Check the settings and try again`},stalled:{title:`The assistant stopped responding`,hint:null},streamCut:{title:`Connection lost`,hint:null},generic:{title:`Progon assistant error`,hint:`Please try again`}}},notices:{dismiss:`Dismiss notice`,capabilities:{title:`Model list unavailable`,sendBlocked:`Messages cannot be sent until the model list loads again.`,timedOut:`The model list did not load in time.`,loadFailed:`Could not load the model list.`,retry:`Load the model list`},permissionReadFailed:{title:`Could not load the confirmation mode`,text:`A new conversation cannot start without it. Load it again.`,retry:`Retry`},permissionWriteFailed:{title:e=>`Could not switch to \u201C${e}\u201D`,textConversation:e=>`The conversation stayed in \u201C${e}\u201D mode.`,textNewConversation:e=>`A new conversation will start in \u201C${e}\u201D mode.`,retry:`Retry`},unsent:{title:e=>`Not sent: ${e} ${Qu(e)}`,textWaiting:`The model list could not be read, so the messages stayed here. Send them once the list loads.`,textReady:`The model list could not be read, so the messages stayed here. The list is loaded again \u2014 send or delete them.`,textFailed:`These messages did not reach the assistant. Send them again or delete them.`,textReconnect:`The messages will be sent once the connection is back.`,listLabel:`Unsent messages`,send:e=>`Send: ${e}`,discard:e=>`Delete: ${e}`,sendShort:`Send`,discardShort:`Delete`},interrupted:{title:`The previous request was interrupted`,text:`The answer to the last message did not arrive.`,retry:`Retry`},reportInitializing:{title:`The report is still being prepared`,text:`The data will appear after the first calculation. Try again a little later.`,retry:`Check again`},readiness:{signInTitle:`Sign in to use the assistant`,signInText:`Open the extension popup and sign in to Progon.`,projectTitle:`Select a project`,projectText:`The assistant works with the data of the selected project.`},pageScan:{scanning:`Scanning page\u2026`,delivering:`Sending scan results\u2026`,failedTitle:`This page cannot be scanned`,failed:{no_capturable_tab:`Restricted or unsupported address (chrome://, extension store, PDF).`,capture_failed:`Page scan failed. Please try again.`,capture_timeout:`Page scan timed out. Please try again.`,oversize_unrecoverable:`This page is too large to scan, even after reducing detail.`}},history:{loadFailed:`Could not load the conversation.`,retry:`Retry`}},connection:{reconnecting:`Connection lost \u2014 reconnecting\u2026`,restored:`Connection restored \u2014 events synchronized.`,failedTitle:`Connection failed`,failedHint:{"reload-page":`Reload the page to reconnect.`,"check-network":`Could not connect. Check your network.`}},history:{title:`Chat history`,close:`Close history`,newChat:`New chat`,search:`Search conversations\u2026`,searchLabel:`Search conversations`,emptyTitle:`No conversations yet`,emptyText:`Start a new chat.`,noResults:e=>`No results for \u201C${e}\u201D`,noResultsText:`Try a different search term`,errorTitle:`Failed to load conversations`,errorText:`Check your connection and try again.`,retry:`Retry`,loadingMore:`Loading\u2026`,untitled:e=>`Conversation of ${e}`,delete:e=>`Delete conversation \u201C${e}\u201D`,deleteFailed:`Could not delete the conversation. Try again.`,reportTag:`Report`,groups:{today:`Today`,yesterday:`Yesterday`,previous7Days:`Previous 7 days`,previous30Days:`Previous 30 days`,older:`Older`}},modelPicker:{selectModel:`Select model`,loading:`Loading models\u2026`,currentlySelected:`Currently selected`,footerNote:`Choice applies to your next message.`,manageKeys:`Manage keys`,upsell:`Bring your own key on Enterprise`,upgrade:`Upgrade`,rejected:`That model isn't available for your plan \u2014 reverted to your default.`,disabledKeyInvalid:`Key invalid \u2014 update it in Settings`,disabledNoKey:`No personal key configured`,disabledSuffixA11y:`unavailable`,tier:{fastest:`Fastest`,balanced:`For everyday tasks`,smartest:`Smartest`},byok:{personal:`Your key`,company:`Company key`},byokHeader:{personal:`Your key`,company:`Company key`}},confirmation:{regionLabel:`Action required`,confirmAll:e=>`Confirm all (${e})`,confirm:`Confirm`,reject:`Reject`,queuePosition:`Action {index} of {total}`,warningBadge:`Needs attention`,launch:{subtitle:`AI task \u00B7 waits for your \u00ABLaunch\u00BB`,editTitle:`AI task`,editSubtitle:`Change it and launch`,briefLabel:`Task`,briefEmpty:`Write what to do \u2014 the launch cannot start without a task`,place:{thisBrowserPanel:`In this browser, windows open in the background`,thisBrowserWeb:`In this browser \u2014 connect it in the side panel`,runner:e=>`On runner ${e}`,runnerUnread:`On a runner`,runnerGone:`Runner unavailable \u2014 pick where to work on the \u00ABWhere to work\u00BB chip`,none:`No browser \u2014 API requests and server-side scenarios only`},fromChip:`from the chip`,switchLead:`Switch before launching`,siteLead:`What it may do on the site`,site:{observe:`Look only`,main:`Everything but deleting`,dangerous:`Everything, deleting included`},projectLead:`What it may change in the project`,captureApi:`Record API requests`,edit:`Edit task`,cancel:`Cancel`,launch:`Launch`,unreadable:`The proposed task could not be read. It can only be cancelled.`,scopeUnread:`The scope could not be read \u2014 the launch keeps the proposed one`,busy:{kind:`AI task`,stop:`Stop the task`,newConversation:`Start in a new conversation`}},grant:{no:`No, report only`,yes:`Allow in this run`},unrecognizedTool:`Unrecognized action`},runWait:{title:`Waiting for executions`,status:{waiting:`Waiting for completion`,fired:`Executions finished`,running:`Reviewing results`,done:`Review complete`,cancelled:`Wait cancelled`},subject:{scenario_run:`Scenario run`,agent_job:`Agent job`,atlas_run:`Atlas crawl`,ai_run:`AI run`,workflow:`Swarm`},id:e=>`ID: ${e}`,stopWaiting:`Stop waiting`,stopWaitingFailed:`Could not cancel the wait. Try again.`},questions:{pendingTitle:`Clarification needed`,progress:`Answered: {resolved} of {total}`,progressLabel:`Questions`,progressSegmentAnswered:`Question {index}: answered`,progressSegmentUnanswered:`Question {index}: unanswered`,progressSegmentSkipped:`Question {index}: skipped`,questionIndex:`Question {index} of {total}`,previousQuestion:`Back`,nextQuestion:`Next`,showAllQuestions:`Show all questions`,oneQuestionAtATime:`One question at a time`,recommended:`Recommended`,customChoice:`Other`,customAnswerLabel:`Your answer`,customAnswerPlaceholder:`Enter another option\u2026`,textAnswerLabel:`Answer`,textAnswerPlaceholder:`Enter your answer\u2026`,skipQuestion:`Skip`,restoreQuestion:`Answer`,validationSingle:`Choose one option.`,validationMultiple:`Choose at least one option.`,validationText:`Enter an answer.`,cancelAll:`Cancel all`,submitAnswers:`Send`,sending:`Sending`,loading:`Loading questions`,retry:`Retry`,refresh:`Refresh`,retryErrorBadge:`Not sent`,nonretryableBadge:`Page unavailable`,nonretryableDescription:`Open this conversation in a secure context (HTTPS) to continue.`,staleBadge:`Already resolved`,unauthorizedBadge:`No access`,unauthorizedDescription:`Sign in again or return to the project where this conversation started.`,unavailableBadge:`Unavailable`,answeredTitle:`Clarification`,answeredBadge:`Answered`,continuationPendingBadge:`Queued`,continuationRunningBadge:`Continuing`,continuationFailedBadge:`Could not continue`,skippedBadge:`Skipped`,skippedAnswer:`Skipped`,cancelledTitle:`Clarification`,cancelledBadge:`Cancelled`,supersededTitle:`Clarification`,supersededBadge:`Replaced`,answerSeparator:`, `,unavailableAnswer:`Answer unavailable`,arrived:e=>`New question, the answer card is above the input: ${e}`},agentQuestions:{openRun:`Open run`,assumptionLabel:`Until you answer, the agent goes on like this`,decline:`Don\u2019t answer`,viaAssistant:`Passed on by the assistant from your words`,askerEnded:`The agent finished its work, no answer is needed`,leadWaits:`lead is waiting`,workersContinue:`Workers keep going`,agentsIdle:`No agents are working now`},context:{report:{label:`Report context`,title:e=>`Report: ${e}`,note:`The assistant sees this report and reads its figures from the same data as the page.`,nameUnavailable:`name unavailable`,entity:{scenario:`selected scenario`,page:`selected page`,feature:`selected feature`},view:{overview:`Overview`,stability:`Stability`,"weak-spots":`Weak spots`,"bug-hotspots":`Bug hotspots`},window:{"7d":`7 days`,"14d":`14 days`,"30d":`30 days`,"90d":`90 days`},lastRuns:(e,t)=>`last ${e} runs (up to ${t} days)`,status:{consistently_failing:`consistently failing`,flaky:`flaky`,monitoring:`monitoring`,insufficient_history:`little history`,stable:`stable`},prompts:{overviewWeakSpots:`What are this project\u2019s weak spots?`,overviewChanged:e=>`What changed over the last ${e}?`,overviewWhereToLook:`Where should I look first?`,stabilityWhyScenario:e=>`Why is \u201C${e}\u201D unstable?`,stabilityWhatToFix:`Which scenarios should I fix first?`,stabilityCauses:`Break the failures down by cause`,weakSpotsWhatToCover:`What should I cover with tests first?`,weakSpotsWhyEntity:e=>`Why is \u201C${e}\u201D a weak spot?`,bugHotspotsWhere:`Where do bugs pile up?`,bugHotspotsStale:`Which pages with bugs have not been checked in a while?`}}}},errors:Zu,attachments:lu},td=e=>q(e,{one:`\u0444\u0430\u0439\u043B`,few:`\u0444\u0430\u0439\u043B\u0430`,many:`\u0444\u0430\u0439\u043B\u043E\u0432`}),nd={units:{b:`\u0411`,kb:`\u041A\u0411`,mb:`\u041C\u0411`},facts:{pdf:(e,t)=>`${e} \u0441\u0442\u0440., ${t}`,image:(e,t,n)=>`${e}\u00D7${t}, ${n}`,text:e=>e},typeLabel:{"image/png":`PNG`,"image/jpeg":`JPEG`,"image/webp":`WebP`,"application/pdf":`PDF`,"text/plain":`TXT`,"text/markdown":`MD`},message:{listLabel:`\u0424\u0430\u0439\u043B\u044B \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,view:e=>`\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u00AB${e}\u00BB`,open:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u00AB${e}\u00BB \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435`,thumbnailLoading:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u0438\u043D\u0438\u0430\u0442\u044E\u0440\u044B \u00AB${e}\u00BB`,thumbnailFailed:`\u041C\u0438\u043D\u0438\u0430\u0442\u044E\u0440\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C`,openFailed:`\u041D\u0435 \u043E\u0442\u043A\u0440\u044B\u043B\u043E\u0441\u044C.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},viewer:{label:e=>`\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440: ${e}`,openInTab:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435`,close:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430`,position:(e,t)=>`${e} \u0438\u0437 ${t}`,loading:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u00AB${e}\u00BB`,failed:`\u041A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C`},conversation:{text:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u044D\u0442\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u044B (${t}) \u2014 `,pick:`\u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C`},unsent:{files:e=>`${e} ${td(e)}`,unsupported:(e,t)=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B: ${t} \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,noFiles:e=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,types:(e,t)=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 ${t} \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,reason:{fileBytes:e=>`\u0444\u0430\u0439\u043B \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,imageBytes:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,requestBytes:e=>`\u0437\u0430\u043F\u0440\u043E\u0441 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,filesBytes:e=>`\u0444\u0430\u0439\u043B\u044B \u0432\u043C\u0435\u0441\u0442\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,imageEdge:e=>`\u0441\u0442\u043E\u0440\u043E\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} px`,imagePatches:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u043C\u043B\u043D \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439`,pdfPages:e=>`\u0432 PDF \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,imagesCount:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,manyImagesEdge:e=>`\u043F\u0440\u0438 \u043C\u043D\u043E\u0433\u0438\u0445 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430\u0445 \u0441\u0442\u043E\u0440\u043E\u043D\u0430 \u043A\u0430\u0436\u0434\u043E\u0439 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} px`,contextWindow:`\u0444\u0430\u0439\u043B\u044B \u043D\u0435 \u043F\u043E\u043C\u0435\u0449\u0430\u044E\u0442\u0441\u044F \u0432 \u043E\u043A\u043D\u043E \u043C\u043E\u0434\u0435\u043B\u0438`,unknownSize:`\u0444\u0430\u0439\u043B\u044B \u0431\u043E\u043B\u044C\u0448\u0435, \u0447\u0435\u043C \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u044C`},notFound:`\u0424\u0430\u0439\u043B\u044B \u044D\u0442\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B: \u043D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0441\u0443\u0442\u043A\u0438. \u0423\u0434\u0430\u043B\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0437\u0430\u043D\u043E\u0432\u043E.`,alreadySent:`\u042D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B \u0443\u0436\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B \u0441 \u0434\u0440\u0443\u0433\u0438\u043C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435\u043C. \u0423\u0434\u0430\u043B\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0437\u0430\u043D\u043E\u0432\u043E.`}},rd=new Intl.NumberFormat(`ru`),id=e=>rd.format(e),ad=e=>q(e,{one:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435`,few:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,many:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439`}),od={inspecting:`\u0418\u0437\u0443\u0447\u0435\u043D\u0438\u0435`,proposed:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u043E`,awaiting:`\u0416\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,applying:`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F`,applied:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,rejected:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,partial:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E`,failed:`\u041D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,undone:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,superseded:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E`},sd={step:`\u0428\u0430\u0433\u0438`,scenario_run:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,api_folder:`\u041F\u0430\u043F\u043A\u0438`,api_saved_request:`\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u044B`,checklist_item:`\u041F\u0443\u043D\u043A\u0442\u044B \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,checklist_item_step:`\u0428\u0430\u0433\u0438 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`,test_run_result:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u0440\u043E\u0433\u043E\u043D\u0430`},cd=(e,t,n)=>r=>`${id(r)} ${q(r,{one:e,few:t,many:n})}`,ld={title:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,cardAria:e=>`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F: ${e.toLocaleLowerCase(`ru`)}`,phaseAnnouncement:e=>`\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439: ${e.toLocaleLowerCase(`ru`)}`,contextScenario:e=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u00AB${e}\u00BB`,contextProject:e=>`\u041F\u0440\u043E\u0435\u043A\u0442 \u00AB${e}\u00BB`,marker:od,earlyTitle:{searching:`\u0418\u0449\u0443 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439\u2026`,search_results_shown:`\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439`,no_results:`\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E`,item_selected:`\u0426\u0435\u043B\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u0430`,inspecting:`\u0418\u0437\u0443\u0447\u0430\u044E \u0434\u0435\u0442\u0430\u043B\u0438\u2026`,ambiguity_choose_target:`\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0446\u0435\u043B\u044C`},preparing:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0433\u043E\u0442\u043E\u0432\u0438\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435\u2026`,changesCount:e=>`${id(e)} ${ad(e)}`,noResults:`\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.`,chooseTargetHint:`\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435, \u043A\u0430\u043A\u0443\u044E \u0446\u0435\u043B\u044C \u0438\u043C\u0435\u043B\u043E\u0441\u044C \u0432 \u0432\u0438\u0434\u0443:`,selected:`\u0412\u044B\u0431\u0440\u0430\u043D\u043E`,nothingChanged:`\u041D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E.`,evidenceHeading:`\u0414\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430`,entityLabelMissing:`\u043C\u0435\u0442\u043A\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C: ${e}`,searchingAria:`\u0418\u0434\u0451\u0442 \u043F\u043E\u0438\u0441\u043A`,whatChanges:`\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F`,proposalEmpty:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442.`,secretChip:`\u0441\u0435\u043A\u0440\u0435\u0442`,evidence:`\u041E\u0431\u043E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435`,cascadeTitle:`\u0422\u0430\u043A\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u043E`,cascadeEntity:sd,cascadeUnknown:e=>`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435 \u043E\u0431\u044A\u0435\u043A\u0442\u044B (${e})`,cascadeCount:{step:cd(`\u0448\u0430\u0433`,`\u0448\u0430\u0433\u0430`,`\u0448\u0430\u0433\u043E\u0432`),scenario_run:cd(`\u043F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,`\u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`),api_folder:cd(`\u043F\u0430\u043F\u043A\u0430`,`\u043F\u0430\u043F\u043A\u0438`,`\u043F\u0430\u043F\u043E\u043A`),api_saved_request:cd(`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u043E\u0441`,`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u0430`,`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432`),checklist_item:cd(`\u043F\u0443\u043D\u043A\u0442 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,`\u043F\u0443\u043D\u043A\u0442\u0430 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,`\u043F\u0443\u043D\u043A\u0442\u043E\u0432 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`),checklist_item_step:cd(`\u0448\u0430\u0433 \u043F\u0443\u043D\u043A\u0442\u0430`,`\u0448\u0430\u0433\u0430 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`,`\u0448\u0430\u0433\u043E\u0432 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`),test_run_result:cd(`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`)},cascadeCountUnknown:(e,t)=>`${e}: ${id(t)}`,dock:{factScenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,factProject:`\u041F\u0440\u043E\u0435\u043A\u0442`,factWithIt:`\u0412\u043C\u0435\u0441\u0442\u0435 \u0441 \u044D\u0442\u0438\u043C`,factEdits:`\u041F\u0440\u0430\u0432\u043E\u043A`,recordWithIt:e=>`\u0432\u043C\u0435\u0441\u0442\u0435 \u0441 \u044D\u0442\u0438\u043C ${e}`,editsCount:cd(`\u043F\u0440\u0430\u0432\u043A\u0430`,`\u043F\u0440\u0430\u0432\u043A\u0438`,`\u043F\u0440\u0430\u0432\u043E\u043A`),showInFeed:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u043B\u0435\u043D\u0442\u0435`,showInFeedAria:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u043B\u0435\u043D\u0442\u0435: ${e}`,blockedUnworded:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043F\u043E\u043A\u0430 \u043D\u0435\u043B\u044C\u0437\u044F \u2014 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u0432 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u043B\u0435\u043D\u0442\u0435`,decided:{confirmDelete:`\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E`,confirm:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u044B`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`}},killSwitch:{title:`\u0417\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,body:`\u0410\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u043C\u043E\u0436\u0435\u0442 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0435\u0451 \u0432 \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0418\u0418. \u041F\u043B\u0430\u043D \u043C\u043E\u0436\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C, \u043D\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F.`},disabledReason:{still_composing:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u2014 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F.`,awaiting_secret_value:`\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F \u0441\u0435\u043A\u0440\u0435\u0442 \u2014 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0435\u0433\u043E \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E \u0434\u043B\u044F \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u044F.`},provideSecurely:`\u041F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E`,secretEnvMissing:`\u041D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0432\u043E\u0434 \u0441\u0435\u043A\u0440\u0435\u0442\u0430: \u0432 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0435\u0442 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F, \u0434\u043B\u044F \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043E\u043D \u043D\u0443\u0436\u0435\u043D.`,secretNameMissing:`\u041D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0432\u043E\u0434 \u0441\u0435\u043A\u0440\u0435\u0442\u0430: \u0432 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0435\u0442 \u0438\u043C\u0435\u043D\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439.`,secretOpenFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0432\u0432\u043E\u0434\u0430 \u0441\u0435\u043A\u0440\u0435\u0442\u0430 \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,secretWaiting:`\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0432\u0432\u043E\u0434\u0430 \u0432 Progon web`,secretWaitingText:`\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u0442\u0430\u043C \u2014 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u0438\u0438.`,secretRefresh:`\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441`,secretReopen:`\u041E\u0442\u043A\u0440\u044B\u0442\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u043E \u2014 \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043D\u043E\u0432\u0430?`,confirm:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,confirmDelete:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,bugFiling:{title:`\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433?`,confirm:`\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433`,capture:{ready:`\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442`,awaiting:`\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442 \u0435\u0449\u0451 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F`,unavailable:`\u0411\u0435\u0437 \u0441\u043A\u0440\u0438\u043D\u0448\u043E\u0442\u0430`,no_screen:`\u0417\u0430\u043F\u0440\u043E\u0441 \u0438 \u043E\u0442\u0432\u0435\u0442, \u0441\u043D\u0438\u043C\u043A\u0430 \u044D\u043A\u0440\u0430\u043D\u0430 \u043D\u0435 \u0431\u044B\u0432\u0430\u0435\u0442`},address:e=>`\u0430\u0434\u0440\u0435\u0441 ${e}`,severity:e=>`\u0421\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0441\u0442\u044C: ${e}`,factFinding:`\u041D\u0430\u0445\u043E\u0434\u043A\u0430`,factSeverity:`\u0421\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0441\u0442\u044C`,factWithIt:`\u0421 \u043D\u0435\u0439`,severityWord:{critical:`\u043A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F`,high:`\u0432\u044B\u0441\u043E\u043A\u0430\u044F`,medium:`\u0441\u0440\u0435\u0434\u043D\u044F\u044F`,low:`\u043D\u0438\u0437\u043A\u0430\u044F`}},closedBy:{line:{launch_stopped:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`,finding_filed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0432\u044B \u0437\u0430\u0432\u0435\u043B\u0438 \u044D\u0442\u043E\u0442 \u0431\u0430\u0433 \u0441\u0430\u043C\u0438`},launchStoppedNote:`\u041E\u0442\u0432\u0435\u0442 \u0443\u0436\u0435 \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442`,findingFiledNote:(e,t)=>`\u0411\u0430\u0433 #${String(e)} \u0438\u0437 \u044D\u0442\u043E\u0439 \u043D\u0430\u0445\u043E\u0434\u043A\u0438 \u0437\u0430\u0432\u0435\u043B\u0438 \u0432\u044B \u0432 ${t} \u2014 \u043E\u0442\u0432\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043D\u0443\u0436\u0435\u043D`},rejectPlain:`\u041F\u0440\u043E\u0441\u0442\u043E \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,rejectWithReason:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0441 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u043C`,reasonLabel:`\u041F\u043E\u0447\u0435\u043C\u0443?`,reasonHint:`(\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u2014 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0443 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0438\u0442\u044C \u043B\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442)`,commandFailed:{confirm:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,reject:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,retry:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},applyingSubject:e=>`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F ${id(e)} ${ad(e)}`,applyingGeneric:`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u043C\u2026`,applyDuration:e=>`\u0412\u0440\u0435\u043C\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F: ${id(e)} \u043C\u0441`,applyAria:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F`,applyDisclaimer:`\u041D\u0435 \u0441\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u043C \u0434\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0443\u0439\u0442\u0438 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u0441\u044F \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0435.`,attempt:e=>`\u043F\u043E\u043F\u044B\u0442\u043A\u0430 ${id(e)}`,verified:`\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C`,appliedGroup:e=>`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E (${id(e)})`,failedGroup:e=>`\u041E\u0448\u0438\u0431\u043A\u0438 \u0438\u043B\u0438 \u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u043A\u0438 (${id(e)})`,row:{applied:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C`,batch_aborted:`\u041E\u0442\u043A\u0430\u0447\u0435\u043D\u043E`,pending:`\u041D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,skipped:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`},applyError:{stale_guard:`\u041E\u0431\u044A\u0435\u043A\u0442 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u0442\u043E\u0433\u043E, \u043A\u0430\u043A \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u043B\u043E \u0441\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E.`,secret_expired_or_consumed:`\u0421\u0435\u043A\u0440\u0435\u0442\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E \u0438\u043B\u0438 \u0441\u0440\u043E\u043A \u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0438\u0441\u0442\u0451\u043A.`,"assistant.change_set.batch_aborted":`\u041E\u0442\u043A\u0430\u0447\u0435\u043D\u043E: \u0434\u0440\u0443\u0433\u043E\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u044D\u0442\u043E\u0433\u043E \u0436\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043B\u0441\u044F.`,"assistant.change_set.apply_unexpected_error":`\u041D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u0438.`,"assistant.ai_write_disabled":`\u0417\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,"variables.duplicate_name":`\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.`},whatNext:`\u0427\u0442\u043E \u0434\u0435\u043B\u0430\u0442\u044C \u0434\u0430\u043B\u044C\u0448\u0435: \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u0435\u0443\u0434\u0430\u0432\u0448\u0438\u0435\u0441\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441.`,applyMissing:`\u0421\u0432\u043E\u0434\u043A\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u043D\u0438\u043C\u043A\u0435.`,retryRemaining:e=>`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044F (${id(e)})`,revise:`\u041F\u0435\u0440\u0435\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441`,reviseDraftScenario:e=>`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0438 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u00AB${e}\u00BB`,reviseDraftProject:e=>`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0438 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432 \u043F\u0440\u043E\u0435\u043A\u0442\u0435 \u00AB${e}\u00BB`,rejectedTitle:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435 \u0441\u0434\u0435\u043B\u0430\u043D\u043E.`,rejectedLead:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u043B\u043E \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E \u0434\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u0414\u0430\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C.`,undoneTitle:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u044B`,undoneLead:`\u041F\u0440\u0438\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u044B \u043A \u043F\u0440\u0435\u0436\u043D\u0435\u043C\u0443 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044E.`,superseded:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E \u0431\u043E\u043B\u0435\u0435 \u043D\u043E\u0432\u044B\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C.`,unknownState:`\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0434\u0430\u043D\u043D\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439`,undo:{action:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,until:e=>`\u041C\u043E\u0436\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0434\u043E ${e}`,busy:`\u041E\u0442\u043C\u0435\u043D\u044F\u0435\u043C\u2026`,blocked:{stale:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0434\u0430\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F.`,expired:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u043E\u043A\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,kill_switch:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0437\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},unavailable:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.`,error:{"change_sets.undo_stale":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0434\u0430\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F.`,"change_sets.undo_expired":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u043E\u043A\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,"change_sets.undo_not_eligible":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.`,"assistant.ai_write_disabled":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0437\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,unknown:`\u0421\u0442\u0430\u0442\u0443\u0441 \u043E\u0442\u043C\u0435\u043D\u044B \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D \u2014 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443.`,sideEffectsTitle:`\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438:`,sideEffect:{test_plan_assignment_advance:`\u041F\u0440\u043E\u0434\u0432\u0438\u0436\u0435\u043D\u0438\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0432 \u0442\u0435\u0441\u0442-\u043F\u043B\u0430\u043D\u0435`}},loadingAria:`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438`,loadError:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438.`,loadErrorText:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043D\u0435 \u0437\u0430\u0442\u0440\u043E\u043D\u0443\u0442\u044B.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,unavailable:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,unavailableText:`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u044D\u0442\u043E\u043C\u0443 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044E \u0438\u043B\u0438 \u043E\u043D\u043E \u0443\u0434\u0430\u043B\u0435\u043D\u043E.`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},turn:{title:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,awaiting:e=>`${q(e,{one:`\u0436\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,few:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,many:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`})} ${id(e)}`,proposals:e=>`${id(e)} ${q(e,{one:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435`,few:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F`,many:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439`})}`,remaining:(e,t)=>`\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C ${id(e)} \u0438\u0437 ${id(t)}`,applying:(e,t)=>`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u044E ${id(e)} \u0438\u0437 ${id(t)}\u2026`,done:(e,t)=>`\u0413\u043E\u0442\u043E\u0432\u043E: ${id(e)} \u0438\u0437 ${id(t)}`,applied:e=>`${id(e)} \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,rejected:e=>`${id(e)} \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,errors:e=>`${id(e)} ${q(e,{one:`\u043E\u0448\u0438\u0431\u043A\u0430`,few:`\u043E\u0448\u0438\u0431\u043A\u0438`,many:`\u043E\u0448\u0438\u0431\u043E\u043A`})}`,superseded:e=>`${id(e)} \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u043E \u043D\u043E\u0432\u044B\u043C`,closed:e=>`${id(e)} \u0437\u0430\u043A\u0440\u044B\u0442\u043E`,undone:e=>`${id(e)} \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,loadFailed:e=>`${id(e)} \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C`,confirmAll:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u0441\u0435 (${id(e)})`,rejectAll:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0432\u0441\u0435`,passFailures:e=>q(e,{one:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${id(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u2014 \u044D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C`,few:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${id(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u2014 \u044D\u0442\u0438 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C`,many:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${id(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u2014 \u044D\u0442\u0438 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C`})}},ud=new Intl.NumberFormat(`ru`),dd=new Intl.NumberFormat(`ru`,{style:`percent`,maximumFractionDigits:0}),fd={title:`\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F`,caption:e=>`\u00AB${e}\u00BB`,cardAria:e=>`\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F: ${e}`,covered:`\u041F\u043E\u043B\u043D\u043E\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,partial:`\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,gaps:`\u041F\u0440\u043E\u0431\u0435\u043B\u044B`,tagWarningPill:`\u0417\u0430\u043C\u0435\u0447\u0430\u043D\u0438\u0435 \u043F\u043E \u0442\u0435\u0433\u0430\u043C`,unknownItem:`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E`,similarity:e=>`\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435 ${dd.format(e)}`,steps:e=>`${ud.format(e)} ${q(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`})}`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},pd=new Intl.NumberFormat(`ru`),md=e=>pd.format(e),hd={kind:{atlas_crawl:`\u041E\u0431\u0445\u043E\u0434 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u041F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},stage:{queued:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,launching:`\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F`,link_pending:`\u0421\u0432\u044F\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0441 \u043A\u0430\u0440\u0442\u043E\u0439`,crawling:`\u0418\u0441\u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0441\u0430\u0439\u0442`,running_batch:`\u041F\u0440\u043E\u0433\u043E\u043D\u044F\u0435\u0442 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,completed:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E`,failed:`\u041E\u0448\u0438\u0431\u043A\u0430`,cancelled:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E`},machineMissing:`\u0418\u043C\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E`,activity:e=>`\u0410\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C ${e}`,activityNone:`\u043D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u0438`,foundCaption:`\u041D\u0430 \u043A\u0430\u0440\u0442\u0435`,found:{screens:e=>q(e,{one:`\u044D\u043A\u0440\u0430\u043D`,few:`\u044D\u043A\u0440\u0430\u043D\u0430`,many:`\u044D\u043A\u0440\u0430\u043D\u043E\u0432`}),edges:e=>q(e,{one:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434`,few:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430`,many:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434\u043E\u0432`}),notes:e=>q(e,{one:`\u0437\u0430\u043C\u0435\u0442\u043A\u0430`,few:`\u0437\u0430\u043C\u0435\u0442\u043A\u0438`,many:`\u0437\u0430\u043C\u0435\u0442\u043E\u043A`}),unexplored:e=>q(e,{one:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0439`,few:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0445`,many:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0445`})},degraded:`\u041A\u0430\u0440\u0442\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u2014 \u0441\u0447\u0451\u0442\u0447\u0438\u043A\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u0420\u0430\u0431\u043E\u0442\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442\u0441\u044F.`,terminalPrefix:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E \u043F\u043E\u0442\u043E\u043C\u0443, \u0447\u0442\u043E`,terminalReason:{claim_timeout:`\u0430\u0433\u0435\u043D\u0442 \u0442\u0430\u043A \u0438 \u043D\u0435 \u0432\u0437\u044F\u043B \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,launch_timeout:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0443\u0441\u043F\u0435\u043B \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C\u0441\u044F`,launch_error:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0441\u043C\u043E\u0433 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C\u0441\u044F`,browser_gone:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438\u0441\u0447\u0435\u0437`,agent_lost:`\u0430\u0433\u0435\u043D\u0442 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043B \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,max_duration:`\u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D \u043B\u0438\u043C\u0438\u0442 \u0432\u0440\u0435\u043C\u0435\u043D\u0438`,killed:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E`,stalled:`\u0440\u0430\u0431\u043E\u0442\u0430 \u0441\u0442\u043E\u044F\u043B\u0430 \u0431\u0435\u0437 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0430`,capability_mismatch:`\u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0443\u044E \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0443`,subject_rejected:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0443\u0441\u043A \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,model_timeout:`\u0438\u0441\u0442\u0435\u043A\u043B\u043E \u0432\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u0438`,runs_not_started:`\u043F\u0440\u043E\u0433\u043E\u043D\u044B \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u0438\u0441\u044C`,credits_exhausted:`\u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B`,tab_closed:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0431\u044B\u043B\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u0430`,slot_taken:`\u043C\u0435\u0441\u0442\u043E \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0437\u0430\u043D\u044F\u043B \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0433\u043E\u043D`,ai_disabled:`Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u043E\u043C`},openMap:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u0430\u0440\u0442\u0443`,openMapAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u0430\u0440\u0442\u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u00AB${e}\u00BB`,cancel:{atlas_crawl:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`,make_auto:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442`},kill:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430`,cancelConfirm:{atlas_crawl:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435?`,body:`\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0451\u0442\u0441\u044F.`,bodyKept:`\u0412\u0441\u0451, \u0447\u0442\u043E \u0430\u0433\u0435\u043D\u0442 \u0443\u0436\u0435 \u0443\u0432\u0438\u0434\u0435\u043B, \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u043D\u0430 \u043A\u0430\u0440\u0442\u0435.`,bodyQueued:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043D\u044F\u0442\u043E \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 \u043D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u043E\u0441\u044C.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`},make_auto:{question:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442?`,body:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u0432\u0435\u0441\u044C \u043F\u0430\u043A\u0435\u0442: \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D \u043F\u0440\u0435\u0440\u0432\u0451\u0442\u0441\u044F, \u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438, \u0434\u043E \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0447\u0435\u0440\u0435\u0434\u044C \u043D\u0435 \u0434\u043E\u0448\u043B\u0430, \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u044F\u0442\u0441\u044F. \u0423\u0436\u0435 \u0441\u043E\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F.`,bodyKept:null,bodyQueued:`\u041F\u0430\u043A\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043D\u044F\u0442 \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 \u043D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u043E\u0441\u044C.`,keep:`\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u044C`,confirm:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442`}},killConfirm:{question:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430?`,body:{atlas_crawl:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E, \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044F \u0441 \u043F\u0440\u0438\u0447\u0438\u043D\u043E\u0439 \u00AB\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E\u00BB. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435, \u0435\u0441\u043B\u0438 \u043F\u043E\u0441\u043B\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F.`,make_auto:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0430\u043A\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044F \u0441 \u043F\u0440\u0438\u0447\u0438\u043D\u043E\u0439 \u00AB\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E\u00BB. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435, \u0435\u0441\u043B\u0438 \u043F\u043E\u0441\u043B\u0435 \u043E\u0442\u043C\u0435\u043D\u044B \u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F.`},keep:`\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C`,confirm:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`},failed:{cancel:{atlas_crawl:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435.`,make_auto:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442.`},kill:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430.`,conflict:`\u0417\u0430\u0434\u0430\u0447\u0430 \u0443\u0436\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C \u2014 \u0441\u0442\u0430\u0442\u0443\u0441 \u043E\u0431\u043D\u043E\u0432\u043B\u0451\u043D.`},cardAria:e=>`\u0417\u0430\u0434\u0430\u0447\u0430: ${e}`,unsupported:{title:`\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u0421\u0442\u0430\u0442\u0443\u0441 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},collection:{collectionAria:e=>`\u0417\u0430\u0434\u0430\u0447\u0438: ${md(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0437\u0430\u0434\u0430\u0447`,roleSlide:`\u0437\u0430\u0434\u0430\u0447\u0430`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430`,goToSlide:`\u0417\u0430\u0434\u0430\u0447\u0430 {index} \u0438\u0437 {total}`}},gd={web_runs_prompt:`\u0438\u0437 \u00AB\u0417\u0430\u043F\u0443\u0441\u043A\u043E\u0432\u00BB`,web_test_run_dialog:`\u0438\u0437 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D\u0430`,web_map_dialog:`\u0441 \u043A\u0430\u0440\u0442\u044B`,web_scenarios_dialog:`\u0438\u0437 \u00AB\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432\u00BB`,chat:`\u0438\u0437 \u0447\u0430\u0442\u0430`},_d=e=>q(e,{one:`\u0430\u0433\u0435\u043D\u0442\u0430`,few:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`}),vd={title:{make_auto:`\u0420\u043E\u0439 \u00B7 \u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E`,atlas:`\u0420\u043E\u0439 \u00B7 Atlas`,preset:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`},subtitle:(e,t,n)=>`${e} \u00B7 \u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 \u0434\u043E ${t} ${_d(t)} \u00B7 \u0441 ${n}`,preset:{stopConfirm:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435?`,body:`\u041E\u043A\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F, \u0438\u0434\u0443\u0449\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u0441\u044F. \u041E\u0442\u0447\u0451\u0442 \u0431\u0443\u0434\u0435\u0442 \u043F\u043E\u043C\u0435\u0447\u0435\u043D \u00AB\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439\u00BB. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u2014 \u0431\u0430\u0433\u0438, \u043D\u0430\u0445\u043E\u0434\u043A\u0438, \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u2014 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`},scope:e=>{switch(e.kind){case`project`:return`\u0412\u0441\u0451 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435`;case`scenarios`:return`${e.count} ${q(e.count,{one:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,few:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,many:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`;case`test_run`:return e.name===null?`\u0422\u0435\u0441\u0442-\u0440\u0430\u043D #TR-${String(e.number).padStart(3,`0`)}`:`\u0422\u0435\u0441\u0442-\u0440\u0430\u043D \u00AB${e.name}\u00BB`;case`test_plan`:return`\u0422\u0435\u0441\u0442-\u043F\u043B\u0430\u043D \u00AB${e.name}\u00BB`}},level:e=>e.effort===`max`?`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e.maxAgents} ${q(e.maxAgents,{one:`\u0430\u0433\u0435\u043D\u0442`,few:`\u0430\u0433\u0435\u043D\u0442\u0430`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`})}`:e.effort===`thinking`?`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435`:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439`,since:e=>`\u0441 ${e}`,counts:{findings:e=>q(e,{one:`\u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u043D\u0430\u0445\u043E\u0434\u043E\u043A`}),bugs:e=>q(e,{one:`\u0431\u0430\u0433`,few:`\u0431\u0430\u0433\u0430`,many:`\u0431\u0430\u0433\u043E\u0432`}),undecided:e=>q(e,{one:`\u0436\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,few:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,many:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`}),notDone:`\u043D\u0435 \u0441\u0434\u0435\u043B\u0430\u043D\u043E`},awaitingBrowser:{sidePanel:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u044D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u2014 \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043D\u0430\u0447\u043D\u0451\u0442 \u0441\u0440\u0430\u0437\u0443`,web:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043C\u043E\u0436\u043D\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 Progon \u0432 Chrome`},startingRunner:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0440\u0430\u043D\u043D\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,pillAwaitingBrowser:`\u0416\u0434\u0451\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,stripAwaitingBrowser:`\u0417\u0430\u043F\u0443\u0441\u043A \u0436\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,panelWait:{title:e=>`\u00AB${e}\u00BB \u0436\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,lostTitle:e=>`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u043B\u0441\u044F \u2014 \u00AB${e}\u00BB \u0436\u0434\u0451\u0442`,lostDetail:e=>`\u041E\u043A\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u043E \u0432 ${e}, \u0441\u0434\u0435\u043B\u0430\u043D\u043D\u043E\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,origin:(e,t,n)=>`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E ${gd[e]} \u0432 ${t} \u00B7 ${n}`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,openLaunch:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},stripChatLeadAwaitingAnswer:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430`,stripChatLeadAwaitingMessage:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,chatLeadIdle:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043F\u0440\u043E\u0441\u043D\u0451\u0442\u0441\u044F, \u043A\u043E\u0433\u0434\u0430 \u043F\u0440\u043E\u0433\u043E\u043D \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u0441\u044F`,partialCancelled:e=>`\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439: \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0432 ${e}.`,partialFailed:e=>`\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439: ${e}.`,failureReason:{credits:`\u0443 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0418\u0418`,turnShape:`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442\u0438\u043B \u043D\u0435 \u043F\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C`,internal:`\u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u0432\u0435\u0434\u0443\u0449\u0435\u0433\u043E`,initiatorUnavailable:`\u0438\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,other:e=>`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439 \u00AB${e}\u00BB`},beforeStop:(e,t)=>t===null?`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u2014 ${e}.`:`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u2014 ${e}, ${t}.`},topic:e=>e.kind===`atlas`?e.projectName:e.kind===`preset`?wu(e):e.scenarioName===null?`${e.scenarioCount} ${q(e.scenarioCount,{one:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,few:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,many:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`:e.scenarioName.trim()===``?`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F`:e.scenarioName,pill:{startingBrowser:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C`,startingRunner:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C`,running:`\u0418\u0434\u0451\u0442`,awaiting:`\u0416\u0434\u0451\u0442 \u043E\u0442\u0432\u0435\u0442\u0430`,browserLost:`\u0416\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,runnerLost:`\u0416\u0434\u0451\u0442 \u0440\u0430\u043D\u043D\u0435\u0440`,stopping:`\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,completed:`\u0413\u043E\u0442\u043E\u0432\u043E`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u0441\u044F`,cancelled:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`},lead:{startingBrowser:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0440\u043E\u0439`,startingRunner:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0440\u0430\u043D\u043D\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0440\u043E\u0439`,active:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0430\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0443`,idle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442, \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0438\u0445 \u043E\u0442\u0447\u0451\u0442\u043E\u0432`,awaiting:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430 \u2014 \u0432\u043E\u043F\u0440\u043E\u0441 \u043D\u0438\u0436\u0435`,stopping:`\u0417\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u043E\u043A\u043D\u0430 \u0438 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C \u0437\u0430\u0434\u0430\u043D\u0438\u044F. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F.`},startingRow:{browser:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0444\u043E\u043D\u0435 \u2014 \u0444\u043E\u043A\u0443\u0441 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u0443 \u0432\u0430\u0441`,runner:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u0430`},hostLost:{sidePanel:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u043B\u0441\u044F \u2014 \u043E\u043A\u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0437\u0430\u043A\u0440\u044B\u0442\u044B, \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u043D\u0430 \u043F\u0430\u0443\u0437\u0435.`,web:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D. \u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043C\u043E\u0436\u043D\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 Progon \u0432 Chrome.`,runner:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u0430 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u043E\u0441\u044C. \u041F\u043E\u0447\u0435\u043C\u0443 \u2014 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430, \u0442\u0430\u043C \u0436\u0435 \u00AB\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043D\u0430 \u0440\u0430\u043D\u043D\u0435\u0440\u0435\u00BB.`},worker:{name:e=>`\u0410\u0433\u0435\u043D\u0442 ${e}`,kind:{make_auto:`\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E`,atlas:`Atlas`,run:`\u041F\u0440\u043E\u0433\u043E\u043D`},task:e=>`\u0437\u0430\u0434\u0430\u043D\u0438\u0435 ${e}`,opening:`\u041E\u043A\u043D\u043E \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F`,idle:`\u0416\u0434\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u044F`,busy:`\u0411\u0435\u0440\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,closing:`\u041E\u043A\u043D\u043E \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F`,untitledScenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F`,crawl:e=>e===null?`\u041E\u0431\u0445\u043E\u0434`:`\u041E\u0431\u0445\u043E\u0434 \u00AB${e}\u00BB`,progress:(e,t)=>`${e} \u0438\u0437 ${t}`,steps:e=>`${e} ${q(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`})}`},end:{tally:(e,t)=>`\u0413\u043E\u0442\u043E\u0432\u043E ${e} \u0438\u0437 ${t}`,tallyBeforeStop:(e,t)=>`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0433\u043E\u0442\u043E\u0432\u043E ${e} \u0438\u0437 ${t}`,screens:e=>`${e} ${q(e,{one:`\u044D\u043A\u0440\u0430\u043D`,few:`\u044D\u043A\u0440\u0430\u043D\u0430`,many:`\u044D\u043A\u0440\u0430\u043D\u043E\u0432`})} \u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,cancelledBy:(e,t)=>`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430: ${e}, ${t}.`,reportPartial:`\u041E\u0442\u0447\u0451\u0442 \u00AB\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439\u00BB.`,failureReason:{credits:`\u0423 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0418\u0418.`,turnShape:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442\u0438\u043B \u043D\u0435 \u043F\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C \u0440\u043E\u044F.`,internal:`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u0432\u0435\u0434\u0443\u0449\u0435\u0433\u043E.`,initiatorUnavailable:`\u0420\u043E\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D: \u0438\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,other:e=>`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439 \u00AB${e}\u00BB.`}},actions:{open:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0440\u043E\u044F`,openLaunch:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`,openReport:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043E\u0442\u0447\u0451\u0442`,stop:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,stopConfirm:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439?`,body:`\u041E\u043A\u043D\u0430 \u0437\u0430\u043A\u0440\u043E\u044E\u0442\u0441\u044F, \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u044F\u0442\u0441\u044F. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u2014 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u044D\u043A\u0440\u0430\u043D\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435 \u2014 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439`},stopFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439`},strip:{awaiting:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430`,toQuestion:`\u041A \u0432\u043E\u043F\u0440\u043E\u0441\u0443`,lostBrowser:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D`,lostRunner:`\u0416\u0434\u0451\u0442 \u0440\u0430\u043D\u043D\u0435\u0440`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C`,startingBrowser:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,startingRunner:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0440\u0430\u043D\u043D\u0435\u0440`,active:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0430\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0443`,idle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442`,stopping:`\u0420\u043E\u0439 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,toBlock:`\u041A \u0440\u043E\u044E`,toBlockLabel:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043B\u043E\u043A \u0440\u043E\u044F`,windows:e=>`${e} ${q(e,{one:`\u043E\u043A\u043D\u043E`,few:`\u043E\u043A\u043D\u0430`,many:`\u043E\u043A\u043E\u043D`})}`}},yd={failed:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439: ${e}`,failedBatch:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438: ${e}`,reason:{no_active_tab:`\u043D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0438. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`,content_not_loaded:`\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u043D\u0430 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,launch_refused:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439: \u0432 \u043D\u0435\u0439 \u0443\u0436\u0435 \u0438\u0434\u0451\u0442 \u0434\u0440\u0443\u0433\u043E\u0439 \u0437\u0430\u043F\u0443\u0441\u043A, \u0438\u043B\u0438 \u0435\u0433\u043E \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u0438\u0442\u044C.`,no_response:`\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B\u043E \u043D\u0430 \u0437\u0430\u043F\u0440\u043E\u0441 \u0437\u0430\u043F\u0443\u0441\u043A\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,test_run_tab_missing:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u0441 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D\u043E\u043C \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u0430 \u0438\u043B\u0438 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D \u0432 \u043D\u0435\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D.`},unsupported:{title:`\u0417\u0430\u043F\u0443\u0441\u043A \u0432\u043E \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},bd=new Intl.NumberFormat(`ru`),xd=e=>bd.format(e),Sd={title:`\u0417\u0430\u043F\u0443\u0441\u043A \u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u0435`,cardAria:e=>`\u0417\u0430\u043F\u0443\u0441\u043A \u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u0435: ${e}`,outcome:{refused:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,refusedWithReason:e=>`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E: ${e}`,launched:(e,t)=>`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E ${xd(e)} \u0438\u0437 ${xd(t)}`},confirmed:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E`,refusedHead:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u044B`,refusedList:`\u041E\u0442\u043A\u043B\u043E\u043D\u0451\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,launchedSummary:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u044B`,launchedList:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},Cd={listLabel:(e,t)=>`${e} \u00B7 ${xd(t)}`,token:{"stand.main":`\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0439`,"stand.dangerous":`\u041F\u043E\u043B\u043D\u044B\u0439`,"scenarios.ad_hoc_batch":`\u0420\u0430\u0437\u043E\u0432\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u0448\u0430\u0433\u043E\u0432, \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,"environment.projectDefault":`\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,"status.running":`\u0418\u0434\u0451\u0442`,"status.finished":`\u0417\u0430\u043A\u043E\u043D\u0447\u0435\u043D`,"status.aborted":`\u041F\u0440\u0435\u0440\u0432\u0430\u043D`,"aiRunMode.mapping":`\u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u0448\u0430\u0433\u043E\u0432 \u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,"aiRunMode.agentic":`\u0410\u0433\u0435\u043D\u0442 \u043F\u0440\u043E\u0445\u043E\u0434\u0438\u0442 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,"window.headful":`\u0421 \u043E\u043A\u043D\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,"window.headless":`\u0411\u0435\u0437 \u043E\u043A\u043D\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,"executor.extension":`\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,"executor.agent":`\u0420\u0430\u043D\u043D\u0435\u0440`,"billingPeriod.monthly":`\u041F\u043E\u043C\u0435\u0441\u044F\u0447\u043D\u043E`,"billingPeriod.yearly":`\u0417\u0430 \u0433\u043E\u0434`,"requestType.plan_change":`\u0421\u043C\u0435\u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0430`,"requestType.topup":`\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432`,"requestType.seats":`\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043C\u0435\u0441\u0442\u0430`,"role.user":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C`,"allowedChange.file_bugs":`\u0417\u0430\u0432\u043E\u0434\u0438\u0442\u044C \u0431\u0430\u0433\u0438`,"allowedChange.write_tests":`\u0421\u043E\u0437\u0434\u0430\u0432\u0430\u0442\u044C \u0438 \u043C\u0435\u043D\u044F\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,"allowedChange.edit_project":`\u041F\u0440\u043E\u0447\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,"scope.project":`\u0412\u0441\u0451 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435`},warning:{"stand.dangerous":`\u041F\u043E\u043B\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u043D\u0430 \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u043E\u0439 \u043C\u0430\u0448\u0438\u043D\u0435: \u0430\u0433\u0435\u043D\u0442 \u0441\u043C\u043E\u0436\u0435\u0442 \u0438\u0437\u043C\u0435\u043D\u044F\u0442\u044C \u0438 \u0443\u0434\u0430\u043B\u044F\u0442\u044C \u043B\u044E\u0431\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u0438 \u0440\u044F\u0434\u043E\u043C \u043D\u0438\u043A\u043E\u0433\u043E \u043D\u0435 \u0431\u0443\u0434\u0435\u0442. \u0412\u043A\u043B\u044E\u0447\u0430\u0439\u0442\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0435\u0441\u0442\u043E\u0432\u043E\u043C \u0441\u0442\u0435\u043D\u0434\u0435.`},unrecognized:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E`},wd=new Intl.NumberFormat(`ru`),Td=e=>wd.format(e),Ed={title:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,caption:e=>`SC-${String(e)}`,cardAria:(e,t)=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 ${e}: ${t}`,lifecycle:{draft:`\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A`,ready:`Live`,outdated:`\u0423\u0441\u0442\u0430\u0440\u0435\u043B`,archived:`\u0412 \u0430\u0440\u0445\u0438\u0432\u0435`},steps:e=>q(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`}),runs:e=>q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),mapping:{label:{none:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u043D\u0435\u0442`,partial:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u0430\u044F`,full:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u043F\u043E\u043B\u043D\u0430\u044F`},hint:{none:`\u0448\u0430\u0433\u0438 \u0435\u0449\u0451 \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B`,partial:`\u0447\u0430\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u0430 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430\u043C \u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C`,full:`\u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B`},hintNoSteps:`\u0448\u0430\u0433\u043E\u0432 \u043D\u0435\u0442`,tip:e=>`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B: ${e}`},open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,openShort:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438: ${e}`,run:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,runAria:e=>`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C: ${e}`,runCommand:e=>`\u0417\u0430\u043F\u0443\u0441\u0442\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 ${e}`,runNoSteps:`\u041D\u0435\u0442 \u0448\u0430\u0433\u043E\u0432 \u0434\u043B\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u2014 \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438.`,expand:`\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u2014 \u0448\u0430\u0433\u0438 \u0438 \u0438\u0441\u0442\u043E\u0440\u0438\u044F`,expandShort:`\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C`,collapse:`\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C`,tabsAria:`\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,tabSteps:`\u0428\u0430\u0433\u0438`,tabRuns:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432`,step:{aria:(e,t)=>`\u0428\u0430\u0433 ${Td(e)}: ${t}`,missingLabel:`\u0442\u0435\u043A\u0441\u0442 \u0448\u0430\u0433\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,moreExpected:e=>`+${Td(e)}`,expectedHeading:`\u041E\u0436\u0438\u0434\u0430\u0435\u043C\u044B\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B`},stepsEmptyTitle:`\u0428\u0430\u0433\u043E\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442`,stepsEmptyHint:`\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u2014 \u0437\u0430\u043F\u0438\u0441\u044C\u044E \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438, \u0432\u0440\u0443\u0447\u043D\u0443\u044E \u0438\u043B\u0438 \u0438\u043C\u043F\u043E\u0440\u0442\u043E\u043C.`,stepsShown:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${Td(e)} \u0438\u0437 ${Td(t)}`,stepsLoadMore:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 ${Td(e)}`,stepsLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0448\u0430\u0433\u0438\u2026`,stepsLoadFailed:(e,t)=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0448\u0430\u0433\u0438 \u00B7 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${Td(e)} \u0438\u0437 ${Td(t)}`,runsEmptyTitle:`\u0415\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u0441\u044F`,runsEmptyHint:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u0437\u0434\u0435\u0441\u044C.`,runsEmptyHintNoSteps:`\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0438 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u0437\u0434\u0435\u0441\u044C.`,runsLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432\u2026`,runsLoadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432`,runsShown:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${Td(e)} \u0438\u0437 ${Td(t)}`,runsLoadMore:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 ${Td(e)}`,runStatus:{queued:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,launching:`\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F`,in_progress:`\u0412 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0435`,completed:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E`,failed:`\u041E\u0448\u0438\u0431\u043A\u0430`,cancelled:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`},runMode:{manual:`\u0420\u0443\u0447\u043D\u043E\u0439`,semi_auto:`\u041F\u043E\u043B\u0443\u0430\u0432\u0442\u043E`,auto:`\u0410\u0432\u0442\u043E`},runProgress:(e,t)=>`\u0448\u0430\u0433 ${Td(e)} \u0438\u0437 ${Td(t)}`,runDurationUnavailable:`\u0414\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,runMomentUnavailable:`\u2014`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438: ${Td(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,roleSlide:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,goToSlide:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 {index} \u0438\u0437 {total}`}},Dd=new Intl.NumberFormat(`ru`),X=e=>Dd.format(e),Od=e=>q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),kd=e=>q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),Ad=e=>q(e,{one:`\u043F\u0430\u0434\u0435\u043D\u0438\u0435`,few:`\u043F\u0430\u0434\u0435\u043D\u0438\u044F`,many:`\u043F\u0430\u0434\u0435\u043D\u0438\u0439`}),jd=e=>q(e,{one:`\u0443\u0441\u043F\u0435\u0445`,few:`\u0443\u0441\u043F\u0435\u0445\u0430`,many:`\u0443\u0441\u043F\u0435\u0445\u043E\u0432`}),Md=e=>q(e,{one:`\u0434\u0435\u043D\u044C`,few:`\u0434\u043D\u044F`,many:`\u0434\u043D\u0435\u0439`}),Nd={not_enrolled:()=>`\u041D\u0438 \u043E\u0434\u043D\u043E\u0439 \u043C\u0430\u0448\u0438\u043D\u044B \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E.`,none_ready:e=>`\u041D\u0438 \u043E\u0434\u043D\u0430 \u0438\u0437 \u043C\u0430\u0448\u0438\u043D (${X(e)}) \u043D\u0435 \u0433\u043E\u0442\u043E\u0432\u0430 \u043A \u044D\u0442\u043E\u0439 \u0440\u0430\u0431\u043E\u0442\u0435.`,one_ready:e=>`\u041E\u0434\u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0430 \u0433\u043E\u0442\u043E\u0432\u0430. \u0412\u0441\u0435\u0433\u043E \u043C\u0430\u0448\u0438\u043D: ${X(e)}.`,many_ready:e=>`\u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043C\u0430\u0448\u0438\u043D \u0433\u043E\u0442\u043E\u0432\u044B. \u0412\u0441\u0435\u0433\u043E \u043C\u0430\u0448\u0438\u043D: ${X(e)}.`},Pd={playback:`\u041D\u0435\u0442 \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u0438\u044F`,atlas_crawl:`\u041D\u0435\u0442 \u043E\u0431\u0445\u043E\u0434\u0430 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u041D\u0435\u0442 \u0430\u0432\u0442\u043E\u0441\u0431\u043E\u0440\u043A\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},Fd={common:{missingName:`\u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,newTabSuffix:` (\u043D\u043E\u0432\u0430\u044F \u0432\u043A\u043B\u0430\u0434\u043A\u0430)`,noOpenTarget:`\u043D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F`,noOpenTargetHint:`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0442\u0438\u043F\u0430 \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0438 \u043D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F`,moreActions:`\u0415\u0449\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,commandFailure:{confirm:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u2014`,reject:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u2014`,reason:{rejected:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u0440\u0435\u0448\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,ack_timeout:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,not_open:`\u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,connection_closed:`\u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},entityType:{scenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,bug:`\u0411\u0430\u0433`,"checklist-item":`\u041F\u0443\u043D\u043A\u0442 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,checklist:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442`,"saved-request":`API-\u0437\u0430\u043F\u0440\u043E\u0441`,collection:`\u041A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u044F`,"shared-step":`\u041E\u0431\u0449\u0438\u0439 \u0448\u0430\u0433`,run:`\u0422\u0435\u0441\u0442-\u0437\u0430\u043F\u0443\u0441\u043A`,"test-run":`\u0422\u0435\u0441\u0442-\u0437\u0430\u043F\u0443\u0441\u043A`,page:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,"test-plan":`\u0422\u0435\u0441\u0442-\u043F\u043B\u0430\u043D`,environment:`\u041E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0435`,variable:`\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F`,incident:`\u0418\u043D\u0446\u0438\u0434\u0435\u043D\u0442`,"atlas-fact":`\u041A\u0430\u0440\u0442\u0430`,"api-folder":`\u041F\u0430\u043F\u043A\u0430 API`,"api-endpoint":`API-\u044D\u043D\u0434\u043F\u043E\u0438\u043D\u0442`,section:`\u0420\u0430\u0437\u0434\u0435\u043B`}},collection:{counter:`{index} / {total}`,counterUnknown:`{index}`,positionMore:`\u0414\u0430\u043B\u0435\u0435`,scrubberAria:`\u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0432 \u043B\u0435\u043D\u0442\u0435`,slideAria:`{index} \u0438\u0437 {total}`,slideAriaAtLeast:`{index} \u0438\u0437 {total}+`,slideAriaUnknown:`{index}, \u0440\u0430\u0437\u043C\u0435\u0440 \u043D\u0430\u0431\u043E\u0440\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`,loadedOf:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded} \u0438\u0437 {total}`,loadedOfAtLeast:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded} \u0438\u0437 {total}+`,loadedOfUnknown:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded}`,loadMore:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 {remaining}`,loadMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\u2026`,loadMoreFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,loadedMore:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}, \u0432\u0441\u0435\u0433\u043E {total}`,loadedMoreAtLeast:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}, \u0432\u0441\u0435\u0433\u043E \u043D\u0435 \u043C\u0435\u043D\u044C\u0448\u0435 {total}`,loadedMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}`},report:{title:{metric_card:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C`,trend_card:`\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430`,finding_card:`\u0421\u043B\u0430\u0431\u043E\u0435 \u043C\u0435\u0441\u0442\u043E`,stability_row_card:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,scenario_stability_card:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F \u2014 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E`,failure_breakdown_card:`\u041F\u0440\u0438\u0447\u0438\u043D\u044B \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,weak_spot_feature_card:`\u0421\u043B\u0430\u0431\u0430\u044F \u0437\u043E\u043D\u0430: \u0444\u0438\u0447\u0430`,weak_spot_page_card:`\u0421\u043B\u0430\u0431\u0430\u044F \u0437\u043E\u043D\u0430: \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,hotspot_card:`\u0413\u043E\u0440\u044F\u0447\u0430\u044F \u0442\u043E\u0447\u043A\u0430 \u0431\u0430\u0433\u043E\u0432`},window:{"7d":`7 \u0434\u043D\u0435\u0439`,"14d":`14 \u0434\u043D\u0435\u0439`,"30d":`30 \u0434\u043D\u0435\u0439`,"90d":`90 \u0434\u043D\u0435\u0439`},windowShort:{"7d":`7 \u0434`,"14d":`14 \u0434`,"30d":`30 \u0434`,"90d":`90 \u0434`},basisRuns:(e,t)=>`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 ${X(e)} ${Od(e)} (\u0434\u043E ${X(t)} ${Md(t)})`,currentState:`\u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435`,noWindow:`\u043E\u043A\u043D\u043E \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F`,asOf:e=>`\u043D\u0430 ${e}`,stamp:{source:(e,t)=>[`\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: ${e}`,...t].join(` \u00B7 `),metric:(e,t)=>`${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`,rule:(e,t)=>`\u043F\u0440\u0430\u0432\u0438\u043B\u043E ${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`,definition:e=>`\u0432\u0435\u0440\u0441\u0438\u044F \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F ${e}`,mapping:e=>`\u0432\u0435\u0440\u0441\u0438\u044F \u043C\u0430\u043F\u043F\u0438\u043D\u0433\u0430 ${e}`,envelope:(e,t)=>`${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`},metric:{name:{pass_rate:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,runs_total:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_passed:`\u0423\u0441\u043F\u0435\u0448\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_failed:`\u0423\u043F\u0430\u0432\u0448\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_evaluated:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0432 \u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u0435`,runs_infra:`\u0418\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_cancelled:`\u041E\u0442\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_abandoned:`\u0411\u0440\u043E\u0448\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,run_duration_sum_ms:`\u0421\u0443\u043C\u043C\u0430\u0440\u043D\u0430\u044F \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,run_duration_count:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0441 \u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E\u0439 \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\u044E`,run_duration_avg:`\u0421\u0440\u0435\u0434\u043D\u044F\u044F \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,page_steps_executed:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_passed:`\u0423\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_failed:`\u0423\u043F\u0430\u0432\u0448\u0438\u0445 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_healed:`\u0421\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043E\u043A \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_step_success_rate:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,page_healed_rate:`\u0414\u043E\u043B\u044F \u0441\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0438 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,step_failures:`\u041F\u0430\u0434\u0435\u043D\u0438\u044F \u0448\u0430\u0433\u043E\u0432`,run_failures:`\u041F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,bugs_opened:`\u0417\u0430\u0432\u0435\u0434\u0435\u043D\u043E \u0431\u0430\u0433\u043E\u0432`,bugs_closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u0431\u0430\u0433\u043E\u0432`,open_bugs:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,covered_pages:`\u041F\u043E\u043A\u0440\u044B\u0442\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,total_pages:`\u0412\u0441\u0435\u0433\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,page_coverage_pct:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,unstable_scenarios:`\u041D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`},missingName:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0432 \u044D\u0442\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0438`,missingNameDetail:e=>`metricId: ${e}`,unit:{percent:`%`,count:``,ms:`\u043C\u0441`,days:`\u0434\u043D.`},denominator:{pass_rate:e=>`\u0438\u0437 ${X(e)} ${q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`})}`,runs_total:e=>`${X(e)} ${Od(e)}`,unstable_scenarios:e=>`\u0438\u0437 ${X(e)} ${q(e,{one:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,few:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,many:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`,open_bugs:e=>`${X(e)} ${q(e,{one:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0439`,few:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445`,many:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445`})}`,page_coverage_pct:e=>`\u0438\u0437 ${X(e)} ${q(e,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`,generic:e=>`\u0431\u0430\u0437\u0430: ${X(e)}`},insufficient:`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E \u2014 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043D.`,noSeriesValue:`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E \u2014 \u0433\u0440\u0430\u0444\u0438\u043A \u043D\u0435 \u043F\u043E\u0441\u0442\u0440\u043E\u0435\u043D.`,deltaHint:`\u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u043F\u0435\u0440\u0438\u043E\u0434\u0443`,deltaPointsHint:` \u00B7 \u043F.\u043F. \u2014 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u044B\u0435 \u043F\u0443\u043D\u043A\u0442\u044B, \u0440\u0430\u0437\u043D\u0438\u0446\u0430 \u0434\u0432\u0443\u0445 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u043E\u0432`,deltaPoints:e=>`${e} \u043F.\u043F.`,sparkAria:e=>`\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430: ${e}`,sparkGap:(e,t)=>`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 ${e}: ${X(t)} ${Od(t)}`,openReport:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u043D\u044B\u0439 \u043E\u0442\u0447\u0451\u0442`},trend:{lastDay:e=>`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0434\u0435\u043D\u044C (${e})`,dayDenominator:e=>`\u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C \u0434\u043D\u044F: ${X(e)}`,points:`\u0422\u043E\u0447\u0435\u043A`,empty:`\u0422\u043E\u0447\u0435\u043A \u043D\u0435\u0442 \u2014 \u0437\u0430 \u043E\u043A\u043D\u043E \u043D\u0435 \u043D\u0430\u0431\u0440\u0430\u043B\u043E\u0441\u044C \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0434\u043D\u044F.`,gaps:e=>`\u0414\u043D\u0435\u0439 \u0431\u0435\u0437 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F: ${X(e)} \u2014 \u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C \u0434\u043D\u044F \u043D\u0438\u0436\u0435 \u043C\u0438\u043D\u0438\u043C\u0443\u043C\u0430.`},finding:{severity:{critical:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u043E`,high:`\u0432\u0430\u0436\u043D\u043E`,watch:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`},sentence:{uncovered_high_priority:e=>({before:`\u0424\u0438\u0447\u0430 `,after:` (${e.priority} \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442): \u043D\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u043E ${X(e.uncovered)} \u0438\u0437 ${X(e.total)} ${q(e.total,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`}),consistently_failing_scenario:e=>({before:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 `,after:` \u0443\u043F\u0430\u043B \u0432 ${X(e.count)} ${q(e.count,{one:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u043F\u0440\u043E\u0433\u043E\u043D\u0435`,few:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`,many:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`})} \u043F\u043E\u0434\u0440\u044F\u0434`}),low_page_success:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 ${e.rate} \u0438\u0437 ${X(e.executions)} (\u043F\u043E\u0440\u043E\u0433: ${e.threshold})`}),high_healed_rate:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${e.rate} \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u043F\u043E\u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043B\u0438 \u0441\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0438 (\u043F\u043E\u0440\u043E\u0433: ${e.threshold})`}),stale_page:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:` \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0430\u0441\u044C ${X(e.days)} ${Md(e.days)} (\u043F\u043E\u0440\u043E\u0433: ${X(e.threshold)})`}),open_bugs_no_verification_critical:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${X(e.count)} ${q(e.count,{one:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0439 \u0431\u0430\u0433`,few:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u0431\u0430\u0433\u0430`,many:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u0431\u0430\u0433\u043E\u0432`})} \u0438 \u043D\u0438 \u043E\u0434\u043D\u043E\u0439 \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0439 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0437\u0430 ${e.window}`}),open_bugs_no_verification_high:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${X(e.count)} ${q(e.count,{one:`\u0432\u0430\u0436\u043D\u044B\u0439 \u0431\u0430\u0433`,few:`\u0432\u0430\u0436\u043D\u044B\u0445 \u0431\u0430\u0433\u0430`,many:`\u0432\u0430\u0436\u043D\u044B\u0445 \u0431\u0430\u0433\u043E\u0432`})} \u0438 \u043D\u0438 \u043E\u0434\u043D\u043E\u0439 \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0439 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0437\u0430 ${e.window}`})},dominantCause:(e,t,n)=>`; \u043E\u0441\u043D\u043E\u0432\u043D\u0430\u044F \u043F\u0440\u0438\u0447\u0438\u043D\u0430 \u2014 ${e.toLocaleLowerCase(`ru`)} (${X(t)} \u0438\u0437 ${X(n)} ${Ad(n)})`,unknownRule:`\u041F\u0440\u0430\u0432\u0438\u043B\u043E \u044D\u0442\u043E\u0433\u043E \u0441\u043B\u0430\u0431\u043E\u0433\u043E \u043C\u0435\u0441\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u044D\u0442\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439.`,incompleteEvidence:`\u0414\u0430\u043D\u043D\u044B\u0445 \u043F\u0440\u0430\u0432\u0438\u043B\u0430 \u043D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0447\u0442\u043E\u0431\u044B \u0441\u0444\u043E\u0440\u043C\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0432\u043E\u0434.`,ruleIdDetail:e=>`ruleId: ${e}`,evidence:(e,t,n)=>`${X(e)} \u00B7 ${t} \u00B7 \u043F\u043E\u0440\u043E\u0433 ${X(n)}`,evidenceAria:`\u041E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0432\u044B\u0432\u043E\u0434\u0430`,evidenceRows:{denominator:`\u0417\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C`,threshold:`\u041F\u043E\u0440\u043E\u0433`,window:`\u041E\u043A\u043D\u043E`,rule:`\u041F\u0440\u0430\u0432\u0438\u043B\u043E`},open:{scenario:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,page:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,feature:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0444\u0438\u0447\u0443`}},openAria:(e,t)=>`${e} \u00AB${t}\u00BB`,stability:{status:{consistently_failing:`\u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442`,flaky:`flaky`,monitoring:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`,insufficient_history:`\u043C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438`,stable:`\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E`},evidence:{flaky:(e,t,n)=>`Flaky \u2014 ${X(e)} ${Ad(e)} \u0438 ${X(t)} ${jd(t)} \u0432 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 ${X(n)} ${q(n,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0435`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`})}`,consistently_failing:e=>q(e,{one:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0441\u044F \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`,few:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043F\u043E\u0434\u0440\u044F\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0438\u0441\u044C \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`,many:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 \u043F\u043E\u0434\u0440\u044F\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0438\u0441\u044C \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`}),monitoring:(e,t)=>`\u041D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435 \u2014 ${X(e)} ${Ad(e)} \u043D\u0430 ${X(t)} ${Od(t)}; \u0434\u043B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0430 flaky \u043D\u0443\u0436\u043D\u043E \u22652 \u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u0438 \u22652 \u0443\u0441\u043F\u0435\u0445\u043E\u0432 \u043F\u0440\u0438 n\u22656`,insufficientHistory:e=>`\u041C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u2014 ${X(e)} ${Od(e)}; \u0434\u043B\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 \u043D\u0443\u0436\u043D\u043E \u22653`,insufficientHistoryWatermark:e=>`\u041C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0441 ${e}: \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0451\u043D`,stable:e=>`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E \u2014 ${X(e)} ${Od(e)} \u0431\u0435\u0437 \u043F\u0430\u0434\u0435\u043D\u0438\u0439`},stripAria:(e,t,n)=>`${X(e)} ${jd(e)}, ${X(t)} ${Ad(t)} \u0438\u0437 ${X(n)}`,stripAriaBeforeChange:e=>` \u00B7 \u0434\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F: ${X(e)} ${Od(e)}`,beforeChange:`\u0434\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,success:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C`,outOf:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)}`,dominantCause:`\u041E\u0441\u043D. \u043F\u0440\u0438\u0447\u0438\u043D\u0430`,noFailures:`\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435\u0442`,lastRun:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D`,historyReset:e=>`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0441 ${e}: \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0451\u043D.`,causesTitle:`\u041F\u0440\u0438\u0447\u0438\u043D\u044B \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,failures:e=>`${X(e)} ${Ad(e)}`,healed:`\u0421\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0430 \u0448\u0430\u0433\u043E\u0432`,aiExecuted:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0448\u0430\u0433\u043E\u0432 \u0447\u0435\u0440\u0435\u0437 \u0418\u0418`,ofPassedSteps:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${q(t,{one:`\u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0433\u043E \u0448\u0430\u0433\u0430`,few:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432`,many:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432`})}`,erFailed:`\u041D\u0435\u043F\u0440\u043E\u0439\u0434\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438`,erFailedValue:(e,t)=>`\u0432 ${X(e)} \u0438\u0437 ${X(t)} ${kd(t)}`,rawCodes:e=>`\u041A\u043E\u0434\u044B \u043F\u0440\u0438\u0447\u0438\u043D \u00B7 \u043C\u0430\u043F\u043F\u0438\u043D\u0433 ${e}`,rawCode:(e,t)=>`${e} \u00D7${X(t)}`,recentRuns:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,outcome:{passed:`\u0443\u0441\u043F\u0435\u0445`,failed:`\u043F\u0430\u0434\u0435\u043D\u0438\u0435`,infra:`\u0438\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430`,cancelled:`\u043E\u0442\u043C\u0435\u043D\u0451\u043D`,abandoned:`\u0431\u0440\u043E\u0448\u0435\u043D`},totalFailures:`\u0412\u0441\u0435\u0433\u043E \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,noCauses:`\u041F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435\u0442.`},cause:{element_resolution:`\u041F\u043E\u0438\u0441\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430`,step_definition:`\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0448\u0430\u0433\u0430`,action_dispatch:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,precondition:`\u041F\u0440\u0435\u0434\u0443\u0441\u043B\u043E\u0432\u0438\u0435 \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,infrastructure:`\u0418\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430`,cancelled:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,unrecognized:`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u044B\u0435`},weakSpots:{coverage:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,coverageValue:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${q(t,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`,stepSuccess:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432`,ofSteps:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${q(t,{one:`\u0448\u0430\u0433\u0430`,few:`\u0448\u0430\u0433\u043E\u0432`,many:`\u0448\u0430\u0433\u043E\u0432`})}`,noExecutions:`\u043D\u0435\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0439`,openBugs:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,findings:`\u0421\u043B\u0430\u0431\u044B\u0435 \u043C\u0435\u0441\u0442\u0430`,findingsNone:`\u043D\u0435\u0442`,findingCount:{critical:e=>`${X(e)} ${q(e,{one:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u0430\u044F \u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0435 \u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u043D\u0430\u0445\u043E\u0434\u043E\u043A`})}`,high:e=>`${X(e)} ${q(e,{one:`\u0432\u0430\u0436\u043D\u0430\u044F \u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u0432\u0430\u0436\u043D\u044B\u0435 \u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u0432\u0430\u0436\u043D\u044B\u0445 \u043D\u0430\u0445\u043E\u0434\u043E\u043A`})}`,watch:e=>`${X(e)} ${q(e,{one:`\u043D\u0430\u0445\u043E\u0434\u043A\u0430 \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`,few:`\u043D\u0430\u0445\u043E\u0434\u043A\u0438 \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`,many:`\u043D\u0430\u0445\u043E\u0434\u043E\u043A \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`})}`},pagesTitle:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0444\u0438\u0447\u0438`,pagesCount:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)}`,pageCovered:`\u043F\u043E\u043A\u0440\u044B\u0442\u0430`,pageNotCovered:`\u043D\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0430`,pageBugs:e=>`\u0431\u0430\u0433\u043E\u0432: ${X(e)}`,pagesTruncated:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B ${X(e)} \u0438\u0437 ${X(t)} \u0441\u0442\u0440\u0430\u043D\u0438\u0446 \u0444\u0438\u0447\u0438.`,membership:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043C\u043E\u0436\u0435\u0442 \u0432\u0445\u043E\u0434\u0438\u0442\u044C \u0432 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0444\u0438\u0447 \u2014 \u0441\u0443\u043C\u043C\u044B \u043F\u043E \u0444\u0438\u0447\u0430\u043C \u043D\u0435 \u0441\u043A\u043B\u0430\u0434\u044B\u0432\u0430\u044E\u0442\u0441\u044F.`,unassigned:`\u0431\u0435\u0437 \u0444\u0438\u0447\u0438`,priority:{critical:`\u041A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0439`,high:`\u0412\u044B\u0441\u043E\u043A\u0438\u0439`,medium:`\u0421\u0440\u0435\u0434\u043D\u0438\u0439`,low:`\u041D\u0438\u0437\u043A\u0438\u0439`,ignore:`\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044F`}},lastPassed:{label:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u0430\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430`,never:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u043F\u0440\u043E\u0432\u0435\u0440\u043E\u043A \u043D\u0435 \u0431\u044B\u043B\u043E`,today:`\u0441\u0435\u0433\u043E\u0434\u043D\u044F`,yesterday:`\u0432\u0447\u0435\u0440\u0430`,daysAgo:e=>`${X(e)} ${Md(e)} \u043D\u0430\u0437\u0430\u0434`},hotspot:{open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,opened:`\u041D\u043E\u0432\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u0437\u0430 \u043E\u043A\u043D\u043E`,closedHint:`\u0417\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u0441\u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u0441 \u0440\u0435\u043B\u0438\u0437\u0430 \u043E\u0442\u0447\u0451\u0442\u043E\u0432: \u0443 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u0438\u0445 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0439 \u0434\u0430\u0442\u0430 \u043D\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0430, \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0435\u0451 \u043F\u043E \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0431\u044B\u043B\u043E \u0431\u044B \u0432\u044B\u0434\u0443\u043C\u043A\u043E\u0439.`,unmapped:`\u041D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u043E`,unmappedHint:`\u0411\u0430\u0433\u0438, \u0447\u0435\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0438\u043B\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u044B.`,severityChip:{critical:e=>`${X(e)} \u043A\u0440\u0438\u0442`,high:e=>`${X(e)} \u0432\u044B\u0441`,medium:e=>`${X(e)} \u0441\u0440\u0435\u0434`,low:e=>`${X(e)} \u043D\u0438\u0437`,none:e=>`${X(e)} \u0431\u0435\u0437 \u0432\u0430\u0436\u043D\u043E\u0441\u0442\u0438`,unknown:(e,t)=>`${X(e)} ${t}`}},envelope:{shownOfTotal:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)} \u2014 \u043F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0432 \u043E\u0442\u0447\u0451\u0442\u0435.`,truncated:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043D\u0435 \u0432\u0441\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u2014 \u043F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0432 \u043E\u0442\u0447\u0451\u0442\u0435.`},unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u0447\u0451\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0447\u0451\u0442\u0430 \u043F\u0440\u0438\u0448\u043B\u0438 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u2014 \u0447\u0438\u0441\u043B\u0430 \u043E\u0441\u0442\u0430\u044E\u0442\u0441\u044F \u0432 \u0442\u0435\u043A\u0441\u0442\u0435 \u043E\u0442\u0432\u0435\u0442\u0430 Progon.`},collection:{collectionAria:e=>`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043E\u0442\u0447\u0451\u0442\u0430: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u0435\u043A`,roleSlide:`\u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,goToSlide:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 {index} \u0438\u0437 {total}`}},runnerReadiness:{title:e=>`\u0413\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u044C \u043C\u0430\u0448\u0438\u043D: ${e}`,job:{atlas_crawl:`\u043E\u0431\u0445\u043E\u0434 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u0430\u0432\u0442\u043E\u0441\u0431\u043E\u0440\u043A\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,swarm:`\u0440\u043E\u0439 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`},evaluatedAt:e=>`\u043D\u0430 ${e}`,fleet:Nd,state:{not_owner:()=>`\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D`,pending_enroll:()=>`\u041E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,offline:()=>`\u041D\u0435 \u0432 \u0441\u0435\u0442\u0438`,capability_missing:e=>e===null?`\u041D\u0443\u0436\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435`:Pd[e],queue_full:()=>`\u041E\u0447\u0435\u0440\u0435\u0434\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0430`,ready:()=>`\u0413\u043E\u0442\u043E\u0432`},platform:{darwin:`macOS`,linux:`Linux`,win32:`Windows`},lastSeen:e=>`\u043D\u0430 \u0441\u0432\u044F\u0437\u0438 ${e}`,lastSeenNever:`\u043D\u0438 \u0440\u0430\u0437\u0443 \u043D\u0435 \u0432\u044B\u0445\u043E\u0434\u0438\u043B\u0430 \u043D\u0430 \u0441\u0432\u044F\u0437\u044C`,machinesAria:e=>`\u041C\u0430\u0448\u0438\u043D\u044B: ${X(e)}`,noRunners:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u0430\u0448\u0438\u043D \u043F\u0443\u0441\u0442.`,truncated:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}.`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E \u043C\u0430\u0448\u0438\u043D\u0430\u0445 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u041E\u0442\u0447\u0451\u0442\u044B \u043E \u0433\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u0438: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u043E\u0442\u0447\u0451\u0442\u043E\u0432 \u043E \u0433\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u0438`,roleSlide:`\u043E\u0442\u0447\u0451\u0442`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442`,goToSlide:`\u041E\u0442\u0447\u0451\u0442 {index} \u0438\u0437 {total}`}},runnerEnrollment:{title:e=>`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0435\u0439 \u043C\u0430\u0448\u0438\u043D\u044B: ${e}`,expiresAt:e=>`\u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E \u0434\u043E ${e}`,step:{install:`\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0430\u0433\u0435\u043D\u0442`,enroll:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043C\u0430\u0448\u0438\u043D\u0443`,approve:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,start:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0434\u0435\u043C\u043E\u043D`},copy:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,copied:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E`,copyAria:{install:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438`,enroll:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,start:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},copiedAria:{install:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438`,enroll:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,start:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},approveBefore:`\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043D\u0430\u043F\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0438 \u0441\u0441\u044B\u043B\u043A\u0443 \u0432\u0438\u0434\u0430`,approveAfter:`\u2014 \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0435\u0451 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0433\u0434\u0435 \u0432\u044B \u0432\u043E\u0448\u043B\u0438 \u0432 Progon, \u0441\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u043E\u0434 \u0441 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u043E\u043C, \u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0438\u043C\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u0438 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435.`,cadence:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043D\u0443\u0436\u043D\u043E \u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435 ${X(e)} \u0441.`,askAgain:`\u041F\u043E\u0441\u043B\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,unsupported:{title:`\u0418\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},references:{title:`\u0421\u0441\u044B\u043B\u043A\u0438`,groupAria:`\u0421\u0441\u044B\u043B\u043A\u0438 \u0438\u0437 \u043E\u0442\u0432\u0435\u0442\u0430`,destination:{workbench:`\u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,map:`\u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,run:`\u043E\u0442\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u0437\u0430\u043F\u0443\u0441\u043A`,list:`\u0432 \u0441\u043F\u0438\u0441\u043A\u0435`},action:{workbench:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,map:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,run:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A`,list:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0441\u043F\u0438\u0441\u043A\u0435`},noOpenAria:e=>`\u041D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F: ${e}`,unsupported:{title:`\u0421\u0441\u044B\u043B\u043A\u0438 \u0438\u0437 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F`,body:`\u0421\u0441\u044B\u043B\u043A\u0438 \u043F\u0440\u0438\u0448\u043B\u0438 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},sectionLink:{title:`\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,groupAria:`\u0421\u0441\u044B\u043B\u043A\u0438 \u043D\u0430 \u0440\u0430\u0437\u0434\u0435\u043B\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,action:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B`,sections:{scenarios:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,"shared-steps":`\u041E\u0431\u0449\u0438\u0435 \u0448\u0430\u0433\u0438`,"api-collections":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,"api-catalog":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,checklists:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,bugs:`\u0411\u0430\u0433\u0438`,"test-runs":`\u041F\u0440\u043E\u0433\u043E\u043D\u044B`,map:`\u041A\u0430\u0440\u0442\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430`},unrecognized:`\u0420\u0430\u0437\u0434\u0435\u043B \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D`,serverLabel:e=>`\u0420\u0430\u0437\u0434\u0435\u043B \u00B7 \u043E\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: \u00AB${e}\u00BB`,noRoute:`\u043D\u0435\u0442 \u0441\u0441\u044B\u043B\u043A\u0438`,noRouteHint:`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0440\u0430\u0437\u0434\u0435\u043B\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443`,noRouteAria:e=>`\u041D\u0435\u0442 \u0441\u0441\u044B\u043B\u043A\u0438 \u0434\u043B\u044F \u0440\u0430\u0437\u0434\u0435\u043B\u0430: ${e}`,unsupported:{title:`\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0440\u0430\u0437\u0434\u0435\u043B \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},search:{title:`\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u0432 \u043F\u0440\u043E\u0435\u043A\u0442\u0435`,evidence:`\u041E\u0431\u043E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C: ${e}`,emptyTitle:`\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E`,emptyForQuery:e=>`\u041F\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0443 \u00AB${e}\u00BB \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0441 \u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E\u0439 \u0443\u0432\u0435\u0440\u0435\u043D\u043D\u043E\u0441\u0442\u044C\u044E.`,emptyBody:`\u041F\u043E\u0438\u0441\u043A \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D \u043F\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C \u0442\u0438\u043F\u0430\u043C \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0435\u0439 \u2014 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438, \u0431\u0430\u0433\u0438, \u043F\u0443\u043D\u043A\u0442\u044B \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430.`,shownOfTotal:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}.`,shownOfAtLeast:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}+.`,shownUnknown:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)}.`,loadMore:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 ${X(e)}`,loadMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\u2026`,loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,unsupported:{title:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u041D\u0430\u0439\u0434\u0435\u043D\u043E: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432`,roleSlide:`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,goToSlide:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 {index} \u0438\u0437 {total}`}},jobStatus:hd,workflow:vd,scenario:Ed,coverage:fd,runInTab:yd,runStartAgent:Sd,confirmation:Cd,changeSet:ld},Id={byCode:{"agent_jobs.dispatch_key_spent":`\u042D\u0442\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E: \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435, \u043A\u043E\u0442\u043E\u0440\u043E\u0435 \u043E\u043D\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u043E, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"agent_jobs.not_active":`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u043E\u0441\u044C \u2014 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E.`,"agent_jobs.not_found":`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.`,"ai.bedrock_not_configured":`Amazon Bedrock \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,"ai.capabilities.unknown_provider":`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440.`,"ai.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai.completion_failed":`\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u043F\u0440\u043E\u0441\u0430 \u043A Progon`,"ai.concurrency_gate_unavailable":`Progon \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0438\u0437-\u0437\u0430 \u0441\u0431\u043E\u044F \u043D\u0430 \u043D\u0430\u0448\u0435\u0439 \u0441\u0442\u043E\u0440\u043E\u043D\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ai.credit_charge_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043F\u0438\u0441\u0430\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0437\u0430 \u044D\u0442\u043E\u0442 \u0437\u0430\u043F\u0440\u043E\u0441. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"ai.credit_estimate_invalid":`\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u0430\u044F \u043E\u0446\u0435\u043D\u043A\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"ai.credit_reservation_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B.`,"ai.credit_reservation_not_found":`\u0420\u0435\u0437\u0435\u0440\u0432 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai.credit_reservation_not_open":`\u042D\u0442\u043E\u0442 \u0440\u0435\u0437\u0435\u0440\u0432 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u0443\u0436\u0435 \u0437\u0430\u043A\u0440\u044B\u0442.`,"ai.credits_insufficient":`\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432`,"ai.element_html_required":`HTML \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u0435\u043D`,"ai.frozen_model_lane_retired":`\u0417\u0430\u043C\u043E\u0440\u043E\u0436\u0435\u043D\u043E \u043D\u0430 \u043B\u0435\u0439\u043D\u0435 \u043C\u043E\u0434\u0435\u043B\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0435\u0442. \u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0437\u0430\u043D\u043E\u0432\u043E \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u043C\u043E\u0434\u0435\u043B\u0438.`,"ai.generation_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435 Progon`,"ai.messages_required":`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B`,"ai.model_not_allowed":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,"ai.model_not_configured":`\u0414\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 \u043D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438. \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.model_output_ceiling_below_thinking_budget":`\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u043E\u0442\u0432\u0435\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 \u043C\u0435\u043D\u044C\u0448\u0435 \u0431\u044E\u0434\u0436\u0435\u0442\u0430 \u0440\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0439 \u2014 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443 \u043D\u0443\u0436\u043D\u043E \u043F\u043E\u0434\u043D\u044F\u0442\u044C \u043F\u043E\u0442\u043E\u043B\u043E\u043A \u0438\u043B\u0438 \u0441\u043D\u0438\u0437\u0438\u0442\u044C \u0431\u044E\u0434\u0436\u0435\u0442.`,"ai.model_output_ceiling_missing":`\u0414\u043B\u044F \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 \u043D\u0435 \u0437\u0430\u0434\u0430\u043D \u043F\u043E\u0442\u043E\u043B\u043E\u043A \u043E\u0442\u0432\u0435\u0442\u0430, \u0430 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0435\u0433\u043E. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.model_plan_restricted":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u043D\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u044D\u0442\u0443 \u043C\u043E\u0434\u0435\u043B\u044C`,"ai.plan_restricted":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u043D\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u044D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,"ai.provider_empty_response":`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B \u043F\u0443\u0441\u0442\u043E\u0439 \u043E\u0442\u0432\u0435\u0442`,"ai.provider_error":`\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430`,"ai.provider_not_configured":`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,"ai.reasoning_unsupported":`\u041C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435\u043C \u2014 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u00AB\u041E\u0431\u044B\u0447\u043D\u044B\u0439\u00BB \u0432 \u00AB\u0423\u0441\u0438\u043B\u0438\u0438\u00BB \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"ai.user_company_missing":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D \u043A \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`,"ai.user_concurrency_exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 \u2014 \u0434\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0442\u0435\u043A\u0443\u0449\u0438\u0445 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.user_credits_limit":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F`,"ai.user_disabled":`Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.user_model_not_allowed":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430`,"ai.user_not_found":`\u0423\u0447\u0451\u0442\u043D\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai_models.no_sendable_model":`\u041D\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u0438, \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0439 \u0434\u043B\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u2014 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0432 \u0432\u0435\u0440\u0445\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043B\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u043A\u043B\u044E\u0447 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445.`,"ai_models.selection_not_sendable":`\u042D\u0442\u0443 \u043C\u043E\u0434\u0435\u043B\u044C \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u044B\u0431\u0440\u0430\u0442\u044C.`,"ai_settings.admin_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"ai_settings.api_key_missing":`\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 API-\u043A\u043B\u044E\u0447 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai_settings.company_key_required":`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C \u043A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0439 API-\u043A\u043B\u044E\u0447.`,"ai_settings.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai_settings.company_provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.enterprise_required_company":`\u041A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.enterprise_required_personal":`\u041B\u0438\u0447\u043D\u044B\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.enterprise_required_user":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.invalid_provider":`\u0412\u044B\u0431\u0440\u0430\u043D \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440.`,"ai_settings.model_unavailable":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438.`,"ai_settings.personal_provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043B\u0438\u0447\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.plan_not_found":`\u0422\u0430\u0440\u0438\u0444 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai_settings.provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.provider_unavailable":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,"ai_settings.unsupported_personal_provider":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043B\u0438\u0447\u043D\u043E\u0433\u043E.`,"ai_settings.user_not_found":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"assistant.action_context_missing":`\u041D\u0435\u043B\u044C\u0437\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C: \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u0434\u0438\u0430\u043B\u043E\u0433\u0430 \u043F\u043E\u0442\u0435\u0440\u044F\u043D. \u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.`,"assistant.conversations.invalid_cursor":`\u041D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043A\u0443\u0440\u0441\u043E\u0440.`,"assistant.conversations.not_found":`\u0414\u0438\u0430\u043B\u043E\u0433 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"assistant.recover_last_message":`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442 \u0431\u044B\u043B \u043F\u0440\u0435\u0440\u0432\u0430\u043D. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.`,"assistant.search_session.not_found":`\u041F\u043E\u0438\u0441\u043A\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438\u043B\u0438 \u0438\u0441\u0442\u0435\u043A\u043B\u0430.`,"auth.company_forbidden":`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`,"auth.forbidden":`\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u043F\u0440\u0430\u0432`,"auth.insufficient_scope":`\u0422\u0440\u0435\u0431\u0443\u0435\u043C\u044B\u0435 \u043F\u0440\u0430\u0432\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 (scope) \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B.`,"auth.invalid_token":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0438\u043B\u0438 \u0438\u0441\u0442\u0435\u043A\u0448\u0438\u0439 \u0442\u043E\u043A\u0435\u043D`,"auth.login.company_inactive":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438\u043B\u0438 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u0430`,"auth.login.email_not_verified":`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 email \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430`,"auth.login.email_rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0432\u0445\u043E\u0434\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E email. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.login.invalid_credentials":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 email \u0438\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C`,"auth.login.missing_credentials":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 email \u0438 \u043F\u0430\u0440\u043E\u043B\u044C`,"auth.login.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0432\u0445\u043E\u0434\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.missing_header":`\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438`,"auth.refresh.token_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043A\u0435\u043D \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F.`,"auth.register.capacity_reached":`\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u0437\u0430\u043A\u0440\u044B\u0442\u0430 \u2014 \u043C\u044B \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u043C \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u043D\u043E\u0432\u044B\u0445 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.capacity_unreadable":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044E \u0438\u0437-\u0437\u0430 \u043E\u0448\u0438\u0431\u043A\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437, \u0430 \u0435\u0441\u043B\u0438 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u0435\u0442\u0441\u044F, \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.company_required":`\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,"auth.register.email_domain_blocked":`\u042D\u0442\u043E\u0442 \u043F\u043E\u0447\u0442\u043E\u0432\u044B\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442 \u0434\u043B\u044F \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u044B\u0439 \u0440\u0430\u0431\u043E\u0447\u0438\u0439 \u0438\u043B\u0438 \u043B\u0438\u0447\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441.`,"auth.register.email_invalid":`\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 email.`,"auth.register.email_taken":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0441 \u0442\u0430\u043A\u0438\u043C email \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442`,"auth.register.invite_code_invalid":`\u041A\u043E\u0434 \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u043E\u0434 \u0438\u043B\u0438 \u0437\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439.`,"auth.register.invite_required":`\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0438\u0437 \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.name_required":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0438 \u0444\u0430\u043C\u0438\u043B\u0438\u044E.`,"auth.register.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F`,"auth.resend.email_required":`\u0423\u043A\u0430\u0436\u0438\u0442\u0435 email.`,"auth.resend.rate_limited":`\u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u044B\u043C \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u043C \u043A\u043E\u0434\u0430.`,"auth.session_invalidated":`\u0421\u0435\u0441\u0441\u0438\u044F \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u0430. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.session_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0441\u0441\u0438\u044E.`,"auth.token_expired":`\u0422\u043E\u043A\u0435\u043D \u0438\u0441\u0442\u0451\u043A. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.token_revoked":`\u0422\u043E\u043A\u0435\u043D \u043E\u0442\u043E\u0437\u0432\u0430\u043D. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.user_unavailable":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u0438\u043B\u0438 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D`,"auth.verify_email.invalid_code":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F`,"auth.verify_email.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.verify_email.required":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 email \u0438 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,"auth.verify_email.too_many_attempts":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A. \u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434`,"available_models.missing_disabled_selection_id":`\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ID \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u0439 \u0432\u044B\u0431\u043E\u0440\u043A\u0438.`,"available_models.redis_unavailable":`\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u0438 \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,"available_models.unknown_key_source":`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A API-\u043A\u043B\u044E\u0447\u0430.`,"chat.busy":`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0435\u0449\u0451 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.`,"chat_confirm.display_unresolvable":`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0441\u043E\u0441\u043B\u0430\u043B\u0441\u044F \u043D\u0430 \u043E\u0431\u044A\u0435\u043A\u0442, \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043D\u0435\u0442 \u0432 \u044D\u0442\u043E\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u0435. \u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435, \u0447\u0442\u043E \u0438\u043C\u0435\u043D\u043D\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C, \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"chat_confirm.pending_action_stale":`\u042D\u0442\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043B\u043E: \u043E\u043D\u043E \u0431\u044B\u043B\u043E \u0441\u0434\u0435\u043B\u0430\u043D\u043E \u0434\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430, \u0438 \u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0442 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0443. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u2014 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0441\u043E\u0441\u0442\u0430\u0432\u0438\u0442 \u043D\u043E\u0432\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435.`,"client.connection_lost_during_stream":`\u041E\u0442\u0432\u0435\u0442 \u043E\u0431\u043E\u0440\u0432\u0430\u043B\u0441\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430, \u043A\u043E\u0433\u0434\u0430 \u0441\u0432\u044F\u0437\u044C \u0432\u0435\u0440\u043D\u0451\u0442\u0441\u044F.`,"client.browser_api_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C API-\u0437\u0430\u043F\u0440\u043E\u0441 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0438\u0441\u0442\u043E\u0440\u0438\u044E: \u0437\u0430\u043F\u0440\u043E\u0441 \u043C\u043E\u0433 \u0431\u044B\u0442\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D.`,"client.atlas_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0431\u0445\u043E\u0434\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043E\u0431\u0445\u043E\u0434\u044B Atlas \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043E\u043C.`,"client.ai_run_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A AI-\u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043E\u043C.`,"client.workflow_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u043E\u0439 \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0440\u043E\u044F \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"client.permission_mode_changed":`\u0420\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438 \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u044C \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"client.stream_stalled":`\u041E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u043C\u0438\u043D\u0443\u0442\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u2014 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u0430\u044F \u0447\u0430\u0441\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u0430 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u0432\u044B\u0448\u0435.`,"cmd.accept_timeout":`\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u0443\u0441\u043F\u0435\u043B \u043F\u0440\u0438\u043D\u044F\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"company_models.default_must_be_enabled":`\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0430 \u0432 \u0441\u043F\u0438\u0441\u043E\u043A \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0445, \u043F\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043C \u0435\u0451 \u043C\u043E\u0436\u043D\u043E \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,"company_models.invalid_model_id":`\u041C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"company_models.plan_restricted":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0431\u043E\u043B\u0435\u0435 \u0432\u044B\u0441\u043E\u043A\u043E\u043C \u0442\u0430\u0440\u0438\u0444\u0435.`,"conversation.project_id_required":`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C ID \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`,disconnected:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"internal.invalid_token":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"internal.not_configured":`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 API \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D.`,"internal.operation_failed":`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0430\u0441\u044C \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439.`,"internal.unexpected":`\u041D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430`,model_not_allowed:`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0435\u043C \u0442\u0430\u0440\u0438\u0444\u0435 \u2014 \u0432\u044B\u0431\u0440\u0430\u043D\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,"rate_limit.company_write_exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"rate_limit.counter_upsert_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0447\u0451\u0442\u0447\u0438\u043A \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0439.`,"rate_limit.counter_upsert_invalid_count":`\u0421\u0447\u0451\u0442\u0447\u0438\u043A \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0439 \u0432\u0435\u0440\u043D\u0443\u043B \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435.`,"rate_limit.exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,reconnect_failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,reconnect_timeout:`\u0412\u0440\u0435\u043C\u044F \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0438\u0441\u0442\u0435\u043A\u043B\u043E. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,selection_expired:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"subscription.admin_api_error":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u0432 \u0434\u0430\u043D\u043D\u044B\u0439 \u043C\u043E\u043C\u0435\u043D\u0442.`,"subscription.admin_api_not_configured":`\u0421\u0435\u0440\u0432\u0438\u0441 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0437\u0430\u044F\u0432\u043E\u043A \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D.`,"subscription.admin_api_unavailable":`\u0421\u0435\u0440\u0432\u0438\u0441 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0437\u0430\u044F\u0432\u043E\u043A \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"subscription.admin_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"subscription.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"subscription.credits_maximum":`\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043A\u0443\u043F\u043A\u0430 \u2014 100 000 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"subscription.credits_minimum":`\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043A\u0443\u043F\u043A\u0430 \u2014 100 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"subscription.invalid_plan":`\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0442\u0430\u0440\u0438\u0444\u043D\u044B\u0439 \u043F\u043B\u0430\u043D.`,"subscription.payments_disabled":`\u041E\u043F\u043B\u0430\u0442\u0430 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0444\u043E\u0440\u043C\u0443 \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0430 \u0430\u043F\u0433\u0440\u0435\u0439\u0434.`,"subscription.plan_config_missing":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E \u0442\u0430\u0440\u0438\u0444\u043D\u043E\u0433\u043E \u043F\u043B\u0430\u043D\u0430, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"subscription.plan_not_found":`\u0422\u0430\u0440\u0438\u0444\u043D\u044B\u0439 \u043F\u043B\u0430\u043D \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"subscription.request_already_open":`\u0423 \u0432\u0430\u0448\u0435\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0430 \u043D\u0430 \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u0438. \u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0435\u0451 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438, \u043F\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043C \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u043D\u043E\u0432\u0443\u044E.`,"subscription.seats_exceed_limit":`\u041D\u0435\u043B\u044C\u0437\u044F \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043C\u0435\u0441\u0442\u0430: \u043F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C, \u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0442\u0430\u0440\u0438\u0444\u0430.`,"subscription.seats_invalid":`\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442. \u0414\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043E\u0442 1 \u0434\u043E 100.`,"subscription.seats_unlimited":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u0443\u0436\u0435 \u0432\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u043D\u0435\u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442.`,"ws.conversation_not_found":`\u0414\u0438\u0430\u043B\u043E\u0433 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ws.rate_limit_company":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.rate_limit_fleet":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.rate_limit_user":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.run_not_found":`\u0417\u0430\u043F\u0443\u0441\u043A Progon \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ws.runner_already_claimed":`\u0418\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C \u0443\u0436\u0435 \u0437\u0430\u043D\u044F\u0442 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0430.`,"ws.runner_not_owner":`\u041F\u0440\u0430\u0432\u043E \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0443\u0442\u0435\u0440\u044F\u043D\u043E. \u041F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u0441\u044C.`,"ws.runner_restore_unavailable":`\u041D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F.`,"ws.runner_restore_window_expired":`\u041E\u043A\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,"ws.session_not_found":`\u0421\u0435\u0441\u0441\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ws.unauthorized_channel":`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u0438\u043B\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"workflows.agents_over_max":`\u00AB\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u0432\u00BB \u0443\u043C\u0435\u043D\u044C\u0448\u0438\u043B\u0438 \u2014 \u00AB\u0423\u0441\u0438\u043B\u0438\u0435\u00BB \u0441\u0434\u0432\u0438\u043D\u0443\u0442\u043E \u043D\u0430 \u043D\u043E\u0432\u044B\u0439 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C, \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"workflows.not_found":`\u0420\u043E\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"workflows.not_initiator_or_admin":`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439 \u043C\u043E\u0436\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u0442\u043E\u0442, \u043A\u0442\u043E \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B, \u0438\u043B\u0438 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},byProviderCode:{"ai.zai.insufficient_balance":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u2014 \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043D\u0430 \u0441\u0447\u0451\u0442\u0435 \u043B\u0438\u0431\u043E \u043A\u043B\u044E\u0447 \u0438 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0431\u0430\u043B\u0430\u043D\u0441 \u0438 \u043A\u043B\u044E\u0447 Z.AI.`,"ai.zai.rate_limited":`Z.AI \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u043E\u0442\u0443 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.overloaded":`\u0421\u0435\u0440\u0432\u0438\u0441 Z.AI \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.quota_exhausted":`\u041A\u0432\u043E\u0442\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F Z.AI \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D\u0430. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043B\u0438\u043C\u0438\u0442\u044B \u0432\u0430\u0448\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 Z.AI.`,"ai.zai.plan_restricted":`\u042D\u0442\u043E\u0442 \u043A\u043B\u044E\u0447 Z.AI \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D\u043D\u043E\u0439 \u043F\u043E\u0434\u043F\u0438\u0441\u043A\u043E\u0439 \u0438\u043B\u0438 \u043F\u043B\u0430\u043D\u043E\u043C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0430\u0448 \u043F\u043B\u0430\u043D Z.AI.`,"ai.zai.content_policy":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u0438\u0437-\u0437\u0430 \u043F\u043E\u043B\u0438\u0442\u0438\u043A\u0438 \u0432 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430.`,"ai.zai.unknown_model":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C Z.AI \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u0430. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C GLM.`,"ai.zai.auth_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0432 Z.AI. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435, \u0447\u0442\u043E API-\u043A\u043B\u044E\u0447 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D \u0438 \u0430\u043A\u0442\u0438\u0432\u0435\u043D.`,"ai.zai.invalid_request":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u043A\u0430\u043A \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0432\u043E\u0434 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.context_overflow":`\u0414\u0438\u0430\u043B\u043E\u0433 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043B\u0438\u043D\u043D\u044B\u0439 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 Z.AI. \u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u0441\u043E\u043A\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0432\u043E\u0434.`,"ai.zai.vision_not_supported":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C Z.AI \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F. \u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439.`,"ai.zai.abnormal_termination":`\u041E\u0442\u0432\u0435\u0442 Z.AI \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0441\u044F \u043D\u0435\u0448\u0442\u0430\u0442\u043D\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"ai.zai.provider_error":`Z.AI \u0432\u0435\u0440\u043D\u0443\u043B \u043E\u0448\u0438\u0431\u043A\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},Ld=e=>q(e,{one:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435`,few:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,many:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439`}),Rd=e=>q(e,{one:`\u0430\u0433\u0435\u043D\u0442`,few:`\u0430\u0433\u0435\u043D\u0442\u0430`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`}),zd={cards:Fd,shell:{header:{title:`Progon`,history:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F`,newConversation:`\u041D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433`,noProject:`\u041F\u0440\u043E\u0435\u043A\u0442 \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D`},composer:{inputLabel:`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0443`,placeholder:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 Progon\u2026`,placeholderNoModels:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430, \u043F\u043E\u043A\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439`,placeholderSignIn:`\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438`,placeholderNoProject:`\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0435\u043A\u0442`,placeholderOffline:`\u041D\u0435\u0442 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,send:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,stop:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442`,placeholderWithFiles:`\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0441 \u0444\u0430\u0439\u043B\u0430\u043C\u0438\u2026`,sendBlocked:{uploading:`\u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0444\u0430\u0439\u043B\u043E\u0432`,refused:`\u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,noText:`\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043A \u0444\u0430\u0439\u043B\u0430\u043C`},settingsLabel:`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0442\u0432\u0435\u0442\u0430`,effort:{name:`\u0423\u0441\u0438\u043B\u0438\u0435`,note:`\u041E\u0442\u0432\u0435\u0442\u044B \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0438 \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0438`,levels:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439`,thinking:`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435`,max:`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C`},rows:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0435 \u043E\u0442\u0432\u0435\u0442\u044B, \u0437\u0430\u043F\u0443\u0441\u043A\u0438 \u043E\u0434\u043D\u0438\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u043C`,thinking:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0438 \u0430\u0433\u0435\u043D\u0442 \u0434\u0443\u043C\u0430\u044E\u0442 \u0433\u043B\u0443\u0431\u0436\u0435`,max:`\u0413\u043B\u0443\u0431\u0436\u0435, \u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0438 \u2014 \u0440\u043E\u0435\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u0432`},footer:`\u0414\u0435\u0440\u0436\u0438\u0442\u0441\u044F \u0434\u043E \u043A\u043E\u043D\u0446\u0430 \u0431\u0435\u0441\u0435\u0434\u044B. \u041D\u043E\u0432\u0430\u044F \u0431\u0435\u0441\u0435\u0434\u0430 \u043D\u0430\u0447\u043D\u0451\u0442\u0441\u044F \u0441 \u00AB\u041E\u0431\u044B\u0447\u043D\u044B\u0439\u00BB.`,chipMax:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e} ${Rd(e)}`,chipMaxShort:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e}`,long:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439 \u00B7 \u043E\u0434\u0438\u043D \u0430\u0433\u0435\u043D\u0442`,thinking:`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435 \u00B7 \u043E\u0434\u0438\u043D \u0430\u0433\u0435\u043D\u0442`,max:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e} ${Rd(e)}`},chipLabel:e=>`\u0423\u0441\u0438\u043B\u0438\u0435: ${e}`,reasonPlace:`\u041D\u0443\u0436\u0435\u043D \u0431\u0440\u0430\u0443\u0437\u0435\u0440: \u00AB\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C\u00BB \u2014 \u044D\u0442\u043E \u043E\u043A\u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,agents:{label:`\u0410\u0433\u0435\u043D\u0442\u043E\u0432`,limit:e=>`\u041D\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u2014`,settingsLink:`\u00AB\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0418\u0418 \u2192 \u0420\u043E\u0439 \u0430\u0433\u0435\u043D\u0442\u043E\u0432\u00BB`,groupLabel:`\u0427\u0438\u0441\u043B\u043E \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,fewer:`\u041C\u0435\u043D\u044C\u0448\u0435 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,more:`\u0411\u043E\u043B\u044C\u0448\u0435 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`}},permission:{groupLabel:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`,menuNote:`\u0414\u043B\u044F \u044D\u0442\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u044B`,chipLabel:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F: ${e}`,ask:`\u0421\u043F\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044C`,bypass:`\u0411\u0435\u0437 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439`,askHint:`\u0417\u0430\u043F\u0443\u0441\u043A\u0438 \u0438 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u044B\u0435 \u043F\u0440\u0430\u0432\u043A\u0438 \u0436\u0434\u0443\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,bypassHint:`\u0417\u0430\u043F\u0443\u0441\u043A\u0438 \u0438 \u043F\u0440\u0430\u0432\u043A\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u044E\u0442\u0441\u044F \u0441\u0440\u0430\u0437\u0443. \u0423\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0432\u0441\u0451 \u0440\u0430\u0432\u043D\u043E \u0436\u0434\u0443\u0442 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,arrived:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F: ${e}`},place:{name:`\u0413\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C`,note:`\u0414\u043B\u044F \u0432\u0441\u0435\u0445 \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u0438\u0437 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,title:`\u0413\u0434\u0435 \u0418\u0418 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: \u044D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0440\u0430\u043D\u043D\u0435\u0440 \u0438\u043B\u0438 \u0431\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,chipLabel:e=>`\u0413\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C: ${e}`,thisBrowser:`\u042D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,thisBrowserRowOpensWindows:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0444\u043E\u043D\u0435 \u044D\u0442\u043E\u0433\u043E Chrome`,thisBrowserRowTasksOnly:`\u0412 \u0432\u0435\u0431-\u0447\u0430\u0442\u0435 \u2014 \u0442\u043E\u043B\u044C\u043A\u043E \u0437\u0430\u0434\u0430\u043D\u0438\u044F; \u043F\u0440\u043E\u0433\u043E\u043D \u0438 \u043E\u0431\u0445\u043E\u0434 \u2014 \u0441 \u0440\u0430\u043D\u043D\u0435\u0440\u0430 \u0438\u043B\u0438 \u0438\u0437 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438`,none:`\u0411\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,noneRow:`\u0422\u043E\u043B\u044C\u043A\u043E API-\u0437\u0430\u043F\u0440\u043E\u0441\u044B \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,runner:e=>`\u0420\u0430\u043D\u043D\u0435\u0440 ${e}`,runnerUnread:`\u0420\u0430\u043D\u043D\u0435\u0440`,runnerGone:`\u0420\u0430\u043D\u043D\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,runnerGoneHint:`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0430\u043D\u043D\u0435\u0440 \u0443\u0434\u0430\u043B\u0451\u043D \u0438\u043B\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0430\u043C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u0433\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C.`,runnerFree:`\u0421\u0432\u043E\u0431\u043E\u0434\u0435\u043D`,runnerBusy:`\u0417\u0430\u043D\u044F\u0442 \u2014 \u0437\u0430\u043F\u0443\u0441\u043A \u0432\u0441\u0442\u0430\u043D\u0435\u0442 \u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u044C`,runnerBlocked:{notOwner:`\u0417\u0430\u043F\u0443\u0441\u043A \u0442\u043E\u043B\u044C\u043A\u043E \u0443 \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0430`,notEnrolled:`\u0415\u0449\u0451 \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D`,offline:`\u041E\u0444\u043B\u0430\u0439\u043D`},fleetLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0440\u0430\u043D\u043D\u0435\u0440\u044B\u2026`,fleetFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0430\u043D\u043D\u0435\u0440\u044B`,fleetRetry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,fleetEmpty:`\u0412 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u043D\u0435\u0442 \u0440\u0430\u043D\u043D\u0435\u0440\u043E\u0432`,othersGroup:e=>`\u0427\u0443\u0436\u0438\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u044B (${e})`},hint:`Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C, Shift+Enter \u2014 \u043D\u043E\u0432\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430`,plainHint:`Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,attachments:{attach:`\u041F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u0444\u0430\u0439\u043B`,trayLabel:`\u0424\u0430\u0439\u043B\u044B \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,remove:e=>`\u0423\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u00AB${e}\u00BB`,uploading:e=>`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F ${e}%`,uploadingLabel:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 ${e}`,pastedName:e=>`\u0421\u043D\u0438\u043C\u043E\u043A \u044D\u043A\u0440\u0430\u043D\u0430 ${e}`,drop:{title:`\u041E\u0442\u043F\u0443\u0441\u0442\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C`,types:`PNG, JPEG, WebP, PDF, TXT, MD`,sizes:`\u041A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0438 PDF \u0434\u043E 50 \u041C\u0411, \u0442\u0435\u043A\u0441\u0442 \u0434\u043E 4 \u041C\u0411`},retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,reupload:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430`,pickModel:`\u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,refusal:{type:`\u0422\u0430\u043A\u043E\u0439 \u0444\u0430\u0439\u043B \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F: \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F PNG, JPEG, WebP, PDF, TXT, MD`,tooLarge:e=>`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439 \u0444\u0430\u0439\u043B: ${e}`,limit:{image:`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u2014 \u0434\u043E 50 \u041C\u0411`,pdf:`PDF \u2014 \u0434\u043E 50 \u041C\u0411`,text:`\u0442\u0435\u043A\u0441\u0442 \u2014 \u0434\u043E 4 \u041C\u0411`},fileName:`\u0418\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u0434\u043B\u0438\u043D\u043D\u0435\u0435 255 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u2014 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043B \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,empty:`\u0424\u0430\u0439\u043B \u043F\u0443\u0441\u0442\u043E\u0439`,textNotUtf8:`\u0422\u0435\u043A\u0441\u0442 \u043D\u0435 \u0432 UTF-8 \u2014 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0432 UTF-8 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,unreadable:`\u0424\u0430\u0439\u043B \u043D\u0435 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044F \u2014 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043E\u043D \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0451\u043D`,contentMismatch:e=>`\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043D\u0435 \u043F\u043E\u0445\u043E\u0436\u0435 \u043D\u0430 ${e} \u2014 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u0444\u0430\u0439\u043B`,pdfEncrypted:`PDF \u0437\u0430\u0449\u0438\u0449\u0451\u043D \u043F\u0430\u0440\u043E\u043B\u0435\u043C \u2014 \u0441\u043D\u0438\u043C\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,server:`\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u0444\u0430\u0439\u043B`,failedNetwork:`\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C`,failedServer:`\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B`,expired:`\u041D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0441\u0443\u0442\u043A\u0438 \u2014 \u044D\u0442\u043E\u0442 \u0443\u0436\u0435 \u0443\u0434\u0430\u043B\u0451\u043D`,modelNoFiles:e=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u2014 `,modelNoType:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 ${t} \u2014 `,modelFact:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u044D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B: ${t} \u2014 `},announce:{uploaded:e=>`\u0424\u0430\u0439\u043B \u00AB${e}\u00BB \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D`,refused:(e,t)=>`\u0424\u0430\u0439\u043B \u00AB${e}\u00BB \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C: ${t}`}}},transcript:{copyAnswer:{label:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442`,done:`\u041E\u0442\u0432\u0435\u0442 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442`},activity:{done:e=>`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e} ${q(e,{one:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,few:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,many:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`})}`,doneOf:(e,t)=>`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e} \u0438\u0437 ${t} ${q(t,{one:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,few:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`,many:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`})}`,doneShort:e=>`\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e}`,failedShort:e=>`${e} \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439`,running:e=>`\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F: ${e}`,failed:`\u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,unknown:`\u0438\u0441\u0445\u043E\u0434 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`},feedLabel:`\u041B\u0435\u043D\u0442\u0430 \u0434\u0438\u0430\u043B\u043E\u0433\u0430`,scrollToBottom:`\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u0432\u043D\u0438\u0437`,leadByline:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u043E\u044F`,taskLeadByline:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,thinking:`\u0414\u0443\u043C\u0430\u044E\u2026`,thoughtFor:e=>`\u0414\u0443\u043C\u0430\u043B ${e} \u0441`,thinkingPhase:`\u0414\u0443\u043C\u0430\u044E\u2026`,toolCall:`\u0412\u044B\u0437\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430`,toolCallCancelled:`\u0412\u044B\u0437\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u043E\u0442\u043C\u0435\u043D\u0451\u043D`,toolCallStatus:{confirmed:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,waitingForBrowser:`\u041E\u0436\u0438\u0434\u0430\u0435\u043C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,stoppingBrowser:`\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435\u2026`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,rejected:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,rejectedLeadGrant:`\u041D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043E \u2014 \u043F\u043E\u0439\u0434\u0451\u0442 \u0432 \u043E\u0442\u0447\u0451\u0442 \u00B7 \u0432\u044B`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E: \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`,unknown:`\u0418\u0441\u0445\u043E\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`,launchedElsewhere:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E \u0432 \u043D\u043E\u0432\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u0435`,openConversation:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0431\u0435\u0441\u0435\u0434\u0443`},unknownTool:{title:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u042D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043D\u0435 \u0443\u043C\u0435\u0435\u0442 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u044D\u0442\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},stopFailed:{rejected:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u043A\u043E\u043C\u0430\u043D\u0434\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,ack_timeout:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,not_open:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,connection_closed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},details:`\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438`,cardsFailed:{title:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u044D\u0442\u043E\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430.`,text:`\u0422\u0435\u043A\u0441\u0442 \u043E\u0442\u0432\u0435\u0442\u0430 \u0432\u044B\u0448\u0435 \u043D\u0435 \u043F\u043E\u0441\u0442\u0440\u0430\u0434\u0430\u043B.`,retry:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430`}},empty:{heading:`\u0427\u0435\u043C \u043C\u043E\u0433\u0443 \u043F\u043E\u043C\u043E\u0447\u044C?`,subtext:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043E \u0442\u0435\u0441\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438 \u0438\u043B\u0438 \u043F\u043E\u0440\u0443\u0447\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,footnote:`\u041A\u043B\u0438\u043A \u0432\u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0433\u043E\u0442\u043E\u0432\u043A\u0443 \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0432 \u043F\u043E\u043B\u0435 \u2014 \u043F\u043E\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435`,reportHeading:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043F\u0440\u043E \u044D\u0442\u043E\u0442 \u043E\u0442\u0447\u0451\u0442`},errors:{classes:{rateLimit:{title:`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432`,hint:`\u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435`},credits:{title:`\u041B\u0438\u043C\u0438\u0442 \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0442\u0430\u0440\u0438\u0444 \u0438\u043B\u0438 \u043B\u0438\u043C\u0438\u0442\u044B \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`},auth:{title:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 API-\u043A\u043B\u044E\u0447 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`},connection:{title:`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435`},stalled:{title:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043B \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,hint:null},streamCut:{title:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E`,hint:null},generic:{title:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 Progon`,hint:`\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437`}}},notices:{dismiss:`\u0421\u043A\u0440\u044B\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,capabilities:{title:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,sendBlocked:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430, \u043F\u043E\u043A\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F \u0441\u043D\u043E\u0432\u0430.`,timedOut:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0441\u044F \u0437\u0430 \u043E\u0442\u0432\u0435\u0434\u0451\u043D\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F.`,loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439.`,retry:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439`},permissionReadFailed:{title:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439`,text:`\u0411\u0435\u0437 \u043D\u0435\u0433\u043E \u043D\u043E\u0432\u0443\u044E \u0431\u0435\u0441\u0435\u0434\u0443 \u043D\u0435 \u043D\u0430\u0447\u0430\u0442\u044C. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},permissionWriteFailed:{title:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u00AB${e}\u00BB`,textConversation:e=>`\u0411\u0435\u0441\u0435\u0434\u0430 \u043E\u0441\u0442\u0430\u043B\u0430\u0441\u044C \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB${e}\u00BB.`,textNewConversation:e=>`\u041D\u043E\u0432\u0430\u044F \u0431\u0435\u0441\u0435\u0434\u0430 \u043D\u0430\u0447\u043D\u0451\u0442\u0441\u044F \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB${e}\u00BB.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},unsent:{title:e=>`\u041D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E: ${e} ${Ld(e)}`,textWaiting:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0447\u0438\u0442\u0430\u043B\u0441\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043B\u0438\u0441\u044C \u0437\u0434\u0435\u0441\u044C. \u041E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445, \u043A\u043E\u0433\u0434\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F.`,textReady:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0447\u0438\u0442\u0430\u043B\u0441\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043B\u0438\u0441\u044C \u0437\u0434\u0435\u0441\u044C. \u0421\u043F\u0438\u0441\u043E\u043A \u0441\u043D\u043E\u0432\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445 \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u0435.`,textFailed:`\u042D\u0442\u0438 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043D\u0435 \u0434\u043E\u0448\u043B\u0438 \u0434\u043E \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430. \u041E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u0435.`,textReconnect:`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0443\u0439\u0434\u0443\u0442 \u0441\u0430\u043C\u0438, \u043A\u043E\u0433\u0434\u0430 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u043D\u0451\u0442\u0441\u044F.`,listLabel:`\u041D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,send:e=>`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C: ${e}`,discard:e=>`\u0423\u0434\u0430\u043B\u0438\u0442\u044C: ${e}`,sendShort:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,discardShort:`\u0423\u0434\u0430\u043B\u0438\u0442\u044C`},interrupted:{title:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0437\u0430\u043F\u0440\u043E\u0441 \u0431\u044B\u043B \u043F\u0440\u0435\u0440\u0432\u0430\u043D`,text:`\u041E\u0442\u0432\u0435\u0442 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0435 \u043F\u0440\u0438\u0448\u0451\u043B.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},reportInitializing:{title:`\u041E\u0442\u0447\u0451\u0442 \u0435\u0449\u0451 \u0433\u043E\u0442\u043E\u0432\u0438\u0442\u0441\u044F`,text:`\u0414\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u0440\u0430\u0441\u0447\u0451\u0442\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435.`,retry:`\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430`},readiness:{signInTitle:`\u0412\u043E\u0439\u0434\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u043E\u043C`,signInText:`\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043F\u0430\u043F \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F \u0438 \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0432 Progon.`,projectTitle:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0435\u043A\u0442`,projectText:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`},pageScan:{scanning:`\u0421\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B\u2026`,delivering:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F\u2026`,failedTitle:`\u042D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043D\u0435\u043B\u044C\u0437\u044F \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,failed:{no_capturable_tab:`\u041E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u044B\u0439 \u0438\u043B\u0438 \u043D\u0435\u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 (chrome://, \u043C\u0430\u0433\u0430\u0437\u0438\u043D \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439, PDF).`,capture_failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,capture_timeout:`\u0418\u0441\u0442\u0435\u043A\u043B\u043E \u0432\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,oversize_unrecoverable:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u0430\u044F \u0434\u043B\u044F \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F, \u0434\u0430\u0436\u0435 \u0441 \u0443\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435\u043C \u0434\u0435\u0442\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438.`}},history:{loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`}},connection:{reconnecting:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E \u2014 \u043F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F\u2026`,restored:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u2014 \u0441\u043E\u0431\u044B\u0442\u0438\u044F \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u044B.`,failedTitle:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C`,failedHint:{"reload-page":`\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0434\u043B\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F.`,"check-network":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C.`}},history:{title:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0447\u0430\u0442\u043E\u0432`,close:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E`,newChat:`\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442`,search:`\u041F\u043E\u0438\u0441\u043A \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432\u2026`,searchLabel:`\u041F\u043E\u0438\u0441\u043A \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432`,emptyTitle:`\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432`,emptyText:`\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442.`,noResults:e=>`\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043F\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0443 \u00AB${e}\u00BB`,noResultsText:`\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0437\u0430\u043F\u0440\u043E\u0441`,errorTitle:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433\u0438`,errorText:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,loadingMore:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026`,untitled:e=>`\u0414\u0438\u0430\u043B\u043E\u0433 \u043E\u0442 ${e}`,delete:e=>`\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433 \u00AB${e}\u00BB`,deleteFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,reportTag:`\u041E\u0442\u0447\u0451\u0442`,groups:{today:`\u0421\u0435\u0433\u043E\u0434\u043D\u044F`,yesterday:`\u0412\u0447\u0435\u0440\u0430`,previous7Days:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 7 \u0434\u043D\u0435\u0439`,previous30Days:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 30 \u0434\u043D\u0435\u0439`,older:`\u0421\u0442\u0430\u0440\u044B\u0435`}},modelPicker:{selectModel:`\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043C\u043E\u0434\u0435\u043B\u0438\u2026`,currentlySelected:`\u0412\u044B\u0431\u0440\u0430\u043D\u0430`,footerNote:`\u0412\u044B\u0431\u043E\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.`,manageKeys:`\u041A\u043B\u044E\u0447\u0438`,upsell:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447 \u2014 \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise`,upgrade:`\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0442\u0430\u0440\u0438\u0444`,rejected:`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0435\u043C \u0442\u0430\u0440\u0438\u0444\u0435 \u2014 \u0432\u044B\u0431\u0440\u0430\u043D\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,disabledKeyInvalid:`\u041A\u043B\u044E\u0447 \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D \u2014 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`,disabledNoKey:`\u041B\u0438\u0447\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,disabledSuffixA11y:`\u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,tier:{fastest:`\u0421\u0430\u043C\u0430\u044F \u0431\u044B\u0441\u0442\u0440\u0430\u044F`,balanced:`\u0414\u043B\u044F \u043F\u043E\u0432\u0441\u0435\u0434\u043D\u0435\u0432\u043D\u044B\u0445 \u0437\u0430\u0434\u0430\u0447`,smartest:`\u0421\u0430\u043C\u0430\u044F \u0443\u043C\u043D\u0430\u044F`},byok:{personal:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447`,company:`\u041A\u043B\u044E\u0447 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`},byokHeader:{personal:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447`,company:`\u041A\u043B\u044E\u0447 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`}},confirmation:{regionLabel:`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,confirmAll:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u0441\u0435 (${e})`,confirm:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,queuePosition:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 {index} \u0438\u0437 {total}`,warningBadge:`\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F`,unrecognizedTool:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E`,launch:{subtitle:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418 \u00B7 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u00AB\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C\u00BB`,editTitle:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`,editSubtitle:`\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u0435 \u0438 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435`,briefLabel:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435`,briefEmpty:`\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u2014 \u0431\u0435\u0437 \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A \u043D\u0435 \u043D\u0430\u0447\u043D\u0451\u0442\u0441\u044F`,place:{thisBrowserPanel:`\u0412 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u043E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0444\u043E\u043D\u0435`,thisBrowserWeb:`\u0412 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u2014 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0435\u0433\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438`,runner:e=>`\u041D\u0430 \u0440\u0430\u043D\u043D\u0435\u0440\u0435 ${e}`,runnerUnread:`\u041D\u0430 \u0440\u0430\u043D\u043D\u0435\u0440\u0435`,runnerGone:`\u0420\u0430\u043D\u043D\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u2014 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u0433\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C, \u043D\u0430 \u0444\u0438\u0448\u043A\u0435 \u00AB\u0413\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C\u00BB`,none:`\u0411\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u2014 \u0442\u043E\u043B\u044C\u043A\u043E API-\u0437\u0430\u043F\u0440\u043E\u0441\u044B \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`},fromChip:`\u0441 \u0444\u0438\u0448\u043A\u0438`,switchLead:`\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0430`,siteLead:`\u0427\u0442\u043E \u043C\u043E\u0436\u043D\u043E \u0434\u0435\u043B\u0430\u0442\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435`,site:{observe:`\u0422\u043E\u043B\u044C\u043A\u043E \u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C`,main:`\u0412\u0441\u0451, \u043A\u0440\u043E\u043C\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F`,dangerous:`\u0412\u0441\u0451, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435`},projectLead:`\u0427\u0442\u043E \u043C\u043E\u0436\u043D\u043E \u043C\u0435\u043D\u044F\u0442\u044C \u0432 \u043F\u0440\u043E\u0435\u043A\u0442\u0435`,captureApi:`\u0417\u0430\u043F\u0438\u0441\u044B\u0432\u0430\u0442\u044C API-\u0437\u0430\u043F\u0440\u043E\u0441\u044B`,edit:`\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,cancel:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C`,launch:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,unreadable:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u043D\u043E\u0435 \u0437\u0430\u0434\u0430\u043D\u0438\u0435. \u0415\u0433\u043E \u043C\u043E\u0436\u043D\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C.`,scopeUnread:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u2014 \u0437\u0430\u043F\u0443\u0441\u043A \u043F\u043E\u0439\u0434\u0451\u0442 \u043F\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u043D\u043E\u0439`,busy:{kind:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`,stop:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,newConversation:`\u041D\u0430\u0447\u0430\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u0435`}},grant:{no:`\u041D\u0435\u0442, \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u043E\u0442\u0447\u0451\u0442`,yes:`\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A\u0435`}},runWait:{title:`\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0439`,status:{waiting:`\u0416\u0434\u0451\u043C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F`,fired:`\u0418\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u044B`,running:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u044E \u0440\u0430\u0437\u0431\u043E\u0440`,done:`\u0420\u0430\u0437\u0431\u043E\u0440 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D`,cancelled:`\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`},subject:{scenario_run:`\u041F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,agent_job:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u0430`,atlas_run:`\u041E\u0431\u0445\u043E\u0434 Atlas`,ai_run:`AI-\u043F\u0440\u043E\u0433\u043E\u043D`,workflow:`\u0420\u043E\u0439`},id:e=>`ID: ${e}`,stopWaiting:`\u041D\u0435 \u0436\u0434\u0430\u0442\u044C`,stopWaitingFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},questions:{pendingTitle:`\u041D\u0443\u0436\u043D\u043E \u0443\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,progress:`\u041E\u0442\u0432\u0435\u0447\u0435\u043D\u043E: {resolved} \u0438\u0437 {total}`,progressLabel:`\u0412\u043E\u043F\u0440\u043E\u0441\u044B`,progressSegmentAnswered:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u043E\u0442\u0432\u0435\u0447\u0435\u043D`,progressSegmentUnanswered:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u0431\u0435\u0437 \u043E\u0442\u0432\u0435\u0442\u0430`,progressSegmentSkipped:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D`,questionIndex:`\u0412\u043E\u043F\u0440\u043E\u0441 {index} \u0438\u0437 {total}`,previousQuestion:`\u041D\u0430\u0437\u0430\u0434`,nextQuestion:`\u0414\u0430\u043B\u0435\u0435`,showAllQuestions:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B`,oneQuestionAtATime:`\u041F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u0432\u043E\u043F\u0440\u043E\u0441\u0443`,recommended:`\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F`,customChoice:`\u0421\u0432\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442`,customAnswerLabel:`\u0421\u0432\u043E\u0439 \u043E\u0442\u0432\u0435\u0442`,customAnswerPlaceholder:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u2026`,textAnswerLabel:`\u041E\u0442\u0432\u0435\u0442`,textAnswerPlaceholder:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043E\u0442\u0432\u0435\u0442\u2026`,skipQuestion:`\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,restoreQuestion:`\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C`,validationSingle:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0434\u0438\u043D \u0432\u0430\u0440\u0438\u0430\u043D\u0442.`,validationMultiple:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u0438\u043D \u043F\u0443\u043D\u043A\u0442.`,validationText:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043E\u0442\u0432\u0435\u0442.`,cancelAll:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0451`,submitAnswers:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,sending:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430`,loading:`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0432\u043E\u043F\u0440\u043E\u0441\u043E\u0432`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,refresh:`\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C`,retryErrorBadge:`\u041D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E`,nonretryableBadge:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,nonretryableDescription:`\u0427\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C, \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u044D\u0442\u0443 \u0431\u0435\u0441\u0435\u0434\u0443 \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043D\u043D\u043E\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0435 (HTTPS).`,staleBadge:`\u0423\u0436\u0435 \u043E\u0442\u0432\u0435\u0447\u0435\u043D\u043E`,unauthorizedBadge:`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430`,unauthorizedDescription:`\u0412\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 \u0432\u0435\u0440\u043D\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u0440\u043E\u0435\u043A\u0442, \u0433\u0434\u0435 \u043D\u0430\u0447\u0430\u043B\u0441\u044F \u044D\u0442\u043E\u0442 \u0434\u0438\u0430\u043B\u043E\u0433.`,unavailableBadge:`\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,answeredTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,answeredBadge:`\u041E\u0442\u0432\u0435\u0447\u0435\u043D\u043E`,continuationPendingBadge:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,continuationRunningBadge:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u0435`,continuationFailedBadge:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C`,skippedBadge:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`,skippedAnswer:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`,cancelledTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,cancelledBadge:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,supersededTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,supersededBadge:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,answerSeparator:`, `,unavailableAnswer:`\u041E\u0442\u0432\u0435\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,arrived:e=>`\u041D\u043E\u0432\u044B\u0439 \u0432\u043E\u043F\u0440\u043E\u0441, \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430 \u2014 \u043D\u0430\u0434 \u043F\u043E\u043B\u0435\u043C \u0432\u0432\u043E\u0434\u0430: ${e}`},agentQuestions:{openRun:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D`,assumptionLabel:`\u041F\u043E\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435\u0442, \u0430\u0433\u0435\u043D\u0442 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442 \u0442\u0430\u043A`,decline:`\u041D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,viaAssistant:`\u041F\u0435\u0440\u0435\u0434\u0430\u043D\u043E \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u043E\u043C \u0441 \u0432\u0430\u0448\u0438\u0445 \u0441\u043B\u043E\u0432`,askerEnded:`\u0410\u0433\u0435\u043D\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B \u0440\u0430\u0431\u043E\u0442\u0443, \u043E\u0442\u0432\u0435\u0442 \u043D\u0435 \u043D\u0443\u0436\u0435\u043D`,leadWaits:`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442`,workersContinue:`\u0420\u0430\u0431\u043E\u0447\u0438\u0435 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u044E\u0442`,agentsIdle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442`},context:{report:{label:`\u041A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u043E\u0442\u0447\u0451\u0442\u0430`,title:e=>`\u041E\u0442\u0447\u0451\u0442: ${e}`,note:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0432\u0438\u0434\u0438\u0442 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442 \u0438 \u0431\u0435\u0440\u0451\u0442 \u0446\u0438\u0444\u0440\u044B \u0438\u0437 \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043D\u043D\u044B\u0445, \u0447\u0442\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430.`,nameUnavailable:`\u0438\u043C\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,entity:{scenario:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,page:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,feature:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0444\u0438\u0447\u0430`},view:{overview:`\u041E\u0431\u0437\u043E\u0440`,stability:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C`,"weak-spots":`\u0421\u043B\u0430\u0431\u044B\u0435 \u0437\u043E\u043D\u044B`,"bug-hotspots":`\u0413\u043E\u0440\u044F\u0447\u0438\u0435 \u0442\u043E\u0447\u043A\u0438`},window:{"7d":`7 \u0434\u043D\u0435\u0439`,"14d":`14 \u0434\u043D\u0435\u0439`,"30d":`30 \u0434\u043D\u0435\u0439`,"90d":`90 \u0434\u043D\u0435\u0439`},lastRuns:(e,t)=>`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 ${e} \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 (\u0434\u043E ${t} \u0434\u043D\u0435\u0439)`,status:{consistently_failing:`\u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442`,flaky:`flaky`,monitoring:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`,insufficient_history:`\u043C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438`,stable:`\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E`},prompts:{overviewWeakSpots:`\u041A\u0430\u043A\u0438\u0435 \u0441\u043B\u0430\u0431\u044B\u0435 \u043C\u0435\u0441\u0442\u0430 \u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430?`,overviewChanged:e=>`\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C \u0437\u0430 ${e}?`,overviewWhereToLook:`\u041A\u0443\u0434\u0430 \u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,stabilityWhyScenario:e=>`\u041F\u043E\u0447\u0435\u043C\u0443 \u00AB${e}\u00BB \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u0435\u043D?`,stabilityWhatToFix:`\u041A\u0430\u043A\u0438\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0447\u0438\u043D\u0438\u0442\u044C \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,stabilityCauses:`\u0420\u0430\u0437\u0431\u0435\u0439 \u043F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u043E \u043F\u0440\u0438\u0447\u0438\u043D\u0430\u043C`,weakSpotsWhatToCover:`\u0427\u0442\u043E \u043F\u043E\u043A\u0440\u044B\u0442\u044C \u0442\u0435\u0441\u0442\u0430\u043C\u0438 \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,weakSpotsWhyEntity:e=>`\u041F\u043E\u0447\u0435\u043C\u0443 \u00AB${e}\u00BB \u0432 \u0441\u043B\u0430\u0431\u044B\u0445 \u0437\u043E\u043D\u0430\u0445?`,bugHotspotsWhere:`\u0413\u0434\u0435 \u0441\u043A\u0430\u043F\u043B\u0438\u0432\u0430\u044E\u0442\u0441\u044F \u0431\u0430\u0433\u0438?`,bugHotspotsStale:`\u041A\u0430\u043A\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0441 \u0431\u0430\u0433\u0430\u043C\u0438 \u0434\u0430\u0432\u043D\u043E \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0438\u0441\u044C?`}}}},errors:Id,attachments:nd},Z=Ne(),Bd={ru:zd,en:ed},Vd=(0,L.createContext)(null);function Hd({locale:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Vd.Provider,{value:e,children:t})}function Q(){let e=(0,L.useContext)(Vd);if(e===null)throw Error(`useChatLocale: no <ChatLocaleProvider> above this chat component`);return e}function $(){return Bd[Q()]}var Ud=1e3,Wd=1e6;function Gd(e,t){return new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e)}function Kd(e,t,n){return e>=Wd?`${Gd(e/Wd,t)} ${n.mb}`:e>=Ud?`${Math.round(e/Ud)} ${n.kb}`:`${e} ${n.b}`}function qd(e,t,n){let r=Kd(e.byteSize,t,n.units);if(e.mediaType===`application/pdf`){if(e.pageCount===null)throw Error(`Attachment ${e.id}: an application/pdf without its page count`);return n.facts.pdf(e.pageCount,r)}if(Tn(e.mediaType)){if(e.image===null)throw Error(`Attachment ${e.id}: an ${e.mediaType} without its size`);return n.facts.image(e.image.width,e.image.height,r)}return n.facts.text(r)}function Jd(e){let t=e.lastIndexOf(`.`);return t<=0?{base:e,ext:``}:{base:e.slice(0,t),ext:e.slice(t)}}function Yd(e,t){let{store:n}=$d(),{id:r,mediaType:i}=e,a=(0,L.useSyncExternalStore)(n.subscribe,()=>n.get(r),()=>n.get(r)),o=(0,L.useCallback)(()=>n.load({id:r,mediaType:i}),[n,r,i]),s=a.status===`idle`;return(0,L.useEffect)(()=>{t&&s&&o()},[t,s,o]),{content:a,load:o}}var Xd=`button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])`;function Zd({images:e,index:t,onIndex:n,onClose:r}){let i=$().attachments,a=Q(),o=(0,L.useRef)(null),s=(0,L.useRef)(null),c=e[t];if(c===void 0)throw Error(`AttachmentViewer: no image at ${t} of ${e.length}`);let{content:l}=Yd(c,!0),u=e.length>1;(0,L.useEffect)(()=>{var e;(e=s.current)==null||e.focus({preventScroll:!0})},[]),(0,L.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),r())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]);let d=r=>n((t+r+e.length)%e.length);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{ref:o,className:`qa-ai-chat-viewer`,role:`dialog`,"aria-modal":`true`,"aria-label":i.viewer.label(c.fileName),"data-testid":`ai-chat-attachment-viewer`,onKeyDown:e=>{if(u&&e.key===`ArrowLeft`){e.preventDefault(),d(-1);return}if(u&&e.key===`ArrowRight`){e.preventDefault(),d(1);return}if(e.key!==`Tab`||o.current===null)return;let t=Array.from(o.current.querySelectorAll(Xd)),n=t[0],r=t[t.length-1];n!==void 0&&r!==void 0&&(e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus()))},children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-bar`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-title`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:c.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:qd(c,a,i)})]}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:i.viewer.openInTab,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,disabled:l.status!==`ready`,onClick:()=>{l.status===`ready`&&window.open(l.url,`_blank`,`noopener`)},children:/* @__PURE__ */ (0,Z.jsx)(fn,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:i.viewer.close,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:s,type:`button`,className:`qa-ai-chat-ib`,onClick:r,children:/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`})})})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-viewer-stage`,children:l.status===`ready`?/* @__PURE__ */ (0,Z.jsx)(`img`,{src:l.url,alt:c.fileName},c.id):l.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-viewer-failed`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(wr,{"aria-hidden":`true`}),i.viewer.failed]}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-viewer-loading`,role:`img`,"aria-busy":`true`,"aria-label":i.viewer.loading(c.fileName)})}),u&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-nav`,children:[/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:i.viewer.previous,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:()=>d(-1),children:/* @__PURE__ */ (0,Z.jsx)(pn,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-live":`polite`,children:i.viewer.position(t+1,e.length)}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:i.viewer.next,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:()=>d(1),children:/* @__PURE__ */ (0,Z.jsx)(fe,{"aria-hidden":`true`})})})]})]})}var Qd=(0,L.createContext)(null);function $d(){let e=(0,L.useContext)(Qd);if(e===null)throw Error(`useChatAttachments: no <ChatAttachmentsProvider> above this chat component`);return e}function ef({http:e,logger:t,conversationId:n,children:r}){let[i]=(0,L.useState)(()=>iu({http:e,logger:t})),[a,o]=(0,L.useState)(null),s=(0,L.useRef)(null);(0,L.useEffect)(()=>()=>i.clear(),[i,n]);let c=(0,L.useCallback)((e,t,r)=>{s.current=r,o({conversationId:n,images:e,index:t})},[n]),l=(0,L.useCallback)(()=>{o(null);let e=s.current;s.current=null,e!==null&&e.isConnected&&e.focus({preventScroll:!0})},[]),u=(0,L.useMemo)(()=>({store:i,openViewer:c}),[i,c]);return/* @__PURE__ */ (0,Z.jsxs)(Qd.Provider,{value:u,children:[r,a!==null&&a.conversationId===n&&/* @__PURE__ */ (0,Z.jsx)(Zd,{images:a.images,index:a.index,onIndex:e=>o({...a,index:e}),onClose:l})]})}function tf(e,t){let n=0;for(let r of e)if(r.attachments!==void 0)for(let e of r.attachments)vn(e,t.attachments).ok||(n+=1);return n}function nf({messages:e,model:t,onPickModel:n}){let r=$().attachments.conversation;if(t===null)return null;let i=tf(e,t);return i===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-files-warning`,role:`status`,"data-testid":`ai-chat-files-warning`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[r.text(t.name,i),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-files-warning-pick`,onClick:n,children:r.pick})]})]})}function rf(e,t){if(e===null)return null;for(let n of e.groups){let e=n.models.find(e=>e.id===t);if(e!==void 0)return e}return null}function af(e,t,n,r){let{reason:i}=r.unsent,a=e.factValue,o=e=>Kd(e,n,r.units),s=e=>Gd(e,n);if(e.fact===`context_window`)return i.contextWindow;if(a===null)return i.unknownSize;switch(e.fact){case`media_type`:throw Error(`factReason: media_type has no fact reason`);case`file_bytes`:return i.fileBytes(o(a));case`image_bytes`:return i.imageBytes(o(Math.floor(a*3/4)));case`request_bytes`:return i.requestBytes(o(a));case`files_bytes`:return i.filesBytes(o(a));case`image_edge`:return i.imageEdge(s(a));case`image_patches`:{let e=t===null||t.attachments===null?null:t.attachments.facts.imageMaxPatches;return e===null?i.unknownSize:i.imagePatches(s(Math.floor(a*e.patchPx**2/1e6)))}case`pdf_pages`:return i.pdfPages(s(a));case`images_count`:return i.imagesCount(s(a));case`many_images_edge`:return i.manyImagesEdge(s(a))}}function of(e){let{refusal:t,files:n,models:r,locale:i,copy:a,logger:o}=e;switch(t.errorCode){case Dn.notFound:return{sentence:a.unsent.notFound,resendable:!1};case Dn.alreadySent:return{sentence:a.unsent.alreadySent,resendable:!1};case Dn.unsupportedByModel:{let e=kn.safeParse(t.params);if(!e.success)return o.error(`chat send refusal: unsupported_by_model params failed validation`,{issues:e.error.issues.map(e=>e.message)}),null;let s=e.data,c=rf(r,s.modelId),l=c===null?null:c.name;if(s.fact!==`media_type`)return{sentence:a.unsent.unsupported(l,af(s,c,i,a)),resendable:!0};if(c!==null&&c.attachments===null)return{sentence:a.unsent.noFiles(l),resendable:!0};let u=new Set(s.attachmentIds),d=[...new Set(n.filter(e=>u.has(e.id)).map(e=>a.typeLabel[e.mediaType]))];return d.length===0?(o.error(`chat send refusal: unsupported_by_model names no file of the turn`,{attachmentIds:s.attachmentIds}),null):{sentence:a.unsent.types(l,d.join(`, `)),resendable:!0}}default:return null}}function sf(e){return{attachments:e.attachments,refusal:e.release===`manual`?e.refusal:null}}function cf(e){let{models:t,locale:n,copy:r,logger:i}=e;return e=>{let{attachments:a,refusal:o}=sf(e);return{label:a.length===0?null:r.unsent.files(a.length),refusal:o===null?null:of({refusal:o,files:a,models:t,locale:n,copy:r,logger:i})}}}function lf(){let e=null,t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map,r=()=>{for(let e of t)e()};return{subscribe(e){return t.add(e),()=>t.delete(e)},link:()=>e,setLink(t,n,i){if(i){if((e==null?void 0:e.toolCallId)===t&&e.from===n)return;e={toolCallId:t,from:n},r();return}(e==null?void 0:e.toolCallId)===t&&e.from===n&&(e=null,r())},registerRecord(e,t){return n.set(e,t),()=>{n.get(e)===t&&n.delete(e)}},reveal(e){let t=n.get(e);return t!==void 0&&(t.reveal(),!0)}}}function uf(e,t,n){return{linked:(0,L.useSyncExternalStore)(e.subscribe,()=>{let r=e.link();return r!==null&&r.toolCallId===t&&r.from!==n}),onLinkChange:(0,L.useCallback)(r=>e.setLink(t,n,r),[e,t,n])}}function df({chat:e}){let[t,n]=(0,L.useState)(0),r=(0,L.useCallback)(()=>n(e=>e+1),[]),[i]=(0,L.useState)(lf),[a,o]=(0,L.useState)(()=>/* @__PURE__ */ new Map),s=(0,L.useCallback)((e,t)=>(o(n=>new Map(n).set(e,t)),()=>{o(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}),[]),{answeredToolCallIds:c}=e;return{register:s,dockEntries:[...a].filter(([e])=>!c.includes(e)).map(([e,t])=>({toolCallId:e,...t})),tether:i,focusRequest:t,focusComposer:r}}function ff({chat:e,decisionProgress:t}){let{isStreaming:n,confirmationAnswerInFlight:r,permissionModeLane:i}=e;return(0,L.useCallback)(e=>Wi({isStreaming:n,confirmationAnswerInFlight:r,permissionModeLane:i},e)||t!==null,[n,r,i,t])}var pf=[`isUnassigned`,`hasUnboundElementSteps`,`hasUnlockedTextSteps`],mf={ru:{needsBinding:(e,t)=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043F\u0440\u0438\u0432\u044F\u0437\u043A\u0438: ${e}. \u0421\u043D\u0430\u0447\u0430\u043B\u0430 ${t}, \u043F\u043E\u0442\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A.`,causesSentence:e=>`${e}.`,causes:{isUnassigned:`\u043D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,hasUnboundElementSteps:`\u0435\u0441\u0442\u044C \u0448\u0430\u0433\u0438 \u0431\u0435\u0437 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430`,hasUnlockedTextSteps:`\u0435\u0441\u0442\u044C \u043D\u0435\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0435 \u0448\u0430\u0433\u0438`},actions:{make_auto:`\u00AB\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E\u00BB`,bind_elements:{hub:`\u00AB\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\u00BB`,web:`\u00AB\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\u00BB \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438 Progon`}},noSteps:`\u0412 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u043D\u0435\u0442 \u0448\u0430\u0433\u043E\u0432.`,aiUnavailableForTextSteps:`\u0418\u0418 \u043D\u0435\u0442, \u0430 \u0432 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0435\u0441\u0442\u044C \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0435 \u0448\u0430\u0433\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043E\u043D \u043D\u0443\u0436\u0435\u043D.`,unread:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.`,noReadyScenarios:`\u0421\u0440\u0435\u0434\u0438 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432 \u043D\u0435\u0442 \u0433\u043E\u0442\u043E\u0432\u044B\u0445 \u043A \u0437\u0430\u043F\u0443\u0441\u043A\u0443 \u0432 \u00AB\u0410\u0432\u0442\u043E\u00BB.`},en:{needsBinding:(e,t)=>`This scenario needs binding: ${e}. First use ${t}, then run it.`,causesSentence:e=>`${e}.`,causes:{isUnassigned:`no page is assigned`,hasUnboundElementSteps:`some steps have no element`,hasUnlockedTextSteps:`some text steps are not locked`},actions:{make_auto:`"Make Auto"`,bind_elements:{hub:`"Bind elements"`,web:`"Bind elements" in the Progon extension`}},noSteps:`This scenario has no steps.`,aiUnavailableForTextSteps:`AI is unavailable, and this scenario has text steps that need it.`,unread:`This scenario cannot run automatically.`,noReadyScenarios:`None of the selected scenarios is ready to run in Auto.`}};function hf(e,t,n){let r=mf[n];switch(e.status){case`needs_binding`:return r.needsBinding(yf(e.causes,n),xf(e.offeredActions.map(e=>bf(r,e,t)),n,`disjunction`,`a needs_binding refusal offers no action, but offeredActions is .min(1) on both schemas`));case`no_steps`:return r.noSteps;case`ai_unavailable_for_text_steps`:return r.aiUnavailableForTextSteps}}function gf(e,t){return mf[t].causesSentence(Sf(yf(e,t)))}function _f(e){return mf[e].unread}function vf(e){return mf[e].noReadyScenarios}function yf(e,t){let n=mf[t];return xf(pf.filter(t=>e[t]).map(e=>n.causes[e]),t,`conjunction`,`a needs_binding refusal has no true cause, but needsMapping is the OR of exactly these three`)}function bf(e,t,n){let r=e.actions[t];return typeof r==`string`?r:r[n]}function xf(e,t,n,r){if(e.length===0)throw Error(`scenario-launch-refusal-text: ${r}`);return new Intl.ListFormat(t,{style:`long`,type:n}).format(e)}function Sf(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Cf(){let{t:e,i18n:t}=s(),n=t.resolvedLanguage;return(0,L.useMemo)(()=>{let r=e,i=te.find(e=>e===n);if(i===void 0)throw Error(`i18n resolved an unsupported UI locale: ${String(n)}`);return{t:r,has:e=>t.exists(e),locale:i}},[t,n,e])}var wf=`scenarios.not_auto_runnable`;function Tf(e,t,n){if(t!==wf)return null;let r=St.safeParse(n==null?void 0:n.decision);return r.success?hf(r.data,`web`,e):_f(e)}function Ef(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:null}function Df(e,t){if(!(t instanceof We)||t.errorCode!==`remote_runs.text_steps_unsupported`)return null;let n=t.params;if(!n)return null;let r=Ef(n.unconvertedTextStepCount),i=Ef(n.lockedTextStepCount);return r===null||i===null?null:r>0?e(`apiErrors.remote_runs.text_steps_unsupported.unconverted`):i>0?e(`apiErrors.remote_runs.text_steps_unsupported.locked`):null}function Of(e,t,n){let i=Tf(t,n.error_code,n.params);if(i!==null)return i;let a=`apiErrors.${n.error_code}`;if(e.has(a)){let t=[],r=e.t(a,{...n.params,missingInterpolationHandler:(e,n)=>(t.push(n[0]),``)});if(t.length===0)return r}return r(n.message)}function kf(e,t,n,r){if(t instanceof We){let n=Df(e.t,t);if(n!==null)return n;let r=Tf(e.locale,t.errorCode,t.params);if(r!==null)return r}return v(e,t,n,r)}function Af(e,t,n){return{type:`text`,inputMode:`url`,autoComplete:`off`,spellCheck:!1,value:e,onValueChange:t,disabled:n,"data-testid":`launch-address-input`}}function jf({state:e,disabled:t}){let{t:n}=Cf(),r=e.scope===void 0;return/* @__PURE__ */ (0,Z.jsx)(Me,{...Af(e.value,e.setValue,t||r),label:n(`launchAddress.crawl.label`),placeholder:n(`launchAddress.crawl.placeholder`),...r?{hint:n(`launchAddress.crawl.loadingHint`)}:{}})}function Mf(e,t,r,i){let a=n(t);return r.kind===`create`?e.targets.create(a,{applicationId:o(r.pair.applicationId),environmentId:r.pair.environmentId,baseUrl:i}):e.targets.update(a,r.target.id,{baseUrl:i,expectedUpdatedAt:r.target.updatedAt})}function Nf(e,t){return e(`launchAddress.pair`,{application:t.applicationName===null?e(`launchAddress.applicationGone`):t.applicationName,environment:t.environmentName===null?e(`launchAddress.environmentGone`):t.environmentName})}function Pf({projectId:e,cell:t,children:r,testId:i}){return/* @__PURE__ */ (0,Z.jsx)(m,{target:{kind:`environment-addresses`,projectRef:n(e),...t===void 0?{}:{cell:{applicationId:t.applicationId,environmentId:t.environmentId}}},placement:`same-tab`,className:`rounded-(--radius-sm) font-medium text-fg-link underline-offset-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/40`,"data-testid":i,children:r})}function Ff({projectId:e}){let{t}=s();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,className:`flex items-start gap-3 rounded-(--radius-md) border border-[color:var(--color-chip-primary-border)] bg-(--color-bg-primary-tint-15) px-3 py-2.5`,"data-testid":`launch-address-not-configured`,children:[/* @__PURE__ */ (0,Z.jsx)(oe,{size:16,className:`mt-0.5 shrink-0 text-fg-link`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 text-[length:var(--text-sm)]`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`font-medium text-fg-primary`,children:t(`launchAddress.notConfigured.title`)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`text-fg-secondary`,children:[t(`launchAddress.notConfigured.body`),` `,/* @__PURE__ */ (0,Z.jsx)(Pf,{projectId:e,testId:`launch-address-not-configured-link`,children:t(`launchAddress.openAddresses`)})]})]})]})}function If({checked:e,onChange:t,pairLabel:n,plan:r,disabled:i}){let{t:a}=s(),o=(0,L.useId)(),c=e&&r.state===`ok`;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,"data-testid":`launch-address-save`,children:[/* @__PURE__ */ (0,Z.jsx)(Lt,{checked:e,onChange:t,disabled:i,label:a(`launchAddress.saveAs`,{pair:n}),describedBy:c?o:void 0}),c&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{id:o,className:`flex items-center gap-1.5 pl-6 text-[length:var(--text-xs)] text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(Ue,{size:12,className:`shrink-0 text-fg-success`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:/* @__PURE__ */ (0,Z.jsx)(d,{i18nKey:`launchAddress.willSaveAs`,values:{baseUrl:r.baseUrl},components:{mono:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`font-mono text-fg-primary`})}})})]})]})}function Lf(e){let t=Ee(),r=(0,L.useCallback)(async r=>{let i=n(e),[a,o]=await Promise.all([t.applications.byProject(i,{signal:r}),t.targets.listAll(i,{signal:r})]);return{applications:a,targets:o}},[t,e]);return a({fetcher:r,deps:[e]})}function Rf(e,t,n,r){let i=e.applications.find(e=>e.id===n),a=t.find(e=>e.id===r);return{applicationId:n,environmentId:r,applicationName:i===void 0?null:i.name,environmentName:a===void 0?null:a.name}}function zf(e,t,n){if(n.kind===`cell_missing`)return{kind:`create`,pair:Rf(e,t,n.applicationId,n.environmentId)};if(n.kind===`address_required`){let r=e.targets.find(e=>e.id===n.targetId);return r===void 0?null:{kind:`patch`,pair:Rf(e,t,r.applicationId,r.environmentId),target:r}}return null}function Bf({state:e,projectId:t,catalog:n,namesLoading:r,environments:a,disabled:o}){let s=Cf(),{t:c}=s,l=Af(e.value,e.setValue,o);if(e.source===`inherited`)return/* @__PURE__ */ (0,Z.jsx)(Me,{...l,label:c(`runEntryUrl.label`),error:e.missingRepeatAddress?c(`runEntryUrl.errors.repeatCleared`):void 0,hint:c(`runEntryUrl.hintRepeat`)});if(e.refusal!==null&&e.refusal.kind===`not_configured`)return/* @__PURE__ */ (0,Z.jsx)(Ff,{projectId:t});if(e.isLoading||r)return/* @__PURE__ */ (0,Z.jsx)(i,{className:`h-10 w-full`,label:c(`common.loading`)});let u=e.refusedCell;if(u!==null){let n=Nf(c,u.pair);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`run-entry-url-missing`,children:[/* @__PURE__ */ (0,Z.jsx)(Me,{...l,label:c(`runEntryUrl.labelFor`,{pair:n}),placeholder:c(`runEntryUrl.placeholder`),error:Gf(s,e),hint:Wf(c,u)}),/* @__PURE__ */ (0,Z.jsx)(If,{checked:e.saveChecked,onChange:e.setSaveChecked,pairLabel:n,plan:e.savePlan,disabled:o}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`text-[length:var(--text-xs)] text-fg-muted`,children:/* @__PURE__ */ (0,Z.jsx)(Pf,{projectId:t,cell:{applicationId:u.pair.applicationId,environmentId:u.pair.environmentId},testId:`run-entry-url-open-cell`,children:c(`launchAddress.openCell`,{pair:n})})})]})}let d=e.defaultApplicationNote;if(d!==null)return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-col gap-2`,"data-testid":`run-entry-url-default-missing`,children:/* @__PURE__ */ (0,Z.jsx)(Me,{...l,label:c(`runEntryUrl.labelFor`,{pair:Nf(c,d.pair)}),placeholder:c(`runEntryUrl.placeholder`),hint:Uf(c,d)})});let f=Hf(e,n,a);return/* @__PURE__ */ (0,Z.jsx)(Me,{...l,label:f===null?c(`runEntryUrl.label`):c(`runEntryUrl.labelFor`,{pair:Nf(c,f)}),placeholder:c(`runEntryUrl.placeholder`),error:e.read.status===`error`?kf(s,e.read.error,`runEntryUrl.errors.load`):void 0,hint:Vf(c,e,f)})}function Vf(e,t,n){return t.source===`scenario`&&t.read.status===`resolved`?e(`runEntryUrl.hintScenario`):n===null?t.refusal===null?e(`runEntryUrl.hintUnnamed`):e(t.refusal.kind===`cell_missing`?`apiErrors.targets.cell_missing`:`apiErrors.targets.address_required`):e(`runEntryUrl.hintBatch`,{application:n.applicationName===null?e(`launchAddress.applicationGone`):n.applicationName})}function Hf(e,t,n){if(e.read.status!==`resolved`||t===void 0||n===null)return null;let{applicationId:r,environmentId:i}=e.read.address;return Rf(t,n,r,i)}function Uf(e,t){let n=t.pair.applicationName===null?e(`launchAddress.applicationGone`):t.pair.applicationName,r=t.pair.environmentName===null?e(`launchAddress.environmentGone`):t.pair.environmentName;return t.kind===`patch`&&t.target.hostPattern!==null?e(`launchAddress.defaultPatternOnly`,{application:n,environment:r,pattern:t.target.hostPattern}):e(`launchAddress.defaultMissing`,{application:n,environment:r})}function Wf(e,t){let n=t.pair.applicationName===null?e(`launchAddress.applicationGone`):t.pair.applicationName,r=t.pair.environmentName===null?e(`launchAddress.environmentGone`):t.pair.environmentName;return t.kind===`create`||t.target.hostPattern===null?e(`launchAddress.cellMissing`,{application:n,environment:r}):e(`launchAddress.addressRequired`,{application:n,environment:r,pattern:t.target.hostPattern})}function Gf(e,t){let{t:n}=e;if(t.saveError!==null)return kf(e,t.saveError,`launchAddress.errors.save`);if(t.saveChecked&&t.savePlan.state===`invalid`)return n(`environments.addresses.errors.baseUrl.${t.savePlan.reason}`)}var Kf={projectDefault:`agentRunDispatch.environmentHint`,repeat:`makeAutoDispatch.repeat.environmentHint`,concrete:`launchAddress.environment.variablesHint`},qf={projectDefault:`agentRunDispatch.errors.environmentsLoad`,repeat:`agentRunDispatch.errors.environmentsLoad`,concrete:`launchAddress.environment.loadError`};function Jf({state:e,disabled:t,onAddressEdit:n}){let r=Cf(),{t:i}=r,{environment:a,catalog:o,address:s,projectId:c}=e,l=e=>{s.setValue(e),n!==void 0&&n()},u=s.kind===`entryUrl`&&(s.source===`inherited`||s.refusal!==null&&s.refusal.kind===`not_configured`),d=a.loadError!==null;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Yf,{environment:a,disabled:t,loadErrorTitle:a.loadError===null?null:kf(r,a.loadError,qf[a.mode])}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o.error!==null&&!u&&/* @__PURE__ */ (0,Z.jsx)(He,{tone:`error`,title:kf(r,o.error,`launchAddress.errors.catalogLoad`),actions:/* @__PURE__ */ (0,Z.jsx)(ce,{onClick:o.reload,children:i(`common.retry`)})}),s.kind===`crawlStart`&&s.scopeError!==null&&/* @__PURE__ */ (0,Z.jsx)(He,{tone:`error`,title:kf(r,s.scopeError,`launchAddress.crawl.scopeLoad`),actions:/* @__PURE__ */ (0,Z.jsx)(ce,{onClick:s.reloadScope,children:i(`common.retry`)})}),s.kind===`crawlStart`?/* @__PURE__ */ (0,Z.jsx)(jf,{state:{...s,setValue:l},disabled:t}):/* @__PURE__ */ (0,Z.jsx)(Bf,{state:{...s,setValue:l},projectId:c,catalog:o.data,namesLoading:o.data===void 0&&o.error===null||a.environments===void 0&&!d,environments:a.environments===void 0?null:a.environments,disabled:t})]})]})}function Yf({environment:e,disabled:t,loadErrorTitle:n}){let{t:r}=Cf();return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n!==null&&/* @__PURE__ */ (0,Z.jsx)(He,{tone:`error`,title:n,actions:/* @__PURE__ */ (0,Z.jsx)(ce,{onClick:e.reload,children:r(`common.retry`)})}),e.shown&&/* @__PURE__ */ (0,Z.jsx)(Le,{label:r(`agentRunDispatch.environmentLabel`),options:e.options,value:e.value,onValueChange:e.setValue,disabled:t,placeholder:e.mode===`repeat`?r(`makeAutoDispatch.repeat.environmentChoosePlaceholder`):void 0,error:e.noticeKey===null?void 0:r(e.noticeKey),hint:r(Kf[e.mode]),"data-testid":`launch-environment`})]})}var Xf=`relative inline-flex h-8 max-w-full min-w-0 items-center gap-2 rounded-md border border-solid border-stroke bg-surface-secondary pr-2 pl-3 text-xs text-fg-primary transition-[border-color,background-color,box-shadow] duration-(--motion-short) ease-(--ease-out) enabled:hover:border-stroke-hover enabled:hover:bg-surface-hover aria-expanded:border-stroke-focus aria-expanded:shadow-(--glow-primary-sm) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:text-fg-muted`;function Zf(){return/* @__PURE__ */ (0,Z.jsx)(ee,{"aria-hidden":`true`,className:`size-3! text-fg-muted`})}function Qf({icon:e,title:t,hint:n,checked:r,disabled:i=!1,onSelect:a,testId:o}){let s=(0,L.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"aria-disabled":i||void 0,"aria-describedby":n===void 0?void 0:s,onClick:i?void 0:a,"data-testid":o,className:j(`flex w-full items-center gap-3 rounded-md border-0 bg-transparent px-3 py-2 text-left text-xs text-fg-primary`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-stroke-focus`,i?`cursor-not-allowed opacity-(--opacity-inert)`:`cursor-pointer hover:bg-surface-hover-layer focus-visible:bg-surface-hover-layer`,r&&`bg-(--color-bg-primary-tint)`),children:[/* @__PURE__ */ (0,Z.jsx)(e,{"aria-hidden":`true`,className:`size-4 shrink-0 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`block truncate`,children:t}),n!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`small`,{id:s,className:`block text-caption text-fg-muted`,children:n})]}),r&&/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`,className:`size-4 shrink-0 text-(--color-primary-text)`})]})}function $f({children:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-3 pt-2 pb-1 text-caption text-fg-muted`,children:e})}function ep(){return/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`my-1 h-px bg-stroke-light`})}function tp({children:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-fg-muted`,children:e})}function np(e){try{return new URL(e).host}catch{return e}}function rp(e,t){try{return new URL(e).href===new URL(t).href}catch{return!1}}function ip(e,t){if(t===null)return null;let n=e.find(e=>e.value===t);if(n===void 0)throw Error(`Environment ${t} is not among the picker's options`);return n.label}function ap(e,t,n){let r=[];for(let i of e.applications)for(let a of t){let o=e.targets.find(e=>e.applicationId===i.id&&e.environmentId===a.id);if(o===void 0||o.baseUrl===null)continue;let s=Rf(e,t,i.id,a.id);r.push({targetId:o.id,environmentId:a.id,application:s.applicationName===null?n:s.applicationName,environment:a.name,url:o.baseUrl})}return r}function op({state:e}){let{t}=s(),[n,r]=(0,L.useState)(`closed`),{environment:i,address:a,catalog:o}=e.address,c=ip(i.options,i.value),l=a.value.trim()===``,u=o.data===void 0||i.environments===void 0?null:ap(o.data,i.environments,t(`launchAddress.applicationGone`)),d=u===null||l?void 0:u.find(e=>e.environmentId===i.value&&rp(e.url,a.value)),f=i.loadError!==null||a.scopeError!==null?t(`launchAddress.environment.loadError`):i.environments===void 0||a.block===`unread`?t(`taskForm.address.loading`):d===void 0?c===null?np(a.value):l?t(`taskForm.address.missing`,{environment:c}):t(`taskForm.address.pair`,{environment:c,host:np(a.value)}):t(`taskForm.address.cell`,{application:d.application,environment:d.environment}),p=e=>{i.setValue(e.environmentId),a.setValueFor(e.environmentId,e.url),r(`closed`)};return/* @__PURE__ */ (0,Z.jsx)(Gt,{side:`top`,collisionAvoidance:Wt,title:t(n===`custom`?`taskForm.address.panelLabel`:`taskForm.address.menuLabel`),open:n!==`closed`,onOpenChange:e=>r(e?`menu`:`closed`),trapFocus:!0,className:n===`custom`?`w-[420px] max-w-[calc(100vw-32px)] gap-3`:`w-[340px] max-w-[calc(100vw-32px)] p-1`,"data-testid":n===`custom`?`task-form-address-panel`:`task-form-address-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:Xf,"aria-label":t(`taskForm.address.label`,{address:f}),disabled:e.held,"data-testid":`task-form-address`,children:[/* @__PURE__ */ (0,Z.jsx)(oe,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:f}),/* @__PURE__ */ (0,Z.jsx)(Zf,{})]}),children:n===`custom`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-col gap-3`,children:/* @__PURE__ */ (0,Z.jsx)(Jf,{state:e.address,disabled:e.held})}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":t(`taskForm.address.menuLabel`),className:`flex flex-col`,children:[o.error!==null||i.loadError!==null?/* @__PURE__ */ (0,Z.jsxs)(tp,{children:[t(`launchAddress.environment.loadError`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:()=>{o.error!==null&&o.reload(),i.loadError!==null&&i.reload()},className:`cursor-pointer border-0 bg-transparent p-0 text-xs text-fg-link hover:underline`,children:t(`taskForm.scope.retry`)})]}):u===null?/* @__PURE__ */ (0,Z.jsx)(tp,{children:t(`taskForm.address.loading`)}):u.map(e=>/* @__PURE__ */ (0,Z.jsx)(Qf,{icon:oe,title:t(`taskForm.address.cell`,{application:e.application,environment:e.environment}),hint:np(e.url),checked:(d==null?void 0:d.targetId)===e.targetId,onSelect:()=>p(e),testId:`task-form-address-cell-${e.targetId}`},e.targetId)),/* @__PURE__ */ (0,Z.jsx)(ep,{}),/* @__PURE__ */ (0,Z.jsx)(Qf,{icon:A,title:t(`taskForm.address.custom`),checked:!1,onSelect:()=>r(`custom`),testId:`task-form-address-custom`})]})})}function sp({value:e,onValueChange:t,clearLabel:n,count:r,look:i=`field`,size:a=`md`,className:o,ref:s,...c}){let l=(0,L.useRef)(null),u=e!==``,d=_e();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:j(i===`quiet`?Ie:ae(`default`,!1,d,a,`search`),o),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:ne,children:/* @__PURE__ */ (0,Z.jsx)(De,{"aria-hidden":`true`})}),/* @__PURE__ */ (0,Z.jsx)(`input`,{ref:e=>{l.current=e,typeof s==`function`?s(e):s&&(s.current=e)},type:`search`,value:e,onChange:e=>t(e.target.value),className:j(ke,`[&::-webkit-search-cancel-button]:appearance-none`),...c}),u&&r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-fg-muted`,children:r}),u&&/* @__PURE__ */ (0,Z.jsx)(h,{size:`sm`,className:`-mr-1.5`,"aria-label":n,icon:/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`}),onClick:()=>{var e;t(``),(e=l.current)==null||e.focus()}})]})}var cp={kind:`project`};function lp(e){switch(e.kind){case`project`:return{kind:`project`};case`scenarios`:return{kind:`scenarios`,scenarioIds:[...e.scenarioIds]};case`test_run`:return{kind:`test_run`,testRunId:e.testRunId};case`test_plan`:return{kind:`test_plan`,testPlanId:e.testPlanId}}}function up(e){let[t,...n]=e;return t===void 0?null:{kind:`scenarios`,scenarioIds:[t.id,...n.map(e=>e.id)],firstName:t.name}}function dp(e,t){let n=e.resultsWriter;return n===null?{kind:`nobody`}:n.userId===t?{kind:`mine`,relation:e.testPlanId===null?`free`:`plan`}:{kind:`other`,writer:n.userDisplayName===null?n.userEmail:n.userDisplayName}}function fp(e,t){return e.data===void 0?e.error===null?{status:`loading`}:{status:`failed`,retry:t}:{status:`ready`,items:e.data.items,total:e.data.total}}function pp(e,t,n){let r=Ee(),i=(0,L.useDeferredValue)(t.trim()),o=(0,L.useCallback)(async t=>{let n=await r.testRuns.listUnified({projectId:e,launchKind:`test_run`,status:`in_progress`,limit:50,offset:0,...i===``?{}:{search:i}},{signal:t});return{items:n.items.filter(e=>e.kind===`run`),total:n.total}},[r,e,i]),s=a({fetcher:o,deps:[e,i],enabled:n}),c=(0,L.useCallback)(async t=>{let n=await Kn(t=>r.assignedPlans.list(e,{state:`unfinished`,...t}),t,{pageSize:500,route:`GET /test-plans/project/:id/assigned-to-me`});return{items:n,total:n.length}},[r,e]),l=a({fetcher:c,deps:[e],enabled:n});return{runs:fp(s,s.reload),plans:fp(l,l.reload)}}var mp={project:Rt,scenarios:kr,test_run:mr,test_plan:Zt};function hp({state:e,viewerId:t,scenarioPicker:n}){let{t:r}=s(),[i,a]=(0,L.useState)(!1),[o,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(null),{scope:d,scopeRequest:f}=e,p=f===`scenarios`&&n!==null,m=i||f!==null&&!p,h=o||p,g=()=>{a(!1),e.clearScopeRequest()},_=()=>{c(!1),e.clearScopeRequest()},v=bp(d,r),y=mp[d.kind];return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Gt,{side:`top`,collisionAvoidance:Wt,title:r(`taskForm.scope.menuLabel`),description:f===null?void 0:r(`taskForm.scope.suggested`),open:m,onOpenChange:e=>{if(!e){g();return}h&&_(),a(!0)},className:`w-[380px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scope-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:u,type:`button`,className:j(Xf,e.scopeSuggested&&`border-(--color-border-primary-tint-55)! bg-(--color-bg-primary-tint)! animate-(--animation-scope-suggest) motion-reduce:animate-none`),"aria-label":r(`taskForm.scope.label`,{scope:v.text}),disabled:e.held,"data-testid":`task-form-scope`,children:[/* @__PURE__ */ (0,Z.jsx)(y,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:v.text}),v.detail!==null&&/* @__PURE__ */ (0,Z.jsx)(`em`,{className:`truncate text-fg-muted not-italic`,children:v.detail}),/* @__PURE__ */ (0,Z.jsx)(Zf,{})]}),children:m&&/* @__PURE__ */ (0,Z.jsx)(gp,{state:e,viewerId:t,offerScenarios:n!==null,onPicked:g,onScenarios:()=>{g(),c(!0)}})}),n!==null&&l!==null&&/* @__PURE__ */ (0,Z.jsx)(Gt,{anchor:l,open:h,onOpenChange:e=>{e||_()},side:`top`,collisionAvoidance:Wt,title:r(`taskForm.scope.scenariosListLabel`),titleVisible:!1,className:`w-[400px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scenario-list`,children:h&&n({onPick:t=>{let n=up(t);n!==null&&e.setScope(n),_()}})})]})}function gp({state:e,viewerId:t,offerScenarios:n,onPicked:r,onScenarios:i}){let{t:a}=s(),[o,c]=(0,L.useState)(``),l=pp(e.projectId,o,!0),{scope:u}=e,d=t=>{e.setScope(t),r()};return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":a(`taskForm.scope.menuLabel`),className:`flex flex-col`,children:[/* @__PURE__ */ (0,Z.jsx)(Qf,{icon:Rt,title:a(`taskForm.scope.project`),checked:u.kind===`project`,onSelect:()=>d({kind:`project`}),testId:`task-form-scope-project`}),n&&/* @__PURE__ */ (0,Z.jsx)(Qf,{icon:kr,title:a(`taskForm.scope.scenariosPick`),hint:a(`taskForm.scope.scenariosPickHint`),checked:u.kind===`scenarios`,onSelect:i,testId:`task-form-scope-scenarios`}),/* @__PURE__ */ (0,Z.jsx)(ep,{}),/* @__PURE__ */ (0,Z.jsx)($f,{children:a(`taskForm.scope.runsHeader`)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-2 pb-1`,children:/* @__PURE__ */ (0,Z.jsx)(sp,{value:o,onValueChange:c,"aria-label":a(`taskForm.scope.runsSearch`),placeholder:a(`taskForm.scope.runsSearch`),clearLabel:a(`taskForm.scope.runsSearchClear`),look:`quiet`})}),/* @__PURE__ */ (0,Z.jsx)(_p,{list:l.runs,empty:a(`taskForm.scope.runsEmpty`),render:e=>{let n=dp(e,t),r=vp(e);return/* @__PURE__ */ (0,Z.jsx)(Qf,{icon:n.kind===`mine`?mr:zt,title:yp(r,a),hint:n.kind===`mine`?n.relation===`free`?a(`taskForm.scope.runMine`):a(`taskForm.scope.runAssigned`):n.kind===`other`?a(`taskForm.scope.runForbidden`,{name:n.writer}):a(`taskForm.scope.runForbiddenNobody`),disabled:n.kind!==`mine`,checked:u.kind===`test_run`&&u.testRunId===e.id,onSelect:()=>d({kind:`test_run`,testRunId:e.id,run:r}),testId:`task-form-scope-run-${e.id}`},e.id)}}),/* @__PURE__ */ (0,Z.jsx)(ep,{}),/* @__PURE__ */ (0,Z.jsx)($f,{children:a(`taskForm.scope.plansHeader`)}),/* @__PURE__ */ (0,Z.jsx)(_p,{list:l.plans,empty:a(`taskForm.scope.plansEmpty`),render:e=>/* @__PURE__ */ (0,Z.jsx)(Qf,{icon:Zt,title:e.planName,hint:a(`taskForm.scope.planHint`),checked:u.kind===`test_plan`&&u.testPlanId===e.planId,onSelect:()=>d({kind:`test_plan`,testPlanId:e.planId,planName:e.planName}),testId:`task-form-scope-plan-${e.planId}`},e.planId)})]})}function _p({list:e,empty:t,render:n}){let{t:r}=s();if(e.status===`loading`)return/* @__PURE__ */ (0,Z.jsx)(tp,{children:r(`taskForm.scope.loading`)});if(e.status===`failed`)return/* @__PURE__ */ (0,Z.jsxs)(tp,{children:[r(`taskForm.scope.loadError`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:e.retry,className:`cursor-pointer border-0 bg-transparent p-0 text-xs text-fg-link hover:underline`,children:r(`taskForm.scope.retry`)})]});if(e.items.length===0)return/* @__PURE__ */ (0,Z.jsx)(tp,{children:t});let i=e.total-e.items.length;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex max-h-56 flex-col overflow-y-auto`,children:[e.items.map(n),i>0&&/* @__PURE__ */ (0,Z.jsx)(tp,{children:r(`taskForm.scope.more`,{count:i})})]})}function vp(e){return{number:e.number,name:e.name}}function yp(e,t){return`${t(`taskForm.scope.runNumber`,{number:String(e.number).padStart(3,`0`)})} \u00B7 ${e.name===null?t(`taskForm.scope.runUntitled`):e.name}`}function bp(e,t){switch(e.kind){case`project`:return{text:t(`taskForm.scope.project`),detail:null};case`scenarios`:{let n=e.scenarioIds.length;return{text:t(`taskForm.scope.scenarios`,{count:n}),detail:n===1?t(`taskForm.scope.scenariosFirst`,{name:e.firstName}):t(`taskForm.scope.scenariosMore`,{name:e.firstName,count:n-1})}}case`test_run`:return{text:t(`taskForm.scope.testRun`,{name:yp(e.run,t)}),detail:null};case`test_plan`:return{text:t(`taskForm.scope.testPlan`,{name:e.planName}),detail:null}}}function xp(e){let[t,n]=(0,L.useState)({key:e,value:null,save:null}),[r,i]=(0,L.useState)(null),a=t.key===e?t:{key:e,value:null,save:null},o=t=>{i(null),n(n=>({...n.key===e?n:{key:e,value:null,save:null},...t}))};return{value:a.value,save:a.save,setValue:e=>o({value:e}),setValueFor:(e,t)=>{i(null),n({key:e,value:t,save:null})},setSave:e=>o({save:e}),reset:()=>n({key:e,value:null,save:null}),saveError:r,setSaveError:i}}function Sp({projectId:e,environment:t,active:r,opening:i}){let o=Ee(),s=t===null?null:t.environmentId,c=s===null?``:s,l=(0,L.useCallback)(async t=>{let r=s===null?{}:{environmentId:s},i=await o.projects.crawlScope(n(e),r,{signal:t});return{key:c,scope:i}},[o,e,s,c]),{data:u,error:d,reload:f}=a({fetcher:l,deps:[e,c],enabled:r&&t!==null}),p=u===void 0||u.key!==c?void 0:u.scope,m=xp(c),[h,g]=(0,L.useState)(i);return h!==null&&r&&t!==null&&(g(null),m.setValueFor(h.environmentId===null?c:h.environmentId,h.value)),{scope:p,scopeError:d,reloadScope:f,value:m.value===null?Cp(p):m.value,setValue:m.setValue,setValueFor:(e,t)=>m.setValueFor(e===null?``:e,t),block:p===void 0?`unread`:null}}function Cp(e){return e===void 0?``:e.startUrl.state===`resolved`?e.startUrl.url:``}function wp(e){let t=e.trim();if(t===``)return{state:`empty`};let n=t.includes(`://`)?t:`https://${t}`,r=l(n);if(!r.ok)return{state:`invalid`,reason:r.reason};let i=Xn(r.url.origin);if(!i.ok)return{state:`invalid`,reason:i.reason};let a=r.url.href,o=a===`${r.url.origin}/`;return{state:`ok`,baseUrl:i.baseUrl,launchUrl:o?void 0:a,href:a}}var Tp=`targets.not_configured`,Ep=`targets.cell_missing`,Dp=`targets.address_required`;function Op(e){return e===Tp||e===Ep||e===Dp}function kp(e,t,n){if(t===Tp)return{kind:`not_configured`};if(t===Ep){let t=n==null?void 0:n.applicationId,r=n==null?void 0:n.environmentId;return typeof t==`string`&&typeof r==`string`?{kind:`cell_missing`,applicationId:t,environmentId:r}:(e.error(`targets.cell_missing arrived without its application \u00D7 environment pair`,{params:n}),null)}if(t===Dp){let t=n==null?void 0:n.targetId;return typeof t==`string`?{kind:`address_required`,targetId:t}:(e.error(`targets.address_required arrived without its targetId`,{params:n}),null)}return null}function Ap(e,t){return t instanceof We?kp(e,t.errorCode,t.params):null}function jp({projectId:e,environment:t,source:r,catalog:i,environments:o,reloadCatalog:s}){let c=Ee(),{logger:l}=T(),u=r!==null&&r.kind===`inherited`?r.entryUrl:null,d=u!==null,f=r!==null&&r.kind===`scenario`?r.scenarioId:null,p=r!==null&&(r.kind===`scenario`||r.kind===`launchCell`),m=t===null?null:t.environmentId,h=`${m===null?``:m}|${f===null?``:f}`,g=(0,L.useCallback)(async t=>{let r={...m===null?{}:{environmentId:m},...f===null?{}:{scenarioId:f}};try{let i=await c.projects.entryUrl(n(e),r,{signal:t});return{key:h,read:{status:`resolved`,address:i}}}catch(e){if(e instanceof We&&Op(e.errorCode)){let t=kp(l,e.errorCode,e.params);if(t!==null)return{key:h,read:{status:`refused`,refusal:t}}}throw e}},[c,l,e,m,f,h]),{data:_,error:v,reload:y}=a({fetcher:g,deps:[e,h],enabled:r!==null&&!d&&t!==null}),b=v===null?_===void 0||_.key!==h?{status:`loading`}:_.read:{status:`error`,error:v},x=xp(h),[S,C]=(0,L.useState)(null),w=b.status===`refused`?b.refusal:null,ee=S!==null&&S.key===h?S.refusal:w!==null&&(p||w.kind===`not_configured`)?w:null,E=ee===null&&!p?w:null,D=e=>e===null||i===void 0||o===void 0?null:zf(i,o,e),te=D(ee),ne=b.status===`resolved`?b.address.entryUrl:null,O=d?u:ee===null?ne:null,re=x.value===null?O===null?``:O:x.value,k=re.trim(),A=ee!==null&&ee.kind!==`not_configured`,ie=x.save===null?A&&ee.kind===`cell_missing`:x.save,ae=wp(re),oe=A&&ie&&ae.state!==`empty`,se=d&&k===``,ce=(()=>{if(d)return k===``?void 0:k;if(k!==``&&(ne===null||k!==ne&&`${k}/`!==ne))return k})(),j=se?`repeatCleared`:!d&&oe&&ae.state===`invalid`?`saveInvalid`:null;return{value:re,setValue:x.setValue,isLoading:!d&&b.status===`loading`,read:b,refusal:ee,refusedCell:te,defaultApplicationNote:D(E),missingRepeatAddress:se,saveChecked:ie,setSaveChecked:x.setSave,savePlan:ae,saveError:x.saveError,block:j,override:ce,adoptDispatchRefusal:e=>{let t=Ap(l,e);return t!==null&&(C({key:h,refusal:t}),!0)},prepareDispatch:async()=>{if(!oe||te===null||ae.state!==`ok`)return{ok:!0,entryUrl:ce,saved:!1};x.setSaveError(null);try{let t=await Mf(c,e,te,ae.baseUrl);l.info(`Launch address saved into its cell`,{projectId:e,targetId:t.id,applicationId:t.applicationId,environmentId:t.environmentId,mode:te.kind})}catch(t){return l.error(`Failed to save the launch address into its cell`,{error:t instanceof Error?t:Error(String(t)),projectId:e,mode:te.kind}),x.setSaveError(t),{ok:!1}}return C(null),x.reset(),y(),s(),{ok:!0,entryUrl:ae.launchUrl,saved:!0}}}}var Mp=`project-default`;function Np(e,t){return e===null?{kind:`projectDefault`}:t===void 0?{kind:`unreadable`}:t.some(t=>t.id===e)?{kind:`named`,id:e}:{kind:`deleted`}}function Pp(e){return e.kind===`projectDefault`?Mp:e.kind===`named`?e.id:``}function Fp(e,t){return e.kind===`deleted`?`makeAutoDispatch.repeat.environmentSourceDeleted`:e.kind===`unreadable`&&t?`makeAutoDispatch.repeat.environmentSourceUnreadable`:null}function Ip(e){return e===`project-default`?null:e}function Lp(e,t){if(t!==null&&e.some(e=>e.id===t))return t;let n=e.find(e=>e.isDefault);if(n!==void 0)return n.id;let r=e[0];return r===void 0?null:r.id}function Rp(e,t){let{t:r}=s(),i=Ee(),[o,c]=(0,L.useState)(null),l=(0,L.useCallback)(t=>i.environments.list(n(e),{signal:t}),[i,e]),{data:u,error:d,reload:f}=a({fetcher:l,deps:[e]}),p=(0,L.useMemo)(()=>u===void 0?[]:u.map(e=>({value:e.id,label:e.name})),[u]),m=r(`agentRunDispatch.environment.asUsual`),h=(0,L.useMemo)(()=>t.kind===`concrete`?p:[{value:Mp,label:m},...p],[t.kind,p,m]),g={mode:t.kind,environments:u,loadError:d,reload:f,options:h,setValue:c};if(t.kind===`concrete`){let e=u===void 0?null:Lp(u,t.preferredEnvironmentId),n=o===null?e:o;return{...g,value:n,noticeKey:null,shown:u!==void 0&&u.length>0,body:u===void 0?null:{environmentId:n}}}let _=t.kind===`repeat`?Np(t.environmentId,u):null,v=_===null?Mp:Pp(_),y=o===null?v:o;return{...g,value:y===``?null:y,noticeKey:_===null?null:Fp(_,d!==null),shown:!0,body:y===``?null:{environmentId:Ip(y)}}}function zp({projectId:e,environment:t,address:n}){let r=Rp(e,t),i=Lf(e),a={data:i.data,error:i.error,reload:i.reload},o=r.environments,s=jp({projectId:e,environment:r.body,source:n.kind===`crawlStart`?null:n,catalog:a.data,environments:o,reloadCatalog:a.reload}),c=Sp({projectId:e,environment:r.body,active:n.kind===`crawlStart`,opening:n.kind===`crawlStart`&&n.opening!==void 0?n.opening:null});return{projectId:e,environment:r,catalog:a,address:n.kind===`crawlStart`?{kind:`crawlStart`,...c}:{kind:`entryUrl`,source:n.kind,...s}}}var Bp=(0,L.createContext)(`open`);function Vp({mode:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Bp.Provider,{value:e,children:t})}function Hp(){return(0,L.useContext)(Bp)}var Up=(0,L.createContext)(()=>void 0);function Wp({hold:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Up.Provider,{value:e,children:t})}function Gp(){return(0,L.useContext)(Up)}var Kp=(0,L.createContext)(()=>void 0);function qp({reveal:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Kp.Provider,{value:e,children:t})}function Jp(){return(0,L.useContext)(Kp)}function Yp(e,t){return[`qa-chat-card`,e===void 0||e===`neutral`?void 0:`qa-chat-card--${e}`,t].filter(Boolean).join(` `)}function Xp({props:e,fold:t}){let{icon:n,tileTone:r=`primary`,meta:i,tone:a,children:o,sections:s,note:c,footer:l,className:u,role:d,data:f}=e,[p,m]=(0,L.useState)(!1),[h,g]=(0,L.useState)(0),[_,v]=(0,L.useState)(!1),y=Gp(),b=Jp(),x=(0,L.useId)(),S=(0,L.useRef)(null),C=(0,L.useRef)(null),{handle:w,linked:T=!1,onLinkChange:E}=t;return(0,L.useImperativeHandle)(w,()=>({reveal(){y(),m(!0),v(!1),g(e=>e+1)}}),[y]),(0,L.useEffect)(()=>{var e;if(h===0)return;let t=S.current;t!==null&&b(t),(e=C.current)==null||e.focus({preventScroll:!0}),v(!0)},[h,b]),/* @__PURE__ */ (0,Z.jsxs)(`article`,{ref:S,className:[Yp(a,u),`qa-chat-card--fold`,p&&`qa-chat-card--fold-open`,T&&`qa-chat-card--linked`,_&&`qa-chat-card--revealed`].filter(Boolean).join(` `),role:d,"aria-label":e[`aria-label`],"aria-labelledby":e[`aria-labelledby`],"aria-busy":e[`aria-busy`],"data-card-fold":p?`open`:`folded`,...E===void 0?{}:{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onFocus:()=>E(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||E(!1)}},onAnimationEnd:e=>{e.target===e.currentTarget&&v(!1)},...f,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${r}`,"aria-hidden":`true`,children:n}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-text`,children:[/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:C,type:`button`,className:`qa-chat-card__fold-toggle`,"aria-expanded":p,"aria-controls":x,onClick:()=>{y(),m(e=>!e)},children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__fold-facts`,children:t.facts})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-side`,children:[i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__meta`,children:i}),t.quickActions,/* @__PURE__ */ (0,Z.jsx)(ee,{className:`qa-chat-card__fold-chevron`,size:16,"aria-hidden":`true`})]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:x,className:`qa-chat-card__fold-region`,hidden:!p,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__body`,children:o}),s,c!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__note`,children:c}),l]})]})}function Zp(e){let t=Hp();return e.bare!==!0&&e.fold!==void 0&&(t===`folded`||t===`open-until-decided`&&e.fold.decided===!0)?/* @__PURE__ */ (0,Z.jsx)(Xp,{props:e,fold:e.fold}):/* @__PURE__ */ (0,Z.jsx)(Qp,{...e})}function Qp(e){let{icon:t,tileTone:n=`primary`,title:r,caption:i,meta:a,tone:o=`neutral`,children:s,sections:c,note:l,footer:u,className:d,bare:f=!1,role:p,data:m}=e,h=Yp(o,d);return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:h,role:p,"aria-label":e[`aria-label`],"aria-labelledby":e[`aria-labelledby`],"aria-busy":e[`aria-busy`],...m,children:[f?s:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${n}`,"aria-hidden":`true`,children:t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__titles`,children:[/* @__PURE__ */ (0,Z.jsx)(`h3`,{className:`qa-chat-card__title`,children:r}),i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-chat-card__caption`,children:i})]}),a!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__meta`,children:a})]}),s]}),c,l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__note`,children:l}),u]})}function $p(e){let{tone:t=`success`,dot:n=!0,children:r,role:i,className:a}=e,o=[`qa-chat-card__pill`,`qa-chat-card__pill--${t}`,a].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:o,role:i,"aria-live":e[`aria-live`],children:[n&&/* @__PURE__ */ (0,Z.jsx)(`i`,{className:`qa-chat-card__pill-dot`,"aria-hidden":`true`}),r]})}function em({children:e,missing:t=!1,ref:n}){return/* @__PURE__ */ (0,Z.jsx)(`h4`,{ref:n,className:`qa-chat-card__subject${t?` qa-chat-card__subject--missing`:``}`,children:e})}function tm({children:e,clamp:t=!1}){return/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-chat-card__lead${t?` qa-chat-card__lead--clamp`:``}`,children:e})}function nm(e){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-chat-card__rows`,"aria-label":e[`aria-label`],children:e.children})}function rm({label:e,value:t}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-chat-card__row`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__row-key`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__row-value`,children:t})]})}function im(e){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-chat-card__list`,"aria-label":e[`aria-label`],children:e.children})}function am({icon:e,tileTone:t=`primary`,name:n,note:r,noteWraps:i=!1,trailing:a}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-chat-card__list-item${i?` qa-chat-card__list-item--wrap`:``}`,children:[e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${t}`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-chat-card__list-grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__list-name`,children:n}),r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__list-note`,children:r})]}),a]})}function om({summary:e,children:t,defaultOpen:n=!1,className:r}){return/* @__PURE__ */ (0,Z.jsxs)(`details`,{className:[`qa-chat-card__disclosure`,r].filter(Boolean).join(` `),open:n?!0:void 0,children:[/* @__PURE__ */ (0,Z.jsxs)(`summary`,{className:`qa-chat-card__disclosure-summary`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__disclosure-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(ee,{size:14})}),e]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__disclosure-body`,children:t})]})}function sm({children:e,className:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:[`qa-chat-card__actions`,t].filter(Boolean).join(` `),children:e})}function cm({icon:e,title:t,text:n,actions:r}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__empty`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__empty-icon`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{className:`qa-chat-card__empty-title`,children:t}),n!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-chat-card__empty-text`,children:n}),r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__empty-actions`,children:r})]})}function lm(e){return Object.prototype.hasOwnProperty.call(Pn,e)}function um(e){return Pn[e]===`warning`}function dm(e){return e.kind===`list`||e.key===`entryUrl`||e.key===`reason`}function fm({fact:e,copy:t}){switch(e.kind){case`workflow`:{let n=ot.safeParse(e.topic);return n.success?wu(n.data):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__unrecognized`,children:t.unrecognized})}case`text`:return e.key===`entryUrl`||e.key===`run`?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__mono`,children:e.text}):e.text;case`token`:{let n=`${e.key}.${e.token}`;return lm(n)?um(n)?/* @__PURE__ */ (0,Z.jsx)($p,{tone:`warning`,dot:!1,children:t.token[n]}):t.token[n]:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__unrecognized`,children:t.unrecognized})}case`list`:return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-confirm-facts__chips`,children:e.items.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(Or,{"aria-hidden":`true`}),e]},`${String(t)}:${e}`))})}}function pm({facts:e}){let t=$().cards.confirmation,n=Q();return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`dl`,{className:`qa-confirm-facts`,children:e.map(e=>{let r=e.label[n];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:j(`qa-confirm-facts__cell`,dm(e)&&`qa-confirm-facts__cell--wide`),children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:e.kind===`list`?t.listLabel(r,e.items.length):r}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:/* @__PURE__ */ (0,Z.jsx)(fm,{fact:e,copy:t})})]},e.key)})})}function mm(e,t){return e.flatMap(e=>{if(e.kind!==`token`)return[];let n=`${e.key}.${e.token}`;return!lm(n)||!um(n)?[]:[t.warning[n]]})}var hm=(0,L.createContext)(null);function gm({value:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(hm.Provider,{value:e,children:t})}function _m(){let e=(0,L.useContext)(hm);if(e===null)throw Error(`useChatCardEnvironment: no <ChatCardEnvironmentProvider> above this card`);return e}function vm({tone:e=`error`,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:j(`qa-card-kit__alert`,e===`warning`&&`qa-card-kit__alert--warning`),role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(he,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t})]})}function ym({question:e,body:t,children:n}){let r=(0,L.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__confirm`,role:`group`,"aria-labelledby":r,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{id:r,children:e}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__confirm-actions`,children:n})]})}function bm(e,t){return e.filter(e=>e.command!==`chat-stop`&&e.toolCallId===t)}function xm({toolCallId:e}){let{commandFailures:t}=_m(),n=$().cards.common.commandFailure,r=bm(t,e),i=r[r.length-1];if(i===void 0)return null;let a=i.command===`chat-tool-confirm`?n.confirm:n.reject;return/* @__PURE__ */ (0,Z.jsx)(vm,{children:`${a} ${n.reason[i.reason]}`})}var Sm=/* @__PURE__ */ new Set([`scope`,`address`]);function Cm(e){return e.filter(e=>Sm.has(e.key))}function wm(e){switch(e.kind){case`this_browser`:return oe;case`none`:return hr;case`runner`:case`runner-unread`:return Ur;case`runner-gone`:return D}}function Tm(e){let t=$().shell.confirmation.launch;return{text:(()=>{switch(e.view.kind){case`this_browser`:return e.surfaceDrivesBrowser?t.place.thisBrowserPanel:t.place.thisBrowserWeb;case`none`:return t.place.none;case`runner`:return t.place.runner(e.view.runner.name);case`runner-unread`:return t.place.runnerUnread;case`runner-gone`:return t.place.runnerGone}})(),Icon:wm(e.view)}}function Em({facts:e}){let t=$().cards.confirmation;return e.length===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-launch-card-line`,"data-testid":`ai-launch-card-scope`,children:[/* @__PURE__ */ (0,Z.jsx)(Rt,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e.map((e,n)=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[n>0&&` \u00B7 `,/* @__PURE__ */ (0,Z.jsx)(fm,{fact:e,copy:t})]},e.key))})]})}function Dm({form:e,setForm:t,locked:n}){let r=(0,L.useId)(),i=$().shell.confirmation.launch;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-launch-card-lead`,id:r,children:i.siteLead}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-launch-card-allow`,role:`radiogroup`,"aria-labelledby":r,"data-testid":`ai-launch-card-site`,children:ht.map(a=>/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:j(`qa-launch-card-tg qa-launch-card-tg--radio`,a===`dangerous`&&`qa-launch-card-tg--danger`),"data-testid":`ai-launch-card-site-${a}`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`radio`,name:r,checked:e.standMode===a,onChange:()=>t(e=>({...e,standMode:a})),disabled:n}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-launch-card-tg-box`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Ue,{})}),i.site[a]]},a))})]})}function Om({form:e,setForm:t,locked:n,browser:r}){let i=$(),a=i.shell.confirmation.launch,o=e=>t(t=>({...t,allowedChanges:t.allowedChanges.includes(e)?t.allowedChanges.filter(t=>t!==e):bt.filter(n=>n===e||t.allowedChanges.includes(n))}));return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-launch-card-lead`,children:a.projectLead}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-launch-card-allow`,role:`group`,"aria-label":a.projectLead,children:[bt.map(t=>/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-launch-card-tg`,"data-testid":`ai-launch-card-allow-${t}`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`checkbox`,checked:e.allowedChanges.includes(t),onChange:()=>o(t),disabled:n}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-launch-card-tg-box`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Ue,{})}),i.cards.confirmation.token[`allowedChange.${t}`]]},t)),r&&/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-launch-card-tg qa-launch-card-tg--sub`,"data-testid":`ai-launch-card-capture-api`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`checkbox`,checked:e.captureApi,onChange:()=>t(e=>({...e,captureApi:!e.captureApi})),disabled:n}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-launch-card-tg-box`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Ue,{})}),a.captureApi]})]})]})}function km({toolCallId:e,body:t,foot:n}){return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-launch-card-body`,children:t})}),/* @__PURE__ */ (0,Z.jsx)(xm,{toolCallId:e}),/* @__PURE__ */ (0,Z.jsx)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:n})]})}function Am(e,t,n){switch(e.kind){case`project`:return cp;case`scenarios`:{let[n,...r]=e.scenarioIds;if(n===void 0||t===void 0||t.kind!==`list`)return null;let[i]=t.items;return i===void 0?null:{kind:`scenarios`,scenarioIds:[n,...r],firstName:i}}case`test_run`:return n===null?null:{kind:`test_run`,testRunId:e.testRunId,run:{number:n.number,name:n.name}};case`test_plan`:return t===void 0||t.kind!==`text`?null:{kind:`test_plan`,testPlanId:e.testPlanId,planName:t.text}}}function jm(e,t){let n=Ee(),r=e.kind===`test_run`?e.testRunId:null,i=(0,L.useCallback)(async e=>{let[t,i]=await Promise.all([n.auth.me({signal:e}),r===null?Promise.resolve(null):n.testRuns.getDetail(r,{signal:e})]);return{viewerId:t.id,run:i}},[n,r]),{data:o,error:s}=a({fetcher:i,deps:[r]});if(s!==null)return{kind:`unread`};if(o===void 0)return{kind:`reading`};let c=Am(e,t,o.run);return c===null?{kind:`unread`}:{kind:`ready`,scope:c,viewerId:o.viewerId}}var Mm=()=>void 0;function Nm({toolCallId:e,projectId:t,proposal:n,form:r,setForm:i,facts:a,place:o,locked:s,onBack:c,onLaunch:l}){let u=$(),d=u.shell.confirmation.launch,f=Tm(o),p=zn(o.place),m=o.view.kind===`runner-gone`,h=a.find(e=>e.key===`effort`),g=a.find(e=>e.key===`scope`),_=r.brief.trim()===``,v=jm(n.scope,g),[y,b]=(0,L.useState)(null),x=zp({projectId:t,environment:{kind:`concrete`,preferredEnvironmentId:n.environmentId},address:{kind:`crawlStart`,...n.entryUrl===null?{}:{opening:{environmentId:n.environmentId,value:n.entryUrl}}}}),S=x.environment.body,w=(()=>{if(!p)return r;if(S===null)return null;let e=x.address.value;return{...r,entryUrl:e.trim()===``?null:e,environmentId:S.environmentId}})();return/* @__PURE__ */ (0,Z.jsx)(km,{toolCallId:e,body:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-launch-card-prompt`,children:/* @__PURE__ */ (0,Z.jsx)(`textarea`,{"aria-label":d.briefLabel,value:r.brief,disabled:s,onChange:e=>{let t=e.target.value;i(e=>({...e,brief:t}))}})}),_&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-launch-card-hint`,children:d.briefEmpty}),v.kind===`ready`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-launch-card-picks`,"data-testid":`ai-launch-card-picks`,children:[/* @__PURE__ */ (0,Z.jsx)(hp,{state:{projectId:t,scope:y===null?v.scope:y,setScope:e=>{b(e),i(t=>({...t,scope:lp(e)}))},scopeRequest:null,clearScopeRequest:Mm,scopeSuggested:!1,held:s},viewerId:v.viewerId,scenarioPicker:null}),p&&/* @__PURE__ */ (0,Z.jsx)(op,{state:{address:x,held:s}})]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Em,{facts:g===void 0?[]:[g]}),v.kind===`unread`&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-launch-card-hint`,"data-testid":`ai-launch-card-scope-unread`,children:d.scopeUnread}),p&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-launch-card-picks`,children:/* @__PURE__ */ (0,Z.jsx)(op,{state:{address:x,held:s}})})]}),p&&/* @__PURE__ */ (0,Z.jsx)(Dm,{form:r,setForm:i,locked:s}),/* @__PURE__ */ (0,Z.jsx)(Om,{form:r,setForm:i,locked:s,browser:p}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-launch-card-picks`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-launch-card-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(f.Icon,{"aria-hidden":`true`}),f.text]}),h!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-launch-card-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(xr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(fm,{fact:h,copy:u.cards.confirmation}),` \u2014 ${d.fromChip}`]})]})]}),foot:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-launch-card-foot-end`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`sm`,disabled:s,onClick:c,children:d.cancel}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:14}),disabled:s||_||m||w===null,"data-testid":`ai-launch-card-launch`,onClick:()=>{w!==null&&l(w)},children:d.launch})]})})}function Pm({toolCallId:e,form:t,setForm:n,facts:r,place:i,locked:a,onEdit:o,onCancel:s,onLaunch:c}){let l=$(),u=l.shell.confirmation.launch,d=Tm(i),f=zn(i.place),p=i.view.kind===`runner-gone`,m=r.find(e=>e.key===`effort`),h=t.brief.trim()===``;return/* @__PURE__ */ (0,Z.jsx)(km,{toolCallId:e,body:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-launch-card-brief`,"data-testid":`ai-launch-card-brief`,children:t.brief}),/* @__PURE__ */ (0,Z.jsx)(Em,{facts:Cm(r)}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:j(`qa-launch-card-line`,p&&`qa-launch-card-line--alert`),"data-testid":`ai-launch-card-place`,children:[/* @__PURE__ */ (0,Z.jsx)(d.Icon,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:d.text})]}),m!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-launch-card-line`,"data-testid":`ai-launch-card-effort`,children:[/* @__PURE__ */ (0,Z.jsx)(xr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:/* @__PURE__ */ (0,Z.jsx)(fm,{fact:m,copy:l.cards.confirmation})})]}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-launch-card-lead`,children:u.switchLead}),f&&/* @__PURE__ */ (0,Z.jsx)(Dm,{form:t,setForm:n,locked:a}),/* @__PURE__ */ (0,Z.jsx)(Om,{form:t,setForm:n,locked:a,browser:f})]}),foot:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[o!==null&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ln,{size:14}),disabled:a,onClick:o,children:u.edit}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-launch-card-foot-end`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`sm`,disabled:a,onClick:s,children:u.cancel}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:14}),disabled:a||h||p,"data-testid":`ai-launch-card-launch`,onClick:c,children:u.launch})]})]})})}var Fm=Fn.omit({place:!0,target:!0}).extend({op:Qe(`start_preset`)}).strict();function Im(e){var t;let n=(t=e.display)==null?void 0:t.facts.find(e=>e.key===Nn);if(n===void 0)return null;if(n.kind!==`workflow`)throw Error(`launch card: the busyWith fact is a '${n.kind}' fact, not a task`);return{workflowId:n.workflowId,topic:ot.parse(n.topic)}}function Lm(e,t){return e===null?`launch`:t===null?`busy`:jt.safeParse(t).success?`launch`:`busy`}var Rm=e=>typeof e==`object`&&e&&`op`in e?e.op:void 0,zm=e=>typeof e==`object`&&e&&`execution`in e?e.execution:void 0;function Bm(e){return e.toolName===`workflow_execute`&&Rm(zm(e.args))===`start_preset`}function Vm(e){return e.toolName===`workflow_task_execute`&&Rm(e.args)===`request_change`}function Hm(e){let t=Fm.safeParse(zm(e));if(!t.success)return null;let n=t.data;return{presetId:n.presetId,brief:n.brief,allowedChanges:n.allowedChanges,captureApi:n.captureApi,standMode:n.standMode,scope:n.scope,entryUrl:n.entryUrl,environmentId:n.environmentId}}function Um(e){return e.captureApi===null?xu[e.presetId].defaultCaptureApi:e.captureApi}function Wm(e){return e.standMode===null?Dt:e.standMode}function Gm(e){return{proposal:e,presetId:e.presetId,brief:e.brief,allowedChanges:e.allowedChanges,captureApi:Um(e),standMode:Wm(e),scope:e.scope,entryUrl:e.entryUrl,environmentId:e.environmentId}}function Km(e,t,n){let r=zn(t);return Fn.parse({presetId:e.presetId,brief:e.brief,allowedChanges:[...e.allowedChanges],captureApi:r?e.captureApi:null,standMode:r?e.standMode:null,scope:e.scope,entryUrl:r?e.entryUrl:null,environmentId:r?e.environmentId:null,place:t,target:n})}function qm({confirmation:e,actionsLocked:t,place:n,projectId:r,onLaunch:i,onCancel:a}){let o=(0,L.useId)(),s=$(),c=Q(),l=s.shell.confirmation.launch,{toolCallId:u,display:d}=e,f=Hm(e.args),[p,m]=(0,L.useState)(()=>f===null?null:Gm(f)),[h,g]=(0,L.useState)(null),_=d===null?[]:d.facts,v=e=>m(t=>t===null?t:typeof e==`function`?e(t):e),y=e=>i(u,Km(e,n.place,`calling_conversation`)),b=(e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Kr,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:[/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:o,children:e}),t!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-subtitle`,children:t})]})]}),x=h!==null&&p!==null&&f!==null&&r!==null;return/* @__PURE__ */ (0,Z.jsx)(`article`,{className:`qa-ai-chat-dock-card`,"data-testid":`ai-launch-card`,"data-tool-name":e.toolName,"data-launch-card-state":p===null?`unreadable`:x?`edit`:`view`,"aria-labelledby":o,children:p===null||f===null?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[b(s.shell.confirmation.unrecognizedTool,null),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-launch-card-hint`,"data-testid":`ai-launch-card-unreadable`,children:l.unreadable})}),/* @__PURE__ */ (0,Z.jsx)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`sm`,disabled:t,onClick:()=>a(u),children:l.cancel})})]}):x?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[b(l.editTitle,l.editSubtitle),/* @__PURE__ */ (0,Z.jsx)(Nm,{toolCallId:u,projectId:r,proposal:f,form:p,setForm:v,facts:_,place:n,locked:t,onBack:()=>{m(h),g(null)},onLaunch:y})]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[b(Tu(p,c),l.subtitle),/* @__PURE__ */ (0,Z.jsx)(Pm,{toolCallId:u,form:p,setForm:v,facts:_,place:n,locked:t,onEdit:r===null?null:()=>g(p),onCancel:()=>a(u),onLaunch:()=>y(p)})]})})}var Jm={explore_app:Ar,find_bugs:or,create_tests:Zt,automate_scenarios:ei,run_scenarios:Ir},Ym=F({id:P()});function Xm(e){let{http:t}=_m(),[n,r]=(0,L.useState)(`idle`);return{status:n,ask:()=>r(`confirming`),keep:()=>r(`idle`),stop:()=>{r(`stopping`),t.request({method:wn.workflowCancel.method,path:wn.workflowCancel.path(e),body:{},schema:Ym}).then(()=>r(`idle`),e=>{r(`stopFailed`),e instanceof On&&e.status===409||queueMicrotask(()=>{throw e})})}}}function Zm({state:e,words:t}){return e.status===`confirming`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsxs)(ym,{question:t.question,body:t.body,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,onClick:e.keep,children:t.keep}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Jr,{size:14}),onClick:e.stop,children:t.confirm})]})}):e.status===`stopFailed`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsx)(vm,{children:t.failed})}):null}function Qm({confirmation:e,proposal:t,busyWith:n,actionsLocked:r,place:i,onLaunch:a}){let o=(0,L.useId)(),s=$(),c=Q(),l=s.shell.confirmation.launch,u=Xm(n.workflowId),{toolCallId:d,display:f}=e,p=Tu(t,c),m=f==null?void 0:f.facts.find(e=>e.key===`effort`),h=t.presetId===`custom`?Kr:Jm[t.presetId];return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-ai-chat-dock-card`,"data-testid":`ai-launch-card`,"data-tool-name":e.toolName,"data-launch-card-state":`busy`,"aria-labelledby":o,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(h,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:[/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:o,children:p}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-ai-chat-dock-card-subtitle`,children:[l.busy.kind,m!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[` \u00B7 `,/* @__PURE__ */ (0,Z.jsx)(fm,{fact:m,copy:s.cards.confirmation})]})]})]})]}),/* @__PURE__ */ (0,Z.jsx)(Zm,{state:u,words:s.cards.workflow.preset.stopConfirm}),/* @__PURE__ */ (0,Z.jsx)(xm,{toolCallId:d}),u.status!==`confirming`&&/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Jr,{size:14}),loading:u.status===`stopping`,disabled:r||u.status===`stopping`,onClick:u.ask,"data-testid":`ai-launch-card-stop-live`,children:l.busy.stop}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-launch-card-foot-end`,children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(A,{size:14}),disabled:r,"data-testid":`ai-launch-card-new-conversation`,onClick:()=>a(d,Km(Gm(t),i,`new_conversation`)),children:l.busy.newConversation})})]})]})}function $m(e,t){let n=t(`apiExecution.assertion.subject.${e.type}`,{target:e.target??``}),r=t(`apiExecution.assertion.comparator.${e.comparator}`);return e.expected===null?`${n} ${r}`:`${n} ${r} ${e.expected}`}function eh(e){return e.id===void 0?``:` ${e.id}`}function th(e,t){let n=e.assertionConfig[t];if(typeof n!=`string`)throw Error(`Expected-result${eh(e)} is missing string assertionConfig.${t}`);return n}function nh(e){if(!(`label`in e))throw Error(`Expected-result${eh(e)} is missing required label`);if(e.label!==null&&typeof e.label!=`string`)throw Error(`Expected-result${eh(e)} has an invalid label`);if(e.assertionType===`text_free`){if(e.label!==null)throw Error(`Text-free expected-result${eh(e)} must have a null label`);return null}if(e.label!==null){if(e.label.trim().length===0)throw Error(`Expected-result${eh(e)} has a blank label`);return{kind:`label`,value:e.label}}switch(e.assertionType){case`text_contains`:return{kind:`text_contains`,value:th(e,`expectedText`)};case`text_equals`:return{kind:`text_equals`,value:th(e,`expectedText`)};case`assert_text`:return{kind:`assert_text`,mode:th(e,`mode`),value:th(e,`value`)};case`element_visible`:return{kind:`element_visible`};case`element_exists`:return{kind:`element_exists`};case`element_not_exists`:return{kind:`element_not_exists`};case`input_value`:return{kind:`input_value`,value:th(e,`expectedValue`)};default:throw Error(`Expected-result${eh(e)} has unsupported assertion type ${e.assertionType}`)}}function rh(e){return e.assertionType!==`text_free`}function ih(e){return rh(e)?!0:e.text!==null&&e.text.trim().length>0}function ah(e,t){return t(Mt(e))}function oh(e,t){switch(e){case`equals`:return t(`expectedResult.assertTextModes.equals`);case`contains`:return t(`expectedResult.assertTextModes.contains`);case`matches`:return t(`expectedResult.assertTextModes.matches`);case`starts_with`:return t(`expectedResult.assertTextModes.startsWith`);case`ends_with`:return t(`expectedResult.assertTextModes.endsWith`);default:throw TypeError(`Unsupported assert_text mode: ${e}`)}}function sh(e,t){let n=nh(e);if(n===null)throw TypeError(`Typed expected result produced no description`);switch(n.kind){case`label`:return n.value;case`text_contains`:return t(`expectedResult.descriptions.textContains`,{value:n.value});case`text_equals`:return t(`expectedResult.descriptions.textEquals`,{value:n.value});case`assert_text`:return t(`expectedResult.descriptions.assertText`,{mode:oh(n.mode,t),value:n.value});case`element_visible`:return t(`expectedResult.descriptions.elementVisible`);case`element_exists`:return t(`expectedResult.descriptions.elementExists`);case`element_not_exists`:return t(`expectedResult.descriptions.elementNotExists`);case`input_value`:return t(`expectedResult.descriptions.inputValue`,{value:n.value})}}function ch(e,t){if(!rh(e)){if(e.text===null)throw TypeError(`text_free expected result must carry text`);return{description:e.text,assertionTypeLabel:null}}let n=e.assertionType;return{description:sh(e,t),assertionTypeLabel:ah(n,t)}}var lh=/* @__PURE__ */ new Set([`element_not_found`,`element_not_found_page_busy`]);function uh(e,t){let{source:n,evidence:r,origin:i}=e;switch(n.kind){case`atlas_turn`:if(i.kind!==`atlas_turn`)throw gh(e,i.kind);return{title:n.title,observed:n.observed,expected:n.expected===null?t(`findings.expected.atlasNone`):n.expected,sourceLine:i.title===null?t(`findings.source.atlasTurnUntitled`,{agent:i.agentNumber,step:i.stepNumber}):t(`findings.source.atlasTurn`,{agent:i.agentNumber,title:i.title,step:i.stepNumber})};case`run_step`:{if(r.kind!==`run_step`)throw gh(e,r.kind);if(i.kind!==`run_step`)throw gh(e,i.kind);let a=n.stepIndex+1;return{title:fh(r,a,t),observed:r.actual===null?dh(r,t):r.actual,expected:r.failedCheck===null?t(`findings.expected.runStepNone`):ch(r.failedCheck,t).description,sourceLine:i.scenarioName===null?t(`findings.source.runStepDeleted`,{agent:i.agentNumber,n:a}):t(`findings.source.runStep`,{agent:i.agentNumber,scenario:i.scenarioName,n:a})}}case`server_step`:{if(r.kind!==`server_step`)throw gh(e,r.kind);if(i.kind!==`server_step`)throw gh(e,i.kind);let n=mh(r),a=i.requestName===null?t(`findings.source.serverItemRequest`,{request:n}):t(`findings.source.serverItemNamed`,{name:i.requestName});return{title:i.requestName===null?t(`findings.title.serverStep`,{request:n,status:r.responseStatus}):t(`findings.title.serverStepNamed`,{name:i.requestName,status:r.responseStatus}),observed:r.responseStatusText===null?t(`findings.observed.response`,{status:r.responseStatus}):t(`findings.observed.responseWithText`,{status:r.responseStatus,statusText:r.responseStatusText}),expected:ph(r,t),sourceLine:i.testRun===null?t(`findings.source.serverStep`,{item:a}):i.testRun.name===null?t(`findings.source.serverStepRunNumber`,{item:a,number:String(i.testRun.number).padStart(3,`0`)}):t(`findings.source.serverStepRun`,{item:a,run:i.testRun.name})}}}}function dh(e,t){switch(e.failureCode){case null:return t(`findings.stepFailure.assertion`);case`element_not_found`:return t(`findings.stepFailure.element_not_found`);case`element_not_found_page_busy`:return t(`findings.stepFailure.element_not_found_page_busy`);case`native_dialog_open`:return t(`findings.stepFailure.native_dialog_open`);default:return t(`findings.stepFailure.other`,{code:e.failureCode})}}function fh(e,t,n){let r=e.failureCode!==null&&lh.has(e.failureCode),i=e.stepName.trim();return i.length===0?n(r?`findings.title.runStepNotFoundUnnamed`:`findings.title.runStepUnnamed`,{n:t}):n(r?`findings.title.runStepNotFound`:`findings.title.runStep`,{n:t,name:i})}function ph(e,t){let n=e.failedChecks.map(e=>t(`findings.expected.checkQuoted`,{check:$m(e,t)})).join(`, `);return t(`findings.expected.checks`,{count:e.failedChecks.length,checks:n})}function mh(e){return`${e.method.toUpperCase()} ${hh(e.url)}`}function hh(e){if(!URL.canParse(e))return e;let t=new URL(e);return`${t.pathname}${t.search}`}function gh(e,t){return/* @__PURE__ */ Error(`Finding ${e.id}: source '${e.source.kind}' with '${t}'`)}function _h(){let{t:e,i18n:t}=s();return(0,L.useMemo)(()=>({t:e,has:e=>t.exists(e)}),[e,t])}var vh=ct(P(),P()),yh=et(`target`,[F({target:Qe(`workbench`),routeKey:P().min(1),params:vh.optional(),query:vh.optional()}),F({target:Qe(`detail`),routeKey:P().min(1),params:vh.optional(),query:vh.optional()}),F({target:Qe(`list`),routeKey:P().min(1),listFilter:ct(P(),P().optional()),query:vh.optional()}),F({target:Qe(`none`)})]);function bh(e){if(e===void 0)return``;let t=Object.entries(e).filter(e=>e[1]!==void 0&&e[1]!==``);return t.length===0?``:`?${t.map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`)}`}function xh(e){if(e===void 0)return``;let t=Object.values(e).filter(e=>e!==``);return t.length===0?``:`/${t.map(e=>encodeURIComponent(e)).join(`/`)}`}function Sh(e){if(!Number.isInteger(e)||e<=0)throw Error(`entity-route: project number must be a positive integer, got ${String(e)}`);return`${b}/${String(e)}`}function Ch(e,t){let n=Sh(e);switch(t.target){case`none`:return null;case`workbench`:return`${n}/${t.routeKey}${bh(t.query)}`;case`detail`:return`${n}/${t.routeKey}${xh(t.params)}${bh(t.query)}`;case`list`:return`${n}/${t.routeKey}${bh(t.listFilter)}`}}var wh=`{projectRef}`;function Th(e,t){return e.startsWith(`/project/${wh}/`)?`${Sh(t)}${e.slice(`${b}/${wh}`.length)}`:null}var Eh=`create_bug`;function Dh(e){var t;let n=(t=e.proposal)==null?void 0:t.items;if((n==null?void 0:n.length)!==1)return null;let[r]=n;return r===void 0||r.actionType!==Eh||r.bug===void 0?null:{facts:r.bug}}function Oh(e){let t=new URL(e);return`${t.pathname}${t.search}`}function kh(e,t){return[t.capture[e.capture],...e.pageUrl===null?[]:[t.address(Oh(e.pageUrl))]].join(`, `)}function Ah({facts:e}){let t=$().cards.changeSet.bugFiling;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug`,"data-testid":`change-set-bug-filing`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug__line`,children:[/* @__PURE__ */ (0,Z.jsx)(sr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:kh(e,t)})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug__line`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.severity(t.severityWord[e.severity])})]})]})}function jh(e,t){return uh(e.candidate,t).title}function Mh({finding:e}){let{t}=_h(),{project:n,navigation:r}=_m(),i=jh(e,t),a=n===null?null:Ch(n.number,e.open);return a===null?i:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-cs-linkish`,"data-testid":`change-set-bug-finding`,onClick:()=>r.openPath(a),children:i})}var Nh=[`searching`,`search_results_shown`,`no_results`,`item_selected`,`inspecting`,`ambiguity_choose_target`],Ph=[`proposal_pending`,`confirmation_required`],Fh=[`applying`,`applied`,`partial_failure`,`rejected_no_op`,`undone`,`superseded`,`closed`],Ih=/* @__PURE__ */ new Set([...Nh,...Ph,...Fh]);function Lh(e){return Ih.has(e)}function Rh(e){return Nh.includes(e)}var zh=`confirmation_required`,Bh={searching:{marker:`proposed`,tone:`info`,live:!0},search_results_shown:{marker:`proposed`,tone:`info`,live:!1},no_results:{marker:`proposed`,tone:`info`,live:!1},item_selected:{marker:`proposed`,tone:`info`,live:!1},ambiguity_choose_target:{marker:`proposed`,tone:`info`,live:!1},inspecting:{marker:`inspecting`,tone:`info`,live:!0},proposal_pending:{marker:`awaiting`,tone:`primary`,live:!0},confirmation_required:{marker:`awaiting`,tone:`primary`,live:!0},applying:{marker:`applying`,tone:`warning`,live:!0},applied:{marker:`applied`,tone:`success`,live:!1},partial_failure:{marker:`partial`,tone:`error`,live:!1},rejected_no_op:{marker:`rejected`,tone:`neutral`,live:!1},undone:{marker:`undone`,tone:`neutral`,live:!1},superseded:{marker:`superseded`,tone:`neutral`,live:!1},closed:{marker:`closed`,tone:`neutral`,live:!1}};function Vh(e,t){var n;let r=Bh[e];return e===`partial_failure`&&((n=t.applySummary)==null?void 0:n.outcome)===`failed`?{...r,marker:`failed`}:r}function Hh(e){return e!==void 0&&e.length>0&&e.every(e=>e.removesData)}function Uh(e){return e!==void 0&&e.some(e=>e.removesData)}function Wh(e){return{deletes:Uh(e),destructive:Hh(e)}}function Gh(e){return{variant:e.deletes?`danger-soft`:`primary`,label:e.destructive?`confirmDelete`:`confirm`}}function Kh(e){let t=e==null?void 0:e[0];return e===void 0||t===void 0?null:e.every(e=>e.actionType===t.actionType)?t.actionType:null}function qh(e){return e.confirmDisabledReason!==void 0||e.blockers.length>0?!1:e.confirmation===void 0||e.confirmation.confirmEnabled}var Jh=/* @__PURE__ */ new Set([`insert_scenario_step`,`append_scenario_step`]);function Yh(e){let t=Kh(e);return Hh(e)?`delete`:t===null?`layers`:t===`create_bug`?`bug`:t===`create_environment_variable`?`key`:Jh.has(t)?`add`:`layers`}function Xh(e,t){switch(e){case`searching`:case`search_results_shown`:case`no_results`:return{kind:`search`,tone:`primary`};case`inspecting`:return{kind:`inspect`,tone:`primary`};case`item_selected`:case`ambiguity_choose_target`:return{kind:`target`,tone:`primary`};case`proposal_pending`:case`confirmation_required`:case`applying`:{var n;let e=Yh((n=t.proposal)==null?void 0:n.items);return{kind:e,tone:e===`delete`?`error`:`primary`}}case`applied`:return{kind:`applied`,tone:`success`};case`partial_failure`:return{kind:`partial`,tone:`error`};case`rejected_no_op`:return{kind:`rejected`,tone:`muted`};case`undone`:return{kind:`undone`,tone:`muted`};case`superseded`:return{kind:`superseded`,tone:`muted`};case`closed`:var r;return{kind:Yh((r=t.proposal)==null?void 0:r.items),tone:`muted`}}}function Zh(e,t){var n;return e===`applied`?`success`:e===`partial_failure`||(e===`proposal_pending`||e===`confirmation_required`)&&Uh((n=t.proposal)==null?void 0:n.items)?`error`:`neutral`}function Qh(e){return{scenarioLabel:e.header.scenarioLabel??null,projectName:e.header.projectName,environmentLabel:e.header.environmentLabel??null}}function $h(e){let t=e.split(/[_.]/).filter(e=>e.length>0);return t.length===0?e:t.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var eg=`qa-card-kit`;function tg({icon:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-card-kit__note-line`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__note-icon`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t})]})}function ng({tip:e,children:t,className:n}){return/* @__PURE__ */ (0,Z.jsx)(O,{content:e,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:j(`qa-card-kit__tipped`,n),tabIndex:0,children:t})})}function rg({value:e,base:t}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-card-kit__v-stack`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:t})]})}function ig({path:e,label:t,accessibleName:n,emphasis:r=`primary`}){let{navigation:i}=_m(),a=$().cards;return/* @__PURE__ */ (0,Z.jsx)(C,{variant:r,size:`sm`,icon:i.opensInNewTab?/* @__PURE__ */ (0,Z.jsx)(fn,{size:14}):void 0,"aria-label":`${n}${i.opensInNewTab?a.common.newTabSuffix:``}`,onClick:()=>i.openPath(e),children:t})}function ag({label:e,icon:t,onClick:n,disabledReason:r}){return r===void 0?/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:e,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-chat-card__quick`,onClick:n,children:t})}):/* @__PURE__ */ (0,Z.jsx)(Re,{disabled:!0,reason:r,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-chat-card__quick`,"aria-label":e,children:t})})}function og({size:e}){let{navigation:t}=_m();return t.opensInNewTab?/* @__PURE__ */ (0,Z.jsx)(fn,{size:e}):/* @__PURE__ */ (0,Z.jsx)(Kt,{size:e})}function sg({title:e,body:t,family:n,resultKind:r}){let{logger:i}=_m();return(0,L.useEffect)(()=>{i.warn(`chat result not supported by its card`,{card:n,resultKind:r})},[i,n,r]),/* @__PURE__ */ (0,Z.jsx)(Zp,{className:j(eg,`qa-card-kit--unsupported`),icon:/* @__PURE__ */ (0,Z.jsx)(Rr,{size:16}),tileTone:`muted`,title:e,"aria-label":e,children:/* @__PURE__ */ (0,Z.jsx)(tm,{children:t})})}function cg({label:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head`,children:e}),t]})}var lg=[`step`,`scenario_run`,`api_folder`,`api_saved_request`,`checklist_item`,`checklist_item_step`,`test_run_result`],ug=[`stale_guard`,`secret_expired_or_consumed`,`assistant.change_set.batch_aborted`,`assistant.change_set.apply_unexpected_error`,`assistant.ai_write_disabled`,`variables.duplicate_name`],dg=[`test_plan_assignment_advance`],fg=[`still_composing`,`awaiting_secret_value`],pg=[`change_sets.undo_stale`,`change_sets.undo_expired`,`change_sets.undo_not_eligible`,`assistant.ai_write_disabled`];function mg(e,t){return e.includes(t)}function hg(e,t){return mg(lg,e)?t.cascadeEntity[e]:t.cascadeUnknown($h(e))}function gg(e,t,n){return mg(lg,e)?n.cascadeCount[e](t):n.cascadeCountUnknown($h(e),t)}function _g(e,t){return mg(ug,e)?t.applyError[e]:null}function vg(e,t){return mg(dg,e)?t.undo.sideEffect[e]:$h(e)}function yg(e,t){let n=e.scenarioLabel===null?t.contextProject(e.projectName):t.contextScenario(e.scenarioLabel);return e.environmentLabel===null?n:`${n} \u00B7 ${e.environmentLabel}`}function bg(e,t,n,r){var i;if(Rh(e))return n.earlyTitle[e];let a=(i=t.proposal)==null?void 0:i.items,o=a==null?void 0:a[0];return a===void 0||o===void 0?n.preparing:Kh(a)===null?n.changesCount(a.length):o.actionTitle[r]}function xg(e,t){return e.scenarioLabel===null?t.reviseDraftProject(e.projectName):t.reviseDraftScenario(e.scenarioLabel)}function Sg(e,t){var n,r;let i=e.header.scenarioLabel,a=(n=e.proposal)==null?void 0:n.items,o=(((r=e.proposal)==null?void 0:r.cascade)??[]).filter(e=>e.count>0);return{target:i===void 0?{kind:`project`,label:e.header.projectName}:{kind:`scenario`,label:i},withIt:o.length===0?null:o.map(e=>gg(e.entityType,e.count,t)).join(`, `),edits:a===void 0||a.length===0||Hh(a)?null:a.length}}function Cg(e,t,n){let r=[yg(Qh(e),n)];return t.withIt!==null&&r.push(n.dock.recordWithIt(t.withIt)),t.edits!==null&&r.push(n.dock.editsCount(t.edits)),r.join(` \u00B7 `)}function wg(e,t){if(qh(e))return null;let[n]=e.blockers;if(n!==void 0)return n.label;let r=e.confirmDisabledReason;return r===`kill_switch_off`?t.killSwitch.title:r!==void 0&&mg(fg,r)?t.disabledReason[r]:t.dock.blockedUnworded}var Tg={search:/* @__PURE__ */ (0,Z.jsx)(De,{size:16}),inspect:/* @__PURE__ */ (0,Z.jsx)(vr,{size:16}),target:/* @__PURE__ */ (0,Z.jsx)(en,{size:16}),layers:/* @__PURE__ */ (0,Z.jsx)(Rt,{size:16}),add:/* @__PURE__ */ (0,Z.jsx)(A,{size:16}),delete:/* @__PURE__ */ (0,Z.jsx)(ur,{size:16}),key:/* @__PURE__ */ (0,Z.jsx)(Tr,{size:16}),applied:/* @__PURE__ */ (0,Z.jsx)(we,{size:16}),partial:/* @__PURE__ */ (0,Z.jsx)(D,{size:16}),rejected:/* @__PURE__ */ (0,Z.jsx)(pr,{size:16}),undone:/* @__PURE__ */ (0,Z.jsx)(Qr,{size:16}),superseded:/* @__PURE__ */ (0,Z.jsx)(rn,{size:16}),bug:/* @__PURE__ */ (0,Z.jsx)(or,{size:16}),unknown:/* @__PURE__ */ (0,Z.jsx)(dr,{size:16})};function Eg(e){return Tg[e]}var Dg=/* @__PURE__ */ new Set([`applied`,`rejected_no_op`,`undone`,`superseded`,`closed`]);function Og({state:e,snapshot:t,subject:n,dockRecord:r,decidedInDock:i=!1,children:a,sections:o,note:s,footer:c}){let l=$().cards.changeSet,u=Q(),{t:d}=_h(),f=Vh(e,t),p=Xh(e,t),m=l.marker[f.marker],h=yg(Qh(t),l),g=Rh(e)?null:Dh(t),_=e===`closed`&&t.closure!==void 0?l.closedBy.line[t.closure.reason]:null,v=g===null?void 0:{title:l.bugFiling.title,caption:_===null?jh(g.facts.finding,d):_},y=n??bg(e,t,l,u),b=Dg.has(e)||r!==void 0||i&&e===`applying`,x=v!==void 0&&r===void 0&&!Dg.has(e),S=/* @__PURE__ */ (0,Z.jsx)($p,{tone:f.tone,...f.live?{className:`qa-card-kit__pill-live`}:{},children:m});return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:j(eg,`qa-cs-card`,e===`applying`&&`qa-card-kit--live`,r!==void 0&&`qa-cs-card--awaiting`,x&&`qa-cs-card--need`),tone:r===void 0?x?`warning`:Zh(e,t):`neutral`,icon:Tg[p.kind],tileTone:x?`primary`:p.tone,title:v===void 0?l.title:v.title,caption:v===void 0?h:v.caption,...x?{}:{meta:S},"aria-label":v===void 0?l.cardAria(m):v.title,fold:{title:v===void 0?bg(e,t,l,u):v.title,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:v===void 0?_===null?Cg(t,Sg(t,l),l):_:v.caption}),decided:b,...r===void 0?{}:{handle:r.handle,linked:r.linked,onLinkChange:r.onLinkChange}},sections:o,note:s,footer:c,data:{"data-change-set-state":t.state},children:[v===void 0&&/* @__PURE__ */ (0,Z.jsx)(em,{children:y}),a,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,role:`status`,"aria-live":`polite`,children:l.phaseAnnouncement(m)})]})}function kg({toolCallId:e,entry:t,locked:n,progress:r,onDecide:i,tether:a}){let o=(0,L.useId)(),s=(0,L.useId)(),c=$().cards.changeSet,l=c.dock,u=c.bugFiling,{linked:d,onLinkChange:f}=uf(a,e,`dock`),p=r!==null&&r.current!==null&&r.current.toolCallId===e?r.current.verdict:null,m=Gh(t),{facts:h,bug:g}=t,_=!t.confirmEnabled,v=t.deletes||g!==null;return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:[`qa-ai-chat-dock-card`,v&&`qa-ai-chat-dock-card--warning`,d&&`qa-ai-chat-dock-card--linked`].filter(Boolean).join(` `),"data-testid":`ai-change-set-decision`,"data-tone":v?`warning`:`neutral`,"aria-labelledby":o,"aria-busy":p!==null||void 0,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onFocus:()=>f(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||f(!1)},children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:t.deletes?/* @__PURE__ */ (0,Z.jsx)(D,{}):Eg(t.icon)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:o,children:t.title})}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`description`,content:l.showInFeed,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-dock-card-locate`,"aria-label":l.showInFeedAria(t.title),"data-testid":`ai-change-set-decision-locate`,onClick:()=>a.reveal(e),children:/* @__PURE__ */ (0,Z.jsx)(rr,{"aria-hidden":`true`})})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-body`,children:[g===null?/* @__PURE__ */ (0,Z.jsxs)(`dl`,{className:`qa-ai-chat-dock-card-facts`,"data-testid":`ai-change-set-decision-facts`,children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:h.target.kind===`scenario`?l.factScenario:l.factProject}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:h.target.label}),h.withIt!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:l.factWithIt}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{className:`qa-ai-chat-dock-card-fact--risk`,children:h.withIt})]}),h.edits!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:l.factEdits}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:h.edits})]})]}):/* @__PURE__ */ (0,Z.jsxs)(`dl`,{className:`qa-ai-chat-dock-card-facts`,"data-testid":`ai-change-set-decision-facts`,children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factFinding}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:/* @__PURE__ */ (0,Z.jsx)(Mh,{finding:g.facts.finding})}),/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factSeverity}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:u.severityWord[g.facts.severity]}),/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factWithIt}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:kh(g.facts,u)})]}),_&&t.confirmBlockedReason!==null&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-ai-chat-dock-card-why`,id:s,"data-testid":`ai-change-set-decision-why`,children:[/* @__PURE__ */ (0,Z.jsx)(Be,{"aria-hidden":`true`}),t.confirmBlockedReason]}),/* @__PURE__ */ (0,Z.jsx)(xm,{toolCallId:e})]}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(pr,{size:14}),loading:p===`reject`,disabled:n,onClick:()=>i(e,`reject`),children:c.reject}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:m.variant,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ue,{size:14}),loading:p===`confirm`,disabled:n,"aria-disabled":_||void 0,"aria-describedby":_&&t.confirmBlockedReason!==null?s:void 0,onClick:()=>{_||i(e,`confirm`)},children:g===null?c[m.label]:c.bugFiling.confirm})]})]})}function Ag({conversationId:e,presentToolCallIds:t,dockRef:n,onFocusComposer:r,copy:i}){let a=(0,L.useRef)({conversationId:e,calls:/* @__PURE__ */ new Map}),[o,s]=(0,L.useState)(null);return(0,L.useEffect)(()=>{if(a.current.conversationId!==e){a.current={conversationId:e,calls:/* @__PURE__ */ new Map},s(null);return}let{calls:i}=a.current,o=new Set(t),c=null;for(let[e,t]of[...i])o.has(e)||(i.delete(e),c=t);if(c===null)return;s(c.verdict===`reject`?`reject`:c.destructive?`confirmDelete`:`confirm`);let l=document.activeElement,u=n.current;(l===null||l===document.body||u!==null&&u.contains(l))&&r()},[e,t,n,r]),{pressed(e,t){for(let n of e)a.current.calls.set(n.toolCallId,{verdict:t,destructive:n.destructive})},announcement:o===null?``:i[o]}}var jg=Pn;function Mg(e){if(e===null)return`default`;for(let t of e.facts)if(t.kind===`token`&&jg[`${t.key}.${t.token}`]===`warning`)return`warning`;return`default`}var Ng=2,Pg=`allowedChange`;function Fg(e,t){return t===null?e:e.filter(e=>e.key!==Pg)}function Ig({confirmation:e,confirmationPosition:t,pendingConfirmationCount:n,actionsLocked:r,onConfirm:i,onReject:a}){var o,s;let c=(0,L.useId)(),l=$(),u=Q(),d=l.shell.confirmation,{toolCallId:f,toolName:p,display:m}=e,h=((o=e.operationTitles)==null?void 0:o.map(e=>e[u]))??[],[g]=h,_=Vm(e)&&h.length===1&&g!==void 0?g:null,v=_??((s=e.title)==null?void 0:s[u]),y=_===null?h:[],b=m===null?null:Fg(m.facts,_),x=Mg(m),S=b===null?[]:mm(b,l.cards.confirmation),w=x===`warning`,T=_===null?{reject:d.reject,confirm:d.confirm}:{reject:d.grant.no,confirm:d.grant.yes};return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-ai-chat-dock-card${w?` qa-ai-chat-dock-card--warning`:``}`,"data-testid":`ai-pending-confirmation`,"data-tool-name":p,"data-tone":x,"data-pending-confirmation-count":n,"data-tool-purpose-state":y.length>0?`present`:`absent`,"data-confirmation-kind":_===null?`action`:`lead-grant`,"aria-labelledby":c,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:v===void 0?/* @__PURE__ */ (0,Z.jsx)(dr,{}):w?/* @__PURE__ */ (0,Z.jsx)(D,{}):_===null?/* @__PURE__ */ (0,Z.jsx)(mn,{}):/* @__PURE__ */ (0,Z.jsx)(zt,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:v===void 0?/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:c,"data-tool-name-state":`unrecognized`,children:d.unrecognizedTool}):/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:c,children:v})}),w&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-badge`,"data-testid":`ai-pending-confirmation-warning-badge`,children:/* @__PURE__ */ (0,Z.jsx)($p,{tone:`warning`,children:d.warningBadge})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-body`,children:[y.length>0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-purpose`,children:y.join(` \u00B7 `)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{"data-testid":`ai-pending-confirmation-facts`,"data-confirmation-facts-state":b===null?`absent`:`present`,children:b!==null&&/* @__PURE__ */ (0,Z.jsx)(pm,{facts:b})}),S.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-warning`,"data-testid":`ai-pending-confirmation-warning`,children:e},e))]}),/* @__PURE__ */ (0,Z.jsx)(xm,{toolCallId:f}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[n>=Ng&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-counter`,"data-testid":`ai-pending-confirmation-queue-counter`,children:d.queuePosition.replace(`{index}`,String(t)).replace(`{total}`,String(n))}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(pr,{size:14}),disabled:r,onClick:()=>a(f),children:T.reject}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(we,{size:14}),disabled:r,onClick:()=>i(f),children:T.confirm})]})]})}function Lg(e,t){switch(e.kind){case`ai_run`:return`/ai-runs/${encodeURIComponent(e.id)}`;case`atlas_run`:return t===null?null:`${S(t,`map/history`)}#run-${encodeURIComponent(e.id)}`;default:{let t=e.kind;throw Error(`agentExecutionWebPath: no page for executor kind ${String(t)}`)}}}function Rg({question:e,bar:t}){let n=$().shell.agentQuestions,{project:r}=_m();if(!c(e.asker))return null;let i=Lg(e.asker,r===null?null:r.number);if(i===null)return null;let a=/* @__PURE__ */ (0,Z.jsx)(ig,{path:i,label:n.openRun,accessibleName:n.openRun,emphasis:`secondary`});return t?/* @__PURE__ */ (0,Z.jsx)(sm,{children:a}):a}function zg(e,t){return e.mode===`text`?t.validationText:e.mode===`single`?t.validationSingle:t.validationMultiple}function Bg({batchId:e,question:t,draft:n,showValidation:r,disabled:i,onChange:a}){let o=$().shell.questions,s=(0,L.useId)(),c=(0,L.useRef)(!1),l=`qa-chat-question-${e}-${t.id}`,u=`${s}-error`,d=`${s}-custom`,f=r,p=f?u:void 0,m=e=>{if(t.mode===`single`){a({...n,selectedOptionIds:[e],customActive:!1,skipped:!1});return}let r=n.selectedOptionIds.includes(e)?n.selectedOptionIds.filter(t=>t!==e):[...n.selectedOptionIds,e];a({...n,selectedOptionIds:r,customActive:!1,skipped:!1})},h=e=>{c.current=e,a({...n,customActive:e,selectedOptionIds:e?[]:n.selectedOptionIds,skipped:!1})},g=(0,L.useCallback)(e=>{e&&c.current&&(c.current=!1,e.focus())},[]);return/* @__PURE__ */ (0,Z.jsxs)(`fieldset`,{className:`qa-ai-chat-question-field${n.skipped?` qa-ai-chat-question-field--skipped`:``}${f?` qa-ai-chat-question-field--invalid`:``}`,disabled:i,"data-question-id":t.id,children:[/* @__PURE__ */ (0,Z.jsx)(`legend`,{className:`qa-ai-chat-question-legend`,children:/* @__PURE__ */ (0,Z.jsx)(`h4`,{className:`qa-ai-chat-question-title`,tabIndex:-1,children:t.question})}),t.mode!==`text`&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-options`,children:[t.options.map(e=>{let r=n.selectedOptionIds.includes(e.id);return/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-question-option`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:t.mode===`single`?`radio`:`checkbox`,name:l,checked:r,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,onChange:()=>m(e.id)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-question-option-copy`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-label`,children:e.label}),e.description&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-detail`,children:e.description})]}),e.recommended&&/* @__PURE__ */ (0,Z.jsx)($p,{dot:!1,className:`qa-ai-chat-question-recommended`,children:o.recommended})]},e.id)}),t.allowCustom&&/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-question-option`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:t.mode===`single`?`radio`:`checkbox`,name:l,checked:n.customActive,"aria-controls":n.customActive?d:void 0,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,onChange:e=>h(e.currentTarget.checked)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-copy`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-label`,children:o.customChoice})})]})]}),(t.mode===`text`||n.customActive)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:d,className:`qa-ai-chat-question-custom`,children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`${d}-input`,children:t.mode===`text`?o.textAnswerLabel:o.customAnswerLabel}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:g,id:`${d}-input`,value:n.customText,placeholder:t.mode===`text`?o.textAnswerPlaceholder:o.customAnswerPlaceholder,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,"data-question-text-input":!0,onChange:e=>a({...n,customText:e.currentTarget.value,skipped:!1})})]}),t.skippable&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-local-actions`,children:/* @__PURE__ */ (0,Z.jsx)(C,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>{a({...n,skipped:!n.skipped,selectedOptionIds:[],customActive:!1,customText:``})},children:n.skipped?o.restoreQuestion:o.skipQuestion})}),f&&/* @__PURE__ */ (0,Z.jsx)(`p`,{id:u,className:`qa-ai-chat-question-validation`,role:`alert`,children:zg(t,o)})]})}function Vg(e){return e.origin===`agent`}function Hg(e){return p(e)?e.payload:null}function Ug(e,t){let n=t.questions;if(e.status!==`answered`){let r=Vg(e)&&e.status===`superseded`;return Gg(n,e.status,r?t.agentQuestions.askerEnded:null)}let r=e.answers.length>0&&e.answers.every(e=>`skip`in e);return Vg(e)?Wg(n,r):e.continuationStatus===`pending`?{title:n.answeredTitle,badge:n.continuationPendingBadge,tone:`muted`,allSkipped:r,outcome:null}:e.continuationStatus===`running`?{title:n.answeredTitle,badge:n.continuationRunningBadge,tone:`warning`,allSkipped:r,outcome:null}:e.continuationStatus===`failed`?{title:n.answeredTitle,badge:n.continuationFailedBadge,tone:`error`,allSkipped:r,outcome:null}:Wg(n,r)}function Wg(e,t){return{title:e.answeredTitle,badge:t?e.skippedBadge:e.answeredBadge,tone:t?`muted`:`success`,allSkipped:t,outcome:null}}function Gg(e,t,n){let r=t===`cancelled`;return{title:r?e.cancelledTitle:e.supersededTitle,badge:r?e.cancelledBadge:e.supersededBadge,tone:`muted`,allSkipped:!1,outcome:n}}function Kg(e,t){return Ug(e,t).badge}function qg(e,t,n){switch(e){case`retryable`:return{badge:t.retryErrorBadge,actionLine:null,canCancel:!0,action:n.onRetry,actionLabel:t.retry,Icon:he};case`nonretryable`:return{badge:t.nonretryableBadge,actionLine:t.nonretryableDescription,canCancel:!1,action:void 0,actionLabel:null,Icon:he};case`stale`:return{badge:t.staleBadge,actionLine:null,canCancel:!1,action:n.onRefresh,actionLabel:t.refresh,Icon:Pe};case`unauthorized`:return{badge:t.unauthorizedBadge,actionLine:t.unauthorizedDescription,canCancel:!1,action:void 0,actionLabel:null,Icon:he};case`unavailable`:return{badge:t.unavailableBadge,actionLine:null,canCancel:!0,action:n.onRetry,actionLabel:t.retry,Icon:he};default:throw Error(`Unhandled question action error kind: ${e}`)}}function Jg(e,t){return qg(e,t,{}).badge}function Yg({onRetry:e}){let t=$().shell.questions;return e?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-inline-status`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-status-icon qa-ai-chat-question-status-icon--error`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(he,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-status-actions`,children:/* @__PURE__ */ (0,Z.jsx)(C,{type:`button`,variant:`primary`,size:`sm`,onClick:e,children:t.retry})})]}):null}function Xg({batchId:e,kind:t,declineLabel:n,onCancel:r,onRetry:i,onRefresh:a}){let o=$().shell.questions,{canCancel:s,action:c,actionLabel:l,actionLine:u,badge:d,Icon:f}=qg(t,o,{onRetry:i,onRefresh:a});return/* @__PURE__ */ (0,Z.jsx)(Zp,{bare:!0,className:`qa-ai-chat-question-card`,data:{"data-question-batch-id":e,"data-question-state":t},children:/* @__PURE__ */ (0,Z.jsx)(cm,{icon:/* @__PURE__ */ (0,Z.jsx)(f,{size:28}),title:d,text:u??void 0,actions:s||c?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[s&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,onClick:r,children:n}),c&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,onClick:c,children:l})]}):void 0})})}function Zg({batch:e,formattedResolvedAt:t}){let n=$().shell,r=n.questions,i=Ug(e,n),a=Vg(e)?e:null,o=e.status===`answered`,s=!Vg(e)&&e.status===`answered`?e.continuationStatus:null,c=o&&i.allSkipped&&(a!==null||s===`completed`)?`skipped`:e.status,l=[i.outcome===null?null:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:i.outcome},`outcome`),a!==null&&a.status===`answered`&&a.answeredVia===`assistant`?/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Mr,{}),children:n.agentQuestions.viaAssistant},`via`):null].filter(e=>e!==null),u=a===null?t:[a.askerLabel,t].filter(e=>e!==void 0).join(` \u00B7 `);return/* @__PURE__ */ (0,Z.jsx)(Zp,{className:`qa-ai-chat-question-card`,icon:/* @__PURE__ */ (0,Z.jsx)(dr,{size:16}),title:i.title,caption:u,meta:/* @__PURE__ */ (0,Z.jsx)($p,{tone:i.tone===`muted`?`neutral`:i.tone,children:i.badge}),tone:i.tone===`muted`?`neutral`:i.tone,note:l.length===0?void 0:l,footer:a===null?void 0:/* @__PURE__ */ (0,Z.jsx)(Rg,{question:a,bar:!0}),data:{"data-question-batch-id":e.id,"data-question-state":c,"data-continuation-state":s===null?void 0:s},children:o&&/* @__PURE__ */ (0,Z.jsx)(nm,{children:e.questions.map(t=>{let n=e.answers.find(e=>e.questionId===t.id),i=r.unavailableAnswer;if(n&&`skip`in n&&(i=r.skippedAnswer),n&&`customText`in n&&(i=n.customText),n&&`selectedOptionIds`in n){let e=new Set(n.selectedOptionIds),a=t.options.filter(t=>e.has(t.id)).map(e=>e.label);a.length>0&&(i=a.join(r.answerSeparator))}return/* @__PURE__ */ (0,Z.jsx)(rm,{label:t.question,value:i},t.id)})})})}function Qg(){return{selectedOptionIds:[],customActive:!1,customText:``,skipped:!1}}function $g(e){let t=Qg();return e.mode!==`text`||e.prefill===void 0?t:{...t,customText:e.prefill}}function e_(e){return Object.fromEntries(e.map(e=>[e.id,$g(e)]))}function t_(e,t){return t.skipped?e.skippable:t.customActive||e.mode===`text`?t.customText.trim().length>0:t.selectedOptionIds.length>0}function n_(e,t){return e.map(e=>{let n=t[e.id]??Qg();return n.skipped?{questionId:e.id,skip:!0}:e.mode===`text`||n.customActive?{questionId:e.id,customText:n.customText}:{questionId:e.id,selectedOptionIds:n.selectedOptionIds}})}function r_(e,t){return Object.entries(t).reduce((e,[t,n])=>e.split(`{${t}}`).join(String(n)),e)}function i_(){let e=$().shell.questions;return/* @__PURE__ */ (0,Z.jsx)(`article`,{className:`qa-ai-chat-question-card`,role:`status`,"aria-label":e.loading,"data-question-state":`loading`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-question-header`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-header-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(dr,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-heading`,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--title`})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-loading-stack`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--line`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--option`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--option`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--line`})]})]})})}function a_({question:e,controller:t,placement:n}){var r,i;let a=$().shell,o=a.questions,s=Vg(e)?e:null,c=s!==null&&s.asker.kind===`workflow`?s:null,l=c!==null&&c.assumption===null,u=c===null||t.workflowAgentsWorking===void 0?null:t.workflowAgentsWorking(c.asker.id),d=u===null?null:u?a.agentQuestions.workersContinue:a.agentQuestions.agentsIdle,f=s===null?o.cancelAll:a.agentQuestions.decline,p=e.questions.length,m=(0,L.useRef)(null),h=(0,L.useRef)(!1),[g,_]=(0,L.useState)(()=>e_(e.questions)),[v,y]=(0,L.useState)(!1),[b,x]=(0,L.useState)(!1),[S,w]=(0,L.useState)(0),[T,ee]=(0,L.useState)(!1),E=(0,L.useMemo)(()=>Object.fromEntries(e.questions.map(e=>[e.id,t_(e,g[e.id])])),[e.questions,g]),D=Object.values(E).filter(Boolean).length,te=p>=(n===`dock`?2:4),ne=te&&!T,O=p>1,re=((r=t.error)==null?void 0:r.batchId)===e.id?t.error:null,k=t.pendingBatchId===e.id||b,A=((i=t.restoredBatchIds)==null?void 0:i.includes(e.id))??!1;(0,L.useEffect)(()=>{re&&(h.current=!1,x(!1))},[re]);let ie=e=>{var t;let n=((t=m.current)==null?void 0:t.querySelectorAll(`[data-question-id]`))??[];return Array.from(n).find(t=>t.dataset.questionId===e)},ae=t=>{var n;let r=e.questions[t];r&&((n=ie(r.id))==null||(n=n.querySelector(`.qa-ai-chat-question-title`))==null||n.focus())},oe=t=>{var n;let r=e.questions[t];if(!r)return;let i=g[r.id],a=r.mode===`text`||(i==null?void 0:i.customActive);(n=ie(r.id))==null||(n=n.querySelector(a?`[data-question-text-input]`:`[data-question-control]`))==null||n.focus()},se=e=>{ee(!1),w(e),queueMicrotask(()=>ae(e))},ce=()=>{ee(e=>!e),queueMicrotask(()=>ae(S))},j=async e=>{if(!h.current){h.current=!0,x(!0);try{await e()}catch{h.current=!1,x(!1)}}},le=n=>{n==null||n.preventDefault();let r=e.questions.findIndex(e=>!E[e.id]);if(r>=0){y(!0),ne&&w(r),queueMicrotask(()=>oe(r));return}j(()=>t.onAnswer(e.id,e.revision,n_(e.questions,g)))},ue=e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&e.target instanceof HTMLTextAreaElement&&(e.preventDefault(),le())};if(re&&re.kind!==`retryable`)return/* @__PURE__ */ (0,Z.jsx)(Xg,{batchId:e.id,kind:re.kind,declineLabel:f,onCancel:()=>void j(()=>t.onCancel(e.id,e.revision)),onRetry:t.onRetry?()=>void j(()=>t.onRetry(e.id)):void 0,onRefresh:t.onRefresh?()=>void j(()=>t.onRefresh(e.id)):void 0});let de=ne?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-footer-counter`,children:r_(o.questionIndex,{index:S+1,total:p})}):null,fe=ne?[e.questions[S]]:e.questions,pe=[`qa-ai-chat-question-card`,p>1&&!ne&&`qa-ai-chat-question-card--all`,k&&`qa-ai-chat-question-card--sending`,re&&`qa-ai-chat-question-card--error`,l&&`qa-ai-chat-question-card--lead-waits`].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`form`,{ref:m,className:pe,"data-question-batch-id":e.id,"data-asker-kind":s===null?void 0:s.asker.kind,"data-asker-id":s===null?void 0:s.asker.id,"data-question-state":k?`sending`:A?`restored`:`pending`,"aria-busy":k||void 0,noValidate:!0,onSubmit:le,onKeyDown:ue,children:[te&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-progress`,role:`group`,"aria-label":o.progressLabel,children:e.questions.map((e,t)=>{let n=E[e.id]===!0,r=g[e.id].skipped,i=v&&!n,a=r?o.progressSegmentSkipped:n?o.progressSegmentAnswered:o.progressSegmentUnanswered;return/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:[`qa-ai-chat-question-progress-segment`,n&&`qa-ai-chat-question-progress-segment--answered`,i&&`qa-ai-chat-question-progress-segment--invalid`].filter(Boolean).join(` `),"data-question-index":t,"aria-current":ne&&t===S?`true`:void 0,"aria-label":r_(a,{index:t+1}),disabled:k,onClick:()=>se(t)},e.id)})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-question-header`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-header-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(dr,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-heading`,children:[c===null&&/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:o.pendingTitle}),s!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-question-caption`,children:s.askerLabel})]}),l&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-lead-waits`,children:a.agentQuestions.leadWaits}),(re||O)&&/* @__PURE__ */ (0,Z.jsx)($p,{tone:re?`error`:`neutral`,"aria-live":`polite`,children:re?o.retryErrorBadge:r_(o.progress,{resolved:D,total:p})})]}),s!==null&&s.assumption!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-question-assumption`,children:/* @__PURE__ */ (0,Z.jsxs)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Hr,{}),children:[a.agentQuestions.assumptionLabel,`: `,s.assumption]})}),re&&/* @__PURE__ */ (0,Z.jsx)(Yg,{onRetry:t.onRetry?()=>void j(()=>t.onRetry(e.id)):void 0}),fe.map(t=>/* @__PURE__ */ (0,Z.jsx)(Bg,{batchId:e.id,question:t,draft:g[t.id],showValidation:v&&!E[t.id],disabled:k,onChange:e=>_(n=>({...n,[t.id]:e}))},t.id)),te&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Xt,{}),disabled:k,onClick:ce,children:T?o.oneQuestionAtATime:o.showAllQuestions})]}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-question-footer`,children:[s===null?de:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-question-footer-lead`,children:[c===null?/* @__PURE__ */ (0,Z.jsx)(Rg,{question:s,bar:!1}):d!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-footer-note`,children:d}),de]}),ne&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,disabled:S===0||k,onClick:()=>se(S-1),children:o.previousQuestion}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,disabled:S===p-1||k,onClick:()=>se(S+1),children:o.nextQuestion})]}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,disabled:k,onClick:()=>void j(()=>t.onCancel(e.id,e.revision)),children:f}),/* @__PURE__ */ (0,Z.jsxs)(C,{variant:`primary`,size:`sm`,type:`submit`,disabled:k,children:[k&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-spinner`,"aria-hidden":`true`}),k?o.sending:o.submitAnswers]})]})]})}function o_({batch:e,loading:t=!1,controller:n,placement:r=`transcript`}){var i,a;let o=$().shell,s=o.questions;if(t)return/* @__PURE__ */ (0,Z.jsx)(i_,{});if(!e)return null;let c=((i=n.error)==null?void 0:i.batchId)===e.id?n.error:null,l=c?Jg(c.kind,s):e.status===`pending`?``:Kg(e,o),u=e.questions.map(e=>e.question).join(s.answerSeparator),d=e.status===`pending`?/* @__PURE__ */ (0,Z.jsx)(a_,{question:e,controller:n,placement:r},`${e.id}:${e.revision}`):/* @__PURE__ */ (0,Z.jsx)(Zg,{batch:e,formattedResolvedAt:(a=n.formatResolvedAt)==null?void 0:a.call(n,e.resolvedAt)});return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only qa-ai-chat-question-announcement`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:l&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:u}),` `,/* @__PURE__ */ (0,Z.jsx)(`span`,{children:l})]})}),d]})}function s_(e,t){let n=(0,L.useRef)({conversationId:t,ids:/* @__PURE__ */ new Set}),[r,i]=(0,L.useState)({conversationId:t,items:[]});if((0,L.useEffect)(()=>{n.current.conversationId!==t&&(n.current={conversationId:t,ids:/* @__PURE__ */ new Set});let{ids:r}=n.current,a=e.filter(e=>!r.has(e.id));if(a.length!==0){for(let e of a)r.add(e.id);i({conversationId:t,items:a.map(e=>({key:e.id,questions:e.questions.map(e=>e.question)}))})}},[e,t]),r.conversationId!==t)return[];let a=new Set(e.map(e=>e.id));return r.items.filter(e=>a.has(e.key))}function c_({regionLabel:e,conversationId:t,questions:n,questionController:r,confirmation:i,changeSets:a,isDecisionLocked:o,decisionProgress:s,onChangeSetDecision:c,onConfirmAll:l,changeSetTether:u,onFocusComposer:d,launchPlace:f,projectId:p,workflowStatusOf:m}){let h=$(),g=h.shell.confirmation,_=h.shell.questions,v=s_(n,t),y=(0,L.useRef)(null),b=Ag({conversationId:t,presentToolCallIds:a.map(e=>e.toolCallId),dockRef:y,onFocusComposer:d,copy:h.cards.changeSet.dock.decided}),x=n.length>0||i!==null||a.length>0,S=(i==null?void 0:i.items.filter(e=>e.status===`open`&&!Bm(e)))??[],w=a.filter(e=>e.confirmEnabled),T=S.length+w.length,ee=[...S,...w].every(e=>o(e.toolCallId)),E=n.length+((i==null?void 0:i.items.length)??0)+a.length;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[v.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{children:_.arrived(e.questions.join(_.answerSeparator))},e.key)),b.announcement!==``&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:b.announcement})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-zone${x?` qa-ai-chat-dock-zone--open`:``}`,...x?{role:`region`,"aria-label":e}:{},children:/* @__PURE__ */ (0,Z.jsx)(`div`,{children:x&&/* @__PURE__ */ (0,Z.jsxs)(`section`,{ref:y,className:`qa-ai-chat-dock${E>1?` qa-ai-chat-dock--multiple`:``}`,"data-testid":`ai-chat-dock`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-stack`,"data-testid":`ai-chat-dock-stack`,children:[n.map(e=>/* @__PURE__ */ (0,Z.jsx)(o_,{batch:e,controller:r,placement:`dock`},e.id)),i==null?void 0:i.items.map((e,t)=>Bm(e)?/* @__PURE__ */ (0,Z.jsx)(l_,{confirmation:e,actionsLocked:o(e.toolCallId)||e.status!==`open`,place:f,projectId:p,workflowStatusOf:m,onLaunch:i.onConfirm,onCancel:i.onReject},e.toolCallId):/* @__PURE__ */ (0,Z.jsx)(Ig,{confirmation:e,confirmationPosition:t+1,pendingConfirmationCount:i.items.length,actionsLocked:o(e.toolCallId)||e.status!==`open`,onConfirm:i.onConfirm,onReject:i.onReject},e.toolCallId)),a.map(({toolCallId:e,...t})=>/* @__PURE__ */ (0,Z.jsx)(kg,{toolCallId:e,entry:t,locked:o(e),progress:s,onDecide:(e,n)=>{b.pressed([{toolCallId:e,destructive:t.destructive}],n),c(e,n)},tether:u},e))]}),T>1&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,className:`qa-ai-chat-dock-confirm-all`,icon:/* @__PURE__ */ (0,Z.jsx)(Ue,{size:14}),loading:s!==null&&s.confirmAll,disabled:ee,onClick:()=>{b.pressed(w,`confirm`),l(S.map(e=>e.toolCallId),w.map(e=>e.toolCallId))},children:g.confirmAll(T)})]})})})]})}function l_({confirmation:e,actionsLocked:t,place:n,projectId:r,workflowStatusOf:i,onLaunch:a,onCancel:o}){let s=Im(e),c=Hm(e.args);return Lm(s,s===null?null:i(s.workflowId))===`busy`&&s!==null&&c!==null?/* @__PURE__ */ (0,Z.jsx)(Qm,{confirmation:e,proposal:c,busyWith:s,actionsLocked:t,place:n.place,onLaunch:a}):/* @__PURE__ */ (0,Z.jsx)(qm,{confirmation:e,actionsLocked:t,place:n,projectId:r,onLaunch:a,onCancel:o})}var u_=/[\p{Cc}\p{Cf}]+/gu;function d_(e){let t=e.replace(u_,` `).replace(/\s+/gu,` `).trim();return t.length<=60?t:t.slice(0,60).trimEnd()}function f_(e){let t=d_(e);return t===``?null:t}function p_(e,t){return t.title(t.view[e.view])}function m_(e,t){var n;let{context:r}=e,i=[{text:r.window===null?t.lastRuns(Ot.maxRuns,Ot.maxAgeDays):t.window[r.window],missing:!1}],a=(n=r.filters)==null?void 0:n.status;return a!==void 0&&i.push({text:t.status[a],missing:!1}),r.selectedEntity!==void 0&&i.push(h_(r.selectedEntity.type,e.entityName,t)),i}function h_(e,t,n){if(t===null)return{text:n.entity[e],missing:!1};let r=t.trim();return r===``?{text:n.nameUnavailable,missing:!0}:{text:r,missing:!1}}function g_(e,t){let{context:n}=e,r=t.prompts,i=n.selectedEntity!==void 0&&e.entityName!==null?f_(e.entityName):null;switch(n.view){case`overview`:return[r.overviewWeakSpots,...n.window===null?[]:[r.overviewChanged(t.window[n.window])],r.overviewWhereToLook];case`stability`:return[i===null?r.stabilityWhatToFix:r.stabilityWhyScenario(i),r.stabilityCauses];case`weak-spots`:return[r.weakSpotsWhatToCover,...i===null?[]:[r.weakSpotsWhyEntity(i)]];case`bug-hotspots`:return[r.bugHotspotsWhere,r.bugHotspotsStale]}}function __(e){let{report:t,copy:n,locale:r}=e;return t===null?{kind:`tasks`,heading:n.empty.heading,subtext:n.empty.subtext,footnote:n.empty.footnote,chips:Su.map(e=>{let t=xu[e],n=Jm[e];return{id:e,title:t.title[r],hint:t.chip.hint[r],template:t.chip.briefTemplate[r],icon:/* @__PURE__ */ (0,Z.jsx)(n,{"aria-hidden":`true`})}})}:{kind:`report`,heading:n.empty.reportHeading,prompts:g_(t,n.context.report).map((e,t)=>({id:`report-${t}`,text:e}))}}function v_(e){return e.kind===`report`?/* @__PURE__ */ (0,Z.jsx)(cr,{}):/* @__PURE__ */ (0,Z.jsx)(Kr,{})}function y_({welcome:e,draft:t,onSend:n,onInsert:r}){let i=t.trim()!==``,a=e.kind===`tasks`&&t.trim()!==``&&!Cu(t);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-welcome`,"data-testid":`ai-chat-empty-state`,"data-welcome":e.kind,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-welcome-mark`,"aria-hidden":`true`,children:v_(e)}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:e.heading}),e.kind===`report`?e.prompts.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-suggest${i?` qa-ai-chat-suggest--faded`:``}`,children:e.prompts.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,disabled:i,onClick:()=>n(e.text),children:[/* @__PURE__ */ (0,Z.jsx)(Kr,{"aria-hidden":`true`}),e.text]},e.id))}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.subtext}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-tasks${a?` qa-ai-chat-tasks--faded`:``}`,children:e.chips.map(e=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"data-testid":`ai-chat-task-chip-${e.id}`,disabled:a,onClick:()=>r(e.template),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tasks-icon`,children:e.icon}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-tasks-text`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.title}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:e.hint})]})]})},e.id))}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-tasks-hint`,children:e.footnote})]})]})}function b_(e){let t=(0,L.useCallback)(t=>e.subscribe(t),[e]);return(0,L.useSyncExternalStore)(t,()=>e.get())}var x_=()=>()=>{};function S_(e){let t=(0,L.useCallback)(t=>e===null?x_():e.subscribe(t),[e]);return(0,L.useSyncExternalStore)(t,()=>e===null?null:e.get())}function C_({projectName:e,pinned:t,historyOpen:n,historyAvailable:r,onOpenHistory:i,onNewConversation:a,hostActions:o,copy:s}){return/* @__PURE__ */ (0,Z.jsx)(`header`,{className:`qa-ai-chat-header`,children:/* @__PURE__ */ (0,Z.jsxs)(Ge,{children:[t===null&&/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:s.history,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,"aria-expanded":n,disabled:!r,onClick:i,"data-testid":`ai-chat-history-button`,children:/* @__PURE__ */ (0,Z.jsx)(jr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-who`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-header-tile`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Kr,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-names`,children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{className:`qa-ai-chat-header-title`,children:t===null?s.title:/* @__PURE__ */ (0,Z.jsx)(w_,{source:t.title})}),t===null?e===null?/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project qa-ai-chat-header-project--missing`,children:s.noProject}):/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project`,children:e}):/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project`,children:/* @__PURE__ */ (0,Z.jsx)(w_,{source:t.caption})})]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-actions`,children:[t===null&&/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:s.newConversation,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:a,"data-testid":`ai-chat-new-conversation`,children:/* @__PURE__ */ (0,Z.jsx)(A,{"aria-hidden":`true`})})}),o]})]})})}function w_({source:e}){return b_(e)}var T_=/* @__PURE__ */ new Set([`managed`]),E_={fastest:0,balanced:1,smartest:2};function D_(e,t){return e===`key_invalid`?t.disabledKeyInvalid:e===`no_key`?t.disabledNoKey:null}var O_=[];function k_({capabilities:e,selectionId:t,onSelect:n,resolvedEcho:r,overrideRejected:i,isStreaming:a,onManageKeys:o,onUpgrade:s,openRequest:c,flagged:l}){let u=$().shell.modelPicker,d=e.status===`loading`,f=e.status===`ready`?e.value:null,p=f===null?O_:f.groups,[m,h]=(0,L.useState)(!1),[g,_]=(0,L.useState)(-1),v=(0,L.useRef)(null),y=(0,L.useRef)(null),b=(0,L.useId)(),x=p,S=[],C=[];for(let e of x)if(T_.has(e.source))for(let t of e.models)S.push({model:t,source:e.source});else C.push(e);let w=[...S].sort((e,t)=>E_[e.model.tier]-E_[t.model.tier]),T=[...w,...C.flatMap(e=>e.models.map(t=>({model:t,source:e.source})))],E=f===null?null:En(f,t,r),D=f===null||a,te=E!==null&&(E.source===`personal`||E.source===`company`)?E.source===`personal`?u.byok.personal:u.byok.company:null,ne=(0,L.useRef)(T),re=(0,L.useRef)(E);(0,L.useEffect)(()=>{ne.current=T,re.current=E}),(0,L.useEffect)(()=>{if(!m)return;let e=e=>{var t,n;let r=e.target;!((t=v.current)!=null&&t.contains(r))&&!((n=y.current)!=null&&n.contains(r))&&h(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[m]),(0,L.useEffect)(()=>{if(m){var e;let t=re.current,n=ne.current,r=t?n.findIndex(e=>e.model.id===t.model.id&&e.source===t.source):-1;_(r>=0?r:0),(e=y.current)==null||e.focus()}},[m]);let k=(0,L.useCallback)(()=>{D||h(!0)},[D]),A=(0,L.useCallback)(()=>{var e;h(!1),(e=v.current)==null||e.focus()},[]),ie=(0,L.useRef)(k);(0,L.useEffect)(()=>{ie.current=k},[k]),(0,L.useEffect)(()=>{c!==0&&ie.current()},[c]);let ae=(0,L.useCallback)((e,t)=>{bn(e)&&(n(t,e),A())},[n,A]),oe=(0,L.useCallback)(e=>{if(e.key===` `)e.preventDefault(),m?A():k();else if(e.key===`Enter`){if(e.preventDefault(),m){let e=T[g];e?ae(e.model,e.source):A()}else k()}else e.key===`Escape`&&A()},[m,k,A,T,g,ae]),se=(0,L.useCallback)(e=>{if(e.key===`Escape`){e.preventDefault(),A();return}if(e.key===`ArrowDown`){e.preventDefault(),_(e=>Math.min(e+1,T.length-1));return}if(e.key===`ArrowUp`){e.preventDefault(),_(e=>Math.max(e-1,0));return}if(e.key===`Enter`&&g>=0){e.preventDefault();let t=T[g];t&&ae(t.model,t.source)}},[A,T,g,ae]);(0,L.useEffect)(()=>{if(!m||g<0)return;let e=y.current;if(!e)return;let t=e.querySelector(`[data-option-index="${g}"]`);t==null||t.scrollIntoView({block:`nearest`})},[g,m]);let ce=()=>d?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-skeleton`,"data-testid":`model-picker-trigger-skeleton`,"aria-label":u.loading}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[E?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-trigger-name`,children:E.model.shortName}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-trigger-name qa-ai-chat-modelpicker-trigger-name--empty`,children:u.selectModel}),te!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-trigger-provenance`,"data-testid":`model-picker-trigger-provenance`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(Tr,{className:`qa-ai-chat-modelpicker-trigger-icon`,size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-sr-only`,children:te})]}),/* @__PURE__ */ (0,Z.jsx)(ee,{className:`qa-ai-chat-modelpicker-trigger-chevron${m?` qa-ai-chat-modelpicker-trigger-chevron--open`:``}`,size:12,"aria-hidden":`true`})]}),j=0,le=(e,t,n)=>{let r=j++,i=(E==null?void 0:E.model.id)===e.id&&(E==null?void 0:E.source)===t,a=g===r,o=bn(e),s=!o,c=D_(e.disabledReason,u),l=!n,d=n&&!s?u.tier[e.tier]:null,f=l?t===`personal`?u.byok.personal:u.byok.company:null,p=s&&c?`${e.name} \u2014 ${c}, ${u.disabledSuffixA11y}`:void 0;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:[`qa-ai-chat-modelpicker-option`,i?`qa-ai-chat-modelpicker-option--active`:``,a?`qa-ai-chat-modelpicker-option--focused`:``,s?`qa-ai-chat-modelpicker-option--disabled`:``,d||s&&c?`qa-ai-chat-modelpicker-option--two-line`:``].filter(Boolean).join(` `),"data-testid":`model-picker-option-${e.id}`,"data-source":t,"data-model":e.id,"data-option-index":r,role:`option`,"aria-selected":i,"aria-disabled":s?`true`:void 0,"aria-label":p,onClick:o?()=>ae(e,t):void 0,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-option-main`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-option-name`,children:e.name}),d!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-tier-descriptor`,"data-testid":`model-picker-tier-${e.id}`,children:d}),s&&c!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-disabled-reason${e.disabledReason===`key_invalid`?` qa-ai-chat-modelpicker-disabled-reason--invalid`:``}`,"data-testid":`model-picker-disabled-reason-${e.id}`,children:c})]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-option-right`,children:[f!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-provenance`,"data-testid":`model-picker-provenance-${e.id}`,children:f}),i&&/* @__PURE__ */ (0,Z.jsx)(Ue,{className:`qa-ai-chat-modelpicker-check`,size:12,"data-testid":`model-picker-active-check`,"aria-label":u.currentlySelected})]})]},e.id)},ue=()=>m?/* @__PURE__ */ (0,Z.jsxs)(`div`,{ref:y,className:`qa-ai-chat-modelpicker-dropdown`,"data-testid":`model-picker-dropdown`,role:`listbox`,id:b,"aria-label":u.selectModel,onKeyDown:se,tabIndex:-1,children:[/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[w.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-group`,"data-testid":`model-picker-group-unified`,children:w.map(({model:e,source:t})=>le(e,t,!0))}),C.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-group`,"data-testid":`model-picker-group-${e.source}`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-group-label`,children:e.source===`personal`?u.byokHeader.personal:u.byokHeader.company}),e.models.map(t=>le(t,e.source,!1))]},e.source))]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-footer`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-footer-note`,"data-testid":`model-picker-footer-note`,children:u.footerNote}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-modelpicker-manage-keys`,onClick:()=>{A(),o()},"data-testid":`model-picker-manage-keys-link`,children:u.manageKeys})]}),f!==null&&!f.isEnterprise&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-upsell`,"data-testid":`model-picker-upsell`,children:[/* @__PURE__ */ (0,Z.jsx)(Tr,{size:12,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-upsell-text`,children:u.upsell}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-modelpicker-upsell-link`,onClick:()=>{A(),s()},children:u.upgrade})]})]}):null,de=()=>i?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-reject-error`,"data-testid":`model-picker-reject-error`,role:`alert`,children:u.rejected}):null,fe=E===null?null:te===null?E.model.name:`${E.model.name} \u00B7 ${te}`,pe=/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:v,type:`button`,className:`qa-ai-chat-modelpicker-trigger${i?` qa-ai-chat-modelpicker-trigger--rejected`:``}${l?` qa-ai-chat-modelpicker-trigger--flagged`:``}${D?` qa-ai-chat-modelpicker-trigger--disabled`:``}`,"data-testid":`model-picker-trigger`,"data-provider":E==null?void 0:E.source,"data-model":E==null?void 0:E.model.id,onClick:()=>m?A():k(),onKeyDown:oe,"aria-haspopup":`listbox`,"aria-expanded":m,"aria-controls":m?b:void 0,"aria-disabled":D,disabled:!1,children:ce()});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker`,children:[/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`description`,content:fe,disabled:fe===null,children:pe}),de(),ue()]})}var A_={"ai-keys":`/settings/personal/ai`,"billing-plan":`/settings/company/billing/plan`};function j_(e){return A_[e]}function M_({copy:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-drop`,"aria-hidden":`true`,"data-testid":`ai-chat-attachment-drop`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-drop-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-drop-icon`,children:/* @__PURE__ */ (0,Z.jsx)($r,{})}),/* @__PURE__ */ (0,Z.jsx)(`h4`,{children:e.title}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{children:[e.types,/* @__PURE__ */ (0,Z.jsx)(`br`,{}),e.sizes]})]})})}function N_(e){return Array.from(e.dataTransfer.types).includes(`Files`)}function P_(e){let[t,n]=(0,L.useState)(!1),r=(0,L.useRef)(0),i=e!==null,a=(0,L.useCallback)(()=>{r.current=0,n(!1)},[]);return(0,L.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,a]),(0,L.useEffect)(()=>{i||a()},[i,a]),{active:t,handlers:{onDragEnter:(0,L.useCallback)(e=>{i&&N_(e)&&(e.preventDefault(),r.current+=1,n(!0))},[i]),onDragOver:(0,L.useCallback)(e=>{i&&N_(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)},[i]),onDragLeave:(0,L.useCallback)(e=>{i&&N_(e)&&(r.current=Math.max(0,r.current-1),r.current===0&&n(!1))},[i]),onDrop:(0,L.useCallback)(t=>{if(e===null||!N_(t))return;t.preventDefault(),a();let n=Array.from(t.dataTransfer.files);n.length>0&&e(n)},[a,e])}}}var F_=[137,80,78,71,13,10,26,10],I_=[255,216,255],L_=[37,80,68,70,45],R_=[82,73,70,70],z_=[87,69,66,80];function B_(e,t){if(e.length===0)return{ok:!1,reason:`empty`};let n=H_(e);if(n===null)return Sn(t.mediaType)?U_(e)?{ok:!0,mediaType:t.mediaType,image:null}:{ok:!1,reason:`text_not_utf8`}:{ok:!1,reason:`content_mismatch`};if(n!==t.mediaType)return{ok:!1,reason:`content_mismatch`};if(n===`application/pdf`)return{ok:!0,mediaType:n,image:null};let r=W_(e,n);return r===null?{ok:!1,reason:`image_header_unreadable`}:{ok:!0,mediaType:n,image:r}}function V_(e,t,n=0){return e.length<n+t.length?!1:t.every((t,r)=>e[n+r]===t)}function H_(e){return V_(e,F_)?`image/png`:V_(e,I_)?`image/jpeg`:V_(e,R_)&&V_(e,z_,8)?`image/webp`:V_(e,L_)?`application/pdf`:null}function U_(e){if(e.includes(0))return!1;try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(e),!0}catch(e){if(e instanceof TypeError)return!1;throw e}}function W_(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=t===`image/png`?K_(e,n):t===`image/jpeg`?Y_(e,n):tv(e,n);return r===null||r.width<1||r.height<1?null:r}var G_=[73,72,68,82];function K_(e,t){return e.length<24||!V_(e,G_,12)||t.getUint32(8)<13?null:{width:t.getUint32(16),height:t.getUint32(20)}}function q_(e){return e===1||e>=208&&e<=216}function J_(e){return e>=192&&e<=207&&e!==196&&e!==200&&e!==204}function Y_(e,t){let n=2;for(;n<e.length;){if(e[n]!==255)return null;for(;n<e.length&&e[n]===255;)n+=1;let r=e[n];if(r===void 0)return null;if(n+=1,q_(r))continue;if(r===217||r===218||n+2>e.length)return null;let i=t.getUint16(n);if(i<2)return null;if(J_(r))return i<7||n+7>e.length?null:{width:t.getUint16(n+5),height:t.getUint16(n+3)};n+=i}return null}var X_=[86,80,56,32],Z_=[86,80,56,76],Q_=[86,80,56,88],$_=[157,1,42],ev=47;function tv(e,t){if(V_(e,X_,12))return e.length<30||!V_(e,$_,23)?null:{width:t.getUint16(26,!0)&16383,height:t.getUint16(28,!0)&16383};if(V_(e,Z_,12)){if(e.length<25||e[20]!==ev)return null;let n=t.getUint32(21,!0);return{width:(n&16383)+1,height:(n>>>14&16383)+1}}return V_(e,Q_,12)?e.length<30?null:{width:nv(t,24)+1,height:nv(t,27)+1}:null}function nv(e,t){return e.getUint8(t)|e.getUint8(t+1)<<8|e.getUint8(t+2)<<16}var rv=`.png,.jpg,.jpeg,.webp,.pdf,.txt,.md`,iv=/* @__PURE__ */ new Map([[`png`,`image/png`],[`jpg`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`webp`,`image/webp`],[`pdf`,`application/pdf`],[`txt`,`text/plain`],[`md`,`text/markdown`]]);function av(e){let t=e.lastIndexOf(`.`);return t<=0||t===e.length-1?null:e.slice(t+1).toLowerCase()}function ov(e){let t=av(e);if(t===null)return null;let n=iv.get(t);return n===void 0?null:n}function sv(e,t,n){return n===null?{kind:`type`}:e.length>255?{kind:`file_name`}:t>_n[n]?{kind:`too_large`,mediaType:n}:null}function cv(e,t){if(t===null)return null;if(e.upload.kind===`uploaded`){let n=vn(e.upload.attachment,t.attachments);return n.ok?null:n.fact}let{check:n}=e;if(n.kind!==`passed`)return null;let r=yn({mediaType:n.mediaType,byteSize:e.byteSize,image:n.image},t.attachments);return r.ok?null:r.fact}function lv(e,t){return e.check.kind===`passed`&&e.upload.kind===`idle`&&cv(e,t)===null}function uv(e,t){return e.upload.kind===`uploaded`&&t-Date.parse(e.upload.attachment.createdAt)>=864e5}function dv(e,t,n){let{check:r,upload:i}=e;if(r.kind===`refused`)return{kind:`local_refused`,refusal:r.refusal};if(i.kind===`refused`)return{kind:`server_refused`,errorCode:i.errorCode};if(i.kind===`failed`)return{kind:`failed`,cause:i.cause};if(uv(e,n))return{kind:`expired`};let a=cv(e,t);if(a!==null)return{kind:`model_refused`,fact:a};if(r.kind===`reading`)return{kind:`reading`};switch(i.kind){case`uploaded`:return{kind:`ready`,attachment:i.attachment};case`uploading`:case`idle`:return{kind:`uploading`}}}function fv(e){return e===`local_refused`||e===`server_refused`||e===`failed`||e===`expired`||e===`model_refused`}function pv(e){return fv(e.kind)}function mv(e,t){return e.length===0?null:e.some(pv)?`refused`:e.some(e=>e.kind===`uploading`||e.kind===`reading`)?`uploading`:t?null:`no_text`}function hv(e){return e.check.kind===`passed`&&Tn(e.check.mediaType)&&e.check.image!==null}function gv(e){return e.map(e=>{if(e.upload.kind!==`uploaded`)throw Error(`uploadedAttachments: the chip ${e.key} is not uploaded`);return e.upload.attachment})}var _v=class{constructor(){this.shares=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Map}set(e,t){this.shares.get(e)!==t&&(this.shares.set(e,t),this.notify(e))}delete(e){this.shares.delete(e)&&this.notify(e)}get(e){let t=this.shares.get(e);return t===void 0?0:t}subscribe(e,t){let n=this.listeners.get(e);return n===void 0&&(n=/* @__PURE__ */ new Set,this.listeners.set(e,n)),n.add(t),()=>{let n=this.listeners.get(e);n!==void 0&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){let t=this.listeners.get(e);if(t!==void 0)for(let e of t)e()}};function vv(e,t){let n=(0,L.useCallback)(n=>e.subscribe(t,n),[e,t]),r=(0,L.useCallback)(()=>e.get(t),[e,t]);return(0,L.useSyncExternalStore)(n,r,r)}var yv=6e4;function bv(e){let{totalBytes:t,onStall:n}=e,r=0,i=!1,a=null,o=()=>{a!==null&&clearTimeout(a),a=null},s=()=>{o(),a=setTimeout(()=>{a=null,i=!0,n()},yv)};return s(),{advance(e){if(!i){if(e===0){r=0,s();return}e<=r||(r=e,e>=t?o():s())}},stop(){i=!0,o()}}}var xv=6e4,Sv=0,Cv=()=>`attachment-${++Sv}`,wv=408;function Tv(e){return!(e instanceof On)||e.status===0||e.status===wv?{kind:`failed`,cause:`network`}:e.status>=500?{kind:`failed`,cause:`server`}:{kind:`refused`,errorCode:e.errorCode}}function Ev({http:e,projectId:t,model:n,resetKey:r,logger:i}){let[a,o]=(0,L.useState)([]),[s,c]=(0,L.useState)(()=>Date.now()),l=(0,L.useRef)(/* @__PURE__ */ new Map),[u]=(0,L.useState)(()=>new _v),d=(0,L.useRef)(a);(0,L.useEffect)(()=>{d.current=a},[a]);let f=(0,L.useCallback)((e,t)=>{o(n=>n.map(n=>n.key===e?t(n):n))},[]),p=(0,L.useCallback)(t=>{var n;if((n=l.current.get(t.key))==null||n.abort(),l.current.delete(t.key),t.upload.kind!==`uploaded`)return;let{id:r}=t.upload.attachment;Ql(e,r).catch(e=>{i.warn(`chat attachment discard failed`,{attachmentId:r,status:e instanceof On?e.status:null,errorCode:e instanceof On?e.errorCode:null})})},[e,i]),m=(0,L.useCallback)(()=>{for(let e of d.current)p(e);d.current=[],o([])},[p]),h=(0,L.useRef)({resetKey:r,projectId:t});(0,L.useEffect)(()=>{let e=h.current;(e.resetKey!==r||e.projectId!==t)&&(h.current={resetKey:r,projectId:t},m())},[r,t,m]),(0,L.useEffect)(()=>()=>{for(let e of l.current.values())e.abort();l.current.clear()},[]);let g=(0,L.useCallback)((e,t,n)=>{t.arrayBuffer().then(t=>{let r=new Uint8Array(t),i=B_(r,{mediaType:n}),a=i.ok?{kind:`passed`,mediaType:i.mediaType,bytes:r,image:i.image}:{kind:`refused`,refusal:{kind:`bytes`,reason:i.reason}};f(e,e=>({...e,check:a}))}).catch(t=>{i.warn(`chat attachment read failed`,{message:t instanceof Error?t.message:String(t)}),f(e,e=>({...e,check:{kind:`refused`,refusal:{kind:`unreadable`}}}))})},[i,f]),_=(0,L.useCallback)(e=>{let t=e.map(e=>{let t=ov(e.name),n=sv(e.name,e.size,t);return{key:Cv(),file:e,fileName:e.name,byteSize:e.size,declared:t,check:n===null?{kind:`reading`}:{kind:`refused`,refusal:n},upload:{kind:`idle`}}});o(e=>[...e,...t]);for(let e of t)e.check.kind===`reading`&&e.declared!==null&&g(e.key,e.file,e.declared)},[g]),v=(0,L.useCallback)(n=>{let{check:r}=n;if(r.kind!==`passed`||t===null)return;let a=new AbortController;l.current.set(n.key,a),u.set(n.key,0),f(n.key,e=>({...e,upload:{kind:`uploading`}}));let o=r.bytes.byteLength,s=!1,c=0,d=bv({totalBytes:o,onStall:()=>{s=!0,a.abort(new DOMException(`No upload progress for 60 s`,`TimeoutError`))}});Xl(e,{projectId:t,fileName:n.fileName,mediaType:r.mediaType,bytes:r.bytes,signal:a.signal,onProgress:e=>{a.signal.aborted||(d.advance(e),c=Math.max(c,e),u.set(n.key,c/o))}}).then(e=>{d.stop(),u.delete(n.key),l.current.delete(n.key),f(n.key,t=>({...t,upload:{kind:`uploaded`,attachment:e}}))}).catch(e=>{if(d.stop(),u.delete(n.key),a.signal.aborted&&!s)return;l.current.delete(n.key);let t=s?{kind:`failed`,cause:`network`}:Tv(e);i.warn(`chat attachment upload failed`,{mediaType:r.mediaType,byteSize:n.byteSize,stalled:s,status:e instanceof On?e.status:null,errorCode:e instanceof On?e.errorCode:null}),f(n.key,e=>({...e,upload:t}))})},[e,i,u,t,f]);(0,L.useEffect)(()=>{for(let e of a)t!==null&&lv(e,n)&&!l.current.has(e.key)&&v(e)},[a,n,t,v]);let y=a.some(e=>e.upload.kind===`uploaded`);(0,L.useEffect)(()=>{if(!y)return;c(Date.now());let e=setInterval(()=>c(Date.now()),xv);return()=>clearInterval(e)},[y]);let b=(0,L.useCallback)(e=>{let t=d.current.find(t=>t.key===e);t!==void 0&&(p(t),o(t=>t.filter(t=>t.key!==e)))},[p]),x=(0,L.useCallback)(e=>{f(e,e=>({...e,upload:{kind:`idle`}}))},[f]),S=(0,L.useCallback)(()=>{let e=d.current;return d.current=[],o([]),e},[]),C=(0,L.useCallback)(e=>{o(t=>[...e,...t])},[]),w=(0,L.useMemo)(()=>a.map(e=>({attachment:e,view:dv(e,n,s)})),[a,n,s]);return{items:w,model:n,progress:u,sendBlock:(0,L.useCallback)(e=>mv(w.map(e=>e.view),e),[w]),add:_,remove:b,retry:x,detach:S,reattach:C}}function Dv({host:e,projectId:t,model:n,resetKey:r,accepting:i}){let a=(0,L.useMemo)(()=>n===null?null:{name:n.name,attachments:n.attachments},[n]),o=Ev({http:e.http,projectId:t,model:a,resetKey:r,logger:e.logger}),{add:s}=o,c=P_(i?s:null),[l,u]=(0,L.useState)(0);return{attachments:o,drop:c,modelListRequest:l,openModelList:(0,L.useCallback)(()=>u(e=>e+1),[]),modelFlagged:o.items.some(e=>e.view.kind===`model_refused`)}}function Ov({label:e}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-tile qa-ai-chat-filechip-tile--doc`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e})]})}function kv({fileName:e}){let{base:t,ext:n}=Jd(e);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-name`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-name-base`,children:t}),n!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-name-ext`,children:n})]})}function Av(e,t){let[n,r]=(0,L.useState)(null);return(0,L.useEffect)(()=>{if(!t)return;let n=URL.createObjectURL(e);return r(n),()=>{URL.revokeObjectURL(n),r(null)}},[t,e]),n}function jv({attachment:e,thumbnail:t,bad:n,typeLabel:r}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-att-tile-wrap`,children:[t===null?/* @__PURE__ */ (0,Z.jsx)(Ov,{label:Mv(e,r)}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-tile`,children:/* @__PURE__ */ (0,Z.jsx)(`img`,{src:t,alt:``})}),n&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-bad`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsxs)(`svg`,{viewBox:`0 0 24 24`,children:[/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M12 6v7`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M12 18h.01`})]})})]})}function Mv(e,t){if(e.declared!==null)return t[e.declared];let n=av(e.fileName);return n===null?``:n.slice(0,3).toUpperCase()}function Nv({item:e,progress:t,facts:n,reason:r,justUploaded:i,onRemove:a,onRetry:o,onPickModel:s,copy:c,typeLabel:l}){let{attachment:u,view:d}=e,f=(0,L.useId)(),p=Av(u.file,hv(u)),m=r!==null,h=vv(t,u.key),g=d.kind===`uploading`?h:null,_=g!==null,v=d.kind===`failed`?c.retry:d.kind===`expired`?c.reupload:null,y=[`qa-ai-chat-att`,_?`qa-ai-chat-att--up`:``,m?`qa-ai-chat-att--err`:``,i&&d.kind===`ready`?`qa-ai-chat-att--done`:``].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:y,role:`listitem`,style:g===null?void 0:{"--qa-ai-chat-att-progress":g},"aria-describedby":m?f:void 0,"data-testid":`ai-chat-attachment`,"data-state":d.kind,children:[/* @__PURE__ */ (0,Z.jsx)(jv,{attachment:u,thumbnail:p,bad:m,typeLabel:l}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-att-text`,children:m?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-att-name-row`,children:[/* @__PURE__ */ (0,Z.jsx)(kv,{fileName:u.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,children:n})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-att-why`,id:f,"data-testid":`ai-chat-attachment-reason`,children:[r.kind===`sentence`?r.text:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r.lead,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-att-link`,onClick:s,"data-testid":`ai-chat-attachment-pick-model`,children:c.pickModel})]}),v!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[` `,/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-att-link qa-ai-chat-att-act`,onClick:o,"data-testid":`ai-chat-attachment-retry`,children:[/* @__PURE__ */ (0,Z.jsx)(Vr,{"aria-hidden":`true`}),v]})]})]})]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(kv,{fileName:u.fileName}),g===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,children:n}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,role:`progressbar`,"aria-label":c.uploadingLabel(u.fileName),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(g*100),children:c.uploading(Math.round(g*100))})]})}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:c.remove(u.fileName),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-att-remove`,onClick:a,"data-testid":`ai-chat-attachment-remove`,children:/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`})})})]})}function Pv(e,t,n){let r=Kd(e.byteSize,t,n.units),{upload:i,check:a}=e;return i.kind===`uploaded`?qd(i.attachment,t,n):a.kind===`passed`&&a.image!==null?n.facts.image(a.image.width,a.image.height,r):n.facts.text(r)}function Fv(e,t){switch(e.kind){case`type`:return t.refusal.type;case`file_name`:return t.refusal.fileName;case`unreadable`:return t.refusal.unreadable;case`too_large`:return t.refusal.tooLarge(Tn(e.mediaType)?t.refusal.limit.image:Sn(e.mediaType)?t.refusal.limit.text:t.refusal.limit.pdf);case`bytes`:switch(e.reason){case`empty`:return t.refusal.empty;case`content_mismatch`:return t.refusal.type;case`text_not_utf8`:return t.refusal.textNotUtf8;case`image_header_unreadable`:return t.refusal.unreadable}}}function Iv(e,t,n,r){switch(e){case Dn.contentMismatch:return n.refusal.contentMismatch(r.typeLabel[t]);case Dn.textNotUtf8:return n.refusal.textNotUtf8;case Dn.pdfEncrypted:return n.refusal.pdfEncrypted;case Dn.pdfUnreadable:case Dn.imageUnreadable:return n.refusal.unreadable;case Dn.emptyFile:return n.refusal.empty;case Dn.invalidFileName:return n.refusal.fileName;case`FST_ERR_CTP_BODY_TOO_LARGE`:return Fv({kind:`too_large`,mediaType:t},n);case`FST_ERR_CTP_INVALID_MEDIA_TYPE`:return n.refusal.type;default:return n.refusal.server}}function Lv(e,t,n,r){let{reason:i}=r.unsent,a=e=>Kd(e,n,r.units),o=e=>Gd(e,n),s=t=>{if(t===null)throw Error(`factWords: no number for the fact ${e}`);return t};switch(e){case`image_bytes`:return i.imageBytes(a(Math.floor(s(t.imageMaxBase64Bytes)*3/4)));case`image_edge`:return i.imageEdge(o(s(t.imageMaxEdgePx)));case`image_patches`:{let e=t.imageMaxPatches;if(e===null)throw Error(`factWords: no number for the fact image_patches`);return i.imagePatches(o(Math.floor(e.maxPatches*e.patchPx**2/1e6)))}case`pdf_pages`:return i.pdfPages(o(s(t.pdfMaxPagesPerRequest)));case`file_bytes`:return i.fileBytes(a(s(t.fileMaxBytes)));case`request_bytes`:return i.requestBytes(a(s(t.requestMaxBytes)));case`media_type`:case`files_bytes`:case`images_count`:case`many_images_edge`:case`context_window`:throw Error(`factWords: ${e} is not a fact of one file`)}}function Rv(e,t,n,r,i,a){let o=t.upload.kind===`uploaded`?t.upload.attachment.mediaType:t.declared;if(n.attachments===null)return i.refusal.modelNoFiles(n.name);if(o===null)throw Error(`modelRefusalLead: a model refusal of an untyped file`);return e===`media_type`?i.refusal.modelNoType(n.name,a.typeLabel[o]):i.refusal.modelFact(n.name,Lv(e,n.attachments.facts,r,a))}function zv(e,t,n,r,i,a){switch(e.kind){case`local_refused`:return{kind:`sentence`,text:Fv(e.refusal,i)};case`server_refused`:if(t.declared===null)throw Error(`chipReasonOf: a server refusal of an untyped file`);return{kind:`sentence`,text:Iv(e.errorCode,t.declared,i,a)};case`failed`:return{kind:`sentence`,text:e.cause===`network`?i.refusal.failedNetwork:i.refusal.failedServer};case`expired`:return{kind:`sentence`,text:i.refusal.expired};case`model_refused`:if(n===null)throw Error(`chipReasonOf: a model refusal without a model`);return{kind:`model`,lead:Rv(e.fact,t,n,r,i,a)};case`reading`:case`uploading`:case`ready`:return null}}function Bv(e,t){return e.kind===`sentence`?e.text:`${e.lead}${t.pickModel}`}var Vv=1100;function Hv({attachments:e,onPickModel:t,copy:n}){let r=Q(),i=$().attachments,{items:a,model:o}=e,s=(0,L.useRef)(null),[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(/* @__PURE__ */ new Set),[f,p]=(0,L.useState)(``),m=(0,L.useRef)(/* @__PURE__ */ new Map),h=(0,L.useRef)(/* @__PURE__ */ new Set),g=a.map(e=>({item:e,reason:zv(e.view,e.attachment,o,r,n,i),facts:Pv(e.attachment,r,i)}));(0,L.useEffect)(()=>{let e=m.current,t=/* @__PURE__ */ new Map,r=[],i=[];for(let{item:a,reason:o}of g){let{key:s}=a.attachment,c=e.get(s);t.set(s,a.view.kind),c!==a.view.kind&&(o!==null&&(c===void 0||!fv(c))?r.push(n.announce.refused(a.attachment.fileName,Bv(o,n))):a.view.kind===`ready`&&c===`uploading`&&(r.push(n.announce.uploaded(a.attachment.fileName)),i.push(s)))}if(m.current=t,r.length>0&&p(r.join(`. `)),i.length===0)return;d(e=>/* @__PURE__ */ new Set([...e,...i]));let a=setTimeout(()=>{h.current.delete(a),d(e=>new Set([...e].filter(e=>!i.includes(e))))},Vv);h.current.add(a)}),(0,L.useEffect)(()=>()=>{for(let e of h.current)clearTimeout(e);h.current.clear()},[]);let _=()=>{let e=s.current;e!==null&&l(e.scrollTop+e.clientHeight<e.scrollHeight-1)};(0,L.useLayoutEffect)(_,[a]);let v=a.some(e=>pv(e.view));return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:s,className:[`qa-ai-chat-att-tray`,v?`qa-ai-chat-att-tray--tall`:``,c?`qa-ai-chat-att-tray--fade`:``].filter(Boolean).join(` `),role:`list`,"aria-label":n.trayLabel,onScroll:_,onAnimationEnd:_,"data-testid":`ai-chat-attachment-tray`,children:g.map(({item:r,reason:a,facts:o})=>/* @__PURE__ */ (0,Z.jsx)(Nv,{item:r,progress:e.progress,facts:o,reason:a,justUploaded:u.has(r.attachment.key),onRemove:()=>e.remove(r.attachment.key),onRetry:()=>e.retry(r.attachment.key),onPickModel:t,copy:n,typeLabel:i.typeLabel},r.attachment.key))}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,"aria-live":`polite`,children:f})]})}var Uv=/^image\.(png|jpe?g|webp)$/i,Wv={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`};function Gv(e){let t=e=>String(e).padStart(2,`0`);return`${t(e.getHours())}-${t(e.getMinutes())}-${t(e.getSeconds())}`}function Kv(e,t,n){return e.getData(`text/plain`)===``?Array.from(e.files).map(e=>{let r=Wv[e.type];return r===void 0||e.name!==``&&!Uv.test(e.name)?e:new File([e],`${n(Gv(t))}.${r}`,{type:e.type,lastModified:e.lastModified})}):[]}var qv=[`ask`,`bypass`],Jv={ask:Sr,bypass:gr};function Yv({permission:e,copy:t}){let{value:n,disabled:r,arrival:i,onChange:a}=e,[o,s]=(0,L.useState)(!1),c=(0,L.useRef)(null),l=(0,L.useRef)(null),u=(0,L.useRef)(!1),d=Yt(),f=o&&!r;(0,L.useEffect)(()=>{var e;if(r||!u.current)return;u.current=!1;let t=document.activeElement;(t===null||t===document.body)&&((e=l.current)==null||e.focus())},[r,n]);let p={ask:t.askHint,bypass:t.bypassHint},m=e=>{s(!1),e!==n&&(u.current=!0,a(e))},h=e=>{let t=[...e.currentTarget.querySelectorAll(`[role="radio"]`)],n=t.findIndex(e=>e===document.activeElement),r=n=>{let r=t[n];r!==void 0&&(e.preventDefault(),r.focus())};switch(e.key){case`ArrowDown`:case`ArrowRight`:r((n+1)%t.length);break;case`ArrowUp`:case`ArrowLeft`:r((n-1+t.length)%t.length);break;case`Home`:r(0);break;case`End`:r(t.length-1)}},g=n===null?t.groupLabel:t[n],_=n===null?Sr:Jv[n],v=/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:l,type:`button`,className:j(`qa-ai-chat-set`,n===`bypass`&&`qa-ai-chat-set--bypass`,i!==null&&`qa-ai-chat-set--arrived`),"aria-label":n===null?t.groupLabel:t.chipLabel(g),disabled:r,"data-value":n===null?void 0:n,"data-testid":`ai-chat-permission`,onAnimationEnd:i===null?void 0:i.onShown,children:[/* @__PURE__ */ (0,Z.jsx)(_,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-set-value`,children:g})]});return/* @__PURE__ */ (0,Z.jsx)(Gt,{title:t.groupLabel,titleVisible:!1,trigger:v,open:f,onOpenChange:e=>s(e&&!r),side:`top`,collisionAvoidance:Wt,...d===null?{}:{positionAnchor:d},initialFocusRef:c,className:Ft,"data-testid":`ai-chat-permission-popover`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`flex items-baseline justify-between gap-2 px-2 pt-1.5 pb-2`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`text-xs font-semibold text-fg-primary`,children:t.groupLabel}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`text-xs text-fg-muted`,children:t.menuNote})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":t.groupLabel,className:`flex flex-col`,onKeyDown:h,children:qv.map((e,r)=>{let i=e===n,a=Jv[e],o=i||n===null&&r===0;return/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:o?c:void 0,type:`button`,role:`radio`,"aria-checked":i,tabIndex:o?0:-1,"data-value":e,"data-testid":`ai-chat-permission-${e}`,onClick:()=>m(e),className:j(`grid w-full grid-cols-[18px_minmax(0,1fr)_16px] items-start gap-2.5 rounded-md border-0 bg-transparent p-2 text-left`,`hover:bg-(--color-bg-elevated-hover) focus-visible:bg-(--color-bg-elevated-hover)`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`),children:[/* @__PURE__ */ (0,Z.jsx)(a,{"aria-hidden":`true`,className:j(`mt-0.5 size-4`,i?`text-(--color-primary-text)`:`text-fg-muted`)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:j(`block text-body-sm font-medium`,i?`text-(--color-primary-text)`:`text-fg-primary`),children:t[e]}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-xs leading-[1.45] text-fg-muted`,children:p[e]})]}),/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`,className:j(`mt-0.5 size-4 text-(--color-primary-text)`,!i&&`invisible`)})]},e)})})]})})}var Xv=1e4,Zv=5,Qv=1e3,$v=1.5;function ey(e){let{isStreaming:t,errorCode:n,send:r,stop:i,onAbandoned:a}=e,o=(0,L.useRef)(a);(0,L.useEffect)(()=>{o.current=a},[a]);let[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(!1),d=(0,L.useRef)(null),f=(0,L.useRef)(null),p=(0,L.useRef)(null),m=(0,L.useCallback)(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null),f.current=null,u(!1)},[]),h=(0,L.useCallback)(e=>{r(e).kind!==`sent`&&m()},[m,r]),g=(0,L.useCallback)(e=>{i(),c(e),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{d.current=null,c(null),o.current(e)},Xv)},[i]);return(0,L.useEffect)(()=>{s===null||t||(d.current!==null&&(clearTimeout(d.current),d.current=null),c(null),f.current={message:s,retriesLeft:Zv,timerPending:!1},u(!0),h(s))},[h,t,s]),(0,L.useEffect)(()=>{if(n!==`chat.busy`){f.current!==null&&m();return}let e=f.current;if(e===null||e.timerPending)return;if(e.retriesLeft<=0){m();return}let t=(e,n,r)=>{f.current={message:n,retriesLeft:e,timerPending:!0},p.current=setTimeout(()=>{p.current=null;let e=f.current;e!==null&&(f.current={...e,timerPending:!1},h(e.message),f.current!==null&&(e.retriesLeft>0?t(e.retriesLeft-1,e.message,r*$v):m()))},r)};t(e.retriesLeft-1,e.message,Qv)},[h,m,n]),(0,L.useEffect)(()=>()=>{d.current!==null&&clearTimeout(d.current),p.current!==null&&clearTimeout(p.current),f.current=null},[]),{queued:s!==null,busyChainActive:l,sendAfterStop:g}}var ty=typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`field-sizing`,`content`),ny=120,ry=300;function iy({draft:e,onDraftChange:t,isStreaming:n,pendingHostAction:r,interactive:i,placeholder:a,errorCode:o,send:s,stop:c,autoFocus:l,fillRequest:u,focusRequest:d,chips:f,onBusyChainChange:p,copy:m}){let h=(0,L.useRef)(null),g=(0,L.useRef)(null),_=(0,L.useRef)(null),v=(0,L.useId)(),[y,b]=(0,L.useState)(null),x=(0,L.useRef)(null),S=f===null?null:f.attachments,C=(0,L.useCallback)(e=>s(e.text,`external`,gv(e.attachments)),[s]),w=(0,L.useRef)(e);(0,L.useEffect)(()=>{w.current=e},[e]);let{queued:T,busyChainActive:ee,sendAfterStop:E}=ey({isStreaming:n,errorCode:o,send:C,stop:c,onAbandoned:(0,L.useCallback)(e=>{let n=w.current;t(n.trim().length===0?e.text:`${e.text}\n${n}`),S!==null&&e.attachments.length>0&&S.reattach(e.attachments)},[S,t])});(0,L.useEffect)(()=>{p(ee)},[ee,p]),(0,L.useEffect)(()=>{if(l)return x.current=setTimeout(()=>{var e;x.current=null;let t=h.current;t!==null&&t.contains(document.activeElement)||(e=g.current)==null||e.focus()},ry),()=>{x.current!==null&&(clearTimeout(x.current),x.current=null)}},[l]),(0,L.useEffect)(()=>{if(u===0)return;let e=g.current;if(e===null)return;let t=e.value.indexOf(`
|
|
371
|
-
`),n=t===-1?e.value.length:t;e.focus(),e.setSelectionRange(n,n)},[u]),(0,L.useEffect)(()=>{var e;d!==0&&((e=g.current)==null||e.focus({preventScroll:!0}))},[d]);let D=(0,L.useCallback)(()=>{x.current!==null&&(clearTimeout(x.current),x.current=null)},[]),te=(0,L.useCallback)(()=>{if(ty)return;let e=g.current;e!==null&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,ny)}px`)},[]);(0,L.useLayoutEffect)(te,[te,e]),(0,L.useEffect)(()=>{if(!ty)return window.addEventListener(`resize`,te),()=>window.removeEventListener(`resize`,te)},[te]);let[ne,re]=(0,L.useState)(!1),k=e.trim(),A=S===null?null:S.sendBlock(k.length>0),ie=(0,L.useCallback)(()=>{if(re(!1),r&&k.length===0){c();return}if(n){if(k.length===0){c();return}if(A!==null)return;t(``),E({text:k,attachments:S===null?[]:S.detach()});return}if(k.length===0||!i||A!==null)return;let e=S===null?[]:S.items.map(e=>e.attachment);s(k,`composer`,gv(e)).kind===`sent`&&(t(``),S!==null&&S.detach())},[S,i,n,r,t,s,E,A,c,k]),ae=i&&k.length>0&&A===null,oe=S!==null&&S.items.length>0,se={uploading:m.sendBlocked.uploading,refused:m.sendBlocked.refused,no_text:m.sendBlocked.noText},ce=e=>{S!==null&&e.length!==0&&S.add(e)},j=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:g,value:e,rows:1,placeholder:i&&oe?m.placeholderWithFiles:a,"aria-label":m.inputLabel,"aria-describedby":v,disabled:!i,"data-testid":`ai-chat-input`,onChange:e=>t(e.target.value),onPaste:e=>{if(S===null)return;let t=Kv(e.clipboardData,/* @__PURE__ */ new Date,m.attachments.pastedName);t.length!==0&&(e.preventDefault(),ce(t))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ie())}}),/* @__PURE__ */ (0,Z.jsx)(`span`,{id:v,className:`qa-ai-chat-sr-only`,children:f===null?m.plainHint:m.hint})]}),le=T?/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-send qa-ai-chat-send--pending`,disabled:!0,"aria-busy":`true`,"aria-label":m.send,"data-testid":`ai-chat-send-button`,children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`icon-pending`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{})]})}):n||r?/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:m.stop,open:ne,onOpenChange:re,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-send qa-ai-chat-send--stop`,onClick:c,"data-testid":`ai-chat-stop-button`,children:/* @__PURE__ */ (0,Z.jsx)(Jr,{"aria-hidden":`true`})})}):/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`description`,...A===null?{heading:m.send,content:m.hint}:{content:se[A]},open:ne,onOpenChange:re,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`submit`,className:`qa-ai-chat-send`,"aria-label":m.send,"aria-disabled":ae?void 0:`true`,"data-testid":`ai-chat-send-button`,onClick:e=>{ae||e.preventDefault()},children:/* @__PURE__ */ (0,Z.jsx)(ir,{"aria-hidden":`true`})})});return f===null?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-composer-wrap`,ref:h,onPointerDownCapture:D,children:/* @__PURE__ */ (0,Z.jsxs)(`form`,{className:`qa-ai-chat-composer`,onSubmit:e=>{e.preventDefault(),ie()},noValidate:!0,children:[j,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-composer-foot qa-ai-chat-composer-foot--plain`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-composer-plain-hint`,"aria-hidden":`true`,children:m.plainHint}),le]})]})}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-composer-wrap`,ref:h,onPointerDownCapture:D,children:/* @__PURE__ */ (0,Z.jsxs)(on.Provider,{value:y,children:[/* @__PURE__ */ (0,Z.jsxs)(`form`,{ref:b,className:`qa-ai-chat-composer`,onSubmit:e=>{e.preventDefault(),ie()},noValidate:!0,children:[f.attachments.items.length>0&&/* @__PURE__ */ (0,Z.jsx)(Hv,{attachments:f.attachments,onPickModel:f.onPickModel,copy:m.attachments}),j,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-composer-foot`,children:[/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:m.attachments.attach,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-attach`,disabled:!i,onClick:()=>{var e;return(e=_.current)==null?void 0:e.click()},"data-testid":`ai-chat-attach-button`,children:/* @__PURE__ */ (0,Z.jsx)(Fr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`input`,{ref:_,type:`file`,multiple:!0,accept:rv,hidden:!0,tabIndex:-1,"aria-hidden":`true`,"data-testid":`ai-chat-attach-input`,onChange:e=>{let t=e.currentTarget;t.files!==null&&ce(Array.from(t.files)),t.value=``}}),f.modelPicker,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-composer-grow`}),le]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-sets`,role:`group`,"aria-label":m.settingsLabel,children:[f.effortChip,/* @__PURE__ */ (0,Z.jsx)(Yv,{permission:f.permission,copy:m.permission}),f.placeChip]})]})})}function ay(e){return typeof e!=`object`||!e||Array.isArray(e)?null:e}function oy(e){let t;try{t=JSON.parse(e)}catch{return null}return ay(t)}function sy(e){let t=ay(e.error);if(t===null)return null;let n=t.message;if(typeof n!=`string`)return null;let r=t.code;return typeof r==`string`&&r.length>0?{kind:`error`,code:r,message:n}:{kind:`error`,message:n}}var cy=/* @__PURE__ */ new Set([`pending`,`confirmed`,`rejected`,`failed`,`closed`]);function ly(e){return typeof e==`string`&&cy.has(e)?e:null}function uy(e,t){if(t!==null){let e=ly(t.status);return{kind:`pending-tool-call`,toolCallId:t.toolCallId,toolName:t.toolName,args:t.args,display:t.display,...e===null?{}:{status:e}}}let n=oy(e);if(n===null)return{kind:`prose`,text:e};let r=sy(n);return r===null?{kind:`prose`,text:e}:r}function dy(e){let{role:t,pendingToolCall:n,toolCalls:r,toolResults:i}=e,a=null;if(t===`assistant`&&n!=null){let t=uy(e.content,n);t.kind===`pending-tool-call`&&(a={toolCallId:t.toolCallId,toolName:t.toolName})}return{role:t,pendingToolCall:n,toolCalls:r,toolResults:i,confirmation:a}}function fy(e,t){return e.role===t.role&&e.pendingToolCall===t.pendingToolCall&&e.toolCalls===t.toolCalls&&e.toolResults===t.toolResults}function py(e){return e.confirmation!==null||e.toolCalls!==void 0&&e.toolCalls.length>0||e.toolResults!==void 0&&e.toolResults.length>0}function my(e,t,n,r){let i=e.get(t);if(i===void 0){e.set(t,/* @__PURE__ */ new Map([[n,r]]));return}i.set(n,r)}function hy(e,t,n){let r=e.get(t);r!==void 0&&(r.delete(n),r.size===0&&e.delete(t))}function gy(e,t){let n=e.get(t);if(n===void 0)return;let r=n.values().next();return r.done===!0?void 0:r.value}function _y(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function vy(){let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=0,o=0,s=null,c=null,l=/* @__PURE__ */ new Map;function u(e,i,a){a!==null&&a.confirmation!==null?r.set(e,a.confirmation):i!==null&&i.confirmation!==null&&r.delete(e);let o=a===null?void 0:a.toolCalls;if(i!==null&&i.toolCalls!==void 0){let n=new Set(o===void 0?[]:o.map(e=>e.toolCallId));for(let r of i.toolCalls)n.has(r.toolCallId)||hy(t,r.toolCallId,e)}if(o!==void 0)for(let n of o)my(t,n.toolCallId,e,n.toolName);let s=a===null?void 0:a.toolResults;if(i!==null&&i.toolResults!==void 0){let t=new Set(s===void 0?[]:s.map(e=>e.toolCallId));for(let r of i.toolResults)t.has(r.toolCallId)||hy(n,r.toolCallId,e)}if(s!==void 0)for(let t of s){var c;let r=(c=n.get(t.toolCallId))==null?void 0:c.get(e);(r===void 0||r.value!==t.result)&&my(n,t.toolCallId,e,{value:t.result})}}function d(e,r,i){let a=gy(t,r),o=i===null?a===void 0?null:a:i,s=gy(n,r),c=s===void 0?null:s,u=l.get(e);return u!==void 0&&u.toolCallId===r&&u.toolName===o&&u.result===c?u:{toolCallId:r,toolName:o,result:c}}function f(){let t=/* @__PURE__ */ new Map;for(let[e,n]of r)t.set(e,d(e,n.toolCallId,n.toolName));for(let[n,a]of i)!r.has(n)&&e.has(n)&&t.set(n,d(n,a,null));_y(t,l)||(l=t)}return{get resolvedConfirmationsRevision(){return a},recordResolvedConfirmation({messageId:e,toolCallId:t}){return i.get(e)!==t&&(i.set(e,t),a+=1,!0)},forgetResolvedConfirmations(){return i.size!==0&&(i.clear(),a+=1,!0)},read(t,n){if(t===s&&n===c)return l;let r=n!==c;s=t,c=n,o+=1;let a=0;for(let n of t){let t=e.get(n.id);if(t===void 0){let t=dy(n);u(n.id,null,t),e.set(n.id,{message:n,facts:t,seenInRead:o}),a+=1,(py(t)||i.has(n.id))&&(r=!0);continue}if(t.seenInRead!==o&&(t.seenInRead=o,a+=1),t.message===n||(t.message=n,fy(t.facts,n)))continue;let s=dy(n);(py(t.facts)||py(s))&&(r=!0),u(n.id,t.facts,s),t.facts=s}if(a!==e.size)for(let[t,n]of e)n.seenInRead!==o&&((py(n.facts)||i.has(t))&&(r=!0),u(t,n.facts,null),e.delete(t));return r&&f(),l}}}function yy(e){let[t]=(0,L.useState)(vy),[n,r]=(0,L.useState)(()=>t.resolvedConfirmationsRevision);return{confirmedCalls:(0,L.useMemo)(()=>t.read(e,n),[t,e,n]),recordResolvedConfirmation:(0,L.useCallback)(e=>{t.recordResolvedConfirmation(e)&&r(t.resolvedConfirmationsRevision)},[t]),forgetResolvedConfirmations:(0,L.useCallback)(()=>{t.forgetResolvedConfirmations()&&r(t.resolvedConfirmationsRevision)},[t])}}var by=F({type:Qe(`action-resolved`),messageId:P().min(1),toolCallId:P().min(1)}),xy={kind:`other-event`};function Sy(e){if(typeof e!=`object`||!e||!(`type`in e)||e.type!==`action-resolved`)return xy;let t=by.safeParse(e);return t.success?{kind:`pairing`,pairing:{messageId:t.data.messageId,toolCallId:t.data.toolCallId}}:{kind:`malformed`,issuePaths:t.error.issues.map(e=>e.path.join(`.`))}}var Cy=[`scenario`,`bug`,`checklist-item`,`checklist`,`saved-request`,`collection`,`shared-step`,`run`,`test-run`,`page`,`test-plan`,`environment`,`variable`,`incident`,`atlas-fact`,`api-folder`,`api-endpoint`,`section`];function wy(e){return Cy.includes(e)}var Ty={scenario:{tone:`scenario`,icon:/* @__PURE__ */ (0,Z.jsx)(Or,{size:16})},bug:{tone:`error`,icon:/* @__PURE__ */ (0,Z.jsx)(or,{size:16})},"checklist-item":{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(Zt,{size:16})},checklist:{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(Zt,{size:16})},"saved-request":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(oe,{size:16})},collection:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16})},"shared-step":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Rt,{size:16})},run:{tone:`success`,icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:16})},"test-run":{tone:`success`,icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:16})},page:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(hn,{size:16})},"test-plan":{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(Zt,{size:16})},environment:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Ur,{size:16})},variable:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Bt,{size:16})},incident:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(D,{size:16})},"atlas-fact":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Ar,{size:16})},"api-folder":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16})},"api-endpoint":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Ur,{size:16})},section:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16})}},Ey={tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(hn,{size:16})};function Dy(e){return wy(e)?Ty[e]:Ey}function Oy(e,t){return wy(e)?t.entityType[e]:e}function ky(e){return`path`in e}function Ay({row:e}){let{navigation:t}=_m(),n=$().cards.common,{open:r}=e,i=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${e.tile.tone} qa-ref__tile`,"aria-hidden":`true`,children:e.tile.icon}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ref__grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:j(`qa-ref__name`,e.nameMissing&&`qa-ref__name--missing`),children:e.name}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ref__note`,children:[e.note,ky(r)&&r.destination!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__dest`,children:` \u00B7 ${r.destination}`})]})]})]});if(!ky(r))return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ref`,role:`note`,"aria-label":r.ariaLabel,children:[i,/* @__PURE__ */ (0,Z.jsx)(O,{content:r.hint,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__pill`,tabIndex:0,children:/* @__PURE__ */ (0,Z.jsx)($p,{tone:`neutral`,className:`qa-card-kit__pill-plain`,children:r.pill})})})]});let a=`${r.action}: ${e.name}${t.opensInNewTab?n.newTabSuffix:``}`;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ref qa-ref--clickable`,children:[i,/* @__PURE__ */ (0,Z.jsx)(O,{content:r.action,relationship:`none`,children:/* @__PURE__ */ (0,Z.jsxs)(C,{variant:`secondary`,size:`sm`,className:`qa-ref__open`,icon:/* @__PURE__ */ (0,Z.jsx)(og,{size:14}),"aria-label":a,onClick:()=>t.openPath(r.path),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__open-label`,children:n.open}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__open-label-wide`,children:r.action})]})})]})}function jy({groupAria:e,rows:t}){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-refs`,role:`group`,"aria-label":e,children:t.map(e=>/* @__PURE__ */ (0,Z.jsx)(Ay,{row:e},e.key))})}function My({title:e,groupAria:t,icon:n,rows:r}){return/* @__PURE__ */ (0,Z.jsx)(Zp,{className:`${eg} qa-ref-card`,icon:n,tileTone:`info`,title:e,"aria-label":e,meta:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:r.length}),children:/* @__PURE__ */ (0,Z.jsx)(jy,{groupAria:t,rows:r})})}var Ny=F({type:P(),id:P(),projectId:P(),label:P(),open:yh}),Py=I(Ny),Fy=`map`;function Iy(e){switch(e.target){case`workbench`:return`workbench`;case`detail`:return e.routeKey===Fy?`map`:`run`;case`list`:return`list`}}function Ly(e){let t=$().cards,{project:n}=_m();return e.map((e,r)=>{let i=e.label.trim().length===0,a=i?t.common.missingName:e.label,o={key:`${e.type}:${e.id}:${String(r)}`,tile:Dy(e.type),name:a,nameMissing:i,note:Oy(e.type,t.common)},s=n===null||e.projectId!==n.id?null:Ch(n.number,e.open);if(e.open.target===`none`||s===null)return{...o,open:{pill:t.common.noOpenTarget,hint:t.common.noOpenTargetHint,ariaLabel:t.references.noOpenAria(a)}};let c=Iy(e.open);return{...o,open:{path:s,action:t.references.action[c],destination:t.references.destination[c]}}})}function Ry(e){let t=/* @__PURE__ */ new Set;return e.filter(e=>{let n=`${e.projectId}:${e.type}:${e.id}`;return!t.has(n)&&(t.add(n),!0)})}function zy({row:e}){let{navigation:t}=_m(),n=$().cards.common,{open:r}=e,i=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link__icon`,"aria-hidden":`true`,children:e.tile.icon}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:j(`qa-ai-chat-link__name`,e.nameMissing&&`qa-ai-chat-link__name--missing`),children:e.name}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-link__type`,children:e.note})]});return ky(r)?/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsx)(O,{content:r.action,relationship:`none`,children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-link`,"aria-label":`${r.action}: ${e.name}${t.opensInNewTab?n.newTabSuffix:``}`,onClick:()=>t.openPath(r.path),children:[i,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link__open`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(og,{size:12})})]})})}):/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsx)(O,{content:r.hint,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link qa-ai-chat-link--inert`,role:`note`,tabIndex:0,"aria-label":r.ariaLabel,children:i})})})}function By({references:e}){let t=$().cards.references,n=Ly(Ry(e));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-links`,"data-testid":`ai-chat-references`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-links__label`,"aria-hidden":`true`,children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-links__list`,"aria-label":t.groupAria,children:n.map(e=>/* @__PURE__ */ (0,Z.jsx)(zy,{row:e},e.key))})]})}function Vy({entries:e}){let t=$().cards.references,n=e.flatMap(e=>e.outcome.status===`accepted`?[...e.outcome.result]:[]),r=e.flatMap((e,t)=>e.outcome.status===`rejected`?[{key:String(t),raw:e.outcome.raw}]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&/* @__PURE__ */ (0,Z.jsx)(By,{references:n}),r.map(e=>/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`references`,resultKind:Jy(e.raw)},e.key))]})}var Hy={id:`references`,schema:Py,Card:Vy};function Uy(e){if(typeof e!=`object`||!e||!(`entities`in e))return;let t=e.entities;if(!Array.isArray(t)||!t.every(e=>typeof e==`object`&&!!e&&typeof e.projectId==`string`))return;let n=Py.safeParse(t);return n.success?n.data:void 0}var Wy=F({tool:P(),error:F({code:P(),message:P()})});function Gy(e){let t;try{t=JSON.parse(e)}catch{return!1}return Wy.safeParse(t).success}function Ky(e){return typeof e==`string`?Gy(e):typeof e==`object`&&!!e&&`success`in e&&e.success===!1}function qy(e){return typeof e==`object`&&!!e&&`outcome`in e&&e.outcome===`unknown`}function Jy(e){return typeof e==`object`&&e&&`resultKind`in e&&typeof e.resultKind==`string`?e.resultKind:null}var Yy=at({resultKind:Qe(`workflow_started`),workflow:at({conversationId:ut().nullable()})});function Xy(e,t){let n=Yy.safeParse(e);if(!n.success)return null;let{conversationId:r}=n.data.workflow;return r!==null&&r!==t?r:null}function Zy(e,t){let{launched:n,total:r}=be(e);return n===0?t.outcome.refused:t.outcome.launched(n,r)}var Qy=/* @__PURE__ */ new WeakMap;function $y(e){let t=Qy.get(e);if(t!==void 0)return t;let n=g(e.value);return Qy.set(e,n),n}function eb(e,t,n){if(e===null)return t.confirmed;let r=$y(e);switch(r.kind){case`dispatched`:return Zy(r.result,t);case`refused`:{let{code:e,message:i,params:a}=r.refusal,o=n({error_code:e,message:i,...a===void 0?{}:{params:a}});return o===``?t.outcome.refused:t.outcome.refusedWithReason(o)}case`unreadable`:return t.confirmed}}function tb(e,t){var n,r;let i=((n=e.proposal)==null||(n=n.targetEnvironment)==null?void 0:n.id)??e.environmentId;if(i===void 0)return`env`;let a=(r=e.proposal)==null?void 0:r.items.find(e=>e.isSecret===!0&&e.actionType===`create_environment_variable`);return a===void 0||a.entityLabel===``?`name`:{projectId:e.projectId,changeSetId:e.taskId,environmentId:i,variableName:a.entityLabel,blockedByDescription:t.reason}}function nb(e){let{secretInput:t}=_m(),[n,r]=(0,L.useState)({phase:`closed`}),i=(0,L.useCallback)(e=>{t.mode===`external-page`&&t.open(e).then(()=>r({phase:`page-opened`,request:e}),e=>{r({phase:`problem`,problem:`open-failed`}),queueMicrotask(()=>{throw e})})},[t]),a=n.phase===`page-opened`;return(0,L.useEffect)(()=>{if(!a)return;let t=()=>{document.visibilityState===`visible`&&e()};return document.addEventListener(`visibilitychange`,t),()=>document.removeEventListener(`visibilitychange`,t)},[a,e]),{flow:n,provide(e,n){let a=tb(e,n);a===`env`||a===`name`?r({phase:`problem`,problem:a}):t.mode===`modal`?r({phase:`modal`,request:a}):i(a)},reopen(){n.phase===`page-opened`&&i(n.request)},modal:n.phase===`modal`&&t.mode===`modal`?t.renderModal(n.request,t=>{r({phase:`closed`}),t.kind===`provided`&&e()}):null}}function rb({secret:e,stillNeeded:t,onRefresh:n}){let r=$().cards.changeSet;if(e.flow.phase===`problem`){let t=e.flow.problem;return/* @__PURE__ */ (0,Z.jsx)(vm,{children:t===`env`?r.secretEnvMissing:t===`name`?r.secretNameMissing:r.secretOpenFailed})}return e.flow.phase!==`page-opened`||!t?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-pending`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-pending__top`,children:[/* @__PURE__ */ (0,Z.jsx)($p,{tone:`info`,className:`qa-card-kit__pill-live`,children:r.secretWaiting}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:r.secretWaitingText})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-pending__acts`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Pe,{size:14}),onClick:n,children:r.secretRefresh}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(fn,{size:14}),onClick:e.reopen,children:r.secretReopen})]})]})}function ib({label:e,count:t,children:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec-head`,children:[e,t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:t})]}),n]})}function ab({item:e}){let t=$().cards.changeSet,n=Q(),r=e.diffKind;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:j(r===`delete`&&`qa-cs-diff__row--delete`),children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-diff__what`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__verb`,children:e.actionTitle[n]}),e.entityLabel!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__target`,children:e.entityLabel}),e.field!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__field`,children:e.field}),e.isSecret===!0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-diff__secret`,children:[/* @__PURE__ */ (0,Z.jsx)(zt,{"aria-hidden":`true`}),t.secretChip]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-diff__vals`,children:[r===`replace`&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e.before}),/* @__PURE__ */ (0,Z.jsx)(Kt,{className:`qa-cs-diff__arrow`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:e.after})]}),r===`add`&&/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:e.after}),r===`delete`&&/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e.before??e.after}),r===`move`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__pos`,children:e.after})]})]})}function ob({items:e}){let t=$().cards.changeSet;return e.length===0?/* @__PURE__ */ (0,Z.jsx)(ib,{label:t.whatChanges,children:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:t.proposalEmpty})}):/* @__PURE__ */ (0,Z.jsx)(ib,{label:t.whatChanges,...e.length>1?{count:t.changesCount(e.length)}:{},children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-diff`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(ab,{item:e},t))})})}function sb({entries:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(ib,{label:t.cascadeTitle,children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-cascade`,children:e.map((e,n)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:j(e.count===0&&`qa-cs-cascade__zero`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:hg(e.entityType,t)}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.count})]},n))})})}function cb({evidence:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(om,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.evidence}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.length})]}),children:/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-cs-evidence`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[e.label,e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-muted`,children:[` `,e.detail]})]})},t))})})}function lb({label:e,target:t}){let{project:n,navigation:r}=_m();if(n===null)return null;let i=Ch(n.number,t);return i===null?null:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-cs-linkish`,onClick:()=>r.openPath(i),children:e})}function ub({warnings:e}){return e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-issue qa-cs-issue--warn`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.label}),e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.detail}),e.cta!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-issue__acts`,children:/* @__PURE__ */ (0,Z.jsx)(lb,{label:e.cta.label,target:e.cta.openTarget})})]})]},t))}function db({blockers:e,idOf:t,onProvideSecret:n}){let r=$().cards.changeSet;return e.map((e,i)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:t(i),className:`qa-cs-issue qa-cs-issue--block`,children:[/* @__PURE__ */ (0,Z.jsx)(zt,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.label}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.reason}),e.kind===`secret_value_required`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-issue__acts`,children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Gr,{size:14}),onClick:()=>n(e),children:r.provideSecurely})}):e.cta!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-issue__acts`,children:/* @__PURE__ */ (0,Z.jsx)(lb,{label:e.cta.label,target:e.cta.openTarget})})]})]},i))}function fb({id:e}){let t=$().cards.changeSet.killSwitch;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:e,className:`qa-cs-issue qa-cs-issue--muted`,children:[/* @__PURE__ */ (0,Z.jsx)(zt,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.body})]})]})}function pb({id:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{id:e,className:`qa-cs-why`,children:[/* @__PURE__ */ (0,Z.jsx)(Cr,{"aria-hidden":`true`}),t]})}function mb(){let[e,t]=(0,L.useState)(!1);return{reasonOpen:e,openReason:()=>t(!0),closeReason:()=>t(!1)}}function hb({busy:e,onClose:t,onReject:n}){let r=$().cards.changeSet,i=(0,L.useId)(),[a,o]=(0,L.useState)(``),s=e=>{e.key===`Escape`&&(e.stopPropagation(),t())},c=a.trim();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-reason`,children:[/* @__PURE__ */ (0,Z.jsxs)(`label`,{htmlFor:i,children:[r.reasonLabel,` `,/* @__PURE__ */ (0,Z.jsx)(`small`,{children:r.reasonHint})]}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{id:i,rows:2,value:a,autoFocus:!0,onChange:e=>o(e.target.value),onKeyDown:s}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-reason__row`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,disabled:e,onClick:()=>n(null),children:r.rejectPlain}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,disabled:e,loading:e,onClick:()=>n(c.length>0?c:null),children:r.rejectWithReason})]})]})}function gb({deletion:e,confirmEnabled:t,disabledReasonIds:n,busy:r,onOpenReason:i,onConfirm:a,confirmLabel:o}){let s=$().cards.changeSet,c=!t,l=Gh(e);return/* @__PURE__ */ (0,Z.jsxs)(sm,{children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,className:`qa-chat-card__actions-push`,icon:/* @__PURE__ */ (0,Z.jsx)(pr,{size:14}),loading:r===`reject`,disabled:r!==null,onClick:i,children:s.reject}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:l.variant,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ue,{size:14}),loading:r===`confirm`,disabled:r!==null,"aria-disabled":c?!0:void 0,"aria-describedby":c&&n.length>0?n.join(` `):void 0,onClick:()=>{c||a()},children:o??s[l.label]})]})}function _b(e,t){return e!==null&&e.pressed!==null?e.pressed:e!==null&&e.locked?`other`:t===`confirm`?`confirm`:t===null?null:`other`}function vb({state:e,snapshot:t,controller:n,chatDecision:r,dockRecord:i}){let a=$().cards.changeSet,o=Q(),s=(0,L.useId)(),c=mb(),l=nb(n.refresh),u=t.proposal,d=Dh(t),f=bg(e,t,a,o),p=u===void 0?null:u.intentSummary.trim(),m=d===null&&p!==null&&p.length>0&&p!==f?p:null,h=t.confirmDisabledReason,g=h!==void 0&&mg(fg,h)?h:null,_=`${s}-ks`,v=`${s}-why`,y=e=>`${s}-b${String(e)}`,b=[...t.blockers.map((e,t)=>y(t)),...h===`kill_switch_off`?[_]:[],...g===null?[]:[v]],x=n.commandFailure!==null&&n.commandFailure.state===t.state?n.commandFailure.command:null,S=n.busy;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(Og,{state:e,snapshot:t,...i===null?{}:{dockRecord:i},sections:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(cb,{evidence:t.evidence}),/* @__PURE__ */ (0,Z.jsx)(rb,{secret:l,stillNeeded:t.blockers.some(e=>e.kind===`secret_value_required`),onRefresh:n.refresh}),r===null&&c.reasonOpen&&/* @__PURE__ */ (0,Z.jsx)(hb,{busy:S===`reject`,onClose:c.closeReason,onReject:e=>{n.reject(e).then(c.closeReason)}}),x!==null&&/* @__PURE__ */ (0,Z.jsx)(vm,{children:a.commandFailed[x]}),r!==null&&i===null&&/* @__PURE__ */ (0,Z.jsx)(xm,{toolCallId:r.toolCallId})]}),footer:i!==null||c.reasonOpen&&r===null?void 0:/* @__PURE__ */ (0,Z.jsx)(gb,{deletion:Wh(u==null?void 0:u.items),confirmEnabled:qh(t),disabledReasonIds:b,busy:_b(r,n.busy),onOpenReason:r===null?c.openReason:()=>r.decide(`reject`),onConfirm:()=>{r===null?n.confirm():r.decide(`confirm`)},...d===null?{}:{confirmLabel:a.bugFiling.confirm}}),children:[m!==null&&/* @__PURE__ */ (0,Z.jsx)(tm,{children:m}),d===null?u!==void 0&&/* @__PURE__ */ (0,Z.jsx)(ob,{items:u.items}):/* @__PURE__ */ (0,Z.jsx)(Ah,{facts:d.facts}),(u==null?void 0:u.cascade)!==void 0&&/* @__PURE__ */ (0,Z.jsx)(sb,{entries:u.cascade}),/* @__PURE__ */ (0,Z.jsx)(ub,{warnings:t.warnings}),/* @__PURE__ */ (0,Z.jsx)(db,{blockers:t.blockers,idOf:y,onProvideSecret:e=>l.provide(t,e)}),h===`kill_switch_off`&&/* @__PURE__ */ (0,Z.jsx)(fb,{id:_}),g!==null&&/* @__PURE__ */ (0,Z.jsx)(pb,{id:v,children:a.disabledReason[g]})]}),l.modal]})}function yb({state:e,snapshot:t,controller:n,chatDecision:r,tether:i}){let{toolCallId:a}=r,o=(0,L.useRef)(null),{linked:s,onLinkChange:c}=uf(i,a,`feed`);return(0,L.useEffect)(()=>i.registerRecord(a,{reveal:()=>{var e;return(e=o.current)==null?void 0:e.reveal()}}),[i,a]),(0,L.useEffect)(()=>()=>c(!1),[c]),/* @__PURE__ */ (0,Z.jsx)(vb,{state:e,snapshot:t,controller:n,chatDecision:r,dockRecord:{handle:o,linked:s,onLinkChange:c}})}var bb=(0,L.createContext)(null);function xb(e,t){let n=(0,L.useContext)(bb),{state:r,loadFailed:i,confirm:a,reject:o}=t;(0,L.useEffect)(()=>{if(n!==null)return n.register(e,{state:r,loadFailed:i,confirm:a,reject:o}),()=>n.unregister(e)},[n,e,r,i,a,o])}function Sb(e,t){let n={total:e.length,loading:0,loadFailed:0,awaiting:0,applying:0,applied:0,rejected:0,failed:0,superseded:0,closed:0,undone:0};for(let r of e){let e=t.get(r);if(e===void 0){n.loading+=1;continue}if(e.loadFailed){n.loadFailed+=1;continue}switch(e.state){case null:n.loading+=1;break;case zh:n.awaiting+=1;break;case`applying`:n.applying+=1;break;case`applied`:n.applied+=1;break;case`rejected_no_op`:n.rejected+=1;break;case`partial_failure`:n.failed+=1;break;case`superseded`:n.superseded+=1;break;case`closed`:n.closed+=1;break;case`undone`:n.undone+=1}}return n}function Cb(e){return e.total-e.superseded-e.closed-e.undone-e.loadFailed}function wb(e){return e.applied+e.rejected+e.failed}function Tb(e){let t=Cb(e);return t>0&&wb(e)===t}function Eb(e){return e.awaiting>0&&e.loading===0}function Db(e){let t=Cb(e),n=wb(e);return e.applying>0?{kind:`applying`,count:e.applied+e.applying,total:t}:Tb(e)?{kind:`done`,count:n,total:t}:n>0?{kind:`remaining`,count:t-n,total:t}:e.awaiting>0?{kind:`awaiting`,count:e.awaiting}:{kind:`proposals`,count:e.total}}function Ob(e,t,n){return new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:t}).format(e)}function kb(e,t){return new Intl.NumberFormat(t).format(e)}function Ab(e,t,n){return`${e>0?`+`:e<0?`\u2212`:``}${Ob(Math.abs(e),t,n)}`}function jb(e,t){return t===0?null:Math.round(e/t*100)}function Mb(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}var Nb={hour:`2-digit`,minute:`2-digit`},Pb={day:`numeric`,month:`short`,hour:`2-digit`,minute:`2-digit`},Fb={day:`numeric`,month:`short`};function Ib(e,t,n=/* @__PURE__ */ new Date){let r=new Date(e);return new Intl.DateTimeFormat(t,Mb(r,n)?Nb:Pb).format(r)}function Lb(e,t){return new Intl.DateTimeFormat(t,Pb).format(new Date(e))}function Rb(e,t){return new Intl.DateTimeFormat(t,{dateStyle:`long`,timeZone:`UTC`}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`))}function zb(e,t){return new Intl.DateTimeFormat(t,{...Fb,timeZone:`UTC`}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`))}function Bb(e,t){return new Intl.DateTimeFormat(t,Fb).format(new Date(e))}var Vb=864e5;function Hb(e,t=Date.now()){let n=Date.parse(`${e}T00:00:00Z`),r=Math.floor(t/Vb)*Vb;return Math.round((r-n)/Vb)}function Ub(e,t,n=/* @__PURE__ */ new Date){let r=new Date(e),i=new Intl.DateTimeFormat(t,Nb).format(r),a=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),o=Math.round((a(r)-a(n))/Vb);return o===0||o===-1?`${new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(o,`day`)}, ${i}`:new Intl.DateTimeFormat(t,Pb).format(r)}var Wb=6e4,Gb=60*Wb,Kb=30*Vb,qb=365*Vb,Jb=45e3;function Yb(e,t,n){let r=Math.max(0,t-Date.parse(e)),i=new Intl.RelativeTimeFormat(n,{numeric:`auto`});return r<Jb?i.format(0,`minute`):r<Gb?i.format(-Math.max(1,Math.floor(r/Wb)),`minute`):r<Vb?i.format(-Math.max(1,Math.floor(r/Gb)),`hour`):r<Kb?i.format(-Math.max(1,Math.floor(r/Vb)),`day`):r<qb?i.format(-Math.max(1,Math.floor(r/Kb)),`month`):i.format(-Math.max(1,Math.floor(r/qb)),`year`)}function Xb(e,t){let n=Math.max(0,Math.round(e/1e3)),r=Math.floor(n/60),i=n%60,a=(e,n)=>new Intl.NumberFormat(t,{style:`unit`,unit:n,unitDisplay:`short`}).format(e);return r===0?a(i,`second`):`${a(r,`minute`)} ${a(i,`second`)}`}function Zb({items:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-cs-apply`,role:`status`,"aria-label":t.applyAria,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-bar`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`i`,{})}),e!==void 0&&e.length>0&&/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-ticks`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-ticks__t`,children:[e.entityLabel,e.field!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__field`,children:e.field})]})]},t))})]})}var Qb={applied:{tone:`ok`,Icon:we},failed:{tone:`fail`,Icon:pr},batch_aborted:{tone:`abort`,Icon:ur},pending:{tone:`pend`,Icon:dn}};function $b({before:e,after:t}){return e===void 0&&t===void 0?null:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__dl`,children:[e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e}),e!==void 0&&t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(Kt,{"aria-hidden":`true`}),t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:t})]})}function ex({rows:e}){let t=$().cards.changeSet,n=Q(),r=new Set(e.map(e=>e.actionType)).size>1;return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-results`,children:e.map((e,i)=>{let{tone:a,Icon:o}=Qb[e.itemStatus],s=e.errorCode===void 0?null:_g(e.errorCode,t);return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-cs-results__${a}`,children:[/* @__PURE__ */ (0,Z.jsx)(o,{"aria-hidden":!0}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__ent`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${t.row[e.itemStatus]}: `}),r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-results__act`,children:e.actionTitle[n]}),e.entityLabel]}),/* @__PURE__ */ (0,Z.jsx)($b,{...e.before===void 0?{}:{before:e.before},...e.after===void 0?{}:{after:e.after}}),e.errorCode!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__err`,children:[s,/* @__PURE__ */ (0,Z.jsx)(`code`,{children:e.errorCode})]})]},i)})})}function tx({label:e,tone:t,rows:n}){let r=$().cards.changeSet,i=Q();return n.length===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head qa-cs-legacy__${t}`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-results`,children:n.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:e.status===`applied`?`qa-cs-results__ok`:e.status===`skipped`?`qa-cs-results__pend`:`qa-cs-results__fail`,children:[e.status===`applied`?/* @__PURE__ */ (0,Z.jsx)(we,{"aria-hidden":`true`}):e.status===`skipped`?/* @__PURE__ */ (0,Z.jsx)(dn,{"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(pr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__ent`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${r.row[e.status]}: `}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-results__act`,children:e.actionTitle[i]}),e.entityLabel]}),e.status===`failed`&&(e.errorCode!==void 0||e.detail!==void 0)&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__err`,children:[e.detail,e.errorCode!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:e.errorCode})]})]},t))})]})}function nx({summary:e}){let t=$().cards.changeSet;return e.rows===void 0?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(tx,{label:t.appliedGroup(e.applied.length),tone:`ok`,rows:e.applied}),/* @__PURE__ */ (0,Z.jsx)(tx,{label:t.failedGroup(e.failed.length),tone:`fail`,rows:e.failed})]}):/* @__PURE__ */ (0,Z.jsx)(ex,{rows:e.rows})}function rx({attempt:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-chipline`,children:[e>1&&/* @__PURE__ */ (0,Z.jsx)($p,{tone:`neutral`,dot:!1,children:t.attempt(e)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-verified`,children:[/* @__PURE__ */ (0,Z.jsx)(we,{"aria-hidden":`true`}),t.verified]})]})}function ix({effects:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-side-effects`,children:[t.undo.sideEffectsTitle,/* @__PURE__ */ (0,Z.jsx)(`ul`,{children:e.map(e=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:vg(e,t)},e))})]})}function ax(e,t){return e.timedOut?t.undo.unknown:e.code===null?t.undo.failed:t.undo.error[e.code]}function ox({block:e,undo:t,canRequest:n,onUndo:r}){let i=$().cards.changeSet,a=Q();if(e.blockedReason===`not_auto`)return null;if(t.phase===`sending`||t.phase===`waiting`)return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-undo`,children:/* @__PURE__ */ (0,Z.jsxs)(C,{variant:`secondary`,size:`sm`,disabled:!0,"aria-busy":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`}),i.undo.busy]})});let o=e.eligible&&n&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Qr,{size:14}),onClick:r,children:i.undo.action});if(t.phase===`refused`)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-undo`,children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-undo__error`,role:`alert`,children:ax(t,i)}),o]});if(e.eligible)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-undo`,children:[o,e.offeredUntil!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-undo__deadline`,children:i.undo.until(Ib(e.offeredUntil,a))})]});let s=e.blockedReason===`stale`||e.blockedReason===`expired`||e.blockedReason===`kill_switch`?i.undo.blocked[e.blockedReason]:e.blockedReason===null?null:i.undo.unavailable;return s===null?null:/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-cs-why`,children:[/* @__PURE__ */ (0,Z.jsx)(zt,{"aria-hidden":`true`}),s]})}function sx({row:e}){let t=$().cards.changeSet,{project:n,navigation:r}=_m(),i=e.entityRef,a=Dy(i.type),o=n===null?null:Ch(n.number,i.open),s=i.label===``?null:i.label;return/* @__PURE__ */ (0,Z.jsx)(am,{icon:a.icon,tileTone:a.tone,name:s??/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-missing`,children:t.entityLabelMissing}),trailing:o!==null&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(og,{size:14}),"aria-label":t.openAria(s??t.entityLabelMissing),onClick:()=>r.openPath(o),children:t.open})})}function cx(e){return e.entityRef!==void 0}function lx({evidence:e}){let t=$().cards.changeSet,n=e.filter(cx);return n.length===0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:t.noResults}):/* @__PURE__ */ (0,Z.jsx)(im,{children:n.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(sx,{row:e},t))})}function ux({count:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-skeleton-lines`,"aria-hidden":`true`,children:Array.from({length:e},(e,t)=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk`},t))})}function dx({state:e,evidence:t}){let n=$().cards.changeSet;switch(e){case`searching`:return/* @__PURE__ */ (0,Z.jsx)(ux,{count:3});case`no_results`:return/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:n.noResults});case`search_results_shown`:return/* @__PURE__ */ (0,Z.jsx)(lx,{evidence:t});case`ambiguity_choose_target`:return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:n.chooseTargetHint}),/* @__PURE__ */ (0,Z.jsx)(lx,{evidence:t})]});case`item_selected`:{let e=t.find(cx);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-chipline`,children:[/* @__PURE__ */ (0,Z.jsx)($p,{tone:`info`,children:n.selected}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-muted`,children:n.nothingChanged})]}),e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(im,{children:/* @__PURE__ */ (0,Z.jsx)(sx,{row:e})})]})}case`inspecting`:return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head`,children:n.evidenceHeading}),t.length>0&&/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-cs-evidence`,children:t.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[e.label,e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-muted`,children:[` `,e.detail]})]})},t))}),/* @__PURE__ */ (0,Z.jsx)(ux,{count:1})]})}}function fx({snapshot:e}){let t=$().cards.changeSet,{conversation:n}=_m();return/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Pe,{size:14}),onClick:()=>n.setDraft(xg(Qh(e),t)),children:t.revise})}function px({state:e,snapshot:t,decidedInDock:n}){var r;let i=$().cards.changeSet,a=(r=t.proposal)==null?void 0:r.items;return/* @__PURE__ */ (0,Z.jsx)(Og,{state:e,snapshot:t,decidedInDock:n,subject:a!==void 0&&a.length>0?i.applyingSubject(a.length):i.applyingGeneric,note:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:i.applyDisclaimer}),children:/* @__PURE__ */ (0,Z.jsx)(Zb,{items:a})})}function mx({state:e,snapshot:t,controller:n}){let r=$().cards.changeSet,i=t.applySummary,a=i==null?void 0:i.undo,o=n.undo;return/* @__PURE__ */ (0,Z.jsx)(Og,{state:e,snapshot:t,sections:o.phase===`waiting`&&o.unknown?/* @__PURE__ */ (0,Z.jsx)(vm,{tone:`warning`,children:r.undo.unknown}):void 0,children:i===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyMissing}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(rx,{attempt:i.attempt}),i.durationMs!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyDuration(i.durationMs)}),/* @__PURE__ */ (0,Z.jsx)(nx,{summary:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(ox,{block:a,undo:o,canRequest:n.busy===null&&(o.phase!==`refused`||o.blockedFor!==t),onUndo:n.requestUndo}),a.blockedReason!==`not_auto`&&/* @__PURE__ */ (0,Z.jsx)(ix,{effects:a.nonReversedSideEffects})]})]})})}function hx(e){let t=e.applySummary;return t===void 0?0:t.rows===void 0?t.failed.length:t.rows.filter(e=>e.itemStatus!==`applied`).length}function gx({state:e,snapshot:t,controller:n}){let r=$().cards.changeSet,i=t.applySummary,a=i==null?void 0:i.undo,o=n.undo,s=hx(t),c=i!==void 0&&i.retryAvailable&&n.canRetryApply&&s>0,l=n.commandFailure!==null&&n.commandFailure.state===t.state;return/* @__PURE__ */ (0,Z.jsx)(Og,{state:e,snapshot:t,sections:l||o.phase===`waiting`&&o.unknown?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[l&&/* @__PURE__ */ (0,Z.jsx)(vm,{children:r.commandFailed.retry}),o.phase===`waiting`&&o.unknown&&/* @__PURE__ */ (0,Z.jsx)(vm,{tone:`warning`,children:r.undo.unknown})]}):void 0,note:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:r.whatNext}),footer:/* @__PURE__ */ (0,Z.jsxs)(sm,{children:[c&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),loading:n.busy===`retry`,disabled:n.busy!==null,onClick:n.retryApply,children:r.retryRemaining(s)}),/* @__PURE__ */ (0,Z.jsx)(fx,{snapshot:t})]}),children:i===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyMissing}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[i.attempt>1&&/* @__PURE__ */ (0,Z.jsx)(rx,{attempt:i.attempt}),i.durationMs!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyDuration(i.durationMs)}),/* @__PURE__ */ (0,Z.jsx)(nx,{summary:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(ox,{block:a,undo:o,canRequest:n.busy===null&&(o.phase!==`refused`||o.blockedFor!==t),onUndo:n.requestUndo}),a.blockedReason!==`not_auto`&&/* @__PURE__ */ (0,Z.jsx)(ix,{effects:a.nonReversedSideEffects})]})]})})}function _x({state:e,snapshot:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsx)(Og,{state:e,snapshot:t,subject:n.rejectedTitle,footer:/* @__PURE__ */ (0,Z.jsx)(sm,{children:/* @__PURE__ */ (0,Z.jsx)(fx,{snapshot:t})}),children:/* @__PURE__ */ (0,Z.jsx)(tm,{children:n.rejectedLead})})}function vx({state:e,snapshot:t}){var n;let r=$().cards.changeSet,i=(n=t.applySummary)==null||(n=n.undo)==null?void 0:n.nonReversedSideEffects;return/* @__PURE__ */ (0,Z.jsxs)(Og,{state:e,snapshot:t,subject:r.undoneTitle,children:[/* @__PURE__ */ (0,Z.jsx)(tm,{children:r.undoneLead}),i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(ix,{effects:i})]})}function yx({state:e,snapshot:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsx)(Og,{state:e,snapshot:t,sections:/* @__PURE__ */ (0,Z.jsx)(cb,{evidence:t.evidence}),note:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(rn,{}),children:n.superseded}),children:t.proposal!==void 0&&/* @__PURE__ */ (0,Z.jsx)(ob,{items:t.proposal.items})})}function bx({state:e,snapshot:t}){let n=Dh(t);return/* @__PURE__ */ (0,Z.jsx)(Og,{state:e,snapshot:t,...t.closure===void 0?{}:{note:/* @__PURE__ */ (0,Z.jsx)(xx,{closure:t.closure})},children:n===null?t.proposal!==void 0&&/* @__PURE__ */ (0,Z.jsx)(ob,{items:t.proposal.items}):/* @__PURE__ */ (0,Z.jsx)(Ah,{facts:n.facts})})}function xx({closure:e}){let t=$().cards.changeSet.closedBy,n=Q();switch(e.reason){case`launch_stopped`:return/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(fr,{}),children:t.launchStoppedNote});case`finding_filed`:return/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Ue,{}),children:t.findingFiledNote(e.bug.number,Ib(e.bug.filedAt,n))})}}function Sx(e){let{state:t,snapshot:n}=e;if(Rh(t))return/* @__PURE__ */ (0,Z.jsx)(Og,{state:t,snapshot:n,children:/* @__PURE__ */ (0,Z.jsx)(dx,{state:t,evidence:n.evidence})});switch(t){case`applying`:return/* @__PURE__ */ (0,Z.jsx)(px,{...e});case`applied`:return/* @__PURE__ */ (0,Z.jsx)(mx,{...e});case`partial_failure`:return/* @__PURE__ */ (0,Z.jsx)(gx,{...e});case`rejected_no_op`:return/* @__PURE__ */ (0,Z.jsx)(_x,{...e});case`undone`:return/* @__PURE__ */ (0,Z.jsx)(vx,{...e});case`superseded`:return/* @__PURE__ */ (0,Z.jsx)(yx,{...e});case`closed`:return/* @__PURE__ */ (0,Z.jsx)(bx,{...e})}}function Cx(){let e=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(Zp,{bare:!0,className:j(eg,`qa-cs-card`),"aria-busy":!0,"aria-label":e.loadingAria,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton__head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--tile`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton__titles`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w45`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--thin qa-cs-sk--w30`})]})]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--h qa-cs-sk--w75`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w92`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w80`})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__actions`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--btn`})})]})}function wx({reason:e,onRetry:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsx)(Zp,{bare:!0,tone:e===`retryable`?`error`:`neutral`,className:j(eg,`qa-cs-card`),children:e===`retryable`?/* @__PURE__ */ (0,Z.jsx)(cm,{icon:/* @__PURE__ */ (0,Z.jsx)(he,{}),title:n.loadError,text:n.loadErrorText,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:t,children:n.retry})}):/* @__PURE__ */ (0,Z.jsx)(cm,{icon:/* @__PURE__ */ (0,Z.jsx)(zt,{}),title:n.unavailable,text:n.unavailableText})})}function Tx({snapshot:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:j(eg,`qa-cs-card`,`qa-card-kit--unsupported`),icon:/* @__PURE__ */ (0,Z.jsx)(dr,{size:16}),tileTone:`muted`,title:t.title,...e===null?{}:{caption:yg(Qh(e),t)},"aria-label":`${t.title}: ${t.unknownState}`,sections:e===null?void 0:/* @__PURE__ */ (0,Z.jsx)(cb,{evidence:e.evidence}),children:[/* @__PURE__ */ (0,Z.jsx)(em,{children:t.unknownState}),(e==null?void 0:e.proposal)!==void 0&&/* @__PURE__ */ (0,Z.jsx)(ob,{items:e.proposal.items})]})}var Ex=F({changeSetId:P().min(1),projectId:P().min(1),mode:xt([`auto_undo`,`preview_confirm`,`confirmed_apply`]).optional()}),Dx=F({label:P(),openTarget:yh}),Ox=F({type:P(),id:P(),label:P(),open:yh}),kx=F({kind:P(),label:P(),detail:P().optional(),entityRef:Ox.optional()}),Ax=F({kind:P(),label:P(),reason:P(),cta:Dx.optional()}),jx=F({kind:P(),label:P(),detail:P().optional(),cta:Dx.optional()}),Mx=F({ru:P().min(1),en:P().min(1)}),Nx=F({capture:xt([`awaiting`,`ready`,`unavailable`,`no_screen`]),pageUrl:gt.nullable(),severity:pt,finding:F({candidate:vt,open:yh})}),Px=F({actionType:P(),actionTitle:Mx,entityLabel:P(),field:P().optional(),before:P().optional(),after:P(),isSecret:$e().optional(),removesData:$e(),diffKind:xt([`replace`,`add`,`delete`,`move`]),bug:Nx.optional()}),Fx=F({entityType:P().min(1),count:N().int().min(0)}),Ix=F({intentSummary:P(),targetEnvironment:F({id:P().min(1),label:P()}).optional(),items:I(Px),cascade:I(Fx).optional()}),Lx=F({changeSetId:P().min(1),expectedRevision:N().int().min(1),confirmEnabled:$e()}),Rx=F({actionType:P(),actionTitle:Mx,entityLabel:P(),status:xt([`applied`,`failed`,`skipped`]),errorCode:P().optional(),detail:P().optional()}),zx=F({actionType:P(),actionTitle:Mx,entityLabel:P(),before:P().optional(),after:P().optional(),itemStatus:xt([`applied`,`failed`,`batch_aborted`,`pending`]),errorCode:P().optional()}),Bx=F({eligible:$e(),offeredUntil:P().nullable(),blockedReason:xt([`stale`,`expired`,`kill_switch`,`not_auto`,`already_undone`]).nullable(),undoneAt:P().nullable(),nonReversedSideEffects:I(P())}),Vx=F({outcome:xt([`applied`,`partially_applied`,`failed`]),applied:I(Rx),failed:I(Rx),attempt:N().int().min(1),durationMs:N().int().nonnegative().optional(),retryAvailable:$e(),retryApprovalRequestId:ut().nullable().optional(),undo:Bx.optional(),rows:I(zx).optional()}),Hx=et(`reason`,[F({reason:Qe(`launch_stopped`)}),F({reason:Qe(`finding_filed`),bug:F({id:ut(),number:N().int().min(1),filedAt:qe()})})]),Ux=F({taskId:P().min(1),projectId:P().min(1),environmentId:P().min(1).optional(),state:P().min(1),revision:N().int().min(1),header:F({projectName:P(),scenarioLabel:P().optional(),environmentLabel:P().optional()}),evidence:I(kx),proposal:Ix.optional(),blockers:I(Ax),warnings:I(jx),confirmation:Lx.optional(),applySummary:Vx.optional(),confirmDisabledReason:P().min(1).optional(),closure:Hx.optional()}),Wx=F({taskSnapshot:Ux}).transform(e=>e.taskSnapshot),Gx=F({taskId:P().min(1),state:P().min(1),revision:N().int()}),Kx=Ze();function qx(e,t){if(e===void 0||!e.retryAvailable)return null;let n=e.retryApprovalRequestId;return n===null?{kind:`fresh`}:n===void 0?t===null?null:{kind:`known`,key:t}:{kind:`known`,key:n}}var Jx=4e3,Yx=6e4,Xx=3e4,Zx=new Set(pg);function Qx(e){queueMicrotask(()=>{throw e})}function $x(e){return e instanceof On&&e.status>=400&&e.status<500}var eS=class extends Error{constructor(){super(`change-set undo: no answer within ${String(Xx)} ms`),this.name=`UndoTimeoutError`}};function tS(e,t,n){let{http:r,taskEvents:i}=e,[a,o]=(0,L.useState)({status:`loading`}),[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(null),[p,m]=(0,L.useState)(null),[h,g]=(0,L.useState)({phase:`idle`}),_=(0,L.useRef)(!1),v=(0,L.useRef)(!0),y=(0,L.useRef)(0),b=(0,L.useRef)(0);(0,L.useEffect)(()=>(v.current=!0,()=>{v.current=!1}),[]);let x=(0,L.useCallback)(e=>{y.current+=1;let i=y.current;e||o({status:`loading`}),r.request({method:`GET`,path:wn.changeSetSnapshot.path(t,n),schema:Wx}).then(e=>{!v.current||i<=b.current||(b.current=i,c(e),o({status:`ready`,snapshot:e}))},t=>{!v.current||i<=b.current||(Qx(t),!e&&(b.current=i,o({status:`failed`,reason:t instanceof ft?`unsupported`:t instanceof On&&(t.status===403||t.status===404)?`unavailable`:`retryable`})))})},[r,t,n]);(0,L.useEffect)(()=>{x(!1)},[x]),(0,L.useEffect)(()=>i.subscribe(e=>{let t=Gx.safeParse(e);t.success&&t.data.taskId===n&&x(!0)}),[i,n,x]);let S=(s==null?void 0:s.state)??null,C=h.phase===`waiting`,w=S===`applying`||S===`confirmation_required`||C&&(S===`applied`||S===`partial_failure`);(0,L.useEffect)(()=>{if(!w)return;let e=setInterval(()=>x(!0),Jx);return()=>clearInterval(e)},[w,x]),(0,L.useEffect)(()=>{if(!C||S===`undone`)return;let e=setTimeout(()=>{g({phase:`refused`,code:null,timedOut:!0,blockedFor:null})},Yx);return()=>clearTimeout(e)},[C,S]);let T=(0,L.useCallback)(async(e,i,a)=>{if(s===null)return`skipped`;_.current=!0,u(e),f(null);try{return await r.request({method:`POST`,path:wn.changeSetCommand.path(t,n,e),body:i,schema:Kx}),a(),`succeeded`}catch(t){return $x(t)?(v.current&&f({command:e,state:s.state}),`failed`):(Qx(t),`unknown`)}finally{_.current=!1,v.current&&(u(null),x(!0))}},[r,t,n,s,x]),ee=(0,L.useCallback)(async()=>{if(_.current||s===null)return`skipped`;if(s.confirmation===void 0)return Qx(/* @__PURE__ */ Error(`change-set ${n}: confirm asked without a confirmation block`)),`skipped`;let e=xe();return T(`confirm`,{approvalRequestId:e,expectedRevision:s.confirmation.expectedRevision,applyRequestId:xe()},()=>{v.current&&m(e)})},[s,n,T]),E=(0,L.useCallback)(async e=>_.current?`skipped`:T(`reject`,e===null?{approvalRequestId:xe()}:{approvalRequestId:xe(),reason:e},()=>void 0),[T]),D=qx(s==null?void 0:s.applySummary,p),te=(0,L.useCallback)(()=>{_.current||s===null||D===null||T(`retry`,{approvalRequestId:D.kind===`known`?D.key:xe(),expectedRevision:s.revision,applyRequestId:xe()},()=>void 0)},[s,D,T]),ne=(0,L.useCallback)(()=>{var e;if(_.current||s===null||((e=s.applySummary)==null||(e=e.undo)==null?void 0:e.eligible)!==!0)return;let t=s;_.current=!0,u(`undo`),g({phase:`sending`});let i,a=new Promise((e,t)=>{i=setTimeout(()=>t(new eS),Xx)});Promise.race([r.request({method:`POST`,path:wn.changeSetUndo.path(n),body:{undoRequestId:xe(),expectedRevision:s.revision},schema:Kx}),a]).then(()=>{v.current&&g({phase:`waiting`,unknown:!1})},e=>{if($x(e)||Qx(e),!v.current)return;if(!$x(e)){g({phase:`waiting`,unknown:!0});return}let n=e.errorCode!==null&&mg(pg,e.errorCode)?e.errorCode:null;g({phase:`refused`,code:n,timedOut:!1,blockedFor:n!==null&&Zx.has(n)?t:null})}).finally(()=>{clearTimeout(i),_.current=!1,v.current&&(u(null),x(!0))})},[r,n,s,x]);return{load:a,snapshot:s,busy:l,commandFailure:d,canRetryApply:D!==null,undo:S===`undone`?{phase:`idle`}:h,reload:()=>x(!1),refresh:()=>x(!0),confirm:ee,reject:E,retryApply:te,requestUndo:ne}}function nS({projectId:e,changeSetId:t,chatPreview:n=!1,toolCallId:r}){var i;let a=_m(),o=$().cards.changeSet,s=Q(),c=tS(a,e,t),{load:l,confirm:u,reject:d}=c,f=l.status===`ready`?l.snapshot:null,p=f!==null&&Lh(f.state)?f.state:null,m=a.conversation.changeSetDecision,h=r??null,g=n&&h!==null&&m!==void 0,_=(0,L.useMemo)(()=>f===null?null:Dh(f),[f]),v=f===null||p===null?null:_===null?bg(p,f,o,s):o.bugFiling.title,y=p===`confirmation_required`&&l.status===`ready`,b=f!==null&&qh(f),{deletes:x,destructive:S}=Wh(f==null||(i=f.proposal)==null?void 0:i.items),C=f!==null&&p!==null?Xh(p,f).kind:null,w=(0,L.useMemo)(()=>f===null?null:Sg(f,o),[f,o]),T=f===null?null:wg(f,o),ee=m==null?void 0:m.register;(0,L.useEffect)(()=>{if(y&&h!==null&&ee!==void 0&&C!==null&&v!==null&&w!==null)return ee(h,{title:v,confirmEnabled:b,destructive:S,deletes:x,icon:C,facts:w,confirmBlockedReason:T,bug:_})},[y,h,ee,v,b,S,x,C,w,T,_]);let E=(0,L.useCallback)(()=>g&&h!==null&&m!==void 0?(m.decide(h,`reject`),Promise.resolve(`unknown`)):d(null),[d,g,h,m]),D=(0,L.useCallback)(()=>g&&h!==null&&m!==void 0?(m.decide(h,`confirm`),Promise.resolve(`unknown`)):u(),[u,g,h,m]);if(xb(t,{state:f===null?null:f.state,loadFailed:l.status===`failed`,confirm:D,reject:E}),l.status===`loading`)return/* @__PURE__ */ (0,Z.jsx)(Cx,{});if(l.status===`failed`)return l.reason===`unsupported`?/* @__PURE__ */ (0,Z.jsx)(Tx,{snapshot:null}):/* @__PURE__ */ (0,Z.jsx)(wx,{reason:l.reason,onRetry:c.reload});if(n&&!g||p===null)return/* @__PURE__ */ (0,Z.jsx)(Tx,{snapshot:l.snapshot});let te=g&&h!==null&&m!==void 0?{toolCallId:h,locked:m.isLocked(h)||m.isResolved(h),pressed:m.progress!==null&&m.progress.current!==null&&m.progress.current.toolCallId===h?m.progress.current.verdict:null,decide:e=>m.decide(h,e)}:null;return p===`confirmation_required`&&te!==null&&m!==void 0?/* @__PURE__ */ (0,Z.jsx)(yb,{state:p,snapshot:l.snapshot,controller:c,chatDecision:te,tether:m.tether}):p===`proposal_pending`||p===`confirmation_required`?/* @__PURE__ */ (0,Z.jsx)(vb,{state:p,snapshot:l.snapshot,controller:c,chatDecision:te,dockRecord:null}):/* @__PURE__ */ (0,Z.jsx)(Sx,{state:p,snapshot:l.snapshot,controller:c,decidedInDock:g})}function rS(e,t,n){let r=[];e.applied>0&&r.push({text:n.applied(e.applied),bad:!1}),e.rejected>0&&r.push({text:n.rejected(e.rejected),bad:!1});let i=e.failed+t;return i>0&&r.push({text:n.errors(i),bad:!0}),e.superseded>0&&r.push({text:n.superseded(e.superseded),bad:!1}),e.closed>0&&r.push({text:n.closed(e.closed),bad:!1}),e.undone>0&&r.push({text:n.undone(e.undone),bad:!1}),e.loadFailed>0&&r.push({text:n.loadFailed(e.loadFailed),bad:!0}),r}function iS(e,t){let n=Db(e);switch(n.kind){case`applying`:return t.applying(n.count,n.total);case`done`:return t.done(n.count,n.total);case`remaining`:return t.remaining(n.count,n.total);case`awaiting`:return t.awaiting(n.count);case`proposals`:return t.proposals(n.count)}}function aS({counts:e,passFailures:t}){let n=$().cards.changeSet.turn;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-tsum`,role:`status`,"aria-live":`polite`,children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:n.title}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.total}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-tsum__head`,children:iS(e,n)}),rS(e,t,n).map(e=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-tsum__seg-wrap`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-tsum__sep`,"aria-hidden":`true`,children:`\u00B7`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:j(`qa-cs-tsum__seg`,e.bad&&`qa-cs-tsum__seg--bad`),children:e.text})]},e.text))]})}function oS(){return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`})}function sS({counts:e,running:t,passFailures:n,onRun:r}){let i=$().cards.changeSet.turn,a=t!==null||!Eb(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bulk`,children:[n>0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-bulk__warn`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`}),i.passFailures(n)]}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,className:`qa-chat-card__actions-push`,icon:t===`reject`?/* @__PURE__ */ (0,Z.jsx)(oS,{}):/* @__PURE__ */ (0,Z.jsx)(pr,{size:14}),disabled:a,"aria-busy":t===`reject`,onClick:()=>r(`reject`),children:i.rejectAll}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:t===`confirm`?/* @__PURE__ */ (0,Z.jsx)(oS,{}):/* @__PURE__ */ (0,Z.jsx)(Ue,{size:14}),disabled:a,"aria-busy":t===`confirm`,onClick:()=>r(`confirm`),children:i.confirmAll(e.awaiting)})]})}function cS({cards:e}){let t=(0,L.useRef)(/* @__PURE__ */ new Map),[,n]=(0,L.useReducer)(e=>e+1,0),[r,i]=(0,L.useState)(null),a=(0,L.useRef)(null),[o,s]=(0,L.useState)(0),c=(0,L.useRef)(!0);(0,L.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]);let l=(0,L.useMemo)(()=>({register(e,r){t.current.set(e,r),n()},unregister(e){t.current.delete(e)&&n()}}),[]),u=(0,L.useCallback)(async n=>{if(a.current!==null)return;a.current=n,i(n),s(0);let r=0;try{for(let i of e){let e=t.current.get(i.changeSetId);if(e===void 0||e.state!==`confirmation_required`)continue;let a;try{a=n===`confirm`?await e.confirm():await e.reject()}catch(e){queueMicrotask(()=>{throw e}),a=`unknown`}a===`failed`&&(r+=1)}}finally{a.current=null,c.current&&(i(null),s(r))}},[e]),d=Sb(e.map(e=>e.changeSetId),t.current),f=e.some(e=>e.mode===`preview_confirm`);return/* @__PURE__ */ (0,Z.jsx)(bb.Provider,{value:l,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-group`,children:[/* @__PURE__ */ (0,Z.jsx)(aS,{counts:d,passFailures:o}),e.map(e=>/* @__PURE__ */ (0,Z.jsx)(nS,{projectId:e.projectId,changeSetId:e.changeSetId,chatPreview:e.mode===`preview_confirm`,toolCallId:e.mode===`preview_confirm`?e.toolCallId:null},e.changeSetId)),!f&&!Tb(d)&&/* @__PURE__ */ (0,Z.jsx)(sS,{counts:d,running:r,passFailures:o,onRun:e=>{u(e)}})]})})}function lS(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.has(n.changeSetId)||t.set(n.changeSetId,n);return[...t.values()]}function uS({entries:e}){let t=$().cards.changeSet,n=lS(e.flatMap(e=>{var t;return e.outcome.status===`accepted`?[{...e.outcome.result,toolCallId:((t=e.call)==null?void 0:t.toolCallId)??null}]:[]})),[r]=n;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length===1&&r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(nS,{projectId:r.projectId,changeSetId:r.changeSetId,chatPreview:r.mode===`preview_confirm`,toolCallId:r.mode===`preview_confirm`?r.toolCallId:null}),n.length>1&&/* @__PURE__ */ (0,Z.jsx)(cS,{cards:n}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`change-set`,resultKind:Jy(e.outcome.raw)},e.call===null?`rejected:${String(n)}`:e.call.toolCallId):null)]})}var dS={id:`change-set`,schema:Ex,Card:uS},fS=F({entityType:P().min(1),entityId:P().min(1),similarity:N().min(0).max(1),name:P(),stepsCount:N().int().nonnegative().nullable().optional()}).transform(e=>({entityType:e.entityType,entityId:e.entityId,similarity:e.similarity,name:e.name,stepsCount:e.stepsCount??null})),pS=F({success:Qe(!0),data:F({query:P(),tagMatchWarning:P().nullable().optional(),coveredCount:N().int().nonnegative(),partialCount:N().int().nonnegative(),covered:I(fS),partial:I(fS),gaps:I(P())})}).transform(({data:e})=>({query:e.query,tagMatchWarning:e.tagMatchWarning??null,coveredCount:e.coveredCount,partialCount:e.partialCount,covered:e.covered,partial:e.partial,gaps:e.gaps})),mS={scenario:`scenario`,checklist_item:`checklist-item`};function hS({label:e,matches:t}){let n=$().cards.coverage;return t.length===0?null:/* @__PURE__ */ (0,Z.jsx)(cg,{label:e,children:/* @__PURE__ */ (0,Z.jsx)(im,{"aria-label":e,children:t.map(e=>{let t=Dy(mS[e.entityType]??e.entityType),r=e.name.trim().length===0;return/* @__PURE__ */ (0,Z.jsx)(am,{icon:t.icon,tileTone:t.tone,name:r?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-coverage-missing`,children:n.unknownItem}):e.name,note:[n.similarity(e.similarity),...e.stepsCount===null?[]:[n.steps(e.stepsCount)]].join(` \u00B7 `)},`${e.entityType}:${e.entityId}`)})})})}function gS({result:e}){let t=$().cards.coverage,n=Q(),r=e.tagMatchWarning!==null;return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:j(eg,`qa-coverage-card`),tone:r?`warning`:`neutral`,tileTone:r?`warning`:`success`,icon:r?/* @__PURE__ */ (0,Z.jsx)(D,{size:16}):/* @__PURE__ */ (0,Z.jsx)(Wr,{size:16}),title:t.title,caption:t.caption(e.query),"aria-label":t.cardAria(e.query),fold:{title:t.cardAria(e.query),facts:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${t.covered}: ${kb(e.coveredCount,n)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${t.partial}: ${kb(e.partialCount,n)}`})]})},...r?{meta:/* @__PURE__ */ (0,Z.jsx)($p,{tone:`warning`,children:t.tagWarningPill})}:{},children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair__full`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:kb(e.coveredCount,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.covered})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair__part`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:kb(e.partialCount,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.partial})]})]}),e.tagMatchWarning!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-warning`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.tagMatchWarning})]}),/* @__PURE__ */ (0,Z.jsx)(hS,{label:t.covered,matches:e.covered}),/* @__PURE__ */ (0,Z.jsx)(hS,{label:t.partial,matches:e.partial}),e.gaps.length>0&&/* @__PURE__ */ (0,Z.jsx)(cg,{label:t.gaps,children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-coverage-gaps`,"aria-label":t.gaps,children:e.gaps.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e})]},`${String(t)}:${e}`))})})]})}function _S({entries:e}){let t=$().cards.coverage;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(gS,{result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`coverage`,resultKind:Jy(e.outcome.raw)},r)})})}var vS={id:`coverage`,schema:pS,Card:_S};function yS(e,t,n,r){let i=r-n;return t===`eq`&&i>0?r_(e.loadMore,{remaining:i}):e.loadMoreUnknown}function bS({labels:e,totalForm:t,slideIndex:n,loaderIndex:r,loaded:i,total:a}){if(n===r)return yS(e,t,i,a);let o=n+1;switch(t){case`eq`:return r_(e.slideAria,{index:o,total:a});case`atLeast`:return r_(e.slideAriaAtLeast,{index:o,total:a});case`unknown`:return r_(e.slideAriaUnknown,{index:o})}}function xS(e){let{labels:t,totalForm:n,slideIndex:r,loaderIndex:i,total:a}=e;return r===i?bS(e):n===`eq`?r_(t.goToSlide,{index:r+1,total:a}):bS(e)}function SS(e,t,n,r){switch(t){case`eq`:return r_(e.loadedOf,{loaded:n,total:r});case`atLeast`:return r_(e.loadedOfAtLeast,{loaded:n,total:r});case`unknown`:return r_(e.loadedOfUnknown,{loaded:n})}}function CS({labels:e,status:t,totalForm:n,loaded:r,total:i}){return t===`loading`?e.loading:t===`error`?e.retry:yS(e,n,r,i)}function wS({loaded:e,total:t,totalForm:n,status:r,labels:i,onLoadMore:a}){let o=r===`error`,s=r===`loading`,c=SS(i,n,e,t);return/* @__PURE__ */ (0,Z.jsx)(Zp,{bare:!0,className:`qa-ai-chat-collection__more`,role:o?`alert`:void 0,"aria-busy":s?!0:void 0,data:{"data-state":r},children:/* @__PURE__ */ (0,Z.jsx)(cm,{icon:o?/* @__PURE__ */ (0,Z.jsx)(he,{size:28}):/* @__PURE__ */ (0,Z.jsx)(A,{size:28}),title:o?i.loadMoreFailed:c,text:o?c:void 0,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:o?`secondary`:`primary`,size:`sm`,icon:o?/* @__PURE__ */ (0,Z.jsx)(Br,{size:14}):/* @__PURE__ */ (0,Z.jsx)(A,{size:14}),disabled:s,onClick:a,children:CS({labels:i,status:r,totalForm:n,loaded:e,total:t})})})})}function TS({labels:e,totalForm:t,count:n,total:r}){switch(t){case`eq`:return r_(e.loadedMore,{count:n,total:r});case`atLeast`:return r_(e.loadedMoreAtLeast,{count:n,total:r});case`unknown`:return r_(e.loadedMoreUnknown,{count:n})}}function ES({items:e,page:t,onLoadMore:n,keyOf:r,kind:i}){let[a,o]=(0,L.useReducer)((e,t)=>{switch(t.type){case`start`:return{...e,status:`loading`};case`success`:return{pages:[...e.pages,t.result],status:`idle`};case`error`:return{...e,status:`error`}}},{pages:[],status:`idle`}),{entries:s,lastAppended:c}=(0,L.useMemo)(()=>{let t=/* @__PURE__ */ new Set,n=[],i=e=>{let i=0;for(let a of e){let e=r(a);t.has(e)||(t.add(e),n.push({key:e,item:a}),i+=1)}return i};i(e);let o=0;for(let e of a.pages)o=i(e.items);return{entries:n,lastAppended:o}},[e,a.pages,r]),l=a.pages[a.pages.length-1],u=l===void 0?t:l.page,d=s.length;if(u!==null&&u.nextCursor!==null&&n===null)throw Error(`ChatCollection: missing onLoadMore for paged collection "${i}"`);let f=u===null?null:u.total,p=f!==null&&f.relation===`eq`&&f.value<d,m=f===null||p?d:f.value,h=u===null?`eq`:f===null||p?`unknown`:f.relation,g=u===null?null:u.nextCursor,_=(0,L.useRef)(a.status);_.current=a.status;let v=(0,L.useRef)(/* @__PURE__ */ new Set),y=(0,L.useCallback)(()=>{g!==null&&n!==null&&_.current!==`loading`&&(v.current.has(g)||(v.current.add(g),o({type:`start`}),n(g).then(e=>o({type:`success`,result:e}),()=>{v.current.delete(g),o({type:`error`})})))},[g,n]);return{entries:s,loaded:d,total:m,totalForm:h,hasMore:g!==null,status:a.status,lastAppended:c,loadMore:y}}function DS({kind:e,items:t,keyOf:n,renderItem:r,page:i,onLoadMore:a,labels:o,header:s}){let{entries:c,loaded:l,total:u,totalForm:d,hasMore:f,status:p,lastAppended:m,loadMore:h}=ES({items:t,page:i,onLoadMore:a,keyOf:n,kind:e}),g=u>l||d===`unknown`&&f;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--rows`,"data-kind":e,"data-has-more":f?`true`:void 0,role:`group`,"aria-label":o.collectionAria,children:[s,g&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-collection__caption`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__caption-page`,children:SS(o,d,l,u)})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__rows`,children:c.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__row`,children:r(e.item,{index:t,loaded:l,total:u,totalIsExact:d===`eq`,active:!1})},e.key))}),f&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__rows-footer`,children:/* @__PURE__ */ (0,Z.jsx)(wS,{loaded:l,total:u,totalForm:d,status:p,labels:o,onLoadMore:h})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:m>0&&TS({labels:o,totalForm:d,count:m,total:u})})]})}function OS(e,t,n){return t?n.segmentCurrent:e===`resolved`?n.segmentResolved:e===`skipped`?n.segmentSkipped:n.segmentPending}function kS({kind:e,items:t,keyOf:n,renderItem:r,stepper:i,labels:a}){let{activeIndex:o,onActiveIndexChange:s,stateOf:c}=i,l=t.length,u=l-1,d=(0,L.useRef)(/* @__PURE__ */ new Map),f=(e,t)=>{var n;let r;switch(e.key){case`ArrowRight`:r=t+1;break;case`ArrowLeft`:r=t-1;break;case`Home`:r=0;break;case`End`:r=u;break;default:return}r<0||r>u||(e.preventDefault(),(n=d.current.get(r))==null||n.focus())};return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--stepper`,"data-kind":e,role:`group`,"aria-roledescription":a.roleStepper,"aria-label":r_(a.stepperAria,{total:l}),children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__progress`,children:t.map((e,t)=>{let r=c(t),i=t===o;return/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,ref:e=>{if(e!==null)return d.current.set(t,e),()=>{d.current.delete(t)}},className:`qa-ai-chat-collection__step`,"data-state":r,"aria-current":i?`step`:void 0,"aria-label":r_(OS(r,i,a),{index:t+1,total:l}),tabIndex:i?0:-1,onClick:()=>s(t),onKeyDown:e=>f(e,t)},n(e))})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__steps`,children:t.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__step-panel`,"data-index":t,role:`group`,"aria-label":r_(a.stepPosition,{index:t+1,total:l}),hidden:t!==o,children:r(e,{index:t,loaded:l,total:l,totalIsExact:!0,active:t===o})},n(e)))})]})}var AS=.6,jS=`0px 100% 0px 100%`,MS=`{index}`;function NS(e,t){let n=e.indexOf(MS);if(n===-1)return{lead:r_(e,t),tail:``};let r=n+7;return{lead:r_(e.slice(0,r),t),tail:r_(e.slice(r),t)}}function PS({activeIndex:e,loaded:t,total:n,totalForm:r,slideCount:i,loaderIndex:a,labels:o,onGoTo:s}){let c=i-1,l=e+1,{lead:u,tail:d}=e===a?{lead:o.positionMore,tail:``}:r===`eq`?NS(o.counter,{index:l,total:n}):NS(o.counterUnknown,{index:l});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__controls`,onKeyDown:t=>{if(t.target instanceof HTMLInputElement)return;let n;switch(t.key){case`ArrowRight`:n=e+1;break;case`ArrowLeft`:n=e-1;break;case`Home`:n=0;break;case`End`:n=c;break;default:return}n<0||n>c||(t.preventDefault(),s(n,`live`))},children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-collection__counter`,children:[u,d!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__counter-total`,children:d})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__indicator`,children:/* @__PURE__ */ (0,Z.jsx)(FS,{activeIndex:e,slideCount:i,loaded:t,total:n,totalForm:r,loaderIndex:a,labels:o,onGoTo:s})}),/* @__PURE__ */ (0,Z.jsxs)(Ge,{children:[/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:o.previous,children:/* @__PURE__ */ (0,Z.jsx)(h,{icon:/* @__PURE__ */ (0,Z.jsx)(pn,{size:16}),className:`qa-ai-chat-collection__prev`,disabled:e===0,onClick:()=>s(e-1,`live`)})}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:o.next,children:/* @__PURE__ */ (0,Z.jsx)(h,{icon:/* @__PURE__ */ (0,Z.jsx)(fe,{size:16}),className:`qa-ai-chat-collection__next`,disabled:e>=c,onClick:()=>s(e+1,`live`)})})]})]})}function FS({activeIndex:e,slideCount:t,loaded:n,total:r,totalForm:i,loaderIndex:a,labels:o,onGoTo:s}){return t<=6?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__dots`,children:Array.from({length:t},(t,c)=>/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-collection__dot`,"aria-label":xS({labels:o,totalForm:i,slideIndex:c,loaderIndex:a,loaded:n,total:r}),"aria-current":c===e?`true`:void 0,onClick:()=>s(c,`live`)},c))}):/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`range`,className:`qa-ai-chat-collection__strip`,min:1,max:t,step:1,value:e+1,"aria-label":o.scrubberAria,"aria-valuetext":bS({labels:o,totalForm:i,slideIndex:e,loaderIndex:a,loaded:n,total:r}),onChange:e=>s(Number(e.target.value)-1,`control`)})}function IS(e,t){if(t!==null)return e.some(e=>e.index===t&&e.ratio>=.6)?t:null;let n=null;for(let t of e)t.ratio<.6||(n===null||t.ratio>n.ratio)&&(n=t);return n===null?null:n.index}function LS(e){let t=Number(e.dataset.index);if(!Number.isInteger(t))throw Error(`ChatCollection: slide with no numeric data-index ("${String(e.dataset.index)}")`);return t}function RS({viewportRef:e,trackRef:t}){let[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(null),o=(0,L.useRef)(0),s=(0,L.useRef)(0),c=(0,L.useRef)(/* @__PURE__ */ new Set),l=(0,L.useRef)(null),u=(0,L.useRef)(null),d=(0,L.useRef)(null);s.current=n;let f=(0,L.useCallback)(()=>{u.current=null,d.current!==null&&(clearTimeout(d.current),d.current=null)},[]),p=(0,L.useCallback)(e=>{var t;if(e!==null)return c.current.add(e),(t=l.current)==null||t.observe(e),()=>{var t;c.current.delete(e),(t=l.current)==null||t.unobserve(e)}},[]),m=(0,L.useCallback)(e=>{for(let t of c.current)if(LS(t)===e)return t;return null},[]);return(0,L.useEffect)(function(){let t=e.current;if(t===null)return;let n=new IntersectionObserver(e=>{let t=[];for(let n of e){let e=n.target;e instanceof HTMLLIElement&&c.current.has(e)&&t.push({index:LS(e),ratio:n.intersectionRatio})}let n=IS(t,u.current);if(n===null||(u.current!==null&&f(),n===s.current))return;let i=m(s.current),l=m(n),d=document.activeElement,p=i!==null&&l!==null&&d!==null&&i.contains(d)?l:null;p!==null&&p.focus({preventScroll:!0}),a(p===null?{seq:++o.current,index:n}:null),s.current=n,r(n)},{root:t,threshold:[AS]});l.current=n;for(let e of c.current)n.observe(e);return()=>{l.current=null,n.disconnect()}},[e,f,m]),(0,L.useEffect)(()=>f,[f]),{activeIndex:n,registerSlide:p,goToSlide:(0,L.useCallback)((n,i)=>{let c=e.current,l=t.current,p=m(n);if(c===null||l===null||p===null)return;let h=Math.abs(n-s.current),g=p.offsetLeft-l.offsetLeft;u.current=n,s.current=n,r(n),h>1?c.scrollTo({left:g,behavior:`instant`}):c.scrollTo({left:g}),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(f,600),i.announcer===`slide`&&p.focus({preventScroll:!0}),a(i.announcer===`live`?{seq:++o.current,index:n}:null)},[e,t,f,m]),announcement:i}}function zS(e,t,n){return e<t||n.has(e)}function BS({viewportRef:e}){let[t,n]=(0,L.useState)(()=>/* @__PURE__ */ new Set),r=(0,L.useRef)(/* @__PURE__ */ new Set),i=(0,L.useRef)(null),a=(0,L.useCallback)(e=>{var t;if(e!==null)return r.current.add(e),(t=i.current)==null||t.observe(e),()=>{var t;r.current.delete(e),(t=i.current)==null||t.unobserve(e)}},[]);return(0,L.useEffect)(function(){let t=e.current;if(t===null)return;let a=new IntersectionObserver(e=>{let t=[];for(let n of e){if(!n.isIntersecting)continue;let e=Number(n.target.dataset.index);Number.isInteger(e)&&(t.push(e),a.unobserve(n.target))}t.length!==0&&n(e=>{let n=new Set(e);for(let e of t)n.add(e);return n})},{root:t,rootMargin:jS});i.current=a;for(let e of r.current)a.observe(e);return()=>{i.current=null,a.disconnect()}},[e]),{registerSlide:a,isMounted:(0,L.useCallback)(e=>zS(e,3,t),[t])}}function VS({kind:e,items:t,keyOf:n,renderItem:r,page:i,onLoadMore:a,labels:o,header:s}){let c=(0,L.useRef)(null),l=(0,L.useRef)(null),{entries:u,loaded:d,total:f,totalForm:p,hasMore:m,status:h,lastAppended:g,loadMore:_}=ES({items:t,page:i,onLoadMore:a,keyOf:n,kind:e}),v=m?u.length+1:u.length,y=f>d||m,{activeIndex:b,registerSlide:x,goToSlide:S,announcement:C}=RS({viewportRef:c,trackRef:l}),{registerSlide:w,isMounted:T}=BS({viewportRef:c}),ee=(0,L.useCallback)(e=>{let t=x(e),n=w(e);return()=>{t==null||t(),n==null||n()}},[x,w]),E=u.length,D=m?E:null;(0,L.useEffect)(function(){m&&b===E&&h===`idle`&&_()},[m,b,E,h,_]);let te=v-1,ne=e=>{if(e.target!==e.currentTarget)return;let t;switch(e.key){case`ArrowRight`:t=b+1;break;case`ArrowLeft`:t=b-1;break;case`Home`:t=0;break;case`End`:t=te;break;default:return}t<0||t>te||(e.preventDefault(),S(t,{announcer:`slide`}))},O=(e,t,n,r)=>{let i=e===b;return/* @__PURE__ */ (0,Z.jsx)(`li`,{ref:ee,"data-index":e,"data-active":i?`true`:void 0,className:`qa-ai-chat-collection__slide${r===void 0?``:` ${r}`}`,role:`group`,"aria-roledescription":o.roleSlide,"aria-label":bS({labels:o,totalForm:p,slideIndex:e,loaderIndex:D,loaded:d,total:f}),tabIndex:i?0:-1,onKeyDown:ne,onClick:i?void 0:()=>S(e,{announcer:`slide`}),children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__slide-content`,inert:!i,children:n})},t)};return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--carousel`,"data-kind":e,"data-has-more":m?`true`:void 0,children:[(s!==void 0||y)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__head`,children:[s,y&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__head-count`,children:SS(o,p,d,f)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:c,className:`qa-ai-chat-collection__viewport`,role:`group`,"aria-roledescription":o.roleCarousel,"aria-label":o.collectionAria,children:/* @__PURE__ */ (0,Z.jsxs)(`ul`,{ref:l,className:`qa-ai-chat-collection__track`,children:[u.map((e,t)=>O(t,e.key,T(t)?r(e.item,{index:t,loaded:d,total:f,totalIsExact:p===`eq`,active:t===b}):/* @__PURE__ */ (0,Z.jsx)(HS,{}))),m&&O(E,`${e}:load-more`,/* @__PURE__ */ (0,Z.jsx)(wS,{loaded:d,total:f,totalForm:p,status:h,labels:o,onLoadMore:_}),`qa-ai-chat-collection__slide--more`)]})}),/* @__PURE__ */ (0,Z.jsx)(PS,{activeIndex:b,loaded:d,total:f,totalForm:p,slideCount:v,loaderIndex:D,labels:o,onGoTo:(e,t)=>S(e,{announcer:t})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:C!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:bS({labels:o,totalForm:p,slideIndex:C.index,loaderIndex:D,loaded:d,total:f})},C.seq)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:g>0&&TS({labels:o,totalForm:p,count:g,total:f})})]})}function HS(){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__placeholder`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--head`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--title`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--line`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--meta`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--actions`})]})}function US(e){return e.mode===`stepper`?/* @__PURE__ */ (0,Z.jsx)(kS,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,stepper:e.stepper,labels:e.labels}):e.mode===`rows`?/* @__PURE__ */ (0,Z.jsx)(DS,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,page:e.page,onLoadMore:e.onLoadMore,labels:e.labels,header:e.header}):/* @__PURE__ */ (0,Z.jsx)(VS,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,page:e.page,onLoadMore:e.onLoadMore,labels:e.labels,header:e.header})}function WS(e,t){let[n]=t.items;if(n===void 0)throw Error(`ChatCollection: empty collection for kind "${e.kind}"`);return t.items.length<2?e.renderSingle(n):e.mode===`rows`?/* @__PURE__ */ (0,Z.jsx)(US,{mode:`rows`,kind:e.kind,items:t.items,keyOf:e.keyOf,renderItem:e.renderItem,labels:e.labels,page:t.page,onLoadMore:t.onLoadMore,header:t.header}):/* @__PURE__ */ (0,Z.jsx)(US,{mode:`carousel`,kind:e.kind,items:t.items,keyOf:e.keyOf,renderItem:e.renderItem,labels:e.labels,page:t.page,onLoadMore:t.onLoadMore,header:t.header})}function GS(e,t,n){return{...e,collectionAria:t.collectionAria(n),roleCarousel:t.roleCarousel,roleSlide:t.roleSlide,previous:t.previous,next:t.next,goToSlide:t.goToSlide}}function KS({items:e}){let t=$().cards.common,n=(0,L.useId)(),[r,i]=(0,L.useState)(!1),a=(0,L.useRef)(null),o=(0,L.useRef)(null),s=(0,L.useRef)([]);(0,L.useEffect)(()=>{var e;if(!r)return;let t=e=>{a.current!==null&&!a.current.contains(e.target)&&i(!1)};return document.addEventListener(`pointerdown`,t),(e=s.current.find(e=>e!==null&&!e.disabled))==null||e.focus(),()=>document.removeEventListener(`pointerdown`,t)},[r]);let c=()=>{var e;i(!1),(e=o.current)==null||e.focus()};return/* @__PURE__ */ (0,Z.jsxs)(`span`,{ref:a,className:`qa-card-kit__more qa-card-kit__only-compact`,children:[/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:o,type:`button`,className:`qa-card-kit__more-button`,"aria-haspopup":`menu`,"aria-expanded":r,"aria-controls":r?n:void 0,"aria-label":t.moreActions,onClick:()=>i(e=>!e),onKeyDown:e=>{e.key===`ArrowDown`&&!r&&(e.preventDefault(),i(!0))},children:/* @__PURE__ */ (0,Z.jsx)(Qt,{size:16,"aria-hidden":`true`})}),r&&/* @__PURE__ */ (0,Z.jsx)(`div`,{id:n,className:`qa-card-kit__more-menu`,role:`menu`,onKeyDown:e=>{let t=s.current.filter(e=>e!==null&&!e.disabled),n=t.findIndex(e=>e===document.activeElement),r=e.key===`ArrowDown`?t[(n+1)%t.length]:e.key===`ArrowUp`?t[(n-1+t.length)%t.length]:e.key===`Home`?t[0]:e.key===`End`?t[t.length-1]:void 0;if(e.key===`Escape`){e.preventDefault(),c();return}r!==void 0&&(e.preventDefault(),r.focus())},children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:e=>{s.current[t]=e},type:`button`,role:`menuitem`,tabIndex:-1,disabled:e.disabled===!0,onClick:()=>{c(),e.onSelect()},children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),e.label]},e.id))})]})}var qS=6e4;function JS(e,t,n){let r=Math.max(0,t-Date.parse(e));return r>=qS?Yb(e,t,n):new Intl.RelativeTimeFormat(n,{numeric:`auto`}).format(-Math.round(r/1e3),`second`)}var YS=Ze();function XS(e){let{jobStatus:t}=_m(),n=Hn(e)===`active`;return(0,L.useEffect)(()=>n?t.watch(e):void 0,[t,e,n]),(0,L.useSyncExternalStore)(e=>t.subscribe(e),()=>t.latest(e.agentJobId))??e}var ZS={active:`info`,success:`success`,error:`error`,neutral:`muted`},QS={active:`info`,success:`success`,error:`error`,neutral:`neutral`};function $S({found:e}){let t=$().cards.jobStatus,n=Q(),r=[{key:`screens`,value:e.screens,label:t.found.screens(e.screens)},{key:`edges`,value:e.edges,label:t.found.edges(e.edges)},{key:`notes`,value:e.notes,label:t.found.notes(e.notes)},{key:`unexplored`,value:e.unexplored,label:t.found.unexplored(e.unexplored)}];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__found`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__found-caption`,children:t.foundCaption}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-job-card__counters`,children:r.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:kb(e.value,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e.label})]},e.key))})]})}function eC({view:e}){let t=$().cards.jobStatus;if(e.terminal===null)return null;let{reason:n,message:r}=e.terminal;return n===null&&r===null?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:j(`qa-job-card__terminal`,e.stage===`failed`&&`qa-job-card__terminal--error`),children:[n!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.terminalPrefix}),t.terminalReason[n]]}),r!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__terminal-message`,children:r})]})}function tC({payload:e}){let t=$().cards.jobStatus,n=Q(),{http:r,project:i,jobStatus:a}=_m(),o=XS(e.view),[s,c]=(0,L.useState)({status:`idle`}),l=Vn(o.stage),u=l.blockState===`active`,d=Un(o),f=t.kind[o.kind],p=s.status===`confirming`?s.action:null,m=s.status===`sending`?s.action:null,h=o.deeplink===null||i===null?null:Ch(i.number,o.deeplink),g=e=>{c({status:`sending`,action:e}),r.request({method:`POST`,path:wn.agentJobCommand.path(o.agentJobId,e),schema:YS}).then(()=>c({status:`idle`}),t=>{let n=t instanceof On&&t.status===409;c({status:`failed`,action:e,conflict:n}),n||queueMicrotask(()=>{throw t})}).finally(()=>a.refresh(o.agentJobId))},_=t.cancelConfirm[o.kind],v=o.status===`queued`?_.bodyQueued:_.bodyKept!==null&&o.degraded===null&&o.atlas!==null?`${_.body} ${_.bodyKept}`:_.body,y=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[p===`cancel`&&/* @__PURE__ */ (0,Z.jsxs)(ym,{question:_.question,body:v,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,onClick:()=>c({status:`idle`}),children:_.keep}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ar,{size:14}),onClick:()=>g(`cancel`),children:_.confirm})]}),p===`kill`&&/* @__PURE__ */ (0,Z.jsxs)(ym,{question:t.killConfirm.question,body:t.killConfirm.body[o.kind],children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,onClick:()=>c({status:`idle`}),children:t.killConfirm.keep}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Lr,{size:14}),onClick:()=>g(`kill`),children:t.killConfirm.confirm})]}),s.status===`failed`&&(s.conflict?/* @__PURE__ */ (0,Z.jsx)(vm,{tone:`warning`,children:t.failed.conflict}):/* @__PURE__ */ (0,Z.jsx)(vm,{children:s.action===`cancel`?t.failed.cancel[o.kind]:t.failed.kill}))]}),b=u&&d.cancel,x=d.kill,S=p===null&&(h!==null||b||x)?/* @__PURE__ */ (0,Z.jsxs)(sm,{children:[h!==null&&i!==null&&/* @__PURE__ */ (0,Z.jsx)(ig,{path:h,label:t.openMap,accessibleName:t.openMapAria(i.name)}),b&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ar,{size:14}),loading:m===`cancel`,disabled:m!==null,onClick:()=>c({status:`confirming`,action:`cancel`}),children:t.cancel[o.kind]}),x&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Lr,{size:14}),loading:m===`kill`,disabled:m!==null,onClick:()=>c({status:`confirming`,action:`kill`}),children:t.kill})}),/* @__PURE__ */ (0,Z.jsx)(KS,{items:[{id:`kill`,label:t.kill,icon:/* @__PURE__ */ (0,Z.jsx)(Lr,{}),disabled:m!==null,onSelect:()=>c({status:`confirming`,action:`kill`})}]})]})]}):void 0,w=o.machine.agentName.trim();return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:j(eg,`qa-job-card`,u&&p===null&&`qa-card-kit--live`),tone:o.stage===`failed`?`error`:`neutral`,icon:/* @__PURE__ */ (0,Z.jsx)(zr,{size:16}),tileTone:ZS[l.tone],title:f,caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__id`,children:o.agentJobId.slice(0,8)}),meta:/* @__PURE__ */ (0,Z.jsx)($p,{tone:QS[l.tone],role:`status`,...u?{className:`qa-card-kit__pill-live`}:{},children:t.stage[o.stage]}),"aria-label":t.cardAria(f),"aria-busy":m!==null||void 0,sections:y,footer:S,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__lines`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(mn,{"aria-hidden":`true`}),w.length>0?w:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__missing`,children:t.machineMissing})]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)($n,{"aria-hidden":`true`}),o.lastActivityAt===null?t.activityNone:t.activity(JS(o.lastActivityAt,Date.parse(o.readAt),n))]})]}),o.degraded===null?o.atlas!==null&&/* @__PURE__ */ (0,Z.jsx)($S,{found:o.atlas.found}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__degraded`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{size:15,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.degraded})]}),/* @__PURE__ */ (0,Z.jsx)(eC,{view:o})]})}function nC(e){return/* @__PURE__ */ (0,Z.jsx)(tC,{payload:e})}function rC(e,t){return{kind:`job`,mode:`carousel`,keyOf:e=>e.view.agentJobId,renderItem:nC,renderSingle:nC,labels:GS(e.collection,e.jobStatus.collection,t)}}function iC({entries:e}){let t=$().cards,n=e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]),r=e.flatMap(e=>e.outcome.status===`rejected`?[e.outcome.raw]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&WS(rC(t,n.length),{items:n,page:null,onLoadMore:null}),r.map((e,n)=>/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.jobStatus.unsupported.title,body:t.jobStatus.unsupported.body,family:`job-status`,resultKind:Jy(e)},`rejected:${String(n)}`))]})}var aC={id:`job-status`,schema:x,Card:iC},oC=F({cardKind:Qe(`metric_card`),metric:Ce,drillTarget:P().nullable()}),sC=F({cardKind:Qe(`finding_card`),finding:ie}),cC=F({cardKind:Qe(`stability_row_card`),row:ge,basis:Te}),lC=F({cardKind:Qe(`scenario_stability_card`),detail:se}),uC=F({cardKind:Qe(`failure_breakdown_card`),entity:Ve,causes:I(Fe),totalFailures:N().int().min(0),mappingVersion:P()}),dC=F({cardKind:Qe(`weak_spot_feature_card`),row:pe}),fC=F({cardKind:Qe(`weak_spot_page_card`),row:E,unassigned:$e()}),pC=F({cardKind:Qe(`trend_card`),trend:de}),mC=F({cardKind:Qe(`hotspot_card`),page:Ve.nullable(),counters:Oe,lastPassedDate:rt().nullable()}),hC=et(`cardKind`,[oC,sC,cC,lC,uC,dC,fC,pC,mC]),gC={resultKind:Qe(`report_cards`),scope:F({projectId:ut()}),asOf:qe(),definitionVersions:ct(P(),P()),cards:I(hC),truncated:$e(),total:N().int().min(0).nullable().optional()},_C=et(`basisKind`,[F({...gC,basisKind:Qe(`window`),window:Ae}),F({...gC,basisKind:Qe(`last_runs`),basis:Te})]),vC=/* @__PURE__ */ `pass_rate.runs_total.runs_passed.runs_failed.runs_evaluated.runs_infra.runs_cancelled.runs_abandoned.run_duration_sum_ms.run_duration_count.run_duration_avg.page_steps_executed.page_steps_passed.page_steps_failed.page_steps_healed.page_step_success_rate.page_healed_rate.step_failures.run_failures.bugs_opened.bugs_closed.open_bugs.covered_pages.total_pages.page_coverage_pct.unstable_scenarios`.split(`.`);function yC(e){return vC.includes(e)}var bC=[`pass_rate`,`runs_total`,`unstable_scenarios`,`open_bugs`,`page_coverage_pct`];function xC(e){return bC.includes(e)}function SC(e,t,n,r){if(e===null)return{magnitude:`\u2014`,unit:null};let i=r.metric.unit[t.unit];return{magnitude:Ob(e,t.precision,n),unit:i===``?null:i}}function CC(e,t,n,r){let i=SC(e,t,n,r);return i.unit===null?i.magnitude:`${i.magnitude}\u00A0${i.unit}`}function wC(e,t,n){let{previous:r,value:i,format:a}=e;if(r===null||r.insufficient||r.value===null||i===null)return null;let o=i-r.value,s=Ab(o,a.precision,t),c=a.unit===`percent`,l=n.metric.unit[a.unit],u=c?n.metric.deltaPoints(s):l===``?s:`${s}\u00A0${l}`,d=o>0?`up`:o<0?`down`:`flat`;return o===0||a.goodDirection===`none`?{text:u,direction:d,tone:`neutral`,inPoints:c}:{text:u,direction:d,tone:(a.goodDirection===`up`?o>0:o<0)?`good`:`bad`,inPoints:c}}function TC(e,t){return yC(e)?{text:t.metric.name[e],missing:!1}:{text:t.metric.missingName,missing:!0}}function EC(e,t,n){return xC(e)?n.metric.denominator[e](t):n.metric.denominator.generic(t)}function DC(e,t){switch(e.kind){case`window`:return t.window[e.window];case`runs`:return t.basisRuns(e.basis.maxRuns,e.basis.maxAgeDays);case`currentState`:return t.currentState;case`noWindow`:return t.noWindow}}function OC(e,t){return e.trim().length===0?{text:t,missing:!0}:{text:e,missing:!1}}function kC(e,t){let n=t.weakSpots.priority;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:e}var AC={status:`incomplete_evidence`};function jC(e,t,n){return`${Ob(e,0,t)}\u00A0${n.metric.unit.percent}`}function MC(e,t){let n=e.evidence.dominantCause;return n===void 0?``:t.finding.dominantCause(t.cause[n.group],n.count,n.totalFailures)}function NC(e,t=``){return{status:`stated`,before:e.before,after:`${e.after}${t}`}}function PC(e,t,n){let{evidence:r}=e,i=n.finding.sentence;switch(e.ruleId){case`uncovered_high_priority`:{var a;let e=r.values.uncoveredPages,o=r.values.totalPages,s=(a=r.labels)==null?void 0:a.priority;return e===void 0||o===void 0||s===void 0?AC:NC(i.uncovered_high_priority({priority:kC(s,n).toLocaleLowerCase(t),uncovered:e,total:o}))}case`consistently_failing_scenario`:{let t=r.values.consecutiveFails;return t===void 0?AC:NC(i.consistently_failing_scenario({count:t}),MC(e,n))}case`low_page_success`:{let a=r.values.page_step_success_rate;return a===void 0?AC:NC(i.low_page_success({rate:jC(a,t,n),executions:r.denominator,threshold:jC(r.threshold,t,n)}),MC(e,n))}case`high_healed_rate`:{let e=r.values.page_healed_rate;return e===void 0?AC:NC(i.high_healed_rate({rate:jC(e,t,n),threshold:jC(r.threshold,t,n)}))}case`stale_page`:{let e=r.values.daysSinceLastExecution;return e===void 0?AC:NC(i.stale_page({days:e,threshold:r.threshold}))}case`open_bugs_no_verification`:{let e=r.values.criticalBugs,t=r.values.highBugs;if(e===void 0||t===void 0||r.window===null)return AC;let a=n.window[r.window];return NC(e>0?i.open_bugs_no_verification_critical({count:e,window:a}):i.open_bugs_no_verification_high({count:t,window:a}))}default:return{status:`unknown_rule`}}}function FC(e){let{project:t}=_m();return e===null||t===null?null:Th(e,t.number)}function IC({name:e}){let t=$().cards.common,n=OC(e,t.missingName);return/* @__PURE__ */ (0,Z.jsx)(em,{missing:n.missing,children:n.text})}function LC({delta:e}){let t=$().cards.report.metric,n=`${t.deltaHint}${e.inPoints?t.deltaPointsHint:``}`;return/* @__PURE__ */ (0,Z.jsxs)(ng,{tip:n,className:j(`qa-report-delta`,`qa-report-delta--${e.tone}`),children:[e.direction===`up`&&/* @__PURE__ */ (0,Z.jsx)(ir,{"aria-hidden":`true`}),e.direction===`down`&&/* @__PURE__ */ (0,Z.jsx)(tr,{"aria-hidden":`true`}),e.text]})}function RC({finding:e}){let t=$().cards.report,n=Q(),{evidence:r}=e,i=r.window===null?t.noWindow:t.windowShort[r.window],a=r.window===null?t.noWindow:t.window[r.window],o=t.finding.evidenceRows,s=/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-evidence-tip`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.denominator}: ${kb(r.denominator,n)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.window}: ${a}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.threshold}: ${kb(r.threshold,n)}`}),Object.entries(r.values).map(([e,t])=>/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${e}: ${kb(t,n)}`},e)),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.rule}: ${e.ruleId} \u00B7 ${e.ruleVersion}`})]});return/* @__PURE__ */ (0,Z.jsxs)(ng,{tip:s,className:`qa-report-evidence`,children:[/* @__PURE__ */ (0,Z.jsx)(Be,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${t.finding.evidenceAria}: `}),t.finding.evidence(r.denominator,i,r.threshold)]})}function zC({date:e}){let t=$().cards.report.lastPassed,n=Q();if(e===null)return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-warnink`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`}),t.never]});let r=Hb(e),i=r<=0?t.today:r===1?t.yesterday:t.daysAgo(r);return/* @__PURE__ */ (0,Z.jsx)(ng,{tip:Rb(e,n),children:i})}function BC({passed:e,executed:t}){let n=$().cards.report,r=Q(),i=jb(e,t);return i===null?/* @__PURE__ */ (0,Z.jsx)(rg,{value:`\u2014`,base:n.weakSpots.noExecutions}):/* @__PURE__ */ (0,Z.jsx)(rg,{value:`${kb(i,r)} ${n.metric.unit.percent}`,base:n.weakSpots.ofSteps(e,t)})}function VC(e){return e.basisKind===`window`?{kind:`window`,window:e.window.label}:{kind:`runs`,basis:e.basis}}function HC(e,t){switch(e.cardKind){case`metric_card`:return e.metric.windowScoped?{kind:`window`,window:e.metric.window.label}:{kind:`currentState`};case`trend_card`:return{kind:`window`,window:e.trend.window.label};case`stability_row_card`:return{kind:`runs`,basis:e.basis};case`scenario_stability_card`:return{kind:`runs`,basis:e.detail.basis};case`finding_card`:return e.finding.evidence.window===null?{kind:`noWindow`}:{kind:`window`,window:e.finding.evidence.window};case`failure_breakdown_card`:case`weak_spot_feature_card`:case`weak_spot_page_card`:case`hotspot_card`:return t}}function UC(e,t){switch(e.cardKind){case`metric_card`:return e.metric.asOf;case`trend_card`:return e.trend.asOf;case`finding_card`:return e.finding.asOf;case`scenario_stability_card`:return e.detail.asOf;case`stability_row_card`:case`failure_breakdown_card`:case`weak_spot_feature_card`:case`weak_spot_page_card`:case`hotspot_card`:return t}}function WC(e){let{total:t}=e;return typeof t==`number`&&t>e.cards.length?{kind:`shownOfTotal`,shown:e.cards.length,total:t}:e.truncated?{kind:`truncated`}:null}function GC(e){let t=[],n=[],r=[];for(let i of e){let{call:e,outcome:a}=i;if(a.status===`rejected`){n.push({toolCallId:e===null?null:e.toolCallId,raw:a.raw});continue}if(e===null){n.push({toolCallId:null,raw:a.result});continue}let o=a.result,s={...e.title!==void 0&&{source:e.title},basis:VC(o),asOf:o.asOf,definitionVersions:o.definitionVersions},c=WC(o);o.cards.length===0&&c!==null&&r.push({toolCallId:e.toolCallId,note:c}),o.cards.forEach((n,r)=>{t.push({card:n,envelope:{toolCallId:e.toolCallId,toolName:e.toolName,caption:s},indexInEnvelope:r,envelopeNote:r===o.cards.length-1?c:null})})}return{slides:t,rejected:n,cardlessNotes:r}}function KC(e,t){return e.kind===`shownOfTotal`?t.envelope.shownOfTotal(e.shown,e.total):t.envelope.truncated}function qC({slide:e,icon:t,label:n,versions:r,pill:i,notes:a=[],sections:o,footer:s,children:c}){var l;let u=$(),d=u.cards.report,f=Q(),{caption:p}=e.envelope,m=DC(HC(e.card,p.basis),d),h=UC(e.card,p.asOf),g=d.asOf(Ib(h,f)),_=r??Object.entries(p.definitionVersions).map(([e,t])=>d.stamp.envelope(e,t)),v=((l=p.source)==null?void 0:l[f])??u.shell.transcript.toolCall,y=d.stamp.source(v,_),b=e.envelopeNote===null?null:KC(e.envelopeNote,d),x=[...a,...b===null?[]:[/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:b},`envelope`)]];return/* @__PURE__ */ (0,Z.jsx)(Zp,{className:`${eg} qa-report-card`,icon:t,title:d.title[e.card.cardKind],"aria-label":n,fold:{title:n,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:`${v} \u00B7 ${m}`})},caption:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-card__env`,children:v}),` \u00B7 ${m}`,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:` \u00B7 ${g}`})]}),meta:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[i,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-wide`,children:/* @__PURE__ */ (0,Z.jsx)(ng,{tip:y,children:/* @__PURE__ */ (0,Z.jsx)(`time`,{dateTime:h,children:g})})})]}),...x.length===0?{}:{note:/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:x})},...o===void 0?{}:{sections:o},...s===void 0?{}:{footer:s},children:c})}var JC={critical:{tone:`error`},high:{tone:`warning`,className:`qa-report-pill--priority`},watch:{tone:`neutral`}};function YC({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{finding:a}=t,o=OC(a.entity.name,r.missingName),s=PC(a,i,n),c=FC(a.drillTarget),l=n.finding.open[a.entity.type],u=JC[a.severity];return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Er,{size:16}),label:`${n.title.finding_card}: ${o.text}`,versions:[n.stamp.rule(a.ruleId,a.ruleVersion)],pill:/* @__PURE__ */ (0,Z.jsx)($p,{tone:u.tone,...u.className===void 0?{}:{className:u.className},children:n.finding.severity[a.severity]}),footer:c===null?void 0:/* @__PURE__ */ (0,Z.jsx)(sm,{children:/* @__PURE__ */ (0,Z.jsx)(ig,{path:c,label:l,accessibleName:n.openAria(l,o.text)})}),children:[s.status===`stated`?/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-report-finding`,children:[s.before,/* @__PURE__ */ (0,Z.jsx)(`b`,{className:o.missing?`qa-report-finding__missing`:void 0,children:o.text}),s.after]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(tm,{children:s.status===`unknown_rule`?n.finding.unknownRule:n.finding.incompleteEvidence}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-detail`,children:n.finding.ruleIdDetail(a.ruleId)})]}),/* @__PURE__ */ (0,Z.jsx)(RC,{finding:a})]})}var XC=300,ZC=44,QC=4;function $C({points:e,ariaLabel:t}){let n=$().cards.report,r=Q(),i=e.flatMap(e=>e.value===null?[]:[e.value]),a=Math.min(...i),o=Math.max(...i)-a,s=t=>e.length>1?QC+t*292/(e.length-1):XC/2,c=e=>40-(o===0?.5:(e-a)/o)*36,l=e.map((e,t)=>e.value===null?null:{x:s(t),y:c(e.value)}),u=l.filter(e=>e!==null),d=u[0],f=u[u.length-1];if(d===void 0||f===void 0)throw Error(`Sparkline: rendered for a series with no value \u2014 the caller states that case`);let p=``,m=!1;for(let e of l){if(e===null){m=!1;continue}p+=`${m?`L`:`M`}${e.x.toFixed(1)} ${e.y.toFixed(1)} `,m=!0}let h=`M${d.x.toFixed(1)} ${String(ZC)} ${u.map(e=>`L${e.x.toFixed(1)} ${e.y.toFixed(1)}`).join(` `)} L${f.x.toFixed(1)} ${String(ZC)} Z`,g=e[0],_=e[e.length-1];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-spark`,children:[/* @__PURE__ */ (0,Z.jsxs)(`svg`,{className:`qa-report-spark__svg`,viewBox:`0 0 ${String(XC)} ${String(ZC)}`,role:`img`,"aria-label":t,children:[/* @__PURE__ */ (0,Z.jsx)(`path`,{className:`qa-report-spark__area`,d:h}),/* @__PURE__ */ (0,Z.jsx)(`path`,{className:`qa-report-spark__line`,d:p.trim()}),e.map((e,t)=>e.value===null?/* @__PURE__ */ (0,Z.jsx)(`circle`,{className:`qa-report-spark__gap`,cx:s(t).toFixed(1),cy:42,r:2,children:/* @__PURE__ */ (0,Z.jsx)(`title`,{children:n.metric.sparkGap(zb(e.date,r),e.denominator)})},e.date):null),/* @__PURE__ */ (0,Z.jsx)(`circle`,{className:`qa-report-spark__last`,cx:f.x.toFixed(1),cy:f.y.toFixed(1),r:3.5})]}),g!==void 0&&_!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-spark__axis`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:zb(g.date,r)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:zb(_.date,r)})]})]})}function ew(e,t){return j(`qa-report-strip__cell`,`qa-report-strip__cell--${e===`P`?`passed`:e===`F`?`failed`:`unknown`}`,t&&`qa-report-strip__cell--pre`)}function tw({strip:e,preWatermarkStrip:t,passes:n,fails:r}){let i=$().cards.report.stability,a=Q(),o=t===null?[]:[...t],s=i.stripAria(n,r,n+r)+(o.length===0?``:i.stripAriaBeforeChange(o.length));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-strip`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-strip__cells`,role:`group`,"aria-label":s,children:[o.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:ew(e,!0),"aria-hidden":`true`},`pre-${String(t)}`)),o.length>0&&/* @__PURE__ */ (0,Z.jsx)(ng,{tip:i.beforeChange,className:`qa-report-strip__divider`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:i.beforeChange})}),[...e].map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:ew(e,!1),"aria-hidden":`true`},`run-${String(t)}`))]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-strip__count`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-strip__ok`,children:`${kb(n,a)}\u2713`}),` `,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-strip__bad`,children:`${kb(r,a)}\u2717`})]})]})}function nw(e){return{"--qa-report-cause":`var(--color-cause-${e.replace(/_/g,`-`)})`}}function rw({group:e}){let t=$().cards.report;return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:j(`qa-report-cause`,e===`unrecognized`&&`qa-report-cause--unrecognized`),style:nw(e),children:t.cause[e]})}function iw({causes:e,countLabel:t}){let n=Math.max(...e.map(e=>e.count));return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-report-causes`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{style:nw(e.group),children:[/* @__PURE__ */ (0,Z.jsx)(rw,{group:e.group}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-causes__bar`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`i`,{style:{"--qa-report-cause-share":`${String(n===0?0:Math.round(e.count/n*100))}%`}})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-causes__count`,children:t(e.count)})]},e.group))})}function aw({causes:e}){let t=$().cards.report.stability;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-report-rawcodes`,children:e.flatMap(e=>e.rawCodes.map(n=>/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.rawCode(n.code,n.count)},`${e.group}:${n.code}`)))})}var ow={critical:{tone:`crit`,icon:/* @__PURE__ */ (0,Z.jsx)(he,{})},high:{tone:`high`,icon:/* @__PURE__ */ (0,Z.jsx)(Xr,{})},watch:{tone:`plain`,icon:/* @__PURE__ */ (0,Z.jsx)($t,{})}};function sw({counts:e}){let t=$().cards.report.weakSpots,n=Q(),r=dt.filter(t=>e[t]>0);return r.length===0?t.findingsNone:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev-row`,children:r.map(r=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-sev qa-report-sev--${ow[r].tone}`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev__icon`,"aria-hidden":`true`,children:ow[r].icon}),/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,children:kb(e[r],n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:t.findingCount[r](e[r])})]},r))})}var cw={critical:{tone:`crit`,icon:/* @__PURE__ */ (0,Z.jsx)(he,{})},high:{tone:`high`,icon:/* @__PURE__ */ (0,Z.jsx)(ir,{})},medium:{tone:`warn`,icon:/* @__PURE__ */ (0,Z.jsx)(ur,{})},low:{tone:`low`,icon:null}};function lw(e){return Object.prototype.hasOwnProperty.call(cw,e)}function uw({buckets:e}){let t=$().cards.report.hotspot.severityChip;return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev-row`,children:e.map(e=>{let{severity:n,count:r}=e;if(n===null)return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev qa-report-sev--plain`,children:t.none(r)},`__none__`);if(!lw(n))return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev qa-report-sev--plain`,children:t.unknown(r,n)},`raw:${n}`);let i=cw[n];return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-sev qa-report-sev--${i.tone}`,children:[i.icon!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev__icon`,"aria-hidden":`true`,children:i.icon}),t[n](r)]},n)})})}function dw(e){return e.some(e=>e.value!==null)}function fw({metricId:e}){let t=$().cards.report,n=TC(e,t);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(em,{missing:n.missing,children:n.text}),n.missing&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-detail`,children:t.metric.missingNameDetail(e)})]})}function pw({slide:e,card:t}){let n=$().cards.report,r=Q(),{metric:i}=t,a=TC(i.metricId,n),o=FC(t.drillTarget),s=SC(i.insufficient?null:i.value,i.format,r,n),c=i.insufficient?null:wC(i,r,n),l=i.series;return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(xr,{size:16}),label:`${n.title.metric_card}: ${a.text}`,versions:[n.stamp.metric(i.metricId,i.definitionVersion)],footer:o===null?void 0:/* @__PURE__ */ (0,Z.jsx)(sm,{children:/* @__PURE__ */ (0,Z.jsx)(ig,{path:o,label:n.metric.openReport,accessibleName:n.openAria(n.metric.openReport,a.text)})}),children:[/* @__PURE__ */ (0,Z.jsx)(fw,{metricId:i.metricId}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-report-metric`,children:[s.magnitude,s.unit!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-metric__unit`,children:` ${s.unit}`}),c!==null&&/* @__PURE__ */ (0,Z.jsx)(LC,{delta:c})]}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:EC(i.metricId,i.denominator,n)}),i.insufficient?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.insufficient}):l===void 0||l.length===0?null:dw(l)?/* @__PURE__ */ (0,Z.jsx)($C,{points:l,ariaLabel:n.metric.sparkAria(a.text)}):/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.noSeriesValue})]})}function mw({slide:e,card:t}){let n=$().cards.report,r=Q(),{trend:i}=t,a=TC(i.metricId,n),o=i.points[i.points.length-1],s=i.points.filter(e=>e.value===null).length;return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Xr,{size:16}),label:`${n.title.trend_card}: ${a.text}`,versions:[n.stamp.metric(i.metricId,i.definitionVersion)],notes:s===0?[]:[/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:n.trend.gaps(s)},`gaps`)],children:[/* @__PURE__ */ (0,Z.jsx)(fw,{metricId:i.metricId}),o===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.trend.empty}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[dw(i.points)?/* @__PURE__ */ (0,Z.jsx)($C,{points:i.points,ariaLabel:n.metric.sparkAria(a.text)}):/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.noSeriesValue}),/* @__PURE__ */ (0,Z.jsxs)(nm,{children:[/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.trend.lastDay(zb(o.date,r)),value:/* @__PURE__ */ (0,Z.jsx)(rg,{value:CC(o.value,i.format,r,n),base:n.trend.dayDenominator(o.denominator)})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.trend.points,value:kb(i.points.length,r)})]})]})]})}function hw(e,t,n){let r=n.stability.evidence;switch(e.status){case`flaky`:return r.flaky(e.fails,e.passes,e.windowRuns);case`consistently_failing`:return r.consistently_failing(e.consecutiveFails);case`monitoring`:return r.monitoring(e.fails,e.windowRuns);case`stable`:return r.stable(e.windowRuns);case`insufficient_history`:return e.historyResetByContentChange&&e.contentWatermarkAt!==null?r.insufficientHistoryWatermark(Bb(e.contentWatermarkAt,t)):r.insufficientHistory(e.windowRuns)}}var gw={consistently_failing:`error`,flaky:`warning`,monitoring:`info`,insufficient_history:`neutral`,stable:`success`};function _w({part:e,total:t,base:n}){let r=$().cards.report,i=Q(),a=jb(e,t);return/* @__PURE__ */ (0,Z.jsx)(rg,{value:a===null?`\u2014`:`${kb(a,i)} ${r.metric.unit.percent}`,base:n})}function vw(e,t,n,r){return!e||t===null?[]:[/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(rn,{}),children:n(Bb(t,r))},`history`)]}function yw({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=OC(a.scenarioName,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)($n,{size:16}),label:`${n.title.stability_row_card}: ${o.text}`,versions:null,pill:/* @__PURE__ */ (0,Z.jsx)($p,{tone:gw[a.status],children:n.stability.status[a.status]}),notes:vw(a.historyResetByContentChange,a.contentWatermarkAt,n.stability.historyReset,i),children:[/* @__PURE__ */ (0,Z.jsx)(IC,{name:a.scenarioName}),/* @__PURE__ */ (0,Z.jsx)(tm,{children:hw(a,i,n)}),/* @__PURE__ */ (0,Z.jsx)(tw,{strip:a.outcomeStrip,preWatermarkStrip:a.preWatermarkStrip,passes:a.passes,fails:a.fails}),/* @__PURE__ */ (0,Z.jsxs)(nm,{children:[/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.stability.success,value:/* @__PURE__ */ (0,Z.jsx)(_w,{part:a.passes,total:a.windowRuns,base:n.stability.outOf(a.passes,a.windowRuns)})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.stability.dominantCause,value:a.dominantCauseGroup===null?n.stability.noFailures:/* @__PURE__ */ (0,Z.jsx)(rw,{group:a.dominantCauseGroup})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.stability.lastRun,value:a.lastRunAt===null?`\u2014`:Ub(a.lastRunAt,i)})]})]})}function bw(e){return e.some(e=>e.rawCodes.length>0)}var xw={passed:`ok`,failed:`fail`,infra:`gray`,cancelled:`gray`,abandoned:`gray`};function Sw({runs:e}){let t=$().cards.report.stability,n=Q();return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-report-runs`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-oc qa-report-oc--${xw[e.outcome]}`,children:t.outcome[e.outcome]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-runs__when`,children:Ub(e.startedAt,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-runs__dur`,children:e.durationMs===null?`\u2014`:Xb(e.durationMs,n)}),e.dominantCauseGroup!==null&&/* @__PURE__ */ (0,Z.jsx)(rw,{group:e.dominantCauseGroup})]},e.scenarioRunId))})}function Cw({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{detail:a}=t,o=OC(a.scenario.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)($n,{size:16}),label:`${n.title.scenario_stability_card}: ${o.text}`,versions:[n.stamp.definition(a.definitionVersion),n.stamp.mapping(a.causeMappingVersion)],pill:/* @__PURE__ */ (0,Z.jsx)($p,{tone:gw[a.status],children:n.stability.status[a.status]}),notes:vw(a.historyResetByContentChange,a.contentWatermarkAt,n.stability.historyReset,i),sections:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[bw(a.causes)&&/* @__PURE__ */ (0,Z.jsx)(om,{summary:/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.rawCodes(a.causeMappingVersion)}),children:/* @__PURE__ */ (0,Z.jsx)(aw,{causes:a.causes})}),a.recentRuns.length>0&&/* @__PURE__ */ (0,Z.jsx)(om,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.recentRuns}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:kb(a.recentRuns.length,i)})]}),children:/* @__PURE__ */ (0,Z.jsx)(Sw,{runs:a.recentRuns})})]}),children:[/* @__PURE__ */ (0,Z.jsx)(IC,{name:a.scenario.name}),/* @__PURE__ */ (0,Z.jsx)(tm,{children:hw(a,i,n)}),/* @__PURE__ */ (0,Z.jsx)(tw,{strip:a.outcomeStrip,preWatermarkStrip:a.preWatermarkStrip,passes:a.passes,fails:a.fails}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-stack`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sublabel`,children:n.stability.causesTitle}),a.causes.length===0?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-denom`,children:n.stability.noCauses}):/* @__PURE__ */ (0,Z.jsx)(iw,{causes:a.causes,countLabel:n.stability.failures})]}),/* @__PURE__ */ (0,Z.jsxs)(nm,{children:[/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.stability.healed,value:/* @__PURE__ */ (0,Z.jsx)(_w,{part:a.healedSteps,total:a.passedSteps,base:n.stability.ofPassedSteps(a.healedSteps,a.passedSteps)})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.stability.aiExecuted,value:/* @__PURE__ */ (0,Z.jsx)(_w,{part:a.aiExecutedSteps,total:a.passedSteps,base:n.stability.ofPassedSteps(a.aiExecutedSteps,a.passedSteps)})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.stability.erFailed,value:n.stability.erFailedValue(a.erFailedRuns,a.windowRuns)})]})]})}function ww({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),a=OC(t.entity.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(lr,{size:16}),label:`${n.title.failure_breakdown_card}: ${a.text}`,versions:[n.stamp.mapping(t.mappingVersion)],sections:bw(t.causes)?/* @__PURE__ */ (0,Z.jsx)(om,{summary:/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.rawCodes(t.mappingVersion)}),children:/* @__PURE__ */ (0,Z.jsx)(aw,{causes:t.causes})}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(IC,{name:t.entity.name}),/* @__PURE__ */ (0,Z.jsx)(nm,{children:/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.stability.totalFailures,value:kb(t.totalFailures,i)})}),t.causes.length===0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.stability.noCauses}):/* @__PURE__ */ (0,Z.jsx)(iw,{causes:t.causes,countLabel:e=>kb(e,i)})]})}function Tw({summary:e,children:t,className:n}){let r=(0,L.useId)(),[i,a]=(0,L.useState)(`by-tier`),o=(t,n)=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:j(`qa-chat-card__disclosure-summary`,`qa-card-kit__tier-summary`,n),"aria-expanded":t,"aria-controls":r,onClick:()=>a(t?`closed`:`open`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__disclosure-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(ee,{size:14})}),e]});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:j(`qa-chat-card__disclosure`,`qa-card-kit__tier-disclosure`,n),"data-state":i,children:[i===`by-tier`?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[o(!1,`qa-card-kit__only-compact`),o(!0,`qa-card-kit__hide-compact`)]}):o(i===`open`,null),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:r,className:`qa-chat-card__disclosure-body qa-card-kit__tier-region`,hidden:i===`closed`,children:t})]})}var Ew={critical:{tone:`error`},high:{tone:`warning`,className:`qa-report-pill--priority`},medium:{tone:`warning`}},Dw={tone:`neutral`,className:`qa-card-kit__pill-plain`};function Ow(e){return Object.prototype.hasOwnProperty.call(Ew,e)?Ew[e]:Dw}function kw({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=OC(a.feature.name,r.missingName),s=Ow(a.priority),c=[...a.pagesTruncated?[/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:n.weakSpots.pagesTruncated(a.pages.length,a.totalPages)},`truncated`)]:[],/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:n.weakSpots.membership},`membership`)];return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Ut,{size:16}),label:`${n.title.weak_spot_feature_card}: ${o.text}`,versions:null,pill:/* @__PURE__ */ (0,Z.jsx)($p,{tone:s.tone,...s.className===void 0?{}:{className:s.className},children:kC(a.priority,n)}),notes:c,sections:a.pages.length===0?void 0:/* @__PURE__ */ (0,Z.jsx)(Tw,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.weakSpots.pagesTitle}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:n.weakSpots.pagesCount(a.pages.length,a.totalPages)})]}),children:/* @__PURE__ */ (0,Z.jsx)(im,{"aria-label":n.weakSpots.pagesTitle,children:a.pages.map(e=>{let t=OC(e.page.name,r.missingName);return/* @__PURE__ */ (0,Z.jsx)(am,{icon:/* @__PURE__ */ (0,Z.jsx)(hn,{size:14}),tileTone:e.covered?`success`:`muted`,name:t.missing?/* @__PURE__ */ (0,Z.jsx)(`i`,{children:t.text}):t.text,note:`${e.covered?n.weakSpots.pageCovered:n.weakSpots.pageNotCovered} \u00B7 ${n.weakSpots.pageBugs(e.openBugs)}`},e.page.id)})})}),children:[/* @__PURE__ */ (0,Z.jsx)(IC,{name:a.feature.name}),/* @__PURE__ */ (0,Z.jsxs)(nm,{children:[/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.coverage,value:n.weakSpots.coverageValue(a.coveredPages,a.totalPages)}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.stepSuccess,value:/* @__PURE__ */ (0,Z.jsx)(BC,{passed:a.stepsPassed,executed:a.stepsExecuted})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.openBugs,value:kb(a.openBugs,i)}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.findings,value:/* @__PURE__ */ (0,Z.jsx)(sw,{counts:a.findingCounts})})]})]})}function Aw({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=OC(a.page.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(hn,{size:16}),label:`${n.title.weak_spot_page_card}: ${o.text}`,versions:null,pill:t.unassigned?/* @__PURE__ */ (0,Z.jsx)($p,{tone:`neutral`,className:`qa-card-kit__pill-plain`,children:n.weakSpots.unassigned}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(IC,{name:a.page.name}),/* @__PURE__ */ (0,Z.jsxs)(nm,{children:[/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.coverage,value:a.covered?n.weakSpots.pageCovered:n.weakSpots.pageNotCovered}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.stepSuccess,value:/* @__PURE__ */ (0,Z.jsx)(BC,{passed:a.stepsPassed,executed:a.stepsExecuted})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.openBugs,value:kb(a.openBugs,i)}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.lastPassed.label,value:/* @__PURE__ */ (0,Z.jsx)(zC,{date:a.lastPassedDate})}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.weakSpots.findings,value:/* @__PURE__ */ (0,Z.jsx)(sw,{counts:a.findingCounts})})]})]})}function jw({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{counters:a,page:o}=t,s=o===null?null:OC(o.name,r.missingName),c=a.openBySeverity.length===0?kb(a.openCount,i):/* @__PURE__ */ (0,Z.jsx)(rg,{value:kb(a.openCount,i),base:/* @__PURE__ */ (0,Z.jsx)(uw,{buckets:a.openBySeverity})});return/* @__PURE__ */ (0,Z.jsxs)(qC,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(yr,{size:16}),label:`${n.title.hotspot_card}: ${s===null?n.hotspot.unmapped:s.text}`,versions:null,children:[o===null?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(em,{missing:!0,children:n.hotspot.unmapped}),/* @__PURE__ */ (0,Z.jsx)(tm,{children:n.hotspot.unmappedHint})]}):/* @__PURE__ */ (0,Z.jsx)(IC,{name:o.name}),/* @__PURE__ */ (0,Z.jsxs)(nm,{children:[/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.hotspot.open,value:c}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.hotspot.opened,value:kb(a.openedInWindow,i)}),/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.hotspot.closed,value:/* @__PURE__ */ (0,Z.jsx)(ng,{tip:n.hotspot.closedHint,children:kb(a.closedInWindow,i)})}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(rm,{label:n.lastPassed.label,value:/* @__PURE__ */ (0,Z.jsx)(zC,{date:t.lastPassedDate})})]})]})}function Mw({slide:e}){let{card:t}=e;switch(t.cardKind){case`metric_card`:return/* @__PURE__ */ (0,Z.jsx)(pw,{slide:e,card:t});case`trend_card`:return/* @__PURE__ */ (0,Z.jsx)(mw,{slide:e,card:t});case`finding_card`:return/* @__PURE__ */ (0,Z.jsx)(YC,{slide:e,card:t});case`stability_row_card`:return/* @__PURE__ */ (0,Z.jsx)(yw,{slide:e,card:t});case`scenario_stability_card`:return/* @__PURE__ */ (0,Z.jsx)(Cw,{slide:e,card:t});case`failure_breakdown_card`:return/* @__PURE__ */ (0,Z.jsx)(ww,{slide:e,card:t});case`weak_spot_feature_card`:return/* @__PURE__ */ (0,Z.jsx)(kw,{slide:e,card:t});case`weak_spot_page_card`:return/* @__PURE__ */ (0,Z.jsx)(Aw,{slide:e,card:t});case`hotspot_card`:return/* @__PURE__ */ (0,Z.jsx)(jw,{slide:e,card:t})}}function Nw(e){return/* @__PURE__ */ (0,Z.jsx)(Mw,{slide:e})}function Pw(e,t){return{kind:`report`,mode:`carousel`,keyOf:e=>`${e.envelope.toolCallId}:${String(e.indexInEnvelope)}`,renderItem:Nw,renderSingle:Nw,labels:GS(e.collection,e.report.collection,t)}}function Fw({entries:e}){let t=$().cards,{slides:n,rejected:r,cardlessNotes:i}=GC(e);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&WS(Pw(t,n.length),{items:n,page:null,onLoadMore:null}),i.map(({toolCallId:e,note:n})=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-cardless-note`,children:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:KC(n,t.report)})},`note:${e}`)),r.map((e,n)=>/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.report.unsupported.title,body:t.report.unsupported.body,family:`report`,resultKind:Jy(e.raw)},e.toolCallId??`rejected:${String(n)}`))]})}var Iw={id:`report`,schema:_C,Card:Fw},Lw=F({scenarioId:P().min(1),runId:P().min(1)}),Rw=Tt([Lw,F({runs:I(Lw).min(1)})]);function zw({toolCallId:e,batch:t}){let{browser:n}=_m(),r=$().cards.runInTab,i=n===null?void 0:n.runFailures[e];if(i===void 0)return null;let a=t?r.failedBatch:r.failed;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-run-in-tab`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(he,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:a(r.reason[i])})]})}function Bw({entries:e}){let t=$().cards.runInTab;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`run-in-tab-outcome`,resultKind:Jy(e.outcome.raw)},r):e.call===null?null:/* @__PURE__ */ (0,Z.jsx)(zw,{toolCallId:e.call.toolCallId,batch:`runs`in e.outcome.result},r)})})}var Vw={id:`run-in-tab-outcome`,schema:Rw,Card:Bw},Hw=e=>e.outcome===`rejected`,Uw=e=>e.outcome!==`rejected`;function Ww(e,t){return e===0?`error`:e<t?`warning`:`success`}function Gw({result:e}){let t=$().cards.runStartAgent,n=Q(),{dispatchRefusalSentence:r}=_m(),{launched:i,total:a}=be(e),o=Ww(i,a),s=e.items.filter(Hw),c=e.items.filter(Uw);return/* @__PURE__ */ (0,Z.jsx)(Zp,{className:j(eg,`qa-run-agent-card`),tone:o===`success`?`neutral`:o,tileTone:o,icon:/* @__PURE__ */ (0,Z.jsx)(Nr,{size:16}),title:t.title,caption:e.agentName,"aria-label":t.cardAria(e.agentName),meta:/* @__PURE__ */ (0,Z.jsx)($p,{tone:o,children:Zy(e,t)}),...c.length>0?{sections:/* @__PURE__ */ (0,Z.jsx)(om,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.launchedSummary}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:kb(c.length,n)})]}),defaultOpen:s.length===0,children:/* @__PURE__ */ (0,Z.jsx)(im,{"aria-label":t.launchedList,children:c.map(e=>/* @__PURE__ */ (0,Z.jsx)(am,{icon:/* @__PURE__ */ (0,Z.jsx)(we,{size:16}),tileTone:`success`,name:e.scenarioName},e.position))})})}:{},children:s.length>0&&/* @__PURE__ */ (0,Z.jsx)(cg,{label:t.refusedHead,children:/* @__PURE__ */ (0,Z.jsx)(im,{"aria-label":t.refusedList,children:s.map(e=>{let t=r(e.error);return/* @__PURE__ */ (0,Z.jsx)(am,{icon:/* @__PURE__ */ (0,Z.jsx)(pr,{size:16}),tileTone:`error`,name:e.scenarioName,...t===``?{}:{note:t,noteWraps:!0}},e.position)})})})})}function Kw({entries:e}){let t=$().cards.runStartAgent;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;if(e.outcome.status===`rejected`)return/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`run-start-agent`,resultKind:Jy(e.outcome.raw)},r);let i=e.outcome.result;return i.kind===`dispatched`?/* @__PURE__ */ (0,Z.jsx)(Gw,{result:i.result},r):null})})}var qw={id:`run-start-agent`,schema:t,Card:Kw},Jw=[`make_auto`,`atlas_crawl`,`swarm`],Yw=[`pending_enroll`,`active`,`revoked`],Xw=[`not_owner`,`pending_enroll`,`offline`,`capability_missing`,`queue_full`,`ready`],Zw=[`not_enrolled`,`none_ready`,`one_ready`,`many_ready`],Qw=[`agents.no_dispatch_target`,`agents.offline`,`agents.runner_ambiguous`],$w=xt(Jw),eT=F({queued:N().int().min(0),limit:N().int().min(0),remaining:N().int().min(0)}),tT=F({lifecycle:xt(Yw),lastSeenAt:qe().nullable(),online:$e(),declaredCapabilities:I(P()).nullable(),queue:F({runs:eT,jobs:eT}),activeRun:F({id:P(),scenarioId:P(),scenarioName:P(),status:Et}).nullable(),activeJob:F({id:P(),kind:$w,scenariosTotal:N().int().min(0).nullable()}).nullable()}),nT=F({agentId:P(),name:P(),hostname:P().nullable(),platform:re.nullable(),agentVersion:P().nullable(),state:xt(Xw),blocker:F({errorCode:xt([`agents.not_owner`,`agents.offline`,`agents.capability_missing`,`agents.queue_full`]),httpStatus:Tt([Qe(403),Qe(409)])}).nullable(),facts:tT}),rT=F({resultKind:Qe(`runner_readiness`),readinessFor:$w,capability:P(),evaluatedAt:qe(),presenceWindowMs:N().int().min(0),resolution:et(`kind`,[F({kind:Qe(`resolved`),agentId:P(),name:P()}),F({kind:Qe(`refused`),errorCode:xt(Qw)})]),fleetState:xt(Zw),runners:I(nT),total:N().int().min(0)}),iT=F({resultKind:Qe(`runner_enrollment_instructions`),readinessFor:$w,instructions:F({packageName:P(),installCommand:P(),enrollCommand:P(),startCommand:P(),approvalUrlPattern:P(),requestTtlSec:N().int().min(0),pollIntervalSec:N().int().min(0),steps:I(P())}),expiresAt:qe()});function aT({step:e,copied:t,onCopy:n,className:r}){let i=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsx)(C,{variant:t?`success-soft`:`secondary`,size:`sm`,className:r,icon:t?/* @__PURE__ */ (0,Z.jsx)(Ue,{size:14}):/* @__PURE__ */ (0,Z.jsx)(ue,{size:14}),"aria-label":t?i.copiedAria[e]:i.copyAria[e],onClick:n,children:t?i.copied:i.copy})}function oT({step:e,command:t,copied:n,onCopy:r}){let i=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-enroll-step`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-enroll-step__top`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-enroll-step__label`,children:i.step[e]}),/* @__PURE__ */ (0,Z.jsx)(aT,{step:e,copied:n,onCopy:r,className:`qa-enroll-copy--narrow`})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-enroll-step__line`,children:[/* @__PURE__ */ (0,Z.jsx)(`code`,{className:`qa-enroll-step__code`,children:t}),/* @__PURE__ */ (0,Z.jsx)(aT,{step:e,copied:n,onCopy:r,className:`qa-enroll-copy--wide`})]})]})}function sT({result:e}){let t=$().cards.runnerEnrollment,n=$().cards.runnerReadiness.job,r=Q(),{instructions:i}=e,[a,o]=(0,L.useState)(/* @__PURE__ */ new Set),[s,c]=(0,L.useState)(null),l={install:i.installCommand,enroll:i.enrollCommand,start:i.startCommand},u=e=>{navigator.clipboard.writeText(l[e]).then(()=>{o(t=>new Set(t).add(e)),c(e)})},d=t.title(n[e.readinessFor]),f=t.expiresAt(Lb(e.expiresAt,r)),p=e=>/* @__PURE__ */ (0,Z.jsx)(oT,{step:e,command:l[e],copied:a.has(e),onCopy:()=>u(e)});return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:`${eg} qa-enroll-card`,icon:/* @__PURE__ */ (0,Z.jsx)(Yr,{size:16}),title:d,"aria-label":d,caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:f}),meta:/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-card-kit__t-wide`,dateTime:e.expiresAt,children:f}),note:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:t.askAgain}),children:[/* @__PURE__ */ (0,Z.jsxs)(`ol`,{className:`qa-enroll-steps`,children:[p(`install`),p(`enroll`),/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-enroll-step`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-enroll-step__top`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-enroll-step__label`,children:t.step.approve})}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-enroll-step__text`,children:[t.approveBefore,` `,/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i.approvalUrlPattern}),` `,t.approveAfter,` `,t.cadence(i.requestTtlSec)]})]}),p(`start`)]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:s===null?``:t.copiedAria[s]})]})}function cT({entries:e}){let t=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(sT,{result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`runner-enrollment`,resultKind:Jy(e.outcome.raw)},r)})})}var lT={id:`runner-enrollment`,schema:iT,Card:cT},uT=[`playback`,`atlas_crawl`,`make_auto`];function dT(e){return uT.includes(e)}function fT(e){let[t]=e.split(`@`);return t!==void 0&&dT(t)?t:null}var pT=8,mT={ready:`success`,queue_full:`info`,pending_enroll:`warning`,capability_missing:`warning`,offline:`neutral`,not_owner:`error`};function hT(e,t,n,r){let i=[];return e.platform!==null&&i.push(n.platform[e.platform]),e.hostname!==null&&i.push(e.hostname),i.push(e.facts.lastSeenAt===null?n.lastSeenNever:n.lastSeen(Yb(e.facts.lastSeenAt,t,r))),i.join(` \u00B7 `)}function gT({runner:e,capability:t,evaluatedAtMs:n}){let r=$().cards.runnerReadiness,i=$().cards.common,a=Q(),o=e.name.trim().length===0;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-runner-machine`,children:[/* @__PURE__ */ (0,Z.jsx)(mn,{className:`qa-runner-machine__icon`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-runner-machine__who`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:o?`qa-runner-machine__name qa-runner-machine__name--missing`:`qa-runner-machine__name`,children:o?i.missingName:e.name}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-runner-machine__note`,children:hT(e,n,r,a)})]}),/* @__PURE__ */ (0,Z.jsx)(ng,{tip:e.agentId,className:`qa-runner-machine__id`,children:e.agentId.slice(0,pT)}),/* @__PURE__ */ (0,Z.jsx)($p,{tone:mT[e.state],children:r.state[e.state](fT(t))})]})}function _T({report:e}){let t=$().cards.runnerReadiness,n=Q(),r=Date.parse(e.evaluatedAt),i=t.evaluatedAt(Lb(e.evaluatedAt,n)),a=t.title(t.job[e.readinessFor]),o=e.runners.length,s=t.fleet[e.fleetState](e.total),c=e.fleetState===`not_enrolled`||e.fleetState===`none_ready`;return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:`${eg} qa-runner-card`,icon:/* @__PURE__ */ (0,Z.jsx)(mn,{size:16}),title:a,"aria-label":a,fold:{title:a,facts:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:j(`qa-chat-card__fold-fact--sentence`,c&&`qa-chat-card__fold-fact--warning`),children:[c&&/* @__PURE__ */ (0,Z.jsx)(D,{className:`qa-chat-card__fold-fact-icon`,"aria-hidden":`true`}),s]})},caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:i}),meta:/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-card-kit__t-wide`,dateTime:e.evaluatedAt,children:i}),...o<e.total?{note:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:t.truncated(o,e.total)})}:{},children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-runner-fleet`,children:s}),o===0?e.fleetState===`not_enrolled`?null:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-runner-empty`,children:t.noRunners}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-runner-machines`,...o>1?{role:`group`,"aria-label":t.machinesAria(o)}:{},children:e.runners.map(t=>/* @__PURE__ */ (0,Z.jsx)(gT,{runner:t,capability:e.capability,evaluatedAtMs:r},t.agentId))})]})}function vT(e){return/* @__PURE__ */ (0,Z.jsx)(_T,{report:e.report})}function yT(e,t){return{kind:`runner`,mode:`carousel`,keyOf:e=>e.key,renderItem:vT,renderSingle:vT,labels:GS(e.collection,e.runnerReadiness.collection,t)}}function bT({entries:e}){let t=$().cards,n=[],r=[];return e.forEach((e,t)=>{let i=e.call===null?`entry:${String(t)}`:e.call.toolCallId;e.outcome.status===`accepted`?n.push({key:i,report:e.outcome.result}):r.push({key:i,raw:e.outcome.raw})}),/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&WS(yT(t,n.length),{items:n,page:null,onLoadMore:null}),r.map(e=>/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.runnerReadiness.unsupported.title,body:t.runnerReadiness.unsupported.body,family:`runner-readiness`,resultKind:Jy(e.raw)},e.key))]})}var xT={id:`runner-readiness`,schema:rT,Card:bT};function ST(e){return e.deleted?`archived`:e.outdated?`outdated`:e.mappingStatus===`unassigned`?`draft`:`ready`}var CT={draft:`neutral`,ready:`success`,outdated:`warning`,archived:`neutral`},wT=F({id:P().min(1),orderIndex:N().int(),stepNumber:N().int(),actionType:P(),label:P(),inputValue:P().nullable(),targetUrl:P().nullable(),expectedResults:I(P())}),TT=F({resultKind:Qe(`scenario_card`),scenarioId:P().min(1),projectId:P().min(1),number:N().int(),name:P(),description:P().nullable(),mappingStatus:xt([`unassigned`,`page_mapped`,`partially_mapped`,`fully_mapped`]),deleted:$e(),outdated:$e(),tags:I(P()),totalSteps:N().int().nonnegative(),steps:I(wT),totalRuns:N().int().nonnegative(),open:yh}),ET=F({items:I(wT)}),DT=F({id:P().min(1),status:xt([`queued`,`launching`,`in_progress`,`completed`,`failed`,`cancelled`]),executionMode:_.nullable().optional(),startedAt:P(),completedAt:P().nullable().optional(),currentStepNumber:N().int()}).transform(e=>({id:e.id,status:e.status,executionMode:e.executionMode??null,startedAt:e.startedAt,completedAt:e.completedAt??null,currentStepNumber:e.currentStepNumber})),OT=I(DT);function kT(e){switch(e){case`unassigned`:return`none`;case`fully_mapped`:return`full`;case`page_mapped`:case`partially_mapped`:return`partial`}}var AT={queued:null,launching:`qa-scenario-run__status--live`,in_progress:`qa-scenario-run__status--live`,completed:`qa-scenario-run__status--ok`,failed:`qa-scenario-run__status--fail`,cancelled:null};function jT({run:e,totalSteps:t}){let n=$().cards.scenario,r=Q(),i=Date.parse(e.startedAt),a=Number.isNaN(i)?n.runMomentUnavailable:Ub(e.startedAt,r),o=null;if(e.status===`in_progress`)o=n.runProgress(e.currentStepNumber,t);else if(e.status!==`queued`&&e.status!==`launching`){let t=e.completedAt===null?NaN:Date.parse(e.completedAt);o=Number.isNaN(i)||Number.isNaN(t)?n.runDurationUnavailable:Xb(t-i,r)}return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-scenario-run`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:j(`qa-scenario-run__status`,AT[e.status]),children:n.runStatus[e.status]}),e.executionMode!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__mode`,children:n.runMode[e.executionMode]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__when`,children:a}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__right`,children:o})]})}function MT({scenarioId:e,totalRuns:t,totalSteps:n,runAction:r}){let{scenario:i,common:a}=$().cards,{http:o}=_m(),[s,c]=(0,L.useState)({status:`loading`,rows:[]}),[l,u]=(0,L.useState)(t>0?{offset:0,attempt:0}:null);(0,L.useEffect)(()=>{if(l===null)return;let t=!0;return o.request({method:`GET`,path:wn.scenarioRuns.path(e,{limit:10,offset:l.offset}),schema:OT}).then(e=>{t&&c(t=>({status:`ready`,rows:[...t.rows,...e]}))},e=>{t&&c(e=>({status:`failed`,rows:e.rows})),queueMicrotask(()=>{throw e})}),()=>{t=!1}},[o,e,l]);let d=e=>{c(e=>({status:`loading`,rows:e.rows})),u(t=>({offset:e,attempt:t===null?0:t.attempt+1}))};if(t===0)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-empty`,children:[/* @__PURE__ */ (0,Z.jsx)(Ir,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:i.runsEmptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:n>0?i.runsEmptyHint:i.runsEmptyHintNoSteps}),n>0&&r]});let{rows:f}=s;if(f.length===0)return s.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsLoadFailed}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Br,{size:13}),onClick:()=>d(0),children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-runs-skeleton`,role:`status`,"aria-label":i.runsLoading,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-shimmer`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-shimmer`})]});let p=t-f.length;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-scenario-runs`,children:f.map(e=>/* @__PURE__ */ (0,Z.jsx)(jT,{run:e,totalSteps:n},e.id))}),p>0&&(s.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsLoadFailed}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Br,{size:13}),onClick:()=>d(f.length),children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsShown(f.length,t)}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`sm`,loading:s.status===`loading`,onClick:()=>d(f.length),children:i.runsLoadMore(Math.min(10,p))})]}))]})}var NT={click:Nt,input:Zr,select:Zr,checkbox:qr,keyboard:Ht,keypress:Ht,submit:we,focus:Ut,blur:$t,navigate:Dr,canvas_click:Vt,canvas_dblclick:Vt,canvas_drag:Vt,canvas_zoom:Vt,canvas_pan:Vt},PT=Ir;function FT({actionType:e,size:t=14,className:n=``}){let r=NT[e]||PT;return/* @__PURE__ */ (0,Z.jsx)(r,{size:t,className:n})}function IT({step:e}){let t=$().cards.scenario,[n,r]=(0,L.useState)(!1),i=e.inputValue??e.targetUrl,[a]=e.expectedResults,o=i!==null||a!==void 0,s=e.label.trim().length===0,c=s?t.step.missingLabel:e.label,l=()=>r(e=>!e);return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-scenario-step`,...o?{role:`button`,tabIndex:0,"aria-expanded":n,"aria-label":t.step.aria(e.stepNumber,c),onClick:l,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())}}:{},children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-step__no`,children:String(e.stepNumber).padStart(2,`0`)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-step__icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(FT,{actionType:e.actionType,size:14})}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__text`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:s?`qa-scenario-step__label qa-scenario-step__label--missing`:`qa-scenario-step__label`,children:c}),o&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__sub`,children:[i!==null&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__expected`,children:[/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`}),a]}),e.expectedResults.length>1&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.step.moreExpected(e.expectedResults.length-1)})]})]}),o?/* @__PURE__ */ (0,Z.jsx)(ee,{className:`qa-scenario-step__chevron`,"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(`span`,{}),o&&n&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-step__detail`,children:[i!==null&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i}),e.expectedResults.length>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.step.expectedHeading}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{children:e.expectedResults.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`}),e]},t))})]})]})]})}function LT({scenarioId:e,firstPage:t,totalSteps:n,emptyAction:r}){let{scenario:i,common:a}=$().cards,{http:o}=_m(),[s,c]=(0,L.useState)([]),[l,u]=(0,L.useState)({status:`idle`});if(n===0)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-empty`,children:[/* @__PURE__ */ (0,Z.jsx)(Xt,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:i.stepsEmptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i.stepsEmptyHint}),r]});let d=[...t,...s],f=n-d.length,p=()=>{u({status:`loading`}),o.request({method:`GET`,path:wn.scenarioSteps.path(e,{limit:20,offset:d.length}),schema:ET}).then(e=>{c(t=>[...t,...e.items]),u({status:`idle`})},e=>{u({status:`failed`}),queueMicrotask(()=>{throw e})})};return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-scenario-steps`,children:d.map(e=>/* @__PURE__ */ (0,Z.jsx)(IT,{step:e},e.id))}),f>0&&(l.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.stepsLoadFailed(d.length,n)}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Br,{size:13}),onClick:p,children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.stepsShown(d.length,n)}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(A,{size:13}),loading:l.status===`loading`,onClick:p,children:i.stepsLoadMore(f)})]}))]})}var RT=[`steps`,`runs`];function zT({path:e,name:t,emphasis:n}){let r=$().cards.scenario;return/* @__PURE__ */ (0,Z.jsx)(ig,{path:e,emphasis:n,accessibleName:r.openAria(t),label:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:r.open}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__only-compact`,children:r.openShort})]})})}function BT({result:e,path:t,runAction:n}){let r=$().cards.scenario,i=Q(),a=(0,L.useId)(),[o,s]=(0,L.useState)(`steps`),[c,l]=(0,L.useState)(!1),u=(0,L.useRef)({}),d=(e,t)=>{var n;s(e),e===`runs`&&l(!0),t&&((n=u.current[e])==null||n.focus())},f=e=>{let t=RT.indexOf(o),n=e.key===`ArrowRight`?RT[(t+1)%RT.length]:e.key===`ArrowLeft`?RT[(t-1+RT.length)%RT.length]:e.key===`Home`?RT[0]:e.key===`End`?RT[RT.length-1]:void 0;n!==void 0&&(e.preventDefault(),d(n,!0))},p=e=>e===`steps`?r.tabSteps:r.tabRuns,m=t=>t===`steps`?e.totalSteps:e.totalRuns;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-tabs`,role:`tablist`,"aria-label":r.tabsAria,onKeyDown:f,children:RT.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:t=>{u.current[e]=t},type:`button`,role:`tab`,id:`${a}-tab-${e}`,"aria-controls":`${a}-panel-${e}`,"aria-selected":o===e,tabIndex:o===e?0:-1,className:`qa-scenario-tab`,onClick:()=>d(e,!1),children:[p(e),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-tab__count`,children:kb(m(e),i)})]},e))}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-panel`,role:`tabpanel`,id:`${a}-panel-steps`,"aria-labelledby":`${a}-tab-steps`,hidden:o!==`steps`,children:/* @__PURE__ */ (0,Z.jsx)(LT,{scenarioId:e.scenarioId,firstPage:e.steps,totalSteps:e.totalSteps,emptyAction:t===null?null:/* @__PURE__ */ (0,Z.jsx)(zT,{path:t,name:e.name,emphasis:`secondary`})})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-panel`,role:`tabpanel`,id:`${a}-panel-runs`,"aria-labelledby":`${a}-tab-runs`,hidden:o!==`runs`,children:c&&/* @__PURE__ */ (0,Z.jsx)(MT,{scenarioId:e.scenarioId,totalRuns:e.totalRuns,totalSteps:e.totalSteps,runAction:n})})]})}function VT({result:e,presentation:t}){let{scenario:n,common:r}=$().cards,i=Q(),{project:a,navigation:o,browser:s,conversation:c}=_m(),l=(0,L.useId)(),u=(0,L.useId)(),[d,f]=(0,L.useState)(!1),p=n.caption(e.number),m=e.name.trim().length===0,h=m?r.missingName:e.name,g=e.description===null?``:e.description.trim(),_=ST(e),v=kT(e.mappingStatus),y=v===`none`&&e.totalSteps===0?n.mapping.hintNoSteps:n.mapping.hint[v],b=a===null?null:Ch(a.number,e.open),x=e.totalSteps===0,S=s===null?b===null?null:()=>o.openPath(b):()=>c.send(n.runCommand(p)),w=S===null?null:/* @__PURE__ */ (0,Z.jsx)(Re,{disabled:x,reason:n.runNoSteps,children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:14}),"aria-describedby":x?u:void 0,onClick:x?void 0:S,children:n.run})}),T=/* @__PURE__ */ (0,Z.jsx)(BT,{result:e,path:b,runAction:w}),E=t===`full`?T:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-scenario-expand`,"aria-expanded":d,"aria-controls":l,onClick:()=>f(e=>!e),children:[/* @__PURE__ */ (0,Z.jsx)(ee,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:d?n.collapse:n.expand}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__only-compact`,children:d?n.collapse:n.expandShort})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:l,hidden:!d,children:d&&T})]});return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:j(eg,`qa-scenario-card`),tileTone:`scenario`,icon:/* @__PURE__ */ (0,Z.jsx)(_r,{size:16}),title:n.title,caption:p,meta:/* @__PURE__ */ (0,Z.jsx)($p,{tone:CT[_],children:n.lifecycle[_]}),"aria-label":n.cardAria(p,h),fold:{title:m?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-missing`,children:h}):h,facts:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--mono`,children:p}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${kb(e.totalSteps,i)} ${n.steps(e.totalSteps)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${kb(e.totalRuns,i)} ${n.runs(e.totalRuns)}`})]}),...b===null&&S===null?{}:{quickActions:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[b!==null&&/* @__PURE__ */ (0,Z.jsx)(ag,{label:`${n.openAria(h)}${o.opensInNewTab?r.newTabSuffix:``}`,icon:/* @__PURE__ */ (0,Z.jsx)(og,{size:15}),onClick:()=>o.openPath(b)}),S!==null&&/* @__PURE__ */ (0,Z.jsx)(ag,{label:n.runAria(h),icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:15}),onClick:S,...x?{disabledReason:n.runNoSteps}:{}})]})}},sections:E,...x&&S!==null?{note:/* @__PURE__ */ (0,Z.jsx)(`span`,{id:u,children:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:n.runNoSteps})})}:{},footer:/* @__PURE__ */ (0,Z.jsxs)(sm,{children:[b===null?/* @__PURE__ */ (0,Z.jsx)($p,{tone:`neutral`,dot:!1,children:r.noOpenTarget}):/* @__PURE__ */ (0,Z.jsx)(zT,{path:b,name:h,emphasis:`primary`}),w]}),children:[/* @__PURE__ */ (0,Z.jsx)(em,{missing:m,children:h}),g.length>0&&/* @__PURE__ */ (0,Z.jsx)(tm,{clamp:!0,children:g}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-facts`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:kb(e.totalSteps,i)}),n.steps(e.totalSteps)]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:kb(e.totalRuns,i)}),n.runs(e.totalRuns)]})]}),/* @__PURE__ */ (0,Z.jsxs)(ng,{tip:n.mapping.tip(y),className:j(`qa-scenario-mapping`,`qa-scenario-mapping--${v}`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-mapping__glyph`,"aria-hidden":`true`}),n.mapping.label[v]]}),e.tags.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__tags`,children:e.tags.map(e=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tag`,children:e},e))})]})}function HT(e){return/* @__PURE__ */ (0,Z.jsx)(VT,{result:e,presentation:`compact`})}function UT(e){return/* @__PURE__ */ (0,Z.jsx)(VT,{result:e,presentation:`full`})}function WT(e,t){return{kind:`scenario`,mode:`carousel`,keyOf:e=>e.scenarioId,renderItem:HT,renderSingle:UT,labels:GS(e.collection,e.scenario.collection,t)}}function GT(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.scenarioId,n);return[...t.values()]}function KT({entries:e}){let t=$().cards,n=GT(e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]));return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&WS(WT(t,n.length),{items:n,page:null,onLoadMore:null}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.scenario.unsupported.title,body:t.scenario.unsupported.body,family:`scenario`,resultKind:Jy(e.outcome.raw)},e.call===null?`rejected:${String(n)}`:e.call.toolCallId):null)]})}var qT={id:`scenario`,schema:TT,Card:KT};function JT(e){let{project:t}=_m(),n=yh.safeParse(e.openTarget);return!n.success||t===null?null:Ch(t.number,n.data)}function YT({item:e,presentation:t,footerExtra:n,note:r}){let i=$().cards,{navigation:a}=_m(),o=JT(e),s=e.label.trim().length===0,c=s?i.common.missingName:e.label,[l,...u]=e.evidence,d=e.secondaryLabel===void 0||e.secondaryLabel===null||e.secondaryLabel.length===0?void 0:e.secondaryLabel,f=/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-search-card__evidence`,children:u.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:e},`${String(t)}:${e}`))});return/* @__PURE__ */ (0,Z.jsxs)(Zp,{className:j(eg,`qa-search-card`,t===`compact`&&`qa-search-card--compact`),icon:/* @__PURE__ */ (0,Z.jsx)(De,{size:16}),tileTone:`info`,title:i.search.title,"aria-label":`${i.search.title}: ${c}`,fold:{title:s?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-missing`,children:c}):c,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:[d,l].filter(e=>e!==void 0).join(` \u00B7 `)}),...o===null?{}:{quickActions:/* @__PURE__ */ (0,Z.jsx)(ag,{label:`${i.search.openAria(c)}${a.opensInNewTab?i.common.newTabSuffix:``}`,icon:/* @__PURE__ */ (0,Z.jsx)(og,{size:15}),onClick:()=>a.openPath(o)})}},...d===void 0?{}:{caption:d},meta:/* @__PURE__ */ (0,Z.jsx)($p,{tone:`neutral`,dot:!1,children:Oy(e.entityType,i.common)}),...o===null?{role:`note`}:{},...r===void 0?{}:{note:r},sections:u.length===0?void 0:t===`compact`?/* @__PURE__ */ (0,Z.jsx)(om,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.search.evidence}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.evidence.length})]}),children:f}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-search-card__evidence-block`,children:f}),footer:/* @__PURE__ */ (0,Z.jsxs)(sm,{children:[o===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-search-card__no-open`,children:i.common.noOpenTarget}):/* @__PURE__ */ (0,Z.jsx)(ig,{path:o,label:i.common.open,accessibleName:i.search.openAria(c)}),n]}),children:[/* @__PURE__ */ (0,Z.jsx)(em,{missing:s,children:c}),l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(tm,{clamp:!0,children:l})]})}var XT=F({value:nt().nonnegative(),relation:xt([`eq`,`atLeast`])}),ZT=F({total:XT.nullable(),nextCursor:P().min(1).nullable()}),QT=F({entityType:P().min(1),entityId:P().min(1),label:P(),secondaryLabel:P().nullable().optional(),evidence:I(P()),openTarget:at({target:P()})}),$T=F({resultKind:Qe(`unified_search`),items:I(QT),page:ZT,limit:N().int().positive().optional(),normalizedQuery:P().optional()}).refine(e=>e.page.nextCursor===null||e.limit!==void 0,{message:"a unified_search page with a cursor must carry the `limit` it was minted at",path:[`limit`]}),eE=F({items:I(QT),page:ZT}),tE=F({query:P().min(1),entityTypes:I(P()).nullable().optional()});function nE(e){let t=tE.safeParse(e);if(!t.success)return null;let n=t.data.entityTypes??[];return{query:t.data.query,entityTypes:n}}function rE(e){return`${e.entityType}:${e.entityId}`}function iE(e){return/* @__PURE__ */ (0,Z.jsx)(YT,{item:e,presentation:`compact`})}function aE(e){return/* @__PURE__ */ (0,Z.jsx)(YT,{item:e,presentation:`full`})}function oE(e,t){return e.total===null?t:e.total.value}function sE(e,t){return{kind:`search`,mode:`carousel`,keyOf:rE,renderItem:iE,renderSingle:aE,labels:GS(e.collection,e.search.collection,t)}}function cE(e,t){let{http:n,project:r}=_m();return(0,L.useMemo)(()=>{if(t.page.nextCursor===null)return null;let{limit:i}=t;return async t=>{if(i===void 0)throw Error("search load-more: the result carries no `limit`");if(r===null)throw Error(`search load-more: the chat is bound to no project`);let a=e===null?null:nE(e.args);if(a===null)throw Error(`search load-more: the conversation does not carry the query the cursor is bound to`);let o=await n.request({method:`GET`,path:wn.searchPage.path(r.id,a,{limit:i,cursor:t}),schema:eE});return{items:o.items,page:o.page}}},[e,t,n,r])}function lE(e,t,n){return t.total===null?e.shownUnknown(n):t.total.relation===`eq`?e.shownOfTotal(n,t.total.value):e.shownOfAtLeast(n,t.total.value)}function uE({item:e,page:t,loadMore:n,onLoaded:r}){var i;let a=$().cards.search,[o,s]=(0,L.useState)({status:`idle`}),c=()=>{s({status:`loading`}),n(t.nextCursor).then(e=>{s({status:`idle`}),r(e.items,e.page)},e=>{s({status:`failed`}),queueMicrotask(()=>{throw e})})},l=t.total===null?null:t.total.value-1,u=o.status===`loading`?a.loading:o.status===`failed`?a.retry:l===null||((i=t.total)==null?void 0:i.relation)!==`eq`?a.loadMoreUnknown:a.loadMore(l);return/* @__PURE__ */ (0,Z.jsx)(YT,{item:e,presentation:`full`,note:/* @__PURE__ */ (0,Z.jsx)(`span`,{role:`status`,"aria-live":`polite`,children:/* @__PURE__ */ (0,Z.jsx)(tg,{icon:/* @__PURE__ */ (0,Z.jsx)(Be,{}),children:o.status===`failed`?a.loadFailed:lE(a,t,1)})}),footerExtra:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(A,{size:14}),disabled:o.status===`loading`,onClick:c,children:u})})}function dE({normalizedQuery:e}){let t=$().cards.search,n=e===void 0?t.emptyBody:t.emptyForQuery(e);return/* @__PURE__ */ (0,Z.jsx)(Zp,{className:`${eg} qa-search-card qa-search-card--empty`,icon:/* @__PURE__ */ (0,Z.jsx)(De,{size:16}),tileTone:`info`,title:t.emptyTitle,"aria-label":t.emptyTitle,fold:{title:t.emptyTitle,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:n})},children:/* @__PURE__ */ (0,Z.jsx)(tm,{children:n})})}function fE({call:e,result:t}){let n=$().cards,r=Q(),i=cE(e,t),[a,o]=(0,L.useState)(null),s=new Set(t.items.map(rE)),c=a===null?t.items:[...t.items,...a.items.filter(e=>!s.has(rE(e)))],l=a===null?t.page:a.page,[u]=c;if(u===void 0)return/* @__PURE__ */ (0,Z.jsx)(dE,{normalizedQuery:t.normalizedQuery});if(c.length===1&&l.nextCursor!==null&&i!==null){let{nextCursor:e}=l;return/* @__PURE__ */ (0,Z.jsx)(uE,{item:u,page:{...l,nextCursor:e},loadMore:i,onLoaded:(e,t)=>o({items:e,page:t})})}let d=oE(l,c.length),f=l.nextCursor!==null;return WS(sE(n,d),{items:c,page:l,onLoadMore:i,...f?{header:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:n.search.title}),l.total!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__head-badge`,children:`${kb(l.total.value,r)}${l.total.relation===`atLeast`?`+`:``}`})]})}:{}})}function pE({entries:e}){let t=$().cards.search;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(fE,{call:e.call,result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`search`,resultKind:Jy(e.outcome.raw)},r)})})}var mE={id:`search`,schema:$T,Card:pE},hE=[`scenarios`,`shared-steps`,`api-collections`,`api-catalog`,`checklists`,`bugs`,`test-runs`,`map`];function gE(e){return hE.includes(e)}var _E=F({resultKind:Qe(`section_link`),section:P().min(1),label:P().min(1),open:at({target:P()})}),vE={tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16})};function yE(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.has(n.section)||t.set(n.section,n);return[...t.values()]}function bE(e){let t=$().cards,n=t.sectionLink,{project:r}=_m();return yE(e).map(e=>{let i=gE(e.section),a=gE(e.section)?n.sections[e.section]:n.unrecognized,o={key:e.section,tile:vE,name:a,nameMissing:!i,note:i?t.common.entityType.section:n.serverLabel(e.label)},s=yh.safeParse(e.open),c=s.success&&r!==null?Ch(r.number,s.data):null;return c===null?{...o,open:{pill:n.noRoute,hint:n.noRouteHint,ariaLabel:n.noRouteAria(a)}}:{...o,open:{path:c,action:n.action,destination:null}}})}function xE({results:e}){let t=$().cards.sectionLink,n=bE(e);return/* @__PURE__ */ (0,Z.jsx)(My,{title:t.title,groupAria:t.groupAria,icon:/* @__PURE__ */ (0,Z.jsx)(Se,{size:16}),rows:n})}function SE({entries:e}){let t=$().cards.sectionLink,n=e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&/* @__PURE__ */ (0,Z.jsx)(xE,{results:n}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(sg,{title:t.unsupported.title,body:t.unsupported.body,family:`section-link`,resultKind:Jy(e.outcome.raw)},e.call===null?`entry:${String(n)}`:e.call.toolCallId):null)]})}var CE={id:`section-link`,schema:_E,Card:SE};function wE(e){return t=>typeof t==`object`&&!!t&&`resultKind`in t&&t.resultKind===e}function TE(e,t){return{id:e.id,declares:t,group(t,n){let[r,...i]=t.map(t=>{let n=e.schema.safeParse(t.raw);return{call:t.call,outcome:n.success?{status:`accepted`,result:n.data}:{status:`rejected`,raw:t.raw}}});return r===void 0?null:(0,L.createElement)(e.Card,{key:n,entries:[r,...i]})}}}var EE={"change-set":{grouping:`turn-group`}},DE={report:TE(Iw,wE(`report_cards`)),"runner-readiness":TE(xT,wE(`runner_readiness`)),"runner-enrollment":TE(lT,wE(`runner_enrollment_instructions`)),references:TE(Hy,()=>!0),"section-link":TE(CE,wE(`section_link`)),search:TE(mE,wE(`unified_search`)),scenario:TE(qT,wE(`scenario_card`)),"change-set":TE(dS,wE(`change_set_proposal`)),"job-status":TE(aC,()=>!0),coverage:TE(vS,wE(`coverage`)),"run-start-agent":TE(qw,wE(`run_start_agent`)),"run-in-tab-outcome":TE(Vw,e=>wE(`run_in_tab_outcome`)(e)||wE(`run_batch_browser`)(e))};function OE({message:e,conversationId:t,confirmedCalls:n,copy:r,refusalSentence:i,pendingHostCallIds:a,stoppingHostCallIds:o,waitingForBrowser:s,stoppingBrowser:c}){let l=n.get(e.id);if(l===void 0)return{kind:`generic`};if(l.toolName===null)return{kind:`awaiting`};if(l.result===null&&o.has(l.toolCallId))return{kind:`outcome`,text:c};if(l.result===null&&a.has(l.toolCallId))return{kind:`outcome`,text:s};if(l.result===null)return{kind:`awaiting`};if(l.result!==null&&qy(l.result.value))return{kind:`unknown`};if(l.result!==null&&DE[`run-start-agent`].declares(l.result.value))return{kind:`outcome`,text:eb(l.result,r,i)};if(l.result!==null&&Ky(l.result.value))return{kind:`failed`};if(t!==null){let e=Xy(l.result.value,t);if(e!==null)return{kind:`launched_elsewhere`,conversationId:e}}return{kind:`generic`}}function kE(e,t){let[n,r]=(0,L.useState)(()=>/* @__PURE__ */ new Set),i=e.filter(e=>Vm(e)&&!n.has(e.toolCallId));return i.length>0&&r(e=>/* @__PURE__ */ new Set([...e,...i.map(e=>e.toolCallId)])),(0,L.useMemo)(()=>{let e=/* @__PURE__ */ new Set;for(let[r,i]of t)n.has(i.toolCallId)&&e.add(r);return e},[t,n])}function AE({label:e,icon:t,title:n,tags:r,note:i,testId:a}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-context`,role:`note`,"aria-label":e,"data-testid":a,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-context-tile`,"aria-hidden":`true`,children:t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-context-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:n}),r.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-context-scope`,children:r.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:e.missing?`qa-ai-chat-context-missing`:void 0,children:e.text},t))}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i})]})]})}function jE(e){let{runtime:t,source:n,conversationId:r}=e,{reportContexts:i,session:a}=t,o=(0,L.useCallback)(e=>i.subscribe(e),[i]),s=(0,L.useSyncExternalStore)(o,()=>r===null?null:i.get(r)),c=S_(n===null?null:n.reportHandoff),l=(0,L.useRef)(null);return(0,L.useEffect)(()=>{c!==null&&l.current!==c&&(l.current=c,a.openConversation(c.conversationId))},[c,a]),{report:s===null?null:{context:s,entityName:c!==null&&c.conversationId===r?c.entityName:null}}}function ME({tone:e,lead:t,role:n,title:r,text:i,slim:a=!1,extra:o,actions:s,dismiss:c,testId:l}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-notice qa-ai-chat-notice--${e}${a?` qa-ai-chat-notice--slim`:``}`,role:n===`none`?void 0:n,"aria-live":n===`status`?`polite`:void 0,"data-testid":l,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-notice-lead`,"aria-hidden":`true`,children:t===`spinner`?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-notice-spinner`}):t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-notice-text`,children:[r!==null&&/* @__PURE__ */ (0,Z.jsx)(`b`,{children:r}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i}),o]}),c!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm qa-ai-chat-notice-close`,"aria-label":c.label,onClick:c.onDismiss,children:/* @__PURE__ */ (0,Z.jsx)(ve,{})}),s!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-notice-actions`,children:s})]})}var NE=[`today`,`yesterday`,`previous7Days`,`previous30Days`,`older`];function PE(e,t){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=e=>{let t=new Date(n);return t.setDate(t.getDate()-e),t};return e>=n?`today`:e>=r(1)?`yesterday`:e>=r(7)?`previous7Days`:e>=r(30)?`previous30Days`:`older`}function FE(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=PE(r.updatedAt,t),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return NE.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{group:e,items:t}]})}var IE=F({id:P().min(1),title:P().nullable(),updatedAt:P().min(1),reportContext:Ze().nullable()}),LE=F({items:I(IE),nextCursor:P().nullable(),hasMore:$e()}),RE=F({success:Qe(!0)});function zE(e){return{id:e.id,title:e.title,updatedAt:new Date(e.updatedAt),fromReport:e.reportContext!==null}}function BE(e){let{http:t,logger:n,projectId:r}=e,[i,a]=(0,L.useState)({status:`loading`}),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(``),u=(0,L.useRef)(0),d=(0,L.useRef)(i);(0,L.useEffect)(()=>{d.current=i}),(0,L.useEffect)(()=>{let e=setTimeout(()=>l(o.trim()),300);return()=>clearTimeout(e)},[o]);let f=(0,L.useCallback)(e=>{let n=++u.current;return t.request({method:wn.conversationList.method,path:wn.conversationList.path({projectId:r,limit:20,cursor:e,search:c===``?null:c}),schema:LE}).then(e=>({seq:n,page:e,error:null}),e=>({seq:n,page:null,error:e}))},[c,t,r]),p=(0,L.useCallback)(()=>{a({status:`loading`}),f(null).then(({seq:e,page:t,error:i})=>{if(e===u.current){if(t===null){n.error(`conversation-list: first page failed`,{projectId:r,error:i}),a({status:`failed`});return}a({status:`ready`,rows:t.items.map(zE),nextCursor:t.hasMore?t.nextCursor:null,loadingMore:!1,moreFailed:!1})}})},[n,r,f]);return(0,L.useEffect)(p,[p]),{state:i,search:o,appliedSearch:c,setSearch:s,retry:p,loadMore:(0,L.useCallback)(()=>{let e=d.current;e.status!==`ready`||e.loadingMore||e.nextCursor===null||(a({...e,loadingMore:!0,moreFailed:!1}),f(e.nextCursor).then(({seq:e,page:t,error:i})=>{e===u.current&&a(e=>{if(e.status!==`ready`)return e;if(t===null)return n.error(`conversation-list: next page failed`,{projectId:r,error:i}),{...e,loadingMore:!1,moreFailed:!0};let a=new Set(e.rows.map(e=>e.id));return{status:`ready`,rows:[...e.rows,...t.items.map(zE).filter(e=>!a.has(e.id))],nextCursor:t.hasMore?t.nextCursor:null,loadingMore:!1,moreFailed:!1}})}))},[n,r,f]),remove:(0,L.useCallback)(async e=>{try{await t.request({method:wn.conversationDelete.method,path:wn.conversationDelete.path(e),schema:RE})}catch(t){return n.error(`conversation-list: delete failed`,{conversationId:e,error:t}),!1}return a(t=>t.status===`ready`?{...t,rows:t.rows.filter(t=>t.id!==e)}:t),!0},[t,n])}}var VE=6;function HE(e,t){let n=e.findIndex(e=>e.id===t);if(n<0)return null;let r=e[n+1]??e[n-1];return r===void 0?null:r.id}function UE({http:e,logger:t,projectId:n,currentConversationId:r,locale:i,copy:a,dismissLabel:o,onClose:s,onOpen:c,onNewConversation:l}){let u=BE({http:e,logger:t,projectId:n}),[d,f]=(0,L.useState)(!1),p=(0,L.useRef)(null),m=(0,L.useRef)(null),h=(0,L.useRef)(null),{state:g,loadMore:_}=u;(0,L.useEffect)(()=>{var e;(e=h.current)==null||e.focus()},[]),(0,L.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),s())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]);let v=g.status===`ready`&&g.nextCursor!==null&&!g.moreFailed;(0,L.useEffect)(()=>{let e=p.current,t=m.current;if(!v||e===null||t===null)return;let n=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&_()},{root:t,rootMargin:`100px`});return n.observe(e),()=>n.disconnect()},[v,_]);let y=(0,L.useMemo)(()=>new Intl.DateTimeFormat(i,{dateStyle:`medium`}),[i]),b=(e,t)=>{let n=HE(t,e.id);f(!1),u.remove(e.id).then(t=>{if(!t){f(!0);return}e.id===r&&(n===null?l():c(n))})},x=g.status===`ready`&&g.rows.length===0&&u.appliedSearch===``;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-drawer`,role:`dialog`,"aria-label":a.title,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-drawer-head`,children:[/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:a.close,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:s,ref:h,children:/* @__PURE__ */ (0,Z.jsx)(nr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:a.title}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(A,{size:14}),onClick:l,children:a.newChat})]}),(!x||d)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-drawer-tools`,children:[!x&&/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-drawer-search`,children:[/* @__PURE__ */ (0,Z.jsx)(De,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`search`,value:u.search,placeholder:a.search,"aria-label":a.searchLabel,onChange:e=>u.setSearch(e.target.value)})]}),d&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(he,{}),role:`alert`,slim:!0,title:null,text:a.deleteFailed,dismiss:{label:o,onDismiss:()=>f(!1)},testId:`ai-chat-history-delete-failed`})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs`,ref:m,"aria-busy":g.status===`loading`||void 0,children:[g.status===`loading`&&Array.from({length:VE},(e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-conv-skeleton`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{}),/* @__PURE__ */ (0,Z.jsx)(`span`,{})]},t)),g.status===`failed`&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(he,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.errorTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.errorText}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:u.retry,children:a.retry})]}),x&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,children:[/* @__PURE__ */ (0,Z.jsx)(rn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.emptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.emptyText})]}),g.status===`ready`&&g.rows.length===0&&u.appliedSearch!==``&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(De,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.noResults(u.appliedSearch)}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.noResultsText})]}),g.status===`ready`&&FE(g.rows,/* @__PURE__ */ new Date).map(({group:e,items:t})=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`group`,"aria-label":a.groups[e],children:[/* @__PURE__ */ (0,Z.jsx)(`h4`,{children:a.groups[e]}),t.map(e=>{let t=e.id===r,n=e.title!==null&&e.title.trim()!==``?e.title:a.untitled(y.format(e.updatedAt));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-conv${t?` qa-ai-chat-conv--current`:``}`,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-conv-main`,"aria-current":t?`true`:void 0,onClick:()=>c(e.id),children:[/* @__PURE__ */ (0,Z.jsx)(rn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-conv-title`,children:n}),e.fromReport&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-conv-ctx`,children:a.reportTag})]}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:a.delete(n),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm qa-ai-chat-conv-del`,onClick:()=>b(e,g.rows),children:/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`})})})]},e.id)})]},e)),g.status===`ready`&&g.loadingMore&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-convs-more`,role:`status`,children:a.loadingMore}),g.status===`ready`&&g.moreFailed&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-convs-more`,children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:_,children:a.retry})}),v&&/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:p,className:`qa-ai-chat-convs-sentinel`,"aria-hidden":`true`})]})]})}var WE=/* @__PURE__ */ new Set;function GE(e){let{transport:t,stopOutcomes:n,conversationId:r,messages:i,confirmedCalls:a,historyLoading:o}=e,[s,c]=(0,L.useState)({conversationId:null,ids:WE}),[l,u]=(0,L.useState)({conversationId:null,ids:WE}),d=(0,L.useRef)({conversationId:null,ids:WE}),[f,p]=(0,L.useState)({conversationId:null,ids:WE}),m=(0,L.useRef)(!1),h=(0,L.useCallback)(()=>{let e=d.current;if(e.conversationId!==r||e.ids.size===0)return;p(t=>({conversationId:r,ids:/* @__PURE__ */ new Set([...t.conversationId===r?t.ids:[],...e.ids])})),c(t=>{if(t.conversationId!==r)return t;let n=new Set(t.ids);for(let t of e.ids)n.delete(t);return{conversationId:r,ids:n}});let t={conversationId:r,ids:WE};d.current=t,u(t)},[r]),g=(0,L.useCallback)(()=>{if(d.current.conversationId!==r)return;let e={conversationId:r,ids:WE};d.current=e,u(e)},[r]);(0,L.useEffect)(()=>n.subscribe(e=>{e.conversationId===r&&(e.accepted?h():g())}),[r,h,g,n]),(0,L.useEffect)(()=>t.subscribe(e=>{if(e.kind!==`event`)return;let t=e.event;if((t.type===`host-action`||t.type===`tool-result`)&&(c(e=>{let n=new Set(e.conversationId===r?e.ids:[]);return t.type===`host-action`?n.add(t.toolCallId):n.delete(t.toolCallId),{conversationId:r,ids:n}}),t.type===`tool-result`)){let e=d.current;if(e.conversationId===r&&e.ids.has(t.toolCallId)){let n=new Set(e.ids);n.delete(t.toolCallId);let i={conversationId:r,ids:n};d.current=i,u(i)}}}),[r,t]),(0,L.useEffect)(()=>{if(m.current&&!o){let e={conversationId:r,ids:WE};d.current=e,u(e),c({conversationId:r,ids:WE}),p({conversationId:r,ids:WE})}m.current=o},[r,o]);let _=l.conversationId===r?l.ids:WE,v=f.conversationId===r?f.ids:WE,y=(0,L.useMemo)(()=>{let e=new Set(s.conversationId===r?s.ids:[]);for(let t of i){let n=t.pendingToolCall;(n==null?void 0:n.hostActionContinuationStatus)===`pending`&&e.add(n.toolCallId)}for(let t of _)e.delete(t);for(let t of v)e.delete(t);for(let t of a.values())t.result!==null&&e.delete(t.toolCallId);return e},[a,r,s,i,_,v]);return{pendingIds:y,stoppingIds:_,markStopping:(0,L.useCallback)(()=>{let e={conversationId:r,ids:y};d.current=e,u(e)},[r,y])}}function KE(e,t){switch(e){case`connecting`:case`connected`:return null;case`reconnecting`:case`lost`:return/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`warning`,lead:`spinner`,role:`none`,slim:!0,title:t.reconnecting,text:null,testId:`ai-chat-connection-${e}`});case`restored`:return/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`success`,lead:/* @__PURE__ */ (0,Z.jsx)(we,{}),role:`none`,slim:!0,title:null,text:t.restored,testId:`ai-chat-connection-restored`});case`failed`:return/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(jn,{}),role:`alert`,title:t.failedTitle,text:t.failedText,testId:`ai-chat-connection-failed`})}}function qE({connectionStatus:e,labels:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-live-region`,role:`status`,"aria-live":`polite`,children:KE(e,t)})}function JE(e,t,n){return e.every(e=>e.release===`on-reconnect`)?n.textReconnect:e.some(e=>e.release===`manual`&&e.inTranscript)?n.textFailed:t?n.textReady:n.textWaiting}function YE({turns:e,canSend:t,onSend:n,onDiscard:r,cause:i,filesOf:a,copy:o}){let s=e.map(e=>({turn:e,files:a(e)})),c=null;for(let e of s)e.files.refusal!==null&&(c=e.files.refusal);return/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(qt,{}),role:`status`,title:o.title(e.length),text:i??(c===null?JE(e,t,o):c.sentence),extra:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-unsent`,"aria-label":o.listLabel,children:s.map(({turn:e,files:i})=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-unsent-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-unsent-text`,children:e.text}),i.label!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-unsent-files`,children:[/* @__PURE__ */ (0,Z.jsx)(Fr,{"aria-hidden":`true`}),i.label]})]}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:o.send(e.text),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,disabled:!t||i.refusal!==null&&!i.refusal.resendable,onClick:()=>n(e.id),children:/* @__PURE__ */ (0,Z.jsx)(qt,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:o.discard(e.text),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,onClick:()=>r(e.id),children:/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`})})})]},e.id))}),testId:`ai-chat-unsent`})}function XE({url:e}){return e===null?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-tabline`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tabline-fav`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tabline-url`,children:e})]})}function ZE({connection:e,readiness:t,capabilities:n,onReloadCapabilities:r,unsent:i,interruptedTurnId:a,reportInitializing:o,onRetryLastTurn:s,historyFailed:c,onRetryHistory:l,stopFailure:u,permissionWriteFailure:d,permissionReadFailure:f,pageScan:p,context:m,copy:h}){let g=h.notices,[_,v]=(0,L.useState)(null),[y,b]=(0,L.useState)(null),[x,S]=(0,L.useState)(null),w=e=>({label:g.dismiss,onDismiss:e}),T=e=>h.composer.permission[e];p!==null&&p.status!==`idle`&&x!==null&&S(null);let ee=p!==null&&p.failureReason!==null&&p.failureReason!==x?p.failureReason:null;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-lane`,"data-testid":`ai-chat-lane`,children:[/* @__PURE__ */ (0,Z.jsx)(qE,{...e}),t.kind===`needs-sign-in`&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(zt,{}),role:`status`,title:g.readiness.signInTitle,text:g.readiness.signInText,testId:`ai-chat-readiness-sign-in`}),t.kind===`needs-project`&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(br,{}),role:`status`,title:g.readiness.projectTitle,text:g.readiness.projectText,testId:`ai-chat-readiness-project`}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(he,{}),role:`alert`,title:g.capabilities.title,text:`${n.kind===`timed-out`?g.capabilities.timedOut:g.capabilities.loadFailed} ${g.capabilities.sendBlocked}`,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Pe,{size:14}),onClick:r,children:g.capabilities.retry}),testId:`ai-chat-capabilities-unavailable`}),i.turns.length>0&&/* @__PURE__ */ (0,Z.jsx)(YE,{turns:i.turns,canSend:i.canSend,onSend:i.onSend,onDiscard:i.onDiscard,cause:i.cause,filesOf:i.filesOf,copy:g.unsent}),a!==null&&a!==_&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(rn,{}),role:`status`,title:g.interrupted.title,text:g.interrupted.text,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:s,children:g.interrupted.retry}),dismiss:w(()=>v(a)),testId:`ai-chat-interrupted`}),o&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`neutral`,lead:/* @__PURE__ */ (0,Z.jsx)(Cr,{}),role:`status`,title:g.reportInitializing.title,text:g.reportInitializing.text,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Pe,{size:14}),onClick:s,children:g.reportInitializing.retry}),testId:`ai-chat-report-initializing`}),c&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(he,{}),role:`alert`,title:null,text:g.history.loadFailed,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:l,children:g.history.retry}),testId:`ai-chat-history-failed`}),u!==null&&u!==y&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Jr,{}),role:`alert`,title:null,text:h.transcript.stopFailed[u.reason],dismiss:w(()=>b(u)),testId:`ai-chat-stop-failed`}),f!==null&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(he,{}),role:`alert`,title:g.permissionReadFailed.title,text:g.permissionReadFailed.text,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:f.onRetry,children:g.permissionReadFailed.retry}),testId:`ai-chat-permission-read-failed`}),d!==null&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(he,{}),role:`alert`,title:g.permissionWriteFailed.title(T(d.attempted)),text:d.scope===`conversation`?g.permissionWriteFailed.textConversation(T(d.kept)):g.permissionWriteFailed.textNewConversation(T(d.kept)),actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:d.onRetry,children:g.permissionWriteFailed.retry}),dismiss:w(d.onDismiss),testId:`ai-chat-permission-write-failed`}),p!==null&&p.status!==`idle`&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`info`,lead:`spinner`,role:`status`,title:p.status===`scanning`?g.pageScan.scanning:g.pageScan.delivering,text:null,extra:/* @__PURE__ */ (0,Z.jsx)(XE,{url:p.tabUrl}),actions:p.status===`delivering`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-notice-bar`,"aria-hidden":`true`}):void 0,testId:`ai-chat-page-${p.status}`}),ee!==null&&/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(he,{}),role:`alert`,title:g.pageScan.failedTitle,text:g.pageScan.failed[ee],dismiss:w(()=>S(ee)),testId:`ai-chat-page-scan-failed`}),m]})}var QE={report:`message`,"runner-readiness":`step`,"runner-enrollment":`step`,"section-link":`message`,search:`step`,scenario:`step`,coverage:`step`,"run-start-agent":`step`,"run-in-tab-outcome":`step`};function $E(e){let t=Object.keys(EE).find(t=>DE[t].declares(e));if(t!==void 0)return{family:t,grouping:EE[t].grouping};let n=Object.keys(QE).find(t=>DE[t].declares(e));return n===void 0?null:{family:n,grouping:QE[n]}}var eD={isRenderableToolResult(e){if($E(e)!==null)return!0;let t=Uy(e);return t!==void 0&&t.length>0}},tD=class{constructor(){this.levels=/* @__PURE__ */ new Map,this.selectionRead=null,this.listeners=/* @__PURE__ */ new Set}get(e){let t=this.levels.get(e);return t===void 0?null:t}startLoad(e){let t={level:null},n=this.selectionRead;return n!==null&&n.load===null&&n.state.conversationId===e&&(n.load=t),{record(e){t.level=e}}}followAdoptions(e,t){let n=e.getSnapshot().historyLoad;return e.subscribe(()=>{let r=e.getSnapshot(),i=n,a=r.historyLoad;if(a===i)return;n=a;let o=this.selectionRead;this.selectionRead=a.status===`loading`?{state:a,load:null}:null,i.status===`loading`&&a.status===`idle`&&r.conversationId===i.conversationId&&this.adopt(i.conversationId,o!==null&&o.state===i?o.load:null,t)})}adopt(e,t,n){if(t===null){n.error(`chat launch level: the session adopted a history load this store never saw start`,{conversationId:e});return}if(t.level===null){n.error(`chat launch level: the session adopted a history load that recorded no level`,{conversationId:e});return}if(!this.levels.has(e)){this.levels.set(e,t.level);for(let e of this.listeners)e()}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},nD=[`overview`,`stability`,`weak-spots`,`bug-hotspots`],rD=`stability`,iD=F({version:Qe(1),view:xt(nD),window:xt(Je).nullable(),filters:F({status:xt(Ct).optional()}).optional(),selectedEntity:F({type:xt(it),id:ut()}).optional()}).refine(e=>e.view===rD==(e.window===null),{message:`window must be null for view 'stability' (run-count basis) and non-null for every other view`,path:[`window`]}).refine(e=>{var t;return((t=e.filters)==null?void 0:t.status)===void 0||e.view===rD},{message:`filters.status is accepted only for view 'stability' \u2014 no other report endpoint or tool takes a status filter`,path:[`filters`,`status`]}),aD=F({toolCallId:P().min(1),toolName:P().min(1),title:F({ru:P().min(1),en:P().min(1)}).optional(),operationTitles:I(F({ru:P().min(1),en:P().min(1)})).optional(),args:Ze(),display:Mn.nullable(),status:Ze().optional(),hostActionContinuationStatus:xt([`pending`,`running`,`completed`,`stopped`,`cancelled`]).optional()}),oD=I(F({ru:P().trim().min(1),en:P().trim().min(1)})),sD=F({id:P().min(1),kind:P().min(1),revision:N().int(),state:xt([`active`,`terminal`,`superseded`]),payload:F({}).passthrough()}),cD=F({id:P().min(1),role:P(),content:P().nullable(),toolCalls:Ze(),toolResults:Ze(),blocks:I(sD).optional(),pendingToolCall:aD.nullable().optional(),agentOrigin:Ze().optional(),createdAt:P().optional(),attachments:I(xn)}),lD=xt(Ra),uD=F({messages:I(cD),decisionLaneCompletedIds:I(P()),reportContext:Ze().optional(),permissionMode:xt(kt).nullable(),permissionModeVersion:N().int().positive().nullable(),launchLevel:_t}),dD=class{constructor(){this.contexts=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Set}get(e){let t=this.contexts.get(e);return t===void 0?null:t}record(e,t){if(this.contexts.get(e)!==t){this.contexts.set(e,t);for(let e of this.listeners)e()}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}};async function fD(e,t,n){let r=await pD(e,t,n);if(!r.laterPageCompletedLane)return r;let i=await pD(e,t,n);if(i.laterPageCompletedLane)throw Error(`Conversation history lane receipt for ${String(n)} changed within two consecutive loads: the receipt moved back from completed`);return i}async function pD(e,t,n){let r=[],i=/* @__PURE__ */ new Set,a=0,o=null,s,c=null,l=!1;for(;;){let u=await e.request({method:wn.conversationMessages.method,path:wn.conversationMessages.path(t,{limit:100,offset:a,...n===void 0?{}:{decisionLaneId:n}}),schema:uD});if(c===null)s=u.reportContext,c={decisionLaneCompletedIds:u.decisionLaneCompletedIds,permissionMode:u.permissionMode,permissionModeVersion:u.permissionModeVersion,launchLevel:u.launchLevel};else{let e=c.decisionLaneCompletedIds;u.decisionLaneCompletedIds.some(t=>!e.includes(t))&&(l=!0)}for(let e of u.messages){if(i.has(e.id))throw Error(`Conversation history pagination returned message ${e.id} twice (offset ${String(a)}): the server is not honouring the offset parameter`);i.add(e.id)}r.push(...u.messages);let d=u.messages[u.messages.length-1];if(u.messages.length<100||d===void 0)return{rows:r,reportContext:s,...c,laterPageCompletedLane:l};if(d.id===o)throw Error(`Conversation history pagination made no progress at offset ${String(a)}: the server is ignoring the offset parameter`);o=d.id,a+=100}}function mD(e){return typeof e==`object`&&!!e}function hD(e,t){if(!Array.isArray(e))return;let n=e.flatMap(e=>{if(!mD(e))return t.error(`chat history: persisted toolCalls entry is not an object \u2014 dropped`,{entryType:e===null?`null`:typeof e}),[];let{toolCallId:n,toolName:r,args:i,contentOffset:a,title:o,effect:s,operationTitles:c}=e;if(typeof n!=`string`||n===``||typeof r!=`string`)return t.error(`chat history: persisted toolCalls entry without toolCallId/toolName \u2014 dropped`,{keys:Object.keys(e)}),[];let l=oD.safeParse(c);return[{toolCallId:n,toolName:r,args:i,...mD(o)&&typeof o.ru==`string`&&typeof o.en==`string`&&o.ru.trim().length>0&&o.en.trim().length>0&&{title:{ru:o.ru,en:o.en}},...(s===`read`||s===`reversible`||s===`irreversible`)&&{effect:s},...l.success&&{operationTitles:l.data},...typeof a==`number`&&Number.isInteger(a)&&a>=0&&{contentOffset:a}}]});return n.length>0?n:void 0}function gD(e,t){if(!Array.isArray(e))return mD(e)?[{toolCallId:`${t}:result`,result:e}]:void 0;let n=e.flatMap(e=>mD(e)&&typeof e.toolCallId==`string`&&e.toolCallId!==``?[{toolCallId:e.toolCallId,result:e.result}]:[]);return n.length>0?n:void 0}function _D(e,t){let n=e.toolResults===void 0?[]:e.toolResults;n.some(e=>e.toolCallId===t.toolCallId)||(e.toolResults=[...n,t])}function vD(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role===`assistant`)return n}}function yD(e,t){let n=[],r=/* @__PURE__ */ new Map;for(let i of e){if(i.role===`assistant`||i.role===`user`||i.role===`agent`){let e=hD(i.toolCalls,t),a={id:i.id,content:i.content===null?``:i.content,toolCalls:e,toolResults:gD(i.toolResults,i.id),...i.blocks!==void 0&&{blocks:i.blocks},...i.pendingToolCall!==void 0&&{pendingToolCall:i.pendingToolCall},...i.attachments.length>0&&{attachments:i.attachments}},o;if(i.role===`agent`){let e=lD.safeParse(i.agentOrigin);if(!e.success){t.error(`History agent row without a known agentOrigin \u2014 left out`,{messageId:i.id,agentOrigin:i.agentOrigin});continue}if(e.data===`workflow_lead`){if(i.createdAt===void 0){t.error(`History lead prose row without createdAt \u2014 left out`,{messageId:i.id});continue}o={...a,role:`agent`,agentOrigin:`workflow_lead`,createdAt:i.createdAt}}else o={...a,role:`agent`,agentOrigin:e.data}}else o={...a,role:i.role};if(n.push(o),i.role===`assistant`&&e!==void 0)for(let t of e)r.set(t.toolCallId,n.length-1);continue}if(i.role!==`tool`)continue;let e=gD(i.toolResults,i.id);if(e!==void 0)for(let t of e){let e=r.get(t.toolCallId),i=e===void 0?vD(n):n[e];i!==void 0&&i.role===`assistant`&&_D(i,t)}}return n}function bD(e){switch(e){case void 0:case`pending`:return!0;case`confirmed`:case`rejected`:case`failed`:case`closed`:return!1}}function xD(e,t){let n=[],r=[];for(let i of e){if(i.role!==`assistant`||i.pendingToolCall==null)continue;let e=uy(i.content,i.pendingToolCall);if(e.kind===`pending-tool-call`){if(!bD(e.status)){r.push(e.toolCallId);continue}if(e.display===null){t.debug(`chat history: unanswered confirmation without persisted facts \u2014 not re-offered`,{messageId:i.id,toolName:e.toolName});continue}n.push({toolCallId:e.toolCallId,toolName:e.toolName,...i.pendingToolCall.title!==void 0&&{title:i.pendingToolCall.title},...i.pendingToolCall.operationTitles!==void 0&&{operationTitles:i.pendingToolCall.operationTitles.map(e=>({...e}))},args:e.args,description:``,display:e.display,status:`open`,anchorMessageId:null})}}return{pendingConfirmations:n,answeredToolCallIds:r}}var SD=F({id:P().min(1),permissionMode:xt(kt),permissionModeVersion:N().int().positive()}),CD=`assistant.conversations.permission_mode_stale`;function wD(e){let{http:t,logger:n,reportContexts:r,launchLevels:i}=e;return{async create(e,n){let r;try{r=await t.request({method:wn.conversationCreate.method,path:wn.conversationCreate.path(),body:{projectId:e,mode:`copilot`,permissionMode:n},schema:SD})}catch(e){throw e instanceof On&&e.status===409&&e.errorCode===CD?new zc(e.message):e}return{id:r.id,permissionMode:r.permissionMode,permissionModeVersion:r.permissionModeVersion}},async loadHistory(e,a){let o=i.startLoad(e),s;try{s=await fD(t,e,a)}catch(e){if(e instanceof On&&e.status===404)return{kind:`not-found`};throw e}if(s.reportContext===void 0||s.reportContext===null)r.record(e,null);else{let t=iD.safeParse(s.reportContext);t.success?r.record(e,t.data):(n.warn(`chat history: reportContext failed validation \u2014 no report banner`,{conversationId:e,issues:t.error.issues.map(e=>e.message)}),r.record(e,null))}o.record(s.launchLevel);let c=yD(s.rows,n);return{kind:`found`,page:{messages:c,...xD(c,n),decisionLaneCompletedIds:s.decisionLaneCompletedIds,permissionMode:s.permissionMode,permissionModeVersion:s.permissionModeVersion}}}}}var TD=5e3,ED=3e4,DD=1.5,OD=TD,kD=co({baseIntervalMs:TD,maxIntervalMs:ED,backoffFactor:DD,isTerminal:e=>Hn(e)===`terminal`,activityStamp:e=>e.lastActivityAt}),AD=class extends Error{constructor(){super(`Agent job status read did not answer within ${String(OD)} ms`),this.name=`ReadTimeoutError`}};function jD(e){return e instanceof AD?{code:`read_timeout`,message:e.message}:e instanceof On?{code:e.errorCode===null?`http_${String(e.status)}`:e.errorCode,message:e.message}:{code:`network_error`,message:e instanceof Error?e.message:String(e)}}var MD=class{constructor(e){this.deps=e,this.state=to(),this.holders=/* @__PURE__ */ new Map,this.readTokens=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Set,this.timer=null,this.cycleInFlight=!1,this.disposed=!1,this.dispatchVisibility(),this.unsubscribeVisibility=e.visibility.subscribe(()=>this.dispatchVisibility())}watch(e){let t=e.agentJobId,n=this.holders.get(t);this.holders.set(t,n===void 0?1:n+1),this.apply({type:`WATCH`,agentJobId:t,seed:e,now:Date.now()});let r=!1;return()=>{if(r)return;r=!0;let e=this.holders.get(t);if(e!==void 0){if(e>1){this.holders.set(t,e-1);return}this.holders.delete(t),this.readTokens.delete(t),this.apply({type:`UNWATCH`,agentJobId:t})}}}latest(e){let t=this.state.watched[e];return t===void 0?null:t.view}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}refresh(e){this.state.watched[e]!==void 0&&this.read(e)}dispose(){this.disposed=!0,this.unsubscribeVisibility(),this.timer!==null&&clearTimeout(this.timer.handle),this.timer=null,this.listeners.clear()}dispatchVisibility(){let e=!this.deps.visibility.get();e!==this.state.hidden&&this.apply({type:`VISIBILITY`,hidden:e,now:Date.now()})}apply(e){if(this.disposed)return;let t=kD(this.state,e);if(t!==this.state){this.state=t,this.reconcileTimer();for(let e of this.listeners)e()}}reconcileTimer(){let e=so(this.state),t=this.timer;if(e===null){t!==null&&clearTimeout(t.handle),this.timer=null;return}(t===null||t.dueAt!==e)&&(t!==null&&clearTimeout(t.handle),this.timer={dueAt:e,handle:setTimeout(()=>this.onTimer(),Math.max(0,e-Date.now()))})}onTimer(){if(this.timer=null,this.disposed||this.cycleInFlight)return;let e=Date.now(),t=oo(this.state,e);if(t.length===0){this.reconcileTimer();return}this.cycleInFlight=!0,this.apply({type:`TICK`,now:e}),Promise.all(t.map(e=>this.read(e))).finally(()=>{this.cycleInFlight=!1,this.reconcileTimer()})}async read(e){let t=this.readTokens.get(e),n=t===void 0?1:t+1;this.readTokens.set(e,n);let r=null,i=new Promise((e,t)=>{r=setTimeout(()=>t(new AD),OD)});try{let t=await Promise.race([this.deps.http.request({method:wn.agentJobStatus.method,path:wn.agentJobStatus.path(e),schema:w}),i]);if(this.readTokens.get(e)!==n)return;this.apply({type:`READ_OK`,agentJobId:e,view:t,now:Date.now()})}catch(t){if(this.readTokens.get(e)!==n)return;this.deps.logger.error(`Agent job status read for the chat card failed`,{agentJobId:e,error:t instanceof Error?t.message:String(t)}),this.apply({type:`READ_FAIL`,agentJobId:e,error:jD(t),now:Date.now()})}finally{r!==null&&clearTimeout(r)}}},ND=F({swarm:F({maxAgents:wt})});async function PD(e){return{maxAgents:(await e.request({method:wn.aiSettingsUser.method,path:wn.aiSettingsUser.path(),schema:ND})).swarm.maxAgents}}var FD=[`runner_cards.v1`];function ID(e){return e.browser===null?{runnerType:`web`,clientCapabilities:FD}:{runnerType:`extension`,clientCapabilities:FD,panelId:e.browser.panelId}}var LD=xt(kt),RD=F({permissionMode:LD,permissionModeVersion:N().int().positive()}),zD=F({permissionMode:LD});function BD(e){let{http:t}=e;return{async setConversationMode(e,n){let r=await t.request({method:wn.conversationPermissionMode.method,path:wn.conversationPermissionMode.path(e),body:{permissionMode:n},schema:RD});return{permissionMode:r.permissionMode,permissionModeVersion:r.permissionModeVersion}},async readLastChoice(){return(await t.request({method:wn.lastPermissionModeRead.method,path:wn.lastPermissionModeRead.path(),schema:zD})).permissionMode},async writeLastChoice(e){return(await t.request({method:wn.lastPermissionModeWrite.method,path:wn.lastPermissionModeWrite.path(),body:{permissionMode:e},schema:zD})).permissionMode}}}function VD(e){let t=null,n=/* @__PURE__ */ new Set,r=e=>{for(let t of n)t(e)};return{transport:{async open(n){t=n.conversationId,await e.open(n)},close(){t=null,e.close()},async send(n){let i=n.name===`chat-stop`?t:null;try{let t=await e.send(n);return i!==null&&r({conversationId:i,accepted:t.status===`accepted`}),t}catch(e){throw i!==null&&r({conversationId:i,accepted:!1}),e}},subscribe(t){return e.subscribe(t)},getStatus(){return e.getStatus()}},stopOutcomes:{subscribe(e){return n.add(e),()=>n.delete(e)}}}}function HD(e){return{read:()=>Promise.resolve(e.conversationId),remember:()=>Promise.resolve(),forget:()=>Promise.resolve()}}function UD(e){let t=new dD,n=new tD,{transport:r,stopOutcomes:i}=VD(e.transport),a=Cn({http:e.http,logger:e.logger}),o=El({transport:r,clock:Dl(),policy:Lc,tools:eD,conversations:wD({http:e.http,logger:e.logger,reportContexts:t,launchLevels:n}),permissionModes:BD({http:e.http}),memory:e.conversationPin===null?e.conversationMemory:HD(e.conversationPin),capabilities:{load:async()=>{let[t,n]=await Promise.all([a.load(),PD(e.http)]);return{...t,swarm:n}},resolveSelection:t=>{let n=e.modelSelection.read();return n===null?null:gn(t,n)}},browser:e.browser,open:ID(e),logger:e.logger}),s=n.followAdoptions(o,e.logger),c=new MD({http:e.http,logger:e.logger,visibility:e.visibility});return{session:o,stopOutcomes:i,reportContexts:t,launchLevels:n,jobStatus:c,dispose(){s(),c.dispose(),o.dispose()}}}function WD(e){let[t,n]=(0,L.useState)(null);return(0,L.useLayoutEffect)(()=>{let t=UD(e);return n(t),()=>{t.dispose(),n(null)}},[e]),t}function GD(e){let{session:t}=e,n=(0,L.useCallback)(e=>t.subscribe(e),[t]);return(0,L.useSyncExternalStore)(n,()=>t.getSnapshot())}function KD(e,t){let n=t.length>0;(0,L.useEffect)(()=>{if(e!==null&&n)return e.setUnsentWaiting(!0),()=>{e.setUnsentWaiting(!1)}},[e,n])}function qD(e,t){return e===null||t===null?e===t:e.keySource===t.keySource&&e.modelId===t.modelId}function JD(e){let t=(0,L.useRef)(null),n=(0,L.useCallback)(t=>e.subscribe(t),[e]),r=(0,L.useCallback)(()=>{let n=e.read();return qD(t.current,n)||(t.current=n),t.current},[e]);return(0,L.useSyncExternalStore)(n,r)}function YD(e){let{session:t,store:n,capabilityLoad:r}=e,i=JD(n);return(0,L.useEffect)(()=>{r.status===`ready`&&t.setModelSelection(i===null?null:gn(r.value,i))},[r,t,i]),(0,L.useCallback)((e,r)=>{n.write({keySource:e,modelId:r.id}),t.setModelSelection(r.selectionId)},[t,n])}function XD(e){return e.scope===`conversation`?`conversation:${e.conversationId}`:`last-choice`}function ZD(e){let{session:t,view:n,ready:r,newConversation:i,visible:a}=e,[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(null),u=n.kind===`known`?{identity:XD(n),value:n.value,writeStatus:n.write.status}:null;if(u===null)c!==null&&l(null);else if(u.identity!==(o==null?void 0:o.identity)||u.value!==o.value||u.writeStatus!==o.writeStatus){s(u);let e=o!==null&&u.identity===o.identity,t=e&&u.value!==o.value,n=u.writeStatus===`writing`||(o==null?void 0:o.writeStatus)===`writing`;t&&!n?l(u.value):(!e||t||u.writeStatus===`writing`)&&l(null)}let d=c!==null&&n.kind===`known`&&n.write.status===`failed`;(0,L.useEffect)(()=>{d&&t.dismissPermissionModeWriteFailure()},[d,t]),(0,L.useEffect)(()=>{a&&i&&t.refreshLastPermissionMode()},[a,i,t]);let f=(0,L.useCallback)(()=>l(null),[]),p=(0,L.useCallback)(e=>t.setPermissionMode(e),[t]),m=n.kind===`known`?n:null,h=m!==null&&m.write.status===`failed`?{attempted:m.write.attempted,kept:m.value,scope:m.scope,onRetry:()=>t.retryPermissionModeWrite(),onDismiss:()=>t.dismissPermissionModeWriteFailure()}:null;return{readFailure:n.kind===`unknown`&&n.read===`failed`?{onRetry:()=>t.refreshLastPermissionMode()}:null,composer:{value:m===null?null:m.value,disabled:!r||m===null||m.write.status===`writing`,arrival:c===null?null:{onShown:f},onChange:p},failure:h,announced:c}}var QD=`chat_request_user_input`;function $D(e){switch(e){case`chat.question.forbidden`:return`unauthorized`;case`chat.question.continuation_unavailable`:return`unavailable`;case`chat.question.not_found`:case`chat.question.revision_conflict`:case`chat.question.stale_answer`:case`chat.question.already_pending`:return`stale`;default:return`retryable`}}function eO(e){switch(e.kind){case`accepted`:return null;case`rejected`:return $D(e.errorCode);case`failed`:return`retryable`}}function tO(e){let{session:t,conversationId:n,messages:r,restoredBatchIds:i,locale:a,logger:o}=e,[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(null),d=(0,L.useRef)(/* @__PURE__ */ new Map),p=(0,L.useCallback)((e,t)=>{c(t=>t===e?null:t),u({batchId:e,kind:t})},[]),m=(0,L.useCallback)(async e=>{if(!e.inFlight){if(n===null){o.warn(`chat question action: no conversation bound`,{batchId:e.batchId}),p(e.batchId,`nonretryable`);return}if(globalThis.crypto===void 0||!(`subtle`in globalThis.crypto)){o.warn(`chat question action: crypto.subtle unavailable (insecure context)`,{batchId:e.batchId}),p(e.batchId,`nonretryable`);return}e.inFlight=!0,c(e.batchId),u(null);try{e.idempotencyKey===null&&(e.idempotencyKey=await eo(n,e.fingerprint));let r={batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey},i=e.kind===`answer`?await t.answerQuestion({...r,answers:e.answers}):await t.cancelQuestion(r);if(d.current.get(e.batchId)!==e)return;let a=eO(i);if(a===null){c(t=>t===e.batchId?null:t);return}p(e.batchId,a)}catch(t){o.warn(`chat question action failed before it was sent`,{batchId:e.batchId,error:t instanceof Error?t.message:String(t)}),p(e.batchId,`retryable`)}finally{e.inFlight=!1}}},[n,o,t,p]);(0,L.useEffect)(()=>{let e=new Set(r.flatMap(e=>e.blocks??[]).flatMap(e=>{let t=Hg(e);return t===null?[]:[t]}).filter(e=>e.status!==`pending`).map(e=>e.id));if(e.size!==0){for(let t of e)d.current.delete(t);c(t=>t!==null&&e.has(t)?null:t),u(t=>t!==null&&e.has(t.batchId)?null:t)}},[r]),(0,L.useEffect)(()=>{let e=d.current;return()=>{e.clear(),c(null),u(null)}},[n]);let h=(0,L.useCallback)((e,t,n)=>{let r=Qa(e,t,n),i=d.current.get(e),a=i!==void 0&&i.fingerprint===r?i:{kind:`answer`,batchId:e,revision:t,answers:n,fingerprint:r,idempotencyKey:null,inFlight:!1};return d.current.set(e,a),m(a)},[m]),g=(0,L.useCallback)((e,t)=>{let n=$a(e,t),r=d.current.get(e),i=r!==void 0&&r.fingerprint===n?r:{kind:`cancel`,batchId:e,revision:t,fingerprint:n,idempotencyKey:null,inFlight:!1};return d.current.set(e,i),m(i)},[m]),_=(0,L.useCallback)(e=>{let t=d.current.get(e);if(t!==void 0)return m(t)},[m]),v=(0,L.useCallback)(e=>{u(t=>t!==null&&t.batchId===e?null:t)},[]),y=(0,L.useMemo)(()=>r.flatMap(e=>e.role===`assistant`&&oa(e).length===0&&e.toolCalls!==void 0&&e.toolCalls.some(e=>e.toolName===QD)?[e.id]:[]),[r]),b=(0,L.useCallback)(e=>{let t=r.flatMap(e=>e.blocks??[]).filter(f).find(t=>t.payload.workflowId===e);return t===void 0?null:t.payload.workers.some(e=>e.unit!==null)},[r]),x=(0,L.useMemo)(()=>{let e=new Intl.DateTimeFormat(a,{dateStyle:`medium`,timeStyle:`short`});return t=>e.format(new Date(t))},[a]);return(0,L.useMemo)(()=>({pendingBatchId:s,error:l,restoredBatchIds:i,loadingAssistantMessageIds:y,onAnswer:h,onCancel:g,onRetry:_,onRefresh:v,formatResolvedAt:x,workflowAgentsWorking:b}),[l,x,b,y,h,g,v,_,s,i])}var nO=[`managed`,`company`,`personal`];function rO(e){return nO.includes(e)}function iO(e){let{transport:t,logger:n,conversationId:r,recordResolvedConfirmation:i}=e,[a,o]=(0,L.useState)(null);return(0,L.useEffect)(()=>t.subscribe(e=>{if(e.kind!==`event`)return;let t=e.event;if(t.type===`usage`){let{provider:e,model:i}=t;if(e===void 0||i===void 0)return;if(!rO(e)){n.warn(`usage echo: provider outside the client contract`,{provider:e,model:i});return}o({conversationId:r,value:{provider:e,model:i}});return}let a=Sy(t);a.kind===`pairing`?i(a.pairing):a.kind===`malformed`&&n.warn(`action-resolved frame without a usable pairing`,{issuePaths:a.issuePaths})}),[r,n,i,t]),a!==null&&a.conversationId===r?a.value:null}var aO={rate_limited:`rateLimit`,rate_limit:`rateLimit`,credits_exhausted:`credits`,credit_limit:`credits`,auth_failed:`auth`,auth_expired:`auth`,provider_error:`connection`,reconnect_failed:`connection`,"client.stream_stalled":`stalled`,"client.connection_lost_during_stream":`streamCut`},oO=/* @__PURE__ */ new Set([`ai.model_not_configured`,`ai_settings.company_not_found`,`ai.company_not_found`,`ai.user_disabled`]);function sO(e){if(e===null||!Object.prototype.hasOwnProperty.call(aO,e))return null;let t=aO[e];return t===void 0?null:t}function cO(e){let t=sO(e.errorCode);if(t!==null)return t;let n=sO(e.code);return n===null?`generic`:n}function lO(e){return e.errorCode!==null&&oO.has(e.errorCode)||e.code!==null&&oO.has(e.code)}function uO(e,t){if(t===null||!Object.prototype.hasOwnProperty.call(e,t))return null;let n=e[t];return n===void 0?null:n}function dO(e,t){let n=uO(e.byProviderCode,t.providerErrorCode);if(n!==null)return n;let r=uO(e.byCode,t.errorCode);if(r!==null)return r;let i=uO(e.byCode,t.code);return i===null?t.message:i}function fO(e){return t=>{let n=cO(t),r=!lO(t);return{errorClass:n,title:e.classes[n].title,text:dO(e.errors,t),hint:r?e.classes[n].hint:null,retryable:r}}}function pO(e){if(e.role!==`agent`)return{role:e.role};if(e.agentOrigin===`agent_question`)return{role:`agent`,agentOrigin:`agent_question`};if(e.createdAt===void 0)throw Error(`Lead prose row ${e.id} reached the transcript without createdAt`);return{role:`agent`,agentOrigin:`workflow_lead`,createdAt:e.createdAt}}function mO(e){switch(e){case`confirmed`:case`failed`:case`rejected`:case`closed`:return!1;case`pending`:case void 0:return!0}}function hO(e){return{id:e.toolCallId,toolName:e.toolName,...e.title!==void 0&&{title:e.title},...e.effect!==void 0&&{effect:e.effect},...e.operationTitles!==void 0&&{operationTitles:e.operationTitles},args:e.args,...e.contentOffset!==void 0&&{contentOffset:e.contentOffset}}}function gO(e,t,n,r){let i=t.kind===`pending-tool-call`||n!==void 0;return{id:e.id,...pO(e),content:t.kind===`prose`?t.text:``,...t.kind===`error`&&{error:{...t.code!==void 0&&{code:t.code},message:t.message}},...n!==void 0&&{toolCallStatus:n},...t.kind===`pending-tool-call`&&Vm(t)&&{answersLeadGrant:!0},...i&&!r&&mO(n)&&{toolCallCancelled:!0},...e.effort!==void 0&&{effort:e.effort},...e.thinkingText!==void 0&&{thinkingText:e.thinkingText},...e.thinkingDuration!==void 0&&{thinkingDuration:e.thinkingDuration},...e.toolCalls!==void 0&&{toolCalls:e.toolCalls.map(hO)},...e.toolResults!==void 0&&{toolResults:e.toolResults.map(e=>({toolCallId:e.toolCallId,result:e.result}))},...e.blocks!==void 0&&{blocks:e.blocks},...e.attachments!==void 0&&e.attachments.length>0&&{attachments:e.attachments}}}function _O(){let e=/* @__PURE__ */ new WeakMap;return(t,n)=>t.map(t=>{let r=e.get(t);if(r!==void 0&&(r.outcomeCallId===null||n.has(r.outcomeCallId)===r.awaitsOutcome))return r.message;let i=t.role===`assistant`?uy(t.content,t.pendingToolCall===void 0?null:t.pendingToolCall):{kind:`prose`,text:t.content},a=i.kind===`pending-tool-call`?i.toolCallId:null,o=t.pendingActionStatus,s=o===`confirmed`||o===`rejected`||o===`failed`||o===`closed`?o:i.kind===`pending-tool-call`?i.status:void 0,c=a!==null&&s===void 0?a:null,l=c!==null&&n.has(c),u=gO(t,i,s,l);return e.set(t,{outcomeCallId:c,awaitsOutcome:l,message:u}),u})}var vO=/\S/;function yO(e,t){let n=new Set(e.map(e=>e.id));return t.filter(e=>n.has(e.toolCallId))}function bO(e,t,n){let r=[{kind:`tools`,contentOffset:0,toolCalls:e,toolResults:yO(e,t)}];return vO.test(n)&&r.push({kind:`text`,text:n}),r}function xO(e,t){let n=0;for(let r of e){if(!Number.isInteger(r)||r<n||r>t)return!1;n=r}return!0}function SO(e){let t=e.content,n=e.toolCalls??[],r=e.toolResults??[];if(n.length===0)return{layout:`chronological`,segments:vO.test(t)?[{kind:`text`,text:t}]:[]};let i=n.map(e=>e.contentOffset);if(i.some(e=>e===void 0))return{layout:`legacy`,segments:bO(n,r,t)};let a=i;if(!xO(a,t.length))return{layout:`invalid`,segments:bO(n,r,t)};let o=[],s=0,c=0;for(;c<n.length;){let e=a[c],i=[];for(;c<n.length&&a[c]===e;)i.push(n[c]),c+=1;if(e>s){let n=t.slice(s,e);vO.test(n)&&o.push({kind:`text`,text:n})}o.push({kind:`tools`,contentOffset:e,toolCalls:i,toolResults:yO(i,r)}),s=e}if(s<t.length){let e=t.slice(s);vO.test(e)&&o.push({kind:`text`,text:e})}return{layout:`chronological`,segments:o}}function CO(e){let t=[e.code,e.errorCode,e.providerErrorCode].filter(e=>e!==null);return t.length===0?null:[...new Set(t)].join(` \u00B7 `)}function wO({error:e,presentation:t,copy:n,onRetry:r}){let i=CO(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-reply-error`,role:`alert`,"data-testid":`ai-chat-reply-error`,"data-error-class":t.errorClass,children:[/* @__PURE__ */ (0,Z.jsx)(he,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.text}),t.hint!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.hint}),i!==null&&n.details!==null&&/* @__PURE__ */ (0,Z.jsxs)(`details`,{children:[/* @__PURE__ */ (0,Z.jsx)(`summary`,{children:n.details}),/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i})]}),r!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-reply-error-actions`,children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:r,children:n.retry})})]})}function TO({liveText:e,storedText:t,durationSeconds:n,copy:r}){let[i,a]=(0,L.useState)(!1),o=t.length===0&&e.length>0;if(!o&&t.length===0)return null;let s=o||n===null?r.thinking:r.thoughtFor(n);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-thinking`,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-toolline qa-ai-chat-thinking-toggle`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[/* @__PURE__ */ (0,Z.jsx)(Kr,{className:`qa-ai-chat-toolline-icon${o?` qa-ai-chat-thinking-icon--live`:``}`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:s}),/* @__PURE__ */ (0,Z.jsx)(fe,{className:`qa-ai-chat-thinking-chevron${i?` qa-ai-chat-thinking-chevron--open`:``}`,"aria-hidden":`true`})]}),i&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-thinking-text`,children:[o?e:t,o&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-thinking-cursor`,"aria-hidden":`true`})]})]})}function EO({label:e}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-activity`,role:`status`,"data-testid":`ai-tool-activity`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-activity-dots`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{})]}),e!==null&&/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e})]})}var DO=/\S/,OO=1500;function kO(e){let t=e.toolCalls;if(t===void 0||t.length===0)return null;let n=new Set(e.toolResults===void 0?[]:e.toolResults.map(e=>e.toolCallId));for(let e=t.length-1;e>=0;--e){let r=t[e];if(r!==void 0&&!n.has(r.id))return r}return null}var AO=e=>({text:e,link:null});function jO(e,t,n){let r=t.toolCallStatus;if(r===null)return null;switch(e.toolCallStatus){case`confirmed`:{if(n.confirmedLine===null)return AO(r.confirmed);let t=n.confirmedLine(e);switch(t.kind){case`generic`:return AO(r.confirmed);case`outcome`:return AO(t.text);case`unknown`:return AO(r.unknown);case`failed`:return AO(r.failed);case`awaiting`:return null;case`launched_elsewhere`:return{text:r.launchedElsewhere,link:{conversationId:t.conversationId,label:r.openConversation}}}break}case`failed`:return AO(r.failed);case`rejected`:return AO(n.answersLeadGrant!==null&&n.answersLeadGrant(e)?r.rejectedLeadGrant:r.rejected);case`closed`:return AO(r.closed);case`pending`:case void 0:return null}}function MO(e){return{code:e.code===void 0?null:e.code,message:e.message,errorCode:null,providerErrorCode:null}}function NO({text:e,copy:t}){let[n,r]=(0,L.useState)(`idle`),i=(0,L.useRef)(null);(0,L.useEffect)(()=>()=>{i.current!==null&&clearTimeout(i.current)},[]);let a=e=>{r(e),i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>r(`idle`),OO)},o=n===`done`?t.done:n===`failed`?t.failed:t.label;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-answer-tools`,children:[/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:o,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>a(`done`),()=>a(`failed`))},children:n===`done`?/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(ue,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,role:`status`,children:n===`idle`?``:o})]})}function PO({message:e,live:t,liveThinkingText:n,awaitingConfirmation:r,renderers:i,copy:a,presentError:o}){let{layout:s,segments:c}=(0,L.useMemo)(()=>SO(e),[e]),l=(0,L.useMemo)(()=>c.flatMap(e=>e.kind===`tools`?[e]:[]),[c]),u=i.cards,d=(0,L.useMemo)(()=>u(e,l),[u,e,l]),f=DO.test(e.content),p=e.effort!==void 0&&mt(e.effort),m=t&&p&&a.thinking!==null&&n.length>0&&(e.thinkingText===void 0||e.thinkingText.length===0),h=i.activity,g=t&&h!==null?kO(e):null,_=g!==null&&h!==null?h(g):m?null:a.thinkingPhase,v=jO(e,a,i),{openConversation:y}=i,b=v===null?null:v.link,x=e.toolCallCancelled===!0&&(e.toolCallStatus===void 0||e.toolCallStatus===`pending`),S=e.error!==void 0||e.toolCallCancelled===!0,C=p&&a.thinking!==null?/* @__PURE__ */ (0,Z.jsx)(TO,{liveText:t?n:``,storedText:e.thinkingText===void 0?``:e.thinkingText,durationSeconds:e.thinkingDuration===void 0?null:e.thinkingDuration,copy:a.thinking}):null,w=0,T=!1,ee=!1,E=c.length-1,D=c.map((e,n)=>{if(e.kind===`text`)return S?null:(DO.test(e.text)&&(T=!0),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-prose`,children:i.content(e.text)},`text-${String(n)}`));let a=d.atStep[w];w+=1;let o=i.activityLine===null?null:i.activityLine(e,{live:t,lastAndWorking:n===E&&!r});return o!==null&&(ee=!0),o===null&&a==null?null:(T=!0,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-step`,children:[o,a]},`step-${String(n)}`))}),te=t&&!r&&!f&&!ee,ne=i.blocks===null?null:i.blocks(e,t),O=a.copyAnswer!==null&&!t&&f&&!S;return C!==null||T||te||d.afterProse!==null||e.error!==void 0||x||v!==null||ne!==null||O?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-assistant`,"data-segment-layout":s,children:[a.byline!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-byline`,children:[/* @__PURE__ */ (0,Z.jsx)(Kr,{"aria-hidden":`true`}),a.byline]}),C,D,te&&/* @__PURE__ */ (0,Z.jsx)(EO,{label:_}),d.afterProse!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-step`,children:d.afterProse}),e.error!==void 0&&/* @__PURE__ */ (0,Z.jsx)(wO,{error:MO(e.error),presentation:o(MO(e.error)),copy:{retry:a.retry,details:a.details},onRetry:null}),x&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-turn-note`,"data-testid":`ai-message-tool-call-cancelled`,children:a.toolCallCancelled}),v!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-note`,"data-testid":`ai-message-tool-call-status`,"data-tool-call-status":e.toolCallStatus,children:[v.text,b!==null&&y!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[` \u00B7 `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-turn-note__link`,"data-testid":`ai-message-tool-call-open-conversation`,onClick:()=>y(b.conversationId),children:b.label})]})]}),ne,O&&a.copyAnswer!==null&&/* @__PURE__ */ (0,Z.jsx)(NO,{text:e.content,copy:a.copyAnswer})]}):null}function FO(){return/* @__PURE__ */ (0,Z.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`circle`,{cx:`12`,cy:`9`,r:`3.4`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M5.5 20c.8-3.6 3.4-5.6 6.5-5.6s5.7 2 6.5 5.6`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`m9 3.2 3 1.6 3-1.6`})]})}function IO({message:e,content:t,copy:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-lead`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-byline qa-ai-chat-byline--lead`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-byline-badge`,children:/* @__PURE__ */ (0,Z.jsx)(FO,{})}),n.byline,/* @__PURE__ */ (0,Z.jsxs)(`time`,{className:`qa-ai-chat-byline-time`,dateTime:e.createdAt,children:[`\u00B7 `,n.formatTime(e.createdAt)]})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-prose`,children:t(e.content)})]})}var LO=100,RO=16,zO=`qa-ai-chat-messages--revealing`;function BO(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function VO(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role!==`agent`)return t}return-1}function HO({messages:e,isStreaming:t,liveThinkingText:n,awaitingConfirmation:r,error:i,empty:a,renderers:o,copy:s,presentError:c}){let l=(0,L.useRef)(null),u=(0,L.useRef)(null),d=(0,L.useRef)(e.length),f=(0,L.useRef)(!0),p=(0,L.useRef)(!1),[m,h]=(0,L.useState)(!1),g=e.length===0&&!t&&a!==null,_=(0,L.useRef)(g);(0,L.useLayoutEffect)(()=>{_.current=g});let v=(0,L.useCallback)(()=>{let e=l.current;e!==null&&(f.current=!0,h(!1),e.scrollTo({top:e.scrollHeight,behavior:`auto`}))},[]),y=(0,L.useCallback)(()=>{let e=l.current;if(e===null)return;let t=BO(e)<=LO;f.current=t,h(!t)},[]),b=(0,L.useCallback)(()=>{p.current=!0,f.current=!1,requestAnimationFrame(()=>requestAnimationFrame(()=>{p.current&&(p.current=!1,y())}))},[y]),x=(0,L.useCallback)(e=>{let t=l.current;if(t===null)return;f.current=!1;let n=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop-RO,r=Math.min(Math.max(n,0),t.scrollHeight-t.clientHeight);Math.abs(r-t.scrollTop)<1||(t.classList.add(zO),t.addEventListener(`scrollend`,()=>t.classList.remove(zO),{once:!0}),t.scrollTo({top:r,behavior:`auto`}))},[]);(0,L.useLayoutEffect)(()=>{let t=l.current;if(t===null)return;let n=e.length!==d.current;d.current=e.length;let r=e[e.length-1];if(g){f.current=!0,h(!1),t.scrollTo({top:0,behavior:`auto`});return}if(t.scrollHeight-t.clientHeight<=LO){f.current=!0,h(!1);return}if(n&&r!==void 0&&r.role===`user`){v();return}f.current&&v()},[e,t,n,i,r,g,v]),(0,L.useEffect)(()=>{let e=l.current,t=u.current;if(e===null||t===null)return;let n=new ResizeObserver(()=>{if(!_.current){if(p.current){p.current=!1,y();return}f.current&&v()}});return n.observe(e),n.observe(t),()=>n.disconnect()},[v,y]),(0,L.useEffect)(()=>{let e=l.current;if(e===null)return;let t=()=>{if(_.current)return;let t=BO(e)<=LO;f.current=t,h(!t)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[]);let S=VO(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-messages`,ref:l,tabIndex:s.feedLabel===null?void 0:0,"aria-label":s.feedLabel===null?void 0:s.feedLabel,children:[/* @__PURE__ */ (0,Z.jsx)(Wp,{hold:b,children:/* @__PURE__ */ (0,Z.jsx)(qp,{reveal:x,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-feed`,ref:u,children:[g&&a,e.map((e,i)=>{switch(e.role){case`user`:return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-user`,children:[o.attachments!==null&&e.attachments!==void 0&&o.attachments(e),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-bubble`,children:e.content})]},e.id);case`agent`:{if(e.agentOrigin===`workflow_lead`)return s.leadProse===null?null:/* @__PURE__ */ (0,Z.jsx)(IO,{message:e,content:o.content,copy:s.leadProse},e.id);let t=o.blocks===null?null:o.blocks(e,!1);return t===null?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-agent`,children:t},e.id)}case`assistant`:return/* @__PURE__ */ (0,Z.jsx)(PO,{message:e,live:t&&i===S,liveThinkingText:i===S?n:``,awaitingConfirmation:r&&i===S,renderers:o,copy:s,presentError:c},e.id)}}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(wO,{error:i.error,presentation:i.presentation,copy:{retry:s.retry,details:s.details},onRetry:i.onRetry})]})})}),m&&/* @__PURE__ */ (0,Z.jsx)(O,{relationship:`label`,content:s.scrollToBottom,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-scroll-bottom`,onClick:v,children:/* @__PURE__ */ (0,Z.jsx)(ee,{"aria-hidden":`true`})})})]})}function UO(e){switch(e.status){case`completed`:case`failed`:case`cancelled`:case`stopping`:return e.status;case`running`:return e.hostState===`lost`?`host_lost`:e.hostState===`none`&&e.executorKind!==`none`?`starting`:e.leadState===`awaiting_user`||e.openAsk?`awaiting`:`running`}}function WO(e){return e===`completed`||e===`failed`||e===`cancelled`}function GO(e,t){let n=t===`agent`;switch(e){case`starting`:return{tone:`run`,label:n?`startingRunner`:`startingBrowser`};case`running`:return{tone:`run`,label:`running`};case`awaiting`:return{tone:`wait`,label:`awaiting`};case`host_lost`:return{tone:`wait`,label:n?`runnerLost`:`browserLost`};case`stopping`:return{tone:`stop`,label:`stopping`};case`completed`:return{tone:`ok`,label:`completed`};case`failed`:return{tone:`fail`,label:`failed`};case`cancelled`:return{tone:`stop`,label:`cancelled`}}}var KO={make_auto:ti,atlas:Ar,run:Ir},qO=6;function JO({count:e,label:t,className:n}){return/* @__PURE__ */ (0,Z.jsx)(`span`,{...t===void 0?{"aria-hidden":!0}:{role:`img`,"aria-label":t},className:j(`inline-flex items-center gap-0.5`,n),children:Array.from({length:Math.min(e,qO)},(e,t)=>/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`relative h-[9px] w-[11px] rounded-[2px] border-[1.2px] border-solid border-current opacity-90 before:absolute before:inset-x-0 before:top-[1.5px] before:h-[1.2px] before:bg-current before:opacity-60 before:content-['']`},t))})}function YO(e){return e.status===`running`&&(e.leadState===`awaiting_user`||e.openAsk)}function XO(e){return e.launchKind===`preset`&&e.level.effort!==`max`}function ZO(e,t){return e.launchKind===`preset`&&t===`starting`&&e.place.kind===`this_browser`}function QO(e,t){if(e.launchKind!==`preset`)return!0;let n=UO(e);return n===`awaiting`||t&&ZO(e,n)}function $O(e){return e===`awaiting`||e===`host_lost`}function ek(e){return e.filter(e=>e.status===`idle`||e.status===`busy`).length}function tk(e,t){return t&&e.status===`running`&&(e.hostState===`none`||e.hostState===`lost`)&&e.executorKind===`browser`}function nk(e,t){return new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`}).format(new Date(e))}function rk(e,t){let n=e.flatMap(e=>e.blocks??[]).filter(f).find(e=>e.payload.workflowId===t);return n===void 0?null:n.payload.status}function ik(e){return e.flatMap(e=>e.blocks??[]).filter(f).filter(e=>e.payload.launchKind===`preset`).map(e=>e.payload.workflowId).sort().join(`,`)}function ak(e,t){return e.length>0&&e.every(e=>e.kind===`workflow`&&t.has(e.id))}function ok(e){let t=document.getElementById(`workflow-block-${e}`);t!==null&&(t.scrollIntoView({block:`center`,behavior:`smooth`}),t.focus({preventScroll:!0}))}function sk({payload:e,sidePanel:t,onToQuestion:n,onResume:r,resuming:i}){let a=$().cards.workflow,o=a.strip,s=UO(e),c=$O(s),l=ek(e.workers),u=e.executorKind===`browser`,d=s===`awaiting`&&XO(e),f=s===`awaiting`&&e.launchKind===`preset`,p=s===`awaiting`?d?e.openAsk?a.preset.stripChatLeadAwaitingAnswer:a.preset.stripChatLeadAwaitingMessage:o.awaiting:s===`host_lost`?u?o.lostBrowser:o.lostRunner:s===`starting`?ZO(e,s)?a.preset.stripAwaitingBrowser:u?o.startingBrowser:o.startingRunner:s===`stopping`?o.stopping:e.leadState===`active`?o.active:o.idle,m=f?un:c?s===`host_lost`?D:dr:Pr,h=tk(e,t)?/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:14}),loading:i,disabled:i,onClick:r,children:o.resume}):f?null:YO(e)?/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`xs`,onClick:()=>n(e.workflowId),children:o.toQuestion}):/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`xs`,"aria-label":o.toBlockLabel,onClick:()=>ok(e.workflowId),children:o.toBlock});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,"data-testid":`ai-chat-swarm-strip`,"data-phase":s,className:j(`mx-3 mb-2 flex items-center gap-2 rounded-md border border-solid pl-3 text-xs shadow-(--shadow-sm) [animation:slide-up_var(--motion-long)_var(--ease-out)]`,h===null?`py-2 pr-3`:`py-1.5 pr-1.5`,c?`border-(--color-border-warning) bg-(--color-warning-bg)`:`border-(--color-border) bg-(--glass-bg)`),children:[/* @__PURE__ */ (0,Z.jsx)(m,{"aria-hidden":`true`,className:j(`size-3.5 flex-none`,c?`text-(--color-warning-text)`:`text-(--color-primary-text)`)}),s!==`host_lost`&&l>0&&/* @__PURE__ */ (0,Z.jsx)(JO,{count:l,label:o.windows(l),className:`text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0 grow truncate text-fg-secondary`,children:p}),h]})}function ck({messages:e,workflowHost:t,onToQuestion:n}){let r=$().errors,i=e.flatMap(e=>e.blocks??[]).filter(y).filter(f).filter(e=>QO(e.payload,t!==null)).reverse();return i.length===0?null:/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:i.map(e=>{let{workflowId:i}=e.payload,a=t===null?`idle`:t.statusOf(i);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(sk,{payload:e.payload,sidePanel:t!==null,onToQuestion:n,onResume:()=>t==null?void 0:t.attach(i),resuming:a===`resuming`}),a===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mx-3 mb-2`,children:/* @__PURE__ */ (0,Z.jsx)(vm,{children:r.byCode[`client.workflow_host_action_failed`]})})]},e.id)})})}function lk({launches:e,messages:t,workflowHost:n,openPath:r,onAttachSettled:i}){let a=e.filter(e=>rk(t,e.workflowId)===null);return uk(a.map(e=>e.workflowId),n,i),a.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-none flex-col gap-2 px-3 pt-3`,children:a.map(e=>/* @__PURE__ */ (0,Z.jsx)(dk,{launch:e,workflowHost:n,openPath:r},e.workflowId))})}function uk(e,t,n){let r=(0,L.useRef)(/* @__PURE__ */ new Set);(0,L.useEffect)(()=>{let i=!1;for(let n of e)t.statusOf(n)===`resuming`?r.current.add(n):r.current.delete(n)&&(i=!0);i&&n()})}function dk({launch:e,workflowHost:t,openPath:n}){let r=$(),i=r.cards.workflow.preset.panelWait,a=Q(),o=t.statusOf(e.workflowId),s=`panel-wait-${e.workflowId}`,c=e.reason===`host_lost`,l=e.reason===`host_lost`?i.lostDetail(nk(e.hostLostAt,a)):i.origin(e.surface,nk(e.startedAt,a),e.initiatorName);return/* @__PURE__ */ (0,Z.jsxs)(`section`,{role:`status`,"aria-labelledby":s,"data-testid":`ai-chat-panel-wait-strip`,"data-reason":e.reason,className:`grid grid-cols-[28px_minmax(0,1fr)] gap-x-3 gap-y-2 rounded-lg border border-solid border-(--color-border-warning) bg-(--color-warning-bg) p-3 text-xs [animation:var(--animation-slide-down)]`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-7 place-items-center rounded-md border border-solid border-[color-mix(in_srgb,var(--color-primary)_40%,transparent)] bg-(--color-bg-primary-tint-15) text-(--color-primary-text)${c?``:` shadow-(--glow-primary)`}`,children:/* @__PURE__ */ (0,Z.jsx)(Kr,{className:`size-3.5`})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{id:s,className:`block text-(length:--text-body-sm) font-semibold text-fg-primary`,children:c?i.lostTitle(e.title):i.title(e.title)}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-(length:--text-caption) text-fg-secondary`,children:l})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`col-span-2 flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(er,{size:14}),loading:o===`resuming`,disabled:o===`resuming`,onClick:()=>t.attach(e.workflowId),"data-testid":`ai-chat-panel-wait-resume`,children:i.resume}),/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(fn,{size:14}),onClick:()=>n(e.deeplink),children:i.openLaunch})]}),o===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`col-span-2`,children:/* @__PURE__ */ (0,Z.jsx)(vm,{children:r.errors.byCode[`client.workflow_host_action_failed`]})})]})}var fk=3e4,pk=F({items:I(Ke),total:N().int().min(0)});function mk(e){return e.attention===`awaiting_browser`||e.attention===`host_lost`}async function hk(e,t){let n=[];for(let r=0;;r+=500){let i=await e.request({method:wn.myLiveBrowserTasks.method,path:wn.myLiveBrowserTasks.path(t,{limit:500,offset:r}),schema:pk});if(n.push(...i.items.filter(mk)),r+i.items.length>=i.total||i.items.length===0)return n}}function gk(e){let{http:t,logger:n,active:r,projectId:i,visible:a,conversationId:o}=e,[s,c]=(0,L.useState)({projectId:null,launches:[]}),[l,u]=(0,L.useState)(0),d=(0,L.useRef)(n);(0,L.useEffect)(()=>{d.current=n});let f=(0,L.useCallback)(()=>u(e=>e+1),[]);return(0,L.useEffect)(()=>{if(!r||i===null||!a)return;let e=!1,n=0,o=()=>{n+=1;let r=n;hk(t,i).then(t=>{let a=t.map(e=>{if(e.topic.kind!==`preset`)throw Error(`W10 answered swarm ${e.id} of topic ${e.topic.kind} to launchKind=preset`);if(e.launchSurface===null)throw Error(`W10 answered AI task ${e.id} without its launchSurface`);let t={workflowId:e.id,title:wu(e.topic),surface:e.launchSurface,startedAt:e.startedAt,initiatorName:e.initiator.displayName,deeplink:e.deeplink};if(e.attention===`awaiting_browser`)return{...t,reason:e.attention};if(e.hostLostAt===null)throw Error(`W10 answered host-lost AI task ${e.id} without its hostLostAt`);return{...t,reason:e.attention,hostLostAt:e.hostLostAt}});!e&&r===n&&c({projectId:i,launches:a})}).catch(t=>{e||d.current.error(`panel wait strip: reading the tasks waiting for a browser failed`,{projectId:i,error:t})})};o();let s=setInterval(o,fk);return window.addEventListener(`focus`,o),()=>{e=!0,clearInterval(s),window.removeEventListener(`focus`,o)}},[t,r,i,a,o,l]),{launches:r&&s.projectId===i?s.launches:[],reread:f}}function _k(e,t){let n=ik(e);return{aiTaskBlockIds:(0,L.useMemo)(()=>new Set(n===``?[]:n.split(`,`)),[n]),hiddenWorkflowId:t===null?null:t.workflowId,workflowStatusOf:t=>rk(e,t)}}function vk(e){let[t,n]=(0,L.useState)(()=>/* @__PURE__ */ new Map),r=(0,L.useCallback)((e,t)=>n(n=>{let r=new Map(n);return t===`idle`?r.delete(e):r.set(e,t),r}),[]);return(0,L.useMemo)(()=>e===null?null:{statusOf:e=>{let n=t.get(e);return n===void 0?`idle`:n},attach:t=>{r(t,`resuming`),e.attachWorkflowHost(t).then(()=>r(t,`idle`),e=>{r(t,`failed`),queueMicrotask(()=>{throw e})})}},[e,t,r])}var yk=``;function bk(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort,maxAgents:null}}function xk(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort}}function Sk(e){let{conversationId:t,historyLoad:n,launchLevels:r,capabilityLoad:i}=e,a=t===null?yk:t,o=(0,L.useCallback)(e=>r.subscribe(e),[r]),s=(0,L.useSyncExternalStore)(o,()=>t===null?null:r.get(t)),[c,l]=(0,L.useState)(()=>/* @__PURE__ */ new Map),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(t);if(f!==t&&(p(t),f===null&&t!==null)){d(!1);let e=c.get(yk);if(u&&n.status===`idle`&&e!==void 0&&!c.has(t)){let n=new Map(c);n.set(t,e),n.delete(yk),l(n)}}let m=i.status===`ready`?{block:cn,maxAgents:i.value.swarm.maxAgents}:null,h=c.get(a),g=h===void 0?s===null?an:xk(s):h,_=m===null?g:sn(g,m),v=e=>{l(t=>new Map(t).set(a,e))};return{choice:_,facts:m,choose:e=>{m!==null&&v(tn(e,m.maxAgents))},setAgents:e=>{m!==null&&v(Jt(_,e,m.maxAgents))},forSend:()=>(t===null&&d(!0),bk(_)),resetNewConversation:()=>{d(!1),l(e=>{if(!e.has(yk))return e;let t=new Map(e);return t.delete(yk),t})}}}var Ck=`qa-ai-chat-place inline-flex h-7 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-solid pr-[7px] pl-[9px] text-xs font-medium transition-[border-color,background-color,color,box-shadow] duration-(--motion-short) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-50`,wk=`my-1 h-px shrink-0 bg-stroke-light`;function Tk(e,t){return e.block===null?e.occupied?t.runnerBusy:t.runnerFree:t.runnerBlocked[e.block]}function Ek(e,t,n){switch(e.kind){case`opening`:return t.status===`failed`?n.fleetFailed:n.fleetLoading;case`this_browser`:return n.thisBrowser;case`none`:return n.none;case`runner`:return n.runner(e.runner.name);case`runner-unread`:return n.runnerUnread;case`runner-gone`:return n.runnerGone}}function Dk(e,t){switch(e.kind){case`opening`:return t.status===`failed`?D:Ur;case`this_browser`:return oe;case`none`:return hr;case`runner`:case`runner-unread`:return Ur;case`runner-gone`:return D}}function Ok({place:e,view:t,fleet:n,onChoose:r,onOpen:i,copy:a,heading:o,thisBrowserReach:s,look:c,disabled:l=!1}){let[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(null),[m,h]=(0,L.useState)(!1),g=(0,L.useId)(),_=(0,L.useRef)(null),v=(0,L.useId)(),y=Yt(),b=u&&!l,x=t.kind===`runner-gone`,S=x||t.kind===`opening`&&n.status===`failed`,C=Ek(t,n,a),w=Dk(t,n),T=n.status===`ready`?n.runners:[],E=e=>({key:`runner-${e.id}`,place:{kind:`runner`,agentId:e.id},icon:Ur,title:a.runner(e.name),detail:Tk(e,a),withheld:e.block!==null}),D={key:`this_browser`,place:{kind:`this_browser`},icon:oe,title:a.thisBrowser,detail:s===`opens_windows`?a.thisBrowserRowOpensWindows:a.thisBrowserRowTasksOnly,withheld:!1},te={key:`none`,place:{kind:`none`},icon:hr,title:a.none,detail:a.noneRow,withheld:!1},ne=T.filter(e=>e.mine).map(E),O=T.filter(e=>!e.mine).map(E),re=t=>e!==null&&Rn(e,t.place),k=m||O.some(re),A=f===null?void 0:[D,...ne,...O,te].find(e=>e.key===f),ie=e=>{e.withheld||(r(e.place),p(e.key),d(!1))},ae=e=>{let t=[...e.currentTarget.querySelectorAll(`[role="radio"]`)].filter(e=>e.getAttribute(`aria-disabled`)!==`true`),n=t.findIndex(e=>e===document.activeElement),r=n=>{let r=t[n];r!==void 0&&(e.preventDefault(),r.focus())};switch(e.key){case`ArrowDown`:case`ArrowRight`:r((n+1)%t.length);break;case`ArrowUp`:case`ArrowLeft`:r((n-1+t.length)%t.length);break;case`Home`:r(0);break;case`End`:r(t.length-1)}},se=n.status===`loading`||n.status===`idle`?a.fleetLoading:n.status===`failed`?a.fleetFailed:n.runners.length===0?a.fleetEmpty:null,ce=t=>{let n=re(t),r=n||e===null&&t.key===`this_browser`,i=t.icon;return/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:r?_:void 0,type:`button`,role:`radio`,"aria-checked":n,"aria-disabled":t.withheld||void 0,tabIndex:r?0:-1,"data-testid":`ai-chat-place-${t.key}`,onClick:()=>ie(t),className:j(`grid w-full grid-cols-[16px_minmax(0,1fr)_16px] items-center gap-2.5 rounded-md border-0 bg-transparent px-2 py-[7px] text-left text-fg-secondary`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`,t.withheld?`cursor-not-allowed text-fg-muted opacity-55`:`hover:bg-(--color-bg-elevated-hover) focus-visible:bg-(--color-bg-elevated-hover)`),children:[/* @__PURE__ */ (0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5 text-fg-secondary`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`block truncate text-body-sm font-medium text-fg-primary`,children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-caption leading-[1.4] text-fg-muted`,children:t.detail})]}),/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`,className:j(`size-3.5 text-(--color-primary-text)`,!n&&`invisible`)})]},t.key)},le=c===`setting`?/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:j(`qa-ai-chat-set qa-ai-chat-set--place`,S&&`qa-ai-chat-set--gone`),"aria-describedby":x?v:void 0,disabled:l,"data-place":t.kind,"data-testid":`ai-chat-place-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(w,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-set-value`,children:C})]}):/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:j(Ck,S?`border-[color-mix(in_srgb,var(--color-error)_45%,transparent)] bg-(--color-error-bg) text-(--color-error-text)`:`border-(--color-border) bg-transparent text-fg-secondary enabled:hover:border-(--color-border-hover) enabled:hover:text-fg-primary`,b&&`border-(--color-border-focus) shadow-(--glow-primary-sm)`),"aria-label":a.chipLabel(C),"aria-describedby":x?v:void 0,disabled:l,"data-place":t.kind,"data-testid":`ai-chat-place-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(w,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:C}),/* @__PURE__ */ (0,Z.jsx)(ee,{"aria-hidden":`true`,className:j(`size-3 shrink-0 transition-transform duration-(--motion-medium) ease-(--ease-out)`,b&&`rotate-180`)})]});return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Gt,{title:a.name,titleVisible:!1,trigger:le,triggerTooltip:c===`setting`?{content:a.chipLabel(C),relationship:`label`}:{content:a.title,relationship:`description`},open:b,onOpenChange:e=>{e&&!u&&i(),d(e&&!l)},side:`top`,collisionAvoidance:Wt,...y===null?{}:{positionAnchor:y},initialFocusRef:_,className:y===null?It:Ft,"data-testid":`ai-chat-place-popover`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[o&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`flex items-baseline justify-between gap-2 px-2 py-1.5`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`text-xs font-semibold tracking-[-0.1px] text-fg-primary`,children:a.name}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`text-caption text-fg-muted`,children:a.note})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":a.name,className:`flex flex-col gap-px`,onKeyDown:ae,children:[ce(D),/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:wk}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex max-h-60 flex-col gap-px overflow-y-auto`,"data-testid":`ai-chat-place-runners`,children:[ne.map(ce),se!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-[7px] pl-[34px] text-caption text-fg-muted`,"data-testid":`ai-chat-place-fleet-state`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:se}),n.status===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-caption text-(--color-primary-text) hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus)`,onClick:i,children:a.fleetRetry})]}),O.length>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":k,"aria-controls":g,onClick:()=>h(!k),"data-testid":`ai-chat-place-others`,className:`grid w-full cursor-pointer grid-cols-[16px_minmax(0,1fr)] items-center gap-2.5 rounded-md border-0 bg-transparent px-2 py-[7px] text-left text-caption font-medium text-fg-muted hover:bg-(--color-bg-elevated-hover) hover:text-fg-secondary focus-visible:bg-(--color-bg-elevated-hover) focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`,children:[/* @__PURE__ */ (0,Z.jsx)(fe,{"aria-hidden":`true`,className:j(`size-3.5 transition-transform duration-(--motion-short) ease-(--ease-out)`,k&&`rotate-90`)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:a.othersGroup(O.length)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:g,className:`flex flex-col gap-px`,hidden:!k,children:k&&O.map(ce)})]})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:wk}),ce(te)]})]})}),x&&/* @__PURE__ */ (0,Z.jsx)(`p`,{id:v,role:`status`,className:c===`setting`?`qa-ai-chat-sets-note`:`qa-ai-chat-place-gone m-0 flex items-start gap-1.5 text-caption leading-[1.45] text-(--color-error-text)`,"data-testid":`ai-chat-place-gone`,children:a.runnerGoneHint}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:A===void 0?``:a.chipLabel(A.title)})]})}var kk=F({id:ut(),name:P().min(1),ownerName:P().min(1),mine:$e(),lifecycle:xt(Yw),online:$e(),activeRun:F({}).loose().nullable(),activeJob:F({}).loose().nullable().optional()}),Ak=F({items:I(kk),total:N().int(),offset:N().int()});async function jk(e,t){return(await qn(t=>e.request({method:wn.agentList.method,path:wn.agentList.path(t),schema:Ak}),t)).map(e=>({id:e.id,name:e.name,ownerName:e.ownerName,mine:e.mine,block:Wn(e),occupied:Gn(e)}))}function Mk({http:e,ready:t}){let[n,r]=(0,L.useState)({status:`idle`}),[i,a]=(0,L.useState)(0),o=(0,L.useCallback)(()=>a(e=>e+1),[]);return(0,L.useEffect)(()=>{if(!t)return;let n=new AbortController;return r(e=>e.status===`ready`?e:{status:`loading`}),jk(e,n.signal).then(e=>{n.signal.aborted||r({status:`ready`,runners:e})},()=>{n.signal.aborted||r(e=>e.status===`ready`?e:{status:`failed`})}),()=>n.abort()},[t,e,i]),(0,L.useEffect)(()=>{if(!t)return;let e=()=>{document.visibilityState===`visible`&&o()};return window.addEventListener(`focus`,o),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,o),document.removeEventListener(`visibilitychange`,e)}},[t,o]),{fleet:n,reloadFleet:o}}function Nk(e,t){if(e.kind!==`runner`)return e;if(t.status!==`ready`)return{kind:`runner-unread`,agentId:e.agentId};let n=t.runners.find(t=>t.id===e.agentId);return n===void 0?{kind:`runner-gone`,agentId:e.agentId}:{kind:`runner`,runner:n}}function Pk({http:e,ready:t}){let[n,r]=(0,L.useState)(Ln),{fleet:i,reloadFleet:a}=Mk({http:e,ready:t});return{place:n,view:(0,L.useMemo)(()=>Nk(n,i),[n,i]),fleet:i,choose:r,reloadFleet:a}}function Fk(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort,maxAgents:null}}function Ik({session:e,pin:t,launchEffortForSend:n,launchPlace:r,surfaceDrivesBrowser:i}){let{place:a,reloadFleet:o}=r;return{send:(0,L.useCallback)((r,i,s)=>{if(t!==null){let n={text:r,launchEffort:Fk(t.level),place:t.place,source:i,attachments:s};return e.send(n)}a.kind===`runner`&&o();let c={text:r,launchEffort:n(),place:a,source:i,attachments:s};return e.send(c)},[e,t,n,a,o]),retryLastTurn:(0,L.useCallback)(()=>{if(t!==null){e.retryLastTurn(Fk(t.level),t.place);return}e.retryLastTurn(n(),a)},[e,t,n,a]),dockLaunchPlace:t===null?{place:r.place,view:r.view,surfaceDrivesBrowser:i}:{place:t.place,view:Nk(t.place,r.fleet),surfaceDrivesBrowser:i}}}function Lk({attachments:e}){let t=$().attachments,n=e.filter(e=>Tn(e.mediaType)),r=n.length>1?`square`:`wide`;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-msg-files`,role:`group`,"aria-label":t.message.listLabel,"data-testid":`ai-chat-message-files`,children:e.map(e=>Tn(e.mediaType)?/* @__PURE__ */ (0,Z.jsx)(Rk,{attachment:e,images:n,shape:r},e.id):/* @__PURE__ */ (0,Z.jsx)(Bk,{attachment:e},e.id))})}function Rk({attachment:e,images:t,shape:n}){let r=$().attachments.message,{openViewer:i}=$d(),{content:a,load:o}=Yd(e,!0),s=`qa-ai-chat-thumb qa-ai-chat-thumb--${n}`;switch(a.status){case`idle`:case`loading`:return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`${s} qa-ai-chat-thumb--loading`,role:`img`,"aria-busy":`true`,"aria-label":r.thumbnailLoading(e.fileName),"data-testid":`ai-chat-message-thumb-loading`});case`failed`:return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`${s} qa-ai-chat-thumb--failed`,"data-testid":`ai-chat-message-thumb-failed`,children:[/* @__PURE__ */ (0,Z.jsx)(wr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:r.thumbnailFailed}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-linkbtn`,onClick:()=>void o(),children:r.retry})]});case`ready`:return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:s,"aria-label":r.view(e.fileName),"data-testid":`ai-chat-message-thumb`,onClick:n=>i(t,t.findIndex(t=>t.id===e.id),n.currentTarget),children:[/* @__PURE__ */ (0,Z.jsx)(`img`,{src:a.url,alt:``}),n===`wide`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-thumb-zoom`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(ni,{})})]})}}function zk(e){let t=window.open(``,`_blank`);t!==null&&(t.opener=null),e().then(e=>{if(e===null){t!==null&&t.close();return}t===null?window.open(e.url,`_blank`,`noopener`):t.location.href=e.url})}function Bk({attachment:e}){let t=$().attachments,n=Q(),{content:r,load:i}=Yd(e,!1),[a,o]=(0,L.useState)(!1),s=a&&r.status===`failed`,c=()=>{if(o(!0),r.status===`ready`){window.open(r.url,`_blank`,`noopener`);return}zk(async()=>{let e=await i();return e.status===`ready`?{url:e.url}:null})},l=qd(e,n,t),u=/* @__PURE__ */ (0,Z.jsx)(Ov,{label:t.typeLabel[e.mediaType]});return s?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-filechip qa-ai-chat-filechip--fail`,"data-testid":`ai-chat-message-doc-failed`,children:[u,/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-text`,children:[/* @__PURE__ */ (0,Z.jsx)(kv,{fileName:e.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-facts`,children:l}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-why`,children:[t.message.openFailed,` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-linkbtn`,onClick:c,children:t.message.retry})]})]})]}):/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-filechip`,"aria-label":t.message.open(e.fileName),"aria-busy":r.status===`loading`,"data-testid":`ai-chat-message-doc`,onClick:c,children:[u,/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-text`,children:[/* @__PURE__ */ (0,Z.jsx)(kv,{fileName:e.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-facts`,children:l})]}),/* @__PURE__ */ (0,Z.jsx)(fn,{className:`qa-ai-chat-filechip-go`,"aria-hidden":`true`})]})}var Vk={run:`border-[color-mix(in_srgb,var(--color-primary)_40%,transparent)] bg-(--color-bg-primary-tint-15) text-fg-on-primary-tint`,wait:`border-(--color-border-warning) bg-(--color-warning-bg) text-(--color-warning-text)`,ok:`border-(--color-border-success) bg-(--color-success-bg) text-(--color-success-text)`,fail:`border-(--color-border-error) bg-(--color-error-bg) text-(--color-error-text)`,stop:`border-(--color-border) bg-(--color-bg-cancelled-tint) text-fg-muted`,queue:`border-(--color-border) bg-(--color-bg-tertiary) text-fg-secondary`},Hk={run:!0,wait:!0,ok:!1,fail:!1,stop:!1,queue:!1};function Uk({tone:e,children:t,size:n=`md`,role:r}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{role:r,"data-tone":e,className:j(`inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border border-solid px-2 font-medium`,n===`lg`?`h-6 text-xs`:`h-[22px] text-caption`,`leading-[inherit]`,Vk[e]),children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{"aria-hidden":`true`,className:j(`size-1.5 flex-none rounded-full bg-current`,Hk[e]&&`[animation:pulse-dot_var(--motion-ambient)_var(--ease-in-out)_infinite]`)}),t]})}var Wk={normal:1,thinking:2,max:3};function Gk({payload:e,copy:t,locale:n}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-1`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[t.scope(e.scopeLabel),` \u00B7`]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(Pt,{level:Wk[e.level.effort],look:`quiet`}),t.level(e.level)]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[`\u00B7 `,t.since(nk(e.createdAt,n))]})]})}function Kk(e,t,n){if(e.total===0&&(t===null||t===0))return[];let r=[{key:`findings`,value:e.total,noun:n.counts.findings(e.total)},{key:`bugs`,value:e.bugs,noun:n.counts.bugs(e.bugs)}];return t===null?e.undecided>0&&r.push({key:`undecided`,value:e.undecided,noun:n.counts.undecided(e.undecided)}):t>0&&r.push({key:`notDone`,value:t,noun:n.counts.notDone}),r}function qk({items:e}){return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-fg-secondary`,"data-testid":`workflow-block-counts`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`font-semibold text-fg-primary tabular-nums`,children:e.value}),` `,e.noun]},e.key))})}function Jk({text:e}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`grid grid-cols-[20px_minmax(0,1fr)] items-start gap-2 text-xs text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(er,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e})]})}function Yk(e,t){switch(e){case`ai.credits_insufficient`:return t.failureReason.credits;case`turn_shape`:return t.failureReason.turnShape;case`lead_internal_error`:return t.failureReason.internal;case`initiator_unavailable`:return t.failureReason.initiatorUnavailable;default:return t.failureReason.other(e)}}function Xk(e,t,n){if(e.status!==`cancelled`&&e.status!==`failed`)return null;let r=e.status===`cancelled`?t.partialCancelled(nk(e.end.endedAt,n)):t.partialFailed(Yk(e.end.failureReason,t)),{findings:i}=e;return[r,i.total===0?null:t.beforeStop(`${i.total} ${t.counts.findings(i.total)}`,i.bugs===0?null:`${i.bugs} ${t.counts.bugs(i.bugs)}`),e.end.report.summary].filter(e=>e!==null).join(` `)}function Zk({text:e,partial:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:j(`line-clamp-6 rounded-md border border-solid p-3 text-body-sm leading-[1.6] text-fg-primary`,t?`border-(--color-border) bg-(--color-bg-tertiary)`:`border-(--color-border-success) bg-(--color-success-bg)`),children:e})}var Qk={starting:`border-(--color-border)`,running:`border-(--color-border)`,awaiting:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,host_lost:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,stopping:`border-(--color-border)`,completed:`border-(--color-border-success)`,failed:`border-(--color-border-error)`,cancelled:`border-(--color-border)`};function $k(e){return{...e.actions.stopConfirm,failed:e.actions.stopFailed}}function eA(e,t,n){switch(e){case`starting`:return{text:t.launchKind===`preset`?n.preset.startingRunner:t.executorKind===`browser`?n.lead.startingBrowser:n.lead.startingRunner,need:!1};case`awaiting`:return{text:n.lead.awaiting,need:!0};case`running`:return{text:t.leadState===`active`?n.lead.active:XO(t)?n.preset.chatLeadIdle:n.lead.idle,need:!1};case`stopping`:return{text:n.lead.stopping,need:!1};case`host_lost`:case`completed`:case`failed`:case`cancelled`:return null}}function tA(e,t){switch(e){case`ai.credits_insufficient`:return t.end.failureReason.credits;case`turn_shape`:return t.end.failureReason.turnShape;case`lead_internal_error`:return t.end.failureReason.internal;case`initiator_unavailable`:return t.end.failureReason.initiatorUnavailable;default:return t.end.failureReason.other(e)}}function nA(e,t,n){let r=[];return e.scenarios!==null&&r.push(t?n.end.tallyBeforeStop(e.scenarios.done,e.scenarios.total):n.end.tally(e.scenarios.done,e.scenarios.total)),e.screensCreated>0&&r.push(n.end.screens(e.screensCreated)),r.length===0?``:`${r.join(`, `)}.`}function rA(e,t){return e.summary===null?[t.end.reportPartial]:[t.end.reportPartial,e.summary]}function iA(e,t,n){switch(e.status){case`completed`:return e.end.report.summary;case`failed`:return[tA(e.end.failureReason,t),nA(e.end.tally,!1,t),...rA(e.end.report,t)].filter(e=>e!==``).join(` `);case`cancelled`:return[t.end.cancelledBy(e.end.stoppedBy.displayName,nk(e.end.endedAt,n)),nA(e.end.tally,!0,t),...rA(e.end.report,t)].filter(e=>e!==``).join(` `);case`running`:case`stopping`:return null}}function aA({worker:e,lit:t,copy:n}){let{unit:r}=e,i=t&&e.status===`busy`,a=r===null?e.status===`opening`?n.worker.opening:e.status===`closing`?n.worker.closing:e.status===`busy`?n.worker.busy:n.worker.idle:r.kind===`atlas`?n.worker.crawl(r.title):r.title.trim()===``?n.worker.untitledScenario:r.title,o=r===null||r.progress===null?null:r.progress.kind===`make_auto`?{text:n.worker.progress(r.progress.done,r.progress.total),percent:r.progress.total===0?null:r.progress.done/r.progress.total*100}:{text:n.worker.steps(r.progress.steps),percent:null},s=r===null?null:KO[r.kind];return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`grid grid-cols-[22px_minmax(0,1fr)_auto] items-center gap-2 py-1.5 text-xs`,"data-testid":`workflow-block-worker`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-label":n.worker.name(e.ordinal),className:j(`relative grid h-[18px] w-[22px] place-items-center rounded-[4px] border-[1.3px] border-solid pt-0.5 text-micro font-semibold`,`before:absolute before:inset-x-0 before:top-[3px] before:h-px before:opacity-70 before:content-['']`,i?`border-(--color-secondary) text-(--color-primary-text) before:bg-(--color-secondary)`:`border-(--color-border-strong) text-fg-secondary before:bg-(--color-border-strong)`),children:e.ordinal}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:j(`truncate`,r===null?`text-fg-muted`:`text-fg-primary`),children:a}),r!==null&&s!==null&&/* @__PURE__ */ (0,Z.jsxs)(`small`,{className:`flex items-center gap-1.5 text-caption text-fg-muted`,children:[/* @__PURE__ */ (0,Z.jsx)(s,{"aria-hidden":`true`,className:`size-[11px]`}),n.worker.kind[r.kind],e.unitCount>1&&` \u00B7 ${n.worker.task(e.unitCount)}`]})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{children:o!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`min-w-[52px] text-right text-caption text-fg-secondary tabular-nums`,children:o.text}),o.percent!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`relative mt-1 ml-auto h-1 w-[52px] overflow-hidden rounded-full bg-(--color-progress-track) shadow-[inset_0_0_0_1px_var(--color-border-light)]`,children:/* @__PURE__ */ (0,Z.jsx)(`b`,{className:j(`block h-full rounded-[inherit] [transition:width_var(--motion-long)_var(--ease-out)]`,o.percent>=100?`bg-(--color-progress-fill-success)`:`bg-(--color-progress-fill-running)`),style:{width:`${o.percent}%`}})})]})})]})}function oA({payload:e}){let t=$().cards.workflow,n=$().errors,r=Q(),{navigation:i,browser:a}=_m(),o=Xm(e.workflowId),s=UO(e),c=WO(s),l=ZO(e,s),u=e.launchKind===`preset`&&s===`starting`&&!l?GO(`running`,e.executorKind):GO(s,e.executorKind),d=eA(s,e,t),f=iA(e,t,r),p=tk(e,a!==null),m=e.launchKind===`preset`&&p,h=a===null?`idle`:a.workflowHost.statusOf(e.workflowId),g=s===`host_lost`?e.executorKind===`agent`?t.hostLost.runner:a===null?t.hostLost.web:t.hostLost.sidePanel:null,_=o.status===`confirming`,v=e.status===`running`;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{id:`workflow-block-${e.workflowId}`,tabIndex:-1,"aria-labelledby":`workflow-block-title-${e.workflowId}`,"data-testid":`workflow-block`,"data-phase":s,className:j(`overflow-hidden rounded-lg border border-solid bg-(--color-bg-card) shadow-(--shadow-sm) [animation:scale-in_var(--motion-long)_var(--ease-out)_both] focus:outline-none`,Qk[s]),children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex items-start gap-3 px-4 pt-4 pb-3`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:j(`grid size-[34px] flex-none place-items-center rounded-md border border-solid bg-(--color-bg-tertiary) text-(--color-primary-text)`,c?`border-(--color-border-light)`:`border-[color-mix(in_srgb,var(--color-primary)_45%,transparent)] shadow-(--glow-primary)`),children:e.launchKind===`preset`?/* @__PURE__ */ (0,Z.jsx)(Kr,{className:`size-4`}):/* @__PURE__ */ (0,Z.jsx)(Pr,{className:`size-4`})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0 grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{id:`workflow-block-title-${e.workflowId}`,className:`text-sm leading-[1.3] font-semibold tracking-[-0.25px] text-fg-primary`,children:e.launchKind===`preset`?t.topic(e.topic):t.title[e.launchKind]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mt-0.5 text-caption text-fg-muted`,children:e.launchKind===`preset`?/* @__PURE__ */ (0,Z.jsx)(Gk,{payload:e,copy:t.preset,locale:r}):t.subtitle(t.topic(e.topic),e.maxAgents,nk(e.createdAt,r))})]}),/* @__PURE__ */ (0,Z.jsx)(Uk,{tone:l?`wait`:u.tone,role:`status`,children:l?t.preset.pillAwaitingBrowser:t.pill[u.label]})]}),e.launchKind===`preset`&&/* @__PURE__ */ (0,Z.jsx)(cA,{payload:e,phase:s,lead:d,sidePanel:a!==null,copy:t,locale:r}),e.launchKind!==`preset`&&d!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:j(`mx-4 flex items-center gap-2 rounded-md px-3 py-2 text-xs`,d.need?`bg-(--color-warning-bg) text-fg-primary`:`bg-(--color-bg-modal-inset) text-fg-secondary`),children:[d.need?/* @__PURE__ */ (0,Z.jsx)(dr,{"aria-hidden":`true`,className:`size-3.5 text-(--color-warning-text)`}):/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 flex-none rounded-full bg-(--color-secondary) [animation:var(--animation-pulse-dot)]`}),d.text]}),g!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,className:`mx-4 mb-3 flex items-start gap-2 rounded-md border border-solid border-(--color-border-warning) bg-(--color-warning-bg) p-3 text-xs leading-normal text-fg-primary`,children:[/* @__PURE__ */ (0,Z.jsx)(D,{"aria-hidden":`true`,className:`mt-px size-3.5 flex-none text-(--color-warning-text)`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{children:g})]}),e.launchKind!==`preset`&&!c&&s!==`stopping`&&/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`mt-3 mb-0 flex list-none flex-col gap-1 px-4 pb-3`,children:s===`starting`&&e.workers.length===0?/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`grid grid-cols-[22px_minmax(0,1fr)_auto] items-center gap-2 py-1.5 text-xs`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-[18px] w-[22px] place-items-center rounded-[4px] border-[1.3px] border-solid border-(--color-border-strong) text-micro text-fg-secondary`,children:`\u00B7`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`min-w-0 truncate text-fg-muted`,children:e.executorKind===`browser`?t.startingRow.browser:t.startingRow.runner}),/* @__PURE__ */ (0,Z.jsx)(`div`,{})]}):e.workers.map(e=>/* @__PURE__ */ (0,Z.jsx)(aA,{worker:e,lit:s!==`host_lost`,copy:t},e.ordinal))}),e.launchKind!==`preset`&&f!==null&&f!==``&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`mx-4 mt-0 mb-3 line-clamp-4 text-xs leading-[1.6] text-fg-secondary`,children:f}),/* @__PURE__ */ (0,Z.jsx)(Zm,{state:o,words:e.launchKind===`preset`?t.preset.stopConfirm:$k(t)}),h===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsx)(vm,{children:n.byCode[`client.workflow_host_action_failed`]})}),!_&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-0 border-t border-solid border-(--color-border-light) bg-(--color-bg-tertiary) py-2 pr-3 pl-4`,children:[m&&/* @__PURE__ */ (0,Z.jsx)(sA,{resuming:h===`resuming`,onResume:()=>a==null?void 0:a.workflowHost.attach(e.workflowId),label:t.actions.resume}),!m&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(fn,{size:14}),onClick:()=>i.openPath(e.deeplink),children:s===`completed`||e.launchKind===`preset`&&c?t.actions.openReport:e.launchKind===`preset`?t.actions.openLaunch:t.actions.open}),v&&/* @__PURE__ */ (0,Z.jsx)(C,{variant:`danger-ghost`,size:`xs`,className:e.launchKind===`preset`?`ml-auto`:void 0,icon:/* @__PURE__ */ (0,Z.jsx)(Jr,{size:14}),loading:o.status===`stopping`,disabled:o.status===`stopping`,onClick:o.ask,"data-testid":`workflow-block-stop`,children:t.actions.stop}),p&&!m&&/* @__PURE__ */ (0,Z.jsx)(sA,{className:`ml-auto`,resuming:h===`resuming`,onResume:()=>a==null?void 0:a.workflowHost.attach(e.workflowId),label:t.actions.resume})]})]})}function sA({className:e,resuming:t,onResume:n,label:r}){return/* @__PURE__ */ (0,Z.jsx)(C,{variant:`primary`,size:`xs`,...e!==void 0&&{className:e},icon:/* @__PURE__ */ (0,Z.jsx)(Ir,{size:14}),loading:t,disabled:t,onClick:n,"data-testid":`workflow-block-resume`,children:r})}function cA({payload:e,phase:t,lead:n,sidePanel:r,copy:i,locale:a}){let o=ZO(e,t),s=e.status===`completed`?e.end.report.notDone:null,c=e.status===`cancelled`||e.status===`failed`?[]:Kk(e.findings,s,i.preset),l=Xk(e,i.preset,a);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 px-4 pb-3 text-xs text-fg-secondary`,children:[o?/* @__PURE__ */ (0,Z.jsx)(Jk,{text:r?i.preset.awaitingBrowser.sidePanel:i.preset.awaitingBrowser.web}):n!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`grid grid-cols-[20px_minmax(0,1fr)] items-start gap-2`,children:[n.need?/* @__PURE__ */ (0,Z.jsx)(dr,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-(--color-warning-text)`}):/* @__PURE__ */ (0,Z.jsx)(Kr,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:n.need?`text-fg-primary`:void 0,children:n.text})]}),/* @__PURE__ */ (0,Z.jsx)(qk,{items:c}),e.status===`completed`&&/* @__PURE__ */ (0,Z.jsx)(Zk,{text:e.end.report.summary,partial:!1}),l!==null&&/* @__PURE__ */ (0,Z.jsx)(Zk,{text:l,partial:!0})]})}function lA(e){if(e===void 0)return null;let t=e.trim();return t===``?null:t}function uA({block:e,locked:t,stopping:n,resolved:r,onStopWaiting:i}){let a=$().shell.runWait,{commandFailures:o}=_m(),{status:s,subjects:c,toolCallId:l}=e.payload,u=bm(o,l),d=u[u.length-1],f=s===`waiting`||s===`fired`,p=s===`waiting`||s===`fired`||s===`running`;return/* @__PURE__ */ (0,Z.jsxs)(Zp,{icon:/* @__PURE__ */ (0,Z.jsx)(Cr,{size:16}),title:a.title,tileTone:p?`info`:s===`done`?`success`:`muted`,meta:/* @__PURE__ */ (0,Z.jsx)($p,{tone:p?`info`:s===`done`?`success`:`neutral`,role:`status`,"aria-live":`polite`,children:a.status[s]}),data:{"data-run-wait-status":s},footer:f&&!r?/* @__PURE__ */ (0,Z.jsx)(sm,{children:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ar,{size:14}),disabled:t,loading:n,onClick:()=>i(l),children:a.stopWaiting})}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(im,{children:c.map(e=>{let t=lA(e.label);return/* @__PURE__ */ (0,Z.jsx)(am,{name:t===null?a.subject[e.kind]:t,note:t===null?a.id(e.id):`${a.subject[e.kind]} \u00B7 ${a.id(e.id)}`},`${e.kind}:${e.id}`)})}),f&&!r&&d!==void 0&&/* @__PURE__ */ (0,Z.jsx)(vm,{children:a.stopWaitingFailed})]})}function dA({text:e,isStreaming:t}){let n=(0,L.useMemo)(()=>Ai(e,{cache:!t}),[e,t]);return/* @__PURE__ */ (0,Z.jsx)(`div`,{dangerouslySetInnerHTML:{__html:n}})}var fA={scenario:`folded`,"runner-readiness":`folded`,report:`folded`,coverage:`folded`,search:`folded`,"change-set":`open-until-decided`,"job-status":`open`,"run-start-agent":`open`,"run-in-tab-outcome":`open`,"section-link":`open`,"runner-enrollment":`open`,references:`open`},pA=8,mA={running:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--running`,done:`qa-ai-chat-acts__tick`,failed:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--failed`,unknown:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--unknown`};function hA({chips:e}){let t=e.slice(0,pA);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-acts__ticks`,"aria-hidden":`true`,children:[t.map(e=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:mA[e.status]},e.key)),e.length>pA&&/* @__PURE__ */ (0,Z.jsx)(`em`,{children:`+${String(e.length-pA)}`})]})}function gA({status:e}){switch(e){case`running`:return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__spin`,"aria-hidden":`true`});case`done`:return/* @__PURE__ */ (0,Z.jsx)(we,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`});case`failed`:return/* @__PURE__ */ (0,Z.jsx)(pr,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`});case`unknown`:return/* @__PURE__ */ (0,Z.jsx)(dr,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`})}}function _A({chip:e,copy:t}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ai-chat-chip qa-ai-chat-chip--${e.status}`,"data-tool-name":e.toolName,"data-tool-title-state":e.titleAbsent?`absent`:`present`,"data-tool-outcome":e.status,children:[/* @__PURE__ */ (0,Z.jsx)(gA,{status:e.status}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__label`,children:e.label}),e.status===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__why`,children:t.failed}),e.status===`unknown`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__why`,children:t.unknown}),e.count>1&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__rep`,children:`\u00D7${String(e.count)}`})]})}function vA({activity:e,copy:t,showZeroDone:n}){let r=n||e.done>0;return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-acts__tally`,children:[r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub`,children:` ${t.doneShort(e.done)}`}),e.failed>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub`,children:`,`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub qa-ai-chat-acts__sub--error`,children:` ${t.failedShort(e.failed)}`})]})]})}function yA({activity:e,thinkingWord:t,copy:n}){let[r,i]=(0,L.useState)(!1),a=Gp(),o=(0,L.useId)(),{chips:s,phase:c}=e,l=s.length,u=e.failed+e.unknown>0?n.doneOf(e.done,l):n.done(l),d,f;switch(c.kind){case`running`:d=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-acts__lead qa-ai-chat-acts__sheen`,children:c.chip.label}),/* @__PURE__ */ (0,Z.jsx)(vA,{activity:e,copy:n,showZeroDone:!1})]}),f=n.running(c.chip.label);break;case`between`:d=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-acts__lead qa-ai-chat-acts__sheen`,children:t}),/* @__PURE__ */ (0,Z.jsx)(vA,{activity:e,copy:n,showZeroDone:!0})]}),f=n.done(e.done);break;case`finished`:d=/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__lead`,children:u}),f=u}return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-acts`,"data-testid":`ai-chat-activity-line`,"data-phase":c.kind,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-acts__row`,"aria-expanded":r,"aria-controls":o,onClick:()=>{a(),i(e=>!e)},children:[/* @__PURE__ */ (0,Z.jsx)(hA,{chips:s}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__text`,children:d}),c.kind===`finished`&&e.failed>0&&/* @__PURE__ */ (0,Z.jsx)(D,{className:`qa-ai-chat-acts__mark qa-ai-chat-acts__mark--error`,"aria-hidden":`true`}),c.kind===`finished`&&e.failed===0&&e.unknown>0&&/* @__PURE__ */ (0,Z.jsx)(dr,{className:`qa-ai-chat-acts__mark`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(ee,{className:`qa-ai-chat-acts__chevron`,"aria-hidden":`true`})]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,role:`status`,children:f}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-acts__panel`,id:o,hidden:!r,children:s.map(e=>/* @__PURE__ */ (0,Z.jsx)(_A,{chip:e,copy:n},e.key))})]})}function bA(e,t,n){if(!t.has(e.id))return n?`running`:`unknown`;let r=t.get(e.id);return Ky(r)?`failed`:qy(r)?`unknown`:`done`}function xA(e,t,n){let r=new Map(e.toolResults.map(e=>[e.toolCallId,e.result])),i=[],a=null;for(let o of e.toolCalls){let e=bA(o,r,t.live),s=n(o),c=e===`running`?void 0:i.find(t=>t.label===s&&t.status===e);if(c!==void 0){c.count+=1;continue}let l={key:o.id,label:s,titleAbsent:o.title===void 0,toolName:o.toolName,status:e,count:1};i.push(l),e===`running`&&(a=l)}let o=e=>i.filter(t=>t.status===e).length;return{chips:i,phase:a===null?t.live&&t.lastAndWorking?{kind:`between`}:{kind:`finished`}:{kind:`running`,chip:a},done:o(`done`),failed:o(`failed`),unknown:o(`unknown`)}}var SA=class extends L.Component{constructor(...e){super(...e),this.state={failed:!1,attempt:0}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){this.props.logger.error(`chat card group failed to render`,{group:this.props.groupKey,error:e.message,componentStack:t.componentStack===null?null:t.componentStack})}render(){if(!this.state.failed)return/* @__PURE__ */ (0,Z.jsx)(CA,{children:this.props.children},this.state.attempt);let{copy:e}=this.props;return/* @__PURE__ */ (0,Z.jsx)(ME,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Rr,{}),role:`alert`,title:e.title,text:e.text,actions:/* @__PURE__ */ (0,Z.jsx)(C,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:14}),onClick:()=>this.setState(e=>({failed:!1,attempt:e.attempt+1})),children:e.retry}),testId:`ai-chat-cards-failed`})}};function CA({children:e}){return e}function wA(e,t){e.set(t.key,t)}function TA(e,t){let n=new Map((e.toolCalls===void 0?[]:e.toolCalls).map(e=>[e.id,e])),r=/* @__PURE__ */ new Map;t.forEach((e,t)=>{for(let n of e.toolCalls)r.set(n.id,t)});let i=/* @__PURE__ */ new Map;for(let t of e.toolResults===void 0?[]:e.toolResults){let e=n.get(t.toolCallId),a=r.get(t.toolCallId);if(e===void 0||a===void 0){wA(i,{kind:`unsupported`,key:`orphan:${t.toolCallId}`,placement:{kind:`after`},resultKind:Jy(t.result)});continue}let o=$E(t.result);if(o===null)continue;let s=o.family,c={call:{toolCallId:e.id,toolName:e.toolName,title:e.title,args:e.args},raw:t.result},l=o.grouping===`step`?`${s}@step${String(a)}`:`${s}@turn`,u=i.get(l);if(u!==void 0&&u.kind===`family`){u.inputs.push(c);continue}wA(i,{kind:`family`,key:l,family:s,placement:o.grouping===`message`?{kind:`after`}:{kind:`step`,index:a},inputs:[c]})}let a=(e.blocks===void 0?[]:e.blocks).flatMap(e=>e.kind===`job_status`?[{call:null,raw:e.payload}]:[]);a.length>0&&wA(i,{kind:`family`,key:`job-status@turn`,family:`job-status`,placement:{kind:`after`},inputs:a});let o=(e.toolResults??[]).flatMap(e=>{let t=Uy(e.result);return t===void 0?[]:t});return o.length>0&&wA(i,{kind:`family`,key:`references@turn`,family:`references`,placement:{kind:`after`},inputs:[{call:null,raw:o}]}),[...i.values()]}function EA({copy:e,locale:t,logger:n}){let r=e.shell.transcript,i=e=>[e.title===void 0?r.toolCall:e.title[t],...e.operationTitles===void 0?[]:e.operationTitles.map(e=>e[t])].join(` \u00B7 `),a=e=>{let t=e.kind===`unsupported`?/* @__PURE__ */ (0,Z.jsx)(sg,{title:r.unknownTool.title,body:r.unknownTool.body,family:`orphan`,resultKind:e.resultKind}):/* @__PURE__ */ (0,Z.jsx)(Vp,{mode:fA[e.family],children:DE[e.family].group(e.inputs,e.key)});return/* @__PURE__ */ (0,Z.jsx)(SA,{groupKey:e.key,copy:r.cardsFailed,logger:n,children:t},e.key)};return{cards(e,t){let n=t.map(()=>[]),r=[];for(let o of TA(e,t)){var i;let e=a(o);o.placement.kind===`after`?r.push(e):(i=n[o.placement.index])==null||i.push(e)}return{atStep:n.map(e=>e.length===0?null:e),afterProse:r.length===0?null:r}},activityLine(e,t){let n=xA(e,t,i);return n.chips.length===0?null:/* @__PURE__ */ (0,Z.jsx)(yA,{activity:n,thinkingWord:r.thinkingPhase,copy:r.activity})}}}function DA(e){let{copy:t,locale:n,logger:r,isStreaming:i,questions:a,confirmedCalls:o,answeredGrants:s,pendingHostCallIds:c,stoppingHostCallIds:l,refusalSentence:d,onStopWaiting:p,runWaitLocked:m,decisionProgress:h,answeredToolCallIds:g,aiTaskBlockIds:_,hiddenWorkflowId:v,conversationId:y,openConversation:b}=e,x=h!==null&&h.current!==null?h.current.toolCallId:null,S=(0,L.useMemo)(()=>EA({copy:t,locale:n,logger:r}),[t,n,r]);return(0,L.useMemo)(()=>({content:e=>/* @__PURE__ */ (0,Z.jsx)(dA,{text:e,isStreaming:i}),cards:S.cards,activityLine:S.activityLine,activity:null,blocks:e=>{var t;let n=(e.blocks??[]).filter(e=>!u(e)).filter(e=>Hg(e)!==null||je(e)&&!ak(e.payload.subjects,_)||f(e)&&e.payload.workflowId!==v),r=((t=a.loadingAssistantMessageIds)==null?void 0:t.includes(e.id))===!0;return n.length===0&&!r?null:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length===0&&r&&/* @__PURE__ */ (0,Z.jsx)(o_,{loading:!0,controller:a}),n.map(e=>{let t=Hg(e);return t===null?je(e)?/* @__PURE__ */ (0,Z.jsx)(uA,{block:e,locked:m,stopping:x===e.payload.toolCallId,resolved:g.includes(e.payload.toolCallId),onStopWaiting:p},e.id):f(e)?/* @__PURE__ */ (0,Z.jsx)(oA,{payload:e.payload},e.id):null:/* @__PURE__ */ (0,Z.jsx)(o_,{batch:t,controller:a,placement:`transcript`},e.id)})]})},confirmedLine:e=>OE({message:e,conversationId:y,confirmedCalls:o,copy:t.cards.runStartAgent,refusalSentence:d,pendingHostCallIds:c,stoppingHostCallIds:l,waitingForBrowser:t.shell.transcript.toolCallStatus.waitingForBrowser,stoppingBrowser:t.shell.transcript.toolCallStatus.stoppingBrowser}),answersLeadGrant:e=>e.answersLeadGrant===!0||s.has(e.id),openConversation:b,attachments:e=>e.attachments===void 0?null:/* @__PURE__ */ (0,Z.jsx)(Lk,{attachments:e.attachments})}),[_,v,s,g,o,y,b,c,l,t,i,p,a,d,S,m,x])}var OA=`[data-testid="ai-chat-dock-stack"]`,kA=`:is(input, textarea, button)`,AA=`${kA}:not([disabled])`;function jA(e){let{request:t,consoleRef:n,historyReady:r,focusComposer:i}=e,a=(0,L.useRef)(0);(0,L.useEffect)(()=>{var e;if(t===void 0||t===0||t===a.current||!r)return;a.current=t;let o=(e=n.current)==null?void 0:e.querySelector(OA),s=o==null?[]:[...o.children],c=s.find(e=>e.querySelector(AA)!==null);if(c instanceof HTMLElement){var l;c.scrollIntoView({block:`nearest`,behavior:`smooth`}),(l=c.querySelector(AA))==null||l.focus({preventScroll:!0});return}let u=s.find(e=>e.querySelector(kA)!==null);if(u instanceof HTMLElement){u.scrollIntoView({block:`nearest`,behavior:`smooth`});return}i()},[t,r,n,i])}function MA({host:e,focusRequest:t}){let n=b_(e.locale),r=WD(e);return r===null?null:/* @__PURE__ */ (0,Z.jsx)(Hd,{locale:n,children:/* @__PURE__ */ (0,Z.jsx)(NA,{host:e,runtime:r,openCardFocusRequest:t})})}function NA({host:e,runtime:t,openCardFocusRequest:n}){let r=$(),i=r.shell,{session:a}=t,o=GD(t),{chat:s}=o;KD(e.leaveGuard,o.unsentTurns);let c=Q(),l=b_(e.project),d=b_(e.readiness),f=b_(e.visibility),p=S_(e.browser===null?null:e.browser.activeTabUrl),[m,h]=(0,L.useState)(``),[g,_]=(0,L.useState)(0),[v,y]=(0,L.useState)(!1),[b,x]=(0,L.useState)(!1),[S,C]=(0,L.useState)(0),{register:w,dockEntries:T,tether:ee,focusRequest:E,focusComposer:D}=df({chat:s}),te=ff({chat:s,decisionProgress:o.decisionProgress}),ne=l===null?null:l.id;(0,L.useEffect)(()=>{a.setProject(ne)},[ne,a]);let O=d.kind===`ready`;(0,L.useEffect)(()=>{O&&a.reloadCapabilities()},[O,a]);let{capabilityChanges:re}=e;(0,L.useEffect)(()=>{if(O&&re!==null)return re.subscribe(()=>a.reloadCapabilities())},[O,re,a]);let k=YD({session:a,store:e.modelSelection,capabilityLoad:o.capabilityLoad}),A=jE({runtime:t,source:e.conversationContext,conversationId:o.conversationId}),ie=yy(s.messages),ae=GE({transport:e.transport,stopOutcomes:t.stopOutcomes,conversationId:o.conversationId,messages:s.messages,confirmedCalls:ie.confirmedCalls,historyLoading:o.historyLoad.status===`loading`}),oe=ae.pendingIds,{forgetResolvedConfirmations:se}=ie;(0,L.useEffect)(()=>{se()},[o.conversationId,se]);let ce=iO({transport:e.transport,logger:e.logger,conversationId:o.conversationId,recordResolvedConfirmation:ie.recordResolvedConfirmation}),j=Sk({conversationId:o.conversationId,historyLoad:o.historyLoad,launchLevels:t.launchLevels,capabilityLoad:o.capabilityLoad}),le=e.conversationPin,ue=le!==null,de=S_(le===null?null:le.placeholder),fe=Pk({http:e.http,ready:O}),pe=tO({session:a,conversationId:o.conversationId,messages:s.messages,restoredBatchIds:o.restoredQuestionBatchIds,locale:c,logger:e.logger}),{forSend:me}=j,{send:he,retryLastTurn:ge,dockLaunchPlace:_e}=Ik({session:a,pin:le,launchEffortForSend:me,launchPlace:fe,surfaceDrivesBrowser:e.browser!==null}),ve=(0,L.useCallback)(()=>{ae.markStopping(),a.stop()},[ae.markStopping,a]),ye=(0,L.useCallback)(e=>{x(!1),a.openConversation(e)},[a]),{resetNewConversation:be}=j,xe=(0,L.useCallback)(()=>{x(!1),h(``),C(e=>e+1),be(),a.startNewConversation()},[a,be]),Se=o.decisionProgress,Ce=Ui(s)||Se!==null,we=s.answeredToolCallIds,Te=(0,L.useMemo)(()=>({subscribe:t=>e.transport.subscribe(e=>{e.kind===`task-card`&&t(e.event)})}),[e.transport]),Ee=vk(e.browser),De=gk({http:e.http,logger:e.logger,active:Ee!==null&&d.kind===`ready`,projectId:ne,visible:f,conversationId:o.conversationId}),Oe=(0,L.useMemo)(()=>({project:l,navigation:e.navigation,http:e.http,conversation:{send:e=>{he(e,`external`,[])},setDraft:h,changeSetDecision:{register:w,decide:(e,t)=>{t===`confirm`?a.confirmChangeSet(e):a.rejectChangeSet(e)},isLocked:te,progress:Se,isResolved:e=>we.includes(e),tether:ee}},browser:e.browser===null||Ee===null?null:{runFailures:o.browserRunFailures,workflowHost:Ee},secretInput:e.secretInput,commandFailures:o.commandFailures,taskEvents:Te,jobStatus:t.jobStatus,dispatchRefusalSentence:e.dispatchRefusalSentence,logger:e.logger}),[e,l,t.jobStatus,te,Se,we,ee,w,a,he,o.browserRunFailures,o.commandFailures,Te,Ee]),ke=(0,L.useMemo)(()=>/* @__PURE__ */ new Set([...s.pendingConfirmations.map(e=>e.toolCallId),...s.answeredToolCallIds]),[s.answeredToolCallIds,s.pendingConfirmations]),[Ae]=(0,L.useState)(_O),je=(0,L.useMemo)(()=>Ae(s.messages,ke),[Ae,s.messages,ke]),Me=(0,L.useCallback)(e=>a.rejectRunWait(e),[a]),Ne=kE(s.pendingConfirmations,ie.confirmedCalls),{aiTaskBlockIds:Pe,hiddenWorkflowId:Fe,workflowStatusOf:Ie}=_k(s.messages,le),Le=DA({copy:r,locale:c,logger:e.logger,isStreaming:s.isStreaming,questions:pe,confirmedCalls:ie.confirmedCalls,answeredGrants:Ne,pendingHostCallIds:oe,stoppingHostCallIds:ae.stoppingIds,refusalSentence:e.dispatchRefusalSentence,onStopWaiting:Me,runWaitLocked:Ce,decisionProgress:Se,answeredToolCallIds:s.answeredToolCallIds,aiTaskBlockIds:Pe,hiddenWorkflowId:Fe,conversationId:o.conversationId,openConversation:ye}),Re=(0,L.useMemo)(()=>fO({errors:r.errors,classes:i.errors.classes}),[r.errors,i.errors.classes]),ze=s.error===null?null:s.error.errorCode??null;(0,L.useEffect)(()=>{ze!==null&&Gl.has(ze)&&a.reloadCapabilities()},[ze,a]);let Be=(0,L.useMemo)(()=>{if(s.error===null)return null;let e=Kl(s.error);return e.errorCode!==null&&Wl.has(e.errorCode)||e.errorCode===`chat.busy`&&v?null:{error:e,presentation:Re(e),onRetry:ge}},[v,s.error,Re,ge]),Ve=(0,L.useMemo)(()=>({byline:i.header.title,thinking:{thinking:i.transcript.thinking,thoughtFor:i.transcript.thoughtFor},thinkingPhase:i.transcript.thinkingPhase,toolCallCancelled:i.transcript.toolCallCancelled,toolCallStatus:i.transcript.toolCallStatus,copyAnswer:i.transcript.copyAnswer,retry:i.transcript.retry,details:i.transcript.details,feedLabel:i.transcript.feedLabel,scrollToBottom:i.transcript.scrollToBottom,leadProse:{byline:ue?i.transcript.taskLeadByline:i.transcript.leadByline,formatTime:e=>Ib(e,c)}}),[i,c,ue]),He=je.length===0&&!s.isStreaming&&o.historyLoad.status!==`loading`?__({report:A.report,copy:i,locale:c}):null,Ue=(0,L.useRef)(null);jA({request:n,consoleRef:Ue,historyReady:o.conversationId!==null&&o.historyLoad.status===`idle`,focusComposer:D});let We=[...s.messages.flatMap(e=>e.blocks??[]),...Object.values(s.pendingMessageBlocks).flat()].filter(u).flatMap(e=>{let t=Hg(e);return t===null?[]:[t]}),Ge=e=>{var t,n;let r=We.find(t=>t.origin===`agent`&&t.asker.kind===`workflow`&&t.asker.id===e&&t.assumption===null);if(r===void 0)return;let i=((t=Ue.current)==null?void 0:t.querySelectorAll(`[data-testid="ai-chat-dock"] [data-asker-kind="workflow"]`))??[],a=Array.from(i).find(t=>t.dataset.askerId===e&&t.dataset.questionBatchId===r.id);a!==void 0&&(a.scrollIntoView({block:`nearest`,behavior:`smooth`}),(n=a.querySelector(`:is(input, textarea, button):not([disabled])`))==null||n.focus({preventScroll:!0}))},M=ql(s.messages),Ke=!s.isStreaming&&(o.canRecoverDanglingTurn||ze===`assistant.recover_last_message`),qe=o.commandFailures.filter(e=>e.command===`chat-stop`),Je=qe[qe.length-1],Ye=A.report===null?null:/* @__PURE__ */ (0,Z.jsx)(AE,{label:i.context.report.label,icon:/* @__PURE__ */ (0,Z.jsx)(cr,{}),title:p_(A.report.context,i.context.report),tags:m_(A.report,i.context.report),note:i.context.report.note,testId:`ai-chat-report-context`}),N=o.isComposerInteractive&&d.kind===`ready`,Xe=o.conversationId===null&&o.permissionMode.kind===`unknown`,P=N&&!Xe,Ze=Ea(s),Qe=o.canSendChatTurn&&!Ze,$e=ZD({session:a,view:o.permissionMode,ready:N,newConversation:o.conversationId===null,visible:f}),et=o.capabilityLoad.status===`ready`?o.capabilityLoad.value:null,tt=et===null?null:En(et,o.modelSelectionId,ce),nt=Dv({host:e,projectId:ne,model:tt===null?null:tt.model,resetKey:S,accepting:P&&le===null}),rt=/* @__PURE__ */ (0,Z.jsx)(k_,{capabilities:o.capabilityLoad,selectionId:o.modelSelectionId,onSelect:k,resolvedEcho:ce,overrideRejected:o.modelSelectionRejected!==null,isStreaming:s.isStreaming,onManageKeys:()=>e.navigation.openPath(j_(`ai-keys`)),onUpgrade:()=>e.navigation.openPath(j_(`billing-plan`)),openRequest:nt.modelListRequest,flagged:nt.modelFlagged});return/* @__PURE__ */ (0,Z.jsx)(gm,{value:Oe,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-panel`,"data-testid":`ai-chat`,...nt.drop.handlers,children:/* @__PURE__ */ (0,Z.jsxs)(ef,{http:e.http,logger:e.logger,conversationId:o.conversationId,children:[e.chrome===null?null:e.chrome.resizeHandle,/* @__PURE__ */ (0,Z.jsx)(C_,{projectName:l===null?null:l.name,pinned:e.conversationPin,historyOpen:b,historyAvailable:l!==null,onOpenHistory:()=>x(!0),onNewConversation:xe,hostActions:e.chrome===null?null:e.chrome.headerActions,copy:i.header}),Ee!==null&&/* @__PURE__ */ (0,Z.jsx)(lk,{launches:De.launches,messages:s.messages,workflowHost:Ee,openPath:t=>e.navigation.openPath(t),onAttachSettled:De.reread}),/* @__PURE__ */ (0,Z.jsx)(ZE,{connection:{connectionStatus:o.connectionStatus,labels:{reconnecting:i.connection.reconnecting,restored:i.connection.restored,failedTitle:i.connection.failedTitle,failedText:i.connection.failedHint[e.connectionFailedHint]}},readiness:d,capabilities:Yl(o.capabilityLoad),onReloadCapabilities:()=>a.reloadCapabilities(),unsent:{turns:o.unsentTurns,canSend:Qe,onSend:e=>{a.sendUnsentTurn(e)},onDiscard:e=>a.discardUnsentTurn(e),cause:ze===Ul?r.errors.byCode[Ul]:null,filesOf:cf({models:et,locale:c,copy:r.attachments,logger:e.logger})},interruptedTurnId:Ke?M:null,reportInitializing:ze===`reports.projection_not_initialized`,onRetryLastTurn:ge,historyFailed:o.historyLoad.status===`failed`&&!o.historyLoad.notFound,onRetryHistory:()=>{o.historyLoad.status===`failed`&&a.openConversation(o.historyLoad.conversationId)},stopFailure:Je===void 0?null:Je,permissionWriteFailure:$e.failure,permissionReadFailure:$e.readFailure,pageScan:e.browser===null?null:{status:o.pageAnalysis.status,failureReason:o.pageAnalysis.failureReason,tabUrl:p},context:Ye,copy:i}),/* @__PURE__ */ (0,Z.jsx)(HO,{messages:je,isStreaming:s.isStreaming,liveThinkingText:s.thinkingText,awaitingConfirmation:s.pendingConfirmations.length>0,error:Be,empty:He===null?null:/* @__PURE__ */ (0,Z.jsx)(y_,{welcome:He,draft:m,onSend:e=>{he(e,`external`,[])},onInsert:e=>{h(e),_(e=>e+1)}}),renderers:Le,copy:Ve,presentError:Re}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-console`,ref:Ue,children:[/* @__PURE__ */ (0,Z.jsx)(ck,{messages:s.messages,workflowHost:Ee,onToQuestion:Ge}),/* @__PURE__ */ (0,Z.jsx)(c_,{regionLabel:i.confirmation.regionLabel,conversationId:o.conversationId,questions:We,questionController:pe,changeSets:T,isDecisionLocked:te,decisionProgress:Se,onChangeSetDecision:(e,t)=>{t===`confirm`?a.confirmChangeSet(e):a.rejectChangeSet(e)},onConfirmAll:(e,t)=>a.confirmAll([...e,...t],t),changeSetTether:ee,onFocusComposer:D,launchPlace:_e,projectId:ne,workflowStatusOf:Ie,confirmation:s.pendingConfirmations.length>0?{items:s.pendingConfirmations,onConfirm:(e,t)=>a.confirm(e,t),onReject:e=>a.reject(e)}:null}),/* @__PURE__ */ (0,Z.jsx)(nf,{messages:je,model:tt===null?null:tt.model,onPickModel:nt.openModelList}),/* @__PURE__ */ (0,Z.jsx)(iy,{draft:m,onDraftChange:h,isStreaming:Ze,pendingHostAction:oe.size>0,interactive:P,placeholder:Jl(d,o,i.composer,de),errorCode:ze,send:he,stop:ve,autoFocus:f,fillRequest:g,focusRequest:E,chips:le===null?{modelPicker:rt,effortChip:/* @__PURE__ */ (0,Z.jsx)(nn,{choice:j.choice,facts:j.facts,onChoose:j.choose,onAgentsChange:j.setAgents,onOpenSettings:()=>e.navigation.openPath(j_(`ai-keys`)),copy:i.composer.effort,look:{kind:`setting`,chipMaxShort:i.composer.effort.chipMaxShort}}),placeChip:/* @__PURE__ */ (0,Z.jsx)(Ok,{place:fe.place,view:fe.view,fleet:fe.fleet,onChoose:fe.choose,onOpen:fe.reloadFleet,copy:i.composer.place,heading:!0,thisBrowserReach:e.browser===null?`tasks_only`:`opens_windows`,look:`setting`}),permission:$e.composer,attachments:nt.attachments,onPickModel:nt.openModelList}:null,onBusyChainChange:y,copy:i.composer}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,"aria-live":`polite`,"data-testid":`ai-chat-permission-live`,children:$e.announced===null?``:i.composer.permission.arrived(i.composer.permission[$e.announced])})]}),nt.drop.active&&/* @__PURE__ */ (0,Z.jsx)(M_,{copy:i.composer.attachments.drop}),b&&l!==null&&e.conversationPin===null&&/* @__PURE__ */ (0,Z.jsx)(UE,{http:e.http,logger:e.logger,projectId:l.id,currentConversationId:o.conversationId,locale:c,copy:i.history,dismissLabel:i.notices.dismiss,onClose:()=>x(!1),onOpen:ye,onNewConversation:xe})]})})})}var PA=`scenarios.not_auto_runnable`;function FA(e,t){if(!(t instanceof We)||t.errorCode===void 0)return e(`hub.actions.runner.errors.dispatch`);if(t.errorCode===PA)return VA(t.params);if(t.errorCode===`agents.queue_full`){var n,r;let i=UA((n=t.params)==null?void 0:n.limit),a=UA((r=t.params)==null?void 0:r.queued);return i===null||a===null?e(`hub.actions.runner.errors.queueFullGeneric`):e(`hub.actions.runner.errors.queueFull`,{limit:i,queued:a})}let i=zA[t.errorCode];return e(i===void 0?`hub.actions.runner.errors.dispatch`:i)}function IA(e,t){if(t.error_code===PA)return VA(t.params);let n=BA[t.error_code];return e(n===void 0?`hub.actions.runner.rejections.unknown`:n)}function LA(e){return e.some(e=>{var t;return e.error_code===PA&&((t=HA(e.params))==null?void 0:t.status)===`needs_binding`})}function RA(e){let t={isUnassigned:!1,hasUnboundElementSteps:!1,hasUnlockedTextSteps:!1};if(e.length===0)throw Error(`a \u00AB\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E\u00BB offer was worded for no refused position`);for(let n of e){let e=n.error_code===PA?HA(n.params):null;if(e===null||e.status!==`needs_binding`)throw Error(`a \u00AB\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E\u00BB offer carries a reason that is not a needs_binding refusal: ${n.error_code}`);t.isUnassigned||=e.causes.isUnassigned,t.hasUnboundElementSteps||=e.causes.hasUnboundElementSteps,t.hasUnlockedTextSteps||=e.causes.hasUnlockedTextSteps}return gf(t,me())}var zA={"scenarios.not_found":`hub.actions.runner.errors.scenarioMissing`,"agents.not_found":`hub.actions.runner.errors.agentMissing`,"agents.not_owner":`hub.actions.runner.errors.notOwner`,"agents.offline":`hub.actions.runner.errors.offline`,"environments.not_found":`hub.actions.runner.errors.environmentMissing`,"targets.not_configured":`hub.actions.runner.errors.targetsNotConfigured`,"targets.cell_missing":`hub.actions.runner.errors.targetsCellMissing`,"targets.address_required":`hub.actions.runner.errors.targetsAddressRequired`,"scenarios.start_page_unresolvable":`hub.actions.runner.errors.startPage`,"agents.entry_url_override_invalid":`hub.actions.runner.errors.entryUrl`,"agents.dispatch_request_mismatch":`hub.actions.runner.errors.dispatchMismatch`},BA={"scenarios.not_found":`hub.actions.runner.rejections.scenarioMissing`,"environments.not_found":`hub.actions.runner.rejections.environmentMissing`,"targets.not_configured":`hub.actions.runner.rejections.targetsNotConfigured`,"targets.cell_missing":`hub.actions.runner.rejections.targetsCellMissing`,"targets.address_required":`hub.actions.runner.rejections.targetsAddressRequired`,"scenarios.start_page_unresolvable":`hub.actions.runner.rejections.startPage`,"agents.entry_url_override_invalid":`hub.actions.runner.rejections.entryUrl`,"agents.dispatch_request_mismatch":`hub.actions.runner.rejections.dispatchMismatch`,"agents.offline":`hub.actions.runner.rejections.offline`};function VA(e){let t=HA(e);return t===null?_f(me()):hf(t,`hub`,me())}function HA(e){let t=St.safeParse(e==null?void 0:e.decision);return t.success?t.data:null}function UA(e){return typeof e==`number`&&Number.isFinite(e)?e:null}var WA=xt([`pending`,`resolved`,`dismissed`]),GA=xt([`mapping_low_confidence`,`mapping_grey_zone`,`mapping_fallback_failed`,`mapping_has_alternatives`,`user_question`,`execution_failed`,`element_disappeared`,`element_label_changed`,`element_uncertain_match`,`description_conflict`,`duplicate_suspected`,`er_mapping_grey`,`agent_blocked`,`captcha_required`,`heal_loop_detected`,`heal_proposal_pending`,`step_intent_too_broad`,`invalid_step_text`]),KA=[`user_question`,`captcha_required`];function qA(e){return KA.includes(e)}var JA=xt([`confirmed`,`overridden`,`dismissed`,`mark_for_rerun`]);F({scenarioId:ut(),status:WA.default(`pending`),cursor:P().optional(),limit:tt().int().min(1).max(500).default(50)});var YA=F({id:ut(),runId:ut().nullable(),scenarioId:ut().nullable(),stepId:ut().nullable(),kind:GA,title:P(),detailPayload:Ze(),status:WA,resolution:JA.nullable(),resolutionPayload:Ze().nullable(),resolvedAt:P().datetime().nullable(),resolvedBy:ut().nullable(),createdAt:P().datetime(),updatedAt:P().datetime()});F({items:I(YA),nextCursor:P().nullable(),total:N().int().nonnegative()}),F({id:ut()});var XA=F({elementId:ut().optional(),pageId:ut().optional(),note:P().max(2e3).optional()});F({resolution:JA,resolutionPayload:XA.default({})}).refine(e=>e.resolution!==`overridden`||e.resolutionPayload.elementId!==void 0&&e.resolutionPayload.pageId!==void 0,{message:`elementId and pageId are required for resolution='overridden'`}),F({reviewItemId:ut(),status:xt([`resolved`,`dismissed`]),resolvedAt:P().datetime(),resolvedBy:ut(),mapping:F({mappingId:ut(),pageId:ut().nullable(),elementId:ut().nullable(),source:Qe(`user`)}).optional()});function ZA(e){switch(e){case`element_text`:case`element_attribute`:return`element`;case`url_pathname`:case`url_href`:return`url`;case`response_body`:case`response_header`:case`response_status`:return`response`;default:throw Error(`Unknown extraction source: ${String(e)}`)}}var QA=`text_step`,$A=[`element`,`page`,`canvas`],ej=`element`,tj=`page`,nj=ej;function rj(e){return e.some(e=>ZA(e.sourceType)===`element`)}function ij(e){return e.actionType===`shared_step`||e.sharedStepRefId||e.sharedStepId||e.actionType===`api_call`?tj:e.actionType===`text_step`?nj:e.actionType===`extract_variable`&&e.extractionVariables!==void 0&&e.extractionVariables.length>0?rj(e.extractionVariables)?ej:tj:null}function aj(e){let t=ij(e);if(t===null)throw Error(`Cannot derive targetType for ${e.actionType}: its create payload is incomplete`);return t}var oj=[`navigate`,QA,`shared_step`,`api_call`],sj=[`assert`];function cj(e){return oj.some(t=>t===e.actionType)?!1:sj.some(t=>t===e.actionType)?!0:e.targetType===ej}var lj=[`agent`,`replay`],uj=lt({id:ut(),status:st,abortReason:At.nullable(),abortParams:Tt([Xe,Ye()])});export{vr as $,gf as A,Jr as B,Jf as C,kf as D,Nf as E,zl as F,Rr as G,Ur as H,Dl as I,wr as J,Ir as K,lo as L,vf as M,_f as N,Of as O,Hl as P,br as Q,Qr as R,sp as S,Pf as T,Vr as U,Kr as V,Br as W,Sr as X,Cr as Y,xr as Z,ch as _,cj as a,ir as at,zp as b,FA as c,Wn as ct,MA as d,_r as et,FT as f,rh as g,ih as h,aj as i,ar as it,hf as j,Cf as k,IA as l,Gn as lt,_h as m,lj as n,dr as nt,qA as o,er as ot,ST as p,Dr as q,$A as r,ur as rt,RA as s,qn as st,uj as t,pr as tt,LA as u,In as ut,nh as v,zf as w,kp as x,$m as y,Zr as z};
|