droidsembly 0.4.0-beta.2 → 0.4.0-beta.3

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.
Files changed (56) hide show
  1. package/dist/assets/{AccessibilitySettings-BE7rmk0y.js → AccessibilitySettings-HB1JfQbh.js} +3 -3
  2. package/dist/assets/{AppViewer-BINNxHVf.js → AppViewer-0Bly3EdB.js} +1 -1
  3. package/dist/assets/{Balloon-jPkIBPvT.js → Balloon-B6odnAlm.js} +1 -1
  4. package/dist/assets/{Batched-DL3cFl-z.js → Batched-CTJWq46z.js} +1 -1
  5. package/dist/assets/{Birds-9cXj_YEG.js → Birds-DSS0OIz9.js} +1 -1
  6. package/dist/assets/{Blimp-Ci1lo_c7.js → Blimp-CZt6dddK.js} +1 -1
  7. package/dist/assets/{BufferGeometryUtils-Dk96On2P.js → BufferGeometryUtils-CmpUrBC5.js} +1 -1
  8. package/dist/assets/{Duck-BMxCVlmW.js → Duck-BnRLkodp.js} +1 -1
  9. package/dist/assets/{Effects-Crrr3ggK.js → Effects-Bkewth1L.js} +1 -1
  10. package/dist/assets/{Fireworks-ddjyPNX6.js → Fireworks-Cvn8YKWd.js} +1 -1
  11. package/dist/assets/{Helicopter-CX-86eGa.js → Helicopter-BDrFQMNX.js} +1 -1
  12. package/dist/assets/{Hurricane-CLANwn_b.js → Hurricane-C8hyFXjx.js} +1 -1
  13. package/dist/assets/{Kaiju-BCMy-uRo.js → Kaiju-Bxxe9DG0.js} +1 -1
  14. package/dist/assets/{Meteors-CiJzDtSj.js → Meteors-UdYL0Tbv.js} +1 -1
  15. package/dist/assets/{MissionConsole-CJb-BlEJ.js → MissionConsole-DJRtojZP.js} +1 -1
  16. package/dist/assets/{Office-bAhOa_1d.js → Office-9Mank16i.js} +8 -8
  17. package/dist/assets/{PhotoPanel-Bj8-zSMr.js → PhotoPanel-C_njIXp0.js} +1 -1
  18. package/dist/assets/{PhotoScene-Da13U_uP.js → PhotoScene-DwpeJjGe.js} +3 -3
  19. package/dist/assets/{Plane-DcyLXU5f.js → Plane-DzvUAUYE.js} +1 -1
  20. package/dist/assets/{Pocket-C3fEmnP6.js → Pocket-A1iI6Ivy.js} +2 -2
  21. package/dist/assets/{Rainbow-CiwNa4iX.js → Rainbow-CV1rD6rW.js} +1 -1
  22. package/dist/assets/{Roof-DDYcam5j.js → Roof-DSpKcGXK.js} +1 -1
  23. package/dist/assets/{Shell-CjHm9J8I.js → Shell-GaQY3zre.js} +1 -1
  24. package/dist/assets/{Skywriting-BD1rTdRn.js → Skywriting-D4B2ZvH7.js} +1 -1
  25. package/dist/assets/{TerminalView-nREejrGe.js → TerminalView-DhmLqjYn.js} +1 -1
  26. package/dist/assets/{ToyWorld-NbwEfz8w.js → ToyWorld-DeQUxcuy.js} +1 -1
  27. package/dist/assets/{Ufo-DlOMBNSX.js → Ufo-CitoxReu.js} +1 -1
  28. package/dist/assets/{Whale-BpAZmX5F.js → Whale-Btx5ph-T.js} +1 -1
  29. package/dist/assets/{all-D96CQm6h.js → all-gw-szDg1.js} +1 -1
  30. package/dist/assets/{bloomMarks-DO_1Aa_j.js → bloomMarks-DRhDp19k.js} +1 -1
  31. package/dist/assets/{cheerRules-DNkiE7MG.js → cheerRules-DWb8Qwzg.js} +1 -1
  32. package/dist/assets/{cityLayout-BwjgCIoW.js → cityLayout-aA2Ktgpu.js} +1 -1
  33. package/dist/assets/{dogState-_4V3U3Ki.js → dogState-DY7tJEVD.js} +1 -1
  34. package/dist/assets/{doors-BLqiDSGY.js → doors-BlKvxXVp.js} +1 -1
  35. package/dist/assets/{gallery-CVQaqgJI.js → gallery-COKuWb9E.js} +1 -1
  36. package/dist/assets/{gate-B1SWzR3V.js → gate-D0uU0wv5.js} +2 -2
  37. package/dist/assets/{index-BSf1g_FE.js → index-CDJgPTOC.js} +3 -3
  38. package/dist/assets/{instantReplay-Cuo_dJ0Q.js → instantReplay-BjoV6jrY.js} +1 -1
  39. package/dist/assets/{interact-2xHzPlZG.js → interact-0jqx03Xr.js} +1 -1
  40. package/dist/assets/{kit-Cx-l6IRN.js → kit-n-eqZ1AT.js} +1 -1
  41. package/dist/assets/{mic-ChYpSk7U.js → mic-BnAa4E99.js} +1 -1
  42. package/dist/assets/{photoMode-7LqNRqz9.js → photoMode-BybFMLKC.js} +1 -1
  43. package/dist/assets/{pipeline-DWfp7bcu.js → pipeline-BGPWXegt.js} +1 -1
  44. package/dist/assets/{rapier-D3erQ37Q.js → rapier-CrXmTSyE.js} +1 -1
  45. package/dist/assets/{rig-CXpaDXip.js → rig-DfdntE8m.js} +1 -1
  46. package/dist/assets/{speechLanguage-CsSMLLpg.js → speechLanguage-DfsQvU9M.js} +1 -1
  47. package/dist/assets/store-CXLtXw8e.js +5 -0
  48. package/dist/assets/{useDayTime-DQo6X8vh.js → useDayTime-BjBDzh_t.js} +1 -1
  49. package/dist/assets/{useGraphics-B19_wbNT.js → useGraphics-Bg6L4EdS.js} +1 -1
  50. package/dist/assets/{voiceMessages-BNuAZiGC.js → voiceMessages-CFLyZLZ4.js} +1 -1
  51. package/dist/assets/{weatherState-BmCM8XlW.js → weatherState-BJVm5hU-.js} +1 -1
  52. package/dist/index.html +2 -2
  53. package/dist-server/index.js +27 -8
  54. package/dist-server/index.js.map +2 -2
  55. package/package.json +1 -1
  56. package/dist/assets/store-CWHb7890.js +0 -5
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{s as n,t as r}from"./jsx-runtime-CXW0f58S.js";import{c as i,l as a,o,s,y as c}from"./index-BSf1g_FE.js";import{At as l,Ln as u,Mn as d,Nn as f,Pn as p,Wn as m,a as h,hs as g,i as _,jn as ee,p as v,t as te,zn as ne}from"./store-CWHb7890.js";import{$ as re,A as ie,F as ae,I as oe,L as se,N as y,O as ce,P as le,R as ue,at as de,et as fe,g as b,i as pe,it as me,k as he,nt as ge,ot as _e,rt as ve,st as ye,v as be,y as xe,z as Se}from"./AccessibilitySettings-BE7rmk0y.js";import{A as x,Bt as S,C as Ce,D as we,F as Te,Mt as Ee,S as De,T as Oe,at as ke,c as Ae,f as je,gt as Me,k as Ne,kt as Pe,pt as Fe,tt as Ie,x as Le}from"./bloomMarks-DO_1Aa_j.js";import{t as Re}from"./BufferGeometryUtils-Dk96On2P.js";import{a as ze,i as Be,n as Ve,o as He,r as C}from"./Batched-DL3cFl-z.js";import{U as Ue,f as We}from"./rig-CXpaDXip.js";var w=t(n(),1),T={shell:`#eee9dd`,joint:`#243644`,visor:`#081725`,led:`#56dfff`,gold:`#ffbd50`},Ge=[`#ff951e`,`#00b9e7`,`#b673e2`,`#ffbd50`,`#37c879`,`#ef5261`],Ke={tee:`Code module`,hoodie:`Code module · reinforced`,stripe:`Planning module`,cardigan:`Planning module · reinforced`,sweater:`Inspection module`,turtleneck:`Inspection module · reinforced`},qe=(e,t)=>t===`ceo`?`coordinate`:e.outfit===`sweater`||e.outfit===`turtleneck`?`inspect`:e.outfit===`stripe`||e.outfit===`cardigan`?`plan`:`code`,Je=(e,t)=>Ge[e.accent];function Ye(e){let t=fe(e),n=e.style?.headwear??t.headwear,r=qe(t,e.role),i=e.style?.accent??(r===`coordinate`?3:r===`inspect`?2:+(r===`plan`));return{...t,hair:`buzz`,facialHair:`none`,skin:T.shell,hairColor:T.joint,accent:i,headwear:n,headphones:n===`none`&&(t.headphones||r===`code`)}}var E=r(),Xe=new S;function Ze(e,t,n,r,i,a){let o=2*Math.PI*i/4,s=Math.max(a-2*i,0),c=Math.PI/4;Xe.copy(t),Xe[r]=0,Xe.normalize();let l=.5*o/(o+s),u=1-Xe.angleTo(e)/c;return Math.sign(Xe[n])===1?u*l:s/(o+s)+l+l*(1-u)}var Qe=class e extends Le{constructor(e=1,t=1,n=1,r=2,i=.1){let a=r*2+1;if(i=Math.min(e/2,t/2,n/2,i),super(1,1,1,a,a,a),this.type=`RoundedBoxGeometry`,this.parameters={width:e,height:t,depth:n,segments:r,radius:i},a===1)return;let o=this.toNonIndexed();this.index=null,this.attributes.position=o.attributes.position,this.attributes.normal=o.attributes.normal,this.attributes.uv=o.attributes.uv;let s=new S,c=new S,l=new S(e,t,n).divideScalar(2).subScalar(i),u=this.attributes.position.array,d=this.attributes.normal.array,f=this.attributes.uv.array,p=u.length/6,m=new S,h=.5/a;for(let r=0,a=0;r<u.length;r+=3,a+=2)switch(s.fromArray(u,r),c.copy(s),c.x-=Math.sign(c.x)*h,c.y-=Math.sign(c.y)*h,c.z-=Math.sign(c.z)*h,c.normalize(),u[r+0]=l.x*Math.sign(s.x)+c.x*i,u[r+1]=l.y*Math.sign(s.y)+c.y*i,u[r+2]=l.z*Math.sign(s.z)+c.z*i,d[r+0]=c.x,d[r+1]=c.y,d[r+2]=c.z,Math.floor(r/p)){case 0:m.set(1,0,0),f[a+0]=Ze(m,c,`z`,`y`,i,n),f[a+1]=1-Ze(m,c,`y`,`z`,i,t);break;case 1:m.set(-1,0,0),f[a+0]=1-Ze(m,c,`z`,`y`,i,n),f[a+1]=1-Ze(m,c,`y`,`z`,i,t);break;case 2:m.set(0,1,0),f[a+0]=1-Ze(m,c,`x`,`z`,i,e),f[a+1]=Ze(m,c,`z`,`x`,i,n);break;case 3:m.set(0,-1,0),f[a+0]=1-Ze(m,c,`x`,`z`,i,e),f[a+1]=1-Ze(m,c,`z`,`x`,i,n);break;case 4:m.set(0,0,1),f[a+0]=1-Ze(m,c,`x`,`y`,i,e),f[a+1]=1-Ze(m,c,`y`,`x`,i,t);break;case 5:m.set(0,0,-1),f[a+0]=Ze(m,c,`x`,`y`,i,e),f[a+1]=1-Ze(m,c,`y`,`x`,i,t)}}static fromJSON(t){return new e(t.width,t.height,t.depth,t.segments,t.radius)}},$e=new Ie,et=new Me,tt=new Te;function D(e,{at:t=[0,0,0],rot:n=[0,0,0],scale:r=[1,1,1]}={}){return et.setFromEuler(tt.set(...n)),e.applyMatrix4($e.compose(new S(...t),et,new S(...r))),e}function O(...e){e.some(e=>!e.index)&&(e=e.map(e=>e.index?e.toNonIndexed():e));let t=Re(e);if(!t)throw Error(`could not merge character geometry`);return e.forEach(e=>e.dispose()),t}var k=(e,t=14,n=10)=>new Pe(e,t,n),nt=(e,t,n=6,r=12)=>new Oe(e,t,n,r),A=(e,t,n)=>new Le(e,t,n);function rt(e,t,n,r=.006,i=.2){return e.rotateY(-t),e.translate(Math.sin(t)*(i+r),n,-Math.cos(t)*(i+r))}function it(e,t,n){let r=t.clone().sub(e),i=new x(n,n,r.length(),6);return i.applyQuaternion(new Me().setFromUnitVectors(new S(0,1,0),r.normalize())),i.translate((e.x+t.x)/2,(e.y+t.y)/2,(e.z+t.z)/2)}var at=()=>D(new Pe(.215,24,16,0,Math.PI*2,0,1.75),{at:[0,.02,.01],rot:[.55,0,0]});function ot(e,t,n){let r=[];for(let i=0;i<e;i++){let a=1-2*(i+.5)/e,o=Math.sqrt(1-a*a),s=i*2.39996,c=new S(Math.cos(s)*o,a,Math.sin(s)*o).multiplyScalar(t);n(c)&&r.push(c)}return r}function st(e){switch(e){case`crop`:return at();case`long`:return O(at(),D(k(.215,20,14),{at:[0,-.1,.07],scale:[1.05,1.25,.8]}));case`ponytail`:{let e={at:[0,.08,.2],rot:[.45,0,0]},t=D(nt(.075,.24,6,10),{at:[0,-.17,.04]});return O(at(),D(k(.085,12,10),e),D(t,e))}case`bun`:return O(at(),D(k(.1,14,10),{at:[0,.18,.12]}));case`quiff`:{let e=[-.09,-.045,0,.045,.09].map((e,t)=>D(new Ne(.058,.19+t%2*.04,8),{at:[e,.2-Math.abs(e)*.45,-.09+Math.abs(e)*.35],rot:[-.75,0,-e*3]}));return e.push(D(k(.1,14,10),{at:[0,.17,-.1],scale:[1.4,.7,1]})),O(at(),...e)}case`afro`:{let e=new S(0,.1,.06),t=ot(26,.235,e=>e.z>-.08&&e.y>-.15).map(t=>D(k(.075,10,8),{at:[e.x+t.x,e.y+t.y,e.z+t.z]}));return O(D(k(.245,22,16),{at:[e.x,e.y,e.z]}),...t)}case`sidePart`:return O(at(),D(k(.12,16,10),{at:[.05,.16,-.1],rot:[.3,0,-.35],scale:[1.35,.5,.9]}),D(k(.07,12,8),{at:[-.08,.2,-.04],scale:[1,.6,1.2]}));case`buzz`:return D(new Pe(.205,24,14,0,Math.PI*2,0,1.6),{at:[0,.015,.012],rot:[.5,0,0]});case`bald`:return new Pe(.208,24,6,-.3,Math.PI+.6,1.2,.58);case`curls`:{let e=ot(60,.2,e=>e.y>.02&&e.y+e.z*.9>-.02).map(e=>D(k(.055,8,6),{at:[e.x*1.02,e.y+.03,e.z*1.02+.01]}));return O(at(),...e)}case`bob`:return O(at(),D(new Pe(.226,24,12,-.45,Math.PI+.9,.35,1.78),{at:[0,0,.015],scale:[1.08,1,1]}),D(k(.12,16,10),{at:[0,.145,-.13],scale:[1.45,.45,.8]}));case`mohawk`:{let e=[-.62,-.31,0,.31,.62,.93].map((e,t)=>{let n=.12+t%2*.03;return D(new Ne(.05,n,8),{at:[0,(.2+n/2)*Math.cos(e),(.2+n/2)*Math.sin(e)],rot:[e,0,0],scale:[.5,1,1]})});return O(st(`buzz`),...e)}case`locs`:{let e=Array.from({length:11},(e,t)=>{let n=-1.75+t*3.5/10;return D(nt(.03,.2,3,6),{at:[Math.sin(n)*.19,-.06-t%3*.02,Math.cos(n)*.17+.02],rot:[-.25*Math.cos(n),0,.25*Math.sin(n)]})});return O(at(),...e)}}}function ct(e,t,n,r,i){let a=e.toNonIndexed(),o=a.attributes,s=[],c=o.position;for(let e=0;e<c.count;e+=3){let a=(c.getX(e)+c.getX(e+1)+c.getX(e+2))/3,o=(c.getY(e)+c.getY(e+1)+c.getY(e+2))/3;(c.getZ(e)+c.getZ(e+1)+c.getZ(e+2))/3<0&&((a-t)/r)**2+((o-n)/i)**2<1||s.push(e,e+1,e+2)}let l=new Ce;for(let e of[`position`,`normal`,`uv`]){let t=o[e],n=new Float32Array(s.length*t.itemSize);s.forEach((e,r)=>{for(let i=0;i<t.itemSize;i++)n[r*t.itemSize+i]=t.array[e*t.itemSize+i]}),l.setAttribute(e,new De(n,t.itemSize))}return e.dispose(),a.dispose(),l}var lt=(e,t)=>ct(new Pe(e,28,12,Math.PI-.15,Math.PI+.3,t,Math.PI-t),0,-.088,.07,.048),ut=()=>O(...[-1,1].map(e=>D(nt(.022,.05,4,8),{at:[e*.036,-.052,-.197],rot:[.25,0,e*1.2],scale:[1,1,.7]})));function dt(e){switch(e){case`none`:return null;case`stubble`:return lt(.203,2);case`moustache`:return ut();case`beard`:return O(D(lt(.212,1.95),{at:[0,.012,-.004],scale:[1.03,1.12,1.04]}),...[-1,1].map(e=>D(nt(.028,.09,4,8),{at:[e*.188,-.07,-.035],rot:[0,0,e*.25]})),ut())}}function ft(e){if(e===`none`)return null;let t=-.215,n=e===`round`?[-.075,.075].map(e=>D(new Ee(.047,.01,6,20),{at:[e,.02,t]})):[-.078,.078].flatMap(e=>[D(A(.1,.018,.016),{at:[e,.058,t]}),D(A(.1,.014,.016),{at:[e,-.02,t]}),D(A(.014,.09,.016),{at:[e-.045,.02,t]}),D(A(.014,.09,.016),{at:[e+.045,.02,t]})]),r=[-1,1].map(e=>D(A(.012,.012,.19),{at:[e*.172,.035,-.11],rot:[0,e*.4,0]}));return O(...n,D(A(.05,.012,.012),{at:[0,.03,t]}),...r)}function pt(){let e=D(new Ee(.245,.018,6,28,Math.PI),{at:[0,0,.01]}),t=[-1,1].map(e=>D(new x(.072,.072,.055,18),{at:[e*.235,-.01,.01],rot:[0,0,Math.PI/2]})),n=[-1,1].map(e=>D(new x(.052,.052,.012,18),{at:[e*.266,-.01,.01],rot:[0,0,Math.PI/2]}));return{shell:O(e,...t),covers:O(...n)}}function mt(e){switch(e){case`none`:return null;case`beanie`:{let e=.228,t=1.42,n={at:[0,.035,.02],rot:[.35,0,0]};return O(D(new Pe(e,24,12,0,Math.PI*2,0,t),n),D(D(new Ee(e*Math.sin(t),.03,8,28),{at:[0,e*Math.cos(t),0],rot:[Math.PI/2,0,0]}),n),D(k(.06,12,8),{at:[0,.035+.258*Math.cos(.35),.02+.258*Math.sin(.35)]}))}case`cap`:{let e=.224,t=1.35,n={at:[0,.02,.015],rot:[.18,0,0]};return O(D(new Pe(e,24,12,0,Math.PI*2,0,t),n),D(D(new x(.14,.14,.014,24,1,!1,Math.PI/2,Math.PI),{at:[0,e*Math.cos(t),-.13],rot:[-.08,0,0],scale:[1,1,.9]}),n),D(k(.022,8,6),{at:[0,.02+e*Math.cos(.18),.015+e*Math.sin(.18)]}))}}}function ht(e){switch(e){case`tee`:return{main:null,trim:null};case`stripe`:return{main:null,trim:new x(.204,.204,.075,28,1,!0).translate(0,.32,0)};case`hoodie`:return{main:O(D(new Ee(.12,.055,10,24),{at:[0,.5,.03],rot:[Math.PI/2-.35,0,0],scale:[1.05,1.15,1]}),D(k(.11,16,10),{at:[0,.5,.12],scale:[1.05,.9,.55]}),D(A(.22,.1,.02),{at:[0,.14,-.196]})),trim:O(...[-1,1].flatMap(e=>[D(nt(.01,.11,3,6),{at:[e*.045,.39,-.196],rot:[-.25,0,e*.08]}),D(k(.016,8,6),{at:[e*.05,.32,-.208]})]))};case`cardigan`:return{main:O(...[-1,1].map(e=>rt(A(.03,.3,.016),e*.3,.29,.004)),...[-1,1].map(e=>rt(A(.075,.06,.012),e*.62,.13,.002,.19))),trim:O(rt(A(.09,.3,.012),0,.29,0),...[.37,.29,.21].map(e=>rt(k(.012,8,6),.3,e,.014)))};case`turtleneck`:return{main:O(D(new Ee(.16,.04,8,28),{at:[0,.49,0],rot:[Math.PI/2,0,0]}),D(new Ee(.14,.035,8,28),{at:[0,.54,0],rot:[Math.PI/2,0,0]})),trim:null};case`sweater`:{let e=[-.12,-.06,0,.06,.12].map(e=>{let t=-Math.sqrt(.2*.2-e*e)-.004;return D(A(.04,.04,.012),{at:[e,.33,t],rot:[0,-Math.asin(e/.2),Math.PI/4]})});return{main:null,trim:O(D(new Ee(.105,.045,10,24),{at:[0,.505,-.01],rot:[Math.PI/2,0,0]}),new x(.206,.206,.05,28,1,!0).translate(0,.2,0),...e)}}}}var gt=(e,t,n=.2)=>-Math.sqrt(Math.max(0,n*n-e*e-t*t)),_t={x:.07,y:.02,z:-.18,r:.03};function vt(e,t,n,r){let i=Math.min(1,Math.abs(e.x-Math.sign(e.x)*_t.x)/_t.r);e.y=_t.y+(e.y-_t.y)*t+n+r*(1-i*i)}function yt(e){let t=[-1,1].map(e=>D(k(_t.r,10,8),{at:[e*_t.x,_t.y,_t.z]}));return e&&t.push(...[-1,1].map(e=>D(A(.035,.008,.008),{at:[e*.1,.045,-.172],rot:[0,0,e*-.6]}))),O(...t)}var bt=[e=>vt(e,.2,-.006,-.007),e=>{let t=Math.sign(e.x)*_t.x;e.x=t+(e.x-t)*1.18,e.y=_t.y+(e.y-_t.y)*1.3+.004},e=>vt(e,.22,.002,.013)],xt={x:.072,y:.078};function St(e,t,n){let r=Math.sign(e.x),i=e.y+t+n*(r*xt.x-e.x)*r;e.z+=gt(e.x,i)-gt(e.x,e.y),e.y=i}var Ct=()=>O(...[-1,1].map(e=>D(nt(.011,.045,3,8),{at:[e*xt.x,xt.y,gt(e*xt.x,xt.y)-.004],rot:[0,-e*Math.asin(xt.x/.2),Math.PI/2-e*.12],scale:[1,1,.7]}))),wt=[e=>St(e,-.007,-.45),e=>St(e,.004,.55),e=>St(e,.024,.05),e=>e.x<0?St(e,.02,-.1):St(e,-.005,-.4),e=>St(e,-.01,.15)],Tt=(e,t,n,r=0)=>({w:e,x:r,y:t,top:e=>n(e)+.0065*(1-.4*e*e),bottom:e=>n(e)-.0065*(1-.4*e*e)}),Et=[Tt(.046,-.09,e=>.011-.022*(1-e*e)),Tt(.04,-.1,e=>.016*(1-e*e)-.008),Tt(.036,-.094,()=>0),{w:.056,y:-.08,top:e=>-.005*(1-e*e),bottom:e=>-.052*(1-e*e)**.7},{w:.024,y:-.1,top:e=>.026*Math.sqrt(1-e*e),bottom:e=>-.026*Math.sqrt(1-e*e)},Tt(.046,-.097,e=>.006*Math.sin(e*Math.PI*2)),Tt(.036,-.095,e=>.011*e,.012)],Dt=14;function Ot(e){let t=new Float32Array(90);for(let n=0;n<=Dt;n++){let r=-1+2*n/Dt,i=(e.x??0)+r*e.w,a=e.y+e.top(r),o=e.y+e.bottom(r);t.set([i,a,gt(i,a,.2045),i,o,gt(i,o,.2045)],n*6)}return t}function kt(){let e=new Ce;e.setAttribute(`position`,new De(Ot(Et[0]),3)),e.setAttribute(`uv`,new De(new Float32Array(60),2));let t=[];for(let e=0;e<Dt;e++){let n=e*2;t.push(n,n+2,n+1,n+2,n+3,n+1)}return e.setIndex(t),e.computeVertexNormals(),e}var At=Et.slice(1).map(Ot);function jt(e){let t=[[yt(e),bt],[Ct(),wt],[kt(),At]],n=t.map(([e])=>e.attributes.position.count),r=O(...t.map(([e])=>e)),i=r.attributes.position;if(i.count!==n.reduce((e,t)=>e+t,0))throw Error(`face parts merged out of order`);let a=new S,o=[],s=0;if(t.forEach(([,e],t)=>{for(let r of e){let e=Float32Array.from(i.array);for(let o=0;o<n[t];o++)r instanceof Float32Array?a.fromArray(r,o*3):r(a.fromBufferAttribute(i,s+o)),a.toArray(e,(s+o)*3);o.push(new De(e,3))}s+=n[t]}),o.length!==d)throw Error(`the face has ${o.length} morph targets, face.ts expects ${d}`);return r.morphAttributes.position=o,r}function Mt(){return{lapels:O(...[-1,1].map(e=>rt(A(.065,.22,.014).rotateZ(-e*.36),e*.36,.36,.005))),button:rt(k(.014,10,8),0,.11,.004,.187),square:rt(A(.035,.035,.01).rotateZ(Math.PI/4),-.55,.39,.006)}}function Nt(){let e=(e,t)=>{let n=t>.42?Math.sqrt(.04-(t-.42)**2):.2;return new S(e,t,-Math.sqrt(n*n-e*e)-.007)};return{strap:O(...[-1,1].flatMap(t=>{let n=[.53,.49,.45,.41].map(n=>e(t*.07,n));return n.push(new S(t*.012,.235,-.214)),n.slice(1).map((e,t)=>it(n[t],e,.006))})),card:D(A(.055,.075,.01),{at:[0,.195,-.214]})}}function Pt(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}var Ft={legs:O(...[-.11,.11].flatMap(e=>[D(nt(.08,.26),{at:[e,.5,-.17],rot:[Math.PI/2,0,0]}),D(nt(.07,.3),{at:[e,.27,-.36]})])),shoes:O(...[-.11,.11].map(e=>D(A(.13,.09,.22),{at:[e,.05,-.42]}))),thigh:D(nt(.08,.26),{at:[0,-.13,0]}),shin:D(nt(.07,.3),{at:[0,-.23,0]}),shoe:D(A(.13,.09,.22),{at:[0,-.45,-.06]}),torso:nt(.2,.24,8,16),collar:new Ee(.1,.03,8,20),sleeve:nt(.065,.36,6,12),hand:k(.07,14,10),head:k(.2,24,18),ears:O(...[-.2,.2].map(e=>D(k(.05,10,8),{at:[e,-.01,0]}))),face:jt(!1),faceLashes:jt(!0),nose:k(.028,10,8),cheeks:O(...[-1,1].map(e=>D(k(.03,10,8),{at:[e*.115,-.045,-.165],scale:[1,.6,.3]}))),hairClip:A(.07,.035,.035),shirtFront:A(.11,.22,.02),tie:A(.045,.2,.012),tieKnot:A(.06,.04,.02),blazer:Mt(),lanyard:Nt(),phone:A(.075,.014,.13),phoneScreen:D(new Fe(.06,.105),{at:[0,.0075,0],rot:[-Math.PI/2,0,0]}),hair:Pt(de,st),facialHair:Pt(ve,dt),glasses:Pt(me,e=>ft(e)),headphones:pt(),headwear:Pt(_e,mt),outfit:Pt(ye,ht)},j=(e,t,n,r)=>new Qe(e,t,n,2,r),It=e=>new Pe(e,12,8),Lt=(e,t=.012)=>new Ee(e,t,6,24);function Rt(...e){let t=e.map(e=>e.index?e.toNonIndexed():e),n=Re(t);return new Set([...e,...t]).forEach(e=>e.dispose()),n}function zt(e,t,n=.012){let r=new S(...e),i=new S(...t),a=i.clone().sub(r);return new x(n,n,a.length(),8).applyQuaternion(new Me().setFromUnitVectors(new S(0,1,0),a.normalize())).translate(...r.add(i).multiplyScalar(.5).toArray())}function Bt(){let e=Ft.face.clone(),t=Ft.face.attributes.position;return[e.attributes.position,...e.morphAttributes.position??[]].forEach((e,n)=>{for(let r=0;r<e.count;r++){let i=e.getY(r);if(t.getY(r)>=-.011&&t.getY(r)<=.051&&n!==f.eyes+ee.wide+1){let e=(t.getX(r)-Math.sign(t.getX(r))*.07)/.03;i=.012+(n===f.eyes+ee.closed+1?-.004:n===f.eyes+ee.happy+1?.043:.033)*(1-e*e)+(t.getY(r)-.02)*.34}t.getY(r)>.051&&(i=.078+(i-.078)*.65),e.setXYZ(r,e.getX(r)*1.6,i*1.15,-.269+(e.getZ(r)+.2)*.04)}}),e.computeVertexNormals(),e}var M=-.208,Vt=Rt(zt([-.03,.31,M],[-.055,.285,M],.007),zt([-.055,.285,M],[-.03,.26,M],.007),zt([.03,.31,M],[.055,.285,M],.007),zt([.055,.285,M],[.03,.26,M],.007),zt([.012,.315,M],[-.012,.255,M],.006)),Ht=Rt(...[[-.04,.26],[.04,.26],[0,.32]].map(([e,t])=>j(.028,.025,.008,.004).translate(e,t,M)),zt([0,.31,M],[-.04,.27,M],.004),zt([0,.31,M],[.04,.27,M],.004)),Ut=Rt(zt([-.04,.285,M],[-.01,.26,M],.009),zt([-.01,.26,M],[.04,.315,M],.009)),Wt=Rt(Lt(.035,.007).translate(0,.285,M),...[-1,1].map(e=>zt([e*.025,.285,M],[e*.055,.285,M],.007))),N={head:j(.62,.49,.43,.13).translate(0,.025,0),visor:j(.535,.355,.085,.095).translate(0,.01,-.212),face:Bt(),ears:Rt(...[-1,1].map(e=>new x(.104,.104,.065,20).rotateZ(Math.PI/2).translate(e*.325,.015,0))),earRings:Rt(...[-1,1].map(e=>Lt(.075,.012).rotateY(Math.PI/2).translate(e*.365,.015,0))),antenna:Rt(It(.035).translate(.09,.27,.04),zt([.09,.27,.04],[.14,.405,.04],.013)),antennaTip:It(.035).translate(.14,.425,.04),headTrim:Rt(j(.14,.015,.12,.006).translate(0,.272,-.015),j(.07,.012,.012,.004).translate(0,-.193,-.208)),torso:j(.4,.4,.33,.115).translate(0,.29,0),neck:new x(.075,.075,.12,12).translate(0,.52,0),torsoTrim:Rt(j(.27,.035,.025,.008).translate(0,.425,-.158),j(.25,.025,.025,.008).translate(0,.13,-.15)),guards:Rt(...[-1,1].map(e=>j(.06,.23,.035,.012).translate(e*.16,.29,-.135))),badge:new x(.077,.077,.025,24).rotateX(Math.PI/2).translate(0,.285,-.178),badgeRing:Lt(.074,.008).translate(0,.285,-.197),emblems:{code:Vt,plan:Ht,inspect:Ut,coordinate:Wt},arm:Rt(j(.14,.14,.15,.04).translate(0,0,-.13),j(.15,.15,.17,.045).translate(0,0,-.34)),armJoints:Rt(It(.075),It(.059).translate(0,0,-.235),It(.057).translate(0,0,-.445)),wrist:new x(.077,.077,.025,14).rotateX(Math.PI/2).translate(0,0,-.414),hand:Rt(j(.13,.095,.105,.03).translate(0,0,-.5),...[-.04,0,.04].map(e=>j(.028,.04,.065,.012).translate(e,.012,-.55))),joint:It(.074),thigh:j(.15,.23,.16,.045).translate(0,-.16,0),shin:j(.15,.26,.15,.045).translate(0,-.23,0),shoe:j(.17,.12,.25,.045).translate(0,-.44,-.065),legs:Rt(...[-.11,.11].flatMap(e=>[j(.15,.16,.31,.045).translate(e,.5,-.17),j(.15,.32,.15,.045).translate(e,.25,-.36)])),shoes:Rt(...[-.11,.11].map(e=>j(.17,.12,.25,.045).translate(e,.06,-.42))),lensRim:Lt(.09,.014),lensHandle:zt([0,-.09,0],[0,-.23,0],.019),lensGlass:new we(.076,24).rotateY(Math.PI),lensReflection:Rt(zt([-.042,.005,-.004],[.012,.055,-.004],.006),zt([-.018,-.025,-.004],[.035,.025,-.004],.004))},Gt=T.joint,Kt=e=>re[e.build].width*e.shoulders,qt=new ke({color:`#ffffff`,specular:`#4c7184`,shininess:90}),Jt=new ke({color:T.visor,specular:`#4c7184`,shininess:90});function Yt({agent:e,look:t}){let n=Je(t,e.role),r=qe(t,e.role);return(0,E.jsxs)(`group`,{scale:[Kt(t),1,re[t.build].depth],children:[(0,E.jsx)(C,{geometry:N.torso,color:T.shell,castShadow:!0,outline:.009}),(0,E.jsx)(C,{geometry:N.neck,color:Gt}),(0,E.jsx)(C,{geometry:N.torsoTrim,color:n}),[`hoodie`,`cardigan`,`turtleneck`].includes(t.outfit)&&(0,E.jsx)(C,{geometry:N.guards,color:n}),(0,E.jsx)(C,{geometry:N.badge,color:T.visor}),(0,E.jsx)(C,{geometry:N.badgeRing,color:n}),(0,E.jsx)(Ve,{look:He(N.emblems[r],{shading:`glow`}),color:n}),r===`inspect`&&(0,E.jsxs)(`group`,{position:[.29,.24,-.1],rotation:[0,0,-.35],children:[(0,E.jsx)(C,{geometry:N.lensHandle,color:Gt}),(0,E.jsx)(C,{geometry:N.lensRim,color:n}),(0,E.jsx)(C,{geometry:N.lensGlass,color:`#a8deed`}),(0,E.jsx)(C,{geometry:N.lensReflection,color:`#f4fcff`})]})]})}function Xt({agent:e,look:t}){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(C,{geometry:N.armJoints,color:Gt}),(0,E.jsx)(C,{geometry:N.arm,color:T.shell,castShadow:!0,outline:.006}),(0,E.jsx)(C,{geometry:N.wrist,color:Je(t,e.role)}),(0,E.jsx)(C,{geometry:N.hand,color:Gt,castShadow:!0})]})}function Zt(e,t,n){let r=e.current?.morphTargetInfluences;if(r){for(let e=0;e<d;e++)r[e]=t.w[e];for(let e=f.eyes;e<f.brows;e++)r[e]*=1-n;r[f.eyes+ee.closed]+=n}}function Qt({agent:e,look:t,busy:n,face:r}){let i=Be(),a=Je(t,e.role),o=Ft.glasses[t.glasses],s=Ft.headwear[t.headwear];return(0,w.useLayoutEffect)(()=>r.current?.updateMorphTargets(),[r]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(C,{geometry:N.head,color:T.shell,castShadow:!0,outline:.008}),(0,E.jsx)(Ve,{look:He(N.visor,{material:i?qt:Jt}),color:T.visor}),(0,E.jsx)(C,{geometry:N.ears,color:Gt}),(0,E.jsx)(C,{geometry:N.earRings,color:a}),(0,E.jsx)(C,{geometry:N.antenna,color:Gt}),(0,E.jsx)(Ve,{look:He(N.antennaTip,{shading:`glow`}),color:a}),(0,E.jsx)(C,{geometry:N.headTrim,color:a}),(0,E.jsx)(Ve,{ref:r,look:He(N.face,{shading:`glow`}),color:T.led}),o&&(0,E.jsx)(C,{geometry:o,color:a,scale:[1.6,1.4,1],position:[0,0,-.07]}),s&&(0,E.jsx)(C,{geometry:s,color:a,scale:[1.42,1.1,1.14],position:[0,.07,.015],castShadow:!0}),t.headphones&&(0,E.jsxs)(`group`,{scale:[1.45,1.16,1.15],position:[0,.018,0],children:[(0,E.jsx)(C,{geometry:Ft.headphones.shell,color:Gt,castShadow:!0}),(0,E.jsx)(C,{geometry:Ft.headphones.covers,color:a})]}),n&&(0,E.jsx)(Ve,{look:He(N.badgeRing,{shading:`glow`}),color:T.led,scale:.16,position:[0,-.235,-.19]})]})}function $t(e,t){return`/api/agents/${e}/screen?t=${t}`}function en(e,t,n){if(!t)return()=>{};let r=!0,i=new Image;return i.onload=()=>r&&n(i),i.onerror=()=>{},i.src=$t(e,t),()=>{r=!1,i.onload=null}}var tn=864e5;function nn(e){return{since:e,opened:0,merged:0,firstPass:0,qaPass:0,qaFail:0,fixRounds:0,run:0,best:0,reviews:0,costUsd:0,turns:0,recent:[],week:[]}}function rn(e){let t=e.qaPass+e.qaFail;return t?e.qaPass/t:null}var an=e=>e.merged?e.fixRounds/e.merged:null,on=(e,t)=>Math.max(0,(t-e.since)/tn),sn=(e,t)=>e.week.filter(e=>e>t-6048e5&&e<=t).length;function cn(e,t){let n=e.merged+e.reviews;return g(t,n>=40?`Legend`:n>=15?`Veteran`:n>=5?`Regular`:`Rookie`)}var ln=e=>e.reviews>e.merged&&e.reviews>=3;function un(e,t){let n=(e,n)=>g(t,e,n);return ln(e)?n(`QA reviews: {count} and counting`,{count:e.reviews}):e.best>=3?n(`First-time QA passes: {count} in a row`,{count:e.best}):rn(e)===1&&e.qaPass>=3?n(e.qaPass===1?`Never failed QA: {count} round passed`:`Never failed QA: {count} rounds passed`,{count:e.qaPass}):e.merged>=1&&an(e)===0?n(e.merged===1?`Clean shipper: {count} PR merged without a fix round`:`Clean shipper: {count} PRs merged without a fix round`,{count:e.merged}):e.merged>=1?n(e.merged===1?`Shipped {count} PR so far`:`Shipped {count} PRs so far`,{count:e.merged}):e.opened>=1?n(`First PR in review, fingers crossed`):n(`Fresh on the team: first task coming up`)}function dn(e,t){let n=null;for(let r of e){if(!r.career)continue;let e=sn(r.career,t);e!==0&&(!n||e>n.merges||e===n.merges&&r.career.merged>(n.who.career?.merged??0))&&(n={who:r,merges:e})}return n}var fn=[`duck`,`speaker`,`cradle`];function pn(e,t=null){if(t&&ln(t))return`magnifier`;let n=0;for(let t of e)n=n*31+t.charCodeAt(0)>>>0;return fn[n%fn.length]}var mn=e=>Math.min(1.6,.7+.13*Math.max(0,e));function hn(e,t,n){let r=on(e,n),i=e.recent.slice(0,8).map(e=>e.n);return{plaques:i,more:Math.max(0,e.merged-i.length),star:e.firstPass>=10,plant:mn(r),photo:r>=1,toy:r>=3?pn(t,e):null}}function gn(e,t,n){let r=Ye(n),i=Je(r,n.role),a=qe(r,n.role);e.save(),e.scale(t/160,t/160),e.clearRect(0,0,160,160);let o=(t,n,r,i,a,o)=>{e.beginPath(),e.roundRect(t,n,r,i,a),e.fillStyle=o,e.fill()},s=(t,n,r,i)=>{e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fillStyle=i,e.fill()};o(0,0,160,160,26,`#e2edf0`),o(49,113,62,54,20,T.shell),o(58,121,44,5,2,i),s(80,143,12,T.joint),e.strokeStyle=i,e.lineWidth=2,e.stroke(),e.fillStyle=i,e.font=`bold 13px monospace`,e.textAlign=`center`,e.fillText(a===`inspect`?`✓`:a===`plan`?`◇`:a===`coordinate`?`◎`:`<>`,80,148),o(19,60,20,38,9,i),o(121,60,20,38,9,i),o(22,65,10,28,5,T.joint),o(128,65,10,28,5,T.joint),e.strokeStyle=T.joint,e.lineWidth=5,e.lineCap=`round`,e.beginPath(),e.moveTo(90,41),e.lineTo(98,20),e.stroke(),s(99,16,6,i),o(31,35,98,81,25,T.shell),o(38,48,84,56,18,T.visor),o(67,36,26,4,2,i),e.strokeStyle=`#304858`,e.lineWidth=4,e.beginPath(),e.moveTo(49,59),e.quadraticCurveTo(50,54,64,54),e.stroke(),e.strokeStyle=T.led,e.lineWidth=4;for(let t of[62,98])e.beginPath(),e.moveTo(t-7,80),e.bezierCurveTo(t-7,62,t+7,62,t+7,80),e.stroke();if(e.strokeStyle=`#d8f6ff`,e.lineWidth=2,e.beginPath(),e.moveTo(75,93),e.quadraticCurveTo(80,96,85,93),e.stroke(),r.glasses!==`none`){e.strokeStyle=i,e.lineWidth=2;for(let t of[62,98])e.beginPath(),r.glasses===`square`?e.roundRect(t-14,59,28,28,6):e.arc(t,73,15,0,Math.PI*2),e.stroke();e.beginPath(),e.moveTo(77,72),e.lineTo(83,72),e.stroke()}r.headphones&&(e.strokeStyle=T.joint,e.lineWidth=5,e.beginPath(),e.moveTo(25,66),e.quadraticCurveTo(26,26,61,31),e.stroke()),r.headwear!==`none`&&(o(33,30,94,21,10,i),r.headwear===`cap`?o(72,45,63,6,3,i):s(80,26,7,T.shell)),e.restore()}var _n=700,vn=5,yn=e=>e===null?`—`:`${Math.round(e*100)}%`,bn=e=>e===null?`—`:e.toFixed(1);function xn(e,t,n){let r=on(e,t);if(r>=1)return g(n,Math.floor(r)===1?`{count} day`:`{count} days`,{count:Math.floor(r)});let i=r*24;if(i>=1)return g(n,Math.floor(i)===1?`{count} hour`:`{count} hours`,{count:Math.floor(i)});let a=Math.max(1,Math.round(i*60));return g(n,a===1?`{count} minute`:`{count} minutes`,{count:a})}function Sn(e,t,n){let r=Math.max(0,Math.round((t-e)/6e4));if(r<60)return r<=1?n(`just now`):n(`{count} min ago`,{count:r});let i=Math.round(r/60);return i<24?n(`{count} h ago`,{count:i}):n(`{count} d ago`,{count:Math.round(i/24)})}function Cn({agent:e,size:t}){let n=s(),r=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let n=r.current?.getContext(`2d`);n&&gn(n,t*2,e)},[e.id,e.look,e.role,e.color,e.hair,e.skin,e.style,t]),(0,E.jsx)(`canvas`,{ref:r,className:`career-portrait`,width:t*2,height:t*2,style:{width:t,height:t},"aria-label":n(`{name}’s portrait`,{name:e.name})})}function wn({label:e,value:t,title:n}){let r=s();return(0,E.jsxs)(`div`,{className:`career-stat`,title:n,children:[(0,E.jsx)(`b`,{children:t}),(0,E.jsx)(`span`,{children:r(e)})]})}function Tn({agent:e,compact:t=!1}){let n=s(),r=v(e=>e.settings.language),i=v(t=>t.repos.find(t=>t.id===e.repoId)),a=Date.now(),c=e.career;return c?(0,E.jsxs)(`div`,{className:`career-card ${t?`career-compact`:``}`,style:{"--accent":e.color},children:[(0,E.jsxs)(`div`,{className:`career-head`,children:[(0,E.jsx)(Cn,{agent:e,size:t?44:88}),(0,E.jsxs)(`div`,{className:`career-who`,children:[(0,E.jsx)(`div`,{className:`career-name`,children:e.name}),(0,E.jsxs)(`div`,{className:`career-title`,children:[cn(c,r),i?` · ${n(`floor {floor}`,{floor:i.floor})}`:``]}),c.firstPass>=10&&(0,E.jsx)(`div`,{className:`career-badges`,children:(0,E.jsx)(`span`,{className:`career-badge career-star`,children:(0,E.jsx)(o,{children:`⭐ 10 first-time passes`})})}),(0,E.jsxs)(`div`,{className:`career-known`,children:[`“`,un(c,r),`”`]})]})]}),(0,E.jsxs)(`div`,{className:`career-stats`,children:[(0,E.jsx)(wn,{label:`PRs merged`,value:c.merged}),(0,E.jsx)(wn,{label:`PRs opened`,value:c.opened}),(0,E.jsx)(wn,{label:`first-time QA`,value:c.firstPass,title:n(`PRs that passed QA on their first round`)}),(0,E.jsx)(wn,{label:`QA pass rate`,value:yn(rn(c)),title:n(`{passed} of {total} QA rounds on their PRs passed`,{passed:c.qaPass,total:c.qaPass+c.qaFail})}),(0,E.jsx)(wn,{label:`fix rounds / PR`,value:bn(an(c))}),(0,E.jsx)(wn,{label:`QA reviews`,value:c.reviews}),(0,E.jsx)(wn,{label:`longest streak`,value:c.best,title:n(`PRs in a row that passed QA first time`)}),(0,E.jsx)(wn,{label:`on the team`,value:xn(c,a,r)}),!t&&(0,E.jsx)(wn,{label:`est. cost`,value:`$${c.costUsd.toFixed(2)}`,title:n(`What the coding agents report, API-equivalent; subscription usage is billed by plan`)}),!t&&(0,E.jsx)(wn,{label:`turns`,value:c.turns})]}),c.recent.length>0&&(0,E.jsxs)(`div`,{className:`career-recent`,children:[!t&&(0,E.jsx)(`div`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Last merged`})}),c.recent.slice(0,t?1:vn).map(e=>(0,E.jsxs)(`div`,{className:`career-pr`,children:[t&&(0,E.jsxs)(`span`,{className:`muted`,children:[(0,E.jsx)(o,{children:`Last merged`}),` `]}),i?(0,E.jsxs)(`a`,{href:`https://github.com/${i.fullName}/pull/${e.n}`,target:`_blank`,rel:`noreferrer`,children:[`#`,e.n]}):(0,E.jsxs)(`b`,{children:[`#`,e.n]}),` `,(0,E.jsx)(`span`,{className:`career-pr-title`,children:e.title||n(`untitled`)}),` `,(0,E.jsx)(`span`,{className:`muted`,children:Sn(e.at,a,n)})]},e.n))]})]}):(0,E.jsx)(`div`,{className:`career-card muted small`,children:n(`{name} runs the company; their record is the whole office.`,{name:e.name})})}function En(){let e=v(e=>e.focus?.id.startsWith(`agent-`)?e.focus.id.slice(6):null),t=v(t=>e?t.agents[e]:void 0),n=v(e=>e.overlay),[r,i]=(0,w.useState)(null);return(0,w.useEffect)(()=>{if(!e)return i(null);let t=setTimeout(()=>i(e),_n);return()=>clearTimeout(t)},[e]),!t||r!==t.id||n||!t.career?null:(0,E.jsx)(`div`,{className:`career-peek`,"aria-live":`polite`,children:(0,E.jsx)(Tn,{agent:t,compact:!0})})}var Dn=[{key:`merged`,label:`Merged`,value:(e,t)=>t.merged},{key:`opened`,label:`Opened`,value:(e,t)=>t.opened},{key:`firstPass`,label:`1st-time QA`,title:`PRs that passed QA on their first round`,value:(e,t)=>t.firstPass},{key:`rate`,label:`Pass rate`,value:(e,t)=>rn(t)??-1,show:(e,t)=>yn(rn(t))},{key:`fixes`,label:`Fixes / PR`,title:`Fix rounds per merged PR`,value:(e,t)=>an(t)??-1,show:(e,t)=>bn(an(t))},{key:`reviews`,label:`Reviews`,title:`QA reviews done`,value:(e,t)=>t.reviews},{key:`best`,label:`Streak`,title:`Longest run of PRs passing QA first time`,value:(e,t)=>t.best},{key:`week`,label:`This week`,value:(e,t,n)=>sn(t,n)},{key:`since`,label:`On the team`,value:(e,t)=>-t.since,show:(e,t,n)=>xn(t,n)},{key:`cost`,label:`Cost`,title:`Estimated, as the coding agents report it`,value:(e,t)=>t.costUsd,show:(e,t)=>`$${t.costUsd.toFixed(2)}`},{key:`turns`,label:`Turns`,value:(e,t)=>t.turns}];function On(){let e=s(),t=v(e=>e.settings.language),n=v(e=>e.agents),r=v(e=>e.repos),i=v(e=>e.openOverlay),[a,c]=(0,w.useState)({key:`merged`,dir:-1}),l=Date.now(),u=Dn.find(e=>e.key===a.key),d=e=>r.find(t=>t.id===e.repoId)?.floor??0,f=Object.values(n).filter(e=>e.role!==`ceo`&&!!e.career).sort((e,t)=>{if(a.key===`name`)return e.name.localeCompare(t.name)*a.dir;if(a.key===`floor`)return(d(e)-d(t))*a.dir;let n=u.value(e,e.career,l),r=u.value(t,t.career,l);return(typeof n==`number`&&typeof r==`number`?n-r:String(n).localeCompare(String(r)))*a.dir||e.name.localeCompare(t.name)});if(!f.length)return null;let p=(t,n,r)=>(0,E.jsx)(`th`,{title:r?e(r):void 0,"aria-sort":a.key===t?a.dir===1?`ascending`:`descending`:`none`,children:(0,E.jsxs)(`button`,{className:`sort-btn`,onClick:()=>c({key:t,dir:a.key===t?-a.dir:t===`name`||t===`floor`?1:-1}),children:[e(n),a.key===t?a.dir===1?` ▲`:` ▼`:``]})},t);return(0,E.jsxs)(`div`,{className:`card team-stats`,children:[(0,E.jsxs)(`div`,{className:`row`,children:[(0,E.jsx)(`b`,{className:`grow`,children:(0,E.jsx)(o,{children:`🏅 Careers`})}),(0,E.jsx)(`span`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Counted from what the office sees: PRs, QA rounds, fixes and merges. Look at a desk for a moment to see its card.`})})]}),(0,E.jsx)(`div`,{className:`team-stats-scroll`,children:(0,E.jsxs)(`table`,{className:`team stats-table`,children:[(0,E.jsx)(`thead`,{children:(0,E.jsxs)(`tr`,{children:[p(`name`,`Name`),p(`floor`,`Floor`),Dn.map(e=>p(e.key,e.label,e.title))]})}),(0,E.jsx)(`tbody`,{children:f.map(n=>(0,E.jsxs)(`tr`,{children:[(0,E.jsxs)(`td`,{className:`nowrap`,children:[(0,E.jsx)(`span`,{className:`dot`,style:{background:n.color}}),` `,(0,E.jsx)(`button`,{className:`link-btn`,title:e(`Open their desk`),onClick:()=>i({kind:`terminal`,agentId:n.id}),children:n.name})]}),(0,E.jsx)(`td`,{children:r.find(e=>e.id===n.repoId)?.floor??`—`}),Dn.map(e=>(0,E.jsx)(`td`,{className:`num`,children:e.key===`since`?xn(n.career,l,t):e.show?e.show(n,n.career,l):e.value(n,n.career,l)},e.key))]},n.id))})]})})]})}var kn={width:210,height:280},An=.815,jn={pitch:-1.42,yaw:.1},Mn=[`joyful`,`puzzled`,`focused`,`surprised`,`sleepy`,`proud`,`stressed`],Nn=5.5,Pn=null;function Fn(){return Pn??=(async()=>{let e=document.createElement(`canvas`),t=Ae(e);return await t.configure({size:{...kn,top:0,left:0},dpr:[1,2],gl:{antialias:!0,alpha:!0},camera:{fov:28,near:.1,far:20,position:[0,1.02,4.5]},frameloop:`never`,onCreated:({camera:e})=>e.lookAt(0,1.02,0)}),{canvas:e,root:t}})(),Pn}function In({id:e}){let t=v(t=>t.agents[e]),n=(0,w.useMemo)(()=>t?Ye(t):null,[t]),r=(0,w.useRef)(null),i=(0,w.useRef)(null),a=(0,w.useMemo)(()=>({s:u(),seed:m(e)%10007}),[e]);if(je((e,t)=>{let n=c(),o=n?0:performance.now()/1e3;r.current&&(r.current.rotation.y=Math.PI+Math.sin(o*.6)*.45);let s=o%Nn>3.7;ne(a.s,s?Mn[Math.floor(o/Nn)%Mn.length]:`neutral`,Math.min(t,.1)),Zt(i,a.s,n?0:p(o,a.seed))}),!t||!n)return null;let o=Ue(T.shell);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`hemisphereLight`,{args:[`#fffaf0`,`#a48a6a`,.95]}),(0,E.jsx)(`ambientLight`,{intensity:.2}),(0,E.jsx)(`directionalLight`,{position:[1.5,3,4],intensity:1.7}),(0,E.jsxs)(`group`,{ref:r,children:[[-.11,.11].map(e=>(0,E.jsxs)(`group`,{position:[e,An,0],children:[(0,E.jsx)(`mesh`,{geometry:N.joint,material:Ue(Gt)}),(0,E.jsx)(`mesh`,{geometry:N.thigh,material:o,children:(0,E.jsx)(ze,{thickness:.012,color:Gt,angle:0})}),(0,E.jsxs)(`group`,{position:[0,-.32,0],children:[(0,E.jsx)(`mesh`,{geometry:N.joint,material:Ue(Gt)}),(0,E.jsx)(`mesh`,{geometry:N.shin,material:o,children:(0,E.jsx)(ze,{thickness:.012,color:Gt,angle:0})}),(0,E.jsx)(`mesh`,{geometry:N.shoe,material:Ue(Gt)})]})]},e)),(0,E.jsxs)(`group`,{position:[0,An,0],scale:n.height,children:[(0,E.jsx)(Yt,{agent:t,look:n,busy:!1}),[-1,1].map(e=>(0,E.jsx)(`group`,{position:[e*.25*Kt(n),.44,0],rotation:[jn.pitch,-e*jn.yaw,0],children:(0,E.jsx)(Xt,{agent:t,look:n})},e)),(0,E.jsx)(`group`,{position:[0,.7,0],scale:1.12,children:(0,E.jsx)(Qt,{agent:t,look:n,busy:!1,face:i})})]})]})]})}function Ln({id:e,label:t}){let n=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let t=!0,r=null;return Fn().then(({canvas:i,root:a})=>{if(!t||!n.current)return;n.current.appendChild(i);let o=a.render((0,E.jsx)(In,{id:e}));o.getState().setFrameloop(`always`),r={root:a,store:o,canvas:i}},e=>console.warn(`No look preview:`,e)),()=>{t=!1,r&&(r.store.getState().setFrameloop(`never`),r.root.render(null),r.canvas.remove())}},[e]),(0,E.jsx)(`div`,{ref:n,className:`look-preview`,style:kn,role:`img`,"aria-label":t})}var Rn=[`low`,`medium`,`high`,`xhigh`,`max`],zn=(e,t)=>e.find(e=>e.id===t)?.label??t;async function Bn(e,t){try{await i.updateAgent(e,t)}catch{}}function Vn({clis:e}){let t=s();return(0,E.jsx)(E.Fragment,{children:[...e].sort((e,t)=>Number(t.installed)-Number(e.installed)).map(e=>(0,E.jsxs)(`option`,{value:e.id,disabled:!e.installed||!!e.problem,title:e.problem,children:[e.label,t(e.installed?e.problem?` (incompatible version)`:``:` (not installed)`)]},e.id))})}function Hn({agent:e,id:t,className:n=`inline`,style:r}){let i=s();return(0,E.jsx)(`input`,{id:t,className:n,style:r,defaultValue:e.name,maxLength:24,"aria-label":t?void 0:i(`Name`),onBlur:t=>t.target.value.trim()&&t.target.value!==e.name&&void Bn(e.id,{name:t.target.value})},`n-${e.name}`)}function Un({agent:e,id:t,style:n}){let r=s(),i=v(e=>e.settings),a=v(e=>e.clis),o=e.role===`ceo`;return(0,E.jsxs)(`select`,{id:t,value:e.cli,title:r(`Their coding agent`),"aria-label":t?void 0:r(`Coding agent`),style:n,onChange:t=>void Bn(e.id,{cli:t.target.value}),children:[(0,E.jsxs)(`option`,{value:``,children:[zn(a,o?`claude`:i.defaultCli),` `,r(`(default)`)]}),(0,E.jsx)(Vn,{clis:o?a.filter(e=>e.id===`claude`||e.id===`opencode`):a})]})}var Wn={none:`no Box yet`,creating:`creating their Box…`,"setting-up":`setting up their Box…`,ready:`Box ready`,paused:`Box paused (wakes for their next task)`,disconnected:`reconnecting to their Box…`,error:`their Box couldn't be set up`};function Gn({agent:e,id:t,style:n}){let r=s(),i=v(e=>e.settings),o=v(e=>e.cloud.keySet),c=e.host===`box`,l=xe(e,i)===`opencode`,u=!!e.task||_(e),d=async t=>{await a({title:r(t===`box`?`Move {name} to the cloud?`:`Move {name} back to this computer?`,{name:e.name}),body:r(t===`box`?`Their local machine is removed (work that isn’t on GitHub is saved to leftovers first), and their next session starts fresh in an Upstash Box of their own.`:`Their cloud machine is removed (work that isn’t on GitHub is saved to leftovers first), and their next session starts fresh.`),confirm:r(`Move`)})&&await Bn(e.id,{host:t})};return(0,E.jsxs)(`select`,{id:t,value:c?`box`:`local`,disabled:u,style:n,title:r(u?`Move them once their task is done`:`Where they work`),"aria-label":t?void 0:r(`Works on`),onChange:e=>void d(e.target.value),children:[(0,E.jsx)(`option`,{value:`local`,children:r(`🖥️ This computer`)}),(0,E.jsxs)(`option`,{value:`box`,disabled:!c&&(!o||l),children:[`☁️ Upstash Box`,r(!c&&!o?` (connect Upstash in Settings first)`:!c&&l?` (OpenCode can’t run there)`:``)]})]})}function Kn({agent:e,id:t,className:n=`inline`,style:r}){let i=s(),a=v(e=>e.settings),o=(0,w.useId)(),c=xe(e,a);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`input`,{id:t,className:n,style:r,list:o,defaultValue:e.model,placeholder:(e.role===`ceo`?c===`claude`?ce[0]:``:he(``,c,a,ce[0]))||i(`agent default`),title:i(c===`opencode`?`OpenCode model: provider/model#variant (empty = OpenCode default)`:e.role===`ceo`?`The CEO’s model`:`Their model (empty = the default for their coding agent)`),"aria-label":t?void 0:i(`Model`),onBlur:t=>t.target.value!==e.model&&void Bn(e.id,{model:t.target.value})},`m-${e.model}-${c}`),c===`opencode`&&(0,E.jsx)(ue,{value:e.model,agent:e.id,inherited:e.role!==`ceo`&&a.defaultCli===`opencode`?a.defaultModel:void 0,onSelect:t=>void Bn(e.id,{model:t})}),(0,E.jsx)(`datalist`,{id:o,children:ie(c).map(e=>(0,E.jsx)(`option`,{value:e},e))})]})}function qn({agent:e,id:t,style:n}){let r=s(),i=v(e=>e.settings),a=i.defaultEffort;return xe(e,i)===`opencode`?(0,E.jsx)(Se,{value:e.model,agent:e.id,id:t,style:n,inherited:e.role!==`ceo`&&i.defaultCli===`opencode`?i.defaultModel:void 0,onSelect:t=>void Bn(e.id,{model:t})}):(0,E.jsxs)(`select`,{id:t,value:e.effort,title:r(e.role===`ceo`?`The CEO’s effort`:`Their effort`),"aria-label":t?void 0:r(`Effort`),style:n,onChange:t=>void Bn(e.id,{effort:t.target.value}),children:[(e.role!==`ceo`||!e.effort)&&(0,E.jsx)(`option`,{value:``,children:r(`default ({effort})`,{effort:a})}),Rn.map(e=>(0,E.jsx)(`option`,{value:e,children:e},e))]})}function Jn({agent:e,id:t}){let n=s();return(0,E.jsxs)(`select`,{id:t,value:e.look,title:n(`Agent identity`),"aria-label":t?void 0:n(`Agent identity`),style:{width:`auto`},onChange:t=>void Bn(e.id,{look:t.target.value}),children:[(0,E.jsx)(`option`,{value:`feminine`,children:n(`She`)}),(0,E.jsx)(`option`,{value:`masculine`,children:n(`He`)})]})}var Yn=e=>e[0].toUpperCase()+e.slice(1);function Xn({label:e,colors:t,value:n,onPick:r}){let i=s(),a=t.includes(n)?t:[n,...t];return(0,E.jsxs)(`div`,{className:`field`,children:[(0,E.jsx)(`span`,{children:i(e)}),(0,E.jsx)(`div`,{className:`swatches`,role:`radiogroup`,"aria-label":i(e),children:a.map(e=>(0,E.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===n,"aria-label":e,title:e,className:`swatch ${e===n?`swatch-on`:``}`,style:{background:e},onClick:()=>r(e)},e))})]})}function Zn({label:e,value:t,options:n,labels:r,onPick:i,disabled:a,title:o}){let c=s(),l=(0,w.useId)();return(0,E.jsxs)(`label`,{className:`field`,htmlFor:l,children:[(0,E.jsx)(`span`,{children:c(e)}),(0,E.jsx)(`select`,{id:l,"aria-label":c(e),value:t,disabled:a,title:o,onChange:e=>i(e.target.value),children:n.map(e=>(0,E.jsx)(`option`,{value:e,children:c(r?.[e]??Yn(e))},e))})]})}function Qn({agent:e}){let t=s(),n=(0,w.useMemo)(()=>Ye(e),[e]),r=t=>void Bn(e.id,{style:{...e.style,...t}});return(0,E.jsxs)(`fieldset`,{className:`look-editor`,children:[(0,E.jsx)(`legend`,{children:(0,E.jsx)(o,{children:`Look`})}),(0,E.jsxs)(`div`,{className:`look-body`,children:[(0,E.jsx)(Ln,{id:e.id,label:t(`{name} as they’ll look`,{name:e.name})}),(0,E.jsxs)(`div`,{className:`look-fields`,children:[(0,E.jsx)(Zn,{label:`Glasses`,value:n.glasses,options:me,onPick:e=>r({glasses:e})}),(0,E.jsx)(Zn,{label:`Headwear`,value:n.headwear,options:_e,onPick:e=>r({headwear:e})}),e.role===`ceo`?(0,E.jsxs)(`div`,{className:`field`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Shell module`})}),(0,E.jsx)(`span`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Coordination module`})})]}):(0,E.jsx)(Zn,{label:`Shell module`,value:n.outfit,options:ye,labels:Ke,onPick:e=>r({outfit:e})}),(0,E.jsx)(Zn,{label:`Build`,value:n.build,options:ge,onPick:e=>r({build:e})}),(0,E.jsx)(Xn,{label:`Accent colour`,colors:Ge,value:Ge[n.accent],onPick:e=>r({accent:Ge.indexOf(e)})})]})]}),(0,E.jsxs)(`div`,{className:`row wrap`,children:[(0,E.jsx)(`button`,{type:`button`,className:`btn btn-small`,onClick:()=>{let e=e=>e[Math.floor(Math.random()*e.length)];r({glasses:e(me),headwear:e(_e),outfit:e(ye),build:e(ge),accent:Math.floor(Math.random()*Ge.length)})},children:(0,E.jsx)(o,{children:`🎲 Shuffle`})}),(0,E.jsx)(`button`,{type:`button`,className:`btn btn-small btn-ghost`,disabled:!e.style,onClick:()=>void Bn(e.id,{style:null}),children:(0,E.jsx)(o,{children:`↺ Back to their seeded look`})}),(0,E.jsx)(`span`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Robot cosmetics only: modules do not change the agent’s job.`})})]})]})}function $n({agent:e}){let t=s(),[n,r]=(0,w.useState)(!1),[a,c]=(0,w.useState)(null),[l,u]=(0,w.useState)(!1),d=v(t=>{let n=t.repos.find(t=>t.id===e.repoId),r=t.settings;return JSON.stringify(n?[n.fullName,n.defaultBranch,n.autoMerge,n.browserTesting,n.links,n.mission,n.summary,n.qaBrief]:[r.companyName,r.managerName,r.sessionLimit,r.maxAgents,r.scaling,r.runtime])});return(0,w.useEffect)(()=>{if(!n)return;let t=!0;return i.agentPrompt(e.id).then(e=>{t&&(c(e),u(!1))},()=>t&&u(!0)),()=>{t=!1}},[n,e.id,e.name,e.cli,d]),(0,E.jsxs)(`details`,{className:`prompt-preview`,onToggle:e=>r(e.currentTarget.open),children:[(0,E.jsx)(`summary`,{children:(0,E.jsx)(o,{children:`What they’re told`})}),l&&!a&&(0,E.jsx)(`p`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Couldn’t load their prompt.`})}),!a&&!l&&(0,E.jsx)(`p`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Loading…`})}),a&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`muted small`,children:t(a.kind===`ceo`?`The CEO’s instructions for every job. They’re all the office’s own.`:`The office’s workflow and safety rules for each kind of task, the same for every agent and sent with every session; <placeholders> are filled in per task.`)}),a.parts.map(n=>(0,E.jsxs)(w.Fragment,{children:[(0,E.jsxs)(`p`,{className:`small`,children:[(0,E.jsx)(`b`,{children:n.label}),` `,(0,E.jsxs)(`span`,{className:`muted`,children:[`· `,t(`{count} characters`,{count:n.text.length.toLocaleString()})]})]}),(0,E.jsx)(`pre`,{className:`prompt-text`,tabIndex:0,"aria-label":t(`{name}’s prompt: {label}`,{name:e.name,label:n.label}),children:n.text})]},n.label))]})]})}function er({agent:e}){let t=s(),n=v(e=>e.settings.runtime===`terminal`),r=(0,w.useId)(),i=e.role===`ceo`;return(0,E.jsxs)(`section`,{className:`card agent-setup`,"aria-label":t(`{name}’s setup`,{name:e.name}),children:[(0,E.jsxs)(`div`,{className:`row wrap`,children:[(0,E.jsx)(`h3`,{className:`grow`,children:(0,E.jsx)(o,{children:`⚙️ Setup`})}),_(e)&&(0,E.jsx)(`span`,{className:`chip chip-warn`,role:`status`,children:(0,E.jsx)(o,{children:`Applies from their next task`})})]}),(0,E.jsxs)(`div`,{className:`setup-grid`,children:[!i&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-name`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Name`})}),(0,E.jsx)(Hn,{agent:e,id:`${r}-name`,className:``})]}),!i&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-look`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Agent identity`})}),(0,E.jsx)(Jn,{agent:e,id:`${r}-look`})]}),(n||e.host===`box`)&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-cli`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Coding agent`})}),(0,E.jsx)(Un,{agent:e,id:`${r}-cli`})]}),!i&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-host`,children:[(0,E.jsxs)(`span`,{children:[(0,E.jsx)(o,{children:`Works on`}),e.host===`box`&&e.cloud&&(0,E.jsxs)(`span`,{className:`muted`,children:[` · `,t(Wn[e.cloud])]})]}),(0,E.jsx)(Gn,{agent:e,id:`${r}-host`})]}),(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-model`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Model`})}),(0,E.jsx)(Kn,{agent:e,id:`${r}-model`,className:``})]}),(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-effort`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Effort`})}),(0,E.jsx)(qn,{agent:e,id:`${r}-effort`})]})]}),(0,E.jsx)(Qn,{agent:e}),(0,E.jsx)($n,{agent:e}),(0,E.jsx)(`p`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Name and model save when you leave them; the rest, and looks, as you pick them. Running sessions aren’t restarted.`})})]})}var tr=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,rr=(e,t)=>{for(var n in t)tr(e,n,{get:t[n],enumerable:!0})},P=(e,t,n,r)=>{for(var i=r>1?void 0:r?nr(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&tr(t,n,i),i},F=(e,t)=>(n,r)=>t(n,r,e),ir=`Terminal input`,ar={get:()=>ir,set:e=>ir=e},or=`Too much output to announce, navigate to rows manually to read`,sr={get:()=>or,set:e=>or=e};function cr(e){return e.replace(/\r?\n/g,`\r`)}function lr(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function ur(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function dr(e,t,n,r){e.stopPropagation(),e.clipboardData&&fr(e.clipboardData.getData(`text/plain`),t,n,r)}function fr(e,t,n,r){e=cr(e),e=lr(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function pr(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function mr(e,t,n,r,i){pr(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function hr(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function gr(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var _r=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o)}else i!==65279&&(t[r++]=i)}return r}},vr=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128||(c=(i&31)<<6|a&63,c<128)){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},yr=``,br=` `,xr=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Sr}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Sr=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Cr=class e extends xr{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Sr,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?hr(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},wr=`di$target`,Tr=`di$dependencies`,Er=new Map;function Dr(e){return e[Tr]||[]}function I(e){if(Er.has(e))return Er.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Or(t,e,r)};return t._id=e,Er.set(e,t),t}function Or(e,t,n){t[wr]===t?t[Tr].push({id:e,index:n}):(t[Tr]=[{id:e,index:n}],t[wr]=t)}var kr=I(`BufferService`),Ar=I(`CoreMouseService`),jr=I(`CoreService`),Mr=I(`CharsetService`),Nr=I(`InstantiationService`),Pr=I(`LogService`),Fr=I(`OptionsService`),Ir=I(`OscLinkService`),Lr=I(`UnicodeService`),Rr=I(`DecorationService`),zr=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new Cr,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Br(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};zr=P([F(0,kr),F(1,Fr),F(2,Ir)],zr);function Br(e,t){if(confirm(`Do you want to navigate to ${t}?
1
+ import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{s as n,t as r}from"./jsx-runtime-CXW0f58S.js";import{c as i,l as a,o,s,y as c}from"./index-CDJgPTOC.js";import{At as l,Ln as u,Mn as d,Nn as f,Pn as p,Wn as m,a as h,hs as g,i as _,jn as ee,p as v,t as te,zn as ne}from"./store-CXLtXw8e.js";import{$ as re,A as ie,F as ae,I as oe,L as se,N as y,O as ce,P as le,R as ue,at as de,et as fe,g as b,i as pe,it as me,k as he,nt as ge,ot as _e,rt as ve,st as ye,v as be,y as xe,z as Se}from"./AccessibilitySettings-HB1JfQbh.js";import{A as x,Bt as S,C as Ce,D as we,F as Te,Mt as Ee,S as De,T as Oe,at as ke,c as Ae,f as je,gt as Me,k as Ne,kt as Pe,pt as Fe,tt as Ie,x as Le}from"./bloomMarks-DRhDp19k.js";import{t as Re}from"./BufferGeometryUtils-CmpUrBC5.js";import{a as ze,i as Be,n as Ve,o as He,r as C}from"./Batched-CTJWq46z.js";import{U as Ue,f as We}from"./rig-DfdntE8m.js";var w=t(n(),1),T={shell:`#eee9dd`,joint:`#243644`,visor:`#081725`,led:`#56dfff`,gold:`#ffbd50`},Ge=[`#ff951e`,`#00b9e7`,`#b673e2`,`#ffbd50`,`#37c879`,`#ef5261`],Ke={tee:`Code module`,hoodie:`Code module · reinforced`,stripe:`Planning module`,cardigan:`Planning module · reinforced`,sweater:`Inspection module`,turtleneck:`Inspection module · reinforced`},qe=(e,t)=>t===`ceo`?`coordinate`:e.outfit===`sweater`||e.outfit===`turtleneck`?`inspect`:e.outfit===`stripe`||e.outfit===`cardigan`?`plan`:`code`,Je=(e,t)=>Ge[e.accent];function Ye(e){let t=fe(e),n=e.style?.headwear??t.headwear,r=qe(t,e.role),i=e.style?.accent??(r===`coordinate`?3:r===`inspect`?2:+(r===`plan`));return{...t,hair:`buzz`,facialHair:`none`,skin:T.shell,hairColor:T.joint,accent:i,headwear:n,headphones:n===`none`&&(t.headphones||r===`code`)}}var E=r(),Xe=new S;function Ze(e,t,n,r,i,a){let o=2*Math.PI*i/4,s=Math.max(a-2*i,0),c=Math.PI/4;Xe.copy(t),Xe[r]=0,Xe.normalize();let l=.5*o/(o+s),u=1-Xe.angleTo(e)/c;return Math.sign(Xe[n])===1?u*l:s/(o+s)+l+l*(1-u)}var Qe=class e extends Le{constructor(e=1,t=1,n=1,r=2,i=.1){let a=r*2+1;if(i=Math.min(e/2,t/2,n/2,i),super(1,1,1,a,a,a),this.type=`RoundedBoxGeometry`,this.parameters={width:e,height:t,depth:n,segments:r,radius:i},a===1)return;let o=this.toNonIndexed();this.index=null,this.attributes.position=o.attributes.position,this.attributes.normal=o.attributes.normal,this.attributes.uv=o.attributes.uv;let s=new S,c=new S,l=new S(e,t,n).divideScalar(2).subScalar(i),u=this.attributes.position.array,d=this.attributes.normal.array,f=this.attributes.uv.array,p=u.length/6,m=new S,h=.5/a;for(let r=0,a=0;r<u.length;r+=3,a+=2)switch(s.fromArray(u,r),c.copy(s),c.x-=Math.sign(c.x)*h,c.y-=Math.sign(c.y)*h,c.z-=Math.sign(c.z)*h,c.normalize(),u[r+0]=l.x*Math.sign(s.x)+c.x*i,u[r+1]=l.y*Math.sign(s.y)+c.y*i,u[r+2]=l.z*Math.sign(s.z)+c.z*i,d[r+0]=c.x,d[r+1]=c.y,d[r+2]=c.z,Math.floor(r/p)){case 0:m.set(1,0,0),f[a+0]=Ze(m,c,`z`,`y`,i,n),f[a+1]=1-Ze(m,c,`y`,`z`,i,t);break;case 1:m.set(-1,0,0),f[a+0]=1-Ze(m,c,`z`,`y`,i,n),f[a+1]=1-Ze(m,c,`y`,`z`,i,t);break;case 2:m.set(0,1,0),f[a+0]=1-Ze(m,c,`x`,`z`,i,e),f[a+1]=Ze(m,c,`z`,`x`,i,n);break;case 3:m.set(0,-1,0),f[a+0]=1-Ze(m,c,`x`,`z`,i,e),f[a+1]=1-Ze(m,c,`z`,`x`,i,n);break;case 4:m.set(0,0,1),f[a+0]=1-Ze(m,c,`x`,`y`,i,e),f[a+1]=1-Ze(m,c,`y`,`x`,i,t);break;case 5:m.set(0,0,-1),f[a+0]=Ze(m,c,`x`,`y`,i,e),f[a+1]=1-Ze(m,c,`y`,`x`,i,t)}}static fromJSON(t){return new e(t.width,t.height,t.depth,t.segments,t.radius)}},$e=new Ie,et=new Me,tt=new Te;function D(e,{at:t=[0,0,0],rot:n=[0,0,0],scale:r=[1,1,1]}={}){return et.setFromEuler(tt.set(...n)),e.applyMatrix4($e.compose(new S(...t),et,new S(...r))),e}function O(...e){e.some(e=>!e.index)&&(e=e.map(e=>e.index?e.toNonIndexed():e));let t=Re(e);if(!t)throw Error(`could not merge character geometry`);return e.forEach(e=>e.dispose()),t}var k=(e,t=14,n=10)=>new Pe(e,t,n),nt=(e,t,n=6,r=12)=>new Oe(e,t,n,r),A=(e,t,n)=>new Le(e,t,n);function rt(e,t,n,r=.006,i=.2){return e.rotateY(-t),e.translate(Math.sin(t)*(i+r),n,-Math.cos(t)*(i+r))}function it(e,t,n){let r=t.clone().sub(e),i=new x(n,n,r.length(),6);return i.applyQuaternion(new Me().setFromUnitVectors(new S(0,1,0),r.normalize())),i.translate((e.x+t.x)/2,(e.y+t.y)/2,(e.z+t.z)/2)}var at=()=>D(new Pe(.215,24,16,0,Math.PI*2,0,1.75),{at:[0,.02,.01],rot:[.55,0,0]});function ot(e,t,n){let r=[];for(let i=0;i<e;i++){let a=1-2*(i+.5)/e,o=Math.sqrt(1-a*a),s=i*2.39996,c=new S(Math.cos(s)*o,a,Math.sin(s)*o).multiplyScalar(t);n(c)&&r.push(c)}return r}function st(e){switch(e){case`crop`:return at();case`long`:return O(at(),D(k(.215,20,14),{at:[0,-.1,.07],scale:[1.05,1.25,.8]}));case`ponytail`:{let e={at:[0,.08,.2],rot:[.45,0,0]},t=D(nt(.075,.24,6,10),{at:[0,-.17,.04]});return O(at(),D(k(.085,12,10),e),D(t,e))}case`bun`:return O(at(),D(k(.1,14,10),{at:[0,.18,.12]}));case`quiff`:{let e=[-.09,-.045,0,.045,.09].map((e,t)=>D(new Ne(.058,.19+t%2*.04,8),{at:[e,.2-Math.abs(e)*.45,-.09+Math.abs(e)*.35],rot:[-.75,0,-e*3]}));return e.push(D(k(.1,14,10),{at:[0,.17,-.1],scale:[1.4,.7,1]})),O(at(),...e)}case`afro`:{let e=new S(0,.1,.06),t=ot(26,.235,e=>e.z>-.08&&e.y>-.15).map(t=>D(k(.075,10,8),{at:[e.x+t.x,e.y+t.y,e.z+t.z]}));return O(D(k(.245,22,16),{at:[e.x,e.y,e.z]}),...t)}case`sidePart`:return O(at(),D(k(.12,16,10),{at:[.05,.16,-.1],rot:[.3,0,-.35],scale:[1.35,.5,.9]}),D(k(.07,12,8),{at:[-.08,.2,-.04],scale:[1,.6,1.2]}));case`buzz`:return D(new Pe(.205,24,14,0,Math.PI*2,0,1.6),{at:[0,.015,.012],rot:[.5,0,0]});case`bald`:return new Pe(.208,24,6,-.3,Math.PI+.6,1.2,.58);case`curls`:{let e=ot(60,.2,e=>e.y>.02&&e.y+e.z*.9>-.02).map(e=>D(k(.055,8,6),{at:[e.x*1.02,e.y+.03,e.z*1.02+.01]}));return O(at(),...e)}case`bob`:return O(at(),D(new Pe(.226,24,12,-.45,Math.PI+.9,.35,1.78),{at:[0,0,.015],scale:[1.08,1,1]}),D(k(.12,16,10),{at:[0,.145,-.13],scale:[1.45,.45,.8]}));case`mohawk`:{let e=[-.62,-.31,0,.31,.62,.93].map((e,t)=>{let n=.12+t%2*.03;return D(new Ne(.05,n,8),{at:[0,(.2+n/2)*Math.cos(e),(.2+n/2)*Math.sin(e)],rot:[e,0,0],scale:[.5,1,1]})});return O(st(`buzz`),...e)}case`locs`:{let e=Array.from({length:11},(e,t)=>{let n=-1.75+t*3.5/10;return D(nt(.03,.2,3,6),{at:[Math.sin(n)*.19,-.06-t%3*.02,Math.cos(n)*.17+.02],rot:[-.25*Math.cos(n),0,.25*Math.sin(n)]})});return O(at(),...e)}}}function ct(e,t,n,r,i){let a=e.toNonIndexed(),o=a.attributes,s=[],c=o.position;for(let e=0;e<c.count;e+=3){let a=(c.getX(e)+c.getX(e+1)+c.getX(e+2))/3,o=(c.getY(e)+c.getY(e+1)+c.getY(e+2))/3;(c.getZ(e)+c.getZ(e+1)+c.getZ(e+2))/3<0&&((a-t)/r)**2+((o-n)/i)**2<1||s.push(e,e+1,e+2)}let l=new Ce;for(let e of[`position`,`normal`,`uv`]){let t=o[e],n=new Float32Array(s.length*t.itemSize);s.forEach((e,r)=>{for(let i=0;i<t.itemSize;i++)n[r*t.itemSize+i]=t.array[e*t.itemSize+i]}),l.setAttribute(e,new De(n,t.itemSize))}return e.dispose(),a.dispose(),l}var lt=(e,t)=>ct(new Pe(e,28,12,Math.PI-.15,Math.PI+.3,t,Math.PI-t),0,-.088,.07,.048),ut=()=>O(...[-1,1].map(e=>D(nt(.022,.05,4,8),{at:[e*.036,-.052,-.197],rot:[.25,0,e*1.2],scale:[1,1,.7]})));function dt(e){switch(e){case`none`:return null;case`stubble`:return lt(.203,2);case`moustache`:return ut();case`beard`:return O(D(lt(.212,1.95),{at:[0,.012,-.004],scale:[1.03,1.12,1.04]}),...[-1,1].map(e=>D(nt(.028,.09,4,8),{at:[e*.188,-.07,-.035],rot:[0,0,e*.25]})),ut())}}function ft(e){if(e===`none`)return null;let t=-.215,n=e===`round`?[-.075,.075].map(e=>D(new Ee(.047,.01,6,20),{at:[e,.02,t]})):[-.078,.078].flatMap(e=>[D(A(.1,.018,.016),{at:[e,.058,t]}),D(A(.1,.014,.016),{at:[e,-.02,t]}),D(A(.014,.09,.016),{at:[e-.045,.02,t]}),D(A(.014,.09,.016),{at:[e+.045,.02,t]})]),r=[-1,1].map(e=>D(A(.012,.012,.19),{at:[e*.172,.035,-.11],rot:[0,e*.4,0]}));return O(...n,D(A(.05,.012,.012),{at:[0,.03,t]}),...r)}function pt(){let e=D(new Ee(.245,.018,6,28,Math.PI),{at:[0,0,.01]}),t=[-1,1].map(e=>D(new x(.072,.072,.055,18),{at:[e*.235,-.01,.01],rot:[0,0,Math.PI/2]})),n=[-1,1].map(e=>D(new x(.052,.052,.012,18),{at:[e*.266,-.01,.01],rot:[0,0,Math.PI/2]}));return{shell:O(e,...t),covers:O(...n)}}function mt(e){switch(e){case`none`:return null;case`beanie`:{let e=.228,t=1.42,n={at:[0,.035,.02],rot:[.35,0,0]};return O(D(new Pe(e,24,12,0,Math.PI*2,0,t),n),D(D(new Ee(e*Math.sin(t),.03,8,28),{at:[0,e*Math.cos(t),0],rot:[Math.PI/2,0,0]}),n),D(k(.06,12,8),{at:[0,.035+.258*Math.cos(.35),.02+.258*Math.sin(.35)]}))}case`cap`:{let e=.224,t=1.35,n={at:[0,.02,.015],rot:[.18,0,0]};return O(D(new Pe(e,24,12,0,Math.PI*2,0,t),n),D(D(new x(.14,.14,.014,24,1,!1,Math.PI/2,Math.PI),{at:[0,e*Math.cos(t),-.13],rot:[-.08,0,0],scale:[1,1,.9]}),n),D(k(.022,8,6),{at:[0,.02+e*Math.cos(.18),.015+e*Math.sin(.18)]}))}}}function ht(e){switch(e){case`tee`:return{main:null,trim:null};case`stripe`:return{main:null,trim:new x(.204,.204,.075,28,1,!0).translate(0,.32,0)};case`hoodie`:return{main:O(D(new Ee(.12,.055,10,24),{at:[0,.5,.03],rot:[Math.PI/2-.35,0,0],scale:[1.05,1.15,1]}),D(k(.11,16,10),{at:[0,.5,.12],scale:[1.05,.9,.55]}),D(A(.22,.1,.02),{at:[0,.14,-.196]})),trim:O(...[-1,1].flatMap(e=>[D(nt(.01,.11,3,6),{at:[e*.045,.39,-.196],rot:[-.25,0,e*.08]}),D(k(.016,8,6),{at:[e*.05,.32,-.208]})]))};case`cardigan`:return{main:O(...[-1,1].map(e=>rt(A(.03,.3,.016),e*.3,.29,.004)),...[-1,1].map(e=>rt(A(.075,.06,.012),e*.62,.13,.002,.19))),trim:O(rt(A(.09,.3,.012),0,.29,0),...[.37,.29,.21].map(e=>rt(k(.012,8,6),.3,e,.014)))};case`turtleneck`:return{main:O(D(new Ee(.16,.04,8,28),{at:[0,.49,0],rot:[Math.PI/2,0,0]}),D(new Ee(.14,.035,8,28),{at:[0,.54,0],rot:[Math.PI/2,0,0]})),trim:null};case`sweater`:{let e=[-.12,-.06,0,.06,.12].map(e=>{let t=-Math.sqrt(.2*.2-e*e)-.004;return D(A(.04,.04,.012),{at:[e,.33,t],rot:[0,-Math.asin(e/.2),Math.PI/4]})});return{main:null,trim:O(D(new Ee(.105,.045,10,24),{at:[0,.505,-.01],rot:[Math.PI/2,0,0]}),new x(.206,.206,.05,28,1,!0).translate(0,.2,0),...e)}}}}var gt=(e,t,n=.2)=>-Math.sqrt(Math.max(0,n*n-e*e-t*t)),_t={x:.07,y:.02,z:-.18,r:.03};function vt(e,t,n,r){let i=Math.min(1,Math.abs(e.x-Math.sign(e.x)*_t.x)/_t.r);e.y=_t.y+(e.y-_t.y)*t+n+r*(1-i*i)}function yt(e){let t=[-1,1].map(e=>D(k(_t.r,10,8),{at:[e*_t.x,_t.y,_t.z]}));return e&&t.push(...[-1,1].map(e=>D(A(.035,.008,.008),{at:[e*.1,.045,-.172],rot:[0,0,e*-.6]}))),O(...t)}var bt=[e=>vt(e,.2,-.006,-.007),e=>{let t=Math.sign(e.x)*_t.x;e.x=t+(e.x-t)*1.18,e.y=_t.y+(e.y-_t.y)*1.3+.004},e=>vt(e,.22,.002,.013)],xt={x:.072,y:.078};function St(e,t,n){let r=Math.sign(e.x),i=e.y+t+n*(r*xt.x-e.x)*r;e.z+=gt(e.x,i)-gt(e.x,e.y),e.y=i}var Ct=()=>O(...[-1,1].map(e=>D(nt(.011,.045,3,8),{at:[e*xt.x,xt.y,gt(e*xt.x,xt.y)-.004],rot:[0,-e*Math.asin(xt.x/.2),Math.PI/2-e*.12],scale:[1,1,.7]}))),wt=[e=>St(e,-.007,-.45),e=>St(e,.004,.55),e=>St(e,.024,.05),e=>e.x<0?St(e,.02,-.1):St(e,-.005,-.4),e=>St(e,-.01,.15)],Tt=(e,t,n,r=0)=>({w:e,x:r,y:t,top:e=>n(e)+.0065*(1-.4*e*e),bottom:e=>n(e)-.0065*(1-.4*e*e)}),Et=[Tt(.046,-.09,e=>.011-.022*(1-e*e)),Tt(.04,-.1,e=>.016*(1-e*e)-.008),Tt(.036,-.094,()=>0),{w:.056,y:-.08,top:e=>-.005*(1-e*e),bottom:e=>-.052*(1-e*e)**.7},{w:.024,y:-.1,top:e=>.026*Math.sqrt(1-e*e),bottom:e=>-.026*Math.sqrt(1-e*e)},Tt(.046,-.097,e=>.006*Math.sin(e*Math.PI*2)),Tt(.036,-.095,e=>.011*e,.012)],Dt=14;function Ot(e){let t=new Float32Array(90);for(let n=0;n<=Dt;n++){let r=-1+2*n/Dt,i=(e.x??0)+r*e.w,a=e.y+e.top(r),o=e.y+e.bottom(r);t.set([i,a,gt(i,a,.2045),i,o,gt(i,o,.2045)],n*6)}return t}function kt(){let e=new Ce;e.setAttribute(`position`,new De(Ot(Et[0]),3)),e.setAttribute(`uv`,new De(new Float32Array(60),2));let t=[];for(let e=0;e<Dt;e++){let n=e*2;t.push(n,n+2,n+1,n+2,n+3,n+1)}return e.setIndex(t),e.computeVertexNormals(),e}var At=Et.slice(1).map(Ot);function jt(e){let t=[[yt(e),bt],[Ct(),wt],[kt(),At]],n=t.map(([e])=>e.attributes.position.count),r=O(...t.map(([e])=>e)),i=r.attributes.position;if(i.count!==n.reduce((e,t)=>e+t,0))throw Error(`face parts merged out of order`);let a=new S,o=[],s=0;if(t.forEach(([,e],t)=>{for(let r of e){let e=Float32Array.from(i.array);for(let o=0;o<n[t];o++)r instanceof Float32Array?a.fromArray(r,o*3):r(a.fromBufferAttribute(i,s+o)),a.toArray(e,(s+o)*3);o.push(new De(e,3))}s+=n[t]}),o.length!==d)throw Error(`the face has ${o.length} morph targets, face.ts expects ${d}`);return r.morphAttributes.position=o,r}function Mt(){return{lapels:O(...[-1,1].map(e=>rt(A(.065,.22,.014).rotateZ(-e*.36),e*.36,.36,.005))),button:rt(k(.014,10,8),0,.11,.004,.187),square:rt(A(.035,.035,.01).rotateZ(Math.PI/4),-.55,.39,.006)}}function Nt(){let e=(e,t)=>{let n=t>.42?Math.sqrt(.04-(t-.42)**2):.2;return new S(e,t,-Math.sqrt(n*n-e*e)-.007)};return{strap:O(...[-1,1].flatMap(t=>{let n=[.53,.49,.45,.41].map(n=>e(t*.07,n));return n.push(new S(t*.012,.235,-.214)),n.slice(1).map((e,t)=>it(n[t],e,.006))})),card:D(A(.055,.075,.01),{at:[0,.195,-.214]})}}function Pt(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}var Ft={legs:O(...[-.11,.11].flatMap(e=>[D(nt(.08,.26),{at:[e,.5,-.17],rot:[Math.PI/2,0,0]}),D(nt(.07,.3),{at:[e,.27,-.36]})])),shoes:O(...[-.11,.11].map(e=>D(A(.13,.09,.22),{at:[e,.05,-.42]}))),thigh:D(nt(.08,.26),{at:[0,-.13,0]}),shin:D(nt(.07,.3),{at:[0,-.23,0]}),shoe:D(A(.13,.09,.22),{at:[0,-.45,-.06]}),torso:nt(.2,.24,8,16),collar:new Ee(.1,.03,8,20),sleeve:nt(.065,.36,6,12),hand:k(.07,14,10),head:k(.2,24,18),ears:O(...[-.2,.2].map(e=>D(k(.05,10,8),{at:[e,-.01,0]}))),face:jt(!1),faceLashes:jt(!0),nose:k(.028,10,8),cheeks:O(...[-1,1].map(e=>D(k(.03,10,8),{at:[e*.115,-.045,-.165],scale:[1,.6,.3]}))),hairClip:A(.07,.035,.035),shirtFront:A(.11,.22,.02),tie:A(.045,.2,.012),tieKnot:A(.06,.04,.02),blazer:Mt(),lanyard:Nt(),phone:A(.075,.014,.13),phoneScreen:D(new Fe(.06,.105),{at:[0,.0075,0],rot:[-Math.PI/2,0,0]}),hair:Pt(de,st),facialHair:Pt(ve,dt),glasses:Pt(me,e=>ft(e)),headphones:pt(),headwear:Pt(_e,mt),outfit:Pt(ye,ht)},j=(e,t,n,r)=>new Qe(e,t,n,2,r),It=e=>new Pe(e,12,8),Lt=(e,t=.012)=>new Ee(e,t,6,24);function Rt(...e){let t=e.map(e=>e.index?e.toNonIndexed():e),n=Re(t);return new Set([...e,...t]).forEach(e=>e.dispose()),n}function zt(e,t,n=.012){let r=new S(...e),i=new S(...t),a=i.clone().sub(r);return new x(n,n,a.length(),8).applyQuaternion(new Me().setFromUnitVectors(new S(0,1,0),a.normalize())).translate(...r.add(i).multiplyScalar(.5).toArray())}function Bt(){let e=Ft.face.clone(),t=Ft.face.attributes.position;return[e.attributes.position,...e.morphAttributes.position??[]].forEach((e,n)=>{for(let r=0;r<e.count;r++){let i=e.getY(r);if(t.getY(r)>=-.011&&t.getY(r)<=.051&&n!==f.eyes+ee.wide+1){let e=(t.getX(r)-Math.sign(t.getX(r))*.07)/.03;i=.012+(n===f.eyes+ee.closed+1?-.004:n===f.eyes+ee.happy+1?.043:.033)*(1-e*e)+(t.getY(r)-.02)*.34}t.getY(r)>.051&&(i=.078+(i-.078)*.65),e.setXYZ(r,e.getX(r)*1.6,i*1.15,-.269+(e.getZ(r)+.2)*.04)}}),e.computeVertexNormals(),e}var M=-.208,Vt=Rt(zt([-.03,.31,M],[-.055,.285,M],.007),zt([-.055,.285,M],[-.03,.26,M],.007),zt([.03,.31,M],[.055,.285,M],.007),zt([.055,.285,M],[.03,.26,M],.007),zt([.012,.315,M],[-.012,.255,M],.006)),Ht=Rt(...[[-.04,.26],[.04,.26],[0,.32]].map(([e,t])=>j(.028,.025,.008,.004).translate(e,t,M)),zt([0,.31,M],[-.04,.27,M],.004),zt([0,.31,M],[.04,.27,M],.004)),Ut=Rt(zt([-.04,.285,M],[-.01,.26,M],.009),zt([-.01,.26,M],[.04,.315,M],.009)),Wt=Rt(Lt(.035,.007).translate(0,.285,M),...[-1,1].map(e=>zt([e*.025,.285,M],[e*.055,.285,M],.007))),N={head:j(.62,.49,.43,.13).translate(0,.025,0),visor:j(.535,.355,.085,.095).translate(0,.01,-.212),face:Bt(),ears:Rt(...[-1,1].map(e=>new x(.104,.104,.065,20).rotateZ(Math.PI/2).translate(e*.325,.015,0))),earRings:Rt(...[-1,1].map(e=>Lt(.075,.012).rotateY(Math.PI/2).translate(e*.365,.015,0))),antenna:Rt(It(.035).translate(.09,.27,.04),zt([.09,.27,.04],[.14,.405,.04],.013)),antennaTip:It(.035).translate(.14,.425,.04),headTrim:Rt(j(.14,.015,.12,.006).translate(0,.272,-.015),j(.07,.012,.012,.004).translate(0,-.193,-.208)),torso:j(.4,.4,.33,.115).translate(0,.29,0),neck:new x(.075,.075,.12,12).translate(0,.52,0),torsoTrim:Rt(j(.27,.035,.025,.008).translate(0,.425,-.158),j(.25,.025,.025,.008).translate(0,.13,-.15)),guards:Rt(...[-1,1].map(e=>j(.06,.23,.035,.012).translate(e*.16,.29,-.135))),badge:new x(.077,.077,.025,24).rotateX(Math.PI/2).translate(0,.285,-.178),badgeRing:Lt(.074,.008).translate(0,.285,-.197),emblems:{code:Vt,plan:Ht,inspect:Ut,coordinate:Wt},arm:Rt(j(.14,.14,.15,.04).translate(0,0,-.13),j(.15,.15,.17,.045).translate(0,0,-.34)),armJoints:Rt(It(.075),It(.059).translate(0,0,-.235),It(.057).translate(0,0,-.445)),wrist:new x(.077,.077,.025,14).rotateX(Math.PI/2).translate(0,0,-.414),hand:Rt(j(.13,.095,.105,.03).translate(0,0,-.5),...[-.04,0,.04].map(e=>j(.028,.04,.065,.012).translate(e,.012,-.55))),joint:It(.074),thigh:j(.15,.23,.16,.045).translate(0,-.16,0),shin:j(.15,.26,.15,.045).translate(0,-.23,0),shoe:j(.17,.12,.25,.045).translate(0,-.44,-.065),legs:Rt(...[-.11,.11].flatMap(e=>[j(.15,.16,.31,.045).translate(e,.5,-.17),j(.15,.32,.15,.045).translate(e,.25,-.36)])),shoes:Rt(...[-.11,.11].map(e=>j(.17,.12,.25,.045).translate(e,.06,-.42))),lensRim:Lt(.09,.014),lensHandle:zt([0,-.09,0],[0,-.23,0],.019),lensGlass:new we(.076,24).rotateY(Math.PI),lensReflection:Rt(zt([-.042,.005,-.004],[.012,.055,-.004],.006),zt([-.018,-.025,-.004],[.035,.025,-.004],.004))},Gt=T.joint,Kt=e=>re[e.build].width*e.shoulders,qt=new ke({color:`#ffffff`,specular:`#4c7184`,shininess:90}),Jt=new ke({color:T.visor,specular:`#4c7184`,shininess:90});function Yt({agent:e,look:t}){let n=Je(t,e.role),r=qe(t,e.role);return(0,E.jsxs)(`group`,{scale:[Kt(t),1,re[t.build].depth],children:[(0,E.jsx)(C,{geometry:N.torso,color:T.shell,castShadow:!0,outline:.009}),(0,E.jsx)(C,{geometry:N.neck,color:Gt}),(0,E.jsx)(C,{geometry:N.torsoTrim,color:n}),[`hoodie`,`cardigan`,`turtleneck`].includes(t.outfit)&&(0,E.jsx)(C,{geometry:N.guards,color:n}),(0,E.jsx)(C,{geometry:N.badge,color:T.visor}),(0,E.jsx)(C,{geometry:N.badgeRing,color:n}),(0,E.jsx)(Ve,{look:He(N.emblems[r],{shading:`glow`}),color:n}),r===`inspect`&&(0,E.jsxs)(`group`,{position:[.29,.24,-.1],rotation:[0,0,-.35],children:[(0,E.jsx)(C,{geometry:N.lensHandle,color:Gt}),(0,E.jsx)(C,{geometry:N.lensRim,color:n}),(0,E.jsx)(C,{geometry:N.lensGlass,color:`#a8deed`}),(0,E.jsx)(C,{geometry:N.lensReflection,color:`#f4fcff`})]})]})}function Xt({agent:e,look:t}){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(C,{geometry:N.armJoints,color:Gt}),(0,E.jsx)(C,{geometry:N.arm,color:T.shell,castShadow:!0,outline:.006}),(0,E.jsx)(C,{geometry:N.wrist,color:Je(t,e.role)}),(0,E.jsx)(C,{geometry:N.hand,color:Gt,castShadow:!0})]})}function Zt(e,t,n){let r=e.current?.morphTargetInfluences;if(r){for(let e=0;e<d;e++)r[e]=t.w[e];for(let e=f.eyes;e<f.brows;e++)r[e]*=1-n;r[f.eyes+ee.closed]+=n}}function Qt({agent:e,look:t,busy:n,face:r}){let i=Be(),a=Je(t,e.role),o=Ft.glasses[t.glasses],s=Ft.headwear[t.headwear];return(0,w.useLayoutEffect)(()=>r.current?.updateMorphTargets(),[r]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(C,{geometry:N.head,color:T.shell,castShadow:!0,outline:.008}),(0,E.jsx)(Ve,{look:He(N.visor,{material:i?qt:Jt}),color:T.visor}),(0,E.jsx)(C,{geometry:N.ears,color:Gt}),(0,E.jsx)(C,{geometry:N.earRings,color:a}),(0,E.jsx)(C,{geometry:N.antenna,color:Gt}),(0,E.jsx)(Ve,{look:He(N.antennaTip,{shading:`glow`}),color:a}),(0,E.jsx)(C,{geometry:N.headTrim,color:a}),(0,E.jsx)(Ve,{ref:r,look:He(N.face,{shading:`glow`}),color:T.led}),o&&(0,E.jsx)(C,{geometry:o,color:a,scale:[1.6,1.4,1],position:[0,0,-.07]}),s&&(0,E.jsx)(C,{geometry:s,color:a,scale:[1.42,1.1,1.14],position:[0,.07,.015],castShadow:!0}),t.headphones&&(0,E.jsxs)(`group`,{scale:[1.45,1.16,1.15],position:[0,.018,0],children:[(0,E.jsx)(C,{geometry:Ft.headphones.shell,color:Gt,castShadow:!0}),(0,E.jsx)(C,{geometry:Ft.headphones.covers,color:a})]}),n&&(0,E.jsx)(Ve,{look:He(N.badgeRing,{shading:`glow`}),color:T.led,scale:.16,position:[0,-.235,-.19]})]})}function $t(e,t){return`/api/agents/${e}/screen?t=${t}`}function en(e,t,n){if(!t)return()=>{};let r=!0,i=new Image;return i.onload=()=>r&&n(i),i.onerror=()=>{},i.src=$t(e,t),()=>{r=!1,i.onload=null}}var tn=864e5;function nn(e){return{since:e,opened:0,merged:0,firstPass:0,qaPass:0,qaFail:0,fixRounds:0,run:0,best:0,reviews:0,costUsd:0,turns:0,recent:[],week:[]}}function rn(e){let t=e.qaPass+e.qaFail;return t?e.qaPass/t:null}var an=e=>e.merged?e.fixRounds/e.merged:null,on=(e,t)=>Math.max(0,(t-e.since)/tn),sn=(e,t)=>e.week.filter(e=>e>t-6048e5&&e<=t).length;function cn(e,t){let n=e.merged+e.reviews;return g(t,n>=40?`Legend`:n>=15?`Veteran`:n>=5?`Regular`:`Rookie`)}var ln=e=>e.reviews>e.merged&&e.reviews>=3;function un(e,t){let n=(e,n)=>g(t,e,n);return ln(e)?n(`QA reviews: {count} and counting`,{count:e.reviews}):e.best>=3?n(`First-time QA passes: {count} in a row`,{count:e.best}):rn(e)===1&&e.qaPass>=3?n(e.qaPass===1?`Never failed QA: {count} round passed`:`Never failed QA: {count} rounds passed`,{count:e.qaPass}):e.merged>=1&&an(e)===0?n(e.merged===1?`Clean shipper: {count} PR merged without a fix round`:`Clean shipper: {count} PRs merged without a fix round`,{count:e.merged}):e.merged>=1?n(e.merged===1?`Shipped {count} PR so far`:`Shipped {count} PRs so far`,{count:e.merged}):e.opened>=1?n(`First PR in review, fingers crossed`):n(`Fresh on the team: first task coming up`)}function dn(e,t){let n=null;for(let r of e){if(!r.career)continue;let e=sn(r.career,t);e!==0&&(!n||e>n.merges||e===n.merges&&r.career.merged>(n.who.career?.merged??0))&&(n={who:r,merges:e})}return n}var fn=[`duck`,`speaker`,`cradle`];function pn(e,t=null){if(t&&ln(t))return`magnifier`;let n=0;for(let t of e)n=n*31+t.charCodeAt(0)>>>0;return fn[n%fn.length]}var mn=e=>Math.min(1.6,.7+.13*Math.max(0,e));function hn(e,t,n){let r=on(e,n),i=e.recent.slice(0,8).map(e=>e.n);return{plaques:i,more:Math.max(0,e.merged-i.length),star:e.firstPass>=10,plant:mn(r),photo:r>=1,toy:r>=3?pn(t,e):null}}function gn(e,t,n){let r=Ye(n),i=Je(r,n.role),a=qe(r,n.role);e.save(),e.scale(t/160,t/160),e.clearRect(0,0,160,160);let o=(t,n,r,i,a,o)=>{e.beginPath(),e.roundRect(t,n,r,i,a),e.fillStyle=o,e.fill()},s=(t,n,r,i)=>{e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fillStyle=i,e.fill()};o(0,0,160,160,26,`#e2edf0`),o(49,113,62,54,20,T.shell),o(58,121,44,5,2,i),s(80,143,12,T.joint),e.strokeStyle=i,e.lineWidth=2,e.stroke(),e.fillStyle=i,e.font=`bold 13px monospace`,e.textAlign=`center`,e.fillText(a===`inspect`?`✓`:a===`plan`?`◇`:a===`coordinate`?`◎`:`<>`,80,148),o(19,60,20,38,9,i),o(121,60,20,38,9,i),o(22,65,10,28,5,T.joint),o(128,65,10,28,5,T.joint),e.strokeStyle=T.joint,e.lineWidth=5,e.lineCap=`round`,e.beginPath(),e.moveTo(90,41),e.lineTo(98,20),e.stroke(),s(99,16,6,i),o(31,35,98,81,25,T.shell),o(38,48,84,56,18,T.visor),o(67,36,26,4,2,i),e.strokeStyle=`#304858`,e.lineWidth=4,e.beginPath(),e.moveTo(49,59),e.quadraticCurveTo(50,54,64,54),e.stroke(),e.strokeStyle=T.led,e.lineWidth=4;for(let t of[62,98])e.beginPath(),e.moveTo(t-7,80),e.bezierCurveTo(t-7,62,t+7,62,t+7,80),e.stroke();if(e.strokeStyle=`#d8f6ff`,e.lineWidth=2,e.beginPath(),e.moveTo(75,93),e.quadraticCurveTo(80,96,85,93),e.stroke(),r.glasses!==`none`){e.strokeStyle=i,e.lineWidth=2;for(let t of[62,98])e.beginPath(),r.glasses===`square`?e.roundRect(t-14,59,28,28,6):e.arc(t,73,15,0,Math.PI*2),e.stroke();e.beginPath(),e.moveTo(77,72),e.lineTo(83,72),e.stroke()}r.headphones&&(e.strokeStyle=T.joint,e.lineWidth=5,e.beginPath(),e.moveTo(25,66),e.quadraticCurveTo(26,26,61,31),e.stroke()),r.headwear!==`none`&&(o(33,30,94,21,10,i),r.headwear===`cap`?o(72,45,63,6,3,i):s(80,26,7,T.shell)),e.restore()}var _n=700,vn=5,yn=e=>e===null?`—`:`${Math.round(e*100)}%`,bn=e=>e===null?`—`:e.toFixed(1);function xn(e,t,n){let r=on(e,t);if(r>=1)return g(n,Math.floor(r)===1?`{count} day`:`{count} days`,{count:Math.floor(r)});let i=r*24;if(i>=1)return g(n,Math.floor(i)===1?`{count} hour`:`{count} hours`,{count:Math.floor(i)});let a=Math.max(1,Math.round(i*60));return g(n,a===1?`{count} minute`:`{count} minutes`,{count:a})}function Sn(e,t,n){let r=Math.max(0,Math.round((t-e)/6e4));if(r<60)return r<=1?n(`just now`):n(`{count} min ago`,{count:r});let i=Math.round(r/60);return i<24?n(`{count} h ago`,{count:i}):n(`{count} d ago`,{count:Math.round(i/24)})}function Cn({agent:e,size:t}){let n=s(),r=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let n=r.current?.getContext(`2d`);n&&gn(n,t*2,e)},[e.id,e.look,e.role,e.color,e.hair,e.skin,e.style,t]),(0,E.jsx)(`canvas`,{ref:r,className:`career-portrait`,width:t*2,height:t*2,style:{width:t,height:t},"aria-label":n(`{name}’s portrait`,{name:e.name})})}function wn({label:e,value:t,title:n}){let r=s();return(0,E.jsxs)(`div`,{className:`career-stat`,title:n,children:[(0,E.jsx)(`b`,{children:t}),(0,E.jsx)(`span`,{children:r(e)})]})}function Tn({agent:e,compact:t=!1}){let n=s(),r=v(e=>e.settings.language),i=v(t=>t.repos.find(t=>t.id===e.repoId)),a=Date.now(),c=e.career;return c?(0,E.jsxs)(`div`,{className:`career-card ${t?`career-compact`:``}`,style:{"--accent":e.color},children:[(0,E.jsxs)(`div`,{className:`career-head`,children:[(0,E.jsx)(Cn,{agent:e,size:t?44:88}),(0,E.jsxs)(`div`,{className:`career-who`,children:[(0,E.jsx)(`div`,{className:`career-name`,children:e.name}),(0,E.jsxs)(`div`,{className:`career-title`,children:[cn(c,r),i?` · ${n(`floor {floor}`,{floor:i.floor})}`:``]}),c.firstPass>=10&&(0,E.jsx)(`div`,{className:`career-badges`,children:(0,E.jsx)(`span`,{className:`career-badge career-star`,children:(0,E.jsx)(o,{children:`⭐ 10 first-time passes`})})}),(0,E.jsxs)(`div`,{className:`career-known`,children:[`“`,un(c,r),`”`]})]})]}),(0,E.jsxs)(`div`,{className:`career-stats`,children:[(0,E.jsx)(wn,{label:`PRs merged`,value:c.merged}),(0,E.jsx)(wn,{label:`PRs opened`,value:c.opened}),(0,E.jsx)(wn,{label:`first-time QA`,value:c.firstPass,title:n(`PRs that passed QA on their first round`)}),(0,E.jsx)(wn,{label:`QA pass rate`,value:yn(rn(c)),title:n(`{passed} of {total} QA rounds on their PRs passed`,{passed:c.qaPass,total:c.qaPass+c.qaFail})}),(0,E.jsx)(wn,{label:`fix rounds / PR`,value:bn(an(c))}),(0,E.jsx)(wn,{label:`QA reviews`,value:c.reviews}),(0,E.jsx)(wn,{label:`longest streak`,value:c.best,title:n(`PRs in a row that passed QA first time`)}),(0,E.jsx)(wn,{label:`on the team`,value:xn(c,a,r)}),!t&&(0,E.jsx)(wn,{label:`est. cost`,value:`$${c.costUsd.toFixed(2)}`,title:n(`What the coding agents report, API-equivalent; subscription usage is billed by plan`)}),!t&&(0,E.jsx)(wn,{label:`turns`,value:c.turns})]}),c.recent.length>0&&(0,E.jsxs)(`div`,{className:`career-recent`,children:[!t&&(0,E.jsx)(`div`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Last merged`})}),c.recent.slice(0,t?1:vn).map(e=>(0,E.jsxs)(`div`,{className:`career-pr`,children:[t&&(0,E.jsxs)(`span`,{className:`muted`,children:[(0,E.jsx)(o,{children:`Last merged`}),` `]}),i?(0,E.jsxs)(`a`,{href:`https://github.com/${i.fullName}/pull/${e.n}`,target:`_blank`,rel:`noreferrer`,children:[`#`,e.n]}):(0,E.jsxs)(`b`,{children:[`#`,e.n]}),` `,(0,E.jsx)(`span`,{className:`career-pr-title`,children:e.title||n(`untitled`)}),` `,(0,E.jsx)(`span`,{className:`muted`,children:Sn(e.at,a,n)})]},e.n))]})]}):(0,E.jsx)(`div`,{className:`career-card muted small`,children:n(`{name} runs the company; their record is the whole office.`,{name:e.name})})}function En(){let e=v(e=>e.focus?.id.startsWith(`agent-`)?e.focus.id.slice(6):null),t=v(t=>e?t.agents[e]:void 0),n=v(e=>e.overlay),[r,i]=(0,w.useState)(null);return(0,w.useEffect)(()=>{if(!e)return i(null);let t=setTimeout(()=>i(e),_n);return()=>clearTimeout(t)},[e]),!t||r!==t.id||n||!t.career?null:(0,E.jsx)(`div`,{className:`career-peek`,"aria-live":`polite`,children:(0,E.jsx)(Tn,{agent:t,compact:!0})})}var Dn=[{key:`merged`,label:`Merged`,value:(e,t)=>t.merged},{key:`opened`,label:`Opened`,value:(e,t)=>t.opened},{key:`firstPass`,label:`1st-time QA`,title:`PRs that passed QA on their first round`,value:(e,t)=>t.firstPass},{key:`rate`,label:`Pass rate`,value:(e,t)=>rn(t)??-1,show:(e,t)=>yn(rn(t))},{key:`fixes`,label:`Fixes / PR`,title:`Fix rounds per merged PR`,value:(e,t)=>an(t)??-1,show:(e,t)=>bn(an(t))},{key:`reviews`,label:`Reviews`,title:`QA reviews done`,value:(e,t)=>t.reviews},{key:`best`,label:`Streak`,title:`Longest run of PRs passing QA first time`,value:(e,t)=>t.best},{key:`week`,label:`This week`,value:(e,t,n)=>sn(t,n)},{key:`since`,label:`On the team`,value:(e,t)=>-t.since,show:(e,t,n)=>xn(t,n)},{key:`cost`,label:`Cost`,title:`Estimated, as the coding agents report it`,value:(e,t)=>t.costUsd,show:(e,t)=>`$${t.costUsd.toFixed(2)}`},{key:`turns`,label:`Turns`,value:(e,t)=>t.turns}];function On(){let e=s(),t=v(e=>e.settings.language),n=v(e=>e.agents),r=v(e=>e.repos),i=v(e=>e.openOverlay),[a,c]=(0,w.useState)({key:`merged`,dir:-1}),l=Date.now(),u=Dn.find(e=>e.key===a.key),d=e=>r.find(t=>t.id===e.repoId)?.floor??0,f=Object.values(n).filter(e=>e.role!==`ceo`&&!!e.career).sort((e,t)=>{if(a.key===`name`)return e.name.localeCompare(t.name)*a.dir;if(a.key===`floor`)return(d(e)-d(t))*a.dir;let n=u.value(e,e.career,l),r=u.value(t,t.career,l);return(typeof n==`number`&&typeof r==`number`?n-r:String(n).localeCompare(String(r)))*a.dir||e.name.localeCompare(t.name)});if(!f.length)return null;let p=(t,n,r)=>(0,E.jsx)(`th`,{title:r?e(r):void 0,"aria-sort":a.key===t?a.dir===1?`ascending`:`descending`:`none`,children:(0,E.jsxs)(`button`,{className:`sort-btn`,onClick:()=>c({key:t,dir:a.key===t?-a.dir:t===`name`||t===`floor`?1:-1}),children:[e(n),a.key===t?a.dir===1?` ▲`:` ▼`:``]})},t);return(0,E.jsxs)(`div`,{className:`card team-stats`,children:[(0,E.jsxs)(`div`,{className:`row`,children:[(0,E.jsx)(`b`,{className:`grow`,children:(0,E.jsx)(o,{children:`🏅 Careers`})}),(0,E.jsx)(`span`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Counted from what the office sees: PRs, QA rounds, fixes and merges. Look at a desk for a moment to see its card.`})})]}),(0,E.jsx)(`div`,{className:`team-stats-scroll`,children:(0,E.jsxs)(`table`,{className:`team stats-table`,children:[(0,E.jsx)(`thead`,{children:(0,E.jsxs)(`tr`,{children:[p(`name`,`Name`),p(`floor`,`Floor`),Dn.map(e=>p(e.key,e.label,e.title))]})}),(0,E.jsx)(`tbody`,{children:f.map(n=>(0,E.jsxs)(`tr`,{children:[(0,E.jsxs)(`td`,{className:`nowrap`,children:[(0,E.jsx)(`span`,{className:`dot`,style:{background:n.color}}),` `,(0,E.jsx)(`button`,{className:`link-btn`,title:e(`Open their desk`),onClick:()=>i({kind:`terminal`,agentId:n.id}),children:n.name})]}),(0,E.jsx)(`td`,{children:r.find(e=>e.id===n.repoId)?.floor??`—`}),Dn.map(e=>(0,E.jsx)(`td`,{className:`num`,children:e.key===`since`?xn(n.career,l,t):e.show?e.show(n,n.career,l):e.value(n,n.career,l)},e.key))]},n.id))})]})})]})}var kn={width:210,height:280},An=.815,jn={pitch:-1.42,yaw:.1},Mn=[`joyful`,`puzzled`,`focused`,`surprised`,`sleepy`,`proud`,`stressed`],Nn=5.5,Pn=null;function Fn(){return Pn??=(async()=>{let e=document.createElement(`canvas`),t=Ae(e);return await t.configure({size:{...kn,top:0,left:0},dpr:[1,2],gl:{antialias:!0,alpha:!0},camera:{fov:28,near:.1,far:20,position:[0,1.02,4.5]},frameloop:`never`,onCreated:({camera:e})=>e.lookAt(0,1.02,0)}),{canvas:e,root:t}})(),Pn}function In({id:e}){let t=v(t=>t.agents[e]),n=(0,w.useMemo)(()=>t?Ye(t):null,[t]),r=(0,w.useRef)(null),i=(0,w.useRef)(null),a=(0,w.useMemo)(()=>({s:u(),seed:m(e)%10007}),[e]);if(je((e,t)=>{let n=c(),o=n?0:performance.now()/1e3;r.current&&(r.current.rotation.y=Math.PI+Math.sin(o*.6)*.45);let s=o%Nn>3.7;ne(a.s,s?Mn[Math.floor(o/Nn)%Mn.length]:`neutral`,Math.min(t,.1)),Zt(i,a.s,n?0:p(o,a.seed))}),!t||!n)return null;let o=Ue(T.shell);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`hemisphereLight`,{args:[`#fffaf0`,`#a48a6a`,.95]}),(0,E.jsx)(`ambientLight`,{intensity:.2}),(0,E.jsx)(`directionalLight`,{position:[1.5,3,4],intensity:1.7}),(0,E.jsxs)(`group`,{ref:r,children:[[-.11,.11].map(e=>(0,E.jsxs)(`group`,{position:[e,An,0],children:[(0,E.jsx)(`mesh`,{geometry:N.joint,material:Ue(Gt)}),(0,E.jsx)(`mesh`,{geometry:N.thigh,material:o,children:(0,E.jsx)(ze,{thickness:.012,color:Gt,angle:0})}),(0,E.jsxs)(`group`,{position:[0,-.32,0],children:[(0,E.jsx)(`mesh`,{geometry:N.joint,material:Ue(Gt)}),(0,E.jsx)(`mesh`,{geometry:N.shin,material:o,children:(0,E.jsx)(ze,{thickness:.012,color:Gt,angle:0})}),(0,E.jsx)(`mesh`,{geometry:N.shoe,material:Ue(Gt)})]})]},e)),(0,E.jsxs)(`group`,{position:[0,An,0],scale:n.height,children:[(0,E.jsx)(Yt,{agent:t,look:n,busy:!1}),[-1,1].map(e=>(0,E.jsx)(`group`,{position:[e*.25*Kt(n),.44,0],rotation:[jn.pitch,-e*jn.yaw,0],children:(0,E.jsx)(Xt,{agent:t,look:n})},e)),(0,E.jsx)(`group`,{position:[0,.7,0],scale:1.12,children:(0,E.jsx)(Qt,{agent:t,look:n,busy:!1,face:i})})]})]})]})}function Ln({id:e,label:t}){let n=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let t=!0,r=null;return Fn().then(({canvas:i,root:a})=>{if(!t||!n.current)return;n.current.appendChild(i);let o=a.render((0,E.jsx)(In,{id:e}));o.getState().setFrameloop(`always`),r={root:a,store:o,canvas:i}},e=>console.warn(`No look preview:`,e)),()=>{t=!1,r&&(r.store.getState().setFrameloop(`never`),r.root.render(null),r.canvas.remove())}},[e]),(0,E.jsx)(`div`,{ref:n,className:`look-preview`,style:kn,role:`img`,"aria-label":t})}var Rn=[`low`,`medium`,`high`,`xhigh`,`max`],zn=(e,t)=>e.find(e=>e.id===t)?.label??t;async function Bn(e,t){try{await i.updateAgent(e,t)}catch{}}function Vn({clis:e}){let t=s();return(0,E.jsx)(E.Fragment,{children:[...e].sort((e,t)=>Number(t.installed)-Number(e.installed)).map(e=>(0,E.jsxs)(`option`,{value:e.id,disabled:!e.installed||!!e.problem,title:e.problem,children:[e.label,t(e.installed?e.problem?` (incompatible version)`:``:` (not installed)`)]},e.id))})}function Hn({agent:e,id:t,className:n=`inline`,style:r}){let i=s();return(0,E.jsx)(`input`,{id:t,className:n,style:r,defaultValue:e.name,maxLength:24,"aria-label":t?void 0:i(`Name`),onBlur:t=>t.target.value.trim()&&t.target.value!==e.name&&void Bn(e.id,{name:t.target.value})},`n-${e.name}`)}function Un({agent:e,id:t,style:n}){let r=s(),i=v(e=>e.settings),a=v(e=>e.clis),o=e.role===`ceo`;return(0,E.jsxs)(`select`,{id:t,value:e.cli,title:r(`Their coding agent`),"aria-label":t?void 0:r(`Coding agent`),style:n,onChange:t=>void Bn(e.id,{cli:t.target.value}),children:[(0,E.jsxs)(`option`,{value:``,children:[zn(a,o?`claude`:i.defaultCli),` `,r(`(default)`)]}),(0,E.jsx)(Vn,{clis:o?a.filter(e=>e.id===`claude`||e.id===`opencode`):a})]})}var Wn={none:`no Box yet`,creating:`creating their Box…`,"setting-up":`setting up their Box…`,ready:`Box ready`,paused:`Box paused (wakes for their next task)`,disconnected:`reconnecting to their Box…`,error:`their Box couldn't be set up`};function Gn({agent:e,id:t,style:n}){let r=s(),i=v(e=>e.settings),o=v(e=>e.cloud.keySet),c=e.host===`box`,l=xe(e,i)===`opencode`,u=!!e.task||_(e),d=async t=>{await a({title:r(t===`box`?`Move {name} to the cloud?`:`Move {name} back to this computer?`,{name:e.name}),body:r(t===`box`?`Their local machine is removed (work that isn’t on GitHub is saved to leftovers first), and their next session starts fresh in an Upstash Box of their own.`:`Their cloud machine is removed (work that isn’t on GitHub is saved to leftovers first), and their next session starts fresh.`),confirm:r(`Move`)})&&await Bn(e.id,{host:t})};return(0,E.jsxs)(`select`,{id:t,value:c?`box`:`local`,disabled:u,style:n,title:r(u?`Move them once their task is done`:`Where they work`),"aria-label":t?void 0:r(`Works on`),onChange:e=>void d(e.target.value),children:[(0,E.jsx)(`option`,{value:`local`,children:r(`🖥️ This computer`)}),(0,E.jsxs)(`option`,{value:`box`,disabled:!c&&(!o||l),children:[`☁️ Upstash Box`,r(!c&&!o?` (connect Upstash in Settings first)`:!c&&l?` (OpenCode can’t run there)`:``)]})]})}function Kn({agent:e,id:t,className:n=`inline`,style:r}){let i=s(),a=v(e=>e.settings),o=(0,w.useId)(),c=xe(e,a);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`input`,{id:t,className:n,style:r,list:o,defaultValue:e.model,placeholder:(e.role===`ceo`?c===`claude`?ce[0]:``:he(``,c,a,ce[0]))||i(`agent default`),title:i(c===`opencode`?`OpenCode model: provider/model#variant (empty = OpenCode default)`:e.role===`ceo`?`The CEO’s model`:`Their model (empty = the default for their coding agent)`),"aria-label":t?void 0:i(`Model`),onBlur:t=>t.target.value!==e.model&&void Bn(e.id,{model:t.target.value})},`m-${e.model}-${c}`),c===`opencode`&&(0,E.jsx)(ue,{value:e.model,agent:e.id,inherited:e.role!==`ceo`&&a.defaultCli===`opencode`?a.defaultModel:void 0,onSelect:t=>void Bn(e.id,{model:t})}),(0,E.jsx)(`datalist`,{id:o,children:ie(c).map(e=>(0,E.jsx)(`option`,{value:e},e))})]})}function qn({agent:e,id:t,style:n}){let r=s(),i=v(e=>e.settings),a=i.defaultEffort;return xe(e,i)===`opencode`?(0,E.jsx)(Se,{value:e.model,agent:e.id,id:t,style:n,inherited:e.role!==`ceo`&&i.defaultCli===`opencode`?i.defaultModel:void 0,onSelect:t=>void Bn(e.id,{model:t})}):(0,E.jsxs)(`select`,{id:t,value:e.effort,title:r(e.role===`ceo`?`The CEO’s effort`:`Their effort`),"aria-label":t?void 0:r(`Effort`),style:n,onChange:t=>void Bn(e.id,{effort:t.target.value}),children:[(e.role!==`ceo`||!e.effort)&&(0,E.jsx)(`option`,{value:``,children:r(`default ({effort})`,{effort:a})}),Rn.map(e=>(0,E.jsx)(`option`,{value:e,children:e},e))]})}function Jn({agent:e,id:t}){let n=s();return(0,E.jsxs)(`select`,{id:t,value:e.look,title:n(`Agent identity`),"aria-label":t?void 0:n(`Agent identity`),style:{width:`auto`},onChange:t=>void Bn(e.id,{look:t.target.value}),children:[(0,E.jsx)(`option`,{value:`feminine`,children:n(`She`)}),(0,E.jsx)(`option`,{value:`masculine`,children:n(`He`)})]})}var Yn=e=>e[0].toUpperCase()+e.slice(1);function Xn({label:e,colors:t,value:n,onPick:r}){let i=s(),a=t.includes(n)?t:[n,...t];return(0,E.jsxs)(`div`,{className:`field`,children:[(0,E.jsx)(`span`,{children:i(e)}),(0,E.jsx)(`div`,{className:`swatches`,role:`radiogroup`,"aria-label":i(e),children:a.map(e=>(0,E.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===n,"aria-label":e,title:e,className:`swatch ${e===n?`swatch-on`:``}`,style:{background:e},onClick:()=>r(e)},e))})]})}function Zn({label:e,value:t,options:n,labels:r,onPick:i,disabled:a,title:o}){let c=s(),l=(0,w.useId)();return(0,E.jsxs)(`label`,{className:`field`,htmlFor:l,children:[(0,E.jsx)(`span`,{children:c(e)}),(0,E.jsx)(`select`,{id:l,"aria-label":c(e),value:t,disabled:a,title:o,onChange:e=>i(e.target.value),children:n.map(e=>(0,E.jsx)(`option`,{value:e,children:c(r?.[e]??Yn(e))},e))})]})}function Qn({agent:e}){let t=s(),n=(0,w.useMemo)(()=>Ye(e),[e]),r=t=>void Bn(e.id,{style:{...e.style,...t}});return(0,E.jsxs)(`fieldset`,{className:`look-editor`,children:[(0,E.jsx)(`legend`,{children:(0,E.jsx)(o,{children:`Look`})}),(0,E.jsxs)(`div`,{className:`look-body`,children:[(0,E.jsx)(Ln,{id:e.id,label:t(`{name} as they’ll look`,{name:e.name})}),(0,E.jsxs)(`div`,{className:`look-fields`,children:[(0,E.jsx)(Zn,{label:`Glasses`,value:n.glasses,options:me,onPick:e=>r({glasses:e})}),(0,E.jsx)(Zn,{label:`Headwear`,value:n.headwear,options:_e,onPick:e=>r({headwear:e})}),e.role===`ceo`?(0,E.jsxs)(`div`,{className:`field`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Shell module`})}),(0,E.jsx)(`span`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Coordination module`})})]}):(0,E.jsx)(Zn,{label:`Shell module`,value:n.outfit,options:ye,labels:Ke,onPick:e=>r({outfit:e})}),(0,E.jsx)(Zn,{label:`Build`,value:n.build,options:ge,onPick:e=>r({build:e})}),(0,E.jsx)(Xn,{label:`Accent colour`,colors:Ge,value:Ge[n.accent],onPick:e=>r({accent:Ge.indexOf(e)})})]})]}),(0,E.jsxs)(`div`,{className:`row wrap`,children:[(0,E.jsx)(`button`,{type:`button`,className:`btn btn-small`,onClick:()=>{let e=e=>e[Math.floor(Math.random()*e.length)];r({glasses:e(me),headwear:e(_e),outfit:e(ye),build:e(ge),accent:Math.floor(Math.random()*Ge.length)})},children:(0,E.jsx)(o,{children:`🎲 Shuffle`})}),(0,E.jsx)(`button`,{type:`button`,className:`btn btn-small btn-ghost`,disabled:!e.style,onClick:()=>void Bn(e.id,{style:null}),children:(0,E.jsx)(o,{children:`↺ Back to their seeded look`})}),(0,E.jsx)(`span`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Robot cosmetics only: modules do not change the agent’s job.`})})]})]})}function $n({agent:e}){let t=s(),[n,r]=(0,w.useState)(!1),[a,c]=(0,w.useState)(null),[l,u]=(0,w.useState)(!1),d=v(t=>{let n=t.repos.find(t=>t.id===e.repoId),r=t.settings;return JSON.stringify(n?[n.fullName,n.defaultBranch,n.autoMerge,n.browserTesting,n.links,n.mission,n.summary,n.qaBrief]:[r.companyName,r.managerName,r.sessionLimit,r.maxAgents,r.scaling,r.runtime])});return(0,w.useEffect)(()=>{if(!n)return;let t=!0;return i.agentPrompt(e.id).then(e=>{t&&(c(e),u(!1))},()=>t&&u(!0)),()=>{t=!1}},[n,e.id,e.name,e.cli,d]),(0,E.jsxs)(`details`,{className:`prompt-preview`,onToggle:e=>r(e.currentTarget.open),children:[(0,E.jsx)(`summary`,{children:(0,E.jsx)(o,{children:`What they’re told`})}),l&&!a&&(0,E.jsx)(`p`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Couldn’t load their prompt.`})}),!a&&!l&&(0,E.jsx)(`p`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Loading…`})}),a&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`muted small`,children:t(a.kind===`ceo`?`The CEO’s instructions for every job. They’re all the office’s own.`:`The office’s workflow and safety rules for each kind of task, the same for every agent and sent with every session; <placeholders> are filled in per task.`)}),a.parts.map(n=>(0,E.jsxs)(w.Fragment,{children:[(0,E.jsxs)(`p`,{className:`small`,children:[(0,E.jsx)(`b`,{children:n.label}),` `,(0,E.jsxs)(`span`,{className:`muted`,children:[`· `,t(`{count} characters`,{count:n.text.length.toLocaleString()})]})]}),(0,E.jsx)(`pre`,{className:`prompt-text`,tabIndex:0,"aria-label":t(`{name}’s prompt: {label}`,{name:e.name,label:n.label}),children:n.text})]},n.label))]})]})}function er({agent:e}){let t=s(),n=v(e=>e.settings.runtime===`terminal`),r=(0,w.useId)(),i=e.role===`ceo`;return(0,E.jsxs)(`section`,{className:`card agent-setup`,"aria-label":t(`{name}’s setup`,{name:e.name}),children:[(0,E.jsxs)(`div`,{className:`row wrap`,children:[(0,E.jsx)(`h3`,{className:`grow`,children:(0,E.jsx)(o,{children:`⚙️ Setup`})}),_(e)&&(0,E.jsx)(`span`,{className:`chip chip-warn`,role:`status`,children:(0,E.jsx)(o,{children:`Applies from their next task`})})]}),(0,E.jsxs)(`div`,{className:`setup-grid`,children:[!i&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-name`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Name`})}),(0,E.jsx)(Hn,{agent:e,id:`${r}-name`,className:``})]}),!i&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-look`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Agent identity`})}),(0,E.jsx)(Jn,{agent:e,id:`${r}-look`})]}),(n||e.host===`box`)&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-cli`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Coding agent`})}),(0,E.jsx)(Un,{agent:e,id:`${r}-cli`})]}),!i&&(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-host`,children:[(0,E.jsxs)(`span`,{children:[(0,E.jsx)(o,{children:`Works on`}),e.host===`box`&&e.cloud&&(0,E.jsxs)(`span`,{className:`muted`,children:[` · `,t(Wn[e.cloud])]})]}),(0,E.jsx)(Gn,{agent:e,id:`${r}-host`})]}),(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-model`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Model`})}),(0,E.jsx)(Kn,{agent:e,id:`${r}-model`,className:``})]}),(0,E.jsxs)(`label`,{className:`field`,htmlFor:`${r}-effort`,children:[(0,E.jsx)(`span`,{children:(0,E.jsx)(o,{children:`Effort`})}),(0,E.jsx)(qn,{agent:e,id:`${r}-effort`})]})]}),(0,E.jsx)(Qn,{agent:e}),(0,E.jsx)($n,{agent:e}),(0,E.jsx)(`p`,{className:`muted small`,children:(0,E.jsx)(o,{children:`Name and model save when you leave them; the rest, and looks, as you pick them. Running sessions aren’t restarted.`})})]})}var tr=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,rr=(e,t)=>{for(var n in t)tr(e,n,{get:t[n],enumerable:!0})},P=(e,t,n,r)=>{for(var i=r>1?void 0:r?nr(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&tr(t,n,i),i},F=(e,t)=>(n,r)=>t(n,r,e),ir=`Terminal input`,ar={get:()=>ir,set:e=>ir=e},or=`Too much output to announce, navigate to rows manually to read`,sr={get:()=>or,set:e=>or=e};function cr(e){return e.replace(/\r?\n/g,`\r`)}function lr(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function ur(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function dr(e,t,n,r){e.stopPropagation(),e.clipboardData&&fr(e.clipboardData.getData(`text/plain`),t,n,r)}function fr(e,t,n,r){e=cr(e),e=lr(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function pr(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function mr(e,t,n,r,i){pr(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function hr(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function gr(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var _r=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o)}else i!==65279&&(t[r++]=i)}return r}},vr=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128||(c=(i&31)<<6|a&63,c<128)){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},yr=``,br=` `,xr=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Sr}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Sr=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Cr=class e extends xr{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Sr,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?hr(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},wr=`di$target`,Tr=`di$dependencies`,Er=new Map;function Dr(e){return e[Tr]||[]}function I(e){if(Er.has(e))return Er.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Or(t,e,r)};return t._id=e,Er.set(e,t),t}function Or(e,t,n){t[wr]===t?t[Tr].push({id:e,index:n}):(t[Tr]=[{id:e,index:n}],t[wr]=t)}var kr=I(`BufferService`),Ar=I(`CoreMouseService`),jr=I(`CoreService`),Mr=I(`CharsetService`),Nr=I(`InstantiationService`),Pr=I(`LogService`),Fr=I(`OptionsService`),Ir=I(`OscLinkService`),Lr=I(`UnicodeService`),Rr=I(`DecorationService`),zr=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new Cr,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Br(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};zr=P([F(0,kr),F(1,Fr),F(2,Ir)],zr);function Br(e,t){if(confirm(`Do you want to navigate to ${t}?
2
2
 
3
3
  WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Vr=I(`CharSizeService`),Hr=I(`CoreBrowserService`),Ur=I(`MouseService`),Wr=I(`RenderService`),Gr=I(`SelectionService`),Kr=I(`CharacterJoinerService`),qr=I(`ThemeService`),Jr=I(`LinkProviderService`),Yr=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ti.isErrorNoTelemetry(e)?new ti(e.message+`
4
4