@soba-so/react 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/SobaProvider.d.ts +1 -1
- package/dist/index.mjs +565 -197
- package/dist/styles.css +558 -190
- package/dist/types.d.ts +5 -0
- package/dist/useMachineRuns.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{useEffect as Ns,useRef as xs,useState as At}from"react";var yn=class extends Error{status;constructor(n,t){super(n),this.name="ConnectError",this.status=t}},hs=5*6e4,Tn=class{session;baseUrl;doFetch;lastMachines=null;machinesUrl=null;gatewayBackUntil=0;constructor(n){this.session=n.session,this.baseUrl=(n.baseUrl??"").replace(/\/+$/,""),this.doFetch=n.fetchImpl??fetch.bind(globalThis)}async context(){let n=await this.request("GET","/v1/connect");return this.setMachinesUrl(n.machines_url),n}setMachinesUrl(n){typeof n=="string"&&/^https?:\/\//.test(n)&&(this.machinesUrl=n)}async machines(){let n=this.lastMachines,t=n?`?v=${encodeURIComponent(n.version)}`:"",r;if(this.machinesUrl&&Date.now()>=this.gatewayBackUntil)try{r=await this.request("GET",`${this.machinesUrl}${t}`)}catch(s){if(s instanceof yn&&s.status===401)throw s;this.gatewayBackUntil=Date.now()+hs}if(r??=await this.request("GET",`/v1/machines${t}`),r.unchanged&&n)return n.machines;let o=Array.isArray(r.machines)?r.machines:[];return this.lastMachines=typeof r.version=="string"?{version:r.version,machines:o}:null,o}async runs(){let n=await this.request("GET","/v1/machines/runs");return Array.isArray(n.runs)?n.runs:[]}async stopRun(n){let t=this.machinesUrl?.replace(/\/v1\/machines$/,"");if(!t)throw new yn("This page can't stop runs yet: it hasn't been told where Soba's gateway is.",501);await this.request("POST",`${t}/v1/runs/${encodeURIComponent(n)}/stop`,{})}lookup(n){return this.request("GET",`/v1/device/lookup?code=${encodeURIComponent(n)}`)}approve(n){return this.request("POST","/v1/device/approve",{user_code:n})}claim(n){return this.request("POST","/v1/device/claim",{pairing_nonce:n})}deny(n){return this.request("POST","/v1/device/deny",{user_code:n})}plans(){return this.request("GET","/v1/plans")}selectPlan(n){return this.request("POST","/v1/plans/select",{plan:n})}checkoutPlan(n,t){return this.request("POST","/v1/plans/checkout",{plan:n,...t?.successUrl?{success_url:t.successUrl}:{},...t?.cancelUrl?{cancel_url:t.cancelUrl}:{}})}leavePlan(){return this.request("DELETE","/v1/plans/select")}hosted(){return this.request("GET","/v1/hosted")}startHosted(){return this.request("POST","/v1/hosted/start")}disconnectHosted(n){return this.request("DELETE",n?`/v1/hosted?provider=${encodeURIComponent(n)}`:"/v1/hosted")}approveRuntime(n,t){return this.request("POST","/v1/runtimes/approve",{machine_id:n,runtime_id:t})}preferRuntime(n,t){return this.request("POST","/v1/runtimes/prefer",{machine_id:n,runtime_id:t})}async request(n,t,r){let o=await this.doFetch(/^https?:\/\//.test(t)?t:`${this.baseUrl}${t}`,{method:n,headers:{authorization:`Bearer ${this.session}`,...r?{"content-type":"application/json"}:{}},...r?{body:JSON.stringify(r)}:{}}),s={};try{s=await o.json()}catch{}if(!o.ok){let a=typeof s.error=="string"?s.error:`Request failed (${o.status})`;throw new yn(a,o.status)}return s}};function Bn(e){let n=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!n?.[1])return"#ffffff";let t=n[1].length===3?[...n[1]].map(s=>s+s).join(""):n[1],r=s=>{let a=Number.parseInt(t.slice(s*2,s*2+2),16)/255;return a<=.04045?a/12.92:((a+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(1)+.0722*r(2)>.45?"#101012":"#ffffff"}function Tt(e){let n=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!n?.[1])return null;let t=n[1].length===3?[...n[1]].map(r=>r+r).join(""):n[1];return[0,1,2].map(r=>Number.parseInt(t.slice(r*2,r*2+2),16))}function bn(e,n,t){let r=Tt(e),o=Tt(n);return!r||!o?e:`#${r.map((a,l)=>Math.round(a+(o[l]-a)*t)).map(a=>a.toString(16).padStart(2,"0")).join("")}`}function rn(e,n){if(!Tt(e))return{};let t=Bn(e),r=n?.trim();return{"--sc-ground":e,"--sc-shell":e,"--sc-sheet":bn(e,t,.07),"--sc-raised":bn(e,t,.13),"--sc-line":bn(e,t,.18),"--sc-line-2":bn(e,t,.28),"--sc-text":t,"--sc-text-2":bn(t,e,.15),"--sc-muted":bn(t,e,.38),...r?{"--sc-accent":r,"--sc-accent-fg":Bn(r)}:{"--sc-accent":t,"--sc-accent-fg":e}}}function Gn(e){return e.authenticated===!0?{tone:"ok",text:"signed in"}:e.authenticated===!1?{tone:"warn",text:e.auth_hint??"signed out on that machine"}:{tone:"unknown",text:"could not tell"}}function Wn(e){let{platform:n,arch:t}=e;if(!n)return null;let r=n==="darwin"||n==="macos",o=r?"Mac":n==="win32"||n==="windows"?"Windows PC":"Linux machine";return r?`${t==="aarch64"||t==="arm64"?"Apple silicon ":""}${o}`:o}function on(e){return e.find(n=>n.state==="offline")??null}function Bt(e){return e.state==="busy"?{tone:"busy",text:`serving ${e.active} of ${e.capacity}`}:e.state==="online"?{tone:"ok",text:"connected"}:{tone:"off",text:"asleep or offline"}}function _(e){let n=e.label?.trim(),t=e.name?.trim();return n&&(!t||n!==t)?n:(t??n??"").replace(/\.(local|lan|home|internal)$/i,"").replace(/[-_]+/g," ").trim()||n||"This machine"}function mt(e,n){let t=o=>o.state==="busy"?0:o.state==="online"?1:2,r=o=>o.last_seen_at?Date.parse(o.last_seen_at):0;return t(e)-t(n)||r(n)-r(e)}function Ie(e){return[...e].sort(mt)[0]??null}function sn(e){return e?e.state==="busy"?{tone:"busy",word:"Serving"}:e.state==="online"?{tone:"ok",word:"Connected"}:{tone:"off",word:"Asleep"}:{tone:"off",word:"No compute"}}function wn(e){let n=sn(e);return{label:e?n.word:"Connect compute",ariaLabel:e?`${n.word} on ${_(e)}`:"Connect compute",connected:e!==null,state:n}}function Gt(e){return e.state==="online"||e.state==="busy"}function Hn(e){if(!e)return"never seen";let n=Date.parse(e);if(Number.isNaN(n))return"never seen";let t=Date.now()-n,r=6e4;return t<2*r?"just now":t<60*r?`${Math.floor(t/r)} min ago`:t<24*60*r?`${Math.floor(t/(60*r))} hr ago`:`${Math.floor(t/(24*60*r))} days ago`}function Wt(e,n){let t=r=>r.absent?2:r.quarantined?1:0;return t(e)-t(n)||e.display_name.localeCompare(n.display_name)}function Ht(e){return e.runtimes.filter(n=>n.id!=="shell")}function ye(e){return e.runtimes.filter(n=>n.id!=="shell"&&!n.quarantined&&!n.absent)}function Ge(e){let n=a=>a?e.runtimes.find(l=>l.id===a)??null:null;if(e.requested_runtime)return{by:"app",runtimeId:e.requested_runtime,runtime:n(e.requested_runtime)};let t=ye(e),r=t.find(a=>a.id===e.preferred_runtime);if(r)return{by:"you",runtimeId:r.id,runtime:r};let o=a=>a.id==="claude-code"?0:a.id==="codex"?1:2,s=[...t].sort((a,l)=>o(a)-o(l))[0]??null;return{by:"default",runtimeId:s?.id??null,runtime:s}}var Dt={"claude-code":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAARGVYSWZNTQAqAAAACAABh2kABAAAAAEAAAAaAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAABAoAMABAAAAAEAAABAAAAAAEZRQrAAAAHLaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3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x4NkYwy1G0DlAmsUN8ESX6/+H/GpiUBv4FSyLhydRRp0cAAAAASUVORK5CYII="};import{useEffect as io,useRef as gs}from"react";import{Fragment as bs,jsx as Ne,jsxs as Ut}from"react/jsx-runtime";function Dn({anchor:e,label:n,options:t,current:r,onClose:o,onPick:s}){let a=gs(null);return io(()=>{let i=a.current,c=e.current;if(!i||!c)return;try{typeof i.showPopover=="function"&&i.showPopover()}catch{}let u=c.getBoundingClientRect(),p=i.offsetWidth,f=i.offsetHeight,g=Math.max(8,Math.min(u.right-p,window.innerWidth-p-8)),m=u.bottom+6,y=m+f>window.innerHeight-8&&u.top-6-f>8?u.top-6-f:m;i.style.left=`${Math.round(g)}px`,i.style.top=`${Math.round(y)}px`,i.querySelector('[aria-checked="true"]')?.focus()},[e]),io(()=>{let i=c=>{let u=c.target;!u||a.current?.contains(u)||e.current?.contains(u)||o()};return document.addEventListener("pointerdown",i,!0),()=>document.removeEventListener("pointerdown",i,!0)},[e,o]),Ne("div",{ref:a,role:"menu","aria-label":n,className:"sc-menu",popover:"manual",onKeyDown:i=>{let c=[...a.current?.querySelectorAll("[role=menuitemradio]")??[]],u=c.indexOf(document.activeElement);if(i.key==="Escape")i.stopPropagation(),i.nativeEvent.stopImmediatePropagation(),o(),e.current?.focus();else if(i.key==="ArrowDown"||i.key==="ArrowUp"){i.preventDefault();let p=i.key==="ArrowDown"?1:-1;c[(u+p+c.length)%c.length]?.focus()}else i.key==="Tab"&&o()},children:t.map(i=>Ne(fs,{option:i,checked:r===i.id,onClose:o,onPick:s},i.id??""))})}function fs({option:e,checked:n,onClose:t,onPick:r}){return Ut(bs,{children:[e.heading?Ne("div",{className:"sc-menu-head",role:"presentation",children:e.heading}):e.rule?Ne("div",{className:"sc-menu-sep"}):null,Ut("button",{type:"button",role:"menuitemradio","aria-checked":n,className:"sc-menu-item",onClick:()=>n?t():r(e.id),children:[e.glyph,Ut("span",{className:"sc-menu-text",children:[Ne("span",{className:"sc-menu-label",children:e.label}),e.note&&Ne("span",{className:"sc-menu-note",children:e.note})]}),n&&Ne(As,{})]})]})}function As(){return Ne("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-menu-check",children:Ne("path",{d:"M5 12.5l4.5 4.5L19 7.5",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Cn({open:e}){return Ne("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e?"sc-chev sc-chev-open":"sc-chev",children:Ne("path",{d:"M9 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as we,jsxs as ws}from"react/jsx-runtime";function X({className:e}){return ws("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:[we("path",{d:"M18.125 7.039A8.6 8.6 0 1 0 18.125 16.961A6 6 0 0 1 18.125 7.039Z",fill:"currentColor"}),we("path",{d:"M19.925 7.039A8.6 8.6 0 0 1 19.925 16.961A6 6 0 0 0 19.925 7.039Z",fill:"currentColor"})]})}function lo({className:e}){return we("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:we("path",{fill:"currentColor",d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function an({className:e}){return we("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:we("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})})}function ht({className:e}){return we("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:we("path",{d:"M4 5h16v11H4zM9 20h6M12 16v4",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ys({className:e}){return we("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:we("path",{d:"M5 7l5 5-5 5M12 18h7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ft({className:e}){return we("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:we("path",{d:"M5 6h14v10H5zM2.5 19.5h19",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Ye={claude:lo,chatgpt:an,local:ht},co={shell:ys};function po(e,n){return n<2*6e4?e:n<10*6e4?Math.max(e,6e4):n<30*6e4?Math.max(e,3*6e4):Math.max(e,10*6e4)}var Cs=3e3,vs=2*6e4,gt=Date.now(),ft=new Set,uo=!1;function ks(){if(uo||typeof window>"u")return;uo=!0;let e=()=>{let t=gt;if(gt=Date.now(),gt-t>vs)for(let r of ft)r()};for(let t of["pointerdown","keydown","wheel","touchstart"])window.addEventListener(t,e,{capture:!0,passive:!0});let n=()=>{if(!document.hidden)for(let t of ft)t()};window.addEventListener("focus",n),document.addEventListener("visibilitychange",n)}function Ce(e,n,t={}){ks();let r,o=t.immediate===!1?Date.now():0,s=!1,a=!1,l=()=>{a||(r=setTimeout(i,t.idle===!1?n:po(n,Date.now()-gt)))},i=async()=>{if(clearTimeout(r),!(a||s)){if(typeof document>"u"||!document.hidden){s=!0,o=Date.now();try{await e()}catch{}finally{s=!1}}l()}},c=()=>{Date.now()-o>Math.min(n,Cs)&&i()};return ft.add(c),t.immediate===!1?l():i(),()=>{a=!0,clearTimeout(r),ft.delete(c)}}var ce=[{id:"claude",costClass:"user-subscription",short:"Claude Code",label:"Continue with Claude",title:"The Claude plan you already pay for",cost:"Nothing beyond the plan",prerequisite:"Claude Code installed and signed in",hint:"Install it from claude.ai/code, then run `claude` once and sign in.",install:"https://claude.com/product/claude-code",expects:["claude-code"]},{id:"chatgpt",costClass:"user-subscription",short:"Codex",label:"Continue with ChatGPT",title:"The ChatGPT plan you already pay for",cost:"Nothing beyond the plan",prerequisite:"Codex installed and signed in",hint:"Install Codex, then run `codex` once and sign in.",install:"https://learn.chatgpt.com/codex/cli",expects:["codex"]},{id:"local",costClass:"user-hardware",short:"Local models",label:"Use a model on this machine",title:"A model on your own machine",cost:"Free. You bought the hardware",prerequisite:"Ollama running, with a model pulled",hint:"Install Ollama, then `ollama pull` a model before pairing.",install:"https://ollama.com",expects:["ollama","openai-api"]}],mo=["claude","chatgpt"];function Qt(){return ce.filter(e=>mo.includes(e.id))}function Jt(e){return ce.filter(n=>n.costClass===e)}function Vt(e){return ce.find(n=>n.expects.includes(e))??null}import{Fragment as Ao,jsx as A,jsxs as I}from"react/jsx-runtime";function ln({machines:e,hosted:n=[],onApproveRuntime:t,onPreferRuntime:r,onDisconnectHosted:o,onPair:s,onRefresh:a,refreshing:l,busy:i,appName:c,error:u,runs:p,loadRuns:f,loading:g,machineMenu:m,machineNote:y,children:R,onStopRun:S}){let k=Ie(e),W=e.filter(M=>M.id!==k?.id),[F,O]=At(!1),[P,Q]=At(null),T=p===void 0&&!!f,K=T?P:p??null,q=p!==void 0||!!f;Ns(()=>{if(!T||!F||!f)return;let M=!0,De=Ce(async()=>{let Y=await f();M&&Q(Y)},3e3);return()=>{M=!1,De()}},[T,F,f]);let de=k&&K?Ps(K,k):{},V=k?Ht(k):[];return!k&&n.length===0&&!s?A("p",{className:"sc-note",children:"Nothing connected yet."}):I("div",{className:"sc-tray",children:[k&&I(vn,{title:"This machine",action:(a||m)&&I("span",{className:"sc-cap-acts",children:[a&&A("button",{type:"button",className:"sc-disc",onClick:a,disabled:l,"aria-label":"Refresh",title:"Refresh",children:A(Fs,{spinning:!!l})}),m]}),children:[A(Rs,{machine:k,...q?{onToggle:()=>O(M=>!M),open:F}:{}}),y]}),k&&q&&F&&A(Ms,{machine:k,runs:K,...S?{onStop:S}:{}}),k&&A(vn,{title:"Agents on it",action:A(Gs,{machine:k,appName:c,busy:i,...r?{onPick:M=>r(k.id,M)}:{}}),children:g&&V.length===0?A("p",{className:"sc-row-note",children:"Looking\u2026"}):V.length>0?[...V].sort(Wt).map(M=>A(Ts,{runtime:M,serving:de[M.id]??M.serving??0,...t?{onApprove:()=>t(k.id,M.id)}:{}},M.id)):A("p",{className:"sc-row-note",children:"No agent advertised. Install Claude Code, Codex or Ollama on that machine."})}),n.length>0&&A(vn,{title:n.length>1?"Connected plans":"Connected plan",children:n.map(M=>A(Hs,{credential:M,appName:c,busy:i,...o?{onDisconnect:()=>o(M.provider)}:{}},M.provider))}),(W.length>0||s)&&I(vn,{title:W.length>0?"Your other machines":k?"Add a machine":"Your machines",children:[W.map(M=>A(Ls,{machine:M},M.id)),s&&I("button",{type:"button",className:"sc-pair",onClick:s,children:[A("span",{className:"sc-otile","aria-hidden":"true",children:A(Ds,{})}),A("span",{className:"sc-oname",children:e.length>0?"Pair another machine":"Connect a machine"})]})]}),R,u&&A("p",{className:"sc-error sc-tray-error",children:u})]})}function vn({title:e,action:n,children:t}){return I("section",{className:"sc-group",children:[I("div",{className:"sc-group-cap",children:[A("p",{className:"sc-group-title",children:e}),n]}),A("div",{className:"sc-group-card",children:t})]})}function Rs({machine:e,onToggle:n,open:t}){let r=Gt(e),o=[r?null:e.pairing_lost?"No longer connected here":"Asleep or offline",Wn(e),e.always_on?"always on":null,r&&e.capacity>0?`${e.active} of ${e.capacity} in flight`:Hn(e.last_seen_at)].filter(Boolean),s=I(Ao,{children:[I("span",{className:"sc-mtile","aria-hidden":"true",children:[A(fo,{}),A("span",{className:`sc-mbadge sc-mbadge-${sn(e).tone}`})]}),I("span",{className:"sc-mid",children:[A("span",{className:"sc-mname",children:_(e)}),A("span",{className:"sc-mmeta",children:o.map((a,l)=>I("span",{children:[l>0&&A("span",{className:"sc-mmeta-sep",children:"\xB7"}),a]},a))})]})]});return!n||!r?A("div",{className:"sc-mrow",children:s}):I("button",{type:"button",className:"sc-mrow sc-mrow-btn",onClick:n,"aria-expanded":!!t,title:t?"Hide what it is running":"See what it is running",children:[s,A(Cn,{open:!!t})]})}function Ss(e,n){return e.filter(t=>t.machine_id===n.id||t.machine_id===null)}function Ps(e,n){let t={};for(let r of e)r.machine_id!==n.id||r.status!=="running"||!r.runtime_id||(t[r.runtime_id]=(t[r.runtime_id]??0)+1);return t}function Ms({machine:e,runs:n,onStop:t}){let r=n?Ss(n,e):[],[o,s]=At(new Set),a=async l=>{s(i=>new Set(i).add(l));try{await t?.(l)}catch{s(i=>{let c=new Set(i);return c.delete(l),c})}};return A(vn,{title:"Running now",children:n===null?A("p",{className:"sc-row-note",children:"Looking\u2026"}):r.length===0?A("p",{className:"sc-row-note",children:"Nothing running."}):r.map(l=>A(Es,{run:l,stopping:o.has(l.id),...t?{onStop:()=>void a(l.id)}:{}},l.id))})}function Es({run:e,stopping:n,onStop:t}){return I("div",{className:"sc-rrow",children:[A(Yt,{id:e.runtime_id}),I("span",{className:"sc-mid",children:[I("span",{className:"sc-rtop",children:[A("span",{className:"sc-aname",children:ho(e)}),A("span",{className:"sc-averdict",children:Os(e.started_at)})]}),A("span",{className:"sc-rstep",children:n?"Stopping\u2026":Is(e)})]}),t&&A("button",{type:"button",className:"sc-disc sc-rstop",onClick:t,disabled:n,"aria-label":`Stop ${ho(e)}`,title:"Stop",children:A(Qs,{})})]})}function go(e){let n=Vt(e);return(n?Ye[n.id]:null)??co[e]??null}function ho(e){if(e.label)return e.label;if(e.task){let n=e.task.replace(/[_-]+/g," ").trim();return n.charAt(0).toUpperCase()+n.slice(1)}return"A run"}function Is(e){if(e.status==="queued")return"Waiting for a free slot";if(e.step)return e.step;switch(e.phase?.kind){case"thinking":return"Thinking";case"writing":return"Writing";case"tool":return e.phase.tool?`Using ${e.phase.tool}`:"Using a tool";case"approval":return e.phase.tool?`Waiting for you to allow ${e.phase.tool}`:"Waiting for your approval";default:return e.first_output_at?"Working":"Starting"}}function Os(e){let n=Math.max(0,Math.round((Date.now()-new Date(e).getTime())/1e3));if(n<60)return`${n}s`;let t=Math.floor(n/60);return t<60?`${t}m ${String(n%60).padStart(2,"0")}s`:`${Math.floor(t/60)}h ${String(t%60).padStart(2,"0")}m`}function Ls({machine:e}){let n=sn(e);return I("div",{className:"sc-orow",children:[A("span",{className:"sc-otile","aria-hidden":"true",children:A(fo,{})}),A("span",{className:"sc-oname",children:_(e)}),A("span",{className:"sc-oword",children:n.word}),A("span",{className:`sc-dot sc-dot-${n.tone}`,"aria-hidden":"true"})]})}function Ts({runtime:e,serving:n=0,onApprove:t}){let r=Gn(e),o=I(Ao,{children:[A(Yt,{id:e.id,name:e.display_name}),I("span",{className:e.absent?"sc-aname sc-aname-absent":"sc-aname",children:[e.display_name,e.version&&I("span",{className:"sc-aversion",children:[" ",e.version]})]}),n>0?I("span",{className:"sc-averdict",children:[A(Us,{}),A("span",{className:"sc-aserving",children:n>1?`${n} running`:"running"})]}):e.absent?A("span",{className:"sc-averdict sc-tone-absent",children:"not offered"}):e.quarantined?t?A("button",{type:"button",className:"sc-row-act",onClick:t,children:"Let it serve"}):A("span",{className:"sc-averdict sc-tone-warn",children:"new, not serving yet"}):r.tone==="ok"?I("span",{className:"sc-averdict",children:[A("span",{className:"sc-dot sc-dot-ok","aria-hidden":"true"}),A("span",{className:"sc-sr",children:r.text})]}):A("span",{className:`sc-averdict sc-tone-${r.tone}`,children:r.text})]});return A("div",{className:"sc-arow",children:o})}function Yt({id:e,name:n}){return A("span",{className:"sc-runtime-tile","aria-hidden":"true",children:A(Bs,{id:e,...n?{name:n}:{}})})}function Bs({id:e,name:n}){if(!e)return null;let t=Dt[e];if(t)return A("img",{src:t,alt:"",className:"sc-runtime-logo"});let r=go(e);return r?A(r,{className:"sc-runtime-mark"}):n?A("span",{className:"sc-runtime-letter",children:n.slice(0,1).toUpperCase()}):null}function Gs({machine:e,appName:n,busy:t,onPick:r}){let o=Ge(e),s=ye(e),[a,l]=At(!1),i=xs(null);if(o.by!=="app"&&s.length===0)return null;let c=f=>f?A(Yt,{id:f.id,name:f.display_name}):null,u=f=>{if(!f)return null;let g=Dt[f.id];if(g)return A("img",{src:g,alt:"",className:"sc-runs-logo"});let m=go(f.id);return m?A(m,{className:"sc-runs-glyph"}):null},p;return o.by==="app"?p=I("span",{className:"sc-runs-fixed",title:`Set by ${n??"the app"}`,children:[u(o.runtime),o.runtime?.display_name??o.runtimeId]}):!r||s.length<2?p=I("span",{className:"sc-runs-fixed",children:[u(o.runtime),o.runtime?.display_name]}):p=I("button",{ref:i,type:"button",className:"sc-runs-btn","aria-haspopup":"menu","aria-expanded":a,"aria-label":`Runs go to ${o.runtime?.display_name??"the default"}. Change`,disabled:t,onClick:()=>l(f=>!f),children:[u(o.runtime),A("span",{className:"sc-runs-label",children:o.runtime?.display_name}),A(Cn,{open:!0})]}),I("span",{className:"sc-runs-to",children:[A("span",{className:"sc-runs-cap",children:o.by==="app"?`${n??"App"} uses`:"Runs on"}),p,a&&r&&A(Ws,{anchor:i,machine:e,tile:c,onClose:()=>l(!1),onPick:f=>{l(!1),r(f)}})]})}function Ws({anchor:e,machine:n,tile:t,onClose:r,onPick:o}){let s=Ge(n),a=Ge({...n,preferred_runtime:null}).runtime,l=s.by==="you"?s.runtimeId:null,i=[{id:null,label:"Automatic",...a?{note:`Uses ${a.display_name}`}:{},glyph:t(a)},...ye(n).map((c,u)=>({id:c.id,label:c.display_name,glyph:t(c),...u===0?{rule:!0}:{}}))];return A(Dn,{anchor:e,label:"Which agent runs go to",options:i,current:l,onClose:r,onPick:o})}function Hs({credential:e,appName:n,busy:t,onDisconnect:r}){return I("div",{className:"sc-hrow",children:[I("div",{className:"sc-orow",children:[A("span",{className:"sc-otile","aria-hidden":"true",children:A(an,{className:"sc-omark"})}),I("span",{className:"sc-mid",children:[A("span",{className:"sc-oname",children:e.provider==="openai-chatgpt"?"ChatGPT plan":e.provider}),A("span",{className:"sc-mmeta",children:e.account_label??"signed in"})]}),r&&A("button",{type:"button",className:"sc-row-act",onClick:r,disabled:t,children:"Disconnect"})]}),r&&I("p",{className:"sc-row-note",children:[n??"This app"," stops using it. To withdraw the grant entirely, remove it in your OpenAI settings."]})]})}function fo(){return I("svg",{viewBox:"0 0 32 24","aria-hidden":"true",focusable:"false",className:"sc-mglyph",children:[A("rect",{x:"4",y:"1.5",width:"24",height:"15",rx:"2.5",fill:"var(--sc-sheet, #ffffff)",stroke:"currentColor",strokeWidth:"2"}),A("rect",{x:"1",y:"19.5",width:"30",height:"2.5",rx:"1.25",fill:"currentColor"})]})}function Ds(){return A("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-oglyph",children:A("path",{d:"M12 5v14M5 12h14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}function Us(){return I("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-sglyph sc-spin",children:[A("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),A("path",{d:"M12 3a9 9 0 0 1 9 9",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}function Fs({spinning:e}){return A("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e?"sc-dglyph sc-spin":"sc-dglyph",children:A("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Qs(){return A("svg",{className:"sc-dglyph",viewBox:"0 0 16 16","aria-hidden":"true",children:A("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1.5",fill:"currentColor"})})}import{jsx as Js}from"react/jsx-runtime";function Un({machines:e,onApproveRuntime:n}){return Js(ln,{machines:e,...n?{onApproveRuntime:n}:{}})}var jt={ready:{arc:!0},serving:{arc:!0,slot:"stream"},paused:{arc:!1,slot:"zzz"},thinking:{arc:!1,slot:"dots"},connecting:{arc:!1,slot:"orbit"},attention:{arc:!1,slot:"bang"},gone:{arc:!1,slot:"cross"},snap:{arc:!1,slot:"snap"},listening:{arc:!1,slot:"bars"},permission:{arc:!1,slot:"ring"},ai:{arc:!1,slot:"sparks"}};var zt="105 162 420 420",qt="M407.1 308.9 A158 158 0 1 0 407.1 491.1 A116 116 0 0 1 407.1 308.9 Z",cn="M448.5 320 A110 110 0 0 1 448.5 480";import{Fragment as Qn,jsx as x,jsxs as je}from"react/jsx-runtime";function Zt({kind:e,size:n=44,className:t}){let r=jt[e];return je("svg",{className:`bx${t?` ${t}`:""}`,"data-expression":e,viewBox:zt,overflow:"visible",width:n,height:n,"aria-hidden":"true",children:[x("path",{d:qt,fill:"currentColor"}),x("path",{className:"bx-arc",d:cn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"}),r.slot==="stream"&&x(Vs,{}),r.slot==="zzz"&&x(Ys,{}),r.slot==="dots"&&x(js,{}),r.slot==="bang"&&x(zs,{}),r.slot==="orbit"&&x(qs,{}),r.slot==="cross"&&x(Zs,{}),r.slot==="snap"&&x(Xs,{}),r.slot==="bars"&&x(Ks,{}),r.slot==="ring"&&x(_s,{}),r.slot==="sparks"&&x($s,{})]})}function Vs(){return x("path",{className:"bx-st",d:"M475.3 290.3 A150 150 0 0 1 475.3 509.7",fill:"none",stroke:"currentColor",strokeWidth:"15",strokeLinecap:"round",strokeDasharray:"0.1 31"})}function Ys(){return je(Qn,{children:[x("g",{className:"bx-z1",children:x("path",{d:"M444 372 H496 L444 436 H496",fill:"none",stroke:"currentColor",strokeWidth:"20",strokeLinecap:"round",strokeLinejoin:"round"})}),x("g",{className:"bx-z2",children:x("path",{d:"M492 300 H522 L492 338 H522",fill:"none",stroke:"currentColor",strokeWidth:"15",strokeLinecap:"round",strokeLinejoin:"round"})})]})}function js(){return je(Qn,{children:[x("circle",{className:"bx-th",cx:"463.1",cy:"336.9",r:"21",fill:"currentColor"}),x("circle",{className:"bx-th bx-th2",cx:"483",cy:"400",r:"21",fill:"currentColor"}),x("circle",{className:"bx-th bx-th3",cx:"463.1",cy:"463.1",r:"21",fill:"currentColor"})]})}function zs(){return je("g",{className:"bx-at",children:[x("line",{x1:"490",y1:"312",x2:"490",y2:"414",stroke:"currentColor",strokeWidth:"46",strokeLinecap:"round"}),x("circle",{cx:"490",cy:"484",r:"28",fill:"currentColor"})]})}function qs(){return je("g",{className:"bx-ob",children:[x("path",{d:cn,fill:"none",stroke:"var(--tile-bg, transparent)",strokeWidth:41,strokeLinecap:"round"}),x("path",{d:cn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"})]})}function Zs(){return je(Qn,{children:[x("path",{className:"bx-xa",d:cn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"}),x("g",{className:"bx-xx",children:x("path",{d:"M442 364 L514 436 M514 364 L442 436",fill:"none",stroke:"currentColor",strokeWidth:"24",strokeLinecap:"round"})})]})}function Xs(){return x("path",{className:"bx-snap",d:cn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"})}function Ks(){return je("g",{stroke:"currentColor",strokeWidth:"17",strokeLinecap:"round",children:[x("line",{className:"bx-vb",x1:"452",y1:"370",x2:"452",y2:"430"}),x("line",{className:"bx-vb bx-vb2",x1:"482",y1:"330",x2:"482",y2:"470"}),x("line",{className:"bx-vb bx-vb3",x1:"512",y1:"355",x2:"512",y2:"445"})]})}function _s(){return x(Qn,{children:[[450,366],[474,376],[484,400],[474,424],[450,434],[426,424],[416,400],[426,376]].map(([n,t],r)=>x("circle",{className:"bx-w",cx:n,cy:t,r:"11",fill:"currentColor",style:{animationDelay:`${-1.2+r*.15}s`}},r))})}function $s(){return je(Qn,{children:[x("g",{className:"bx-sp",children:x("path",{d:"M460 300 Q465.4 324.6 490 330 Q465.4 335.4 460 360 Q454.6 335.4 430 330 Q454.6 324.6 460 300 Z",fill:"currentColor"})}),x("g",{className:"bx-sp bx-sp2",children:x("path",{d:"M486 356 Q493.92 392.08 530 400 Q493.92 407.92 486 444 Q478.08 407.92 442 400 Q478.08 392.08 486 356 Z",fill:"currentColor"})}),x("g",{className:"bx-sp bx-sp3",children:x("path",{d:"M460 440 Q465.4 464.6 490 470 Q465.4 475.4 460 500 Q454.6 475.4 430 470 Q454.6 464.6 460 440 Z",fill:"currentColor"})})]})}import{useCallback as ae,useEffect as ue,useId as oa,useMemo as ze,useRef as kn,useState as J}from"react";var Jn=[{slug:"mac-arm",label:"macOS, Apple silicon"},{slug:"mac-intel",label:"macOS, Intel"},{slug:"windows",label:"Windows"},{slug:"linux",label:"Linux"}];function Vn(e){if(!e)return"";try{return new URL(e).origin}catch{return""}}var Xt="soba";function yo(){return`${Xt}://show`}function Yn(e,n,t){let r=`${Xt}://connect?url=${encodeURIComponent(e)}`;return n&&(r+=`&nonce=${encodeURIComponent(n)}`),t&&(r+=`&want=${encodeURIComponent(t)}`),r}function jn(){let e=globalThis.crypto;if(!e?.getRandomValues)return null;let n=e.getRandomValues(new Uint8Array(32)),t="";for(let r of n)t+=String.fromCharCode(r);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var ea=1600;function Kt(e={}){return er(e)}async function _t(e,n={}){if(typeof window>"u"||typeof document>"u")return"unknown";let t=er(n);try{window.location.href=Yn(e,n.nonce,n.want)}catch{return"absent"}return t}async function $t(e={}){if(typeof window>"u"||typeof document>"u")return"unknown";let n=er(e);try{window.location.href=yo()}catch{return"absent"}return n}async function er(e){if(typeof window>"u"||typeof document>"u")return"unknown";let n=e.graceMs??ea,t=document.visibilityState==="visible"&&document.hasFocus(),r=!1,o=()=>{r=!0},s=()=>{document.visibilityState==="hidden"&&(r=!0)};return window.addEventListener("blur",o),window.addEventListener("pagehide",o),document.addEventListener("visibilitychange",s),await new Promise(a=>setTimeout(a,n)),window.removeEventListener("blur",o),window.removeEventListener("pagehide",o),document.removeEventListener("visibilitychange",s),t?r?"opened":"absent":"unknown"}var wo="soba.connect.choice",na=180*24*60*60*1e3;function nr(e){let n=2166136261;for(let t=0;t<e.length;t++)n^=e.charCodeAt(t),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function tr(e,n){return e?n?`${wo}.${e}.${nr(n)}`:`${wo}.${e}`:null}function rr(e){if(!e||typeof localStorage>"u")return null;try{let n=localStorage.getItem(e);if(!n)return null;let t=JSON.parse(n);if(Date.now()-Date.parse(t.at)>na)return null;let r=ce.find(o=>o.id===t.choice);return r?r.id:null}catch{return null}}function or(e,n){if(!(!e||typeof localStorage>"u"))try{localStorage.setItem(e,JSON.stringify({choice:n,at:new Date().toISOString()}))}catch{}}var Co="soba.connect.model",ta=180*24*60*60*1e3;function sr(e,n){return e?n?`${Co}.${e}.${nr(n)}`:`${Co}.${e}`:null}function bt(e){if(!e||typeof localStorage>"u")return null;try{let n=localStorage.getItem(e);if(!n)return null;let t=JSON.parse(n);if(Date.now()-Date.parse(t.at)>ta)return null;let r=t.choice;return typeof r!="string"||!r||r.length>120?null:/^[\w.:@+-]+(\/[\w.:@+-]+)?$/.test(r)?r:null}catch{return null}}function ar(e,n){if(!(!e||typeof localStorage>"u"))try{localStorage.setItem(e,JSON.stringify({choice:n,at:new Date().toISOString()}))}catch{}}var vo="soba.connect.dismissed",ra=30*24*60*60*1e3;function ir(e,n){return e?n?`${vo}.${e}.${nr(n)}`:`${vo}.${e}`:null}function lr(e){if(!e||typeof localStorage>"u")return!1;try{let n=localStorage.getItem(e);if(!n)return!1;let t=JSON.parse(n);return Date.now()-Date.parse(t.at)<ra}catch{return!1}}function cr(e){if(!(!e||typeof localStorage>"u"))try{localStorage.setItem(e,JSON.stringify({at:new Date().toISOString()}))}catch{}}import{Fragment as Ct,jsx as d,jsxs as N}from"react/jsx-runtime";var ur=2e3,sa=1e4,aa=9e4,ia=6e4;function dr(e,n,t,r=[],o){return e?"code":n&&(t.length>0||r.length>0)?"manage":o?"launch":"choose"}function la(e){let n=Math.max(0,Math.round(e/1e3));return`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`}function hr({client:e,initialCode:n,initialChoice:t,onConnected:r,showStatus:o=!0,initialContext:s=null,initialMachines:a,onClose:l,headingId:i,theme:c,reason:u,active:p=!0}){let f=!!s&&a!==void 0,[g,m]=J(f?dr(n,o,a??[],[],t):"loading"),[y,R]=J(s),[S,k]=J(a??[]),[W,F]=J(n??""),[O,P]=J(null),[Q,T]=J(null),[K,q]=J(!1),[de,V]=J(0),[M,De]=J(()=>Date.now()),[Y,pe]=J(null),[Ke,Se]=J(!1),[me,te]=J(!1),[mn,Ue]=J("browser"),[Fe,ie]=J(null),[he,re]=J([]),[Qe,hn]=J(0),[Pe,Te]=J(null),oe=kn(null),[w,j]=J(t??null),[E,Mt]=J(null),Je=ze(()=>{let h=y?.accent?.trim(),v=y?.background?.trim();if(!(!h&&!v))return v?{...rn(v,h),background:v,borderRadius:"inherit"}:{"--sc-accent":h,"--sc-accent-fg":Bn(h)}},[y?.accent,y?.background]),ge=oa(),se=i??ge,Ve=kn(null);ue(()=>{if(!e||f)return;let h=!0;return Promise.all([e.context(),e.machines()]).then(([v,H])=>{h&&(R(v),k(H),m(dr(n,o,H)))}).catch(v=>{h&&(T(v.message),m("choose"))}),()=>{h=!1}},[e,n,o,f]),ue(()=>{g!=="loading"||!f||m(dr(n,o,a??[]))},[g,f,n,o,a]),ue(()=>{a&&k(a)},[a]),ue(()=>{s&&R(s)},[s]);let gn=kn(!1),fn=kn(g);fn.current=g;let _e=kn(he);_e.current=he;let $e=!!y?.hosted_available;ue(()=>{!o&&fn.current==="manage"&&m("choose")},[o]),ue(()=>{if(!e||!p||g!=="manage")return;let h=!0,v=Ce(async()=>{try{let H=await e.machines();if(!h)return;k(H);let U=!$e||gn.current;H.length===0&&_e.current.length===0&&U&&fn.current==="manage"&&m("choose")}catch{}},sa,{immediate:!1});return()=>{h=!1,v()}},[g,e,$e,p]);let en=tr(y?.publishable_key??null);ue(()=>{Mt(rr(en))},[en]),ue(()=>{if(!e||!$e)return;let h=!0;return e.hosted().then(v=>{h&&(re(v.credentials),!gn.current&&(gn.current=!0,v.credentials.length>0&&o&&fn.current==="choose"&&m("manage")))}).catch(()=>{}),()=>{h=!1}},[e,$e,o]),ue(()=>{if(!e||!p||g!=="hosted")return;let h=!0,v=async()=>{try{let Ee=await e.hosted();if(!h)return!1;if(re(Ee.credentials),Ee.credentials.length>0)return m("hosted_connected"),Te(null),!0}catch{}return!1},H=async()=>{oe.current?.closed&&(oe.current=null,!await v()&&h&&m("choose"))},U=Ce(v,ur,{immediate:!1}),tn=setInterval(H,400),ke=Ee=>{let Ln=Ee.data;Ln?.source==="soba"&&Ln.type==="hosted_result"&&v()};return window.addEventListener("message",ke),()=>{h=!1,U(),clearInterval(tn),window.removeEventListener("message",ke),oe.current=null}},[e,g,p]);let Et=ae(()=>{if(!e)return;let h=window.open("","soba-connect-plan","width=520,height=760,noopener=no");oe.current=h,m("hosted"),hn(Date.now()),Te(null),T(null),e.startHosted().then(({url:v})=>{if(h&&!h.closed){h.location.href=v;return}Te(v)}).catch(v=>{h?.close(),oe.current=null,T(v.message),m("choose")})},[e]),it=ae(async h=>{if(e){q(!0);try{await e.disconnectHosted(h),re((await e.hosted()).credentials)}catch(v){T(v.message)}finally{q(!1)}}},[e]);ue(()=>{if(!e||!p||g!=="waiting")return;let h=!0,v=Ce(async()=>{try{let H=await e.machines();if(!h)return;k(H);let U=Ve.current;if(!U)return;let tn=H.filter(Ee=>!U.has(Ee.id)),ke=tn.find(Ee=>Ee.state!=="offline")??tn[0];if(ke){ie(ke.id),w&&or(en,w);let Ee=ce.find(Lt=>Lt.id===w)?.expects??[],Ln=ye(ke).find(Lt=>Ee.includes(Lt.id));Ln&&e.preferRuntime(ke.id,Ln.id).catch(()=>{}),m("connected"),r?.(H)}}catch{}},ur,{immediate:!1});return()=>{h=!1,v()}},[g,e,r,w,en,p]);let lt=ae(async()=>{if(e){T(null),q(!0);try{let h=await e.lookup(W);P(h),m("confirm")}catch(h){T(h.message)}finally{q(!1)}}},[e,W]),An=ae(async()=>{if(e){T(null),q(!0);try{try{Ve.current=new Set((await e.machines()).map(h=>h.id))}catch{Ve.current=new Set(S.map(h=>h.id))}await e.approve(W),m("waiting"),V(Date.now())}catch(h){T(h.message)}finally{q(!1)}}},[e,W,S]),ct=ae(async()=>{if(e){q(!0);try{await e.deny(W),Ue("browser"),m("denied")}catch(h){T(h.message)}finally{q(!1)}}},[e,W]),z=ze(()=>y?.connect_url??null,[y]),[Me,fe]=J(()=>jn()),nn=ze(()=>z?Yn(z,Me??void 0,w??void 0):null,[z,Me,w]),ut=ze(()=>Vn(z),[z]),It=ae(h=>{if(S.length===0)return null;let v=ce.find(U=>U.id===h);if(!v)return null;let H=S.flatMap(U=>U.runtimes??[]).filter(U=>v.expects.includes(U.id));return H.length===0?{tone:"dim",text:"not installed"}:H.some(U=>U.authenticated===!0)?{tone:"ok",text:"ready"}:H.every(U=>U.authenticated===!1)?{tone:"warn",text:"needs signing in"}:{tone:"dim",text:"installed"}},[S]),C=ae((h=null)=>{j(h),T(null),pe(null),Se(!1),te(!1),Z.current=!1,fe(jn()),m("launch")},[]),Z=kn(!!t);ue(()=>{g!=="launch"||!z||Z.current||(Z.current=!0,Se(!0),_t(z,{...Me?{nonce:Me}:{},...w?{want:w}:{}}).then(pe))},[g,z,Me,w]);let le=ae(()=>{Se(!0),Kt().then(pe)},[]),dt=ae(h=>{if(me){let v=jn();te(!1),fe(v),z&&(h.preventDefault(),window.location.href=Yn(z,v??void 0,w??void 0))}le()},[me,le,z,w]),Ae=ze(()=>{let h=y?.runtimes;return h?ce.filter(v=>h.includes(v.id)):Qt()},[y?.runtimes]),ve=ze(()=>{let h=ce.find(v=>v.id===w);return h?{choice:h,Mark:Ye[h.id]??null}:null},[w]),Be=ze(()=>S.find(h=>h.id===Fe),[S,Fe]);ue(()=>{let h=Me;if(!e||!p||g!=="launch"||!h)return;let v=!1,H=Date.now()+15e4,U=()=>{};return U=Ce(async()=>{if(Date.now()>H){U(),te(!0);return}try{let tn=await e.claim(h);if(v)return;if(tn.declined){U(),pe(null),Ue("machine"),m("denied");return}if(!tn.claimed)return;U();try{Ve.current=new Set((await e.machines()).map(ke=>ke.id))}catch{Ve.current=new Set(S.map(ke=>ke.id))}m("waiting"),V(Date.now())}catch{}},ur,{immediate:!1,idle:!1}),()=>{v=!0,U()}},[e,g,S,Me,p]);let be=ze(()=>{if(!O)return null;if(O.approved||O.denied)return"answered";let h=O.expires_at?Date.parse(O.expires_at):Number.NaN;return Number.isFinite(h)&&h<=M?"expired":"live"},[O,M]);ue(()=>{if(!(g==="confirm"&&be==="live"||g==="waiting"||g==="hosted"))return;let v=setInterval(()=>De(Date.now()),1e3);return()=>clearInterval(v)},[g,be]);let pt=ae(async(h,v)=>{if(e)try{await e.approveRuntime(h,v),k(await e.machines())}catch(H){T(H.message)}},[e]),Ot=ae(async(h,v)=>{if(e)try{await e.preferRuntime(h,v),k(await e.machines())}catch(H){T(H.message)}},[e]);return g==="loading"?d("div",{className:"soba-connect",...c?{"data-theme":c}:{},style:Je,children:d("div",{className:"sc-card",children:d("p",{className:"sc-note",children:"Loading\u2026"})})}):N("div",{className:"soba-connect",...c?{"data-theme":c}:{},style:Je,children:[l&&d("button",{type:"button",className:"sc-modal-close",onClick:l,"aria-label":"Close",children:"\xD7"}),g==="manage"&&N("div",{className:"sc-card",children:[d("h2",{className:"sc-title",id:se,children:"Your compute"}),N("p",{className:"sc-sub",children:[d(yt,{context:y})," ",S.length>0&&he.length>0?"runs on your connected plan, and on these machines while they are awake.":he.length>0?"runs on the plan you connected. Nothing here is charged to you.":"runs on these machines, while they are awake."]}),d(ln,{machines:S,hosted:he,onApproveRuntime:pt,onPreferRuntime:(h,v)=>void Ot(h,v),onDisconnectHosted:h=>void it(h),onPair:()=>m("choose"),busy:K,...y?.app.name?{appName:y.app.name}:{}}),Q&&d("p",{className:"sc-error",children:Q})]}),g==="choose"&&N("div",{className:"sc-card",children:[d(ua,{context:y}),d("h2",{className:"sc-h",id:se,children:u==="payment_required"?"Carry on with your own AI":u==="no_compute"?"This run needs a machine":"Connect your AI"}),d("p",{className:"sc-p",children:"Use compute you already have."}),z&&Ae.length>0&&N(Ct,{children:[d("div",{className:"sc-opts",children:Ae.map(h=>{let v=Ye[h.id];return N("button",{type:"button",className:"sc-opt",onClick:()=>C(h.id),children:[d("span",{className:"sc-opt-tile","aria-hidden":"true",children:v&&d(v,{className:"sc-opt-mark"})}),d("span",{className:"sc-opt-text",children:d("span",{className:"sc-opt-label",children:h.label})}),(()=>{let H=It(h.id);return H?d("span",{className:`sc-opt-has sc-opt-has-${H.tone}`,children:H.text}):E===h.id?d("span",{className:"sc-opt-last",children:"last used"}):d(pr,{className:"sc-opt-go"})})()]},h.id)})}),N("p",{className:"sc-opt-note",children:["Your accounts stay there. ",ko(y)," never sees them."]})]}),(!z||Ae.length===0)&&d("p",{className:"sc-error",style:{marginTop:16},children:"This app has no publishable key yet, so there is nothing to pair against."}),Q&&d("p",{className:"sc-error",children:Q}),z&&y?.show_code===!0&&d("div",{className:"sc-opt-alt",children:d("button",{type:"button",className:"sc-alt-link",onClick:()=>m("code"),children:"I have a code"})})]}),g==="launch"&&N("div",{className:"sc-card",children:[N("div",{className:"sc-head",children:[d(Nn,{onClick:()=>m("choose")}),d("p",{className:"sc-head-title",children:"Soba App"})]}),d(wt,{mark:ve?.Mark??X,still:me||!Ke&&Y===null}),d("h2",{className:"sc-h",id:se,children:me?"No answer from this machine":Y==="absent"?"Nothing opened":Y===null?"Opening Soba App\u2026":"Approve it on this machine"}),me?d("p",{className:"sc-p",children:"The Soba app did not answer. It may not be open, or nobody was there. Try again when you are ready."}):Y==="absent"?d("p",{className:"sc-p",children:"Nothing opened on this machine. Open it yourself below, or install it if it is not here yet."}):d("p",{className:"sc-p",children:Y===null?"Approve it there and this page does the rest.":"This page finishes on its own."}),ve&&N("p",{className:"sc-prereq",children:[ve.Mark&&d(ve.Mark,{className:"sc-rt-mark"}),"Needs ",ve.choice.prerequisite]}),N("div",{className:"sc-stack",style:{marginTop:18},children:[d("a",{className:Y==="absent"||me?"sc-btn sc-btn-primary":"sc-btn",href:nn??"#",onClick:dt,children:me?"Try again":Y==="absent"?"Open Soba App":"Open it again"}),d("p",{className:"sc-note",children:Y===null?"Your browser will ask permission first.":"Your browser asks permission the first time."}),ve&&Y==="absent"&&d("p",{className:"sc-note",children:d(da,{text:ve.choice.hint})}),N("div",{className:"sc-foot-strip",children:[d("span",{children:"Not installed on this machine?"}),N("button",{type:"button",className:"sc-foot-go",onClick:()=>m("get"),children:["Get it",d(pr,{})]})]})]})]}),g==="get"&&N("div",{className:"sc-card",children:[N("div",{className:"sc-head",children:[d(Nn,{onClick:()=>m("launch")}),d("p",{className:"sc-head-title",children:"Get Soba App"})]}),d("div",{className:"sc-opts",children:Jn.map(h=>N("a",{className:"sc-opt",href:`${ut}/download/${h.slug}`,target:"_blank",rel:"noreferrer noopener",children:[d("span",{className:"sc-opt-tile","aria-hidden":"true",children:d(Ft,{className:"sc-opt-mark"})}),d("span",{className:"sc-opt-text",children:d("span",{className:"sc-opt-label",children:h.label})}),d(pr,{className:"sc-opt-go"})]},h.slug))}),d("p",{className:"sc-opt-note",children:"Install it, then come back here and press the row you started with."})]}),g==="code"&&N("div",{className:"sc-card",children:[N("div",{className:"sc-head",children:[d(Nn,{onClick:()=>m("choose")}),d("p",{className:"sc-head-title",children:"Soba App"})]}),d("h2",{className:"sc-h",id:se,children:"Enter the code from that machine"}),d("p",{className:"sc-p",children:"Eight characters, shown by the Soba app once you paste the link."}),N("form",{className:"sc-stack",style:{marginTop:16},onSubmit:h=>{h.preventDefault(),lt()},children:[d("input",{className:"sc-input",value:W,onChange:h=>F(h.target.value),placeholder:"ACDE-F234",autoComplete:"off",autoFocus:!0,"aria-label":"Pairing code"}),Q&&d("p",{className:"sc-error",children:Q}),d("button",{type:"submit",className:"sc-btn sc-btn-primary",disabled:K||W.length<8,children:K?"Checking\u2026":"Continue"})]})]}),g==="confirm"&&O&&N("div",{className:"sc-card",children:[N("div",{className:"sc-head",children:[d(Nn,{onClick:()=>m("code")}),d("p",{className:"sc-head-title",children:"Soba App"})]}),d("h2",{className:"sc-title",children:"Attach this machine to your account?"}),N("p",{className:"sc-sub",children:[d(yt,{context:y})," may send your runs to it once you approve. It can never see the account or the keys on it."]}),N("ul",{className:"sc-facts",children:[d(zn,{k:"Code",v:O.user_code}),d(zn,{k:"Machine",v:O.hostname??"not stated"}),d(zn,{k:"System",v:[O.platform,O.arch].filter(Boolean).join(" / ")||"not stated"}),d(zn,{k:"Asked by",v:O.client??"not stated"}),O.labels.length>0&&d(zn,{k:"Labels",v:O.labels.join(", ")})]}),d("p",{className:"sc-note",style:{marginTop:12},children:"Every line above is what that machine said about itself. If none of it looks like a computer of yours, say no."}),be==="expired"&&d("p",{className:"sc-error",children:"That code has expired. Ask the machine for a new one. It prints a fresh code each time it starts."}),be==="answered"&&d("p",{className:"sc-error",children:"That code has already been answered. If it was not you, deny the next one."}),Q&&d("p",{className:"sc-error",children:Q}),N("div",{className:"sc-row",style:{marginTop:16},children:[d("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>void An(),disabled:K||be!=="live",children:"Approve"}),d("button",{type:"button",className:"sc-btn",onClick:()=>void ct(),disabled:K||be==="answered",children:"No, deny it"})]}),be==="live"&&O.expires_at&&N("p",{className:"sc-note",style:{marginTop:10},children:["This code expires in ",la(Date.parse(O.expires_at)-M),"."]})]}),g==="waiting"&&N("div",{className:"sc-card",children:[N("div",{className:"sc-head",children:[d(Nn,{onClick:()=>m("choose")}),d("p",{className:"sc-head-title",children:ve?.choice.short??"Soba App"})]}),d(wt,{mark:ve?.Mark??X}),d("h2",{className:"sc-h",id:se,children:"Approved. Waiting for it to connect"}),d("p",{className:"sc-p",children:"Nothing more to do here. This page changes when it arrives."}),de>0&&M-de>aa&&d("p",{className:"sc-note sc-tone-warn",style:{marginTop:14,textAlign:"center"},children:"Still nothing. Look at the Soba app on that machine: it says what it is doing. This keeps watching either way."})]}),g==="connected"&&N("div",{className:"sc-card",children:[d(mr,{tone:"ok"}),d("h2",{className:"sc-h",id:se,children:Be?.label?`${Be.label} is connected`:"Connected"}),N("p",{className:"sc-p",children:[d(yt,{context:y})," will use ",Be?.label?"it":"this machine"," from now on, while it is awake."]}),o&&N(Ct,{children:[d("div",{style:{marginTop:16},children:d(Un,{machines:S,onApproveRuntime:pt})}),d("button",{type:"button",className:"sc-btn sc-btn-wide",style:{marginTop:14},onClick:()=>m("manage"),children:"Done"})]})]}),g==="hosted"&&N("div",{className:"sc-card",children:[N("div",{className:"sc-head",children:[d(Nn,{onClick:()=>m("choose")}),d("p",{className:"sc-head-title",children:"ChatGPT"})]}),Pe?d(wt,{mark:an,still:!0}):d(wt,{mark:an}),d("h2",{className:"sc-h",id:se,children:Pe?"Your browser blocked the window":"Finish signing in to ChatGPT"}),d("p",{className:"sc-p",children:Pe?"Nothing opened. Open the sign-in yourself below. A link you click is allowed where a window we open is not.":"Approve it in the window that opened."}),N("div",{className:"sc-stack",style:{marginTop:18},children:[Pe&&d("a",{className:"sc-btn sc-btn-primary",href:Pe,target:"soba-connect-plan",rel:"noreferrer",children:"Open the ChatGPT sign-in"}),Q&&d("p",{className:"sc-error",children:Q}),Qe>0&&M-Qe>ia&&d("p",{className:"sc-note sc-tone-warn",children:"Still nothing. The window may have been closed before it finished, or the sign-in may have been declined. This keeps watching either way."})]})]}),g==="hosted_connected"&&N("div",{className:"sc-card",children:[d(mr,{tone:"ok"}),d("h2",{className:"sc-h",id:se,children:"ChatGPT is connected"}),N("p",{className:"sc-p",children:[d(yt,{context:y})," will run on your ChatGPT plan",he[0]?.account_label?` (${he[0].account_label})`:"",". Nothing more to pay, nothing to install."]}),d("p",{className:"sc-opt-note",style:{textAlign:"center"},children:"It runs on our side, so it has no access to your files or your terminal."}),o&&N(Ct,{children:[d("button",{type:"button",className:"sc-btn sc-btn-wide",style:{marginTop:16},onClick:()=>m("manage"),children:"Done"}),d("div",{className:"sc-opt-alt",children:d("button",{type:"button",className:"sc-alt-link",onClick:()=>m("choose"),children:"Connect a machine too"})})]})]}),g==="denied"&&N("div",{className:"sc-card",children:[d(mr,{tone:"off"}),d("h2",{className:"sc-h",id:se,children:"Declined"}),d("p",{className:"sc-p",children:mn==="machine"?"Nothing was connected. You can ask again whenever you like.":"That machine was not attached to your account, and the terminal has been told so."}),d("button",{type:"button",className:"sc-btn sc-btn-wide",style:{marginTop:16},onClick:()=>m("choose"),children:"Back to the start"})]})]})}function ko(e){return e?.app.name??"this app"}function ca(e){let n=e?.app.icon_urls;if(n?.length)return n;let t=e?.app.icon_url;return t?[t]:[]}function No(e){let n=ca(e),[t,r]=J([]),o=ae(l=>{l&&r(i=>i.includes(l)?i:[...i,l])},[]),s=ae(l=>o(l.currentTarget.getAttribute("src")),[o]),a=ae(l=>{l?.complete&&l.naturalWidth===0&&o(l.getAttribute("src"))},[o]);return{icon:n.find(l=>!t.includes(l)),onError:s,ref:a}}function ua({context:e}){let{icon:n,onError:t,ref:r}=No(e);return e?.app.mark==="soba"?d(X,{className:"sc-app-mark"}):n?d("img",{className:"sc-app-mark",src:n,alt:"","aria-hidden":"true",ref:r,onError:t}):null}function yt({context:e}){let{icon:n,onError:t,ref:r}=No(e),o=e?.app.mark==="soba";return N("span",{className:"sc-app",children:[o&&d(X,{className:"sc-app-icon"}),!o&&n&&d("img",{className:"sc-app-icon",src:n,alt:"",ref:r,onError:t}),ko(e)]})}function Nn({onClick:e}){return d("button",{type:"button",className:"sc-head-back",onClick:e,"aria-label":"Back",children:d("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:d("path",{d:"M15 5 8 12l7 7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}function pr({className:e}){return d("svg",{className:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:d("path",{d:"M9 5l7 7-7 7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function wt({mark:e,still:n}){return N("span",{className:"sc-waiting","aria-hidden":"true",children:[!n&&d("svg",{className:"sc-waiting-orbit",viewBox:"0 0 100 100","aria-hidden":"true",focusable:"false",children:d("circle",{className:"sc-waiting-arc",cx:"50",cy:"50",r:"46"})}),d(e,{className:"sc-waiting-mark"})]})}function mr({tone:e}){return d("span",{className:`sc-result sc-result-${e}`,"aria-hidden":"true",children:d(Zt,{kind:e==="ok"?"snap":"gone",size:84})})}function da({text:e}){return d(Ct,{children:e.split("`").map((n,t)=>t%2===1?d("code",{className:"sc-inline-code",children:n},t):n)})}function zn({k:e,v:n}){return N("li",{className:"sc-fact",children:[d("span",{className:"sc-fact-key",children:e}),d("span",{children:n})]})}import{forwardRef as pa}from"react";import{jsx as gr,jsxs as fr}from"react/jsx-runtime";var Ar=pa(function({machine:n,className:t,...r},o){if(!n)return null;let{ariaLabel:s,state:a}=wn(n);return fr("button",{ref:o,type:"button","aria-label":s,className:["sc-btn","sc-btn-connected",t].filter(Boolean).join(" "),...r,children:[gr("span",{className:"sc-pill-tile","aria-hidden":"true",children:gr(X,{className:a.tone==="busy"?"sc-pill-mark sc-pill-mark-busy":"sc-pill-mark"})}),fr("span",{className:"sc-btn-connected-text",children:[a.word,fr("span",{className:"sc-btn-connected-where",children:[" on ",_(n)]})]}),gr("i",{className:`sc-dot sc-dot-${a.tone}`,"aria-hidden":"true"})]})});import{useEffect as ma,useRef as yr}from"react";var vt=0,br=null;function xo(){if(typeof document>"u")return()=>{};vt===0&&(br=document.body.style.overflow,document.body.style.overflow="hidden"),vt+=1;let e=!1;return()=>{e||(e=!0,vt-=1,vt===0&&(document.body.style.overflow=br??"",br=null))}}import{jsx as Ro}from"react/jsx-runtime";function qn({open:e,onClose:n,labelledBy:t,theme:r,style:o,children:s}){let a=yr(null),l=yr(null),i=yr(null);return ma(()=>{let c=a.current;if(c){if(!e){c.open&&c.close();return}return c.open||c.showModal(),document.activeElement===c&&l.current?.focus(),xo()}},[e]),Ro("dialog",{ref:a,className:"soba-connect sc-modal","aria-labelledby":t,...r?{"data-theme":r}:{},style:o,onCancel:c=>{c.preventDefault(),n()},onPointerDown:c=>{i.current=c.target},onClick:c=>{c.target===c.currentTarget&&i.current===c.currentTarget&&n()},children:Ro("div",{className:"sc-modal-sheet",ref:l,tabIndex:-1,children:s})})}import{useRef as fa,useState as Aa}from"react";var ha={"claude-code":{small:"haiku",large:"opus"}};function So(e){let n=ha[e];return!!(n?.small||n?.large)}var ga={haiku:"Haiku",sonnet:"Sonnet",opus:"Opus",fable:"Fable"};function Po(e){return ga[e]??e}function wr(e){let n=[...e].sort(mt),t=Ie([...e]),r=t?Ge(t):null,s=[{id:"auto",kind:"auto",label:"Automatic",model:"auto",...r?.runtime?{note:`Uses ${r.runtime.display_name}`}:{}}];n.some(u=>ye(u).some(p=>So(p.id)))&&s.push({id:"small",kind:"size",label:"Fast",note:"quick and cheap",model:"small"},{id:"large",kind:"size",label:"Best",note:"the most capable",model:"large"});let l=new Map;for(let u of n)for(let p of ye(u))for(let f of p.models){if(!f)continue;let g=`${p.id}/${f}`,m=l.get(g);if(m){m.machines.add(_(u));continue}l.set(g,{option:{id:g,kind:"named",label:Po(f),model:f,runtime:p.id,runtimeName:p.display_name,costClass:p.cost_class},machines:new Set([_(u)])})}let i=new Set;for(let{machines:u}of l.values())for(let p of u)i.add(p);let c=i.size>1;for(let{option:u,machines:p}of l.values()){let f=c&&p.size===1?[...p][0]:void 0;s.push(f?{...u,machine:f}:u)}return s}function Zn(e){let n=[],t=[];for(let r of e){if(r.kind!=="named"){n.push(r);continue}let o=r.runtimeName??r.runtime??"",s=t.find(a=>a.heading===o);s?s.options.push(r):t.push({heading:o,options:[r]})}return n.length?[{heading:null,options:n},...t]:t}function Cr(e,n){let t=e.find(o=>o.kind==="auto")??{id:"auto",kind:"auto",label:"Automatic",model:"auto"};if(!n||n==="auto")return{selected:t,unavailable:null};let r=e.find(o=>o.id===n);return r?{selected:r,unavailable:null}:{selected:t,unavailable:n}}function vr(e){return e.runtime?{model:e.model,runtime:e.runtime}:{model:e.model}}function Xn(e){return e.length>1}import{jsx as kt,jsxs as Mo}from"react/jsx-runtime";function kr({options:e,selected:n,onPick:t,caption:r,disabled:o,className:s}){let[a,l]=Aa(!1),i=fa(null);if(!Xn(e))return null;let c=s?`sc-mp ${s}`:"sc-mp";return Mo("span",{className:c,children:[r&&kt("span",{className:"sc-mp-cap",children:r}),Mo("button",{ref:i,type:"button",className:"sc-mp-btn","aria-haspopup":"menu","aria-expanded":a,"aria-label":`Model: ${n.label}. Change`,disabled:o,onClick:()=>l(u=>!u),children:[kt("span",{className:"sc-mp-label",children:n.label}),kt(Cn,{open:!0})]}),a&&kt(Dn,{anchor:i,label:"Which model answers",options:ba(e),current:n.id,onClose:()=>l(!1),onPick:u=>{l(!1),u&&t(u)}})]})}function ba(e){let n=[];for(let t of Zn(e))t.options.forEach((r,o)=>{let s=ya(r);n.push({id:r.id,label:r.label,...s?{note:s}:{},...t.heading&&o===0?{heading:t.heading}:{},...!t.heading&&r.kind==="size"&&o===1?{rule:!0}:{}})});return n}function ya(e){return e.kind!=="named"?e.note:e.machine?`on ${e.machine}`:void 0}import{useEffect as Nr,useRef as wa}from"react";import{jsx as Ca}from"react/jsx-runtime";var un=8;function xr({open:e,onClose:n,anchor:t,label:r,theme:o,style:s,children:a}){let l=wa(null);return Nr(()=>{let i=l.current;if(!(!i||!(typeof i.showPopover=="function")))try{e?i.showPopover():i.hidePopover()}catch{}},[e]),Nr(()=>{if(!e)return;let i=()=>{let u=l.current,p=t.current;if(!u||!p)return;let f=p.getBoundingClientRect(),g=u.offsetWidth,m=u.offsetHeight,y=window.innerWidth-g-un,R=Math.max(un,Math.min(f.right-g,Math.max(un,y))),S=f.bottom+un,k=f.top-un-m,W=S+m>window.innerHeight-un&&k>un?k:S;u.style.left=`${Math.round(R)}px`,u.style.top=`${Math.round(W)}px`};i();let c=requestAnimationFrame(i);return window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),()=>{cancelAnimationFrame(c),window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i)}},[e,t]),Nr(()=>{if(!e)return;let i=u=>{u.key==="Escape"&&n()},c=u=>{let p=u.target;p&&(l.current?.contains(p)||t.current?.contains(p)||n())};return document.addEventListener("keydown",i),document.addEventListener("pointerdown",c,!0),()=>{document.removeEventListener("keydown",i),document.removeEventListener("pointerdown",c,!0)}},[e,n,t]),Ca("div",{ref:l,role:"dialog","aria-label":r,className:"soba-connect sc-pop",...o?{"data-theme":o}:{},popover:"manual",hidden:!e,style:s,children:a})}var Kn=new Map,xn=new Map,Eo=!1;function va(){Eo||typeof window>"u"||(Eo=!0,window.addEventListener("storage",e=>{!e.key||!Kn.has(e.key)||(xn.set(e.key,bt(e.key)),Rr(e.key))}))}function Rr(e){for(let n of Kn.get(e)??[])n()}function _n(e){return e??""}function Sr(e,n){let t=_n(e);va();let r=Kn.get(t)??new Set;return r.add(n),Kn.set(t,r),()=>{r.delete(n),r.size===0&&Kn.delete(t)}}function Nt(e){let n=_n(e),t=xn.get(n);if(t!==void 0)return t;let r=e?bt(e):null;return xn.set(n,r),r}function Pr(){return null}function Mr(e,n){Nt(e)===null&&(xn.set(_n(e),n),Rr(_n(e)))}function Er(e,n){let t=_n(e);xn.get(t)!==n&&(xn.set(t,n),ar(e,n),Rr(t))}function We(e){let n=`${e.unit}s`;return e.reward==="unlimited"?`Unlimited ${n} on your own AI`:e.reward==="included"&&e.includedUnits!==null?`${Na(e.includedUnits)} ${n} a month once you connect`:e.reward==="credit"&&e.creditMicros>0?`${ka(e.creditMicros)} back each month you stay connected`:null}function He(e){return e==="unlimited"||e==="included"}var Oo=new Set(["user-hardware","user-subscription"]),Io=new Set(["open-weights","frontier"]);function xe(e){return e===null||e.length===0?!1:e.every(n=>Oo.has(n))}var ka=e=>(e/1e6).toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}),Na=e=>e.toLocaleString("en-US");function Ir(e,n){if(!(n===null||n.some(s=>Io.has(s))))return!1;let r=e.findIndex(s=>Oo.has(s));if(r===-1)return!1;let o=e.findIndex(s=>Io.has(s));return o===-1||r<o}import{createContext as Lo,useContext as To}from"react";var Or=Lo(null);function Rn(){return To(Or)}var Lr=Lo({context:null,machines:void 0,theme:"light"});function B(){return To(Lr)}import{useMemo as Sa}from"react";import{createContext as xa,useContext as Ra}from"react";var Tr=xa(null);function D(){let e=Ra(Tr);if(!e)throw new Error("useSoba() must be used inside a <SobaProvider>.");return e}function $n(){let{compute:e}=D();return Sa(()=>{let n=e.machines,t=[...n].sort((s,a)=>Ie([s,a])===s?-1:1).map(Pa),r=Ie([...n]),o=on(n);return{view:t.length?"machines":e.loading?"loading":e.error?"error":"empty",machines:t,primary:r?t.find(s=>s.machine.id===r.id)??null:null,connected:e.connected,online:e.online,stalled:e.connected&&!e.online&&o?t.find(s=>s.machine.id===o.id)??null:null,loading:e.loading,error:e.error,refresh:e.refresh}},[e])}function Pa(e){let n=Ge(e);return{machine:e,name:_(e),state:sn(e),status:Bt(e),hardware:Wn(e),lastSeen:e.state==="offline"?Hn(e.last_seen_at):null,runtimes:ye(e).map(t=>({runtime:t,name:t.display_name,auth:Gn(t),quarantined:!!t.quarantined})),runsOn:{by:n.by,name:n.runtime?.display_name??null}}}import{jsx as et}from"react/jsx-runtime";function Ma({className:e}){let{theme:n}=B(),t=e?`soba-connect ${e}`:"soba-connect";return et("div",{className:t,"data-theme":n,children:et(Br,{})})}function Br(){let e=$n();return e.view==="loading"?et("p",{className:"sc-note",children:"Loading\u2026"}):e.view==="error"?et("p",{className:"sc-error",children:e.error?.message}):et(Un,{machines:e.machines.map(n=>n.machine)})}import{useCallback as tt,useEffect as Dr,useMemo as Wa,useRef as Ur,useState as Pn}from"react";import{useId as Ea}from"react";import{jsx as Sn,jsxs as xt}from"react/jsx-runtime";function nt({open:e,onOpenChange:n,initialCode:t,onConnected:r,showStatus:o,reason:s}){let{error:a}=D(),l=Rn(),i=B(),c=()=>n(!1),u=Ea(),p=i.context?.background?.trim(),f=p?rn(p,i.context?.accent):void 0;return xt(qn,{open:e,onClose:c,labelledBy:u,theme:i.theme,style:f,children:[a?xt("div",{className:"sc-card",children:[Sn("h2",{className:"sc-title",id:u,children:"Could not start"}),Sn("p",{className:"sc-error",children:a.message})]}):!l&&!i.context?xt("div",{className:"sc-card",children:[Sn("h2",{className:"sc-title",id:u,children:"One moment"}),Sn("p",{className:"sc-note",children:"Getting your compute\u2026"})]}):Sn(hr,{client:l,active:e,onClose:c,headingId:u,theme:i.theme,initialContext:i.context,...i.machines!==void 0?{initialMachines:i.machines}:{},...t?{initialCode:t}:{},...r?{onConnected:r}:{},...o===void 0?{}:{showStatus:o},...s?{reason:s}:{}}),xt("p",{className:"sc-modal-foot",children:[Sn(X,{className:"sc-foot-mark"}),"Secured by Soba"]})]})}import{forwardRef as Ia}from"react";import{jsx as Oa}from"react/jsx-runtime";var Gr=Ia(function(n,t){let{theme:r}=B();return Oa(Ar,{ref:t,"data-theme":r,...n})});import{useCallback as La}from"react";function Ta(){let{connect:e}=D(),n=$n(),t=La(()=>e.open("manual"),[e]);return{...wn(n.primary?.machine??null),machine:n.primary,open:t,canOpen:e.hasModal,loading:n.view==="loading"}}function Wr(e){return wn(e)}import{useCallback as Bo,useEffect as Ba,useState as Ga}from"react";function Hr({enabled:e=!0,intervalMs:n=3e3}={}){let t=Rn(),[r,o]=Ga(null),s=Bo(async()=>{t&&o(await t.runs())},[t]);Ba(()=>{if(!e||!t)return;let l=!0,i=Ce(async()=>{let c=await t.runs();l&&o(c)},n);return()=>{l=!1,i()}},[e,t,n]);let a=Bo(async l=>{if(!t)throw new Error("Stopping a run needs <SobaProvider>.");await t.stopRun(l),await s().catch(()=>{})},[t,s]);return{runs:r,refresh:s,stop:a}}import{Fragment as Go,jsx as Mn,jsxs as Wo}from"react/jsx-runtime";function dn({children:e,variant:n,className:t,initialCode:r,onConnected:o,defaultOpen:s,open:a,onOpenChange:l,showConnected:i=!0}){let{compute:c,connect:u}=D(),p=B(),{theme:f}=p,g=Rn(),[m,y]=Pn(s??!!r),R=Ur(null),S=a!==void 0,k=!S&&!s&&!r&&u.hasModal,W=S?a:k?u.isOpen:m,F=w=>{k?w?u.open("manual"):u.close():S||y(w),l?.(w)},O=Ur(W);Dr(()=>{O.current&&!W&&R.current?.focus(),O.current=W},[W]);let[P,Q]=Pn(!1),{runs:T,stop:K}=Hr({enabled:P}),q=Wa(()=>P&&T?Ha(c.machines,T):c.machines,[c.machines,P,T]),de=Ie(q),V=i&&Wr(de).connected,M=tt(()=>Q(!1),[]),[De,Y]=Pn(!1),pe=tt(async()=>{Y(!0);try{await c.refresh()}finally{Y(!1)}},[c]),Ke=Ur(pe);Ke.current=pe,Dr(()=>{P&&Ke.current()},[P]);let[Se,me]=Pn(!1),[te,mn]=Pn([]),Ue=!!p.context?.hosted_available;Dr(()=>{if(!P||!g||!Ue)return;let w=!0;return g.hosted().then(j=>{w&&mn(j.credentials)}).catch(()=>{}),()=>{w=!1}},[P,g,Ue]);let[Fe,ie]=Pn(null),he=tt(async(w,j)=>{if(g){ie(null);try{await g.approveRuntime(w,j),await c.refresh()}catch(E){ie(E.message)}}},[g,c]),re=tt(async(w,j)=>{if(g){ie(null);try{await g.preferRuntime(w,j),await c.refresh()}catch(E){ie(E.message)}}},[g,c]),Qe=tt(async w=>{if(g){ie(null);try{await g.disconnectHosted(w),mn((await g.hosted()).credentials)}catch(j){ie(j.message)}}},[g]),hn=p.context?.background?.trim(),Pe=hn?rn(hn,p.context?.accent):void 0,Te=V&&!e,oe=()=>{if(Te&&!S&&!s&&!r){Q(w=>!w);return}F(!0)};return Wo(Go,{children:[Te?Mn(Gr,{ref:R,machine:de,"aria-haspopup":"dialog","aria-expanded":P,onClick:oe,...t?{className:t}:{}}):Mn("button",{ref:R,type:"button","data-theme":f,className:["sc-btn","sc-btn-icon",n==="primary"?"sc-btn-primary":"",t].filter(Boolean).join(" "),onClick:oe,children:e??Wo(Go,{children:[Mn(X,{className:"sc-btn-mark"}),"Connect compute"]})}),Mn(xr,{open:P,onClose:M,anchor:R,label:"Your compute",theme:f,...Pe?{style:Pe}:{},children:Mn(ln,{machines:q,hosted:te,onApproveRuntime:(w,j)=>void he(w,j),onPreferRuntime:(w,j)=>void re(w,j),onDisconnectHosted:w=>void Qe(w),onRefresh:()=>void pe(),refreshing:De,error:Fe,runs:T,onStopRun:async w=>{ie(null);try{await K(w)}catch(j){throw ie(j.message),j}},onPair:()=>{Q(!1),k?u.open("pair"):(me(!0),F(!0))},...p.context?.app.name?{appName:p.context.app.name}:{}})}),!k&&Mn(nt,{open:W,onOpenChange:w=>{w||me(!1),F(w)},...Se?{showStatus:!1}:{},...r?{initialCode:r}:{},...o?{onConnected:o}:{}})]})}function Ha(e,n){return e.map(t=>{if(t.state==="offline")return t;let r=n.filter(o=>o.machine_id===t.id).length;return{...t,active:r,state:r>0?"busy":"online"}})}import{jsx as Fr,jsxs as Ua}from"react/jsx-runtime";function Da({initialCode:e,onConnected:n,className:t,showStatus:r=!0}){let{theme:o}=B();return Ua("div",{className:t?`soba-connect ${t}`:"soba-connect","data-theme":o,children:[r&&Fr(Br,{}),Fr("div",{className:"sc-compute-act",children:Fr(dn,{...e?{initialCode:e}:{},...n?{onConnected:n}:{}})})]})}import{useId as _a,useState as $a}from"react";import{useCallback as Jr,useEffect as Qo,useState as Jo}from"react";import{useCallback as Fa,useState as Qa}from"react";function rt(){let[e,n]=Qa(null);return{open:Fa(()=>{n(null),$t().then(n)},[]),launch:e,note:e==="absent"?"Nothing opened here. That machine may be a different computer, or asleep.":null}}import{useCallback as Ho,useMemo as Do}from"react";function pn(e){if(!e)return null;if(typeof e=="string")return e;if(typeof Response<"u"&&e instanceof Response)return Uo(e.status);let n=e,t=n.error;return typeof t?.code=="string"?t.code:typeof t?.type=="string"?t.type:typeof n.code=="string"?n.code:typeof n.status=="number"?Uo(n.status):n.cause&&n.cause!==e?pn(n.cause):null}function Uo(e){return e===402?"payment_required":e===409?"no_compute":null}function Qr(...e){let[n,t]=e,{plan:r,compute:o,connect:s}=D(),a=t?.predict??e.length===0,l=Va(Ja(n),o)??(a?Ya(r,o):null),i=r.plan,c=r.plans,u=Do(()=>{if(l!=="payment_required")return null;let m=i?.price??0,y=i?.included_units??0;return c.find(R=>R.id!==i?.id&&R.price>m&&(R.included_units===null||R.included_units>y))??null},[l,c,i]),p=Ho(async()=>{if(!u)return;if(u.selectable){await r.select(u.id);return}let m=await r.checkout(u.id);window.location.assign(m)},[u,r]),f=s.open,g=Ho(()=>{l&&f(l)},[f,l]);return Do(()=>{if(!l)return null;let m=i?We({unit:i.unit,reward:i.connected_reward,includedUnits:i.connected_included_units,creditMicros:i.connected_credit*1e6}):null,y=i&&He(i.connected_reward)?m:null;return{reason:l,...ja(l,{connectOffer:y,connected:o.connected,online:o.online,machine:on(o.machines)?.label??null,unit:i?.unit??"message",interval:i?.interval??"month",upgrade:u!==null,resets:r.current?.period_end??null}),connectOffer:y,upgradeTo:u,connect:g,upgrade:p}},[l,i,o,u,g,p,r.current?.period_end])}function Ja(e){let n=pn(e);return n==="payment_required"||n==="no_compute"?n:null}function Va(e,n){return e==="no_compute"&&n.connected&&n.online?null:e}function Ya(e,n){let t=e.plan;return!t||n.loading?null:xe(t.route_allow)&&!n.online?"no_compute":e.remaining===0&&t.overage==="stop"?"payment_required":null}function ja(e,n){if(e==="payment_required"){let t=`No ${n.unit}s left this ${n.interval}`;return n.connectOffer&&!n.connected?{title:t,body:`${n.connectOffer}. Connecting takes a minute and costs nothing.`}:n.connectOffer&&!n.online?{title:t,body:`${n.connectOffer}. Waking ${n.machine??"your machine"} is enough.`}:n.upgrade?{title:t,body:n.resets?`A larger plan carries on now. This one comes back on ${Fo(n.resets)}.`:"A larger plan carries on now, or wait for this one to renew."}:{title:t,body:n.resets?`Your allowance comes back on ${Fo(n.resets)}.`:"Your allowance comes back at the start of the next period."}}return n.connected&&!n.online?{title:`${n.machine??"Your machine"} can't be reached`,body:"This run needs it awake and connected. Open Soba App on that machine, or connect another one."}:{title:"Nothing connected yet",body:"This app runs on AI you already pay for, on a machine of your own. Connect one and this run has somewhere to go."}}function Fo(e){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString(void 0,{day:"numeric",month:"long"})}function za(e){let{plan:n,allowance:t,connected:r,online:o,quiet:s,error:a,predict:l,at:i,waved:c}=e;if(!n)return null;let u=e.allow!==void 0?e.allow:n.route_allow;if(r){if(o)return null;let y=xe(u);return{reason:"stalled",title:`${s??"Your machine"} can\u2019t be reached`,detail:y?"The Soba app there has stopped reporting in, so runs have nowhere to go until it is back.":"The Soba app there has stopped reporting in, so nothing will run on your own AI until it is back.",meter:null,dismissible:!1,atTheWall:!1,ownCompute:y}}let p=pn(a),f=p==="payment_required"||p==="no_compute",g=n.ask_to_connect!==!1&&Ir(n.route_prefer,u);if(!l&&!f&&!g)return null;let m=xe(u)?qa(n.unit,xe(n.route_allow)):He(n.connected_reward)?Xa(t,n,i):g?Za(n.unit):null;return!m||m.dismissible&&c?null:{...m,dismissible:!!m.dismissible,ownCompute:!1,atTheWall:!m.dismissible&&(!l||m.meter!==null&&m.meter.left===0)}}function Vr(e={}){let{at:n=.25,error:t,allow:r}=e,o=e.predict??!(e.errorGiven??t!==void 0),{plan:s,compute:a,connect:l}=D(),i=ir(l.publishableKey),[c,u]=Jo(!1);Qo(()=>{u(lr(i))},[i]);let p=Jr(()=>{u(!0),cr(i)},[i]),f=Jr(()=>l.open("manual"),[l]),g=Jr(()=>l.open("no_compute"),[l]),m=rt(),[y,R]=Jo(!1),{refresh:S}=a,{launch:k}=m;Qo(()=>{if(k===null||k==="absent")return;R(!1);let Q=setInterval(()=>void S(),3e3),T=setTimeout(()=>{clearInterval(Q),R(!0)},2e4);return()=>{clearInterval(Q),clearTimeout(T)}},[k,S]);let W=Ka(l.app?.name,Vn(l.connectUrl)),F=s.loading||a.loading,O=on(a.machines),P=F?null:za({plan:s.plan,allowance:{remaining:s.remaining,included:s.included},connected:a.connected,online:a.online,quiet:O?_(O):null,error:t,predict:o,...r!==void 0?{allow:r}:{},at:n,waved:c});return{reason:P?.reason??null,visible:P!==null,title:P?.title??null,detail:P?.detail??null,meter:P?.meter??null,dismissible:P?.dismissible??!1,dismissed:c,dismiss:p,open:f,atTheWall:P?.atTheWall??!1,steps:W,stalled:P?.reason==="stalled"?{machine:O?_(O):null,ownCompute:P.ownCompute,wake:m.open,launch:m.launch,note:m.note,stuck:y,connectAnother:g}:null,loading:F}}function qa(e,n){return{reason:"needed",title:n?"This plan runs on your own AI.":`These ${e}s run on your own AI.`,detail:`Connect a machine and your ${e}s run there, free, on access you already have.`,meter:null}}function Za(e){return{reason:"preferred",title:"This plan prefers your own AI.",detail:`Connect a machine and your ${e}s run there instead, on access you already have.`,meter:null,dismissible:!0}}function Xa(e,n,t){let{remaining:r,included:o}=e;if(r===null||o===null||o===0||r>Math.ceil(o*t))return null;let s=We({unit:n.unit,reward:n.connected_reward,includedUnits:n.connected_included_units,creditMicros:n.connected_credit*1e6});return s?{reason:"running",title:r===0?`No ${n.unit}s left this month.`:`${r} ${n.unit}${r===1?"":"s"} left this month.`,detail:`${s}.`,meter:{left:r,of:o}}:null}function Ka(e,n){return[{lead:"Download Soba App",detail:"",...n?{linksLead:"Get it for"}:{},links:n?Jn.map(t=>({label:t.label,href:`${n}/download/${t.slug}`})):[]},{lead:"Connect compute",detail:"Press this, then approve the pairing when the app asks.",opens:!0,links:[]},{lead:"Let your AIs serve",detail:`It finds what is installed on that machine. Allow one, and ${e??"this app"} sends every run there.`,linksLead:"Nothing on it yet?",links:ce.map(t=>({label:t.short,href:t.install}))}]}import{Fragment as Yo,jsx as L,jsxs as qe}from"react/jsx-runtime";function ei(e){let{className:n,fallback:t=null}=e,r=Vr({...e.at===void 0?{}:{at:e.at},...e.predict===void 0?{}:{predict:e.predict},...e.allow===void 0?{}:{allow:e.allow},error:e.error,errorGiven:"error"in e}),{connect:o}=D(),{theme:s}=B(),[a,l]=$a(null),i=_a(),c=L(Yo,{children:t});if(!r.visible)return c;if(r.stalled)return L(Vo,{className:n,theme:s,stalled:!0,children:L(ni,{title:r.title??"",detail:r.detail??"",stalled:r.stalled})});let u=a??r.atTheWall;return qe(Vo,{className:n,theme:s,children:[qe("div",{className:"sc-nudge-top",children:[qe("div",{className:"sc-nudge-say",children:[L("p",{className:"sc-nudge-title",children:r.title}),L("p",{className:"sc-nudge-detail",children:r.detail}),qe("button",{type:"button",className:"sc-btn sc-btn-quiet sc-nudge-more","aria-expanded":u,"aria-controls":i,onClick:()=>l(!u),children:[u?"Hide the details":"How it works",L(ri,{})]})]}),r.dismissible?L("button",{type:"button",className:"sc-nudge-dismiss","aria-label":"Dismiss",title:"Dismiss",onClick:r.dismiss,children:L(ti,{})}):null]}),u?L("ol",{className:"sc-nudge-steps",id:i,children:r.steps.map(p=>qe("li",{children:[p.opens?L("button",{type:"button",className:"sc-step-lead",onClick:()=>o.open("manual"),children:p.lead}):L("strong",{children:p.lead}),p.detail?L("span",{children:p.detail}):null,p.links.length>0?qe("span",{className:"sc-step-links",children:[p.linksLead,p.links.map(f=>L("a",{href:f.href,target:"_blank",rel:"noreferrer noopener",children:f.label},f.href))]}):null]},p.lead))}):null,L(dn,{variant:"primary"})]})}function Vo({className:e,theme:n,stalled:t,children:r}){return L("div",{className:e?`soba-connect sc-fill ${e}`:"soba-connect sc-fill","data-theme":n,children:L("div",{className:t?"sc-nudge sc-nudge-stalled":"sc-nudge",children:r})})}function ni({title:e,detail:n,stalled:t}){return qe(Yo,{children:[L("div",{className:"sc-nudge-top",children:qe("div",{className:"sc-nudge-say",children:[L("p",{className:"sc-nudge-title",children:e}),L("p",{className:"sc-nudge-detail",children:n}),t.note&&L("p",{className:"sc-nudge-note",children:t.note}),t.stuck&&L("p",{className:"sc-nudge-note",children:"The Soba app is open, but this machine still isn\u2019t reporting in. It may no longer be connected to this app."}),(t.launch==="absent"||t.stuck)&&L("button",{type:"button",className:"sc-btn sc-btn-quiet sc-nudge-more",onClick:t.connectAnother,children:t.stuck?"Connect it again":"Connect another machine"})]})}),L("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:t.wake,children:"Open Soba App"})]})}function ti(){return L("svg",{viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",className:"sc-nudge-x",children:L("path",{d:"m4.8 4.8 6.4 6.4M11.2 4.8l-6.4 6.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function ri(){return L("svg",{viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",className:"sc-nudge-chev",children:L("path",{d:"M4.5 6.5 8 10l3.5-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}var oi=new Set(["delta","thinking","status","done","error"]);function En(e){let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let t=n,r=t.type==="event"?t.event:t;if(!r||typeof r!="object")return null;let o=r;if(typeof o.type!="string"||!oi.has(o.type))return null;let s={type:o.type};return typeof o.text=="string"&&(s.text=o.text),typeof o.message=="string"&&(s.message=o.message),typeof o.tool=="string"&&(s.tool=o.tool),typeof o.tier=="string"&&(s.tier=o.tier),o.usage&&typeof o.usage=="object"&&(s.usage=o.usage),typeof o.session=="string"&&(s.session=o.session),typeof o.toolInput=="string"&&(s.toolInput=o.toolInput),o.git&&typeof o.git=="object"&&(s.git=o.git),o.turn&&typeof o.turn=="object"&&typeof o.turn.text=="string"&&(s.turn={text:o.turn.text}),typeof o.reason=="string"&&(s.reason=o.reason),typeof o.retryable=="boolean"&&(s.retryable=o.retryable),(o.state==="interrupted"||o.state==="resumed")&&(s.state=o.state),s}async function*Yr(e){let n=e.body;if(!n)throw new Error("That run response had no body to stream.");let t=(e.headers.get("content-type")??"").includes("ndjson"),r=n.getReader(),o=new TextDecoder,s="",a=[];try{for(;;){let i=await r.read();if(i.done)break;for(s+=o.decode(i.value,{stream:!0});;){let c=s.indexOf(`
|
|
3
|
-
`);if(
|
|
4
|
-
`);if(
|
|
5
|
-
`);if(
|
|
2
|
+
var fs={"claude-code":{small:"haiku",large:"opus"}};function vt(e){let n=fs[e];return!!(n?.small||n?.large)}import{useEffect as Os,useRef as Ls,useState as Pt}from"react";var xn=class extends Error{status;constructor(n,t){super(n),this.name="ConnectError",this.status=t}},gs=5*6e4,Dn=class{session;baseUrl;doFetch;lastMachines=null;machinesUrl=null;gatewayBackUntil=0;constructor(n){this.session=n.session,this.baseUrl=(n.baseUrl??"").replace(/\/+$/,""),this.doFetch=n.fetchImpl??fetch.bind(globalThis)}async context(){let n=await this.request("GET","/v1/connect");return this.setMachinesUrl(n.machines_url),n}setMachinesUrl(n){typeof n=="string"&&/^https?:\/\//.test(n)&&(this.machinesUrl=n)}async machines(){let n=this.lastMachines,t=n?`?v=${encodeURIComponent(n.version)}`:"",r;if(this.machinesUrl&&Date.now()>=this.gatewayBackUntil)try{r=await this.request("GET",`${this.machinesUrl}${t}`)}catch(a){if(a instanceof xn&&a.status===401)throw a;this.gatewayBackUntil=Date.now()+gs}if(r??=await this.request("GET",`/v1/machines${t}`),r.unchanged&&n)return n.machines;let o=Array.isArray(r.machines)?r.machines:[];return this.lastMachines=typeof r.version=="string"?{version:r.version,machines:o}:null,o}async runs(){let n=await this.request("GET","/v1/machines/runs");return Array.isArray(n.runs)?n.runs:[]}async stopRun(n){let t=this.machinesUrl?.replace(/\/v1\/machines$/,"");if(!t)throw new xn("This page can't stop runs yet: it hasn't been told where Soba's gateway is.",501);await this.request("POST",`${t}/v1/runs/${encodeURIComponent(n)}/stop`,{})}lookup(n){return this.request("GET",`/v1/device/lookup?code=${encodeURIComponent(n)}`)}approve(n){return this.request("POST","/v1/device/approve",{user_code:n})}claim(n){return this.request("POST","/v1/device/claim",{pairing_nonce:n})}deny(n){return this.request("POST","/v1/device/deny",{user_code:n})}plans(){return this.request("GET","/v1/plans")}selectPlan(n){return this.request("POST","/v1/plans/select",{plan:n})}checkoutPlan(n,t){return this.request("POST","/v1/plans/checkout",{plan:n,...t?.successUrl?{success_url:t.successUrl}:{},...t?.cancelUrl?{cancel_url:t.cancelUrl}:{}})}leavePlan(){return this.request("DELETE","/v1/plans/select")}hosted(){return this.request("GET","/v1/hosted")}startHosted(){return this.request("POST","/v1/hosted/start")}disconnectHosted(n){return this.request("DELETE",n?`/v1/hosted?provider=${encodeURIComponent(n)}`:"/v1/hosted")}approveRuntime(n,t){return this.request("POST","/v1/runtimes/approve",{machine_id:n,runtime_id:t})}preferRuntime(n,t){return this.request("POST","/v1/runtimes/prefer",{machine_id:n,runtime_id:t})}async request(n,t,r){let o=await this.doFetch(/^https?:\/\//.test(t)?t:`${this.baseUrl}${t}`,{method:n,headers:{authorization:`Bearer ${this.session}`,...r?{"content-type":"application/json"}:{}},...r?{body:JSON.stringify(r)}:{}}),a={};try{a=await o.json()}catch{}if(!o.ok){let s=typeof a.error=="string"?a.error:`Request failed (${o.status})`;throw new xn(s,o.status)}return a}};function Un(e){let n=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!n?.[1])return"#ffffff";let t=n[1].length===3?[...n[1]].map(a=>a+a).join(""):n[1],r=a=>{let s=Number.parseInt(t.slice(a*2,a*2+2),16)/255;return s<=.04045?s/12.92:((s+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(1)+.0722*r(2)>.45?"#101012":"#ffffff"}function Jt(e){let n=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!n?.[1])return null;let t=n[1].length===3?[...n[1]].map(r=>r+r).join(""):n[1];return[0,1,2].map(r=>Number.parseInt(t.slice(r*2,r*2+2),16))}function Nn(e,n,t){let r=Jt(e),o=Jt(n);return!r||!o?e:`#${r.map((s,c)=>Math.round(s+(o[c]-s)*t)).map(s=>s.toString(16).padStart(2,"0")).join("")}`}function cn(e,n){if(!Jt(e))return{};let t=Un(e),r=n?.trim();return{"--sc-ground":e,"--sc-shell":e,"--sc-sheet":Nn(e,t,.07),"--sc-raised":Nn(e,t,.13),"--sc-line":Nn(e,t,.18),"--sc-line-2":Nn(e,t,.28),"--sc-text":t,"--sc-text-2":Nn(t,e,.15),"--sc-muted":Nn(t,e,.38),...r?{"--sc-accent":r,"--sc-accent-fg":Un(r)}:{"--sc-accent":t,"--sc-accent-fg":e}}}function qe(e){return e.authenticated===!0?{tone:"ok",text:"signed in"}:e.authenticated===!1?{tone:"warn",text:e.auth_hint??"signed out on that machine"}:{tone:"unknown",text:"could not tell"}}function Fn(e){let{platform:n,arch:t}=e;if(!n)return null;let r=n==="darwin"||n==="macos",o=r?"Mac":n==="win32"||n==="windows"?"Windows PC":"Linux machine";return r?`${t==="aarch64"||t==="arm64"?"Apple silicon ":""}${o}`:o}function un(e){return e.find(n=>n.state==="offline")??null}function Yt(e){return e.state==="busy"?{tone:"busy",text:`serving ${e.active} of ${e.capacity}`}:e.state==="online"?{tone:"ok",text:"connected"}:{tone:"off",text:"asleep or offline"}}function _(e){let n=e.label?.trim(),t=e.name?.trim();return n&&(!t||n!==t)?n:(t??n??"").replace(/\.(local|lan|home|internal)$/i,"").replace(/[-_]+/g," ").trim()||n||"This machine"}function kt(e,n){let t=o=>o.state==="busy"?0:o.state==="online"?1:2,r=o=>o.last_seen_at?Date.parse(o.last_seen_at):0;return t(e)-t(n)||r(n)-r(e)}function We(e){return[...e].sort(kt)[0]??null}function dn(e){return e?e.state==="busy"?{tone:"busy",word:"Serving"}:e.state==="online"?{tone:"ok",word:"Connected"}:{tone:"off",word:"Asleep"}:{tone:"off",word:"No compute"}}function Mn(e){let n=dn(e);return{label:e?n.word:"Connect compute",ariaLabel:e?`${n.word} on ${_(e)}`:"Connect compute",connected:e!==null,state:n}}function Qn(e){return e.state==="online"||e.state==="busy"}function Vn(e){if(!e)return"never seen";let n=Date.parse(e);if(Number.isNaN(n))return"never seen";let t=Date.now()-n,r=6e4;return t<2*r?"just now":t<60*r?`${Math.floor(t/r)} min ago`:t<24*60*r?`${Math.floor(t/(60*r))} hr ago`:`${Math.floor(t/(24*60*r))} days ago`}function jt(e){return e.runtimes.filter(n=>n.id!=="shell")}function Ne(e){return e.runtimes.filter(n=>n.id!=="shell"&&!n.quarantined&&!n.absent)}function He(e){let n=s=>s?e.runtimes.find(c=>c.id===s)??null:null;if(e.requested_runtime)return{by:"app",runtimeId:e.requested_runtime,runtime:n(e.requested_runtime)};let t=Ne(e),r=t.find(s=>s.id===e.preferred_runtime);if(r)return{by:"you",runtimeId:r.id,runtime:r};let o=s=>s.id==="claude-code"?0:s.id==="codex"?1:2,a=[...t].sort((s,c)=>o(s)-o(c))[0]??null;return{by:"default",runtimeId:a?.id??null,runtime:a}}var zt="soba";function Jn(){return`${zt}://show`}function Yn(e,n,t){let r=`${zt}://connect?url=${encodeURIComponent(e)}`;return n&&(r+=`&nonce=${encodeURIComponent(n)}`),t&&(r+=`&want=${encodeURIComponent(t)}`),r}function jn(){let e=globalThis.crypto;if(!e?.getRandomValues)return null;let n=e.getRandomValues(new Uint8Array(32)),t="";for(let r of n)t+=String.fromCharCode(r);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var As=1600;function qt(e={}){return Xt(e)}async function Zt(e,n={}){if(typeof window>"u"||typeof document>"u")return"unknown";let t=Xt(n);try{window.location.href=Yn(e,n.nonce,n.want)}catch{return"absent"}return t}async function zn(e={}){if(typeof window>"u"||typeof document>"u")return"unknown";let n=Xt(e);try{window.location.href=Jn()}catch{return"absent"}return n}async function Xt(e){if(typeof window>"u"||typeof document>"u")return"unknown";let n=e.graceMs??As,t=document.visibilityState==="visible"&&document.hasFocus(),r=!1,o=()=>{r=!0},a=()=>{document.visibilityState==="hidden"&&(r=!0)};return window.addEventListener("blur",o),window.addEventListener("pagehide",o),document.addEventListener("visibilitychange",a),await new Promise(s=>setTimeout(s,n)),window.removeEventListener("blur",o),window.removeEventListener("pagehide",o),document.removeEventListener("visibilitychange",a),t?r?"opened":"absent":"unknown"}var co={"claude-code":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAARGVYSWZNTQAqA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bz9uMXV0/FBGGZ/BaqmGMFGWMFNw7QyOZML4XaHNc3OnIDZkE7cOUzf5QfCGN8C6GkgqwSeXP8HIxHP4MmOI/a321n07gV9IjNBy7QnyZrED37ivv4/PQyO8w10e8KcphEWKSNuIPY8QfKrR4Ye+yCnB3kPeGZiJkLwBzq+EZK2GxGe7nRW12PSGeADM/EmtjG4qej4OQ90YuRN/rYcWzMU8ZPuWbyCHPgbYT3vQ4Pp0/OM7QYx6VGXgMbdGN/AVNIT3cAadkl50K7+QtmgFGBskwuuGBL+EfnaxNQFH3ihDqM12j6lTyyVn4H4E6hAx4NkYwy1G0DlAmsUN8ESX6/+H/GpiUBv4FSyLhydRRp0cAAAAASUVORK5CYII="};import{useEffect as uo,useRef as bs}from"react";import{Fragment as Cs,jsx as Oe,jsxs as Kt}from"react/jsx-runtime";function qn({anchor:e,label:n,options:t,current:r,onClose:o,onPick:a}){let s=bs(null);return uo(()=>{let i=s.current,l=e.current;if(!i||!l)return;try{typeof i.showPopover=="function"&&i.showPopover()}catch{}let u=l.getBoundingClientRect();u.width>i.offsetWidth&&(i.style.width=`${Math.round(u.width)}px`);let m=i.offsetWidth,b=i.offsetHeight,g=u.width>248?u.left:u.right-m,h=Math.max(8,Math.min(g,window.innerWidth-m-8)),y=u.bottom+6,N=y+b>window.innerHeight-8&&u.top-6-b>8?u.top-6-b:y;i.style.left=`${Math.round(h)}px`,i.style.top=`${Math.round(N)}px`,i.querySelector('[aria-checked="true"]')?.focus()},[e]),uo(()=>{let i=l=>{let u=l.target;!u||s.current?.contains(u)||e.current?.contains(u)||o()};return document.addEventListener("pointerdown",i,!0),()=>document.removeEventListener("pointerdown",i,!0)},[e,o]),Oe("div",{ref:s,role:"menu","aria-label":n,className:"sc-menu",popover:"manual",onKeyDown:i=>{let l=[...s.current?.querySelectorAll("[role=menuitemradio]")??[]],u=l.indexOf(document.activeElement);if(i.key==="Escape")i.stopPropagation(),i.nativeEvent.stopImmediatePropagation(),o(),e.current?.focus();else if(i.key==="ArrowDown"||i.key==="ArrowUp"){i.preventDefault();let m=i.key==="ArrowDown"?1:-1;l[(u+m+l.length)%l.length]?.focus()}else i.key==="Tab"&&o()},children:t.map(i=>Oe(ys,{option:i,checked:r===i.id,onClose:o,onPick:a},i.id??""))})}function ys({option:e,checked:n,onClose:t,onPick:r}){return Kt(Cs,{children:[e.heading?Oe("div",{className:"sc-menu-head",role:"presentation",children:e.heading}):e.rule?Oe("div",{className:"sc-menu-sep"}):null,Kt("button",{type:"button",role:"menuitemradio","aria-checked":n,className:"sc-menu-item",onClick:()=>n?t():r(e.id),children:[e.glyph,Kt("span",{className:"sc-menu-text",children:[Oe("span",{className:"sc-menu-label",children:e.label}),e.note&&Oe("span",{className:"sc-menu-note",children:e.note})]}),n&&Oe(ws,{})]})]})}function ws(){return Oe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-menu-check",children:Oe("path",{d:"M5 12.5l4.5 4.5L19 7.5",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Sn({open:e}){return Oe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e?"sc-chev sc-chev-open":"sc-chev",children:Oe("path",{d:"M9 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{useRef as ks,useState as Ns}from"react";var vs={haiku:"Haiku",sonnet:"Sonnet",opus:"Opus",fable:"Fable"};function pn(e){return vs[e]??e}function Zn(e){let n=[...e].sort(kt),t=We([...e]),r=t?He(t):null,a=[{id:"auto",kind:"auto",label:"Automatic",model:"auto",...r?.runtime?{note:r.runtime.default_model?`Uses ${pn(r.runtime.default_model)}`:`Uses ${r.runtime.display_name}`}:{}}];n.some(u=>Ne(u).some(m=>vt(m.id)))&&a.push({id:"small",kind:"size",label:"Fast",note:"quick and cheap",model:"small"},{id:"large",kind:"size",label:"Best",note:"the most capable",model:"large"});let c=new Map;for(let u of n)for(let m of Ne(u))for(let b of m.models){if(!b)continue;let g=`${m.id}/${b}`,h=c.get(g);if(h){h.machines.add(_(u));continue}c.set(g,{option:{id:g,kind:"named",label:pn(b),model:b,runtime:m.id,runtimeName:m.display_name,costClass:m.cost_class},machines:new Set([_(u)])})}let i=new Set;for(let{machines:u}of c.values())for(let m of u)i.add(m);let l=i.size>1;for(let{option:u,machines:m}of c.values()){let b=l&&m.size===1?[...m][0]:void 0;a.push(b?{...u,machine:b}:u)}return a}function Xn(e){let n=[],t=[];for(let r of e){if(r.kind!=="named"){n.push(r);continue}let o=r.runtimeName??r.runtime??"",a=t.find(s=>s.heading===o);a?a.options.push(r):t.push({heading:o,options:[r]})}return n.length?[{heading:null,options:n},...t]:t}function _t(e,n){let t=e.find(o=>o.kind==="auto")??{id:"auto",kind:"auto",label:"Automatic",model:"auto"};if(!n||n==="auto")return{selected:t,unavailable:null};let r=e.find(o=>o.id===n);return r?{selected:r,unavailable:null}:{selected:t,unavailable:n}}function $t(e){return e.runtime?{model:e.model,runtime:e.runtime}:{model:e.model}}function mn(e){return e.length>1}import{jsx as Nt,jsxs as po}from"react/jsx-runtime";function Kn({options:e,selected:n,onPick:t,caption:r,disabled:o,className:a}){let[s,c]=Ns(!1),i=ks(null);if(!mn(e))return null;let l=a?`sc-mp ${a}`:"sc-mp";return po("span",{className:l,children:[r&&Nt("span",{className:"sc-mp-cap",children:r}),po("button",{ref:i,type:"button",className:"sc-mp-btn","aria-haspopup":"menu","aria-expanded":s,"aria-label":`Model: ${n.label}. Change`,disabled:o,onClick:()=>c(u=>!u),children:[Nt("span",{className:"sc-mp-label",children:n.label}),Nt(Sn,{open:!0})]}),s&&Nt(qn,{anchor:i,label:"Which model answers",options:xs(e),current:n.id,onClose:()=>c(!1),onPick:u=>{c(!1),u&&t(u)}})]})}function xs(e){let n=[];for(let t of Xn(e))t.options.forEach((r,o)=>{let a=Ms(r);n.push({id:r.id,label:r.label,...a?{note:a}:{},...t.heading&&o===0?{heading:t.heading}:{},...!t.heading&&r.kind==="size"&&o===1?{rule:!0}:{}})});return n}function Ms(e){return e.kind!=="named"?e.note:e.machine?`on ${e.machine}`:void 0}import{jsx as xe,jsxs as Ps}from"react/jsx-runtime";function q({className:e}){return Ps("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:[xe("path",{d:"M18.125 7.039A8.6 8.6 0 1 0 18.125 16.961A6 6 0 0 1 18.125 7.039Z",fill:"currentColor"}),xe("path",{d:"M19.925 7.039A8.6 8.6 0 0 1 19.925 16.961A6 6 0 0 0 19.925 7.039Z",fill:"currentColor"})]})}function mo({className:e}){return xe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:xe("path",{fill:"currentColor",d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function hn({className:e}){return xe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:xe("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})})}function xt({className:e}){return xe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:xe("path",{d:"M4 5h16v11H4zM9 20h6M12 16v4",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ss({className:e}){return xe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:xe("path",{d:"M5 7l5 5-5 5M12 18h7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function er({className:e}){return xe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e,children:xe("path",{d:"M5 6h14v10H5zM2.5 19.5h19",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Ze={claude:mo,chatgpt:hn,local:xt},ho={shell:Ss};function go(e,n){return n<2*6e4?e:n<10*6e4?Math.max(e,6e4):n<30*6e4?Math.max(e,3*6e4):Math.max(e,10*6e4)}var Rs=3e3,Es=2*6e4,Mt=Date.now(),St=new Set,fo=!1;function Is(){if(fo||typeof window>"u")return;fo=!0;let e=()=>{let t=Mt;if(Mt=Date.now(),Mt-t>Es)for(let r of St)r()};for(let t of["pointerdown","keydown","wheel","touchstart"])window.addEventListener(t,e,{capture:!0,passive:!0});let n=()=>{if(!document.hidden)for(let t of St)t()};window.addEventListener("focus",n),document.addEventListener("visibilitychange",n)}function Me(e,n,t={}){Is();let r,o=t.immediate===!1?Date.now():0,a=!1,s=!1,c=()=>{s||(r=setTimeout(i,t.idle===!1?n:go(n,Date.now()-Mt)))},i=async()=>{if(clearTimeout(r),!(s||a)){if(typeof document>"u"||!document.hidden){a=!0,o=Date.now();try{await e()}catch{}finally{a=!1}}c()}},l=()=>{Date.now()-o>Math.min(n,Rs)&&i()};return St.add(l),t.immediate===!1?c():i(),()=>{s=!0,clearTimeout(r),St.delete(l)}}var Ae=[{id:"claude",costClass:"user-subscription",short:"Claude Code",label:"Continue with Claude",title:"The Claude plan you already pay for",cost:"Nothing beyond the plan",prerequisite:"Claude Code installed and signed in",hint:"Install it from claude.ai/code, then run `claude` once and sign in.",install:"https://claude.com/product/claude-code",expects:["claude-code"]},{id:"chatgpt",costClass:"user-subscription",short:"Codex",label:"Continue with ChatGPT",title:"The ChatGPT plan you already pay for",cost:"Nothing beyond the plan",prerequisite:"Codex installed and signed in",hint:"Install Codex, then run `codex` once and sign in.",install:"https://learn.chatgpt.com/codex/cli",expects:["codex"]},{id:"local",costClass:"user-hardware",short:"Local models",label:"Use a model on this machine",title:"A model on your own machine",cost:"Free. You bought the hardware",prerequisite:"Ollama running, with a model pulled",hint:"Install Ollama, then `ollama pull` a model before pairing.",install:"https://ollama.com",expects:["ollama","openai-api"]}],Ao=["claude","chatgpt"];function nr(){return Ae.filter(e=>Ao.includes(e.id))}function tr(e){return Ae.filter(n=>n.costClass===e)}function rr(e){return Ae.find(n=>n.expects.includes(e))??null}import{Fragment as _n,jsx as d,jsxs as C}from"react/jsx-runtime";function fn({machines:e,hosted:n=[],onApproveRuntime:t,onPreferRuntime:r,onDisconnectHosted:o,onPair:a,onWake:s,onOpenApp:c,onRefresh:i,refreshing:l,busy:u,appName:m,model:b,onPickModel:g,error:h,runs:y,loadRuns:N,loading:P,machineMenu:R,machineNote:W,openApp:E=!0,children:I,onStopRun:O}){let k=We(e),U=e.filter(T=>T.id!==k?.id),[pe,ne]=Pt(null),[ae,Z]=Pt("no"),me=y===void 0&&!!N,Ye=me?pe:y??null,$=y!==void 0||!!N;Os(()=>{if(!me||!N)return;let T=!0,le=Me(async()=>{let Re=await N();T&&ne(Re)},3e3);return()=>{T=!1,le()}},[me,N]);let Se=(k?jt(k):[]).filter(T=>T.quarantined&&!T.absent),X=k?He(k).runtime:null,ie=X?.cost_class==="user-hardware"?X:null,z=ie?Xs(ie.default_model):null,Pe=!!k&&!Qn(k),he=(()=>{if(!k||Pe||!X||qe(X).tone!=="warn")return null;let le=_(k);return{title:`${X.display_name} is signed out`,detail:`Sign in on ${le} so Soba can start runs.`}})(),fe=!k||!Pe?null:k.pairing_lost?{title:"Not connected to Soba",detail:`Connect ${_(k)} to start receiving runs from your apps.`}:{title:"Soba is asleep",detail:"It is not taking new runs. Wake it to start receiving runs from your apps again."},V={label:ae==="going"?"Opening Soba\u2026":"Open Soba",onPress:()=>{c?.(),Z("going"),zn().then(T=>Z(T==="absent"?"absent":"no"))},spin:ae==="going"},J=k?Pe&&s?{label:"Wake Soba",onPress:s}:V:a?{label:"Connect to Soba",onPress:a}:null,te=k&&Pe&&s?V:null;return!k&&n.length===0&&!a?d("p",{className:"sc-note",children:"Nothing connected yet."}):C("div",{className:"sc-tray",children:[k&&C(De,{title:"This machine",action:(i||E||R)&&C("span",{className:"sc-cap-acts",children:[i&&d("button",{type:"button",className:"sc-disc",onClick:i,disabled:l,"aria-label":"Refresh",title:"Refresh",children:d(ea,{spinning:!!l})}),E&&d(Vs,{}),R]}),children:[d(Ts,{machine:k}),W]}),k&&d(De,{title:"Runs on",children:X?d(zs,{machine:k,appName:m,busy:u,...b?{model:b}:{},...g?{onPickModel:g}:{},...r?{onPick:T=>r(k.id,T)}:{}}):C("div",{className:"sc-blank",children:[d("span",{className:"sc-blank-mark","aria-hidden":"true",children:d(Ws,{})}),C("span",{className:"sc-blank-say",children:[d("span",{className:"sc-blank-title",children:P?"Looking\u2026":"No agent on this machine"}),d("span",{className:"sc-blank-body",children:P?"Reading what it can run.":"Install Claude Code, Codex or Ollama there and it will appear here."})]}),!P&&E&&C("a",{className:"sc-blank-act",href:Jn(),children:[d("span",{children:"Add agents"}),d(Co,{})]})]})}),k&&(he||z)&&C(De,{title:"Needs attention",children:[he&&C("div",{className:"sc-alarm",children:[d("span",{className:"sc-alarm-mark","aria-hidden":"true",children:d(yo,{})}),C("span",{className:"sc-alarm-say",children:[d("span",{className:"sc-alarm-title",children:he.title}),d("span",{className:"sc-alarm-body",children:he.detail})]})]}),z&&C("div",{className:"sc-alarm sc-alarm-warn",children:[d("span",{className:"sc-alarm-mark","aria-hidden":"true",children:d(yo,{})}),C("span",{className:"sc-alarm-say",children:[d("span",{className:"sc-alarm-title",children:"A large model on this computer"}),C("span",{className:"sc-alarm-body",children:["Your ",z," model can take all this computer's memory while it answers."]})]})]})]}),k&&fe&&d(De,{title:"Soba",children:C("div",{className:"sc-blank",children:[d("span",{className:"sc-blank-soba","aria-hidden":"true",children:d(q,{className:"sc-blank-soba-mark"})}),C("span",{className:"sc-blank-say",children:[d("span",{className:"sc-blank-title",children:fe.title}),d("span",{className:"sc-blank-body",children:fe.detail})]})]})}),k&&$&&!Pe&&d(Gs,{machine:k,runs:Ye,...O?{onStop:O}:{}}),k&&d(_n,{children:Se.length>0&&d(De,{title:"New on this machine",children:Se.map(T=>d(Ys,{runtime:T,...t?{onApprove:()=>t(k.id,T.id)}:{}},T.id))})}),n.length>0&&d(De,{title:n.length>1?"Connected plans":"Connected plan",children:n.map(T=>d(_s,{credential:T,appName:m,busy:u,...o?{onDisconnect:()=>o(T.provider)}:{}},T.provider))}),U.length>0&&d(De,{title:"Your other machines",children:U.map(T=>d(Js,{machine:T},T.id))}),!k&&a&&d(De,{title:"Your machines",children:C("button",{type:"button",className:"sc-pair",onClick:a,children:[d("span",{className:"sc-otile","aria-hidden":"true",children:d($s,{})}),d("span",{className:"sc-oname",children:"Connect a machine"})]})}),(J||te)&&C("div",{className:"sc-acts",children:[J&&C("button",{type:"button",className:"sc-act-go",onClick:J.onPress,disabled:u||J.spin,"data-spin":J.spin?"true":void 0,children:[J.spin&&d(wo,{}),J.label]}),te&&C("button",{type:"button",className:"sc-act-quiet",onClick:te.onPress,disabled:u||te.spin,"data-spin":te.spin?"true":void 0,children:[te.spin&&d(wo,{}),te.label]}),ae==="absent"&&C("p",{className:"sc-act-miss",children:["Nothing opened here. ",k?_(k):"That machine"," may be a different computer, or the Soba app is not installed on this one."]})]}),I,h&&d("p",{className:"sc-error sc-tray-error",children:h})]})}function De({title:e,action:n,children:t}){return C("section",{className:"sc-group",children:[C("div",{className:"sc-group-cap",children:[d("p",{className:"sc-group-title",children:e}),n]}),d("div",{className:"sc-group-card",children:t})]})}function Ts({machine:e,onToggle:n,open:t}){let r=Qn(e),o=[r?null:e.pairing_lost?"Not connected to Soba":"Soba is asleep",r?Fn(e):null,e.always_on?"always on":null].filter(Boolean),a=r&&e.capacity>0?e.active>0?`${e.active} of ${e.capacity} running`:null:Vn(e.last_seen_at),s=C(_n,{children:[C("span",{className:"sc-mtile","aria-hidden":"true",children:[d(vo,{}),d("span",{className:`sc-mbadge sc-mbadge-${r?dn(e).tone:e.pairing_lost?"off":"away"}`})]}),C("span",{className:"sc-mid",children:[d("span",{className:"sc-mname",children:_(e)}),C("span",{className:"sc-mmeta",children:[d("span",{className:"sc-mmeta-is",children:o.map((c,i)=>C("span",{children:[i>0&&d("span",{className:"sc-mmeta-sep",children:"\xB7"}),c]},c))}),a&&d("span",{className:"sc-mmeta-now",children:a})]})]})]});return!n||!r?d("div",{className:"sc-mrow",children:s}):C("button",{type:"button",className:"sc-mrow sc-mrow-btn",onClick:n,"aria-expanded":!!t,title:t?"Hide what it is running":"See what it is running",children:[s,d(Sn,{open:!!t})]})}function Bs(e,n){return e.filter(t=>t.machine_id===n.id||t.machine_id===null)}function Gs({machine:e,runs:n,onStop:t}){let r=n?Bs(n,e):[],[o,a]=Pt(new Set),s=async i=>{a(l=>new Set(l).add(i));try{await t?.(i)}catch{a(l=>{let u=new Set(l);return u.delete(i),u})}},c=()=>{for(let i of r)s(i.id)};return d(De,{title:"Active runs",...t&&r.length>1?{action:d("button",{type:"button",className:"sc-cap-link",onClick:c,children:"Stop all"})}:{},children:n===null?d("p",{className:"sc-row-note",children:"Looking\u2026"}):r.length===0?C("p",{className:"sc-nilrow",children:[d("span",{className:"sc-nilrow-mark","aria-hidden":"true",children:d(Hs,{})}),"Nothing running"]}):r.map(i=>d(Ds,{run:i,stopping:o.has(i.id),...t?{onStop:()=>void s(i.id)}:{}},i.id))})}function Ws(){return C("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-blank-glyph",children:[d("rect",{x:"3",y:"4.5",width:"18",height:"15",rx:"2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8"}),d("path",{d:"M7.5 10l2.5 2.2-2.5 2.2M12.5 14.6h4",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Hs(){return C("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-blank-glyph",children:[d("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.8"}),d("path",{d:"M9 12.5l2.2 2.2L15.5 9.8",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ds({run:e,stopping:n,onStop:t}){return C("div",{className:"sc-rrow",children:[d("span",{className:n?"sc-rdot":"sc-rdot sc-rdot-live","aria-hidden":"true"}),C("span",{className:"sc-mid",children:[d("span",{className:"sc-rtitle",children:bo(e)}),d("span",{className:"sc-rstep",children:n?"Stopping\u2026":`${Fs(e)} \xB7 ${Qs(e.started_at)}`})]}),t&&d("button",{type:"button",className:"sc-rstop",onClick:t,disabled:n,"aria-label":`Stop ${bo(e)}`,children:d("span",{className:"sc-rstop-ring",children:d(na,{})})})]})}function Us(e){let n=rr(e);return(n?Ze[n.id]:null)??ho[e]??null}function bo(e){if(e.label)return e.label;if(e.task){let n=e.task.replace(/[_-]+/g," ").trim();return n.charAt(0).toUpperCase()+n.slice(1)}return"A run"}function Fs(e){if(e.status==="queued")return"Waiting for a free slot";if(e.step)return e.step;switch(e.phase?.kind){case"thinking":return"Thinking";case"writing":return"Writing";case"tool":return e.phase.tool?`Using ${e.phase.tool}`:"Using a tool";case"approval":return e.phase.tool?`Waiting for you to allow ${e.phase.tool}`:"Waiting for your approval";default:return e.first_output_at?"Working":"Starting"}}function Qs(e){let n=Math.max(0,Math.round((Date.now()-new Date(e).getTime())/1e3));if(n<60)return`${n}s`;let t=Math.floor(n/60);return t<60?`${t}m ${String(n%60).padStart(2,"0")}s`:`${Math.floor(t/60)}h ${String(t%60).padStart(2,"0")}m`}function Vs(){return d("a",{className:"sc-disc sc-open-app",href:Jn(),"aria-label":"Open Soba App",title:"Open Soba App",children:d(Co,{})})}function Co(){return d("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-dglyph",children:d("path",{d:"M14 4h6v6M20 4l-8.5 8.5M18 14.5V19a1 1 0 01-1 1H5a1 1 0 01-1-1V7a1 1 0 011-1h4.5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Js({machine:e}){let n=dn(e);return C("div",{className:"sc-orow",children:[d("span",{className:"sc-otile","aria-hidden":"true",children:d(vo,{})}),d("span",{className:"sc-oname",children:_(e)}),d("span",{className:"sc-oword",children:n.word}),d("span",{className:`sc-dot sc-dot-${n.tone}`,"aria-hidden":"true"})]})}function Ys({runtime:e,onApprove:n}){return C("div",{className:"sc-mrow",children:[d("span",{className:"sc-mtile sc-atile","aria-hidden":"true",children:d(Rt,{id:e.id,name:e.display_name})}),C("span",{className:"sc-mid",children:[d("span",{className:"sc-mname",children:e.display_name}),d("span",{className:"sc-mmeta",children:e.version??"waiting to be let in"})]}),n?d("button",{type:"button",className:"sc-row-act",onClick:n,children:"Let it serve"}):d("span",{className:"sc-averdict sc-tone-warn",children:"not serving yet"})]})}function js({id:e,name:n}){return d("span",{className:"sc-runtime-tile","aria-hidden":"true",children:d(Rt,{id:e,...n?{name:n}:{}})})}function Rt({id:e,name:n}){if(!e)return null;let t=co[e];if(t)return d("img",{src:t,alt:"",className:"sc-runtime-logo"});let r=Us(e);return r?d(r,{className:"sc-runtime-mark"}):n?d("span",{className:"sc-runtime-letter",children:n.slice(0,1).toUpperCase()}):null}function zs({machine:e,appName:n,busy:t,onPick:r,model:o,onPickModel:a}){let s=He(e),c=Ne(e),[i,l]=Pt(!1),u=Ls(null);if(s.by!=="app"&&c.length===0)return null;let m=E=>E?d(js,{id:E.id,name:E.display_name}):null,b=s.runtime?.display_name??s.runtimeId??"\u2014",g=s.by!=="app"&&!!r&&c.length>=2,h=s.runtime?.id??s.runtimeId,y=!Qn(e),N=s.runtime&&qe(s.runtime).tone==="warn"?"Signed out":null,P=o?Zn([e]).filter(E=>E.kind==="named"?E.runtime===h:E.kind==="size"?!!h&&vt(h):!0):[],R=(()=>{if(!o)return;if(o.kind!=="auto")return o;let E=s.runtime?.default_model;if(!E)return o;let I=pn(E);return{...o,label:I.length>16?I:`${o.label} \xB7 ${I}`}})(),W=s.by==="app"?`Set by ${n??"the app"}`:s.runtime?Zs(s.runtime):null;return C(_n,{children:[g?C("button",{ref:u,type:"button",className:y?"sc-runs-agent sc-runs-dim":"sc-runs-agent","aria-haspopup":"menu","aria-expanded":i,"aria-label":`Runs go to ${b}. Change`,disabled:t,onClick:()=>l(E=>!E),children:[d("span",{className:"sc-runs-tile","aria-hidden":"true",children:d(Rt,{id:h??null,name:b})}),C("span",{className:"sc-runs-said-name",children:[d("span",{className:"sc-runs-name",children:b}),N&&d("span",{className:"sc-runs-ill",children:N})]}),d(Sn,{open:!1})]}):C("span",{className:y?"sc-runs-agent sc-runs-fixed sc-runs-dim":"sc-runs-agent sc-runs-fixed",children:[d("span",{className:"sc-runs-tile","aria-hidden":"true",children:d(Rt,{id:h??null,name:b})}),C("span",{className:"sc-runs-said-name",children:[d("span",{className:"sc-runs-name",children:b}),N&&d("span",{className:"sc-runs-ill",children:N})]}),s.by==="app"&&C("span",{className:"sc-runs-told",children:["set by ",n??"the app"]})]}),R&&a&&mn(P)?C(_n,{children:[d("span",{className:"sc-runs-rule","aria-hidden":"true"}),d(Kn,{options:P,selected:R,onPick:a,caption:"Model",className:y?"sc-runs-model sc-runs-dim":"sc-runs-model",...t?{disabled:t}:{}})]}):W&&C(_n,{children:[d("span",{className:"sc-runs-rule","aria-hidden":"true"}),C("span",{className:"sc-runs-said",children:[d("span",{className:"sc-runs-key",children:"Model"}),d("span",{className:"sc-runs-val",children:W})]})]}),i&&r&&d(qs,{anchor:u,machine:e,tile:m,onClose:()=>l(!1),onPick:E=>{l(!1),r(E)}})]})}function qs({anchor:e,machine:n,tile:t,onClose:r,onPick:o}){let a=He(n),s=He({...n,preferred_runtime:null}).runtime,c=a.by==="you"?a.runtimeId:null,i=[{id:null,label:"Automatic",...s?{note:`Uses ${s.display_name}`}:{},glyph:t(s)},...Ne(n).map((l,u)=>{let m=Ks(l);return{id:l.id,label:l.display_name,glyph:t(l),...m?{note:m}:{},...u===0?{rule:!0}:{}}})];return d(qn,{anchor:e,label:"Which agent runs go to",options:i,current:c,onClose:r,onPick:o})}function Zs(e){let n=qe(e);return n.tone==="warn"?n.text:e.default_model?pn(e.default_model):e.version??void 0}function Xs(e){if(!e)return null;let n=/(\d+(?:\.\d+)?)\s*b\b/i.exec(e),t=n?.[1]?Number(n[1]):Number.NaN;return!Number.isFinite(t)||t<20?null:`${n?.[1]}B`}function Ks(e){let n=qe(e);return n.tone==="warn"?n.text:e.default_model?pn(e.default_model):e.cost_class==="user-hardware"?"In this machine's memory":n.tone!=="ok"?n.text:e.version??void 0}function _s({credential:e,appName:n,busy:t,onDisconnect:r}){return C("div",{className:"sc-hrow",children:[C("div",{className:"sc-orow",children:[d("span",{className:"sc-otile","aria-hidden":"true",children:d(hn,{className:"sc-omark"})}),C("span",{className:"sc-mid",children:[d("span",{className:"sc-oname",children:e.provider==="openai-chatgpt"?"ChatGPT plan":e.provider}),d("span",{className:"sc-mmeta",children:e.account_label??"signed in"})]}),r&&d("button",{type:"button",className:"sc-row-act",onClick:r,disabled:t,children:"Disconnect"})]}),r&&C("p",{className:"sc-row-note",children:[n??"This app"," stops using it. To withdraw the grant entirely, remove it in your OpenAI settings."]})]})}function vo(){return C("svg",{viewBox:"0 0 32 24","aria-hidden":"true",focusable:"false",className:"sc-mglyph",children:[d("rect",{x:"4",y:"1.5",width:"24",height:"15",rx:"2.5",fill:"var(--sc-sheet, #ffffff)",stroke:"currentColor",strokeWidth:"2"}),d("rect",{x:"1",y:"19.5",width:"30",height:"2.5",rx:"1.25",fill:"currentColor"})]})}function $s(){return d("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-oglyph",children:d("path",{d:"M12 5v14M5 12h14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}function yo(){return C("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:"sc-hglyph",children:[d("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"2"}),d("path",{d:"M12 7.5v5.5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),d("circle",{cx:"12",cy:"16.5",r:"1.15",fill:"currentColor"})]})}function wo(){return C("svg",{className:"sc-act-glyph sc-spin",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:[d("circle",{cx:"8",cy:"8",r:"6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),d("path",{d:"M8 1.8a6.2 6.2 0 0 1 6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function ea({spinning:e}){return d("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:e?"sc-dglyph sc-spin":"sc-dglyph",children:d("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function na(){return d("svg",{className:"sc-dglyph",viewBox:"0 0 14 14","aria-hidden":"true",children:d("rect",{x:"2",y:"2",width:"10",height:"10",rx:"2",fill:"currentColor"})})}import{jsx as ta}from"react/jsx-runtime";function $n({machines:e,onApproveRuntime:n,model:t,onPickModel:r}){return ta(fn,{machines:e,...n?{onApproveRuntime:n}:{},...t?{model:t}:{},...r?{onPickModel:r}:{}})}var or={ready:{arc:!0},serving:{arc:!0,slot:"stream"},paused:{arc:!1,slot:"zzz"},thinking:{arc:!1,slot:"dots"},connecting:{arc:!1,slot:"orbit"},attention:{arc:!1,slot:"bang"},gone:{arc:!1,slot:"cross"},snap:{arc:!1,slot:"snap"},listening:{arc:!1,slot:"bars"},permission:{arc:!1,slot:"ring"},ai:{arc:!1,slot:"sparks"}};var sr="105 162 420 420",ar="M407.1 308.9 A158 158 0 1 0 407.1 491.1 A116 116 0 0 1 407.1 308.9 Z",gn="M448.5 320 A110 110 0 0 1 448.5 480";import{Fragment as nt,jsx as S,jsxs as Xe}from"react/jsx-runtime";function ir({kind:e,size:n=44,className:t}){let r=or[e];return Xe("svg",{className:`bx${t?` ${t}`:""}`,"data-expression":e,viewBox:sr,overflow:"visible",width:n,height:n,"aria-hidden":"true",children:[S("path",{d:ar,fill:"currentColor"}),S("path",{className:"bx-arc",d:gn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"}),r.slot==="stream"&&S(ra,{}),r.slot==="zzz"&&S(oa,{}),r.slot==="dots"&&S(sa,{}),r.slot==="bang"&&S(aa,{}),r.slot==="orbit"&&S(ia,{}),r.slot==="cross"&&S(la,{}),r.slot==="snap"&&S(ca,{}),r.slot==="bars"&&S(ua,{}),r.slot==="ring"&&S(da,{}),r.slot==="sparks"&&S(pa,{})]})}function ra(){return S("path",{className:"bx-st",d:"M475.3 290.3 A150 150 0 0 1 475.3 509.7",fill:"none",stroke:"currentColor",strokeWidth:"15",strokeLinecap:"round",strokeDasharray:"0.1 31"})}function oa(){return Xe(nt,{children:[S("g",{className:"bx-z1",children:S("path",{d:"M444 372 H496 L444 436 H496",fill:"none",stroke:"currentColor",strokeWidth:"20",strokeLinecap:"round",strokeLinejoin:"round"})}),S("g",{className:"bx-z2",children:S("path",{d:"M492 300 H522 L492 338 H522",fill:"none",stroke:"currentColor",strokeWidth:"15",strokeLinecap:"round",strokeLinejoin:"round"})})]})}function sa(){return Xe(nt,{children:[S("circle",{className:"bx-th",cx:"463.1",cy:"336.9",r:"21",fill:"currentColor"}),S("circle",{className:"bx-th bx-th2",cx:"483",cy:"400",r:"21",fill:"currentColor"}),S("circle",{className:"bx-th bx-th3",cx:"463.1",cy:"463.1",r:"21",fill:"currentColor"})]})}function aa(){return Xe("g",{className:"bx-at",children:[S("line",{x1:"490",y1:"312",x2:"490",y2:"414",stroke:"currentColor",strokeWidth:"46",strokeLinecap:"round"}),S("circle",{cx:"490",cy:"484",r:"28",fill:"currentColor"})]})}function ia(){return Xe("g",{className:"bx-ob",children:[S("path",{d:gn,fill:"none",stroke:"var(--tile-bg, transparent)",strokeWidth:41,strokeLinecap:"round"}),S("path",{d:gn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"})]})}function la(){return Xe(nt,{children:[S("path",{className:"bx-xa",d:gn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"}),S("g",{className:"bx-xx",children:S("path",{d:"M442 364 L514 436 M514 364 L442 436",fill:"none",stroke:"currentColor",strokeWidth:"24",strokeLinecap:"round"})})]})}function ca(){return S("path",{className:"bx-snap",d:gn,fill:"none",stroke:"currentColor",strokeWidth:17,strokeLinecap:"round"})}function ua(){return Xe("g",{stroke:"currentColor",strokeWidth:"17",strokeLinecap:"round",children:[S("line",{className:"bx-vb",x1:"452",y1:"370",x2:"452",y2:"430"}),S("line",{className:"bx-vb bx-vb2",x1:"482",y1:"330",x2:"482",y2:"470"}),S("line",{className:"bx-vb bx-vb3",x1:"512",y1:"355",x2:"512",y2:"445"})]})}function da(){return S(nt,{children:[[450,366],[474,376],[484,400],[474,424],[450,434],[426,424],[416,400],[426,376]].map(([n,t],r)=>S("circle",{className:"bx-w",cx:n,cy:t,r:"11",fill:"currentColor",style:{animationDelay:`${-1.2+r*.15}s`}},r))})}function pa(){return Xe(nt,{children:[S("g",{className:"bx-sp",children:S("path",{d:"M460 300 Q465.4 324.6 490 330 Q465.4 335.4 460 360 Q454.6 335.4 430 330 Q454.6 324.6 460 300 Z",fill:"currentColor"})}),S("g",{className:"bx-sp bx-sp2",children:S("path",{d:"M486 356 Q493.92 392.08 530 400 Q493.92 407.92 486 444 Q478.08 407.92 442 400 Q478.08 392.08 486 356 Z",fill:"currentColor"})}),S("g",{className:"bx-sp bx-sp3",children:S("path",{d:"M460 440 Q465.4 464.6 490 470 Q465.4 475.4 460 500 Q454.6 475.4 430 470 Q454.6 464.6 460 440 Z",fill:"currentColor"})})]})}import{useCallback as de,useEffect as be,useId as ga,useMemo as Ke,useRef as Pn,useState as j}from"react";var tt=[{slug:"mac-arm",label:"macOS, Apple silicon"},{slug:"mac-intel",label:"macOS, Intel"},{slug:"windows",label:"Windows"},{slug:"linux",label:"Linux"}];function rt(e){if(!e)return"";try{return new URL(e).origin}catch{return""}}var No="soba.connect.choice",ma=180*24*60*60*1e3;function lr(e){let n=2166136261;for(let t=0;t<e.length;t++)n^=e.charCodeAt(t),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function cr(e,n){return e?n?`${No}.${e}.${lr(n)}`:`${No}.${e}`:null}function ur(e){if(!e||typeof localStorage>"u")return null;try{let n=localStorage.getItem(e);if(!n)return null;let t=JSON.parse(n);if(Date.now()-Date.parse(t.at)>ma)return null;let r=Ae.find(o=>o.id===t.choice);return r?r.id:null}catch{return null}}function dr(e,n){if(!(!e||typeof localStorage>"u"))try{localStorage.setItem(e,JSON.stringify({choice:n,at:new Date().toISOString()}))}catch{}}var xo="soba.connect.model",ha=180*24*60*60*1e3;function pr(e,n){return e?n?`${xo}.${e}.${lr(n)}`:`${xo}.${e}`:null}function Et(e){if(!e||typeof localStorage>"u")return null;try{let n=localStorage.getItem(e);if(!n)return null;let t=JSON.parse(n);if(Date.now()-Date.parse(t.at)>ha)return null;let r=t.choice;return typeof r!="string"||!r||r.length>120?null:/^[\w.:@+-]+(\/[\w.:@+-]+)?$/.test(r)?r:null}catch{return null}}function mr(e,n){if(!(!e||typeof localStorage>"u"))try{localStorage.setItem(e,JSON.stringify({choice:n,at:new Date().toISOString()}))}catch{}}var Mo="soba.connect.dismissed",fa=30*24*60*60*1e3;function hr(e,n){return e?n?`${Mo}.${e}.${lr(n)}`:`${Mo}.${e}`:null}function fr(e){if(!e||typeof localStorage>"u")return!1;try{let n=localStorage.getItem(e);if(!n)return!1;let t=JSON.parse(n);return Date.now()-Date.parse(t.at)<fa}catch{return!1}}function gr(e){if(!(!e||typeof localStorage>"u"))try{localStorage.setItem(e,JSON.stringify({at:new Date().toISOString()}))}catch{}}import{Fragment as Lt,jsx as p,jsxs as M}from"react/jsx-runtime";var Ar=2e3,Aa=1e4,ba=9e4,ya=6e4;function br(e,n,t,r=[],o){return e?"code":n&&(t.length>0||r.length>0)?"manage":o?"launch":"choose"}function wa(e){let n=Math.max(0,Math.round(e/1e3));return`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`}function Cr({client:e,initialCode:n,initialChoice:t,onConnected:r,showStatus:o=!0,initialContext:a=null,initialMachines:s,onClose:c,headingId:i,theme:l,reason:u,active:m=!0}){let b=!!a&&s!==void 0,[g,h]=j(b?br(n,o,s??[],[],t):"loading"),[y,N]=j(a),[P,R]=j(s??[]),[W,E]=j(n??""),[I,O]=j(null),[k,U]=j(null),[pe,ne]=j(!1),[ae,Z]=j(0),[me,Ye]=j(()=>Date.now()),[$,ye]=j(null),[Se,X]=j(!1),[ie,z]=j(!1),[Pe,he]=j("browser"),[fe,nn]=j(null),[V,J]=j([]),[te,T]=j(0),[le,Re]=j(null),ce=Pn(null),[L,B]=j(t??null),[x,tn]=j(null),je=Ke(()=>{let f=y?.accent?.trim(),v=y?.background?.trim();if(!(!f&&!v))return v?{...cn(v,f),background:v,borderRadius:"inherit"}:{"--sc-accent":f,"--sc-accent-fg":Un(f)}},[y?.accent,y?.background]),we=ga(),ue=i??we,ze=Pn(null);be(()=>{if(!e||b)return;let f=!0;return Promise.all([e.context(),e.machines()]).then(([v,F])=>{f&&(N(v),R(F),h(br(n,o,F)))}).catch(v=>{f&&(U(v.message),h("choose"))}),()=>{f=!1}},[e,n,o,b]),be(()=>{g!=="loading"||!b||h(br(n,o,s??[]))},[g,b,n,o,s]),be(()=>{s&&R(s)},[s]),be(()=>{a&&N(a)},[a]);let Cn=Pn(!1),vn=Pn(g);vn.current=g;let rn=Pn(V);rn.current=V;let on=!!y?.hosted_available;be(()=>{!o&&vn.current==="manage"&&h("choose")},[o]),be(()=>{if(!e||!m||g!=="manage")return;let f=!0,v=Me(async()=>{try{let F=await e.machines();if(!f)return;R(F);let Y=!on||Cn.current;F.length===0&&rn.current.length===0&&Y&&vn.current==="manage"&&h("choose")}catch{}},Aa,{immediate:!1});return()=>{f=!1,v()}},[g,e,on,m]);let sn=cr(y?.publishable_key??null);be(()=>{tn(ur(sn))},[sn]),be(()=>{if(!e||!on)return;let f=!0;return e.hosted().then(v=>{f&&(J(v.credentials),!Cn.current&&(Cn.current=!0,v.credentials.length>0&&o&&vn.current==="choose"&&h("manage")))}).catch(()=>{}),()=>{f=!1}},[e,on,o]),be(()=>{if(!e||!m||g!=="hosted")return;let f=!0,v=async()=>{try{let Ge=await e.hosted();if(!f)return!1;if(J(Ge.credentials),Ge.credentials.length>0)return h("hosted_connected"),Re(null),!0}catch{}return!1},F=async()=>{ce.current?.closed&&(ce.current=null,!await v()&&f&&h("choose"))},Y=Me(v,Ar,{immediate:!1}),ln=setInterval(F,400),Ie=Ge=>{let Hn=Ge.data;Hn?.source==="soba"&&Hn.type==="hosted_result"&&v()};return window.addEventListener("message",Ie),()=>{f=!1,Y(),clearInterval(ln),window.removeEventListener("message",Ie),ce.current=null}},[e,g,m]);let Ut=de(()=>{if(!e)return;let f=window.open("","soba-connect-plan","width=520,height=760,noopener=no");ce.current=f,h("hosted"),T(Date.now()),Re(null),U(null),e.startHosted().then(({url:v})=>{if(f&&!f.closed){f.location.href=v;return}Re(v)}).catch(v=>{f?.close(),ce.current=null,U(v.message),h("choose")})},[e]),gt=de(async f=>{if(e){ne(!0);try{await e.disconnectHosted(f),J((await e.hosted()).credentials)}catch(v){U(v.message)}finally{ne(!1)}}},[e]);be(()=>{if(!e||!m||g!=="waiting")return;let f=!0,v=Me(async()=>{try{let F=await e.machines();if(!f)return;R(F);let Y=ze.current;if(!Y)return;let ln=F.filter(Ge=>!Y.has(Ge.id)),Ie=ln.find(Ge=>Ge.state!=="offline")??ln[0];if(Ie){nn(Ie.id),L&&dr(sn,L);let Ge=Ae.find(Vt=>Vt.id===L)?.expects??[],Hn=Ne(Ie).find(Vt=>Ge.includes(Vt.id));Hn&&e.preferRuntime(Ie.id,Hn.id).catch(()=>{}),h("connected"),r?.(F)}}catch{}},Ar,{immediate:!1});return()=>{f=!1,v()}},[g,e,r,L,sn,m]);let At=de(async()=>{if(e){U(null),ne(!0);try{let f=await e.lookup(W);O(f),h("confirm")}catch(f){U(f.message)}finally{ne(!1)}}},[e,W]),kn=de(async()=>{if(e){U(null),ne(!0);try{try{ze.current=new Set((await e.machines()).map(f=>f.id))}catch{ze.current=new Set(P.map(f=>f.id))}await e.approve(W),h("waiting"),Z(Date.now())}catch(f){U(f.message)}finally{ne(!1)}}},[e,W,P]),bt=de(async()=>{if(e){ne(!0);try{await e.deny(W),he("browser"),h("denied")}catch(f){U(f.message)}finally{ne(!1)}}},[e,W]),K=Ke(()=>y?.connect_url??null,[y]),[Be,Ce]=j(()=>jn()),an=Ke(()=>K?Yn(K,Be??void 0,L??void 0):null,[K,Be,L]),yt=Ke(()=>rt(K),[K]),Ft=de(f=>{if(P.length===0)return null;let v=Ae.find(Y=>Y.id===f);if(!v)return null;let F=P.flatMap(Y=>Y.runtimes??[]).filter(Y=>v.expects.includes(Y.id));return F.length===0?{tone:"dim",text:"not installed"}:F.some(Y=>Y.authenticated===!0)?{tone:"ok",text:"ready"}:F.every(Y=>Y.authenticated===!1)?{tone:"warn",text:"needs signing in"}:{tone:"dim",text:"installed"}},[P]),w=de((f=null)=>{B(f),U(null),ye(null),X(!1),z(!1),ee.current=!1,Ce(jn()),h("launch")},[]),ee=Pn(!!t);be(()=>{g!=="launch"||!K||ee.current||(ee.current=!0,X(!0),Zt(K,{...Be?{nonce:Be}:{},...L?{want:L}:{}}).then(ye))},[g,K,Be,L]);let ge=de(()=>{X(!0),qt().then(ye)},[]),wt=de(f=>{if(ie){let v=jn();z(!1),Ce(v),K&&(f.preventDefault(),window.location.href=Yn(K,v??void 0,L??void 0))}ge()},[ie,ge,K,L]),ve=Ke(()=>{let f=y?.runtimes;return f?Ae.filter(v=>f.includes(v.id)):nr()},[y?.runtimes]),Ee=Ke(()=>{let f=Ae.find(v=>v.id===L);return f?{choice:f,Mark:Ze[f.id]??null}:null},[L]),Qe=Ke(()=>P.find(f=>f.id===fe),[P,fe]);be(()=>{let f=Be;if(!e||!m||g!=="launch"||!f)return;let v=!1,F=Date.now()+15e4,Y=()=>{};return Y=Me(async()=>{if(Date.now()>F){Y(),z(!0);return}try{let ln=await e.claim(f);if(v)return;if(ln.declined){Y(),ye(null),he("machine"),h("denied");return}if(!ln.claimed)return;Y();try{ze.current=new Set((await e.machines()).map(Ie=>Ie.id))}catch{ze.current=new Set(P.map(Ie=>Ie.id))}h("waiting"),Z(Date.now())}catch{}},Ar,{immediate:!1,idle:!1}),()=>{v=!0,Y()}},[e,g,P,Be,m]);let ke=Ke(()=>{if(!I)return null;if(I.approved||I.denied)return"answered";let f=I.expires_at?Date.parse(I.expires_at):Number.NaN;return Number.isFinite(f)&&f<=me?"expired":"live"},[I,me]);be(()=>{if(!(g==="confirm"&&ke==="live"||g==="waiting"||g==="hosted"))return;let v=setInterval(()=>Ye(Date.now()),1e3);return()=>clearInterval(v)},[g,ke]);let Ct=de(async(f,v)=>{if(e)try{await e.approveRuntime(f,v),R(await e.machines())}catch(F){U(F.message)}},[e]),Qt=de(async(f,v)=>{if(e)try{await e.preferRuntime(f,v),R(await e.machines())}catch(F){U(F.message)}},[e]);return g==="loading"?p("div",{className:"soba-connect",...l?{"data-theme":l}:{},style:je,children:p("div",{className:"sc-card",children:p("p",{className:"sc-note",children:"Loading\u2026"})})}):M("div",{className:"soba-connect",...l?{"data-theme":l}:{},style:je,children:[c&&p("button",{type:"button",className:"sc-modal-close",onClick:c,"aria-label":"Close",children:"\xD7"}),g==="manage"&&M("div",{className:"sc-card",children:[p("h2",{className:"sc-title",id:ue,children:"Your compute"}),M("p",{className:"sc-sub",children:[p(It,{context:y})," ",P.length>0&&V.length>0?"runs on your connected plan, and on these machines while they are awake.":V.length>0?"runs on the plan you connected. Nothing here is charged to you.":"runs on these machines, while they are awake."]}),p(fn,{machines:P,hosted:V,onApproveRuntime:Ct,onPreferRuntime:(f,v)=>void Qt(f,v),onDisconnectHosted:f=>void gt(f),onPair:()=>h("choose"),busy:pe,...y?.app.name?{appName:y.app.name}:{}}),k&&p("p",{className:"sc-error",children:k})]}),g==="choose"&&M("div",{className:"sc-card",children:[p(va,{context:y}),p("h2",{className:"sc-h",id:ue,children:u==="payment_required"?"Carry on with your own AI":u==="no_compute"?"This run needs a machine":"Connect your AI"}),p("p",{className:"sc-p",children:"Use compute you already have."}),K&&ve.length>0&&M(Lt,{children:[p("div",{className:"sc-opts",children:ve.map(f=>{let v=Ze[f.id];return M("button",{type:"button",className:"sc-opt",onClick:()=>w(f.id),children:[p("span",{className:"sc-opt-tile","aria-hidden":"true",children:v&&p(v,{className:"sc-opt-mark"})}),p("span",{className:"sc-opt-text",children:p("span",{className:"sc-opt-label",children:f.label})}),(()=>{let F=Ft(f.id);return F?p("span",{className:`sc-opt-has sc-opt-has-${F.tone}`,children:F.text}):x===f.id?p("span",{className:"sc-opt-last",children:"last used"}):p(yr,{className:"sc-opt-go"})})()]},f.id)})}),M("p",{className:"sc-opt-note",children:["Your accounts stay there. ",So(y)," never sees them."]})]}),(!K||ve.length===0)&&p("p",{className:"sc-error",style:{marginTop:16},children:"This app has no publishable key yet, so there is nothing to pair against."}),k&&p("p",{className:"sc-error",children:k}),K&&y?.show_code===!0&&p("div",{className:"sc-opt-alt",children:p("button",{type:"button",className:"sc-alt-link",onClick:()=>h("code"),children:"I have a code"})})]}),g==="launch"&&M("div",{className:"sc-card",children:[M("div",{className:"sc-head",children:[p(Rn,{onClick:()=>h("choose")}),p("p",{className:"sc-head-title",children:"Soba App"})]}),p(Ot,{mark:Ee?.Mark??q,still:ie||!Se&&$===null}),p("h2",{className:"sc-h",id:ue,children:ie?"No answer from this machine":$==="absent"?"Nothing opened":$===null?"Opening Soba App\u2026":"Approve it on this machine"}),ie?p("p",{className:"sc-p",children:"The Soba app did not answer. It may not be open, or nobody was there. Try again when you are ready."}):$==="absent"?p("p",{className:"sc-p",children:"Nothing opened on this machine. Open it yourself below, or install it if it is not here yet."}):p("p",{className:"sc-p",children:$===null?"Approve it there and this page does the rest.":"This page finishes on its own."}),Ee&&M("p",{className:"sc-prereq",children:[Ee.Mark&&p(Ee.Mark,{className:"sc-rt-mark"}),"Needs ",Ee.choice.prerequisite]}),M("div",{className:"sc-stack",style:{marginTop:18},children:[p("a",{className:$==="absent"||ie?"sc-btn sc-btn-primary":"sc-btn",href:an??"#",onClick:wt,children:ie?"Try again":$==="absent"?"Open Soba App":"Open it again"}),p("p",{className:"sc-note",children:$===null?"Your browser will ask permission first.":"Your browser asks permission the first time."}),Ee&&$==="absent"&&p("p",{className:"sc-note",children:p(ka,{text:Ee.choice.hint})}),M("div",{className:"sc-foot-strip",children:[p("span",{children:"Not installed on this machine?"}),M("button",{type:"button",className:"sc-foot-go",onClick:()=>h("get"),children:["Get it",p(yr,{})]})]})]})]}),g==="get"&&M("div",{className:"sc-card",children:[M("div",{className:"sc-head",children:[p(Rn,{onClick:()=>h("launch")}),p("p",{className:"sc-head-title",children:"Get Soba App"})]}),p("div",{className:"sc-opts",children:tt.map(f=>M("a",{className:"sc-opt",href:`${yt}/download/${f.slug}`,target:"_blank",rel:"noreferrer noopener",children:[p("span",{className:"sc-opt-tile","aria-hidden":"true",children:p(er,{className:"sc-opt-mark"})}),p("span",{className:"sc-opt-text",children:p("span",{className:"sc-opt-label",children:f.label})}),p(yr,{className:"sc-opt-go"})]},f.slug))}),p("p",{className:"sc-opt-note",children:"Install it, then come back here and press the row you started with."})]}),g==="code"&&M("div",{className:"sc-card",children:[M("div",{className:"sc-head",children:[p(Rn,{onClick:()=>h("choose")}),p("p",{className:"sc-head-title",children:"Soba App"})]}),p("h2",{className:"sc-h",id:ue,children:"Enter the code from that machine"}),p("p",{className:"sc-p",children:"Eight characters, shown by the Soba app once you paste the link."}),M("form",{className:"sc-stack",style:{marginTop:16},onSubmit:f=>{f.preventDefault(),At()},children:[p("input",{className:"sc-input",value:W,onChange:f=>E(f.target.value),placeholder:"ACDE-F234",autoComplete:"off",autoFocus:!0,"aria-label":"Pairing code"}),k&&p("p",{className:"sc-error",children:k}),p("button",{type:"submit",className:"sc-btn sc-btn-primary",disabled:pe||W.length<8,children:pe?"Checking\u2026":"Continue"})]})]}),g==="confirm"&&I&&M("div",{className:"sc-card",children:[M("div",{className:"sc-head",children:[p(Rn,{onClick:()=>h("code")}),p("p",{className:"sc-head-title",children:"Soba App"})]}),p("h2",{className:"sc-title",children:"Attach this machine to your account?"}),M("p",{className:"sc-sub",children:[p(It,{context:y})," may send your runs to it once you approve. It can never see the account or the keys on it."]}),M("ul",{className:"sc-facts",children:[p(ot,{k:"Code",v:I.user_code}),p(ot,{k:"Machine",v:I.hostname??"not stated"}),p(ot,{k:"System",v:[I.platform,I.arch].filter(Boolean).join(" / ")||"not stated"}),p(ot,{k:"Asked by",v:I.client??"not stated"}),I.labels.length>0&&p(ot,{k:"Labels",v:I.labels.join(", ")})]}),p("p",{className:"sc-note",style:{marginTop:12},children:"Every line above is what that machine said about itself. If none of it looks like a computer of yours, say no."}),ke==="expired"&&p("p",{className:"sc-error",children:"That code has expired. Ask the machine for a new one. It prints a fresh code each time it starts."}),ke==="answered"&&p("p",{className:"sc-error",children:"That code has already been answered. If it was not you, deny the next one."}),k&&p("p",{className:"sc-error",children:k}),M("div",{className:"sc-row",style:{marginTop:16},children:[p("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:()=>void kn(),disabled:pe||ke!=="live",children:"Approve"}),p("button",{type:"button",className:"sc-btn",onClick:()=>void bt(),disabled:pe||ke==="answered",children:"No, deny it"})]}),ke==="live"&&I.expires_at&&M("p",{className:"sc-note",style:{marginTop:10},children:["This code expires in ",wa(Date.parse(I.expires_at)-me),"."]})]}),g==="waiting"&&M("div",{className:"sc-card",children:[M("div",{className:"sc-head",children:[p(Rn,{onClick:()=>h("choose")}),p("p",{className:"sc-head-title",children:Ee?.choice.short??"Soba App"})]}),p(Ot,{mark:Ee?.Mark??q}),p("h2",{className:"sc-h",id:ue,children:"Approved. Waiting for it to connect"}),p("p",{className:"sc-p",children:"Nothing more to do here. This page changes when it arrives."}),ae>0&&me-ae>ba&&p("p",{className:"sc-note sc-tone-warn",style:{marginTop:14,textAlign:"center"},children:"Still nothing. Look at the Soba app on that machine: it says what it is doing. This keeps watching either way."})]}),g==="connected"&&M("div",{className:"sc-card",children:[p(wr,{tone:"ok"}),p("h2",{className:"sc-h",id:ue,children:Qe?.label?`${Qe.label} is connected`:"Connected"}),M("p",{className:"sc-p",children:[p(It,{context:y})," will use ",Qe?.label?"it":"this machine"," from now on, while it is awake."]}),o&&M(Lt,{children:[p("div",{style:{marginTop:16},children:p($n,{machines:P,onApproveRuntime:Ct})}),p("button",{type:"button",className:"sc-btn sc-btn-wide",style:{marginTop:14},onClick:()=>h("manage"),children:"Done"})]})]}),g==="hosted"&&M("div",{className:"sc-card",children:[M("div",{className:"sc-head",children:[p(Rn,{onClick:()=>h("choose")}),p("p",{className:"sc-head-title",children:"ChatGPT"})]}),le?p(Ot,{mark:hn,still:!0}):p(Ot,{mark:hn}),p("h2",{className:"sc-h",id:ue,children:le?"Your browser blocked the window":"Finish signing in to ChatGPT"}),p("p",{className:"sc-p",children:le?"Nothing opened. Open the sign-in yourself below. A link you click is allowed where a window we open is not.":"Approve it in the window that opened."}),M("div",{className:"sc-stack",style:{marginTop:18},children:[le&&p("a",{className:"sc-btn sc-btn-primary",href:le,target:"soba-connect-plan",rel:"noreferrer",children:"Open the ChatGPT sign-in"}),k&&p("p",{className:"sc-error",children:k}),te>0&&me-te>ya&&p("p",{className:"sc-note sc-tone-warn",children:"Still nothing. The window may have been closed before it finished, or the sign-in may have been declined. This keeps watching either way."})]})]}),g==="hosted_connected"&&M("div",{className:"sc-card",children:[p(wr,{tone:"ok"}),p("h2",{className:"sc-h",id:ue,children:"ChatGPT is connected"}),M("p",{className:"sc-p",children:[p(It,{context:y})," will run on your ChatGPT plan",V[0]?.account_label?` (${V[0].account_label})`:"",". Nothing more to pay, nothing to install."]}),p("p",{className:"sc-opt-note",style:{textAlign:"center"},children:"It runs on our side, so it has no access to your files or your terminal."}),o&&M(Lt,{children:[p("button",{type:"button",className:"sc-btn sc-btn-wide",style:{marginTop:16},onClick:()=>h("manage"),children:"Done"}),p("div",{className:"sc-opt-alt",children:p("button",{type:"button",className:"sc-alt-link",onClick:()=>h("choose"),children:"Connect a machine too"})})]})]}),g==="denied"&&M("div",{className:"sc-card",children:[p(wr,{tone:"off"}),p("h2",{className:"sc-h",id:ue,children:"Declined"}),p("p",{className:"sc-p",children:Pe==="machine"?"Nothing was connected. You can ask again whenever you like.":"That machine was not attached to your account, and the terminal has been told so."}),p("button",{type:"button",className:"sc-btn sc-btn-wide",style:{marginTop:16},onClick:()=>h("choose"),children:"Back to the start"})]})]})}function So(e){return e?.app.name??"this app"}function Ca(e){let n=e?.app.icon_urls;if(n?.length)return n;let t=e?.app.icon_url;return t?[t]:[]}function Po(e){let n=Ca(e),[t,r]=j([]),o=de(c=>{c&&r(i=>i.includes(c)?i:[...i,c])},[]),a=de(c=>o(c.currentTarget.getAttribute("src")),[o]),s=de(c=>{c?.complete&&c.naturalWidth===0&&o(c.getAttribute("src"))},[o]);return{icon:n.find(c=>!t.includes(c)),onError:a,ref:s}}function va({context:e}){let{icon:n,onError:t,ref:r}=Po(e);return e?.app.mark==="soba"?p(q,{className:"sc-app-mark"}):n?p("img",{className:"sc-app-mark",src:n,alt:"","aria-hidden":"true",ref:r,onError:t}):null}function It({context:e}){let{icon:n,onError:t,ref:r}=Po(e),o=e?.app.mark==="soba";return M("span",{className:"sc-app",children:[o&&p(q,{className:"sc-app-icon"}),!o&&n&&p("img",{className:"sc-app-icon",src:n,alt:"",ref:r,onError:t}),So(e)]})}function Rn({onClick:e}){return p("button",{type:"button",className:"sc-head-back",onClick:e,"aria-label":"Back",children:p("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:p("path",{d:"M15 5 8 12l7 7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}function yr({className:e}){return p("svg",{className:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:p("path",{d:"M9 5l7 7-7 7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ot({mark:e,still:n}){return M("span",{className:"sc-waiting","aria-hidden":"true",children:[!n&&p("svg",{className:"sc-waiting-orbit",viewBox:"0 0 100 100","aria-hidden":"true",focusable:"false",children:p("circle",{className:"sc-waiting-arc",cx:"50",cy:"50",r:"46"})}),p(e,{className:"sc-waiting-mark"})]})}function wr({tone:e}){return p("span",{className:`sc-result sc-result-${e}`,"aria-hidden":"true",children:p(ir,{kind:e==="ok"?"snap":"gone",size:84})})}function ka({text:e}){return p(Lt,{children:e.split("`").map((n,t)=>t%2===1?p("code",{className:"sc-inline-code",children:n},t):n)})}function ot({k:e,v:n}){return M("li",{className:"sc-fact",children:[p("span",{className:"sc-fact-key",children:e}),p("span",{children:n})]})}import{forwardRef as Na}from"react";import{jsx as vr,jsxs as kr}from"react/jsx-runtime";var Nr=Na(function({machine:n,className:t,...r},o){if(!n)return null;let{ariaLabel:a,state:s}=Mn(n);return kr("button",{ref:o,type:"button","aria-label":a,className:["sc-btn","sc-btn-connected",t].filter(Boolean).join(" "),...r,children:[vr("span",{className:"sc-pill-tile","aria-hidden":"true",children:vr(q,{className:s.tone==="busy"?"sc-pill-mark sc-pill-mark-busy":"sc-pill-mark"})}),kr("span",{className:"sc-btn-connected-text",children:[s.word,kr("span",{className:"sc-btn-connected-where",children:[" on ",_(n)]})]}),vr("i",{className:`sc-dot sc-dot-${s.tone}`,"aria-hidden":"true"})]})});import{useEffect as xa,useRef as Mr}from"react";var Tt=0,xr=null;function Ro(){if(typeof document>"u")return()=>{};Tt===0&&(xr=document.body.style.overflow,document.body.style.overflow="hidden"),Tt+=1;let e=!1;return()=>{e||(e=!0,Tt-=1,Tt===0&&(document.body.style.overflow=xr??"",xr=null))}}import{jsx as Eo}from"react/jsx-runtime";function st({open:e,onClose:n,labelledBy:t,theme:r,style:o,children:a}){let s=Mr(null),c=Mr(null),i=Mr(null);return xa(()=>{let l=s.current;if(l){if(!e){l.open&&l.close();return}return l.open||l.showModal(),document.activeElement===l&&c.current?.focus(),Ro()}},[e]),Eo("dialog",{ref:s,className:"soba-connect sc-modal","aria-labelledby":t,...r?{"data-theme":r}:{},style:o,onCancel:l=>{l.preventDefault(),n()},onPointerDown:l=>{i.current=l.target},onClick:l=>{l.target===l.currentTarget&&i.current===l.currentTarget&&n()},children:Eo("div",{className:"sc-modal-sheet",ref:c,tabIndex:-1,children:a})})}import{useEffect as Sr,useRef as Ma}from"react";import{jsx as Sa}from"react/jsx-runtime";var An=8;function Pr({open:e,onClose:n,anchor:t,label:r,theme:o,style:a,children:s}){let c=Ma(null);return Sr(()=>{let i=c.current;if(!(!i||!(typeof i.showPopover=="function")))try{e?i.showPopover():i.hidePopover()}catch{}},[e]),Sr(()=>{if(!e)return;let i=()=>{let u=c.current,m=t.current;if(!u||!m)return;let b=m.getBoundingClientRect(),g=u.offsetWidth,h=u.offsetHeight,y=window.innerWidth-g-An,N=Math.max(An,Math.min(b.right-g,Math.max(An,y))),P=b.bottom+An,R=b.top-An-h,W=P+h>window.innerHeight-An&&R>An?R:P;u.style.left=`${Math.round(N)}px`,u.style.top=`${Math.round(W)}px`};i();let l=requestAnimationFrame(i);return window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),()=>{cancelAnimationFrame(l),window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i)}},[e,t]),Sr(()=>{if(!e)return;let i=u=>{u.key==="Escape"&&n()},l=u=>{let m=u.target;m&&(c.current?.contains(m)||t.current?.contains(m)||n())};return document.addEventListener("keydown",i),document.addEventListener("pointerdown",l,!0),()=>{document.removeEventListener("keydown",i),document.removeEventListener("pointerdown",l,!0)}},[e,n,t]),Sa("div",{ref:c,role:"dialog","aria-label":r,className:"soba-connect sc-pop",...o?{"data-theme":o}:{},popover:"manual",hidden:!e,style:a,children:s})}var at=new Map,En=new Map,Io=!1;function Pa(){Io||typeof window>"u"||(Io=!0,window.addEventListener("storage",e=>{!e.key||!at.has(e.key)||(En.set(e.key,Et(e.key)),Rr(e.key))}))}function Rr(e){for(let n of at.get(e)??[])n()}function it(e){return e??""}function Er(e,n){let t=it(e);Pa();let r=at.get(t)??new Set;return r.add(n),at.set(t,r),()=>{r.delete(n),r.size===0&&at.delete(t)}}function Bt(e){let n=it(e),t=En.get(n);if(t!==void 0)return t;let r=e?Et(e):null;return En.set(n,r),r}function Ir(){return null}function Or(e,n){Bt(e)===null&&(En.set(it(e),n),Rr(it(e)))}function Lr(e,n){let t=it(e);En.get(t)!==n&&(En.set(t,n),mr(e,n),Rr(t))}function Ve(e){let n=`${e.unit}s`;return e.reward==="unlimited"?`Unlimited ${n} on your own AI`:e.reward==="included"&&e.includedUnits!==null?`${Ea(e.includedUnits)} ${n} a month once you connect`:e.reward==="credit"&&e.creditMicros>0?`${Ra(e.creditMicros)} back each month you stay connected`:null}function Je(e){return e==="unlimited"||e==="included"}var Lo=new Set(["user-hardware","user-subscription"]),Oo=new Set(["open-weights","frontier"]);function Le(e){return e===null||e.length===0?!1:e.every(n=>Lo.has(n))}var Ra=e=>(e/1e6).toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}),Ea=e=>e.toLocaleString("en-US");function Tr(e,n){if(!(n===null||n.some(a=>Oo.has(a))))return!1;let r=e.findIndex(a=>Lo.has(a));if(r===-1)return!1;let o=e.findIndex(a=>Oo.has(a));return o===-1||r<o}import{createContext as To,useContext as Bo}from"react";var Br=To(null);function In(){return Bo(Br)}var Gr=To({context:null,machines:void 0,theme:"light"});function H(){return Bo(Gr)}import{useMemo as La}from"react";import{createContext as Ia,useContext as Oa}from"react";var Wr=Ia(null);function Q(){let e=Oa(Wr);if(!e)throw new Error("useSoba() must be used inside a <SobaProvider>.");return e}function lt(){let{compute:e}=Q();return La(()=>{let n=e.machines,t=[...n].sort((a,s)=>We([a,s])===a?-1:1).map(Ta),r=We([...n]),o=un(n);return{view:t.length?"machines":e.loading?"loading":e.error?"error":"empty",machines:t,primary:r?t.find(a=>a.machine.id===r.id)??null:null,connected:e.connected,online:e.online,stalled:e.connected&&!e.online&&o?t.find(a=>a.machine.id===o.id)??null:null,loading:e.loading,error:e.error,refresh:e.refresh}},[e])}function Ta(e){let n=He(e);return{machine:e,name:_(e),state:dn(e),status:Yt(e),hardware:Fn(e),lastSeen:e.state==="offline"?Vn(e.last_seen_at):null,runtimes:Ne(e).map(t=>({runtime:t,name:t.display_name,auth:qe(t),quarantined:!!t.quarantined})),runsOn:{by:n.by,name:n.runtime?.display_name??null}}}import{useCallback as Hr,useEffect as Ba,useMemo as Dr,useSyncExternalStore as Ga}from"react";function bn(e={}){let{compute:n,connect:t}=Q(),{value:r,onChange:o,defaultValue:a,remember:s=!0,user:c}=e,i=r!==void 0,l=s&&!i?pr(t.publishableKey,c):null,u=Hr(R=>Er(l,R),[l]),m=Ga(u,Hr(()=>Bt(l),[l]),Ir),b=Dr(()=>Zn(n.machines),[n.machines]),g=Dr(()=>Xn(b),[b]);Ba(()=>{i||!a||Or(l,a)},[i,a,l]);let h=i?r:m??a??null,{selected:y,unavailable:N}=Dr(()=>_t(b,h??null),[b,h]),P=Hr(R=>{i||Lr(l,R),o?.(R)},[i,l,o]);return{options:b,groups:g,selected:y,select:P,run:$t(y),unavailable:N,pickable:mn(b),loading:n.loading&&!n.machines.length}}import{jsx as ct}from"react/jsx-runtime";function Wa({className:e}){let{theme:n}=H(),t=e?`soba-connect ${e}`:"soba-connect";return ct("div",{className:t,"data-theme":n,children:ct(Ur,{})})}function Ur(){let e=lt(),n=bn();return e.view==="loading"?ct("p",{className:"sc-note",children:"Loading\u2026"}):e.view==="error"?ct("p",{className:"sc-error",children:e.error?.message}):ct($n,{machines:e.machines.map(t=>t.machine),model:n.selected,onPickModel:n.select})}import{useCallback as dt,useEffect as Jr,useMemo as Ya,useRef as Yr,useState as Ln}from"react";import{useId as Ha}from"react";import{jsx as On,jsxs as Gt}from"react/jsx-runtime";function ut({open:e,onOpenChange:n,initialCode:t,onConnected:r,showStatus:o,reason:a}){let{error:s}=Q(),c=In(),i=H(),l=()=>n(!1),u=Ha(),m=i.context?.background?.trim(),b=m?cn(m,i.context?.accent):void 0;return Gt(st,{open:e,onClose:l,labelledBy:u,theme:i.theme,style:b,children:[s?Gt("div",{className:"sc-card",children:[On("h2",{className:"sc-title",id:u,children:"Could not start"}),On("p",{className:"sc-error",children:s.message})]}):!c&&!i.context?Gt("div",{className:"sc-card",children:[On("h2",{className:"sc-title",id:u,children:"One moment"}),On("p",{className:"sc-note",children:"Getting your compute\u2026"})]}):On(Cr,{client:c,active:e,onClose:l,headingId:u,theme:i.theme,initialContext:i.context,...i.machines!==void 0?{initialMachines:i.machines}:{},...t?{initialCode:t}:{},...r?{onConnected:r}:{},...o===void 0?{}:{showStatus:o},...a?{reason:a}:{}}),Gt("p",{className:"sc-modal-foot",children:[On(q,{className:"sc-foot-mark"}),"Secured by Soba"]})]})}import{forwardRef as Da}from"react";import{jsx as Ua}from"react/jsx-runtime";var Fr=Da(function(n,t){let{theme:r}=H();return Ua(Nr,{ref:t,"data-theme":r,...n})});import{useCallback as Fa}from"react";function Qa(){let{connect:e}=Q(),n=lt(),t=Fa(()=>e.open("manual"),[e]);return{...Mn(n.primary?.machine??null),machine:n.primary,open:t,canOpen:e.hasModal,loading:n.view==="loading"}}function Qr(e){return Mn(e)}import{useCallback as Go,useEffect as Va,useState as Ja}from"react";function Vr({enabled:e=!0,intervalMs:n=3e3}={}){let t=In(),[r,o]=Ja(null),a=Go(async()=>{t&&o(await t.runs())},[t]);Va(()=>{if(!e||!t)return;let c=!0,i=Me(async()=>{let l=await t.runs();c&&o(l)},n);return()=>{c=!1,i()}},[e,t,n]);let s=Go(async c=>{if(!t)throw new Error("Stopping a run needs <SobaProvider>.");await t.stopRun(c),await a().catch(()=>{})},[t,a]);return{runs:r,refresh:a,stop:s}}import{Fragment as Wo,jsx as Tn,jsxs as Ho}from"react/jsx-runtime";function yn({children:e,variant:n,className:t,initialCode:r,onConnected:o,defaultOpen:a,open:s,onOpenChange:c,showConnected:i=!0}){let{compute:l,connect:u}=Q(),m=H(),{theme:b}=m,g=In(),[h,y]=Ln(a??!!r),N=Yr(null),P=s!==void 0,R=!P&&!a&&!r&&u.hasModal,W=P?s:R?u.isOpen:h,E=B=>{R?B?u.open("manual"):u.close():P||y(B),c?.(B)},I=Yr(W);Jr(()=>{I.current&&!W&&N.current?.focus(),I.current=W},[W]);let[O,k]=Ln(!1),{runs:U,stop:pe}=Vr({enabled:O}),ne=bn(),ae=Ya(()=>O&&U?ja(l.machines,U):l.machines,[l.machines,O,U]),Z=We(ae),me=i&&Qr(Z).connected,Ye=dt(()=>k(!1),[]),[$,ye]=Ln(!1),Se=dt(async()=>{ye(!0);try{await l.refresh()}finally{ye(!1)}},[l]),X=Yr(Se);X.current=Se,Jr(()=>{O&&X.current()},[O]);let[ie,z]=Ln(!1),[Pe,he]=Ln([]),fe=!!m.context?.hosted_available;Jr(()=>{if(!O||!g||!fe)return;let B=!0;return g.hosted().then(x=>{B&&he(x.credentials)}).catch(()=>{}),()=>{B=!1}},[O,g,fe]);let[nn,V]=Ln(null),J=dt(async(B,x)=>{if(g){V(null);try{await g.approveRuntime(B,x),await l.refresh()}catch(tn){V(tn.message)}}},[g,l]),te=dt(async(B,x)=>{if(g){V(null);try{await g.preferRuntime(B,x),await l.refresh()}catch(tn){V(tn.message)}}},[g,l]),T=dt(async B=>{if(g){V(null);try{await g.disconnectHosted(B),he((await g.hosted()).credentials)}catch(x){V(x.message)}}},[g]),le=m.context?.background?.trim(),Re=le?cn(le,m.context?.accent):void 0,ce=me&&!e,L=()=>{if(ce&&!P&&!a&&!r){k(B=>!B);return}E(!0)};return Ho(Wo,{children:[ce?Tn(Fr,{ref:N,machine:Z,"aria-haspopup":"dialog","aria-expanded":O,onClick:L,...t?{className:t}:{}}):Tn("button",{ref:N,type:"button","data-theme":b,className:["sc-btn","sc-btn-icon",n==="primary"?"sc-btn-primary":"",t].filter(Boolean).join(" "),onClick:L,children:e??Ho(Wo,{children:[Tn(q,{className:"sc-btn-mark"}),"Connect compute"]})}),Tn(Pr,{open:O,onClose:Ye,anchor:N,label:"Your compute",theme:b,...Re?{style:Re}:{},children:Tn(fn,{machines:ae,hosted:Pe,onApproveRuntime:(B,x)=>void J(B,x),onPreferRuntime:(B,x)=>void te(B,x),onDisconnectHosted:B=>void T(B),onRefresh:()=>void Se(),refreshing:$,model:ne.selected,onPickModel:ne.select,error:nn,runs:U,onStopRun:async B=>{V(null);try{await pe(B)}catch(x){throw V(x.message),x}},onPair:()=>{k(!1),R?u.open("pair"):(z(!0),E(!0))},...m.context?.app.name?{appName:m.context.app.name}:{}})}),!R&&Tn(ut,{open:W,onOpenChange:B=>{B||z(!1),E(B)},...ie?{showStatus:!1}:{},...r?{initialCode:r}:{},...o?{onConnected:o}:{}})]})}function ja(e,n){return e.map(t=>{if(t.state==="offline")return t;let r=n.filter(o=>o.machine_id===t.id).length;return{...t,active:r,state:r>0?"busy":"online"}})}import{jsx as jr,jsxs as qa}from"react/jsx-runtime";function za({initialCode:e,onConnected:n,className:t,showStatus:r=!0}){let{theme:o}=H();return qa("div",{className:t?`soba-connect ${t}`:"soba-connect","data-theme":o,children:[r&&jr(Ur,{}),jr("div",{className:"sc-compute-act",children:jr(yn,{...e?{initialCode:e}:{},...n?{onConnected:n}:{}})})]})}import{useId as ai,useState as ii}from"react";import{useCallback as qr,useEffect as Vo,useState as Jo}from"react";import{useCallback as Za,useState as Xa}from"react";function pt(){let[e,n]=Xa(null);return{open:Za(()=>{n(null),zn().then(n)},[]),launch:e,note:e==="absent"?"Nothing opened here. That machine may be a different computer, or asleep.":null}}import{useCallback as Do,useMemo as Uo}from"react";function wn(e){if(!e)return null;if(typeof e=="string")return e;if(typeof Response<"u"&&e instanceof Response)return Fo(e.status);let n=e,t=n.error;return typeof t?.code=="string"?t.code:typeof t?.type=="string"?t.type:typeof n.code=="string"?n.code:typeof n.status=="number"?Fo(n.status):n.cause&&n.cause!==e?wn(n.cause):null}function Fo(e){return e===402?"payment_required":e===409?"no_compute":null}function zr(...e){let[n,t]=e,{plan:r,compute:o,connect:a}=Q(),s=t?.predict??e.length===0,c=_a(Ka(n),o)??(s?$a(r,o):null),i=r.plan,l=r.plans,u=Uo(()=>{if(c!=="payment_required")return null;let h=i?.price??0,y=i?.included_units??0;return l.find(N=>N.id!==i?.id&&N.price>h&&(N.included_units===null||N.included_units>y))??null},[c,l,i]),m=Do(async()=>{if(!u)return;if(u.selectable){await r.select(u.id);return}let h=await r.checkout(u.id);window.location.assign(h)},[u,r]),b=a.open,g=Do(()=>{c&&b(c)},[b,c]);return Uo(()=>{if(!c)return null;let h=i?Ve({unit:i.unit,reward:i.connected_reward,includedUnits:i.connected_included_units,creditMicros:i.connected_credit*1e6}):null,y=i&&Je(i.connected_reward)?h:null;return{reason:c,...ei(c,{connectOffer:y,connected:o.connected,online:o.online,machine:un(o.machines)?.label??null,unit:i?.unit??"message",interval:i?.interval??"month",upgrade:u!==null,resets:r.current?.period_end??null}),connectOffer:y,upgradeTo:u,connect:g,upgrade:m}},[c,i,o,u,g,m,r.current?.period_end])}function Ka(e){let n=wn(e);return n==="payment_required"||n==="no_compute"?n:null}function _a(e,n){return e==="no_compute"&&n.connected&&n.online?null:e}function $a(e,n){let t=e.plan;return!t||n.loading?null:Le(t.route_allow)&&!n.online?"no_compute":e.remaining===0&&t.overage==="stop"?"payment_required":null}function ei(e,n){if(e==="payment_required"){let t=`No ${n.unit}s left this ${n.interval}`;return n.connectOffer&&!n.connected?{title:t,body:`${n.connectOffer}. Connecting takes a minute and costs nothing.`}:n.connectOffer&&!n.online?{title:t,body:`${n.connectOffer}. Waking ${n.machine??"your machine"} is enough.`}:n.upgrade?{title:t,body:n.resets?`A larger plan carries on now. This one comes back on ${Qo(n.resets)}.`:"A larger plan carries on now, or wait for this one to renew."}:{title:t,body:n.resets?`Your allowance comes back on ${Qo(n.resets)}.`:"Your allowance comes back at the start of the next period."}}return n.connected&&!n.online?{title:`${n.machine??"Your machine"} can't be reached`,body:"This run needs it awake and connected. Open Soba App on that machine, or connect another one."}:{title:"Nothing connected yet",body:"This app runs on AI you already pay for, on a machine of your own. Connect one and this run has somewhere to go."}}function Qo(e){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString(void 0,{day:"numeric",month:"long"})}function ni(e){let{plan:n,allowance:t,connected:r,online:o,quiet:a,error:s,predict:c,at:i,waved:l}=e;if(!n)return null;let u=e.allow!==void 0?e.allow:n.route_allow;if(r){if(o)return null;let y=Le(u);return{reason:"stalled",title:`${a??"Your machine"} can\u2019t be reached`,detail:y?"The Soba app there has stopped reporting in, so runs have nowhere to go until it is back.":"The Soba app there has stopped reporting in, so nothing will run on your own AI until it is back.",meter:null,dismissible:!1,atTheWall:!1,ownCompute:y}}let m=wn(s),b=m==="payment_required"||m==="no_compute",g=n.ask_to_connect!==!1&&Tr(n.route_prefer,u);if(!c&&!b&&!g)return null;let h=Le(u)?ti(n.unit,Le(n.route_allow)):Je(n.connected_reward)?oi(t,n,i):g?ri(n.unit):null;return!h||h.dismissible&&l?null:{...h,dismissible:!!h.dismissible,ownCompute:!1,atTheWall:!h.dismissible&&(!c||h.meter!==null&&h.meter.left===0)}}function Zr(e={}){let{at:n=.25,error:t,allow:r}=e,o=e.predict??!(e.errorGiven??t!==void 0),{plan:a,compute:s,connect:c}=Q(),i=hr(c.publishableKey),[l,u]=Jo(!1);Vo(()=>{u(fr(i))},[i]);let m=qr(()=>{u(!0),gr(i)},[i]),b=qr(()=>c.open("manual"),[c]),g=qr(()=>c.open("no_compute"),[c]),h=pt(),[y,N]=Jo(!1),{refresh:P}=s,{launch:R}=h;Vo(()=>{if(R===null||R==="absent")return;N(!1);let k=setInterval(()=>void P(),3e3),U=setTimeout(()=>{clearInterval(k),N(!0)},2e4);return()=>{clearInterval(k),clearTimeout(U)}},[R,P]);let W=si(c.app?.name,rt(c.connectUrl)),E=a.loading||s.loading,I=un(s.machines),O=E?null:ni({plan:a.plan,allowance:{remaining:a.remaining,included:a.included},connected:s.connected,online:s.online,quiet:I?_(I):null,error:t,predict:o,...r!==void 0?{allow:r}:{},at:n,waved:l});return{reason:O?.reason??null,visible:O!==null,title:O?.title??null,detail:O?.detail??null,meter:O?.meter??null,dismissible:O?.dismissible??!1,dismissed:l,dismiss:m,open:b,atTheWall:O?.atTheWall??!1,steps:W,stalled:O?.reason==="stalled"?{machine:I?_(I):null,ownCompute:O.ownCompute,wake:h.open,launch:h.launch,note:h.note,stuck:y,connectAnother:g}:null,loading:E}}function ti(e,n){return{reason:"needed",title:n?"This plan runs on your own AI.":`These ${e}s run on your own AI.`,detail:`Connect a machine and your ${e}s run there, free, on access you already have.`,meter:null}}function ri(e){return{reason:"preferred",title:"This plan prefers your own AI.",detail:`Connect a machine and your ${e}s run there instead, on access you already have.`,meter:null,dismissible:!0}}function oi(e,n,t){let{remaining:r,included:o}=e;if(r===null||o===null||o===0||r>Math.ceil(o*t))return null;let a=Ve({unit:n.unit,reward:n.connected_reward,includedUnits:n.connected_included_units,creditMicros:n.connected_credit*1e6});return a?{reason:"running",title:r===0?`No ${n.unit}s left this month.`:`${r} ${n.unit}${r===1?"":"s"} left this month.`,detail:`${a}.`,meter:{left:r,of:o}}:null}function si(e,n){return[{lead:"Download Soba App",detail:"",...n?{linksLead:"Get it for"}:{},links:n?tt.map(t=>({label:t.label,href:`${n}/download/${t.slug}`})):[]},{lead:"Connect compute",detail:"Press this, then approve the pairing when the app asks.",opens:!0,links:[]},{lead:"Let your AIs serve",detail:`It finds what is installed on that machine. Allow one, and ${e??"this app"} sends every run there.`,linksLead:"Nothing on it yet?",links:Ae.map(t=>({label:t.short,href:t.install}))}]}import{Fragment as jo,jsx as G,jsxs as _e}from"react/jsx-runtime";function li(e){let{className:n,fallback:t=null}=e,r=Zr({...e.at===void 0?{}:{at:e.at},...e.predict===void 0?{}:{predict:e.predict},...e.allow===void 0?{}:{allow:e.allow},error:e.error,errorGiven:"error"in e}),{connect:o}=Q(),{theme:a}=H(),[s,c]=ii(null),i=ai(),l=G(jo,{children:t});if(!r.visible)return l;if(r.stalled)return G(Yo,{className:n,theme:a,stalled:!0,children:G(ci,{title:r.title??"",detail:r.detail??"",stalled:r.stalled})});let u=s??r.atTheWall;return _e(Yo,{className:n,theme:a,children:[_e("div",{className:"sc-nudge-top",children:[_e("div",{className:"sc-nudge-say",children:[G("p",{className:"sc-nudge-title",children:r.title}),G("p",{className:"sc-nudge-detail",children:r.detail}),_e("button",{type:"button",className:"sc-btn sc-btn-quiet sc-nudge-more","aria-expanded":u,"aria-controls":i,onClick:()=>c(!u),children:[u?"Hide the details":"How it works",G(di,{})]})]}),r.dismissible?G("button",{type:"button",className:"sc-nudge-dismiss","aria-label":"Dismiss",title:"Dismiss",onClick:r.dismiss,children:G(ui,{})}):null]}),u?G("ol",{className:"sc-nudge-steps",id:i,children:r.steps.map(m=>_e("li",{children:[m.opens?G("button",{type:"button",className:"sc-step-lead",onClick:()=>o.open("manual"),children:m.lead}):G("strong",{children:m.lead}),m.detail?G("span",{children:m.detail}):null,m.links.length>0?_e("span",{className:"sc-step-links",children:[m.linksLead,m.links.map(b=>G("a",{href:b.href,target:"_blank",rel:"noreferrer noopener",children:b.label},b.href))]}):null]},m.lead))}):null,G(yn,{variant:"primary"})]})}function Yo({className:e,theme:n,stalled:t,children:r}){return G("div",{className:e?`soba-connect sc-fill ${e}`:"soba-connect sc-fill","data-theme":n,children:G("div",{className:t?"sc-nudge sc-nudge-stalled":"sc-nudge",children:r})})}function ci({title:e,detail:n,stalled:t}){return _e(jo,{children:[G("div",{className:"sc-nudge-top",children:_e("div",{className:"sc-nudge-say",children:[G("p",{className:"sc-nudge-title",children:e}),G("p",{className:"sc-nudge-detail",children:n}),t.note&&G("p",{className:"sc-nudge-note",children:t.note}),t.stuck&&G("p",{className:"sc-nudge-note",children:"The Soba app is open, but this machine still isn\u2019t reporting in. It may no longer be connected to this app."}),(t.launch==="absent"||t.stuck)&&G("button",{type:"button",className:"sc-btn sc-btn-quiet sc-nudge-more",onClick:t.connectAnother,children:t.stuck?"Connect it again":"Connect another machine"})]})}),G("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:t.wake,children:"Open Soba App"})]})}function ui(){return G("svg",{viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",className:"sc-nudge-x",children:G("path",{d:"m4.8 4.8 6.4 6.4M11.2 4.8l-6.4 6.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function di(){return G("svg",{viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",className:"sc-nudge-chev",children:G("path",{d:"M4.5 6.5 8 10l3.5-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}var pi=new Set(["delta","thinking","status","done","error"]);function Bn(e){let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let t=n,r=t.type==="event"?t.event:t;if(!r||typeof r!="object")return null;let o=r;if(typeof o.type!="string"||!pi.has(o.type))return null;let a={type:o.type};return typeof o.text=="string"&&(a.text=o.text),typeof o.message=="string"&&(a.message=o.message),typeof o.tool=="string"&&(a.tool=o.tool),typeof o.tier=="string"&&(a.tier=o.tier),o.usage&&typeof o.usage=="object"&&(a.usage=o.usage),typeof o.session=="string"&&(a.session=o.session),typeof o.toolInput=="string"&&(a.toolInput=o.toolInput),o.git&&typeof o.git=="object"&&(a.git=o.git),o.turn&&typeof o.turn=="object"&&typeof o.turn.text=="string"&&(a.turn={text:o.turn.text}),typeof o.reason=="string"&&(a.reason=o.reason),typeof o.retryable=="boolean"&&(a.retryable=o.retryable),(o.state==="interrupted"||o.state==="resumed")&&(a.state=o.state),a}async function*Xr(e){let n=e.body;if(!n)throw new Error("That run response had no body to stream.");let t=(e.headers.get("content-type")??"").includes("ndjson"),r=n.getReader(),o=new TextDecoder,a="",s=[];try{for(;;){let i=await r.read();if(i.done)break;for(a+=o.decode(i.value,{stream:!0});;){let l=a.indexOf(`
|
|
3
|
+
`);if(l===-1)break;let u=qo(a.slice(0,l));if(a=a.slice(l+1),t){let m=u.trim()?Bn(u):null;m&&(yield m);continue}if(u===""){let m=s.join(`
|
|
4
|
+
`);if(s=[],m==="[DONE]")return;let b=m?Bn(m):null;b&&(yield b);continue}zo(u,s)}}!t&&a&&zo(qo(a),s);let c=t?a.trim():s.join(`
|
|
5
|
+
`);if(c&&c!=="[DONE]"){let i=Bn(c);i&&(yield i)}}finally{r.cancel().catch(()=>{})}}function zo(e,n){if(!e||e.startsWith(":"))return;let t=e.indexOf(":");if(t===-1||e.slice(0,t)!=="data")return;let r=e.slice(t+1);n.push(r.startsWith(" ")?r.slice(1):r)}function qo(e){return e.endsWith("\r")?e.slice(0,-1):e}async function mi(e){let n="";for await(let t of e)if(t.type==="delta"&&t.text&&(n+=t.text),t.type==="error")throw new Error(t.message??"The run ended with an error.");return n}import{jsx as Zo}from"react/jsx-runtime";function hi({caption:e,disabled:n,className:t,...r}){let{theme:o}=H(),{options:a,selected:s,select:c,pickable:i}=bn(r);return i?Zo("span",{className:"soba-connect sc-inline","data-theme":o,children:Zo(Kn,{options:a,selected:s,onPick:c,...e?{caption:e}:{},...n?{disabled:n}:{},...t?{className:t}:{}})}):null}import{useEffect as fi}from"react";var Xo="data-soba-react",Ko=!1;function mt(){if(Ko||typeof document>"u"||(Ko=!0,document.querySelector(`style[${Xo}]`)))return;let e=document.createElement("style");e.setAttribute(Xo,""),e.textContent=`.soba-connect {
|
|
6
6
|
--sc-ground: #ffffff;
|
|
7
7
|
--sc-sheet: #ffffff;
|
|
8
8
|
--sc-raised: #f6f6f7;
|
|
@@ -16,9 +16,14 @@ import{useEffect as Ns,useRef as xs,useState as At}from"react";var yn=class exte
|
|
|
16
16
|
--sc-ok: #22a06b;
|
|
17
17
|
--sc-warn: #b06f14;
|
|
18
18
|
|
|
19
|
-
--sc-
|
|
19
|
+
--sc-danger: #c2452d;
|
|
20
|
+
|
|
21
|
+
--sc-warn-dot: #d9a21b;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
--sc-tray: #f3f3f2;
|
|
20
25
|
--sc-tray-card: var(--sc-sheet, #ffffff);
|
|
21
|
-
--sc-tray-sunk:
|
|
26
|
+
--sc-tray-sunk: #efefed;
|
|
22
27
|
|
|
23
28
|
--sc-font-size: 15px;
|
|
24
29
|
--sc-fs-label: max(11px, calc(var(--sc-font-size) * 0.77));
|
|
@@ -204,10 +209,6 @@ a.sc-btn {
|
|
|
204
209
|
color: var(--sc-muted, #6b6b73);
|
|
205
210
|
}
|
|
206
211
|
|
|
207
|
-
.sc-tone-absent {
|
|
208
|
-
color: var(--sc-faint, #a1a1aa);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
212
|
.sc-error {
|
|
212
213
|
color: var(--sc-warn, #b06f14);
|
|
213
214
|
font-size: var(--sc-fs-body);
|
|
@@ -256,10 +257,11 @@ a.sc-btn {
|
|
|
256
257
|
|
|
257
258
|
.sc-tray {
|
|
258
259
|
display: grid;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
|
|
261
|
+
gap: 20px;
|
|
262
|
+
padding: 20px;
|
|
263
|
+
border-radius: 24px;
|
|
264
|
+
background: var(--sc-tray, #f3f3f2);
|
|
263
265
|
}
|
|
264
266
|
|
|
265
267
|
.sc-group {
|
|
@@ -270,8 +272,9 @@ a.sc-btn {
|
|
|
270
272
|
display: flex;
|
|
271
273
|
align-items: center;
|
|
272
274
|
gap: 4px;
|
|
273
|
-
min-height:
|
|
274
|
-
|
|
275
|
+
min-height: 22px;
|
|
276
|
+
|
|
277
|
+
padding: 0 0 8px 4px;
|
|
275
278
|
}
|
|
276
279
|
|
|
277
280
|
.sc-cap-acts {
|
|
@@ -288,24 +291,27 @@ a.sc-btn {
|
|
|
288
291
|
overflow: hidden;
|
|
289
292
|
text-overflow: ellipsis;
|
|
290
293
|
white-space: nowrap;
|
|
291
|
-
font-size:
|
|
294
|
+
font-size: 14px;
|
|
292
295
|
letter-spacing: 0;
|
|
293
296
|
color: var(--sc-muted, #6b6b73);
|
|
294
297
|
}
|
|
295
298
|
|
|
296
299
|
.sc-group-card {
|
|
297
|
-
padding:
|
|
298
|
-
border-radius:
|
|
300
|
+
padding: 7px 0 7px 12px;
|
|
301
|
+
border-radius: 18px;
|
|
299
302
|
background: var(--sc-tray-card, #ffffff);
|
|
300
|
-
box-shadow:
|
|
303
|
+
box-shadow:
|
|
304
|
+
var(--sc-shadow-1),
|
|
305
|
+
inset 0 0 0 1px color-mix(in srgb, var(--sc-line, #e9e9eb) 70%, transparent);
|
|
301
306
|
}
|
|
302
307
|
|
|
303
308
|
.sc-disc {
|
|
304
309
|
flex: none;
|
|
305
310
|
display: grid;
|
|
306
311
|
place-items: center;
|
|
307
|
-
|
|
308
|
-
|
|
312
|
+
|
|
313
|
+
width: 36px;
|
|
314
|
+
height: 36px;
|
|
309
315
|
padding: 0;
|
|
310
316
|
border: 0;
|
|
311
317
|
border-radius: 50%;
|
|
@@ -343,9 +349,9 @@ a.sc-btn {
|
|
|
343
349
|
.sc-mrow {
|
|
344
350
|
display: flex;
|
|
345
351
|
align-items: center;
|
|
346
|
-
gap:
|
|
352
|
+
gap: 14px;
|
|
347
353
|
min-height: 52px;
|
|
348
|
-
padding:
|
|
354
|
+
padding: 7px 16px 7px 4px;
|
|
349
355
|
}
|
|
350
356
|
|
|
351
357
|
.sc-mtile {
|
|
@@ -353,27 +359,29 @@ a.sc-btn {
|
|
|
353
359
|
flex: none;
|
|
354
360
|
display: grid;
|
|
355
361
|
place-items: center;
|
|
356
|
-
width:
|
|
357
|
-
height:
|
|
362
|
+
width: 44px;
|
|
363
|
+
height: 44px;
|
|
364
|
+
|
|
358
365
|
border-radius: 12px;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
color: var(--sc-text, #
|
|
366
|
+
|
|
367
|
+
background: var(--sc-tray-sunk, #efefed);
|
|
368
|
+
color: var(--sc-text, #1b1b1a);
|
|
362
369
|
}
|
|
363
370
|
|
|
364
371
|
.sc-mglyph {
|
|
365
372
|
width: 24px;
|
|
366
|
-
height:
|
|
373
|
+
height: 19px;
|
|
367
374
|
}
|
|
368
375
|
|
|
369
376
|
.sc-mbadge {
|
|
370
377
|
position: absolute;
|
|
371
|
-
|
|
372
|
-
bottom:
|
|
373
|
-
|
|
374
|
-
|
|
378
|
+
left: auto;
|
|
379
|
+
bottom: -3px;
|
|
380
|
+
right: -3px;
|
|
381
|
+
width: 14px;
|
|
382
|
+
height: 14px;
|
|
375
383
|
border-radius: 50%;
|
|
376
|
-
transform:
|
|
384
|
+
transform: none;
|
|
377
385
|
box-shadow: 0 0 0 2.5px var(--sc-tray-card, #ffffff);
|
|
378
386
|
}
|
|
379
387
|
|
|
@@ -389,34 +397,51 @@ a.sc-btn {
|
|
|
389
397
|
background: var(--sc-line-2, #dcdce0);
|
|
390
398
|
}
|
|
391
399
|
|
|
400
|
+
.sc-mbadge-away {
|
|
401
|
+
background: var(--sc-warn-dot, #d9a21b);
|
|
402
|
+
}
|
|
403
|
+
|
|
392
404
|
.sc-mid {
|
|
393
405
|
display: flex;
|
|
394
406
|
flex: 1;
|
|
395
407
|
min-width: 0;
|
|
396
408
|
flex-direction: column;
|
|
397
|
-
gap:
|
|
409
|
+
gap: 2px;
|
|
398
410
|
}
|
|
399
411
|
|
|
400
412
|
.sc-mname {
|
|
401
413
|
overflow: hidden;
|
|
402
414
|
text-overflow: ellipsis;
|
|
403
415
|
white-space: nowrap;
|
|
404
|
-
font-size:
|
|
405
|
-
font-weight:
|
|
416
|
+
font-size: 16px;
|
|
417
|
+
font-weight: 600;
|
|
406
418
|
}
|
|
407
419
|
|
|
408
420
|
.sc-mmeta {
|
|
409
421
|
display: flex;
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
font-size: var(--sc-fs-label);
|
|
422
|
+
align-items: baseline;
|
|
423
|
+
gap: 10px;
|
|
424
|
+
font-size: 14px;
|
|
414
425
|
line-height: 1.35;
|
|
415
426
|
color: var(--sc-muted, #6b6b73);
|
|
416
427
|
}
|
|
417
428
|
|
|
429
|
+
.sc-mmeta-is {
|
|
430
|
+
min-width: 0;
|
|
431
|
+
overflow: hidden;
|
|
432
|
+
text-overflow: ellipsis;
|
|
433
|
+
white-space: nowrap;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.sc-mmeta-now {
|
|
437
|
+
flex: none;
|
|
438
|
+
margin-left: auto;
|
|
439
|
+
color: var(--sc-text-2, #3f3f46);
|
|
440
|
+
font-variant-numeric: tabular-nums;
|
|
441
|
+
}
|
|
442
|
+
|
|
418
443
|
.sc-mmeta-sep {
|
|
419
|
-
padding
|
|
444
|
+
padding: 0 6px;
|
|
420
445
|
color: var(--sc-line-2, #dcdce0);
|
|
421
446
|
}
|
|
422
447
|
|
|
@@ -454,41 +479,295 @@ a.sc-btn {
|
|
|
454
479
|
transform: rotate(90deg);
|
|
455
480
|
}
|
|
456
481
|
|
|
482
|
+
.sc-group-card:has(> .sc-rrow) {
|
|
483
|
+
padding: 0 16px;
|
|
484
|
+
}
|
|
457
485
|
.sc-rrow {
|
|
458
486
|
display: flex;
|
|
459
|
-
align-items:
|
|
460
|
-
gap:
|
|
461
|
-
padding:
|
|
487
|
+
align-items: center;
|
|
488
|
+
gap: 14px;
|
|
489
|
+
padding: 14px 0;
|
|
462
490
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
margin-top: 1px;
|
|
491
|
+
.sc-rrow + .sc-rrow {
|
|
492
|
+
box-shadow: inset 0 1px 0 var(--sc-line, #e9e9e7);
|
|
466
493
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
494
|
+
.sc-rdot {
|
|
495
|
+
flex: none;
|
|
496
|
+
width: 10px;
|
|
497
|
+
height: 10px;
|
|
498
|
+
border-radius: 50%;
|
|
499
|
+
background: var(--sc-line-2, #dcdce0);
|
|
472
500
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
501
|
+
.sc-rdot-live {
|
|
502
|
+
background: var(--sc-ok, #1e8e5a);
|
|
503
|
+
}
|
|
504
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
505
|
+
.sc-rdot-live {
|
|
506
|
+
animation: sc-breathe 1.6s ease-in-out infinite;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
@keyframes sc-breathe {
|
|
510
|
+
0%,
|
|
511
|
+
100% {
|
|
512
|
+
opacity: 1;
|
|
513
|
+
}
|
|
514
|
+
50% {
|
|
515
|
+
opacity: 0.35;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
.sc-rtitle {
|
|
519
|
+
overflow: hidden;
|
|
520
|
+
text-overflow: ellipsis;
|
|
521
|
+
white-space: nowrap;
|
|
522
|
+
font-size: 15px;
|
|
523
|
+
font-weight: 500;
|
|
476
524
|
}
|
|
477
525
|
|
|
478
526
|
.sc-rstop {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
527
|
+
flex: none;
|
|
528
|
+
display: grid;
|
|
529
|
+
place-items: center;
|
|
530
|
+
width: 44px;
|
|
531
|
+
height: 44px;
|
|
532
|
+
margin: -8px -10px -8px 0;
|
|
533
|
+
padding: 0;
|
|
534
|
+
border: 0;
|
|
535
|
+
border-radius: 50%;
|
|
536
|
+
background: transparent;
|
|
537
|
+
color: var(--sc-muted, #6b6b69);
|
|
538
|
+
cursor: pointer;
|
|
482
539
|
}
|
|
483
540
|
|
|
541
|
+
.sc-rstop-ring {
|
|
542
|
+
display: grid;
|
|
543
|
+
place-items: center;
|
|
544
|
+
width: 28px;
|
|
545
|
+
height: 28px;
|
|
546
|
+
border-radius: 50%;
|
|
547
|
+
box-shadow: inset 0 0 0 1px var(--sc-line, #e9e9e7);
|
|
548
|
+
transition:
|
|
549
|
+
background-color 120ms ease,
|
|
550
|
+
box-shadow 120ms ease,
|
|
551
|
+
color 120ms ease;
|
|
552
|
+
}
|
|
553
|
+
.sc-rstop:hover:not(:disabled) {
|
|
554
|
+
color: var(--sc-text, #1b1b1a);
|
|
555
|
+
}
|
|
556
|
+
.sc-rstop:hover:not(:disabled) .sc-rstop-ring {
|
|
557
|
+
background: var(--sc-tray-sunk, #efefed);
|
|
558
|
+
box-shadow: inset 0 0 0 1px transparent;
|
|
559
|
+
}
|
|
560
|
+
.sc-rstop .sc-dglyph {
|
|
561
|
+
width: 10px;
|
|
562
|
+
height: 10px;
|
|
563
|
+
}
|
|
564
|
+
.sc-rstop:disabled {
|
|
565
|
+
cursor: default;
|
|
566
|
+
opacity: 0.5;
|
|
567
|
+
}
|
|
484
568
|
.sc-rstep {
|
|
485
569
|
display: -webkit-box;
|
|
486
570
|
overflow: hidden;
|
|
487
571
|
-webkit-box-orient: vertical;
|
|
488
572
|
-webkit-line-clamp: 2;
|
|
489
|
-
|
|
573
|
+
line-clamp: 2;
|
|
574
|
+
font-size: 13px;
|
|
490
575
|
line-height: 1.4;
|
|
491
|
-
color: var(--sc-muted, #
|
|
576
|
+
color: var(--sc-muted, #6b6b69);
|
|
577
|
+
font-variant-numeric: tabular-nums;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.sc-blank {
|
|
581
|
+
display: flex;
|
|
582
|
+
flex-direction: column;
|
|
583
|
+
align-items: center;
|
|
584
|
+
gap: 12px;
|
|
585
|
+
padding: 24px 24px 26px;
|
|
586
|
+
text-align: center;
|
|
587
|
+
}
|
|
588
|
+
.sc-blank-mark {
|
|
589
|
+
display: grid;
|
|
590
|
+
place-items: center;
|
|
591
|
+
width: 44px;
|
|
592
|
+
height: 44px;
|
|
593
|
+
border-radius: 50%;
|
|
594
|
+
background: var(--sc-tray-sunk, #efefed);
|
|
595
|
+
color: var(--sc-faint, #8c8c89);
|
|
596
|
+
}
|
|
597
|
+
.sc-blank-glyph {
|
|
598
|
+
width: 20px;
|
|
599
|
+
height: 20px;
|
|
600
|
+
}
|
|
601
|
+
.sc-blank-say {
|
|
602
|
+
display: flex;
|
|
603
|
+
flex-direction: column;
|
|
604
|
+
gap: 4px;
|
|
605
|
+
}
|
|
606
|
+
.sc-blank-title {
|
|
607
|
+
font-size: 16px;
|
|
608
|
+
font-weight: 600;
|
|
609
|
+
}
|
|
610
|
+
.sc-blank-body {
|
|
611
|
+
font-size: 14px;
|
|
612
|
+
line-height: 20px;
|
|
613
|
+
color: var(--sc-muted, #6b6b69);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.sc-blank-act {
|
|
617
|
+
display: inline-flex;
|
|
618
|
+
align-items: center;
|
|
619
|
+
gap: 7px;
|
|
620
|
+
height: 36px;
|
|
621
|
+
padding: 0 14px;
|
|
622
|
+
border: 1px solid var(--sc-line, #e6e6e3);
|
|
623
|
+
border-radius: 11px;
|
|
624
|
+
color: var(--sc-text, #1b1b1a);
|
|
625
|
+
font-size: 14px;
|
|
626
|
+
font-weight: 600;
|
|
627
|
+
text-decoration: none;
|
|
628
|
+
transition: background 120ms ease;
|
|
629
|
+
}
|
|
630
|
+
.sc-blank-act:hover {
|
|
631
|
+
background: var(--sc-tray-sunk, #efefed);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.sc-alarm {
|
|
635
|
+
display: flex;
|
|
636
|
+
align-items: flex-start;
|
|
637
|
+
gap: 14px;
|
|
638
|
+
margin: -7px -0 -7px -12px;
|
|
639
|
+
padding: 16px;
|
|
640
|
+
border-radius: 18px;
|
|
641
|
+
background: color-mix(in srgb, var(--sc-danger, #c2452d) 9%, var(--sc-tray-card, #ffffff));
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.sc-alarm-mark {
|
|
645
|
+
flex: none;
|
|
646
|
+
display: grid;
|
|
647
|
+
place-items: center;
|
|
648
|
+
width: 30px;
|
|
649
|
+
margin-top: 1px;
|
|
650
|
+
color: var(--sc-danger, #c2452d);
|
|
651
|
+
}
|
|
652
|
+
.sc-alarm-mark .sc-hglyph {
|
|
653
|
+
width: 22px;
|
|
654
|
+
height: 22px;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.sc-alarm-warn {
|
|
658
|
+
background: color-mix(in srgb, var(--sc-warn, #b06f14) 10%, var(--sc-tray-card, #ffffff));
|
|
659
|
+
}
|
|
660
|
+
.sc-alarm-warn .sc-alarm-mark {
|
|
661
|
+
color: var(--sc-warn, #b06f14);
|
|
662
|
+
}
|
|
663
|
+
.sc-alarm + .sc-alarm {
|
|
664
|
+
margin-top: 8px;
|
|
665
|
+
}
|
|
666
|
+
.sc-alarm-say {
|
|
667
|
+
display: flex;
|
|
668
|
+
flex-direction: column;
|
|
669
|
+
gap: 4px;
|
|
670
|
+
min-width: 0;
|
|
671
|
+
}
|
|
672
|
+
.sc-alarm-title {
|
|
673
|
+
font-size: 16px;
|
|
674
|
+
font-weight: 600;
|
|
675
|
+
}
|
|
676
|
+
.sc-alarm-body {
|
|
677
|
+
font-size: 14px;
|
|
678
|
+
line-height: 20px;
|
|
679
|
+
color: var(--sc-text-2, #5a4a46);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.sc-blank-soba {
|
|
683
|
+
display: grid;
|
|
684
|
+
place-items: center;
|
|
685
|
+
color: var(--sc-text, #1b1b1a);
|
|
686
|
+
}
|
|
687
|
+
.sc-blank-soba-mark {
|
|
688
|
+
width: 48px;
|
|
689
|
+
height: 48px;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.sc-cap-link {
|
|
693
|
+
flex: none;
|
|
694
|
+
margin: -8px -4px -8px 0;
|
|
695
|
+
padding: 8px 4px;
|
|
696
|
+
border: 0;
|
|
697
|
+
background: transparent;
|
|
698
|
+
font: inherit;
|
|
699
|
+
font-size: 13px;
|
|
700
|
+
color: var(--sc-text-2, #3f3f46);
|
|
701
|
+
text-decoration: underline;
|
|
702
|
+
text-underline-offset: 2px;
|
|
703
|
+
cursor: pointer;
|
|
704
|
+
}
|
|
705
|
+
.sc-cap-link:hover {
|
|
706
|
+
color: var(--sc-text, #1b1b1a);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.sc-acts {
|
|
710
|
+
display: flex;
|
|
711
|
+
flex-direction: column;
|
|
712
|
+
gap: 4px;
|
|
713
|
+
}
|
|
714
|
+
.sc-act-go {
|
|
715
|
+
display: flex;
|
|
716
|
+
align-items: center;
|
|
717
|
+
justify-content: center;
|
|
718
|
+
gap: 9px;
|
|
719
|
+
height: 48px;
|
|
720
|
+
border: 0;
|
|
721
|
+
border-radius: 14px;
|
|
722
|
+
background: var(--sc-accent, #1b1b1a);
|
|
723
|
+
color: var(--sc-accent-fg, #ffffff);
|
|
724
|
+
font: inherit;
|
|
725
|
+
font-size: 15px;
|
|
726
|
+
font-weight: 600;
|
|
727
|
+
cursor: pointer;
|
|
728
|
+
transition: opacity 120ms ease;
|
|
729
|
+
}
|
|
730
|
+
.sc-act-go:hover:not(:disabled) {
|
|
731
|
+
opacity: 0.88;
|
|
732
|
+
}
|
|
733
|
+
.sc-act-quiet {
|
|
734
|
+
display: flex;
|
|
735
|
+
align-items: center;
|
|
736
|
+
justify-content: center;
|
|
737
|
+
gap: 8px;
|
|
738
|
+
height: 44px;
|
|
739
|
+
border: 0;
|
|
740
|
+
border-radius: 12px;
|
|
741
|
+
background: transparent;
|
|
742
|
+
font: inherit;
|
|
743
|
+
font-size: 14px;
|
|
744
|
+
color: var(--sc-muted, #6b6b69);
|
|
745
|
+
cursor: pointer;
|
|
746
|
+
}
|
|
747
|
+
.sc-act-quiet:hover:not(:disabled) {
|
|
748
|
+
color: var(--sc-text, #1b1b1a);
|
|
749
|
+
}
|
|
750
|
+
.sc-act-go:disabled,
|
|
751
|
+
.sc-act-quiet:disabled {
|
|
752
|
+
cursor: default;
|
|
753
|
+
opacity: 0.5;
|
|
754
|
+
}
|
|
755
|
+
.sc-act-go[data-spin],
|
|
756
|
+
.sc-act-quiet[data-spin] {
|
|
757
|
+
opacity: 1;
|
|
758
|
+
}
|
|
759
|
+
.sc-act-glyph {
|
|
760
|
+
flex: none;
|
|
761
|
+
width: 15px;
|
|
762
|
+
height: 15px;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.sc-act-miss {
|
|
766
|
+
margin: 4px 2px 0;
|
|
767
|
+
font-size: 13px;
|
|
768
|
+
line-height: 1.5;
|
|
769
|
+
color: var(--sc-muted, #6b6b69);
|
|
770
|
+
text-align: center;
|
|
492
771
|
}
|
|
493
772
|
|
|
494
773
|
.sc-arow {
|
|
@@ -503,8 +782,8 @@ a.sc-btn {
|
|
|
503
782
|
flex: none;
|
|
504
783
|
display: grid;
|
|
505
784
|
place-items: center;
|
|
506
|
-
width:
|
|
507
|
-
height:
|
|
785
|
+
width: 30px;
|
|
786
|
+
height: 30px;
|
|
508
787
|
border-radius: var(--sc-r-sm, 6px);
|
|
509
788
|
border: 1px solid var(--sc-line, #e9e9eb);
|
|
510
789
|
background: var(--sc-tray-sunk, #f6f6f7);
|
|
@@ -524,14 +803,6 @@ a.sc-btn {
|
|
|
524
803
|
color: var(--sc-muted, #6b6b73);
|
|
525
804
|
}
|
|
526
805
|
|
|
527
|
-
.sc-runs-logo {
|
|
528
|
-
flex: none;
|
|
529
|
-
width: 14px;
|
|
530
|
-
height: 14px;
|
|
531
|
-
border-radius: 3px;
|
|
532
|
-
object-fit: contain;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
806
|
.sc-runtime-mark {
|
|
536
807
|
width: 13px;
|
|
537
808
|
height: 13px;
|
|
@@ -547,10 +818,6 @@ a.sc-btn {
|
|
|
547
818
|
font-size: var(--sc-fs-small);
|
|
548
819
|
}
|
|
549
820
|
|
|
550
|
-
.sc-aname-absent {
|
|
551
|
-
color: var(--sc-muted, #6b6b73);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
821
|
.sc-aversion {
|
|
555
822
|
color: var(--sc-muted, #6b6b73);
|
|
556
823
|
}
|
|
@@ -564,22 +831,10 @@ a.sc-btn {
|
|
|
564
831
|
color: var(--sc-muted, #6b6b73);
|
|
565
832
|
}
|
|
566
833
|
|
|
567
|
-
.sc-sglyph {
|
|
568
|
-
flex: none;
|
|
569
|
-
width: 11px;
|
|
570
|
-
height: 11px;
|
|
571
|
-
color: var(--sc-ok, #22a06b);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.sc-aserving {
|
|
575
|
-
margin-left: 5px;
|
|
576
|
-
font-variant-numeric: tabular-nums;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
834
|
.sc-orow {
|
|
580
835
|
display: flex;
|
|
581
836
|
align-items: center;
|
|
582
|
-
gap:
|
|
837
|
+
gap: 18px;
|
|
583
838
|
min-height: 34px;
|
|
584
839
|
padding-right: 12px;
|
|
585
840
|
}
|
|
@@ -625,7 +880,7 @@ a.sc-btn {
|
|
|
625
880
|
.sc-pair {
|
|
626
881
|
display: flex;
|
|
627
882
|
align-items: center;
|
|
628
|
-
gap:
|
|
883
|
+
gap: 18px;
|
|
629
884
|
width: calc(100% + 4px);
|
|
630
885
|
min-height: 34px;
|
|
631
886
|
margin-left: -4px;
|
|
@@ -645,7 +900,8 @@ a.sc-btn {
|
|
|
645
900
|
}
|
|
646
901
|
|
|
647
902
|
.sc-open-app {
|
|
648
|
-
|
|
903
|
+
|
|
904
|
+
color: var(--sc-muted, #6b6b73);
|
|
649
905
|
text-decoration: none;
|
|
650
906
|
}
|
|
651
907
|
|
|
@@ -661,95 +917,68 @@ a.sc-btn {
|
|
|
661
917
|
color: var(--sc-muted, #6b6b73);
|
|
662
918
|
}
|
|
663
919
|
|
|
664
|
-
.sc-
|
|
665
|
-
display:
|
|
666
|
-
flex: none;
|
|
667
|
-
align-items: center;
|
|
668
|
-
gap: 2px;
|
|
669
|
-
min-width: 0;
|
|
670
|
-
max-width: 62%;
|
|
671
|
-
font-size: var(--sc-fs-label);
|
|
672
|
-
color: var(--sc-muted, #6b6b73);
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
.sc-runs-cap {
|
|
676
|
-
flex: none;
|
|
677
|
-
white-space: nowrap;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
.sc-runs-fixed,
|
|
681
|
-
.sc-runs-btn {
|
|
682
|
-
display: inline-flex;
|
|
920
|
+
.sc-nilrow {
|
|
921
|
+
display: flex;
|
|
683
922
|
align-items: center;
|
|
684
|
-
gap:
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
font-weight: 500;
|
|
690
|
-
color: var(--sc-text-2, #3f3f46);
|
|
923
|
+
gap: 10px;
|
|
924
|
+
margin: 0;
|
|
925
|
+
padding: 9px 0;
|
|
926
|
+
font-size: 14px;
|
|
927
|
+
color: var(--sc-muted, #6b6b69);
|
|
691
928
|
}
|
|
692
929
|
|
|
693
|
-
.sc-
|
|
694
|
-
padding
|
|
695
|
-
border: 0;
|
|
696
|
-
border-radius: var(--sc-r-pill, 999px);
|
|
697
|
-
background: transparent;
|
|
698
|
-
font-family: inherit;
|
|
699
|
-
cursor: pointer;
|
|
700
|
-
transition:
|
|
701
|
-
background-color 120ms ease,
|
|
702
|
-
color 120ms ease;
|
|
930
|
+
.sc-group-card:has(> .sc-nilrow) {
|
|
931
|
+
padding: 7px 16px;
|
|
703
932
|
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
933
|
+
.sc-nilrow-mark {
|
|
934
|
+
display: grid;
|
|
935
|
+
place-items: center;
|
|
936
|
+
flex: none;
|
|
937
|
+
width: 28px;
|
|
938
|
+
height: 28px;
|
|
939
|
+
border-radius: 50%;
|
|
940
|
+
background: var(--sc-tray-sunk, #efefed);
|
|
941
|
+
color: var(--sc-faint, #8c8c89);
|
|
709
942
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
cursor: default;
|
|
943
|
+
.sc-nilrow-mark .sc-blank-glyph {
|
|
944
|
+
width: 15px;
|
|
945
|
+
height: 15px;
|
|
714
946
|
}
|
|
715
947
|
|
|
716
|
-
.sc-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
948
|
+
.sc-heads {
|
|
949
|
+
display: flex;
|
|
950
|
+
align-items: flex-start;
|
|
951
|
+
gap: 8px;
|
|
952
|
+
margin: 2px 12px 3px 0;
|
|
953
|
+
padding: 8px 10px;
|
|
954
|
+
border-radius: var(--sc-r, 10px);
|
|
955
|
+
background: color-mix(in srgb, var(--sc-warn, #b06f14) 9%, var(--sc-tray-card, #ffffff));
|
|
720
956
|
}
|
|
721
|
-
|
|
722
|
-
.sc-runs-mark {
|
|
723
|
-
display: inline-grid;
|
|
957
|
+
.sc-heads-mark {
|
|
724
958
|
flex: none;
|
|
959
|
+
display: grid;
|
|
725
960
|
place-items: center;
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
.sc-runs-mark > * {
|
|
731
|
-
max-width: 14px;
|
|
732
|
-
max-height: 14px;
|
|
961
|
+
|
|
962
|
+
margin-top: 1px;
|
|
963
|
+
color: var(--sc-warn, #b06f14);
|
|
733
964
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
overflow: hidden;
|
|
738
|
-
text-overflow: ellipsis;
|
|
739
|
-
white-space: nowrap;
|
|
965
|
+
.sc-hglyph {
|
|
966
|
+
width: 13px;
|
|
967
|
+
height: 13px;
|
|
740
968
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
height:
|
|
745
|
-
color: var(--sc-
|
|
969
|
+
.sc-heads-say {
|
|
970
|
+
margin: 0;
|
|
971
|
+
font-size: var(--sc-fs-label);
|
|
972
|
+
line-height: 1.45;
|
|
973
|
+
color: var(--sc-text-2, #3f3f46);
|
|
746
974
|
}
|
|
747
975
|
|
|
748
976
|
.sc-menu {
|
|
749
977
|
position: fixed;
|
|
750
978
|
inset: auto;
|
|
751
979
|
z-index: 2147483647;
|
|
752
|
-
|
|
980
|
+
|
|
981
|
+
width: 320px;
|
|
753
982
|
margin: 0;
|
|
754
983
|
padding: 4px;
|
|
755
984
|
border: 1px solid var(--sc-line, #e9e9eb);
|
|
@@ -768,15 +997,16 @@ a.sc-btn {
|
|
|
768
997
|
.sc-menu-item {
|
|
769
998
|
display: flex;
|
|
770
999
|
align-items: center;
|
|
771
|
-
gap:
|
|
1000
|
+
gap: 14px;
|
|
772
1001
|
width: 100%;
|
|
773
|
-
|
|
774
|
-
|
|
1002
|
+
|
|
1003
|
+
min-height: 44px;
|
|
1004
|
+
padding: 7px 12px;
|
|
775
1005
|
border: 0;
|
|
776
|
-
border-radius:
|
|
1006
|
+
border-radius: 12px;
|
|
777
1007
|
background: transparent;
|
|
778
1008
|
font: inherit;
|
|
779
|
-
font-size:
|
|
1009
|
+
font-size: 15px;
|
|
780
1010
|
color: inherit;
|
|
781
1011
|
text-align: left;
|
|
782
1012
|
cursor: pointer;
|
|
@@ -802,9 +1032,9 @@ a.sc-btn {
|
|
|
802
1032
|
}
|
|
803
1033
|
|
|
804
1034
|
.sc-menu-note {
|
|
805
|
-
font-size:
|
|
1035
|
+
font-size: 13.5px;
|
|
806
1036
|
line-height: 1.4;
|
|
807
|
-
color: var(--sc-muted, #
|
|
1037
|
+
color: var(--sc-muted, #6b6b69);
|
|
808
1038
|
}
|
|
809
1039
|
|
|
810
1040
|
.sc-menu-check {
|
|
@@ -835,6 +1065,11 @@ a.sc-btn {
|
|
|
835
1065
|
border-top: 0;
|
|
836
1066
|
}
|
|
837
1067
|
|
|
1068
|
+
.sc-tray-error {
|
|
1069
|
+
margin: 0;
|
|
1070
|
+
padding: 0 12px 2px;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
838
1073
|
.sc-mp {
|
|
839
1074
|
display: inline-flex;
|
|
840
1075
|
align-items: center;
|
|
@@ -907,32 +1142,166 @@ a.sc-btn {
|
|
|
907
1142
|
color: var(--sc-faint, #a1a1aa);
|
|
908
1143
|
}
|
|
909
1144
|
|
|
910
|
-
.sc-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
border:
|
|
914
|
-
|
|
915
|
-
|
|
1145
|
+
.sc-atile .sc-runtime-logo {
|
|
1146
|
+
width: 25px;
|
|
1147
|
+
height: 25px;
|
|
1148
|
+
border-radius: 7px;
|
|
1149
|
+
}
|
|
1150
|
+
.sc-atile .sc-runtime-mark {
|
|
1151
|
+
width: 22px;
|
|
1152
|
+
height: 22px;
|
|
1153
|
+
}
|
|
1154
|
+
.sc-atile .sc-runtime-letter {
|
|
1155
|
+
font-size: 15px;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.sc-group-card:has(> .sc-runs-agent) {
|
|
1159
|
+
padding: 0 16px;
|
|
1160
|
+
}
|
|
1161
|
+
.sc-runs-agent {
|
|
1162
|
+
display: flex;
|
|
1163
|
+
align-items: center;
|
|
1164
|
+
gap: 14px;
|
|
1165
|
+
width: 100%;
|
|
1166
|
+
min-width: 0;
|
|
1167
|
+
margin: 0;
|
|
1168
|
+
padding: 14px 0;
|
|
1169
|
+
border: 0;
|
|
1170
|
+
background: transparent;
|
|
916
1171
|
font: inherit;
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
color: var(--sc-text-2, #3f3f46);
|
|
1172
|
+
color: inherit;
|
|
1173
|
+
text-align: left;
|
|
920
1174
|
cursor: pointer;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
.sc-runs-dim {
|
|
1178
|
+
opacity: 0.55;
|
|
1179
|
+
}
|
|
1180
|
+
.sc-runs-agent:disabled,
|
|
1181
|
+
.sc-runs-fixed {
|
|
1182
|
+
cursor: default;
|
|
1183
|
+
}
|
|
1184
|
+
.sc-runs-agent:focus-visible {
|
|
1185
|
+
outline: 2px solid var(--sc-accent, #18181b);
|
|
1186
|
+
outline-offset: -2px;
|
|
1187
|
+
border-radius: var(--sc-r-sm, 6px);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
.sc-runs-tile {
|
|
1191
|
+
flex: none;
|
|
1192
|
+
display: grid;
|
|
1193
|
+
place-items: center;
|
|
1194
|
+
width: 44px;
|
|
1195
|
+
height: 44px;
|
|
1196
|
+
border-radius: 12px;
|
|
1197
|
+
background: var(--sc-tray-sunk, #efefed);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
.sc-runs-tile .sc-runtime-logo {
|
|
1201
|
+
width: 34px;
|
|
1202
|
+
height: 34px;
|
|
1203
|
+
border-radius: 9px;
|
|
1204
|
+
}
|
|
1205
|
+
.sc-runs-tile .sc-runtime-mark {
|
|
1206
|
+
width: 30px;
|
|
1207
|
+
height: 30px;
|
|
1208
|
+
}
|
|
1209
|
+
.sc-runs-tile .sc-runtime-letter {
|
|
1210
|
+
font-size: 19px;
|
|
1211
|
+
}
|
|
1212
|
+
.sc-runs-name {
|
|
1213
|
+
flex: 1;
|
|
1214
|
+
min-width: 0;
|
|
1215
|
+
overflow: hidden;
|
|
1216
|
+
text-overflow: ellipsis;
|
|
921
1217
|
white-space: nowrap;
|
|
1218
|
+
font-size: 16px;
|
|
1219
|
+
font-weight: 600;
|
|
1220
|
+
}
|
|
1221
|
+
.sc-runs-agent .sc-chev {
|
|
1222
|
+
flex: none;
|
|
1223
|
+
width: 16px;
|
|
1224
|
+
height: 16px;
|
|
1225
|
+
color: var(--sc-faint, #a1a1aa);
|
|
922
1226
|
}
|
|
923
1227
|
|
|
924
|
-
.sc-
|
|
925
|
-
|
|
1228
|
+
.sc-runs-told {
|
|
1229
|
+
flex: none;
|
|
1230
|
+
font-size: 14px;
|
|
1231
|
+
color: var(--sc-muted, #6b6b69);
|
|
926
1232
|
}
|
|
927
1233
|
|
|
928
|
-
.sc-
|
|
929
|
-
|
|
930
|
-
|
|
1234
|
+
.sc-runs-rule {
|
|
1235
|
+
display: block;
|
|
1236
|
+
height: 1px;
|
|
1237
|
+
background: var(--sc-line, #e9e9e7);
|
|
931
1238
|
}
|
|
932
1239
|
|
|
933
|
-
.sc-
|
|
934
|
-
|
|
935
|
-
|
|
1240
|
+
.sc-runs-model {
|
|
1241
|
+
display: flex;
|
|
1242
|
+
align-items: center;
|
|
1243
|
+
gap: 0;
|
|
1244
|
+
width: 100%;
|
|
1245
|
+
max-width: none;
|
|
1246
|
+
min-width: 0;
|
|
1247
|
+
}
|
|
1248
|
+
.sc-runs-model .sc-mp-cap,
|
|
1249
|
+
.sc-runs-key {
|
|
1250
|
+
flex: none;
|
|
1251
|
+
width: 58px;
|
|
1252
|
+
font-size: 15px;
|
|
1253
|
+
color: var(--sc-muted, #6b6b69);
|
|
1254
|
+
}
|
|
1255
|
+
.sc-runs-model .sc-mp-btn {
|
|
1256
|
+
flex: 1;
|
|
1257
|
+
justify-content: flex-start;
|
|
1258
|
+
gap: 14px;
|
|
1259
|
+
min-width: 0;
|
|
1260
|
+
height: auto;
|
|
1261
|
+
min-height: 44px;
|
|
1262
|
+
padding: 0;
|
|
1263
|
+
border-radius: 0;
|
|
1264
|
+
background: transparent;
|
|
1265
|
+
font-size: 15px;
|
|
1266
|
+
font-weight: 400;
|
|
1267
|
+
color: var(--sc-text, #1b1b1a);
|
|
1268
|
+
}
|
|
1269
|
+
.sc-runs-model .sc-mp-btn:hover:not(:disabled),
|
|
1270
|
+
.sc-runs-model .sc-mp-btn[aria-expanded="true"] {
|
|
1271
|
+
background: transparent;
|
|
1272
|
+
color: var(--sc-text, #1b1b1a);
|
|
1273
|
+
}
|
|
1274
|
+
.sc-runs-model .sc-mp-label {
|
|
1275
|
+
flex: 1;
|
|
1276
|
+
min-width: 0;
|
|
1277
|
+
overflow: hidden;
|
|
1278
|
+
text-overflow: ellipsis;
|
|
1279
|
+
white-space: nowrap;
|
|
1280
|
+
text-align: left;
|
|
1281
|
+
}
|
|
1282
|
+
.sc-runs-model .sc-mp-btn .sc-chev {
|
|
1283
|
+
flex: none;
|
|
1284
|
+
width: 16px;
|
|
1285
|
+
height: 16px;
|
|
1286
|
+
color: var(--sc-faint, #a1a1aa);
|
|
1287
|
+
}
|
|
1288
|
+
.sc-runs-model .sc-mp-btn .sc-chev-open {
|
|
1289
|
+
transform: none;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
.sc-runs-said {
|
|
1293
|
+
display: flex;
|
|
1294
|
+
align-items: center;
|
|
1295
|
+
gap: 0;
|
|
1296
|
+
min-height: 44px;
|
|
1297
|
+
font-size: 15px;
|
|
1298
|
+
}
|
|
1299
|
+
.sc-runs-val {
|
|
1300
|
+
flex: 1;
|
|
1301
|
+
min-width: 0;
|
|
1302
|
+
overflow: hidden;
|
|
1303
|
+
text-overflow: ellipsis;
|
|
1304
|
+
white-space: nowrap;
|
|
936
1305
|
}
|
|
937
1306
|
|
|
938
1307
|
.sc-pop {
|
|
@@ -942,8 +1311,9 @@ a.sc-btn {
|
|
|
942
1311
|
right: auto;
|
|
943
1312
|
bottom: auto;
|
|
944
1313
|
z-index: 2147483000;
|
|
945
|
-
|
|
946
|
-
|
|
1314
|
+
|
|
1315
|
+
width: min(92vw, 420px);
|
|
1316
|
+
max-width: min(92vw, 420px);
|
|
947
1317
|
|
|
948
1318
|
max-height: calc(100vh - 24px);
|
|
949
1319
|
overflow-y: auto;
|
|
@@ -959,11 +1329,6 @@ a.sc-btn {
|
|
|
959
1329
|
var(--sc-shadow-2);
|
|
960
1330
|
}
|
|
961
1331
|
|
|
962
|
-
.sc-pop > .sc-tray {
|
|
963
|
-
background: transparent;
|
|
964
|
-
border-radius: inherit;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
1332
|
@keyframes sc-pop-in {
|
|
968
1333
|
from {
|
|
969
1334
|
opacity: 0;
|
|
@@ -1026,6 +1391,8 @@ a.sc-btn {
|
|
|
1026
1391
|
|
|
1027
1392
|
--sc-ok: #4cb782;
|
|
1028
1393
|
--sc-warn: #f2994a;
|
|
1394
|
+
--sc-danger: #e4705a;
|
|
1395
|
+
--sc-warn-dot: #e0ad33;
|
|
1029
1396
|
|
|
1030
1397
|
--sc-tray: var(--sc-ground, #0f0f11);
|
|
1031
1398
|
--sc-tray-card: var(--sc-raised, #1d1d20);
|
|
@@ -1051,6 +1418,7 @@ a.sc-btn {
|
|
|
1051
1418
|
|
|
1052
1419
|
--sc-ok: #4cb782;
|
|
1053
1420
|
--sc-warn: #f2994a;
|
|
1421
|
+
--sc-danger: #e4705a;
|
|
1054
1422
|
|
|
1055
1423
|
--sc-tray: var(--sc-ground, #0f0f11);
|
|
1056
1424
|
--sc-tray-card: var(--sc-raised, #1d1d20);
|
|
@@ -1909,7 +2277,7 @@ a.sc-btn {
|
|
|
1909
2277
|
.sc-step-lead:focus-visible,
|
|
1910
2278
|
.sc-step-links a:focus-visible,
|
|
1911
2279
|
.sc-alt-link:focus-visible,
|
|
1912
|
-
.sc-runs-
|
|
2280
|
+
.sc-runs-agent:focus-visible,
|
|
1913
2281
|
.sc-mp-btn:focus-visible,
|
|
1914
2282
|
.sc-row-act:focus-visible,
|
|
1915
2283
|
.sc-disc:focus-visible,
|
|
@@ -3045,7 +3413,7 @@ li.sc-plan-row.sc-plan-current {
|
|
|
3045
3413
|
.sc-opt-has-warn {
|
|
3046
3414
|
color: var(--sc-warn, #b06f14);
|
|
3047
3415
|
}
|
|
3048
|
-
`,document.head.appendChild(e)}import{jsx as Oe,jsxs as st}from"react/jsx-runtime";function Ko(e){if(!e)return null;let n=pn(e);if(n==="payment_required"||n==="no_compute")return null;if(typeof e=="string")return e||null;let t=e,r=t.error?.message;return typeof r=="string"&&r?r:typeof t.message=="string"&&t.message?t.message:"The run ended with an error."}function ui(){return st("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[Oe("path",{d:"M8 5v4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),Oe("circle",{cx:"8",cy:"11.6",r:"0.9",fill:"currentColor"}),Oe("circle",{cx:"8",cy:"8",r:"6.4",stroke:"currentColor",strokeWidth:"1.3"})]})}function di({error:e,onRetry:n,onDismiss:t,title:r,className:o}){let s=Ko(e),a=B();return ci(()=>ot(),[]),s?Oe("div",{className:o?`soba-connect ${o}`:"soba-connect","data-theme":a.theme,role:"alert",children:st("div",{className:"sc-card sc-limit sc-run-error",children:[st("div",{className:"sc-limit-head",children:[Oe("span",{className:"sc-limit-mark sc-run-error-mark","aria-hidden":"true",children:Oe(ui,{})}),st("div",{children:[Oe("h2",{className:"sc-limit-title",children:r??"That run did not finish"}),Oe("p",{className:"sc-limit-body sc-run-error-message",children:s})]})]}),(t||n)&&st("div",{className:"sc-limit-actions",children:[t&&Oe("button",{type:"button",className:"sc-btn sc-btn-quiet",onClick:t,children:"Dismiss"}),n&&Oe("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:n,children:"Try again"})]})]})}):null}import{useId as pi,useState as _o}from"react";import{jsx as $,jsxs as Rt}from"react/jsx-runtime";function mi({reason:e}){return $("span",{className:"sc-limit-mark","aria-hidden":"true",children:e==="no_compute"?$(ht,{}):$(X,{})})}function hi(e){let{error:n,variant:t="card",onDismiss:r,className:o}=e,s=Qr(n,{predict:e.predict??!("error"in e)}),a=pi(),l=B();if(!s)return null;let i=$(gi,{offer:s,headingId:a,onDismiss:r});return t==="dialog"?$(qn,{open:!0,onClose:()=>r?.(),labelledBy:a,theme:l.theme,children:i}):$("div",{className:o?`soba-connect ${o}`:"soba-connect","data-theme":l.theme,children:i})}function gi({offer:e,headingId:n,onDismiss:t}){let{compute:r}=D(),[o,s]=_o(!1),[a,l]=_o(null),i=e.reason==="no_compute"&&r.connected&&!r.online,c=i||e.connectOffer!==null||!r.connected,u=rt();async function p(){s(!0),l(null);try{await e.upgrade()}catch(f){l(f.message)}finally{s(!1)}}return Rt("div",{className:"sc-card sc-limit",children:[Rt("div",{className:"sc-limit-head",children:[$(mi,{reason:e.reason}),Rt("div",{children:[$("h2",{className:"sc-limit-title",id:n,children:e.title}),$("p",{className:"sc-limit-body",children:e.body})]})]}),a&&$("p",{className:"sc-error",children:a}),i&&u.note&&$("p",{className:"sc-limit-note",children:u.note}),Rt("div",{className:"sc-limit-actions",children:[t&&$("button",{type:"button",className:"sc-btn sc-btn-quiet",onClick:t,disabled:o,children:"Not now"}),e.upgradeTo&&$("button",{type:"button",className:c?"sc-btn":"sc-btn sc-btn-primary",onClick:()=>void p(),disabled:o,children:o?"Opening\u2026":e.upgradeTo.selectable?`Switch to ${e.upgradeTo.name}`:`${e.upgradeTo.name} for $${e.upgradeTo.price.toLocaleString()}/${e.upgradeTo.interval}`}),c&&$("button",{type:"button",className:i?"sc-btn":"sc-btn sc-btn-primary",onClick:e.connect,disabled:o,children:i?"Connect another machine":"Connect compute"}),i&&$("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:u.open,disabled:o,children:"Open Soba App"})]})]})}import{useMemo as fi}from"react";function at(){let{plan:e,compute:n,connect:t}=D();return fi(()=>{let r=e.plan,o=e.current,s={plan:r,assignment:o,loading:e.loading,error:e.error,periodEnd:o?.period_end?new Date(o.period_end):null};if(!r)return{...s,state:"none",trialDaysLeft:null,ceiling:null,raised:!1,uncounted:!1,used:0,remaining:null,percent:null,unlimited:!1,reward:null,summary:"Nothing is assigned to this account, so runs are bounded by whatever the app allows."};let a=yi(o?.trial_ends_at??null),l=r.connected_reward==="included"&&n.connected&&r.connected_included_units!==null,i=l?r.connected_included_units:r.included_units,c=r.connected_reward==="unlimited"&&n.connected,u=i===null,p=e.used??0,f=i===null?null:Math.max(0,i-p),g=i&&i>0?Math.min(100,Math.round(p/i*100)):null,m=i!==null&&p>=i,y=a!==null?"trial":u?"unlimited":m?r.overage==="meter"?"metered":"spent":"within";return{...s,state:y,trialDaysLeft:a,ceiling:i,raised:l,uncounted:c,used:p,remaining:f,percent:g,unlimited:u,reward:Ai(r,l||c,n.connected,()=>t.open("manual")),summary:bi({plan:r,assignment:o,used:p,ceiling:i,trialDaysLeft:a,raised:l,uncounted:c,state:y})}},[e,n.connected,t])}function Ai(e,n,t,r){let o=We({unit:e.unit,reward:e.connected_reward,includedUnits:e.connected_included_units,creditMicros:e.connected_credit*1e6});return o?{line:o,inForce:n,required:!1,connected:t,actionable:He(e.connected_reward)&&!t,open:r}:xe(e.route_allow)&&!t?{line:"Nothing connected yet, so nothing can run.",inForce:!1,required:!0,connected:t,actionable:!0,open:r}:null}function bi(e){let{plan:n,assignment:t,used:r,ceiling:o,trialDaysLeft:s,raised:a,uncounted:l,state:i}=e,c=`${n.unit}${r===1?"":"s"}`,u=l?" Runs your own AI serves do not count toward it.":"";if(i==="trial"&&s!==null){let g=n.price===0?"it continues free":`it is $${n.price.toLocaleString()} a ${n.interval}`;return`${s} ${s===1?"day":"days"} left of your trial, then ${g}.`}if(i==="unlimited")return`${r.toLocaleString()} ${c} this period. No ceiling on this plan.`;if(i==="metered"){let g=r-(o??0);return n.overage_per_unit>0?`${g.toLocaleString()} past the allowance, billed at $${n.overage_per_unit} a ${n.unit}.${u}`:`${g.toLocaleString()} past the allowance.${u}`}if(i==="spent")return t?.period_end?`Allowance spent. It comes back on ${$o(t.period_end)}.${u}`:`Allowance spent. It comes back at the start of the next period.${u}`;let p=Math.max(0,(o??0)-r),f=a?` Raised from ${(n.included_units??0).toLocaleString()} while your own AI is connected.`:t?.period_end?` Resets ${$o(t.period_end)}.`:"";return`${p.toLocaleString()} of ${(o??0).toLocaleString()} ${n.unit}s left.${f}${u}`}function yi(e){if(!e)return null;let n=new Date(e).getTime()-Date.now();return Number.isNaN(n)||n<=0?null:Math.max(1,Math.ceil(n/864e5))}function $o(e){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString(void 0,{day:"numeric",month:"long"})}import{Fragment as Ci,jsx as ee,jsxs as Re}from"react/jsx-runtime";function Zr({heading:e="Current plan",showUsage:n=!0,showName:t=!0,className:r}){let o=at(),{theme:s}=B(),a=f=>ee("section",{className:r?`soba-connect sc-fill ${r}`:"soba-connect sc-fill","data-theme":s,children:Re("div",{className:"sc-card sc-current",children:[e&&ee("h2",{className:"sc-section-title",children:e}),f]})});if(o.error)return a(ee("p",{className:"sc-error",children:o.error.message}));if(o.loading)return a(ee("p",{className:"sc-note",children:"Loading\u2026"}));if(!o.plan)return a(Re("div",{className:"sc-current-main",children:[ee("p",{className:"sc-current-name",children:"No plan"}),ee("p",{className:"sc-sub",children:o.summary})]}));let{plan:l,trialDaysLeft:i,percent:c,unlimited:u,reward:p}=o;return a(Re(Ci,{children:[Re("div",{className:"sc-current-grid",children:[(t||i!==null)&&Re("div",{className:"sc-current-main",children:[t?Re("p",{className:"sc-current-name",children:[l.name,i!==null&&Re("span",{className:"sc-trial-badge",children:[i," ",i===1?"day":"days"," left"]})]}):i!==null&&ee("p",{className:"sc-current-trial",children:Re("span",{className:"sc-trial-badge",children:[i," ",i===1?"day":"days"," left"]})}),t&&l.description&&ee("p",{className:"sc-sub",children:l.description})]}),n&&Re("div",{className:"sc-usage",children:[Re("div",{className:"sc-row-between",children:[ee("span",{className:"sc-fact-key",children:"Usage"}),ee("span",{className:c!==null&&c>=100?"sc-usage-figure sc-usage-over":"sc-usage-figure",children:u?"Unlimited":c===null?"Metered":`${c}% used`})]}),c!==null&&ee("div",{className:"sc-meter",role:"presentation",children:c>0&&ee("span",{className:c>=100?"sc-meter-fill sc-meter-full":"sc-meter-fill",style:{width:`${c}%`}})}),ee("p",{className:"sc-usage-line",children:o.summary})]})]}),p&&Re("div",{className:"sc-current-foot",children:[ee("p",{className:p.required?"sc-plan-reward-line sc-plan-reward-need":p.inForce?"sc-plan-reward-line":"sc-plan-reward-line sc-plan-reward-open",children:p.required?p.line:p.inForce?`In force: ${wi(p.line)}.`:p.line}),(p.actionable||p.connected)&&ee(dn,{})]})]}))}var wi=e=>e.charAt(0).toLowerCase()+e.slice(1);import{useCallback as vi,useMemo as ki,useState as es}from"react";var Ni={"user-hardware":"your own machine","user-subscription":"your own AI subscription","open-weights":"open models we host",frontier:"frontier models"},xi=new Set(["user-hardware","user-subscription"]);function Xr(e={}){let{plan:n,compute:t,connect:r}=D(),[o,s]=es(null),[a,l]=es(null),{featured:i,onSelect:c,successUrl:u,cancelUrl:p}=e,f=vi(async m=>{s(m.id),l(null);try{if(m.selectable)await n.select(m.id);else if(c)c(m);else{let y=await n.checkout(m.id,{...u?{successUrl:u}:{},...p?{cancelUrl:p}:{}});window.location.assign(y);return}}catch(y){throw l(y.message),y}finally{(m.selectable||c)&&s(null)}},[n,c,u,p]),g=ki(()=>n.plans.map(m=>{let y=n.current?.plan_id===m.id;return{plan:m,current:y,featured:i===m.id&&!y,price:Ri(m),allowance:m.included_units===null?`Unlimited ${m.unit}s`:`${m.included_units.toLocaleString()} ${m.unit}${m.included_units===1?"":"s"}`,allowanceNote:Si(m),computeLabel:m.route_allow===null?"any compute":m.route_allow.length===0?"no compute":null,compute:(m.route_allow??[]).map(R=>({costClass:R,label:Ni[R]??R,owned:xi.has(R),runtimes:Jt(R).map(S=>S.id)})),connect:Pi(m,y,t.connected,()=>r.open("manual")),cta:{label:Mi(m,y,o===m.id),disabled:y||o!==null,busy:o===m.id,take:()=>f(m)}}}),[n.plans,n.current,i,t.connected,r,o,f]);return{offers:g,current:g.find(m=>m.current)??null,loading:n.loading,error:n.error,failed:a}}function Ri(e){return e.price===0?{amount:"Free",interval:null,free:!0}:{amount:`$${e.price.toLocaleString()}`,interval:e.interval,free:!1}}function Si(e){let n=[];return e.included_units===null?n.push("No ceiling on this plan"):(n.push(`Included each ${e.interval}`),e.overage==="meter"&&e.overage_per_unit>0?n.push(`then $${e.overage_per_unit} a ${e.unit}`):e.included_units>0&&n.push(`then ${e.unit}s stop`)),e.trial_days>0&&n.push(`${e.trial_days}-day trial`),n.join(" \xB7 ")}function Pi(e,n,t,r){let o=We({unit:e.unit,reward:e.connected_reward,includedUnits:e.connected_included_units,creditMicros:e.connected_credit*1e6}),s=xe(e.route_allow)&&!t;if(!o&&!s)return null;let a=He(e.connected_reward);return{key:o?"Connect your own":"To use this",line:o??(n?"Nothing connected yet, so nothing can run.":"Runs only on compute you connect."),reward:o!==null,actionable:n&&(a||s)&&!t,open:r}}function Mi(e,n,t){return n?"Your plan":t?e.selectable?"Switching\u2026":"Opening\u2026":e.selectable?"Choose":`Subscribe for $${e.price.toLocaleString()}/${e.interval}`}import{jsx as b,jsxs as G}from"react/jsx-runtime";function St(e){return e?`soba-connect sc-fill ${e}`:"soba-connect sc-fill"}function Kr({onSelect:e,successUrl:n,cancelUrl:t,showCompute:r=!0,showConnect:o=!1,variant:s="cards",featured:a,className:l}){let{offers:i,loading:c,error:u,failed:p}=Xr({...a?{featured:a}:{},...e?{onSelect:e}:{},...n?{successUrl:n}:{},...t?{cancelUrl:t}:{}}),{theme:f}=B();if(u)return b("div",{className:St(l),"data-theme":f,children:b("div",{className:"sc-card",children:b("p",{className:"sc-error",children:u.message})})});if(c)return b("div",{className:St(l),"data-theme":f,children:b("div",{className:"sc-card",children:b("p",{className:"sc-note",children:"Loading plans\u2026"})})});if(i.length===0)return b("div",{className:St(l),"data-theme":f,children:b("div",{className:"sc-card",children:b("p",{className:"sc-note",children:"This app has no plans yet."})})});let g={showCompute:r,showConnect:o};return G("div",{className:St(l),"data-theme":f,"data-variant":s,children:[s==="rows"?b(Ii,{offers:i,shelf:g}):s==="table"?b(Oi,{offers:i,shelf:g}):b(Ei,{offers:i,shelf:g}),p&&b("p",{className:"sc-error",children:p})]})}function Ei({offers:e,shelf:n}){return b("div",{className:"sc-plans",children:e.map(t=>G("div",{className:ns("sc-plan",t),children:[G("div",{className:"sc-row-between",children:[b("span",{className:"sc-title",children:t.plan.name}),b(_r,{offer:t})]}),b("p",{className:"sc-sub",children:t.plan.description}),b($r,{price:t.price,free:"forever"}),b(to,{offer:t,shelf:n}),b(ts,{offer:t}),b("div",{className:"sc-plan-band",children:n.showCompute&&b(no,{offer:t})}),b("div",{className:"sc-plan-band",children:b(eo,{offer:t})})]},t.plan.id))})}function Ii({offers:e,shelf:n}){return b("ul",{className:"sc-plan-rows",children:e.map(t=>G("li",{className:ns("sc-plan-row",t),children:[G("div",{className:"sc-row-main",children:[G("span",{className:"sc-row-name",children:[b("span",{className:"sc-title",children:t.plan.name}),b(_r,{offer:t})]}),t.plan.description&&b("p",{className:"sc-sub",children:t.plan.description}),b(ts,{offer:t}),n.showCompute&&b(no,{offer:t,inline:!0}),b(eo,{offer:t,inline:!0})]}),G("div",{className:"sc-row-side",children:[b($r,{price:t.price,free:"forever",small:!0}),b(to,{offer:t,shelf:n})]})]},t.plan.id))})}function Oi({offers:e,shelf:n}){let t=e.some(a=>a.plan.overage_per_unit>0),r=e.some(a=>a.plan.trial_days>0),o=e.some(a=>a.connect!==null),s=a=>[a.current?"sc-col-current":"",a.featured?"sc-col-featured":""].filter(Boolean).join(" ")||void 0;return b("div",{className:"sc-table-scroll",children:G("table",{className:"sc-plan-table",children:[b("thead",{children:G("tr",{children:[b("td",{}),e.map(a=>G("th",{scope:"col",className:s(a),children:[G("span",{className:"sc-row-name",children:[b("span",{className:"sc-title",children:a.plan.name}),b(_r,{offer:a})]}),b($r,{price:a.price,small:!0})]},a.plan.id))]})}),G("tbody",{children:[G("tr",{children:[b("th",{scope:"row",children:"Included"}),e.map(a=>b("td",{className:s(a),children:a.allowance},a.plan.id))]}),t&&G("tr",{children:[b("th",{scope:"row",children:"Then"}),e.map(a=>b("td",{className:s(a),children:a.plan.overage_per_unit>0?`$${a.plan.overage_per_unit} / ${a.plan.unit}`:b("span",{className:"sc-muted-cell",children:"Stops"})},a.plan.id))]}),r&&G("tr",{children:[b("th",{scope:"row",children:"Trial"}),e.map(a=>b("td",{className:s(a),children:a.plan.trial_days>0?`${a.plan.trial_days} days`:b("span",{className:"sc-muted-cell",children:"None"})},a.plan.id))]}),n.showCompute&&G("tr",{children:[b("th",{scope:"row",children:"Runs on"}),e.map(a=>b("td",{className:s(a),children:b(no,{offer:a,bare:!0})},a.plan.id))]}),o&&G("tr",{children:[b("th",{scope:"row",children:"Connect your own"}),e.map(a=>b("td",{className:s(a),children:b(eo,{offer:a,bare:!0})},a.plan.id))]}),G("tr",{className:"sc-table-buy",children:[b("td",{}),e.map(a=>b("td",{className:s(a),children:b(to,{offer:a,shelf:n})},a.plan.id))]})]})]})})}function ns(e,n){return[e,n.current?"sc-plan-current":"",n.featured?"sc-plan-featured":""].filter(Boolean).join(" ")}function _r({offer:e}){return e.current?b("span",{className:"sc-plan-badge",children:"Current"}):e.featured?b("span",{className:"sc-plan-badge-soft",children:"Recommended"}):null}function $r({price:e,small:n,free:t}){return G("p",{className:n?"sc-plan-price sc-plan-price-sm":"sc-plan-price",children:[b("span",{className:"sc-plan-amount",children:e.amount}),e.interval?G("span",{className:"sc-plan-interval",children:["/",e.interval]}):t&&b("span",{className:"sc-plan-interval sc-plan-after",children:t})]})}function ts({offer:e}){return G("p",{className:"sc-plan-allowance",children:[b("span",{className:"sc-plan-figure",children:e.allowance}),b("span",{className:"sc-plan-qualifier",children:e.allowanceNote})]})}function eo({offer:e,inline:n,bare:t}){let r=e.connect;if(!r)return t?b("span",{className:"sc-muted-cell",children:"None"}):null;let o=r.reward?"sc-plan-reward-line":"sc-plan-reward-line sc-plan-reward-need",s=r.actionable?G("button",{type:"button",className:`${o} sc-plan-reward-act`,"aria-label":"Connect compute",onClick:r.open,children:[b("span",{className:"sc-reward-said",children:r.line}),G("span",{className:"sc-reward-do","aria-hidden":!0,children:[b(X,{className:"sc-reward-mark"}),"Connect compute"]})]}):b("p",{className:o,children:r.line});return t?s:b("div",{className:n?"sc-plan-reward sc-plan-reward-inline":"sc-plan-reward",children:s})}function no({offer:e,inline:n,bare:t}){let r=e.computeLabel?b("ul",{className:n?"sc-compute sc-compute-inline":"sc-compute",children:b("li",{children:e.computeLabel})}):b("ul",{className:n?"sc-compute sc-compute-inline":"sc-compute",children:e.compute.map(o=>G("li",{className:o.owned?"sc-compute-own":void 0,children:[o.label,b(Li,{runtimes:o.runtimes})]},o.costClass))});return t?r:G("div",{className:n?"sc-plan-compute sc-plan-compute-inline":"sc-plan-compute",children:[b("span",{className:"sc-fact-key",children:"Runs on"}),r]})}function to({offer:e,shelf:n}){let t=e.connect;return n.showConnect&&t?.actionable?G("button",{type:"button",className:"sc-btn sc-btn-primary sc-btn-icon",onClick:t.open,children:[b(X,{className:"sc-btn-mark"}),"Connect compute"]}):b("button",{type:"button",className:e.current?"sc-btn":"sc-btn sc-btn-primary",disabled:e.cta.disabled,onClick:()=>void e.cta.take().catch(()=>{}),children:e.cta.label})}function Li({runtimes:e}){return e.length===0?null:b("span",{className:"sc-compute-marks",children:e.map(n=>{let t=Ye[n];return t?b(t,{className:"sc-rt-mark"},n):null})})}import{jsx as ro,jsxs as rs}from"react/jsx-runtime";function Ti({heading:e,plansHeading:n,showUsage:t=!0,showName:r=!0,className:o,...s}){let{plan:a,loading:l}=at(),{theme:i}=B(),c=n??(l?"Plans":a?"Change plan":"Choose a plan");return rs("div",{className:o?`soba-connect sc-fill sc-billing ${o}`:"soba-connect sc-fill sc-billing","data-theme":i,children:[ro(Zr,{...e===void 0?{}:{heading:e},showUsage:t,showName:r}),rs("section",{className:"sc-billing-plans",children:[c&&ro("h2",{className:"sc-section-title",children:c}),ro(Kr,{...s})]})]})}import{useCallback as os,useState as ss}from"react";function oo({plan:e,successUrl:n,cancelUrl:t,label:r}){let{plan:o}=D(),[s,a]=ss(!1),[l,i]=ss(null),c=os(()=>o.checkout(e.id,{...n?{successUrl:n}:{},...t?{cancelUrl:t}:{}}),[o,e.id,n,t]),u=os(async()=>{a(!0),i(null);try{window.location.assign(await c())}catch(p){i(p.message),a(!1)}},[c]);return{label:s?"Opening\u2026":r??`Subscribe for $${e.price.toLocaleString()}/${e.interval}`,busy:s,error:l,buy:u,session:c}}import{jsx as as,jsxs as Gi}from"react/jsx-runtime";function Bi({plan:e,successUrl:n,cancelUrl:t,label:r,className:o}){let{theme:s}=B(),a=oo({plan:e,...n?{successUrl:n}:{},...t?{cancelUrl:t}:{},...r?{label:r}:{}});return Gi("div",{className:o?`soba-connect ${o}`:"soba-connect","data-theme":s,children:[as("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:a.busy,onClick:()=>void a.buy(),children:a.label}),a.error&&as("p",{className:"sc-error",children:a.error})]})}import{useCallback as Le,useEffect as Ze,useMemo as On,useRef as Xe,useState as ne}from"react";var Wi="soba.session:";function is(e){return!e.cacheKey||!e.endpoint?null:Wi+JSON.stringify([e.endpoint,e.user??null,e.cacheKey])}function Hi(e){try{let n=globalThis.localStorage?.getItem(e);if(!n)return null;let t=JSON.parse(n);return typeof t.token!="string"||typeof t.expiresAt!="number"?null:{token:t.token,expiresAt:t.expiresAt}}catch{return null}}function Di(e,n){try{n?globalThis.localStorage?.setItem(e,JSON.stringify(n)):globalThis.localStorage?.removeItem(e)}catch{}}var ls=6e4,Ui=1e4,Pt=class{#e;#n=null;#r=null;#t;#o=new Set;constructor(n){this.#t=n,this.#e=n.token??null;let t=is(n),r=t&&!this.#e?Hi(t):null;r&&r.expiresAt-ls>Date.now()&&(this.#e=r.token,this.#n=r.expiresAt)}get token(){return this.#e}get expiresAt(){return this.#n}get canRefresh(){return!!this.#t.endpoint}get refreshAt(){return!this.canRefresh||this.#n===null?null:Math.max(Date.now()+Ui,this.#n-ls)}subscribe(n){return this.#o.add(n),()=>this.#o.delete(n)}async ensure(){return this.#e?this.#e:this.refresh()}async refresh(){if(this.#r)return this.#r;let n=this.#t.endpoint;if(!n)throw new Error("This Soba session cannot be refreshed. Pass `sessionEndpoint` so the provider can mint a new one.");let t=this.#t.fetchImpl??fetch.bind(globalThis);this.#r=(async()=>{let r=await t(n,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify(this.#t.user?{user:this.#t.user}:{})});if(!r.ok)throw new Error(`Could not start a Soba session (${r.status} from ${n}).`);let o=await r.json(),s=o.session??o.token;if(!s)throw new Error(`${n} answered without a \`session\`. See @soba-so/react's README.`);let a=o.expires_in??o.expiresIn;this.#e=s,this.#n=typeof a=="number"?Date.now()+a*1e3:null;let l=is(this.#t);l&&Di(l,this.#n===null?null:{token:s,expiresAt:this.#n});for(let i of this.#o)i();return s})();try{return await this.#r}finally{this.#r=null}}},In=new Map,cs=new WeakMap,Fi=1;function Qi(e){if(e.token||!e.endpoint)return null;let n=0;return e.fetchImpl&&(n=cs.get(e.fetchImpl)??Fi++,cs.set(e.fetchImpl,n)),JSON.stringify([e.endpoint,e.user??null,n,e.cacheKey??null])}function us(e){let n=Qi(e);if(!n)return new Pt(e);let t=In.get(n)??{holder:new Pt(e),users:0};return In.set(n,t),t.holder}function ds(e){for(let n of In.values())n.holder===e&&n.users++}function ps(e){for(let[n,t]of In)if(t.holder===e){setTimeout(()=>{--t.users<=0&&In.get(n)===t&&In.delete(n)},0);return}}function ms(e,n=fetch.bind(globalThis)){return async(t,r)=>{let o=await n(t,r);if(o.status!==401||!e.canRefresh)return o;let s;try{s=await e.refresh()}catch{return o}return n(t,Ji(r,s))}}function Ji(e,n){let t=new Headers(e?.headers);return t.set("authorization",`Bearer ${n}`),{...e,headers:t}}import{jsx as so,jsxs as zi}from"react/jsx-runtime";var Vi="https://www.soba.so",Yi=3e4;function ji(e){let{children:n,session:t,sessionEndpoint:r,user:o,sessionCacheKey:s,runEndpoint:a,theme:l,initialMachines:i,initialConnect:c=null,initialPlans:u,initialCurrentPlan:p=null,baseUrl:f=Vi,pollMs:g=Yi,injectStyles:m=!0,modal:y=!0,fetchImpl:R,onError:S}=e,[k,W]=ne(t??null),[F,O]=ne(null),[P,Q]=ne(c),[T,K]=ne(null),[q,de]=ne(c===null),[V,M]=ne(i??[]),[De,Y]=ne(null),[pe,Ke]=ne(i===void 0),[Se,me]=ne(u??[]),[te,mn]=ne(p),[Ue,Fe]=ne(null),[ie,he]=ne(u===void 0),[re,Qe]=ne(null),[hn,Pe]=ne(!1),Te=Xe(S);Te.current=S;let oe=Le(C=>{O(C),Te.current?.(C)},[]);Ze(()=>{m&&ot()},[m]);let w=On(()=>us({...t?{token:t}:{},...r?{endpoint:r}:{},...o?{user:o}:{},...R?{fetchImpl:R}:{},...s?{cacheKey:s}:{}}),[t,r,o,R,s]);Ze(()=>{let C=!0;ds(w);let Z=w.subscribe(()=>{C&&W(w.token)});return!w.token&&!w.canRefresh?oe(new Error("<SobaProvider> needs a `session` or a `sessionEndpoint`. A browser cannot mint one: that takes your secret key.")):w.ensure().then(()=>C&&W(w.token),le=>C&&oe(le)),()=>{C=!1,Z(),ps(w)}},[w,oe]),Ze(()=>{F&&(de(!1),Ke(!1),he(!1),K(C=>C??F),Y(C=>C??F),Fe(C=>C??F))},[F]),Ze(()=>{let C=w.refreshAt;if(C===null)return;let Z=()=>{w.refresh().catch(Ae=>oe(Ae))},le=()=>{document.hidden||(document.removeEventListener("visibilitychange",le),Z())},dt=setTimeout(()=>{typeof document<"u"&&document.hidden?document.addEventListener("visibilitychange",le):Z()},Math.max(0,C-Date.now()));return()=>{clearTimeout(dt),typeof document<"u"&&document.removeEventListener("visibilitychange",le)}},[w,oe,k]);let j=Xe(c?.machines_url??null),E=On(()=>{if(!k)return null;let C=new Tn({session:k,baseUrl:f,fetchImpl:ms(w,R??fetch.bind(globalThis))});return C.setMachinesUrl(j.current),C},[k,f,w,R]),Mt=Xe(c!==null);Ze(()=>{if(!E||Mt.current)return;let C=!0;return de(!0),E.context().then(Z=>{C&&(Q(Z),K(null),de(!1))},Z=>{C&&(K(Z),de(!1))}),()=>{C=!1}},[E]);let Je=Le(async()=>{if(E)try{let C=await E.machines();M(Array.isArray(C)?C:[]),Y(null)}catch(C){Y(C)}finally{Ke(!1)}},[E]),ge=Le(async()=>{if(E)try{let C=await E.plans();me(C.plans),mn(C.current),Fe(null)}catch(C){Fe(C)}finally{he(!1)}},[E]),se=Xe(!1),[Ve,gn]=ne(!1),fn=Xe(u!==void 0),_e=Xe(!1),$e=Le(()=>{se.current||(se.current=!0,_e.current&&queueMicrotask(()=>{_e.current&&gn(!0)}))},[]);Ze(()=>(_e.current=!0,se.current&&gn(!0),()=>{_e.current=!1}),[]),Ze(()=>{!E||!Ve||fn.current||ge()},[E,Ve,ge]);let en=Le(async C=>{if(!E)throw new Error("No session yet.");await E.selectPlan(C),await ge()},[E,ge]),Et=Le(async(C,Z)=>{if(!E)throw new Error("No session yet.");let le=await E.checkoutPlan(C,Z);if(!le.url)throw new Error("Checkout could not be started.");return le.url},[E]),it=Le(async()=>{if(!E)throw new Error("No session yet.");await E.leavePlan(),await ge()},[E,ge]),lt=Xe(i!==void 0);Ze(()=>{if(!E)return;let C=Ce(Je,g,{immediate:!lt.current});return lt.current=!1,C},[E,Je,g]);let An=Le((C="manual")=>{y&&(Pe(!0),Qe(C))},[y]),ct=Le(()=>Qe(null),[]),z=Xe(V);z.current=V;let Me=Le(async C=>{if(!a)throw new Error("Pass `runEndpoint` to <SobaProvider> to start runs from the browser. It is your own route: it holds your secret key, calls soba.run(), and forwards the stream.");let{signal:Z,...le}=C,Ae=await(R??fetch.bind(globalThis))(a,{method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream"},credentials:"same-origin",body:JSON.stringify(le),...Z?{signal:Z}:{}});if(!Ae.ok){let Be=await Ae.json().catch(()=>null),be=new Error(Be?.error?.message??`${a} answered ${Ae.status}.`);be.status=Ae.status,Be?.error?.code&&(be.code=Be.error.code),Be?.error&&(be.error=Be.error);let pt=z.current.length>0&&!z.current.some(Ot=>Ot.state!=="offline");throw Ae.status===409&&pt&&An("no_compute"),be}let ve=Yr(Ae);return async function*(){try{yield*ve}finally{se.current&&ge()}}()},[a,R,ge,An]),fe=On(()=>te?Se.find(C=>C.id===te.plan_id)??null:null,[Se,te]),nn=On(()=>fe?fe.connected_reward==="included"&&V.length>0&&fe.connected_included_units!==null?fe.connected_included_units:fe.included_units:null,[fe,V]),ut=On(()=>({plans:Se,current:te,plan:fe,used:te?.units_used??null,included:nn,remaining:nn!==null&&te?Math.max(0,nn-te.units_used):null,unlimited:fe!==null&&nn===null,loading:ie,error:Ue,select:en,checkout:Et,leave:it,refresh:ge}),[Se,te,fe,nn,ie,Ue,en,Et,it,ge]),It=On(()=>({session:k,client:E,error:F,get plan(){return $e(),ut},compute:{machines:V,connected:V.length>0,online:V.some(C=>C.state!=="offline"),loading:pe,error:De,refresh:Je},connect:{app:P?.app??null,command:P?.command??null,connectUrl:P?.connect_url??null,publishableKey:P?.publishable_key??null,loading:q,error:T,open:An,close:ct,isOpen:re!==null,hasModal:y},run:Me}),[k,E,F,ut,$e,re,An,ct,y,V,pe,De,Je,P,q,T,Me]);return so(Or.Provider,{value:E,children:so(Lr.Provider,{value:{context:P,machines:pe?void 0:V,theme:l??P?.theme??"light"},children:zi(Tr.Provider,{value:It,children:[n,y&&hn&&so(nt,{open:re!==null,onOpenChange:C=>Qe(C?re??"manual":null),onConnected:()=>{Je()},...re==="payment_required"||re==="no_compute"?{reason:re}:{},...re==="pair"?{showStatus:!1}:{}})]})})})}function qi(e){return e?Zi[e]??e:null}var Zi={"user-hardware":"your own computer","user-subscription":"your own AI plan","user-api-key":"your own API key","open-weights":"open models we host",frontier:"a frontier model we pay for"};async function Xi(e,n,t){let r=n.local;if(!r?.session||n.after)return null;let o=/\/v1\/runs\/([^/]+)\/events/.exec(e.url)?.[1];if(!o)return null;let s=`http://127.0.0.1:${r.port??47321}/v1/runs/${o}/events`,a=new AbortController,l=()=>a.abort();n.signal?.addEventListener("abort",l);let i=setTimeout(()=>a.abort(),r.timeoutMs??3e3);try{let c=await t(s,{headers:{authorization:`Bearer ${r.session}`,accept:"text/event-stream"},signal:a.signal});return c.ok?{url:s,bearer:r.session,open:c}:null}catch{return null}finally{clearTimeout(i),n.signal?.removeEventListener("abort",l)}}async function*Ki(e){let n=e.body;if(!n)return;let t=n.getReader(),r=new TextDecoder,o="",s=null,a=[];try{for(;;){let l=await t.read();if(l.done)return;o+=r.decode(l.value,{stream:!0});for(let i=o.indexOf(`
|
|
3416
|
+
`,document.head.appendChild(e)}import{jsx as Ue,jsxs as ht}from"react/jsx-runtime";function _o(e){if(!e)return null;let n=wn(e);if(n==="payment_required"||n==="no_compute")return null;if(typeof e=="string")return e||null;let t=e,r=t.error?.message;return typeof r=="string"&&r?r:typeof t.message=="string"&&t.message?t.message:"The run ended with an error."}function gi(){return ht("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[Ue("path",{d:"M8 5v4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),Ue("circle",{cx:"8",cy:"11.6",r:"0.9",fill:"currentColor"}),Ue("circle",{cx:"8",cy:"8",r:"6.4",stroke:"currentColor",strokeWidth:"1.3"})]})}function Ai({error:e,onRetry:n,onDismiss:t,title:r,className:o}){let a=_o(e),s=H();return fi(()=>mt(),[]),a?Ue("div",{className:o?`soba-connect ${o}`:"soba-connect","data-theme":s.theme,role:"alert",children:ht("div",{className:"sc-card sc-limit sc-run-error",children:[ht("div",{className:"sc-limit-head",children:[Ue("span",{className:"sc-limit-mark sc-run-error-mark","aria-hidden":"true",children:Ue(gi,{})}),ht("div",{children:[Ue("h2",{className:"sc-limit-title",children:r??"That run did not finish"}),Ue("p",{className:"sc-limit-body sc-run-error-message",children:a})]})]}),(t||n)&&ht("div",{className:"sc-limit-actions",children:[t&&Ue("button",{type:"button",className:"sc-btn sc-btn-quiet",onClick:t,children:"Dismiss"}),n&&Ue("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:n,children:"Try again"})]})]})}):null}import{useId as bi,useState as $o}from"react";import{jsx as re,jsxs as Wt}from"react/jsx-runtime";function yi({reason:e}){return re("span",{className:"sc-limit-mark","aria-hidden":"true",children:e==="no_compute"?re(xt,{}):re(q,{})})}function wi(e){let{error:n,variant:t="card",onDismiss:r,className:o}=e,a=zr(n,{predict:e.predict??!("error"in e)}),s=bi(),c=H();if(!a)return null;let i=re(Ci,{offer:a,headingId:s,onDismiss:r});return t==="dialog"?re(st,{open:!0,onClose:()=>r?.(),labelledBy:s,theme:c.theme,children:i}):re("div",{className:o?`soba-connect ${o}`:"soba-connect","data-theme":c.theme,children:i})}function Ci({offer:e,headingId:n,onDismiss:t}){let{compute:r}=Q(),[o,a]=$o(!1),[s,c]=$o(null),i=e.reason==="no_compute"&&r.connected&&!r.online,l=i||e.connectOffer!==null||!r.connected,u=pt();async function m(){a(!0),c(null);try{await e.upgrade()}catch(b){c(b.message)}finally{a(!1)}}return Wt("div",{className:"sc-card sc-limit",children:[Wt("div",{className:"sc-limit-head",children:[re(yi,{reason:e.reason}),Wt("div",{children:[re("h2",{className:"sc-limit-title",id:n,children:e.title}),re("p",{className:"sc-limit-body",children:e.body})]})]}),s&&re("p",{className:"sc-error",children:s}),i&&u.note&&re("p",{className:"sc-limit-note",children:u.note}),Wt("div",{className:"sc-limit-actions",children:[t&&re("button",{type:"button",className:"sc-btn sc-btn-quiet",onClick:t,disabled:o,children:"Not now"}),e.upgradeTo&&re("button",{type:"button",className:l?"sc-btn":"sc-btn sc-btn-primary",onClick:()=>void m(),disabled:o,children:o?"Opening\u2026":e.upgradeTo.selectable?`Switch to ${e.upgradeTo.name}`:`${e.upgradeTo.name} for $${e.upgradeTo.price.toLocaleString()}/${e.upgradeTo.interval}`}),l&&re("button",{type:"button",className:i?"sc-btn":"sc-btn sc-btn-primary",onClick:e.connect,disabled:o,children:i?"Connect another machine":"Connect compute"}),i&&re("button",{type:"button",className:"sc-btn sc-btn-primary",onClick:u.open,disabled:o,children:"Open Soba App"})]})]})}import{useMemo as vi}from"react";function ft(){let{plan:e,compute:n,connect:t}=Q();return vi(()=>{let r=e.plan,o=e.current,a={plan:r,assignment:o,loading:e.loading,error:e.error,periodEnd:o?.period_end?new Date(o.period_end):null};if(!r)return{...a,state:"none",trialDaysLeft:null,ceiling:null,raised:!1,uncounted:!1,used:0,remaining:null,percent:null,unlimited:!1,reward:null,summary:"Nothing is assigned to this account, so runs are bounded by whatever the app allows."};let s=xi(o?.trial_ends_at??null),c=r.connected_reward==="included"&&n.connected&&r.connected_included_units!==null,i=c?r.connected_included_units:r.included_units,l=r.connected_reward==="unlimited"&&n.connected,u=i===null,m=e.used??0,b=i===null?null:Math.max(0,i-m),g=i&&i>0?Math.min(100,Math.round(m/i*100)):null,h=i!==null&&m>=i,y=s!==null?"trial":u?"unlimited":h?r.overage==="meter"?"metered":"spent":"within";return{...a,state:y,trialDaysLeft:s,ceiling:i,raised:c,uncounted:l,used:m,remaining:b,percent:g,unlimited:u,reward:ki(r,c||l,n.connected,()=>t.open("manual")),summary:Ni({plan:r,assignment:o,used:m,ceiling:i,trialDaysLeft:s,raised:c,uncounted:l,state:y})}},[e,n.connected,t])}function ki(e,n,t,r){let o=Ve({unit:e.unit,reward:e.connected_reward,includedUnits:e.connected_included_units,creditMicros:e.connected_credit*1e6});return o?{line:o,inForce:n,required:!1,connected:t,actionable:Je(e.connected_reward)&&!t,open:r}:Le(e.route_allow)&&!t?{line:"Nothing connected yet, so nothing can run.",inForce:!1,required:!0,connected:t,actionable:!0,open:r}:null}function Ni(e){let{plan:n,assignment:t,used:r,ceiling:o,trialDaysLeft:a,raised:s,uncounted:c,state:i}=e,l=`${n.unit}${r===1?"":"s"}`,u=c?" Runs your own AI serves do not count toward it.":"";if(i==="trial"&&a!==null){let g=n.price===0?"it continues free":`it is $${n.price.toLocaleString()} a ${n.interval}`;return`${a} ${a===1?"day":"days"} left of your trial, then ${g}.`}if(i==="unlimited")return`${r.toLocaleString()} ${l} this period. No ceiling on this plan.`;if(i==="metered"){let g=r-(o??0);return n.overage_per_unit>0?`${g.toLocaleString()} past the allowance, billed at $${n.overage_per_unit} a ${n.unit}.${u}`:`${g.toLocaleString()} past the allowance.${u}`}if(i==="spent")return t?.period_end?`Allowance spent. It comes back on ${es(t.period_end)}.${u}`:`Allowance spent. It comes back at the start of the next period.${u}`;let m=Math.max(0,(o??0)-r),b=s?` Raised from ${(n.included_units??0).toLocaleString()} while your own AI is connected.`:t?.period_end?` Resets ${es(t.period_end)}.`:"";return`${m.toLocaleString()} of ${(o??0).toLocaleString()} ${n.unit}s left.${b}${u}`}function xi(e){if(!e)return null;let n=new Date(e).getTime()-Date.now();return Number.isNaN(n)||n<=0?null:Math.max(1,Math.ceil(n/864e5))}function es(e){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString(void 0,{day:"numeric",month:"long"})}import{Fragment as Si,jsx as oe,jsxs as Te}from"react/jsx-runtime";function Kr({heading:e="Current plan",showUsage:n=!0,showName:t=!0,className:r}){let o=ft(),{theme:a}=H(),s=b=>oe("section",{className:r?`soba-connect sc-fill ${r}`:"soba-connect sc-fill","data-theme":a,children:Te("div",{className:"sc-card sc-current",children:[e&&oe("h2",{className:"sc-section-title",children:e}),b]})});if(o.error)return s(oe("p",{className:"sc-error",children:o.error.message}));if(o.loading)return s(oe("p",{className:"sc-note",children:"Loading\u2026"}));if(!o.plan)return s(Te("div",{className:"sc-current-main",children:[oe("p",{className:"sc-current-name",children:"No plan"}),oe("p",{className:"sc-sub",children:o.summary})]}));let{plan:c,trialDaysLeft:i,percent:l,unlimited:u,reward:m}=o;return s(Te(Si,{children:[Te("div",{className:"sc-current-grid",children:[(t||i!==null)&&Te("div",{className:"sc-current-main",children:[t?Te("p",{className:"sc-current-name",children:[c.name,i!==null&&Te("span",{className:"sc-trial-badge",children:[i," ",i===1?"day":"days"," left"]})]}):i!==null&&oe("p",{className:"sc-current-trial",children:Te("span",{className:"sc-trial-badge",children:[i," ",i===1?"day":"days"," left"]})}),t&&c.description&&oe("p",{className:"sc-sub",children:c.description})]}),n&&Te("div",{className:"sc-usage",children:[Te("div",{className:"sc-row-between",children:[oe("span",{className:"sc-fact-key",children:"Usage"}),oe("span",{className:l!==null&&l>=100?"sc-usage-figure sc-usage-over":"sc-usage-figure",children:u?"Unlimited":l===null?"Metered":`${l}% used`})]}),l!==null&&oe("div",{className:"sc-meter",role:"presentation",children:l>0&&oe("span",{className:l>=100?"sc-meter-fill sc-meter-full":"sc-meter-fill",style:{width:`${l}%`}})}),oe("p",{className:"sc-usage-line",children:o.summary})]})]}),m&&Te("div",{className:"sc-current-foot",children:[oe("p",{className:m.required?"sc-plan-reward-line sc-plan-reward-need":m.inForce?"sc-plan-reward-line":"sc-plan-reward-line sc-plan-reward-open",children:m.required?m.line:m.inForce?`In force: ${Mi(m.line)}.`:m.line}),(m.actionable||m.connected)&&oe(yn,{})]})]}))}var Mi=e=>e.charAt(0).toLowerCase()+e.slice(1);import{useCallback as Pi,useMemo as Ri,useState as ns}from"react";var Ei={"user-hardware":"your own machine","user-subscription":"your own AI subscription","open-weights":"open models we host",frontier:"frontier models"},Ii=new Set(["user-hardware","user-subscription"]);function _r(e={}){let{plan:n,compute:t,connect:r}=Q(),[o,a]=ns(null),[s,c]=ns(null),{featured:i,onSelect:l,successUrl:u,cancelUrl:m}=e,b=Pi(async h=>{a(h.id),c(null);try{if(h.selectable)await n.select(h.id);else if(l)l(h);else{let y=await n.checkout(h.id,{...u?{successUrl:u}:{},...m?{cancelUrl:m}:{}});window.location.assign(y);return}}catch(y){throw c(y.message),y}finally{(h.selectable||l)&&a(null)}},[n,l,u,m]),g=Ri(()=>n.plans.map(h=>{let y=n.current?.plan_id===h.id;return{plan:h,current:y,featured:i===h.id&&!y,price:Oi(h),allowance:h.included_units===null?`Unlimited ${h.unit}s`:`${h.included_units.toLocaleString()} ${h.unit}${h.included_units===1?"":"s"}`,allowanceNote:Li(h),computeLabel:h.route_allow===null?"any compute":h.route_allow.length===0?"no compute":null,compute:(h.route_allow??[]).map(N=>({costClass:N,label:Ei[N]??N,owned:Ii.has(N),runtimes:tr(N).map(P=>P.id)})),connect:Ti(h,y,t.connected,()=>r.open("manual")),cta:{label:Bi(h,y,o===h.id),disabled:y||o!==null,busy:o===h.id,take:()=>b(h)}}}),[n.plans,n.current,i,t.connected,r,o,b]);return{offers:g,current:g.find(h=>h.current)??null,loading:n.loading,error:n.error,failed:s}}function Oi(e){return e.price===0?{amount:"Free",interval:null,free:!0}:{amount:`$${e.price.toLocaleString()}`,interval:e.interval,free:!1}}function Li(e){let n=[];return e.included_units===null?n.push("No ceiling on this plan"):(n.push(`Included each ${e.interval}`),e.overage==="meter"&&e.overage_per_unit>0?n.push(`then $${e.overage_per_unit} a ${e.unit}`):e.included_units>0&&n.push(`then ${e.unit}s stop`)),e.trial_days>0&&n.push(`${e.trial_days}-day trial`),n.join(" \xB7 ")}function Ti(e,n,t,r){let o=Ve({unit:e.unit,reward:e.connected_reward,includedUnits:e.connected_included_units,creditMicros:e.connected_credit*1e6}),a=Le(e.route_allow)&&!t;if(!o&&!a)return null;let s=Je(e.connected_reward);return{key:o?"Connect your own":"To use this",line:o??(n?"Nothing connected yet, so nothing can run.":"Runs only on compute you connect."),reward:o!==null,actionable:n&&(s||a)&&!t,open:r}}function Bi(e,n,t){return n?"Your plan":t?e.selectable?"Switching\u2026":"Opening\u2026":e.selectable?"Choose":`Subscribe for $${e.price.toLocaleString()}/${e.interval}`}import{jsx as A,jsxs as D}from"react/jsx-runtime";function Ht(e){return e?`soba-connect sc-fill ${e}`:"soba-connect sc-fill"}function $r({onSelect:e,successUrl:n,cancelUrl:t,showCompute:r=!0,showConnect:o=!1,variant:a="cards",featured:s,className:c}){let{offers:i,loading:l,error:u,failed:m}=_r({...s?{featured:s}:{},...e?{onSelect:e}:{},...n?{successUrl:n}:{},...t?{cancelUrl:t}:{}}),{theme:b}=H();if(u)return A("div",{className:Ht(c),"data-theme":b,children:A("div",{className:"sc-card",children:A("p",{className:"sc-error",children:u.message})})});if(l)return A("div",{className:Ht(c),"data-theme":b,children:A("div",{className:"sc-card",children:A("p",{className:"sc-note",children:"Loading plans\u2026"})})});if(i.length===0)return A("div",{className:Ht(c),"data-theme":b,children:A("div",{className:"sc-card",children:A("p",{className:"sc-note",children:"This app has no plans yet."})})});let g={showCompute:r,showConnect:o};return D("div",{className:Ht(c),"data-theme":b,"data-variant":a,children:[a==="rows"?A(Wi,{offers:i,shelf:g}):a==="table"?A(Hi,{offers:i,shelf:g}):A(Gi,{offers:i,shelf:g}),m&&A("p",{className:"sc-error",children:m})]})}function Gi({offers:e,shelf:n}){return A("div",{className:"sc-plans",children:e.map(t=>D("div",{className:ts("sc-plan",t),children:[D("div",{className:"sc-row-between",children:[A("span",{className:"sc-title",children:t.plan.name}),A(eo,{offer:t})]}),A("p",{className:"sc-sub",children:t.plan.description}),A(no,{price:t.price,free:"forever"}),A(oo,{offer:t,shelf:n}),A(rs,{offer:t}),A("div",{className:"sc-plan-band",children:n.showCompute&&A(ro,{offer:t})}),A("div",{className:"sc-plan-band",children:A(to,{offer:t})})]},t.plan.id))})}function Wi({offers:e,shelf:n}){return A("ul",{className:"sc-plan-rows",children:e.map(t=>D("li",{className:ts("sc-plan-row",t),children:[D("div",{className:"sc-row-main",children:[D("span",{className:"sc-row-name",children:[A("span",{className:"sc-title",children:t.plan.name}),A(eo,{offer:t})]}),t.plan.description&&A("p",{className:"sc-sub",children:t.plan.description}),A(rs,{offer:t}),n.showCompute&&A(ro,{offer:t,inline:!0}),A(to,{offer:t,inline:!0})]}),D("div",{className:"sc-row-side",children:[A(no,{price:t.price,free:"forever",small:!0}),A(oo,{offer:t,shelf:n})]})]},t.plan.id))})}function Hi({offers:e,shelf:n}){let t=e.some(s=>s.plan.overage_per_unit>0),r=e.some(s=>s.plan.trial_days>0),o=e.some(s=>s.connect!==null),a=s=>[s.current?"sc-col-current":"",s.featured?"sc-col-featured":""].filter(Boolean).join(" ")||void 0;return A("div",{className:"sc-table-scroll",children:D("table",{className:"sc-plan-table",children:[A("thead",{children:D("tr",{children:[A("td",{}),e.map(s=>D("th",{scope:"col",className:a(s),children:[D("span",{className:"sc-row-name",children:[A("span",{className:"sc-title",children:s.plan.name}),A(eo,{offer:s})]}),A(no,{price:s.price,small:!0})]},s.plan.id))]})}),D("tbody",{children:[D("tr",{children:[A("th",{scope:"row",children:"Included"}),e.map(s=>A("td",{className:a(s),children:s.allowance},s.plan.id))]}),t&&D("tr",{children:[A("th",{scope:"row",children:"Then"}),e.map(s=>A("td",{className:a(s),children:s.plan.overage_per_unit>0?`$${s.plan.overage_per_unit} / ${s.plan.unit}`:A("span",{className:"sc-muted-cell",children:"Stops"})},s.plan.id))]}),r&&D("tr",{children:[A("th",{scope:"row",children:"Trial"}),e.map(s=>A("td",{className:a(s),children:s.plan.trial_days>0?`${s.plan.trial_days} days`:A("span",{className:"sc-muted-cell",children:"None"})},s.plan.id))]}),n.showCompute&&D("tr",{children:[A("th",{scope:"row",children:"Runs on"}),e.map(s=>A("td",{className:a(s),children:A(ro,{offer:s,bare:!0})},s.plan.id))]}),o&&D("tr",{children:[A("th",{scope:"row",children:"Connect your own"}),e.map(s=>A("td",{className:a(s),children:A(to,{offer:s,bare:!0})},s.plan.id))]}),D("tr",{className:"sc-table-buy",children:[A("td",{}),e.map(s=>A("td",{className:a(s),children:A(oo,{offer:s,shelf:n})},s.plan.id))]})]})]})})}function ts(e,n){return[e,n.current?"sc-plan-current":"",n.featured?"sc-plan-featured":""].filter(Boolean).join(" ")}function eo({offer:e}){return e.current?A("span",{className:"sc-plan-badge",children:"Current"}):e.featured?A("span",{className:"sc-plan-badge-soft",children:"Recommended"}):null}function no({price:e,small:n,free:t}){return D("p",{className:n?"sc-plan-price sc-plan-price-sm":"sc-plan-price",children:[A("span",{className:"sc-plan-amount",children:e.amount}),e.interval?D("span",{className:"sc-plan-interval",children:["/",e.interval]}):t&&A("span",{className:"sc-plan-interval sc-plan-after",children:t})]})}function rs({offer:e}){return D("p",{className:"sc-plan-allowance",children:[A("span",{className:"sc-plan-figure",children:e.allowance}),A("span",{className:"sc-plan-qualifier",children:e.allowanceNote})]})}function to({offer:e,inline:n,bare:t}){let r=e.connect;if(!r)return t?A("span",{className:"sc-muted-cell",children:"None"}):null;let o=r.reward?"sc-plan-reward-line":"sc-plan-reward-line sc-plan-reward-need",a=r.actionable?D("button",{type:"button",className:`${o} sc-plan-reward-act`,"aria-label":"Connect compute",onClick:r.open,children:[A("span",{className:"sc-reward-said",children:r.line}),D("span",{className:"sc-reward-do","aria-hidden":!0,children:[A(q,{className:"sc-reward-mark"}),"Connect compute"]})]}):A("p",{className:o,children:r.line});return t?a:A("div",{className:n?"sc-plan-reward sc-plan-reward-inline":"sc-plan-reward",children:a})}function ro({offer:e,inline:n,bare:t}){let r=e.computeLabel?A("ul",{className:n?"sc-compute sc-compute-inline":"sc-compute",children:A("li",{children:e.computeLabel})}):A("ul",{className:n?"sc-compute sc-compute-inline":"sc-compute",children:e.compute.map(o=>D("li",{className:o.owned?"sc-compute-own":void 0,children:[o.label,A(Di,{runtimes:o.runtimes})]},o.costClass))});return t?r:D("div",{className:n?"sc-plan-compute sc-plan-compute-inline":"sc-plan-compute",children:[A("span",{className:"sc-fact-key",children:"Runs on"}),r]})}function oo({offer:e,shelf:n}){let t=e.connect;return n.showConnect&&t?.actionable?D("button",{type:"button",className:"sc-btn sc-btn-primary sc-btn-icon",onClick:t.open,children:[A(q,{className:"sc-btn-mark"}),"Connect compute"]}):A("button",{type:"button",className:e.current?"sc-btn":"sc-btn sc-btn-primary",disabled:e.cta.disabled,onClick:()=>void e.cta.take().catch(()=>{}),children:e.cta.label})}function Di({runtimes:e}){return e.length===0?null:A("span",{className:"sc-compute-marks",children:e.map(n=>{let t=Ze[n];return t?A(t,{className:"sc-rt-mark"},n):null})})}import{jsx as so,jsxs as os}from"react/jsx-runtime";function Ui({heading:e,plansHeading:n,showUsage:t=!0,showName:r=!0,className:o,...a}){let{plan:s,loading:c}=ft(),{theme:i}=H(),l=n??(c?"Plans":s?"Change plan":"Choose a plan");return os("div",{className:o?`soba-connect sc-fill sc-billing ${o}`:"soba-connect sc-fill sc-billing","data-theme":i,children:[so(Kr,{...e===void 0?{}:{heading:e},showUsage:t,showName:r}),os("section",{className:"sc-billing-plans",children:[l&&so("h2",{className:"sc-section-title",children:l}),so($r,{...a})]})]})}import{useCallback as ss,useState as as}from"react";function ao({plan:e,successUrl:n,cancelUrl:t,label:r}){let{plan:o}=Q(),[a,s]=as(!1),[c,i]=as(null),l=ss(()=>o.checkout(e.id,{...n?{successUrl:n}:{},...t?{cancelUrl:t}:{}}),[o,e.id,n,t]),u=ss(async()=>{s(!0),i(null);try{window.location.assign(await l())}catch(m){i(m.message),s(!1)}},[l]);return{label:a?"Opening\u2026":r??`Subscribe for $${e.price.toLocaleString()}/${e.interval}`,busy:a,error:c,buy:u,session:l}}import{jsx as is,jsxs as Qi}from"react/jsx-runtime";function Fi({plan:e,successUrl:n,cancelUrl:t,label:r,className:o}){let{theme:a}=H(),s=ao({plan:e,...n?{successUrl:n}:{},...t?{cancelUrl:t}:{},...r?{label:r}:{}});return Qi("div",{className:o?`soba-connect ${o}`:"soba-connect","data-theme":a,children:[is("button",{type:"button",className:"sc-btn sc-btn-primary",disabled:s.busy,onClick:()=>void s.buy(),children:s.label}),s.error&&is("p",{className:"sc-error",children:s.error})]})}import{useCallback as Fe,useEffect as $e,useMemo as Wn,useRef as en,useState as se}from"react";var Vi="soba.session:";function ls(e){return!e.cacheKey||!e.endpoint?null:Vi+JSON.stringify([e.endpoint,e.user??null,e.cacheKey])}function Ji(e){try{let n=globalThis.localStorage?.getItem(e);if(!n)return null;let t=JSON.parse(n);return typeof t.token!="string"||typeof t.expiresAt!="number"?null:{token:t.token,expiresAt:t.expiresAt}}catch{return null}}function Yi(e,n){try{n?globalThis.localStorage?.setItem(e,JSON.stringify(n)):globalThis.localStorage?.removeItem(e)}catch{}}var cs=6e4,ji=1e4,Dt=class{#e;#n=null;#r=null;#t;#o=new Set;constructor(n){this.#t=n,this.#e=n.token??null;let t=ls(n),r=t&&!this.#e?Ji(t):null;r&&r.expiresAt-cs>Date.now()&&(this.#e=r.token,this.#n=r.expiresAt)}get token(){return this.#e}get expiresAt(){return this.#n}get canRefresh(){return!!this.#t.endpoint}get refreshAt(){return!this.canRefresh||this.#n===null?null:Math.max(Date.now()+ji,this.#n-cs)}subscribe(n){return this.#o.add(n),()=>this.#o.delete(n)}async ensure(){return this.#e?this.#e:this.refresh()}async refresh(){if(this.#r)return this.#r;let n=this.#t.endpoint;if(!n)throw new Error("This Soba session cannot be refreshed. Pass `sessionEndpoint` so the provider can mint a new one.");let t=this.#t.fetchImpl??fetch.bind(globalThis);this.#r=(async()=>{let r=await t(n,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify(this.#t.user?{user:this.#t.user}:{})});if(!r.ok)throw new Error(`Could not start a Soba session (${r.status} from ${n}).`);let o=await r.json(),a=o.session??o.token;if(!a)throw new Error(`${n} answered without a \`session\`. See @soba-so/react's README.`);let s=o.expires_in??o.expiresIn;this.#e=a,this.#n=typeof s=="number"?Date.now()+s*1e3:null;let c=ls(this.#t);c&&Yi(c,this.#n===null?null:{token:a,expiresAt:this.#n});for(let i of this.#o)i();return a})();try{return await this.#r}finally{this.#r=null}}},Gn=new Map,us=new WeakMap,zi=1;function qi(e){if(e.token||!e.endpoint)return null;let n=0;return e.fetchImpl&&(n=us.get(e.fetchImpl)??zi++,us.set(e.fetchImpl,n)),JSON.stringify([e.endpoint,e.user??null,n,e.cacheKey??null])}function ds(e){let n=qi(e);if(!n)return new Dt(e);let t=Gn.get(n)??{holder:new Dt(e),users:0};return Gn.set(n,t),t.holder}function ps(e){for(let n of Gn.values())n.holder===e&&n.users++}function ms(e){for(let[n,t]of Gn)if(t.holder===e){setTimeout(()=>{--t.users<=0&&Gn.get(n)===t&&Gn.delete(n)},0);return}}function hs(e,n=fetch.bind(globalThis)){return async(t,r)=>{let o=await n(t,r);if(o.status!==401||!e.canRefresh)return o;let a;try{a=await e.refresh()}catch{return o}return n(t,Zi(r,a))}}function Zi(e,n){let t=new Headers(e?.headers);return t.set("authorization",`Bearer ${n}`),{...e,headers:t}}import{jsx as io,jsxs as $i}from"react/jsx-runtime";var Xi="https://soba.so",Ki=3e4;function _i(e){let{children:n,session:t,sessionEndpoint:r,user:o,sessionCacheKey:a,runEndpoint:s,theme:c,initialMachines:i,initialConnect:l=null,initialPlans:u,initialCurrentPlan:m=null,baseUrl:b=Xi,pollMs:g=Ki,injectStyles:h=!0,modal:y=!0,fetchImpl:N,onError:P}=e,[R,W]=se(t??null),[E,I]=se(null),[O,k]=se(l),[U,pe]=se(null),[ne,ae]=se(l===null),[Z,me]=se(i??[]),[Ye,$]=se(null),[ye,Se]=se(i===void 0),[X,ie]=se(u??[]),[z,Pe]=se(m),[he,fe]=se(null),[nn,V]=se(u===void 0),[J,te]=se(null),[T,le]=se(!1),Re=en(P);Re.current=P;let ce=Fe(w=>{I(w),Re.current?.(w)},[]);$e(()=>{h&&mt()},[h]);let L=Wn(()=>ds({...t?{token:t}:{},...r?{endpoint:r}:{},...o?{user:o}:{},...N?{fetchImpl:N}:{},...a?{cacheKey:a}:{}}),[t,r,o,N,a]);$e(()=>{let w=!0;ps(L);let ee=L.subscribe(()=>{w&&W(L.token)});return!L.token&&!L.canRefresh?ce(new Error("<SobaProvider> needs a `session` or a `sessionEndpoint`. A browser cannot mint one: that takes your secret key.")):L.ensure().then(()=>w&&W(L.token),ge=>w&&ce(ge)),()=>{w=!1,ee(),ms(L)}},[L,ce]),$e(()=>{E&&(ae(!1),Se(!1),V(!1),pe(w=>w??E),$(w=>w??E),fe(w=>w??E))},[E]),$e(()=>{let w=L.refreshAt;if(w===null)return;let ee=()=>{L.refresh().catch(ve=>ce(ve))},ge=()=>{document.hidden||(document.removeEventListener("visibilitychange",ge),ee())},wt=setTimeout(()=>{typeof document<"u"&&document.hidden?document.addEventListener("visibilitychange",ge):ee()},Math.max(0,w-Date.now()));return()=>{clearTimeout(wt),typeof document<"u"&&document.removeEventListener("visibilitychange",ge)}},[L,ce,R]);let B=en(l?.machines_url??null),x=Wn(()=>{if(!R)return null;let w=new Dn({session:R,baseUrl:b,fetchImpl:hs(L,N??fetch.bind(globalThis))});return w.setMachinesUrl(B.current),w},[R,b,L,N]),tn=en(l!==null);$e(()=>{if(!x||tn.current)return;let w=!0;return ae(!0),x.context().then(ee=>{w&&(k(ee),pe(null),ae(!1))},ee=>{w&&(pe(ee),ae(!1))}),()=>{w=!1}},[x]);let je=Fe(async()=>{if(x)try{let w=await x.machines();me(Array.isArray(w)?w:[]),$(null)}catch(w){$(w)}finally{Se(!1)}},[x]),we=Fe(async()=>{if(x)try{let w=await x.plans();ie(w.plans),Pe(w.current),fe(null)}catch(w){fe(w)}finally{V(!1)}},[x]),ue=en(!1),[ze,Cn]=se(!1),vn=en(u!==void 0),rn=en(!1),on=Fe(()=>{ue.current||(ue.current=!0,rn.current&&queueMicrotask(()=>{rn.current&&Cn(!0)}))},[]);$e(()=>(rn.current=!0,ue.current&&Cn(!0),()=>{rn.current=!1}),[]),$e(()=>{!x||!ze||vn.current||we()},[x,ze,we]);let sn=Fe(async w=>{if(!x)throw new Error("No session yet.");await x.selectPlan(w),await we()},[x,we]),Ut=Fe(async(w,ee)=>{if(!x)throw new Error("No session yet.");let ge=await x.checkoutPlan(w,ee);if(!ge.url)throw new Error("Checkout could not be started.");return ge.url},[x]),gt=Fe(async()=>{if(!x)throw new Error("No session yet.");await x.leavePlan(),await we()},[x,we]),At=en(i!==void 0);$e(()=>{if(!x)return;let w=Me(je,g,{immediate:!At.current});return At.current=!1,w},[x,je,g]);let kn=Fe((w="manual")=>{y&&(le(!0),te(w))},[y]),bt=Fe(()=>te(null),[]),K=en(Z);K.current=Z;let Be=Fe(async w=>{if(!s)throw new Error("Pass `runEndpoint` to <SobaProvider> to start runs from the browser. It is your own route: it holds your secret key, calls soba.run(), and forwards the stream.");let{signal:ee,...ge}=w,ve=await(N??fetch.bind(globalThis))(s,{method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream"},credentials:"same-origin",body:JSON.stringify(ge),...ee?{signal:ee}:{}});if(!ve.ok){let Qe=await ve.json().catch(()=>null),ke=new Error(Qe?.error?.message??`${s} answered ${ve.status}.`);ke.status=ve.status,Qe?.error?.code&&(ke.code=Qe.error.code),Qe?.error&&(ke.error=Qe.error);let Ct=K.current.length>0&&!K.current.some(Qt=>Qt.state!=="offline");throw ve.status===409&&Ct&&kn("no_compute"),ke}let Ee=Xr(ve);return async function*(){try{yield*Ee}finally{ue.current&&we()}}()},[s,N,we,kn]),Ce=Wn(()=>z?X.find(w=>w.id===z.plan_id)??null:null,[X,z]),an=Wn(()=>Ce?Ce.connected_reward==="included"&&Z.length>0&&Ce.connected_included_units!==null?Ce.connected_included_units:Ce.included_units:null,[Ce,Z]),yt=Wn(()=>({plans:X,current:z,plan:Ce,used:z?.units_used??null,included:an,remaining:an!==null&&z?Math.max(0,an-z.units_used):null,unlimited:Ce!==null&&an===null,loading:nn,error:he,select:sn,checkout:Ut,leave:gt,refresh:we}),[X,z,Ce,an,nn,he,sn,Ut,gt,we]),Ft=Wn(()=>({session:R,client:x,error:E,get plan(){return on(),yt},compute:{machines:Z,connected:Z.length>0,online:Z.some(w=>w.state!=="offline"),loading:ye,error:Ye,refresh:je},connect:{app:O?.app??null,command:O?.command??null,connectUrl:O?.connect_url??null,publishableKey:O?.publishable_key??null,loading:ne,error:U,open:kn,close:bt,isOpen:J!==null,hasModal:y},run:Be}),[R,x,E,yt,on,J,kn,bt,y,Z,ye,Ye,je,O,ne,U,Be]);return io(Br.Provider,{value:x,children:io(Gr.Provider,{value:{context:O,machines:ye?void 0:Z,theme:c??O?.theme??"light"},children:$i(Wr.Provider,{value:Ft,children:[n,y&&T&&io(ut,{open:J!==null,onOpenChange:w=>te(w?J??"manual":null),onConnected:()=>{je()},...J==="payment_required"||J==="no_compute"?{reason:J}:{},...J==="pair"?{showStatus:!1}:{}})]})})})}function el(e){return e?nl[e]??e:null}var nl={"user-hardware":"your own computer","user-subscription":"your own AI plan","user-api-key":"your own API key","open-weights":"open models we host",frontier:"a frontier model we pay for"};async function tl(e,n,t){let r=n.local;if(!r?.session||n.after)return null;let o=/\/v1\/runs\/([^/]+)\/events/.exec(e.url)?.[1];if(!o)return null;let a=`http://127.0.0.1:${r.port??47321}/v1/runs/${o}/events`,s=new AbortController,c=()=>s.abort();n.signal?.addEventListener("abort",c);let i=setTimeout(()=>s.abort(),r.timeoutMs??3e3);try{let l=await t(a,{headers:{authorization:`Bearer ${r.session}`,accept:"text/event-stream"},signal:s.signal});return l.ok?{url:a,bearer:r.session,open:l}:null}catch{return null}finally{clearTimeout(i),n.signal?.removeEventListener("abort",c)}}async function*rl(e){let n=e.body;if(!n)return;let t=n.getReader(),r=new TextDecoder,o="",a=null,s=[];try{for(;;){let c=await t.read();if(c.done)return;o+=r.decode(c.value,{stream:!0});for(let i=o.indexOf(`
|
|
3049
3417
|
`);i!==-1;i=o.indexOf(`
|
|
3050
|
-
`)){let
|
|
3051
|
-
`)}),
|
|
3418
|
+
`)){let l=o.slice(0,i).replace(/\r$/,"");if(o=o.slice(i+1),l==="")s.length&&(yield{id:a,data:s.join(`
|
|
3419
|
+
`)}),a=null,s=[];else if(l.startsWith("id:")){let u=Number(l.slice(3).trim());a=Number.isFinite(u)?u:null}else if(l.startsWith("data:")){let u=l.slice(5);s.push(u.startsWith(" ")?u.slice(1):u)}}}}finally{t.cancel().catch(()=>{})}}var lo=(e,n)=>new Promise(t=>{let r=setTimeout(t,e);n?.addEventListener("abort",()=>{clearTimeout(r),t()})});async function*ol(e,n={}){let t=n.fetchImpl??fetch.bind(globalThis),r=await tl(e,n,t)??{url:e.url,bearer:e.token,open:null},o=n.maxRetries??6,a=n.after??0,s=0;for(;;){if(n.signal?.aborted)return;let c;try{c=r.open??await t(r.url,{headers:{authorization:`Bearer ${r.bearer}`,accept:"text/event-stream",...a?{"last-event-id":String(a)}:{}},...n.signal?{signal:n.signal}:{}}),r.open=null}catch(i){if(n.signal?.aborted)return;if(++s>o)throw i;await lo(1e3*s,n.signal);continue}if(c.status===503&&s<o){s++,await lo(Number(c.headers.get("retry-after")??3)*1e3,n.signal);continue}if(!c.ok){let i=`Could not read this run (${c.status}).`;try{let l=await c.json();l.error?.message&&(i=l.error.message)}catch{}throw new Error(i)}for await(let i of rl(c)){i.id!==null&&(a=i.id),s=0;let l=Bn(i.data);if(l&&(yield l,l.type==="done"||l.type==="error"))return}if(n.signal?.aborted)return;if(++s>o)throw new Error("Lost this run's stream and could not get it back.");await lo(1e3*s,n.signal)}}export{Wa as ComputeStatus,yn as ConnectButton,za as ConnectCompute,ut as ConnectModal,li as ConnectNudge,Fr as ConnectPill,hi as ModelPicker,Ai as RunError,wi as RunLimit,Ui as SobaBilling,Fi as SobaCheckout,Kr as SobaCurrentPlan,$r as SobaPlans,_i as SobaProvider,mi as collectText,Qr as connectSays,mt as injectStyles,Bn as parseEvent,Xr as readEvents,_o as runErrorMessage,wn as sobaErrorCode,el as tierLabel,ao as useCheckout,lt as useCompute,Qa as useConnectButton,Zr as useConnectNudge,ft as useCurrentPlan,Vr as useMachineRuns,bn as useModel,pt as useOpenSobaConnect,_r as usePlans,zr as useRunLimit,Q as useSoba,ol as watchRun};
|