ryco-cli 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/client/assets/{AccountSettings-BUoiS8x1.js → AccountSettings-C3v2klAG.js} +1 -1
- package/dist/client/assets/{AiFocusSettings-Cz1Uqn7a.js → AiFocusSettings-BquKjnWf.js} +1 -1
- package/dist/client/assets/{BranchToolbar.logic-LIanCEVr.js → BranchToolbar.logic-CmvD76Cw.js} +1 -1
- package/dist/client/assets/{ChatRightPanel-CKEjpQ_x.js → ChatRightPanel-DVxRdZWT.js} +3 -3
- package/dist/client/assets/{ChatThreadRouteView-D50onHY2.js → ChatThreadRouteView-DlgAAOCp.js} +1 -1
- package/dist/client/assets/{CommandPaletteDialog-DdRKgZ8m.js → CommandPaletteDialog-BnJURcy7.js} +1 -1
- package/dist/client/assets/ConnectionsSettings-Ccn8q4fG.js +7 -0
- package/dist/client/assets/{DiagnosticsSettings-C74u3ce5.js → DiagnosticsSettings-QXpjXOrH.js} +1 -1
- package/dist/client/assets/{DraftChatThreadRouteView-RTmLGTl0.js → DraftChatThreadRouteView-DFMY6O91.js} +1 -1
- package/dist/client/assets/{HostedConnectionControls-CKiC01ju.js → HostedConnectionControls-BC4kVWTa.js} +1 -1
- package/dist/client/assets/{HostedHubRoot-BS3rAYTy.js → HostedHubRoot-pBGVub10.js} +1 -1
- package/dist/client/assets/{HostedNativeAuthorizationRoute-BFTDyh4N.js → HostedNativeAuthorizationRoute-Df0oSrLR.js} +1 -1
- package/dist/client/assets/{HostedRelayTrustNotice-eEOPKsBg.js → HostedRelayTrustNotice-ffS_O2AX.js} +1 -1
- package/dist/client/assets/{IntegrationsSettingsPanel-Cg4eRHm_.js → IntegrationsSettingsPanel-BHyy-VM0.js} +1 -1
- package/dist/client/assets/{KeybindingsSettings-CYj67N2D.js → KeybindingsSettings-BfkONqmZ.js} +1 -1
- package/dist/client/assets/{McpServersSettings-Bc61hRUY.js → McpServersSettings-UthT1T80.js} +1 -1
- package/dist/client/assets/{NewWorktreeDialog-CTlFjKa4.js → NewWorktreeDialog-DTZnArOC.js} +1 -1
- package/dist/client/assets/{NoActiveThreadState-Dw9aoU2J.js → NoActiveThreadState-jcEAWu7N.js} +1 -1
- package/dist/client/assets/{NodeSecuritySettings-DMkkTgfg.js → NodeSecuritySettings-DPqjRphc.js} +1 -1
- package/dist/client/assets/{OpinionatedPluginsSettings-CeoSmZ90.js → OpinionatedPluginsSettings-BSy3F4v6.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitial-7ZxxVbUB.js → PhoneGetAppInterstitial-B2mrJtgM.js} +1 -1
- package/dist/client/assets/{PhoneHome-DRRoCd_y.js → PhoneHome-C-ttaKuE.js} +1 -1
- package/dist/client/assets/{PhoneSettingsSurface-LNEaPHQC.js → PhoneSettingsSurface-CJddundi.js} +1 -1
- package/dist/client/assets/{ProjectFavicon-BIMdZxK6.js → ProjectFavicon-BhQnkxbx.js} +1 -1
- package/dist/client/assets/{ProviderModelPicker-jd6GjQkO.js → ProviderModelPicker-COg6CGM4.js} +1 -1
- package/dist/client/assets/{ProvidersSettingsPanel-v2SvoEGx.js → ProvidersSettingsPanel-C3aPyCrN.js} +1 -1
- package/dist/client/assets/{RootAppShell-CFjrYjtn.js → RootAppShell-3T2sBtpP.js} +2 -2
- package/dist/client/assets/SettingsDialog-krsStFrf.js +1 -0
- package/dist/client/assets/{SettingsPanels-BmhZ8u4B.js → SettingsPanels-D8Xy3pPC.js} +1 -1
- package/dist/client/assets/{SourceControlSettings-DvPydmxX.js → SourceControlSettings-KIx9EfEZ.js} +1 -1
- package/dist/client/assets/{StatisticsPage-Duk2cHVH.js → StatisticsPage-C38pI2_b.js} +1 -1
- package/dist/client/assets/{StatisticsPanel-D-uNJcdj.js → StatisticsPanel-6sINT28-.js} +1 -1
- package/dist/client/assets/{ThreadStatusIndicators-D0xoATCw.js → ThreadStatusIndicators-CL0KGLlj.js} +0 -0
- package/dist/client/assets/{ThreadTerminalDrawer-DjX8p7IH.js → ThreadTerminalDrawer-C4NJu8Qs.js} +1 -1
- package/dist/client/assets/{ThreadWorkspacePanel-DI0GXPBf.js → ThreadWorkspacePanel-D9qlHXCA.js} +1 -1
- package/dist/client/assets/{WorkItemsTab-ow45makA.js → WorkItemsTab-BDAeQe4D.js} +1 -1
- package/dist/client/assets/{branding-C8SLy6Af.js → branding-DeKsIp6g.js} +1 -1
- package/dist/client/assets/{capabilities-BQuqC7jg.js → capabilities-BkVqeGLQ.js} +1 -1
- package/dist/client/assets/{desktopUpdateAtoms-C82GmR67.js → desktopUpdateAtoms-B9iJXSdW.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-G5Z_JRbm.js → desktopWorkspace-B-cSBe8H.js} +1 -1
- package/dist/client/assets/{device-B56cBWWt.js → device-DfIh5pQV.js} +1 -1
- package/dist/client/assets/{editorPreferences-CTDEj79K.js → editorPreferences-0DWMgcci.js} +1 -1
- package/dist/client/assets/{index-Bbz4fkK_.js → index-Bntnmu6O.js} +1 -1
- package/dist/client/assets/{main-Dwu2cT6v.js → main-BjVnVob0.js} +2 -2
- package/dist/client/assets/{projectPaths-lDhAE9o_.js → projectPaths-SSsIvt0g.js} +1 -1
- package/dist/client/assets/{providerIconUtils-DnSYUN9l.js → providerIconUtils-CzSa_16f.js} +1 -1
- package/dist/client/assets/runtime-DfGHeCnR.js +1 -0
- package/dist/client/assets/{session-logic-DElAta-Z.js → session-logic-wxhvMgEN.js} +1 -1
- package/dist/client/assets/{sidebarProjectFolders-Cs13ZUN8.js → sidebarProjectFolders-CGVDJ0ZT.js} +1 -1
- package/dist/client/assets/storeSelectors-Bpr2pdhU.js +1 -0
- package/dist/client/assets/{threadPriorityRefreshRuntime-DJF5drVD.js → threadPriorityRefreshRuntime-tRDgvBzr.js} +1 -1
- package/dist/client/assets/types-Bpr2pdhU.js +1 -0
- package/dist/client/assets/{useAtlassian-Bx2ua3JV.js → useAtlassian-DC0XOw4u.js} +0 -0
- package/dist/client/assets/{useHandleNewThread-DHO0PWGZ.js → useHandleNewThread-Bvz-DKgn.js} +1 -1
- package/dist/client/assets/{usePhoneThreadActions-OTf7yIbN.js → usePhoneThreadActions-CAgIq9aZ.js} +1 -1
- package/dist/client/assets/{useStatistics-DEtKeVPP.js → useStatistics-CiLROMJP.js} +1 -1
- package/dist/client/assets/{useThreadActions-DLxhOMkz.js → useThreadActions-Vew3ScxG.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ConnectionsSettings--CbTzkTn.js +0 -7
- package/dist/client/assets/SettingsDialog-CvGTsSV0.js +0 -1
- package/dist/client/assets/runtime-DKwoXpJv.js +0 -1
- package/dist/client/assets/storeSelectors-Cq_JKyiF.js +0 -1
- package/dist/client/assets/types-Cq_JKyiF.js +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{Nr as r,xa as i}from"./src-Vf4LVnMX.js";import{Jt as a,Vn as o,bn as s,c,m as l,n as u,o as d,p as f,r as p,xt as m,yn as h}from"./runtime-DKwoXpJv.js";import{A as g,C as _,F as v,M as y,T as b,U as x,g as S,h as C,j as w,k as T,m as E,p as D,u as O}from"./primary-OskAInOO.js";import{It as k}from"./composerDraftStore-CdJJZe42.js";import{n as A,t as j}from"./pairingUrl-rQM9kSGT.js";import{n as M,t as N}from"./visibilityPolling-BwzZdaSN.js";import{r as P,t as F}from"./hostedPairing-PogXRAb7.js";import{t as I}from"./settingsDialogStore-ygYoScKe.js";import{i as ee}from"./uiStateStore-B6pjzSjj.js";import{n as L,o as R,t as z}from"./desktopWorkspace-G5Z_JRbm.js";import{f as B}from"./useRenderElement-DchFnsR8.js";import{t as te}from"./arrow-up-right-DGeet8e6.js";import{t as ne}from"./chevron-down-B7C6FKzM.js";import{i as V}from"./toast-CcSCAm4B.js";import{t as H}from"./plus-B2h-VEqh.js";import{t as U}from"./qr-code-ScYULAuR.js";import{t as W}from"./refresh-cw-DopCMrtR.js";import{t as re}from"./terminal-C_CyIsDD.js";import{t as ie}from"./triangle-alert-RL_T3KLo.js";import{t as G}from"./utils-BofFIn5Y.js";import{n as ae,t as oe}from"./timestampFormat-8uPXS812.js";import{i as K,n as se,t as ce}from"./tooltip-C8sAONBj.js";import{t as le}from"./switch-BTGo9Yip.js";import{t as ue}from"./input-CHEwW3oH.js";import{t as de}from"./scroll-area-Drsa8bNB.js";import{t as q}from"./button-BAbJxRzt.js";import{t as fe}from"./useCopyToClipboard-BTpWxumf.js";import{t as pe}from"./toastHelpers-CSQRKo4F.js";import{a as me,c as he,i as ge,l as _e,n as ve,o as ye,r as be,s as xe,t as Se}from"./dialog-DQsYchqu.js";import{a as Ce,c as J,d as we,i as Te,o as Ee,p as De,s as Oe}from"./menu-Dvxh8sD5.js";import{t as ke}from"./spinner-ClF0jOcX.js";import{t as Ae}from"./textarea-RFPODxWW.js";import{a as je,i as Me,n as Ne,o as Pe,r as Fe,s as Ie,t as Le}from"./alert-dialog-DxoA6ky8.js";import{n as Re,r as ze,t as Be}from"./popover-CuH9Yrj3.js";import{a as Ve,i as He,n as Ue,r as Y}from"./settingsLayout-D8glO7f1.js";import{n as We,t as Ge}from"./data-list-CYKBxN62.js";import{t as Ke}from"./AnimatedHeight-BIsV_Z3J.js";import{n as qe,t as Je}from"./group-D9ER9giz.js";import{t as Ye}from"./qr-code-Bddq6K7S.js";import{n as Xe,r as Ze,t as Qe}from"./collapsible-dxy6kc2k.js";var $e=B(`chevrons-left-right-ellipsis`,[[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`m17 7 5 5-5 5`,key:`1xlxn0`}],[`path`,{d:`m7 7-5 5 5 5`,key:`19njba`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}]]),X=e(t(),1),Z=n();function et(e,t){let n=new URL(e);return n.pathname=`/pair`,A(n,t).toString()}function tt(e,t){return new URL(e).protocol===`https:`?F({host:e,token:t}):null}var nt=`/assets/relay-architecture-YeimmXuP.html`,Q=k();function $(e,t){return e===null||t===null||!e.fileSecretStoreFallbackSupported?!1:t.enrolled===`none`||t.enrolled===`unknown`&&!e.allowFileSecretStore}function rt(e,t){return e===null||t===null?`Loading local launch configuration and identity state.`:e.fileSecretStoreFallbackSupported?t.enrolled===`active`||t.enrolled===`pending`?`Locked while this machine holds Hub identity material. Leave the Hub before changing it.`:t.enrolled===`unknown`?e.allowFileSecretStore?`Identity custody is unreadable, so an enabled fallback cannot be turned off.`:`Enable this only as a recovery action when an existing file-backed identity cannot be read.`:`Ryco still prefers the system credential store. This only permits the hardened POSIX file fallback when that store is unavailable.`:`Unavailable on Windows. Ryco requires the system credential store on this host.`}function it(e){return e<1024?`${e} B`:`${(e/1024).toFixed(+(e<10240))} KiB`}function at(e,t){if(e===null)return[{label:`Protocol`,value:`Loading`},{label:`Channels`,value:`Loading`},{label:`Relay queue`,value:`Loading`},{label:`Reconnect`,value:`Loading`}];let n=e.state===`online`&&e.protocolMajor!==void 0&&e.protocolMinor!==void 0?`${e.protocolMajor}.${e.protocolMinor}`:`Not negotiated`,r=e.nextRetryAt===void 0?e.reconnectAttempt===void 0?`Not scheduled`:`Attempt ${e.reconnectAttempt}`:`Attempt ${e.reconnectAttempt??0}, ${Math.max(0,Math.ceil((Date.parse(e.nextRetryAt)-t)/1e3))}s`;return[{label:`Protocol`,value:n},{label:`Channels`,value:String(e.activeChannels)},{label:`Relay queue`,value:it(e.queuedBytes)},{label:`Reconnect`,value:r}]}function ot(e){let t=(0,Z.c)(84),{config:n,identity:r,status:i,nowMs:a,savingFileFallback:o,configError:s,onFileFallbackChange:c,onOpenGuide:l}=e,[u,d]=(0,X.useState)(!1),f;t[0]!==n||t[1]!==r?(f=$(n,r),t[0]=n,t[1]=r,t[2]=f):f=t[2];let p=f,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k;if(t[3]!==p||t[4]!==n||t[5]!==s||t[6]!==r||t[7]!==a||t[8]!==c||t[9]!==l||t[10]!==u||t[11]!==o||t[12]!==i){let e=at(i,a);g=Qe,y=u,b=d;let f=u?`Hide advanced options`:`Show advanced options`,A;t[29]===f?A=t[30]:(A=(0,Q.jsx)(`span`,{className:`block text-[13px] font-semibold tracking-[-0.01em] text-foreground`,children:f}),t[29]=f,t[30]=A);let j;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground/80`,children:`Key custody, startup ownership, CLI flags, and bounded relay diagnostics.`}),t[31]=j):j=t[31];let M;t[32]===s?M=t[33]:(M=s?(0,Q.jsx)(`span`,{className:`mt-1 block text-[11px] text-destructive`,children:s}):null,t[32]=s,t[33]=M);let N;t[34]!==A||t[35]!==M?(N=(0,Q.jsxs)(`span`,{children:[A,j,M]}),t[34]=A,t[35]=M,t[36]=N):N=t[36];let P=`size-4 shrink-0 text-muted-foreground transition-transform duration-200 motion-reduce:transition-none ${u?`rotate-180`:``}`,F;t[37]===P?F=t[38]:(F=(0,Q.jsx)(ne,{className:P,"aria-hidden":!0}),t[37]=P,t[38]=F),t[39]!==N||t[40]!==F?(x=(0,Q.jsxs)(Ze,{className:`group flex w-full items-center justify-between gap-4 border-t border-border/60 px-4 py-3.5 text-left transition-colors hover:bg-muted/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring sm:px-5`,children:[N,F]}),t[39]=N,t[40]=F,t[41]=x):x=t[41],h=Xe,v=`motion-reduce:transition-none`,D=`border-t border-border/60 bg-muted/10`;let I;t[42]!==n||t[43]!==r?(I=rt(n,r),t[42]=n,t[43]=r,t[44]=I):I=t[44];let ee=n?.allowFileSecretStore??!1,L=!p||o,R;t[45]===c?R=t[46]:(R=e=>c(!!e),t[45]=c,t[46]=R);let z;t[47]!==ee||t[48]!==L||t[49]!==R?(z=(0,Q.jsx)(le,{checked:ee,disabled:L,onCheckedChange:R,"aria-label":`Allow permissioned-file Hub key storage`}),t[47]=ee,t[48]=L,t[49]=R,t[50]=z):z=t[50],t[51]!==I||t[52]!==z?(O=(0,Q.jsx)(Y,{title:`Protected key fallback`,description:I,status:`Changing this launch setting restarts Ryco. It never moves or exports an existing key.`,control:z}),t[51]=I,t[52]=z,t[53]=O):O=t[53],t[54]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Q.jsx)(Y,{title:`Who owns startup`,description:`The desktop app owns Hub launch values for its bundled server and restarts that server to apply them. Exported Hub environment variables do not override this panel.`,status:`The Hub address stays outside ordinary server settings, diagnostics, and support output.`}),t[54]=k):k=t[54],t[55]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(Y,{title:`CLI equivalents`,description:`Use these flags for a headless Ryco node. Explicit flags override matching environment variables.`,status:`Use RYCO_HUB_NODE_NAME instead of --hub-node-name when environment configuration is preferable. Boolean flags also support canonical --no-... forms.`,children:(0,Q.jsx)(`div`,{className:`pb-3.5 pt-3`,children:(0,Q.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border border-border/60 bg-background/70 px-3 py-2.5 font-mono text-[11px] leading-5 text-foreground`,children:(0,Q.jsx)(`code`,{children:`ryco serve \\
|
|
2
|
-
--hub-connector-enabled \\
|
|
3
|
-
--hub-origin https://app.ryco.space \\
|
|
4
|
-
--hub-node-name "Build node"
|
|
5
|
-
|
|
6
|
-
# Optional on supported POSIX hosts
|
|
7
|
-
ryco serve --hub-allow-file-secret-store`})})})}),t[55]=_):_=t[55],m=Y,w=`Relay diagnostics`,T=`Bounded local counters only. No Hub address, key, ticket, project, path, or payload is exposed here.`;let B;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,Q.jsx)(te,{className:`size-3`}),t[56]=B):B=t[56],t[57]===l?E=t[58]:(E=(0,Q.jsxs)(q,{size:`xs`,variant:`outline`,onClick:l,children:[`Open relay guide`,B]}),t[57]=l,t[58]=E),S=`grid grid-cols-2 gap-x-6 gap-y-3 pb-3.5 pt-3 sm:grid-cols-4`,C=e.map(st),t[3]=p,t[4]=n,t[5]=s,t[6]=r,t[7]=a,t[8]=c,t[9]=l,t[10]=u,t[11]=o,t[12]=i,t[13]=m,t[14]=h,t[15]=g,t[16]=_,t[17]=v,t[18]=y,t[19]=b,t[20]=x,t[21]=S,t[22]=C,t[23]=w,t[24]=T,t[25]=E,t[26]=D,t[27]=O,t[28]=k}else m=t[13],h=t[14],g=t[15],_=t[16],v=t[17],y=t[18],b=t[19],x=t[20],S=t[21],C=t[22],w=t[23],T=t[24],E=t[25],D=t[26],O=t[27],k=t[28];let A;t[59]!==S||t[60]!==C?(A=(0,Q.jsx)(`dl`,{className:S,children:C}),t[59]=S,t[60]=C,t[61]=A):A=t[61];let j;t[62]!==m||t[63]!==A||t[64]!==w||t[65]!==T||t[66]!==E?(j=(0,Q.jsx)(m,{title:w,description:T,control:E,children:A}),t[62]=m,t[63]=A,t[64]=w,t[65]=T,t[66]=E,t[67]=j):j=t[67];let M;t[68]!==_||t[69]!==j||t[70]!==D||t[71]!==O||t[72]!==k?(M=(0,Q.jsxs)(`div`,{className:D,children:[O,k,_,j]}),t[68]=_,t[69]=j,t[70]=D,t[71]=O,t[72]=k,t[73]=M):M=t[73];let N;t[74]!==h||t[75]!==v||t[76]!==M?(N=(0,Q.jsx)(h,{className:v,children:M}),t[74]=h,t[75]=v,t[76]=M,t[77]=N):N=t[77];let P;return t[78]!==g||t[79]!==y||t[80]!==b||t[81]!==x||t[82]!==N?(P=(0,Q.jsxs)(g,{open:y,onOpenChange:b,children:[x,N]}),t[78]=g,t[79]=y,t[80]=b,t[81]=x,t[82]=N,t[83]=P):P=t[83],P}function st(e){return(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`dt`,{className:`text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground/65`,children:e.label}),(0,Q.jsx)(`dd`,{className:`mt-1 truncate font-mono text-[11px] text-foreground`,children:e.value})]},e.label)}var ct={configuration_invalid:{headline:`Hub configuration is invalid`,detail:`The address this backend started with was rejected. Check it and restart.`,action:`none`},identity_unavailable:{headline:`Can't read this machine's Hub key`,detail:`The system keychain is locked or unavailable. Unlock it, then try again.`,action:`retry`},identity_store_unavailable:{headline:`Can't read this machine's Hub key`,detail:`The keychain was unavailable when Ryco started. Restart Ryco to try again.`,action:`restart`},identity_origin_mismatch:{headline:`Enrolled with a different Hub`,detail:`This machine's key belongs to another Hub. Leave that Hub to enrol here.`,action:`leave`},enrollment_unavailable:{headline:`Enrollment was denied`,detail:`Someone declined this request on the Hub. Check with them before trying again.`,action:`enroll`},enrollment_expired:{headline:`Enrollment expired`,detail:`The request timed out before it was approved.`,action:`enroll`},authentication_failed:{headline:`The Hub rejected this machine's key`,detail:`Check this node's status on the Hub. Leaving lets you enrol again from scratch.`,action:`open-hub`},connection_replaced:{headline:`Another process connected as this machine`,detail:`Two copies of Ryco can't share one Hub identity. Stop the other one, then retry.`,action:`retry`},protocol_invalid:{headline:`The Hub connection kept failing`,detail:`Ryco stopped retrying after repeated protocol errors. Update Ryco and the Hub.`,action:`retry`},network_unavailable:{headline:`Can't reach the Hub`,detail:null,action:`none`},tls_unavailable:{headline:`Can't reach the Hub securely`,detail:null,action:`none`},authentication_timeout:{headline:`The Hub didn't respond`,detail:null,action:`none`},server_draining:{headline:`The Hub is restarting`,detail:null,action:`none`},rate_limited:{headline:`The Hub is rate limiting`,detail:null,action:`none`},heartbeat_timeout:{headline:`The Hub stopped responding`,detail:null,action:`none`},slow_consumer:{headline:`The connection fell behind`,detail:null,action:`none`},internal_error:{headline:`The Hub connection failed`,detail:null,action:`none`}},lt=(e,t)=>{let n=new Date(e).getTime()-t;if(Number.isNaN(n))return null;if(n<=0)return`now`;let r=Math.ceil(n/1e3);return r<60?`${r}s`:`${Math.ceil(r/60)}m`};function ut(e,t,n){switch(e.state){case`disabled`:return t.enrolled===`none`?{dot:`idle`,ping:!1,headline:`Not connected`,detail:null,action:`enable`,secondaryAction:`none`,retrying:!1}:{dot:`idle`,ping:!1,headline:`Turned off`,detail:`This machine stays enrolled.`,action:`enable`,secondaryAction:`leave`,retrying:!1};case`enrolling`:return{dot:`warning`,ping:!1,headline:`Ready to enrol`,detail:`Start enrollment, then approve this machine on your Hub.`,action:`enroll`,secondaryAction:`disable`,retrying:!1};case`awaiting_approval`:return{dot:`warning`,ping:!0,headline:`Waiting for approval on the Hub`,detail:`Compare every field below before approving.`,action:`open-hub`,secondaryAction:`cancel-enrollment`,retrying:!1};case`connecting`:return{dot:`warning`,ping:!0,headline:`Connecting`,detail:null,action:`none`,secondaryAction:`none`,retrying:!1};case`authenticating`:return{dot:`warning`,ping:!0,headline:`Authenticating`,detail:null,action:`none`,secondaryAction:`none`,retrying:!1};case`online`:return{dot:`success`,ping:!0,headline:`Connected`,detail:e.activeChannels===1?`1 active session`:`${e.activeChannels} active sessions`,action:`disable`,secondaryAction:`none`,retrying:!1};case`degraded`:{if(e.degradedMode===`backing_off`){let t=e.nextRetryAt===void 0?null:lt(e.nextRetryAt,n),r=e.reconnectAttempt;return{dot:`warning`,ping:!0,headline:`Reconnecting`,detail:[t===null?null:t===`now`?`Retrying now`:`Next attempt in ${t}`,r===void 0||r===0?null:`attempt ${r}`].filter(e=>e!==null).join(` · `),action:`none`,secondaryAction:`none`,retrying:!0}}let t=ct[e.failure??`internal_error`];return{dot:`destructive`,ping:!1,headline:t.headline,detail:t.detail,action:t.action,secondaryAction:t.action===`leave`?`none`:`leave`,retrying:!1}}case`revoked`:return{dot:`destructive`,ping:!1,headline:`Revoked at the Hub`,detail:`This will not retry. Leaving erases this machine's key so you can enrol again.`,action:`leave`,secondaryAction:`open-hub`,retrying:!1};case`version_incompatible`:return{dot:`destructive`,ping:!1,headline:`Incompatible Hub version`,detail:`This will not retry. Update Ryco, or the Hub, so both speak the same protocol.`,action:`none`,secondaryAction:`none`,retrying:!1};case`stopping`:return{dot:`idle`,ping:!1,headline:`Shutting down`,detail:null,action:`none`,secondaryAction:`none`,retrying:!1}}}function dt(e){return e.enrolled===`none`}var ft=5e3,pt=15e3,mt={enable:`Enable`,disable:`Turn off`,enroll:`Start enrollment`,"cancel-enrollment":`Cancel`,"open-hub":`Open Hub`,retry:`Retry now`,leave:`Leave this Hub`,restart:`Restart Ryco`},ht=1e4;function gt({desktopBridge:e}){let t=Ve(1e3),n=R(),[i,o]=(0,X.useState)(null),[s,c]=(0,X.useState)(null),l=(0,X.useRef)(new Map),u=I(e=>e.closeSettings),[d,f]=(0,X.useState)(null),[p,m]=(0,X.useState)(``),[h,g]=(0,X.useState)(null),[_,y]=(0,X.useState)(``),[x,w]=(0,X.useState)(null),[D,k]=(0,X.useState)(null),[A,j]=(0,X.useState)(``),[P,F]=(0,X.useState)(null),[ee,B]=(0,X.useState)(!1),[te,ne]=(0,X.useState)(null),[V,H]=(0,X.useState)(null),[U,W]=(0,X.useState)(null),[re,G]=(0,X.useState)(!1),[ae,oe]=(0,X.useState)(!1),[K,se]=(0,X.useState)(null),[ce,le]=(0,X.useState)(!1),[de,pe]=(0,X.useState)(null),[me,he]=(0,X.useState)(!1),[ge,_e]=(0,X.useState)(null),[ve,ye]=(0,X.useState)(!1),[be,xe]=(0,X.useState)(null),[Se,Ce]=(0,X.useState)(``),J=(0,X.useRef)(!0),we=(0,X.useRef)(null),{copyToClipboard:Te}=fe(),Ee=typeof window<`u`&&window.isSecureContext&&navigator.clipboard?.writeText!=null;(0,X.useEffect)(()=>(J.current=!0,()=>{J.current=!1}),[]);let De=(0,X.useCallback)(async()=>{try{let[e,t]=await Promise.all([S(),C()]),n=e.state===`awaiting_approval`?await E():null;if(!J.current)return;o({status:e,identity:t,enrollment:n,readAt:Date.now()}),ne(null)}catch(e){if(!J.current)return;ne(e instanceof Error?e.message:`Unable to read Hub status.`)}},[]);(0,X.useEffect)(()=>{let e=N({lifecycle:M,run:De,resolveDelayMs:()=>ft,jitterRatio:.1});return we.current=e,()=>{we.current===e&&(we.current=null),e.stop()}},[De]);let Oe=(0,X.useCallback)(()=>we.current?.refresh()??De(),[De]);(0,X.useEffect)(()=>{e&&e.getHubLaunchConfig().then(e=>{J.current&&(g(e),y(e.origin??``),j(e.nodeName??``),H(null))}).catch(e=>{J.current&&H(e instanceof Error?e.message:`Unable to read Hub launch configuration.`)})},[e]),(0,X.useEffect)(()=>()=>{for(let e of l.current.values())e();l.current.clear()}),(0,X.useEffect)(()=>{e?.getHostedIdentityState&&e.getHostedIdentityState().then(e=>{J.current&&(se(e),pe(null))}).catch(()=>{J.current&&(se({status:`unavailable`}),pe(`Unable to read the native account setup state.`))})},[e]);let ke=(0,X.useCallback)(async t=>{let n=t===`connect`?e?.connectHostedIdentity:e?.disconnectHostedIdentity;if(n){le(!0),pe(null);try{let e=await n();if(!J.current)return;se(e)}catch{if(!J.current)return;se({status:`unavailable`}),pe(t===`connect`?`Automatic secure setup did not finish. Retry when the Hub is reachable.`:`Unable to clear the native account session.`)}finally{J.current&&le(!1)}}},[e]),Ae=(0,X.useCallback)(async()=>{if(e?.refreshDesktopWorkspaceCatalog){c(null);try{await e.refreshDesktopWorkspaceCatalog()}catch{c(`Unable to refresh this account's machine directory.`)}}},[e]);(0,X.useEffect)(()=>{K?.status===`ready`&&Ae()},[K?.status,Ae]);let Re=(0,X.useCallback)(e=>{l.current.has(e)||l.current.set(e,z(e))},[]),ze=(0,X.useCallback)(e=>{l.current.get(e)?.(),l.current.delete(e)},[]),Be=(0,X.useCallback)(e=>{Re(e),a.getState().setActiveEnvironmentId(e),u()},[u,Re]),Ue=(0,X.useCallback)(async()=>{if(!(!e?.verifyDesktopWorkspaceApproval||!d)){c(null);try{await e.verifyDesktopWorkspaceApproval({nodeId:d.nodeId,environmentId:r.make(d.environmentId),payload:p.trim()});let t=L(r.make(d.environmentId));globalThis.setTimeout(t,ht),await e.cancelDesktopWorkspaceVerification?.(d.handle).catch(()=>void 0),f(null),m(``)}catch{c(`That approval code does not match this Desktop client, machine, account, or current node security state.`)}}},[e,p,d]),qe=(0,X.useCallback)(async t=>{if(e?.beginDesktopWorkspaceVerification){c(null);try{d&&await e.cancelDesktopWorkspaceVerification?.(d.handle).catch(()=>void 0);let n=await e.beginDesktopWorkspaceVerification({nodeId:t.nodeId,environmentId:r.make(t.environmentId)});f({...t,handle:n.handle}),m(``)}catch{c(`Unable to introduce this Desktop client to that machine. Confirm it is online and retry.`)}}},[e,d]),Je=(0,X.useCallback)(async(t,n)=>{let r=t===`connect`?e?.connectHostedGitHub:e?.disconnectHostedGitHub;if(r){he(!0),_e(null);try{let e=await r(n?{totpCode:n}:void 0);if(!J.current)return;se(e.state),e.outcome===`step-up-required`?(xe(t),Ce(``)):(xe(null),Ce(``),ye(!1),e.outcome===`last-primary-credential`?_e(`Add another primary sign-in method before disconnecting GitHub.`):e.outcome===`unavailable`&&_e(`GitHub account access is temporarily unavailable.`))}catch{J.current&&_e(`GitHub account access is temporarily unavailable.`)}finally{J.current&&he(!1)}}},[e]),Ye=(0,X.useCallback)(async t=>{W(t),ne(null);try{switch(t){case`enroll`:await v();break;case`cancel-enrollment`:await O();break;case`retry`:await T();break;case`leave`:await b();break;case`enable`:case`disable`:await e?.setHubLaunchConfig({enabled:t===`enable`});return;case`restart`:if(!e?.restartApp)throw Error(`Desktop restart is unavailable.`);await e.restartApp();return;case`open-hub`:{let e=h?.origin;e&&window.open(e,`_blank`,`noopener,noreferrer`);return}default:return}await Oe()}catch(e){if(!J.current)return;ne(e instanceof Error?e.message:`That didn't work.`)}finally{J.current&&W(null)}},[h,e,Oe]),Xe=(0,X.useCallback)(async()=>{if(!e||_.trim()===``){w(null),k(null);return}let t=await e.validateHubOrigin(_);if(J.current){if(t.ok){y(t.origin),w(null),k(null);return}k(t.suggestion??null),w({empty:`Enter a Hub address.`,too_long:`That address is too long.`,not_a_url:`That doesn't look like an address.`,insecure_scheme:`A Hub address must use https.`,has_credentials:`Remove the username and password from the address.`,has_path:`Use the Hub's address only, without a path.`,invalid:`That address can't be used.`}[t.reason])}},[e,_]),Ze=(0,X.useCallback)(async t=>{if(e){W(`enable`);try{await e.setHubLaunchConfig({origin:t})}catch(e){if(!J.current)return;ne(e instanceof Error?e.message:`Unable to save the Hub address.`),W(null)}}},[e]),Qe=(0,X.useCallback)(e=>{j(e),F(e.trim().length>100?`Use 100 characters or fewer.`:null)},[]),$e=(0,X.useCallback)(async()=>{if(!e)return;let t=A.trim();if(t.length>100){F(`Use 100 characters or fewer.`);return}B(!0),F(null);try{await e.setHubLaunchConfig({nodeName:t===``?null:t})}catch(e){if(!J.current)return;F(e instanceof Error?e.message:`Unable to save the Hub node name.`),B(!1)}},[e,A]),Z=(0,X.useCallback)(async t=>{if(e&&!(!await e.confirm(t?`Allow permissioned-file storage when the system credential store is unavailable? Ryco will restart. Existing keys are not moved.`:`Stop allowing permissioned-file Hub key storage? Ryco will restart.`)||!J.current)){G(!0),H(null);try{await e.setHubLaunchConfig({allowFileSecretStore:t})}catch(e){if(!J.current)return;H(e instanceof Error?e.message:`Unable to save the key storage setting.`),G(!1)}}},[e]),et=(0,X.useCallback)(async()=>{if(e)try{let t=new URL(nt,window.location.href).toString();if(!await e.openExternal(t))throw Error(`The relay guide could not be opened.`);H(null)}catch(e){if(!J.current)return;H(e instanceof Error?e.message:`Unable to open the relay guide.`)}},[e]);if(!e)return null;let tt=i!==null&&t-i.readAt>pt,$=i===null?null:ut(i.status,i.identity,t),rt=i!==null&&dt(i.identity),it=_.trim()!==(h?.origin??``),at=A.trim()!==(h?.nodeName??``),st=h!==null&&h.origin!==null&&e.getHostedIdentityState!==void 0&&e.connectHostedIdentity!==void 0&&i?.identity.enrolled===`none`&&($?.action===`enable`||$?.action===`enroll`),ct=(e,t)=>e===`none`?null:(0,Q.jsx)(q,{size:`xs`,variant:t,disabled:U!==null,onClick:()=>{if(e===`leave`){oe(!0);return}Ye(e)},children:U===e?`Working…`:mt[e]});return(0,Q.jsxs)(He,{title:`Hub`,children:[(0,Q.jsx)(Y,{title:`Connection`,description:st?`Connect your Ryco account below. Ryco will register this Mac with this Hub automatically.`:$===null?`Loading…`:$.detail===null?`Reach this Mac from anywhere, including behind NAT or CGNAT, without opening a port.`:$.detail,status:(0,Q.jsxs)(Q.Fragment,{children:[$===null?null:(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`inline-block size-2 shrink-0 rounded-full ${tt?`bg-muted-foreground/40`:$.dot===`success`?`bg-success`:$.dot===`warning`?`bg-warning`:$.dot===`destructive`?`bg-destructive`:`bg-muted-foreground/40`}`,"aria-hidden":!0}),tt?`${$.headline} · last checked ${Math.round((t-i.readAt)/1e3)}s ago`:st?`Ready for account setup`:$.headline]}),te?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:te}):null]}),control:$===null?null:(0,Q.jsxs)(Q.Fragment,{children:[ct(st?`none`:$.action,$.action===`leave`?`destructive-outline`:`outline`),ct(st?`none`:$.secondaryAction,$.secondaryAction===`leave`?`destructive-outline`:`outline`)]}),children:(0,Q.jsx)(Ke,{children:i?.enrollment?(0,Q.jsxs)(`div`,{className:`pb-3.5`,children:[(0,Q.jsx)(`p`,{className:`pb-2 text-xs text-muted-foreground/80`,children:`Compare every field with the Hub's approval screen before approving.`}),(0,Q.jsxs)(Ge,{className:`rounded-xl border border-border/60 bg-muted/20 p-3`,children:[(0,Q.jsx)(We,{term:`Label`,children:i.enrollment.label}),(0,Q.jsx)(We,{term:`Platform`,children:`${i.enrollment.platformOs} · ${i.enrollment.platformArch}`}),(0,Q.jsx)(We,{term:`Version`,mono:!0,children:i.enrollment.clientVersion}),(0,Q.jsx)(We,{term:`Algorithm`,children:i.enrollment.algorithm}),(0,Q.jsx)(We,{term:`Fingerprint`,mono:!0,children:i.enrollment.fingerprint}),(0,Q.jsx)(We,{term:`Expires`,children:new Date(i.enrollment.expiresAt).toLocaleString()}),(0,Q.jsx)(We,{term:`Device code`,mono:!0,action:Ee?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:()=>Te(i.enrollment.deviceCode),children:`Copy`}):null,children:i.enrollment.deviceCode})]}),(0,Q.jsx)(`p`,{className:`pt-2 text-[11px] text-muted-foreground/70`,children:`The device code only routes the request. It does not prove which machine you are approving.`}),(0,Q.jsxs)(`p`,{className:`flex items-center gap-1.5 pt-2 text-xs text-warning`,children:[(0,Q.jsx)(ie,{className:`size-3.5 shrink-0`}),`If the fingerprint on the Hub differs by even one character, deny it there and cancel here.`]})]}):null})}),h!==null&&h.origin!==null&&e.getHostedIdentityState!==void 0?(0,Q.jsx)(Y,{title:`Ryco account`,description:K===null?`Checking this Mac's native account setup…`:st&&K.status===`ready`?`You are signed in. Finish setup to register this Mac with the Hub and verify local trust automatically.`:K.status===`ready`?`Your native account session and this Mac's automatic node claim are ready. Local trust introduction is verified.`:K.status===`signed-out`?`Sign in in your browser. Ryco will claim this Mac's node and verify its local trust automatically.`:`Automatic secure setup did not finish. Existing node and trust state are preserved while you retry.`,status:(0,Q.jsxs)(Q.Fragment,{children:[K===null?null:(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`inline-block size-2 shrink-0 rounded-full ${st&&K.status===`ready`?`bg-warning`:K.status===`ready`?`bg-success`:K.status===`unavailable`?`bg-warning`:`bg-muted-foreground/40`}`,"aria-hidden":!0}),K.status===`ready`?st?`Signed in · Node setup needed`:`Secure setup complete`:K.status===`unavailable`?`Setup needs attention`:`Not signed in`]}),de?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:de}):null]}),control:K===null?null:st&&K.status===`ready`?(0,Q.jsx)(q,{size:`xs`,disabled:ce||!e.connectHostedIdentity,onClick:()=>void ke(`connect`),children:ce?`Finishing setup…`:`Finish setup`}):K.status===`ready`?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,disabled:ce||!e.disconnectHostedIdentity,onClick:()=>void ke(`disconnect`),children:ce?`Working…`:`Sign out`}):(0,Q.jsx)(q,{size:`xs`,variant:`outline`,disabled:ce||!e.connectHostedIdentity,onClick:()=>void ke(`connect`),children:ce?`Opening browser…`:K.status===`unavailable`?`Retry secure setup`:`Connect account`})}):null,K?.status===`ready`&&e?.getDesktopWorkspaceState?(0,Q.jsxs)(Y,{title:`Workspace machines`,description:`Connect, open, and manage each machine independently. Cached lists remain read-only until connected.`,status:s??`${n.machines.filter(e=>e.online).length} online · ${n.activeConnectionCount} connected`,control:(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:()=>void Ae(),children:`Refresh`}),children:[(0,Q.jsx)(Ge,{children:n.machines.map(e=>(0,Q.jsx)(We,{term:e.label,action:(0,Q.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1.5`,children:e.nodeId&&e.online&&(e.nativeTrust===`unverified`||e.nativeTrust===`unknown`)?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:()=>{qe({nodeId:e.nodeId,environmentId:e.environmentId})},children:`Verify`}):e.nativeTrust===`verified`&&e.online?e.connectionState===`connected`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:()=>Be(e.environmentId),children:`Open`}),(0,Q.jsx)(q,{size:`xs`,variant:`ghost`,onClick:()=>ze(e.environmentId),children:`Disconnect`})]}):(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:()=>Re(e.environmentId),children:`Connect`}):null}),children:e.nativeTrust===`verified`?e.online?`Verified · ${e.connectionState===`connected`?`Connected`:`Online`}`:`Verified · Offline`:e.nativeTrust===`identity-conflict`?`Identity changed · Locked`:e.online?`Needs verification`:`Needs verification · Offline`},`${e.nodeId??`unknown`}:${e.environmentId}`))}),d?(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2 border-t border-border/60 py-3 sm:flex-row`,children:[(0,Q.jsx)(ue,{value:p,onChange:e=>m(e.target.value),placeholder:`Paste the approval code shown by this exact node`,"aria-label":`Machine approval code`}),(0,Q.jsx)(q,{size:`sm`,disabled:p.trim().length===0,onClick:()=>void Ue(),children:`Verify`}),(0,Q.jsx)(q,{size:`sm`,variant:`ghost`,onClick:()=>{e.cancelDesktopWorkspaceVerification?.(d.handle).catch(()=>void 0),f(null),m(``)},children:`Cancel`})]}):null]}):null,K?.status===`ready`&&K.github!==void 0?(0,Q.jsx)(Y,{title:K.github.identity?`GitHub · @${K.github.identity.login}`:`GitHub`,description:K.github.identity?`Use this GitHub identity to sign in to Ryco. Repository access remains separate.`:`Connect GitHub as another way to sign in. Ryco requests no repository access.`,status:ge?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:ge}):K.github.identity?.displayName?K.github.identity.displayName:null,control:K.github.linkAvailable?K.github.identity?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,disabled:me||!e?.disconnectHostedGitHub,onClick:()=>ye(!0),children:me?`Working…`:`Disconnect`}):(0,Q.jsx)(q,{size:`xs`,variant:`outline`,disabled:me||!e?.connectHostedGitHub,onClick:()=>void Je(`connect`),children:me?`Opening browser…`:`Connect GitHub`}):null}):null,(0,Q.jsx)(Y,{title:`Hub address`,description:rt?`The address of the Hub you or your team operate.`:`Locked while this machine is enrolled. Leave this Hub to change it.`,status:x?(0,Q.jsxs)(`span`,{className:`block text-destructive`,children:[x,D?(0,Q.jsxs)(`button`,{type:`button`,className:`ml-1 underline underline-offset-2`,onClick:()=>{y(D),w(null),k(null)},children:[`Use `,D]}):null]}):null,control:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ue,{value:_,disabled:!rt||U!==null,placeholder:`https://…`,className:`w-64 font-mono text-xs`,onChange:e=>y(e.currentTarget.value),onBlur:()=>void Xe()}),rt&&it&&x===null&&_.trim()!==``?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,disabled:U!==null,onClick:()=>void Ze(_.trim()),children:`Save and restart`}):null]})}),(0,Q.jsx)(Y,{title:`Node name`,description:rt?`Choose the name proposed on the Hub approval screen. Leave it blank for a stable automatic name.`:i?.identity.enrolled===`pending`?`Locked while enrollment is pending. Cancel enrollment to change the proposed name.`:`Managed on the Hub after enrollment. An owner can rename this node from its Hub details.`,status:P?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:P}):null,control:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ue,{value:A,disabled:!rt||U!==null||ee,placeholder:`Automatic: machine name · node code`,"aria-label":`Hub node name`,className:`w-64 text-xs`,onChange:e=>Qe(e.currentTarget.value)}),rt&&at&&P===null?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,disabled:U!==null||ee,onClick:()=>void $e(),children:ee?`Saving…`:`Save and restart`}):null]})}),i!==null&&i.status.state===`online`?(0,Q.jsx)(Y,{title:`Who can connect`,description:`Managed on the Hub, not here. Sessions arriving through the Hub carry a role: viewer reads, operator edits files and runs terminals, owner also changes credentials and server policy.`}):null,(0,Q.jsx)(ot,{config:h,identity:i?.identity??null,status:i?.status??null,nowMs:t,savingFileFallback:re||U!==null,configError:V,onFileFallbackChange:e=>void Z(e),onOpenGuide:()=>void et()}),(0,Q.jsx)(Le,{open:ae,onOpenChange:oe,children:(0,Q.jsxs)(Pe,{children:[(0,Q.jsxs)(je,{children:[(0,Q.jsx)(Ie,{children:`Leave this Hub?`}),(0,Q.jsxs)(Fe,{children:[`This erases this machine's Hub key. You can enrol again afterwards, but it will join as a new machine and needs a new approval.`,(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`br`,{}),`It does `,(0,Q.jsx)(`strong`,{children:`not`}),` revoke anything on the Hub. The old entry stays there until an owner removes it.`]})]}),(0,Q.jsxs)(Me,{children:[(0,Q.jsx)(Ne,{children:`Keep it`}),(0,Q.jsx)(q,{variant:`destructive`,disabled:U!==null,onClick:()=>{oe(!1),Ye(`leave`)},children:`Erase this machine's key`})]})]})}),(0,Q.jsx)(Le,{open:ve,onOpenChange:ye,children:(0,Q.jsxs)(Pe,{children:[(0,Q.jsxs)(je,{children:[(0,Q.jsx)(Ie,{children:`Disconnect GitHub?`}),(0,Q.jsx)(Fe,{children:`GitHub stops working as a Ryco sign-in method. Ryco refuses this change when it is your only primary sign-in method. Repository access is separate.`})]}),(0,Q.jsxs)(Me,{children:[(0,Q.jsx)(Ne,{children:`Cancel`}),(0,Q.jsx)(q,{variant:`destructive`,disabled:me,onClick:()=>void Je(`disconnect`),children:`Disconnect GitHub`})]})]})}),(0,Q.jsx)(Le,{open:be!==null,onOpenChange:t=>{!t&&!me&&(be===`connect`&&e?.cancelHostedGitHubConnection?.(),xe(null),Ce(``))},children:(0,Q.jsxs)(Pe,{children:[(0,Q.jsxs)(je,{children:[(0,Q.jsx)(Ie,{children:`Confirm this account change`}),(0,Q.jsx)(Fe,{children:`Enter a current code from your authenticator app. The pending GitHub authorization is reused; Ryco does not reopen the browser.`})]}),(0,Q.jsx)(ue,{"aria-label":`Authenticator code`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:16,value:Se,onChange:e=>Ce(e.currentTarget.value.replace(/\D/gu,``))}),(0,Q.jsxs)(Me,{children:[(0,Q.jsx)(Ne,{children:`Cancel`}),(0,Q.jsx)(q,{disabled:me||Se.length<6,onClick:()=>{be!==null&&Je(be,Se)},children:`Confirm`})]})]})})]})}var _t=443,vt=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function yt(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:vt.format(t)}function bt(e){let t=(0,Z.c)(21),{tooltipText:n,dotClassName:r,pingClassName:i}=e,a;t[0]===i?a=t[1]:(a=i?(0,Q.jsx)(`span`,{className:G(`absolute inline-flex h-full w-full animate-status-ping rounded-full`,i)}):null,t[0]=i,t[1]=a);let o;t[2]===r?o=t[3]:(o=G(`relative inline-flex size-2 rounded-full`,r),t[2]=r,t[3]=o);let s;t[4]===o?s=t[5]:(s=(0,Q.jsx)(`span`,{className:o}),t[4]=o,t[5]=s);let c;t[6]!==a||t[7]!==s?(c=(0,Q.jsxs)(Q.Fragment,{children:[a,s]}),t[6]=a,t[7]=s,t[8]=c):c=t[8];let l=c;if(!n){let e;return t[9]===l?e=t[10]:(e=(0,Q.jsx)(`span`,{className:`relative flex size-3 shrink-0 items-center justify-center`,children:l}),t[9]=l,t[10]=e),e}let u;t[11]!==l||t[12]!==n?(u=(0,Q.jsx)(`button`,{type:`button`,title:n,"aria-label":n,className:`relative flex size-3 shrink-0 cursor-help items-center justify-center rounded-full outline-hidden`,children:l}),t[11]=l,t[12]=n,t[13]=u):u=t[13];let d=u,f;t[14]===d?f=t[15]:(f=(0,Q.jsx)(K,{render:d}),t[14]=d,t[15]=f);let p;t[16]===n?p=t[17]:(p=(0,Q.jsx)(se,{side:`top`,className:`max-w-80 whitespace-pre-wrap leading-tight`,children:n}),t[16]=n,t[17]=p);let m;return t[18]!==f||t[19]!==p?(m=(0,Q.jsxs)(ce,{children:[f,p]}),t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function xt(e,t,n){let r=e?.connectionState??`disconnected`;if(r===`connected`){let r=e?.connectedAt??t.lastConnectedAt;return r?`Connected for ${oe(r,n)}`:null}return r===`connecting`?null:r===`error`?e?.lastError??`An unknown connection error occurred.`:t.lastConnectedAt?`Last connected at ${yt(t.lastConnectedAt)}`:`Not connected yet.`}function St(e){let t=e.username?`${e.username}@${e.hostname}`:e.hostname;return e.port?`${t}:${e.port}`:t}function Ct(e){let t=e.host.trim();if(t.length===0)throw Error(`SSH host or alias is required.`);let n=t,r=e.username.trim()||null,i=null,a=n.lastIndexOf(`@`);if(a>0){let e=n.slice(0,a).trim();n=n.slice(a+1).trim(),!r&&e.length>0&&(r=e)}let o=/^\[([^\]]+)\](?::(\d+))?$/u.exec(n);if(o)n=o[1].trim(),o[2]&&(i=Number.parseInt(o[2],10));else{let e=n.split(`:`);e.length===2&&/^\d+$/u.test(e[1]??``)&&(n=e[0].trim(),i=Number.parseInt(e[1],10))}let s=e.port.trim();if(s.length>0&&(i=Number.parseInt(s,10)),n.length===0)throw Error(`SSH host or alias is required.`);if(i!==null&&(!Number.isInteger(i)||i<=0||i>65535))throw Error(`SSH port must be between 1 and 65535.`);return{alias:n,hostname:n,username:r,port:i}}function wt(e){let t=e.trim();if(!t)return null;try{let e=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//u.test(t)||t.startsWith(`//`)?t:`https://${t}`,n=new URL(e,window.location.origin),r=P(n);if(r)return{host:r.host,pairingCode:r.token};let i=j(n);return i?{host:n.origin,pairingCode:i}:null}catch{return null}}function Tt(e){let t=wt(e.host);if(t)return t;let n=e.host.trim(),r=e.pairingCode.trim();if(!n)throw Error(`Enter a backend host.`);if(!r)throw Error(`Enter a pairing code.`);return{host:n,pairingCode:r}}function Et(e){let t=`Failed to connect SSH host.`;return(e instanceof Error?e.message:t).replace(/^Error invoking remote method 'desktop:ensure-ssh-environment':\s*/u,``).replace(/^Ssh[A-Za-z]+Error:\s*/u,``).trim()||t}var Dt=`border-t border-border/60 px-4 py-4 first:border-t-0 sm:px-5`,Ot=`border-t border-border/60 px-4 py-2.5 first:border-t-0 sm:px-5`,kt=`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`;function At(e){return Dt}function jt(e,t){return e===`endpoint-rail`?G(`relative border-t border-border/60 px-4 py-3 first:border-t-0 sm:px-5`,!t&&`bg-muted/20`):G(Ot,!t&&`bg-muted/24`)}function Mt(e){return[...e].toSorted((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())}function Nt(e){return[...e].toSorted((e,t)=>e.current===t.current?e.connected===t.connected?new Date(t.issuedAt).getTime()-new Date(e.issuedAt).getTime():e.connected?-1:1:e.current?-1:1)}function Pt(e){return{...e,createdAt:i(e.createdAt),expiresAt:i(e.expiresAt)}}function Ft(e){return{...e,issuedAt:i(e.issuedAt),expiresAt:i(e.expiresAt),lastConnectedAt:e.lastConnectedAt===null?null:i(e.lastConnectedAt)}}function It(e,t){let n=e.findIndex(e=>e.id===t.id);if(n===-1)return Mt([...e,t]);let r=[...e];return r[n]=t,Mt(r)}function Lt(e,t){return e.filter(e=>e.id!==t)}function Rt(e,t){let n=e.findIndex(e=>e.sessionId===t.sessionId);if(n===-1)return Nt([...e,t]);let r=[...e];return r[n]=t,Nt(r)}function zt(e,t){return e.filter(e=>e.sessionId!==t)}function Bt(e,t){let n=e.filter(e=>e.status!==`unavailable`);if(t){let e=n.find(e=>Ht(e)===t);if(e)return e}return n.find(e=>e.isDefault)??n.find(e=>e.reachability!==`loopback`)??n.find(e=>e.compatibility.hostedHttpsApp===`compatible`)??null}function Vt(e){return e.id.startsWith(`tailscale-magicdns:`)}function Ht(e){if(e.id.startsWith(`desktop-loopback:`)||e.id.startsWith(`server-loopback:`))return`desktop-core:loopback:http`;if(e.id.startsWith(`desktop-lan:`)||e.id.startsWith(`server-network:`))return`desktop-core:lan:http`;if(e.id.startsWith(`tailscale-ip:`))return`tailscale:ip:http`;if(Vt(e))return`tailscale:magicdns:https`;let t=`unknown`;try{t=new URL(e.httpBaseUrl).protocol.replace(/:$/u,``)}catch{}return`${e.provider.id}:${e.reachability}:${t}:${e.label}`}function Ut(e){switch(e){case`mixed-content-blocked`:return`Hosted app blocked`;case`requires-configuration`:return`Setup required for hosted app`;default:return null}}function Wt(e){switch(e){case`mixed-content-blocked`:return`The hosted HTTPS app cannot connect to HTTP endpoints because browsers block mixed content.`;case`requires-configuration`:return`Configure HTTPS access before using this endpoint from the hosted app.`;default:return null}}function Gt(e,t){return e.compatibility.hostedHttpsApp===`compatible`?tt(e.httpBaseUrl,t)??et(e.httpBaseUrl,t):et(e.httpBaseUrl,t)}function Kt(e){let t=new URL(`/pair`,window.location.href);return A(t,e).toString()}function qt(e){try{let t=new URL(e);return t.pathname===`/pair`&&t.searchParams.has(`host`)}catch{return!1}}var Jt=(0,X.memo)(function(e){let t=(0,Z.c)(146),{pairingLink:n,endpointUrl:r,endpoints:i,defaultEndpointKey:a,presentation:o,revokingPairingLinkId:s,onRevoke:c}=e,l=o===void 0?`current`:o,u=Ve(1e3),d;t[0]===n.expiresAt?d=t[1]:(d=new Date(n.expiresAt).getTime(),t[0]=n.expiresAt,t[1]=d);let f=d,[p,m]=(0,X.useState)(!1),h;t[2]===n.credential?h=t[3]:(h=Kt(n.credential),t[2]=n.credential,t[3]=h);let g=h,_;t[4]!==r||t[5]!==n.credential?(_=r!=null&&r!==``?tt(r,n.credential):null,t[4]=r,t[5]=n.credential,t[6]=_):_=t[6];let v=_,y;if(t[7]!==a||t[8]!==i||t[9]!==n.credential){let e=Bt(i,a);y=e?Gt(e,n.credential):null,t[7]=a,t[8]=i,t[9]=n.credential,t[10]=y}else y=t[10];let b=y,S;if(t[11]!==i||t[12]!==n.credential){let e;t[14]===n.credential?e=t[15]:(e=e=>{let t=Gt(e,n.credential);return{key:Ht(e),label:e.label,url:t,detail:qt(t)?`Hosted app link`:`Backend pairing URL`}},t[14]=n.credential,t[15]=e),S=i.filter(an).map(e),t[11]=i,t[12]=n.credential,t[13]=S}else S=t[13];let C=S,w;t[16]!==g||t[17]!==b||t[18]!==r||t[19]!==v||t[20]!==n.credential?(w=b??(r!=null&&r!==``?v??et(r,n.credential):x(window.location.hostname)?null:g),t[16]=g,t[17]=b,t[18]=r,t[19]=v,t[20]=n.credential,t[21]=w):w=t[21];let T=w,E=T??n.credential,D=T!==null&&qt(T),O=typeof window<`u`&&window.isSecureContext&&navigator.clipboard?.writeText!=null,k;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(k={onCopy:on,onError:(e,t)=>{m(!0),V.add(pe({type:`error`,title:O?t===`hosted-link`?`Could not copy hosted app link`:t===`link`?`Could not copy pairing URL`:`Could not copy pairing code`:`Clipboard copy unavailable`,description:O?e.message:`Showing the full value instead.`}))}},t[22]=k):k=t[22];let{copyToClipboard:A}=fe(k),j;t[23]===A?j=t[24]:(j=(e,t)=>{A(e,t)},t[23]=A,t[24]=j);let M=j,N=sn,P;t[25]!==M||t[26]!==n.credential?(P=()=>{M(n.credential,`code`)},t[25]=M,t[26]=n.credential,t[27]=P):P=t[27];let F=P,I;t[28]!==M||t[29]!==T?(I=()=>{T&&M(T,N(T))},t[28]=M,t[29]=T,t[30]=I):I=t[30];let ee=I,L;t[31]===n.expiresAt?L=t[32]:(L=yt(n.expiresAt),t[31]=n.expiresAt,t[32]=L);let R=L,z=n.role===`owner`?`Owner`:`Client`,B=n.label??`${z} link`,te;t[33]!==a||t[34]!==C?(te=C.find(e=>e.key===a)??C[0]??null,t[33]=a,t[34]=C,t[35]=te):te=t[35];let H=te?.label??`URL`,W,re,ie,G,oe,K,se,ce,le;if(t[36]!==M||t[37]!==H||t[38]!==C||t[39]!==R||t[40]!==f||t[41]!==F||t[42]!==ee||t[43]!==p||t[44]!==u||t[45]!==n.createdAt||t[46]!==n.expiresAt||t[47]!==l||t[48]!==B||t[49]!==z||t[50]!==T){le=Symbol.for(`react.early_return_sentinel`);bb0:{let e=C.filter(cn),r=C.filter(ln),i;t[60]!==M||t[61]!==C?(i=(e,t)=>{let n=e===void 0?C:e,r=t===void 0||t;return n.map(e=>(0,Q.jsx)(Oe,{onClick:()=>M(e.url,N(e.url)),children:(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`span`,{className:`block truncate`,children:e.label}),r?(0,Q.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:e.detail}):null]})},e.key))},t[60]=M,t[61]=C,t[62]=i):i=t[62];let a=i,o;t[63]===F?o=t[64]:(o=e=>(0,Q.jsx)(Oe,{onClick:F,children:(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`span`,{className:`block truncate`,children:`Copy code`}),e===void 0||e?(0,Q.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:`Token only`}):null]})}),t[63]=F,t[64]=o);let s=o,c;t[65]===a?c=t[66]:(c=(e,t,n)=>t.length>0?(0,Q.jsxs)(Q.Fragment,{children:[n?(0,Q.jsx)(we,{}):null,(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:e}),a(t,!1)]})]}):null,t[65]=a,t[66]=c);let d=c,h=t=>(0,Q.jsxs)(Q.Fragment,{children:[t?.codeFirst?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:`Pairing code`}),s(!1)]}),C.length>0?(0,Q.jsx)(we,{}):null]}):null,d(`Pairing URLs`,e,!1),d(`Hosted app link`,r,e.length>0),t?.codeFirst?null:(0,Q.jsxs)(Q.Fragment,{children:[C.length>0?(0,Q.jsx)(we,{}):null,(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:`Pairing code`}),s(!1)]})]})]});if(f<=u){le=null;break bb0}t[67]===l?ce=t[68]:(ce=At(l),t[67]=l,t[68]=ce),K=kt;let g;t[69]===n.createdAt?g=t[70]:(g=yt(n.createdAt),t[69]=n.createdAt,t[70]=g);let _=`Link created at ${g}`,v;t[71]===_?v=t[72]:(v=(0,Q.jsx)(bt,{tooltipText:_,dotClassName:`bg-amber-400`}),t[71]=_,t[72]=v);let y;t[73]===B?y=t[74]:(y=(0,Q.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:B}),t[73]=B,t[74]=y);let b;t[75]===T?b=t[76]:(b=T?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ze,{openOnHover:!0,delay:250,closeDelay:100,render:(0,Q.jsx)(`button`,{type:`button`,className:`inline-flex size-4 shrink-0 items-center justify-center rounded-sm text-muted-foreground/50 outline-none hover:text-foreground`,"aria-label":`Show QR code`}),children:(0,Q.jsx)(U,{"aria-hidden":!0,className:`size-3`})}),(0,Q.jsx)(Re,{side:`top`,align:`start`,tooltipStyle:!0,className:`w-max`,children:(0,Q.jsx)(Ye,{value:T,size:88,level:`M`,marginSize:2,title:`Pairing link — scan to open on another device`})})]}):null,t[75]=T,t[76]=b);let x;t[77]===b?x=t[78]:(x=(0,Q.jsx)(Be,{children:b}),t[77]=b,t[78]=x);let S;t[79]!==v||t[80]!==y||t[81]!==x?(S=(0,Q.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[v,y,x]}),t[79]=v,t[80]=y,t[81]=x,t[82]=S):S=t[82];let w;t[83]!==u||t[84]!==n.expiresAt?(w=ae(n.expiresAt,u),t[83]=u,t[84]=n.expiresAt,t[85]=w):w=t[85];let E;t[86]!==z||t[87]!==w?(E=[z,w],t[86]=z,t[87]=w,t[88]=E):E=t[88];let D=E.join(` · `),k;t[89]!==R||t[90]!==D?(k=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,title:R,children:D}),t[89]=R,t[90]=D,t[91]=k):k=t[91];let A;t[92]===T?A=t[93]:(A=T===null?(0,Q.jsx)(`p`,{className:`text-[11px] text-muted-foreground/70`,children:`Copy the token and pair from another client using this backend's reachable host.`}):null,t[92]=T,t[93]=A),t[94]!==S||t[95]!==k||t[96]!==A?(se=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[S,k,A]}),t[94]=S,t[95]=k,t[96]=A,t[97]=se):se=t[97],oe=`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,W=Se,re=p,ie=m,G=O?(0,Q.jsx)(Q.Fragment,{children:T?(0,Q.jsxs)(Je,{"aria-label":`Copy selected endpoint`,children:[(0,Q.jsx)(q,{size:`xs`,variant:`outline`,className:`max-w-56`,title:`Copy pairing URL for: ${H}`,onClick:ee,children:(0,Q.jsxs)(`span`,{className:`truncate`,children:[`Copy pairing URL for: `,H]})}),(0,Q.jsx)(qe,{}),(0,Q.jsxs)(Te,{children:[(0,Q.jsx)(De,{render:(0,Q.jsx)(q,{size:`icon-xs`,variant:`outline`,"aria-label":`Choose endpoint to copy`}),children:(0,Q.jsx)(ne,{className:`size-3.5`})}),(0,Q.jsx)(J,{align:`end`,className:`min-w-60`,children:h()})]})]}):(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:F,children:`Copy code`})}):(0,Q.jsx)(_e,{render:(0,Q.jsx)(q,{size:`xs`,variant:`outline`}),children:T?`Show link`:`Show code`})}t[36]=M,t[37]=H,t[38]=C,t[39]=R,t[40]=f,t[41]=F,t[42]=ee,t[43]=p,t[44]=u,t[45]=n.createdAt,t[46]=n.expiresAt,t[47]=l,t[48]=B,t[49]=z,t[50]=T,t[51]=W,t[52]=re,t[53]=ie,t[54]=G,t[55]=oe,t[56]=K,t[57]=se,t[58]=ce,t[59]=le}else W=t[51],re=t[52],ie=t[53],G=t[54],oe=t[55],K=t[56],se=t[57],ce=t[58],le=t[59];if(le!==Symbol.for(`react.early_return_sentinel`))return le;let ue=T?D?`Hosted app pairing link`:`Pairing link`:`Pairing code`,de;t[98]===ue?de=t[99]:(de=(0,Q.jsx)(he,{children:ue}),t[98]=ue,t[99]=de);let ve=T?D?`Clipboard copy is unavailable here. Open or manually copy this hosted app link on the device you want to connect.`:`Clipboard copy is unavailable here. Open or manually copy this full pairing URL on the device you want to connect.`:`Clipboard copy is unavailable here. Manually copy this code into another client.`,ke;t[100]===ve?ke=t[101]:(ke=(0,Q.jsx)(be,{children:ve}),t[100]=ve,t[101]=ke);let je;t[102]!==de||t[103]!==ke?(je=(0,Q.jsxs)(me,{children:[de,ke]}),t[102]=de,t[103]=ke,t[104]=je):je=t[104];let Me=T?4:3,Ne;t[105]!==E||t[106]!==Me?(Ne=(0,Q.jsx)(Ae,{readOnly:!0,value:E,rows:Me,className:`text-xs leading-relaxed`,onFocus:un,onClick:dn}),t[105]=E,t[106]=Me,t[107]=Ne):Ne=t[107];let Pe;t[108]===T?Pe=t[109]:(Pe=T?(0,Q.jsx)(`div`,{className:`flex justify-center rounded-xl border border-border/60 bg-muted/30 p-4`,children:(0,Q.jsx)(Ye,{value:T,size:132,level:`M`,marginSize:2,title:`Pairing link — scan to open on another device`})}):null,t[108]=T,t[109]=Pe);let Fe;t[110]!==Ne||t[111]!==Pe?(Fe=(0,Q.jsxs)(ye,{className:`space-y-4`,children:[Ne,Pe]}),t[110]=Ne,t[111]=Pe,t[112]=Fe):Fe=t[112];let Ie;t[113]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,Q.jsx)(q,{variant:`outline`,onClick:()=>m(!1),children:`Done`}),t[113]=Ie):Ie=t[113];let Le;t[114]===F?Le=t[115]:(Le=O?(0,Q.jsx)(q,{variant:`outline`,size:`xs`,onClick:F,children:`Copy code`}):null,t[114]=F,t[115]=Le);let He;t[116]===Le?He=t[117]:(He=(0,Q.jsxs)(ge,{variant:`bare`,children:[Ie,Le]}),t[116]=Le,t[117]=He);let Ue;t[118]!==je||t[119]!==Fe||t[120]!==He?(Ue=(0,Q.jsxs)(xe,{className:`max-w-md`,children:[je,Fe,He]}),t[118]=je,t[119]=Fe,t[120]=He,t[121]=Ue):Ue=t[121];let Y;t[122]!==W||t[123]!==re||t[124]!==ie||t[125]!==G||t[126]!==Ue?(Y=(0,Q.jsxs)(W,{open:re,onOpenChange:ie,children:[G,Ue]}),t[122]=W,t[123]=re,t[124]=ie,t[125]=G,t[126]=Ue,t[127]=Y):Y=t[127];let We=s===n.id,Ge;t[128]!==c||t[129]!==n.id?(Ge=()=>void c(n.id),t[128]=c,t[129]=n.id,t[130]=Ge):Ge=t[130];let Ke=s===n.id?`Revoking…`:`Revoke`,Xe;t[131]!==We||t[132]!==Ge||t[133]!==Ke?(Xe=(0,Q.jsx)(q,{size:`xs`,variant:`destructive-outline`,disabled:We,onClick:Ge,children:Ke}),t[131]=We,t[132]=Ge,t[133]=Ke,t[134]=Xe):Xe=t[134];let Ze;t[135]!==oe||t[136]!==Y||t[137]!==Xe?(Ze=(0,Q.jsxs)(`div`,{className:oe,children:[Y,Xe]}),t[135]=oe,t[136]=Y,t[137]=Xe,t[138]=Ze):Ze=t[138];let Qe;t[139]!==K||t[140]!==se||t[141]!==Ze?(Qe=(0,Q.jsxs)(`div`,{className:K,children:[se,Ze]}),t[139]=K,t[140]=se,t[141]=Ze,t[142]=Qe):Qe=t[142];let $e;return t[143]!==ce||t[144]!==Qe?($e=(0,Q.jsx)(`div`,{className:ce,children:Qe}),t[143]=ce,t[144]=Qe,t[145]=$e):$e=t[145],$e}),Yt=(0,X.memo)(function(e){let t=(0,Z.c)(50),{clientSession:n,presentation:r,revokingClientSessionId:i,onRevokeSession:a}=e,o=r===void 0?`current`:r,s=Ve(1e3),c=n.current||n.connected,l=n.lastConnectedAt,u;t[0]!==c||t[1]!==l||t[2]!==s?(u=c?l?`Connected for ${oe(l,s)}`:`Connected`:l?`Last connected at ${yt(l)}`:`Not connected yet.`,t[0]=c,t[1]=l,t[2]=s,t[3]=u):u=t[3];let d=u,f=n.role===`owner`?`Owner`:`Client`,p;t[4]===n.client.deviceType?p=t[5]:(p=n.client.deviceType===`unknown`?null:n.client.deviceType[0]?.toUpperCase()+n.client.deviceType.slice(1),t[4]=n.client.deviceType,t[5]=p);let m=n.client.os??null,h=n.client.browser??null,g=n.client.ipAddress??null,_;t[6]!==p||t[7]!==m||t[8]!==h||t[9]!==g?(_=[p,m,h,g].filter(fn),t[6]=p,t[7]=m,t[8]=h,t[9]=g,t[10]=_):_=t[10];let v=_,y;t[11]!==n.client.browser||t[12]!==n.client.label||t[13]!==n.client.os||t[14]!==n.subject?(y=n.client.label??([n.client.os,n.client.browser].filter(Boolean).join(` · `)||n.subject),t[11]=n.client.browser,t[12]=n.client.label,t[13]=n.client.os,t[14]=n.subject,t[15]=y):y=t[15];let b=y,x;t[16]===o?x=t[17]:(x=At(o),t[16]=o,t[17]=x);let S=c?`bg-success`:`bg-muted-foreground/30`,C;t[18]!==d||t[19]!==S?(C=(0,Q.jsx)(bt,{tooltipText:d,dotClassName:S,pingClassName:null}),t[18]=d,t[19]=S,t[20]=C):C=t[20];let w;t[21]===b?w=t[22]:(w=(0,Q.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:b}),t[21]=b,t[22]=w);let T;t[23]===n.current?T=t[24]:(T=n.current?(0,Q.jsx)(`span`,{className:`text-[10px] text-muted-foreground/80 rounded-md border border-border/50 bg-muted/50 px-1 py-0.5`,children:`This device`}):null,t[23]=n.current,t[24]=T);let E;t[25]!==C||t[26]!==w||t[27]!==T?(E=(0,Q.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[C,w,T]}),t[25]=C,t[26]=w,t[27]=T,t[28]=E):E=t[28];let D;t[29]!==v||t[30]!==f?(D=[f,...v],t[29]=v,t[30]=f,t[31]=D):D=t[31];let O=D.join(` · `),k;t[32]===O?k=t[33]:(k=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:O}),t[32]=O,t[33]=k);let A;t[34]!==E||t[35]!==k?(A=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[E,k]}),t[34]=E,t[35]=k,t[36]=A):A=t[36];let j;t[37]!==n.current||t[38]!==n.sessionId||t[39]!==a||t[40]!==i?(j=n.current?null:(0,Q.jsx)(q,{size:`xs`,variant:`destructive-outline`,disabled:i===n.sessionId,onClick:()=>void a(n.sessionId),children:i===n.sessionId?`Revoking…`:`Revoke`}),t[37]=n.current,t[38]=n.sessionId,t[39]=a,t[40]=i,t[41]=j):j=t[41];let M;t[42]===j?M=t[43]:(M=(0,Q.jsx)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:j}),t[42]=j,t[43]=M);let N;t[44]!==A||t[45]!==M?(N=(0,Q.jsxs)(`div`,{className:kt,children:[A,M]}),t[44]=A,t[45]=M,t[46]=N):N=t[46];let P;return t[47]!==N||t[48]!==x?(P=(0,Q.jsx)(`div`,{className:x,children:N}),t[47]=N,t[48]=x,t[49]=P):P=t[49],P}),Xt=(0,X.memo)(function({clientSessions:e,isRevokingOtherClients:t,onRevokeOtherClients:n}){let[r,i]=(0,X.useState)(!1),[a,o]=(0,X.useState)(``),[s,c]=(0,X.useState)(!1),l=(0,X.useCallback)(async()=>{c(!0);try{await D(a),o(``),i(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to create pairing URL.`;V.add(pe({type:`error`,title:`Could not create pairing URL`,description:t}))}finally{c(!1)}},[a]);return(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(q,{size:`xs`,variant:`destructive-outline`,disabled:t||e.every(e=>e.current),onClick:()=>void n(),children:t?`Revoking…`:`Revoke others`}),(0,Q.jsxs)(Se,{open:r,onOpenChange:e=>{i(e),e||o(``)},children:[(0,Q.jsx)(_e,{render:(0,Q.jsxs)(q,{size:`xs`,variant:`default`,children:[(0,Q.jsx)(H,{className:`size-3`}),`Create link`]})}),(0,Q.jsxs)(xe,{className:`max-w-sm`,children:[(0,Q.jsxs)(me,{children:[(0,Q.jsx)(he,{children:`Create pairing link`}),(0,Q.jsx)(be,{children:`Generate a one-time link that another device can use to pair with this backend as an authorized client.`})]}),(0,Q.jsx)(ye,{children:(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Client label (optional)`}),(0,Q.jsx)(ue,{value:a,onChange:e=>o(e.target.value),placeholder:`e.g. Living room iPad`,disabled:s,autoFocus:!0})]})}),(0,Q.jsxs)(ge,{variant:`bare`,children:[(0,Q.jsx)(q,{variant:`outline`,disabled:s,onClick:()=>i(!1),children:`Cancel`}),(0,Q.jsx)(q,{disabled:s,onClick:()=>void l(),children:s?`Creating…`:`Create link`})]})]})]})]})}),Zt=(0,X.memo)(function(e){let t=(0,Z.c)(33),{endpointUrl:n,endpoints:r,defaultEndpointKey:i,presentation:a,isLoading:o,pairingLinks:s,clientSessions:c,revokingPairingLinkId:l,revokingClientSessionId:u,onRevokePairingLink:d,onRevokeClientSession:f}=e,p=a===void 0?`current`:a,m;if(t[0]!==i||t[1]!==n||t[2]!==r||t[3]!==d||t[4]!==s||t[5]!==p||t[6]!==l){let e;t[8]!==i||t[9]!==n||t[10]!==r||t[11]!==d||t[12]!==p||t[13]!==l?(e=e=>(0,Q.jsx)(Jt,{pairingLink:e,endpointUrl:n,endpoints:r,defaultEndpointKey:i,presentation:p,revokingPairingLinkId:l,onRevoke:d},e.id),t[8]=i,t[9]=n,t[10]=r,t[11]=d,t[12]=p,t[13]=l,t[14]=e):e=t[14],m=s.map(e),t[0]=i,t[1]=n,t[2]=r,t[3]=d,t[4]=s,t[5]=p,t[6]=l,t[7]=m}else m=t[7];let h;if(t[15]!==c||t[16]!==f||t[17]!==p||t[18]!==u){let e;t[20]!==f||t[21]!==p||t[22]!==u?(e=e=>(0,Q.jsx)(Yt,{clientSession:e,presentation:p,revokingClientSessionId:u,onRevokeSession:f},e.sessionId),t[20]=f,t[21]=p,t[22]=u,t[23]=e):e=t[23],h=c.map(e),t[15]=c,t[16]=f,t[17]=p,t[18]=u,t[19]=h}else h=t[19];let g;t[24]!==c.length||t[25]!==o||t[26]!==s.length||t[27]!==p?(g=s.length===0&&c.length===0&&!o?(0,Q.jsx)(`div`,{className:At(p),children:(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground/60`,children:`No pairing links or client sessions.`})}):null,t[24]=c.length,t[25]=o,t[26]=s.length,t[27]=p,t[28]=g):g=t[28];let _;return t[29]!==m||t[30]!==h||t[31]!==g?(_=(0,Q.jsxs)(Q.Fragment,{children:[m,h,g]}),t[29]=m,t[30]=h,t[31]=g,t[32]=_):_=t[32],_}),Qt=(0,X.memo)(function(e){let t=(0,Z.c)(58),{endpoint:n,isDefault:r,presentation:i,onSetDefault:a,onSetupTailscaleServe:o,onDisableTailscaleServe:s,isUpdatingTailscaleServe:c}=e,l=i===void 0?`current`:i,u=n.status===`available`,d;t[0]===n?d=t[1]:(d=Vt(n)&&n.status!==`available`,t[0]=n,t[1]=d);let f=d,p;t[2]===n.compatibility.hostedHttpsApp?p=t[3]:(p=Ut(n.compatibility.hostedHttpsApp),t[2]=n.compatibility.hostedHttpsApp,t[3]=p);let m=p,h;t[4]===n.compatibility.hostedHttpsApp?h=t[5]:(h=Wt(n.compatibility.hostedHttpsApp),t[4]=n.compatibility.hostedHttpsApp,t[5]=h);let g=h,_;t[6]===n?_=t[7]:(_=Vt(n)&&n.status===`available`,t[6]=n,t[7]=_);let v=_,y=!f,b=l===`endpoint-rail`,x;t[8]!==u||t[9]!==l?(x=jt(l,u),t[8]=u,t[9]=l,t[10]=x):x=t[10];let S;t[11]!==r||t[12]!==b?(S=b&&r?(0,Q.jsx)(`span`,{className:`absolute inset-y-2 left-0 w-1 rounded-r-full bg-primary`,"aria-hidden":!0}):null,t[11]=r,t[12]=b,t[13]=S):S=t[13];let C;t[14]===n.label?C=t[15]:(C=(0,Q.jsx)(`h3`,{className:`shrink-0 text-sm leading-5 font-medium text-foreground`,children:n.label}),t[14]=n.label,t[15]=C);let w;t[16]!==n.httpBaseUrl||t[17]!==y?(w=y?(0,Q.jsx)(`p`,{className:`min-w-0 truncate text-xs leading-5 text-muted-foreground`,title:n.httpBaseUrl,children:n.httpBaseUrl}):null,t[16]=n.httpBaseUrl,t[17]=y,t[18]=w):w=t[18];let T;t[19]===u?T=t[20]:(T=u?null:(0,Q.jsx)(`span`,{className:`shrink-0 rounded-md border border-border/70 px-1 py-0.5 text-[10px] text-muted-foreground`,children:`Setup required`}),t[19]=u,t[20]=T);let E;t[21]!==g||t[22]!==m?(E=m?(0,Q.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-md border border-amber-500/30 bg-amber-500/10 px-1 py-0.5 text-[10px] text-amber-700 dark:text-amber-300`,title:g??void 0,children:[(0,Q.jsx)(ie,{"aria-hidden":!0,className:`size-3`}),m]}):null,t[21]=g,t[22]=m,t[23]=E):E=t[23];let D;t[24]!==T||t[25]!==E||t[26]!==C||t[27]!==w?(D=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[C,w,T,E]}),t[24]=T,t[25]=E,t[26]=C,t[27]=w,t[28]=D):D=t[28];let O;t[29]===r?O=t[30]:(O=r?(0,Q.jsx)(`span`,{className:`rounded-md border border-primary/30 bg-primary/10 px-1 py-0.5 text-[10px] text-primary`,children:`Default`}):null,t[29]=r,t[30]=O);let k;t[31]!==n||t[32]!==c||t[33]!==f||t[34]!==o?(k=f?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:()=>o(n),disabled:c,children:c?`Restarting…`:`Setup`}):null,t[31]=n,t[32]=c,t[33]=f,t[34]=o,t[35]=k):k=t[35];let A;t[36]!==v||t[37]!==n||t[38]!==c||t[39]!==s?(A=v?(0,Q.jsx)(q,{size:`xs`,variant:`destructive-outline`,onClick:()=>s(n),disabled:c,children:c?`Restarting…`:`Disable`}):null,t[36]=v,t[37]=n,t[38]=c,t[39]=s,t[40]=A):A=t[40];let j;t[41]!==n||t[42]!==r||t[43]!==f||t[44]!==a?(j=!f&&!r?(0,Q.jsx)(q,{size:`xs`,variant:`outline`,onClick:()=>a(n),children:`Set as default`}):null,t[41]=n,t[42]=r,t[43]=f,t[44]=a,t[45]=j):j=t[45];let M;t[46]!==O||t[47]!==k||t[48]!==A||t[49]!==j?(M=(0,Q.jsxs)(`div`,{className:`ml-auto flex min-h-6 shrink-0 items-center justify-end gap-2`,children:[O,k,A,j]}),t[46]=O,t[47]=k,t[48]=A,t[49]=j,t[50]=M):M=t[50];let N;t[51]!==D||t[52]!==M?(N=(0,Q.jsxs)(`div`,{className:`flex min-h-6 min-w-0 flex-col gap-2 sm:-my-0.5 sm:flex-row sm:items-center`,children:[D,M]}),t[51]=D,t[52]=M,t[53]=N):N=t[53];let P;return t[54]!==N||t[55]!==x||t[56]!==S?(P=(0,Q.jsxs)(`div`,{className:x,children:[S,N]}),t[54]=N,t[55]=x,t[56]=S,t[57]=P):P=t[57],P});function $t(e){let t=(0,Z.c)(17),{endpoint:n,hiddenEndpointCount:r,expanded:i,onToggleExpanded:a,fallback:o}=e;if(!n)return o;let s;t[0]===n.httpBaseUrl?s=t[1]:(s=(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:n.httpBaseUrl}),t[0]=n.httpBaseUrl,t[1]=s);let c;t[2]===n.compatibility.hostedHttpsApp?c=t[3]:(c=Ut(n.compatibility.hostedHttpsApp)?(0,Q.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-[11px] text-amber-700 dark:text-amber-300`,title:Wt(n.compatibility.hostedHttpsApp)??void 0,children:[(0,Q.jsx)(ie,{"aria-hidden":!0,className:`size-3`}),Ut(n.compatibility.hostedHttpsApp)]}):null,t[2]=n.compatibility.hostedHttpsApp,t[3]=c);let l;t[4]!==i||t[5]!==r?(l=r>0?(0,Q.jsx)(`span`,{className:`shrink-0 text-xs font-medium`,children:i?`Hide`:`+${r}`}):null,t[4]=i,t[5]=r,t[6]=l):l=t[6];let u;t[7]!==s||t[8]!==c||t[9]!==l?(u=(0,Q.jsxs)(Q.Fragment,{children:[s,c,l]}),t[7]=s,t[8]=c,t[9]=l,t[10]=u):u=t[10];let d=u,f;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`shrink-0`,children:`Reachable at`}),t[11]=f):f=t[11];let p;return t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==d?(p=(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-baseline gap-1`,children:[f,r>0?(0,Q.jsx)(`button`,{type:`button`,className:`inline-flex min-w-0 max-w-full items-baseline gap-2 border-b border-dotted border-muted-foreground/60 text-left text-muted-foreground underline-offset-4 hover:border-foreground hover:text-foreground`,onClick:a,"aria-expanded":i,children:d}):(0,Q.jsx)(`span`,{className:`inline-flex min-w-0 max-w-full items-baseline gap-2`,children:d})]}),t[12]=i,t[13]=r,t[14]=a,t[15]=d,t[16]=p):p=t[16],p}function en(e){let t=(0,Z.c)(57),{environmentId:n,reconnectingEnvironmentId:r,disconnectingEnvironmentId:i,removingEnvironmentId:a,onConnect:o,onDisconnect:c,onRemove:l}=e,u=Ve(1e3),d;t[0]===n?d=t[1]:(d=e=>e.byId[n]??null,t[0]=n,t[1]=d);let f=h(d),p;t[2]===n?p=t[3]:(p=e=>e.byId[n]??null,t[2]=n,t[3]=p);let g=s(p);if(!f)return null;let _=g?.connectionState??`disconnected`,v=_===`connected`,y=_===`connecting`||r===n,b=i===n,x=_===`connected`?`bg-success`:_===`connecting`?`bg-warning`:_===`error`?`bg-destructive`:`bg-muted-foreground/40`,S=g?.role?g.role===`owner`?`Owner`:`Client`:null,C=g?.descriptor?.label??null??f.label,w;t[4]!==u||t[5]!==f||t[6]!==g?(w=xt(g,f,u),t[4]=u,t[5]=f,t[6]=g,t[7]=w):w=t[7];let T=w,E=g?.serverConfig,D;t[8]===E?D=t[9]:(D=m(E),t[8]=E,t[9]=D);let O=D,k;t[10]===f.desktopSsh?k=t[11]:(k=f.desktopSsh?`SSH ${St(f.desktopSsh)}`:null,t[10]=f.desktopSsh,t[11]=k);let A;t[12]===f.lastConnectedAt?A=t[13]:(A=f.lastConnectedAt?`Last connected ${yt(f.lastConnectedAt)}`:null,t[12]=f.lastConnectedAt,t[13]=A);let j;t[14]!==S||t[15]!==k||t[16]!==A?(j=[k,S,A].filter(tn),t[14]=S,t[15]=k,t[16]=A,t[17]=j):j=t[17];let M=j,N=_===`connecting`?`bg-warning/60 duration-2000`:null,P;t[18]!==x||t[19]!==T||t[20]!==N?(P=(0,Q.jsx)(bt,{tooltipText:T,dotClassName:x,pingClassName:N}),t[18]=x,t[19]=T,t[20]=N,t[21]=P):P=t[21];let F;t[22]===C?F=t[23]:(F=(0,Q.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:C}),t[22]=C,t[23]=F);let I;t[24]!==P||t[25]!==F?(I=(0,Q.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[P,F]}),t[24]=P,t[25]=F,t[26]=I):I=t[26];let ee;t[27]===M?ee=t[28]:(ee=M.length>0?(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:M.join(` · `)}):null,t[27]=M,t[28]=ee);let L;t[29]===O?L=t[30]:(L=O?(0,Q.jsxs)(`p`,{className:`flex items-center gap-1 text-warning text-xs`,children:[(0,Q.jsx)(ie,{className:`size-3.5 shrink-0`}),`Version drift: client `,O.clientVersion,`, server`,` `,O.serverVersion,`.`]}):null,t[29]=O,t[30]=L);let R;t[31]!==I||t[32]!==ee||t[33]!==L?(R=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[I,ee,L]}),t[31]=I,t[32]=ee,t[33]=L,t[34]=R):R=t[34];let z=v?b:y,B;t[35]!==n||t[36]!==v||t[37]!==o||t[38]!==c?(B=()=>void(v?c(n):o(n)),t[35]=n,t[36]=v,t[37]=o,t[38]=c,t[39]=B):B=t[39];let te=v?b?`Disconnecting…`:`Disconnect`:y?`Connecting…`:`Connect`,ne;t[40]!==z||t[41]!==B||t[42]!==te?(ne=(0,Q.jsx)(q,{size:`xs`,variant:`outline`,disabled:z,onClick:B,children:te}),t[40]=z,t[41]=B,t[42]=te,t[43]=ne):ne=t[43];let V=a===n,H;t[44]!==n||t[45]!==l?(H=()=>void l(n),t[44]=n,t[45]=l,t[46]=H):H=t[46];let U=a===n?`Removing…`:`Remove`,W;t[47]!==V||t[48]!==H||t[49]!==U?(W=(0,Q.jsx)(q,{size:`xs`,variant:`destructive-outline`,disabled:V,onClick:H,children:U}),t[47]=V,t[48]=H,t[49]=U,t[50]=W):W=t[50];let re;t[51]!==ne||t[52]!==W?(re=(0,Q.jsxs)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:[ne,W]}),t[51]=ne,t[52]=W,t[53]=re):re=t[53];let G;return t[54]!==R||t[55]!==re?(G=(0,Q.jsx)(`div`,{className:Dt,children:(0,Q.jsxs)(`div`,{className:kt,children:[R,re]})}),t[54]=R,t[55]=re,t[56]=G):G=t[56],G}function tn(e){return e!==null}var nn=(0,X.memo)(function(e){let t=(0,Z.c)(24),{target:n,connectingHostAlias:r,onConnect:i}=e,a;t[0]===n?a=t[1]:(a=St(n),t[0]=n,t[1]=a);let o=a,s=o!==n.alias,c=r===n.alias?`Adding…`:`Add environment`,l;t[2]===n.alias?l=t[3]:(l=(0,Q.jsx)(`h3`,{className:`truncate text-sm font-medium text-foreground`,children:n.alias}),t[2]=n.alias,t[3]=l);let u;t[4]!==o||t[5]!==s?(u=s?(0,Q.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:o}):null,t[4]=o,t[5]=s,t[6]=u):u=t[6];let d;t[7]!==l||t[8]!==u?(d=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[l,u]}),t[7]=l,t[8]=u,t[9]=d):d=t[9];let f=r===n.alias,p;t[10]!==i||t[11]!==n?(p=()=>i(n),t[10]=i,t[11]=n,t[12]=p):p=t[12];let m;t[13]!==r||t[14]!==n.alias?(m=r===n.alias?(0,Q.jsx)(W,{className:`size-3 animate-spin`}):null,t[13]=r,t[14]=n.alias,t[15]=m):m=t[15];let h;t[16]!==c||t[17]!==f||t[18]!==p||t[19]!==m?(h=(0,Q.jsx)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:(0,Q.jsxs)(q,{size:`xs`,variant:`outline`,disabled:f,onClick:p,children:[m,c]})}),t[16]=c,t[17]=f,t[18]=p,t[19]=m,t[20]=h):h=t[20];let g;return t[21]!==d||t[22]!==h?(g=(0,Q.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3 first:border-t-0 sm:px-5`,children:(0,Q.jsxs)(`div`,{className:kt,children:[d,h]})}),t[21]=d,t[22]=h,t[23]=g):g=t[23],g});function rn(){let e=window.desktopBridge,[t,n]=(0,X.useState)(e?`owner`:null),[r,i]=(0,X.useState)(null),a=h(e=>e.byId),s=(0,X.useMemo)(()=>Object.values(a).toSorted((e,t)=>e.label.localeCompare(t.label)).map(e=>e.environmentId),[a]),v=(0,X.useMemo)(()=>Object.values(a).reduce((e,t)=>(t.desktopSsh?.alias&&(e[t.desktopSsh.alias]=t),e),{}),[a]),b=(0,X.useMemo)(()=>{let e=new Set;for(let t of Object.values(a)){let n=t.desktopSsh;n&&(e.add(n.alias),e.add(St(n)))}return e},[a]),[x,S]=(0,X.useState)([]),[C,T]=(0,X.useState)(!1),[E,D]=(0,X.useState)(!1),[O,k]=(0,X.useState)(null),[A,j]=(0,X.useState)(null),[M,N]=(0,X.useState)(null),[P,F]=(0,X.useState)([]),[I,L]=(0,X.useState)(null),[R,z]=(0,X.useState)([]),[B,te]=(0,X.useState)([]),[ne,U]=(0,X.useState)(null),[ae,oe]=(0,X.useState)(!1),[fe,Ce]=(0,X.useState)(null),[J,we]=(0,X.useState)(null),[Te,Ee]=(0,X.useState)(!1),[De,Oe]=(0,X.useState)(!1),[Ae,Re]=(0,X.useState)(`remote`),[ze,Be]=(0,X.useState)(``),[Ve,We]=(0,X.useState)(``),[Ge,qe]=(0,X.useState)(``),[Je,Ye]=(0,X.useState)(``),[Xe,Ze]=(0,X.useState)(``),[Qe,Z]=(0,X.useState)(null),[et,tt]=(0,X.useState)(!1),nt=(0,X.useMemo)(()=>x.filter(e=>{let t=St(e);return!b.has(e.alias)&&!b.has(t)}),[x,b]),[$,rt]=(0,X.useState)(null),[it,at]=(0,X.useState)(null),[ot,st]=(0,X.useState)(null),[ct,lt]=(0,X.useState)(!1),[ut,dt]=(0,X.useState)(!1),[ft,pt]=(0,X.useState)(!1),[mt,ht]=(0,X.useState)(null),[vt,yt]=(0,X.useState)(!1),[bt,xt]=(0,X.useState)(String(_t)),[Ot,kt]=(0,X.useState)(null),jt=o(),Ut=m(jt),[Wt,Gt]=(0,X.useState)(!1),Kt=ee(e=>e.defaultAdvertisedEndpointKey),qt=ee(e=>e.setDefaultAdvertisedEndpointKey),Jt=t===`owner`,Yt=e?M?.mode===`network-accessible`:r===`remote-reachable`,tn=bt.trim(),rn=Number(tn),an=/^\d+$/u.test(tn)&&Number.isInteger(rn)&&rn>=1&&rn<=65535,on=(0,X.useMemo)(()=>{if(!mt)return null;if(!an||rn===_t)return mt.httpBaseUrl;try{let e=new URL(mt.httpBaseUrl);return e.port=String(rn),e.toString().replace(/\/$/u,``)}catch{return mt.httpBaseUrl}},[an,rn,mt]),sn=(0,X.useCallback)(async t=>{if(e){lt(!0),L(null);try{let n=await e.setServerExposureMode(t?`network-accessible`:`local-only`);N(n),dt(!1),lt(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to update network exposure.`;dt(!1),L(t),V.add(pe({type:`error`,title:`Could not update network access`,description:t})),lt(!1)}}},[e]),cn=(0,X.useCallback)(()=>{Ot!==null&&sn(Ot===`network-accessible`)},[sn,Ot]),ln=(0,X.useCallback)(async()=>{if(e&&an){pt(!0),L(null);try{let t=await e.setTailscaleServeEnabled({enabled:!0,port:rn});N(t),ht(null)}catch(e){let t=e instanceof Error?e.message:`Failed to configure Tailscale HTTPS.`;L(t),V.add(pe({type:`error`,title:`Could not set up Tailscale HTTPS`,description:t}))}finally{pt(!1)}}},[e,an,rn]),un=(0,X.useCallback)(e=>{xt(String(M?.tailscaleServePort??_t)),ht(e)},[M?.tailscaleServePort]),dn=(0,X.useCallback)(async()=>{if(e){pt(!0),L(null);try{let t=await e.setTailscaleServeEnabled({enabled:!1,port:M?.tailscaleServePort??_t});N(t),yt(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to disable Tailscale HTTPS.`;L(t),V.add(pe({type:`error`,title:`Could not disable Tailscale HTTPS`,description:t}))}finally{pt(!1)}}},[e,M?.tailscaleServePort]),fn=(0,X.useCallback)(e=>{yt(!0)},[]),pn=(0,X.useCallback)(async e=>{Ce(e),U(null);try{await y(e)}catch(e){let t=e instanceof Error?e.message:`Failed to revoke pairing link.`;U(t),V.add(pe({type:`error`,title:`Could not revoke pairing link`,description:t}))}finally{Ce(null)}},[]),mn=(0,X.useCallback)(async e=>{we(e),U(null);try{await w(e)}catch(e){let t=e instanceof Error?e.message:`Failed to revoke client access.`;U(t),V.add(pe({type:`error`,title:`Could not revoke client access`,description:t}))}finally{we(null)}},[]),hn=(0,X.useCallback)(async()=>{Ee(!0),U(null);try{let e=await g();V.add({type:`success`,title:e===1?`Revoked 1 other client`:`Revoked ${e} clients`,description:`Other paired clients will need a new pairing link before reconnecting.`})}catch(e){let t=e instanceof Error?e.message:`Failed to revoke other clients.`;U(t),V.add(pe({type:`error`,title:`Could not revoke other clients`,description:t}))}finally{Ee(!1)}},[]),gn=(0,X.useCallback)(async()=>{if(Ae===`ssh`){tt(!0),Z(null);try{let e=Ct({host:Ge,username:Je,port:Xe}),t=await p(e,{label:``});Be(``),We(``),qe(``),Ye(``),Ze(``),Oe(!1),V.add({type:`success`,title:`Environment connected`,description:`${t.label} is ready over an SSH-managed tunnel.`})}catch(e){let t=Et(e);Z(t)}finally{tt(!1)}return}tt(!0),Z(null);try{let e=Tt({host:ze,pairingCode:Ve}),t=await u({label:``,...e});Be(``),We(``),qe(``),Ye(``),Ze(``),Oe(!1),V.add({type:`success`,title:`Backend added`,description:`${t.label} is now saved and will reconnect on app startup.`})}catch(e){let t=e instanceof Error?e.message:`Failed to add backend.`;Z(t),V.add(pe({type:`error`,title:`Could not add backend`,description:t}))}finally{tt(!1)}},[ze,Ae,Ve,Ge,Xe,Je]),_n=(0,X.useCallback)(async e=>{rt(e),Z(null);try{await f(e)}catch(e){let t=e instanceof Error?e.message:`Failed to connect backend.`;Z(t),V.add(pe({type:`error`,title:`Could not connect backend`,description:t}))}finally{rt(null)}},[]),vn=(0,X.useCallback)(async e=>{at(e),Z(null);try{await d(e)}catch(e){let t=e instanceof Error?e.message:`Failed to disconnect backend.`;Z(t),V.add(pe({type:`error`,title:`Could not disconnect backend`,description:t}))}finally{at(null)}},[]),yn=(0,X.useCallback)(async e=>{st(e),Z(null);try{await l(e)}catch(e){let t=e instanceof Error?e.message:`Failed to remove backend.`;Z(t),V.add(pe({type:`error`,title:`Could not remove backend`,description:t}))}finally{st(null)}},[]),bn=(0,X.useCallback)(async()=>{if(!e){S([]),T(!1),k(null);return}D(!0),k(null);try{let t=await e.discoverSshHosts();S(t),T(!0)}catch(e){let t=e instanceof Error?e.message:`Failed to discover SSH hosts.`;k(t),T(!0)}finally{D(!1)}},[e]),xn=(0,X.useCallback)(async(e,t)=>{j(e.alias),Ae===`ssh`?Z(null):k(null);try{let n=await p(e,t===void 0?void 0:{label:t});qe(``),Ye(``),Ze(``),Oe(!1),V.add({type:`success`,title:v[e.alias]?`Environment reconnected`:`Environment connected`,description:`${n.label} is ready over an SSH-managed tunnel.`})}catch(e){let t=Et(e);Ae===`ssh`?Z(t):k(t)}finally{j(null)}},[Ae,v]);(0,X.useEffect)(()=>{!e||!De||Ae!==`ssh`||C||E||bn()},[De,e,C,E,bn,Ae]),(0,X.useEffect)(()=>{if(e){n(`owner`);return}let t=!1;return _().then(e=>{t||(n(e.authenticated?e.role??null:null),i(e.auth.policy))}).catch(()=>{t||(n(null),i(null))}),()=>{t=!0}},[e]),(0,X.useEffect)(()=>{if(!Jt)return;let t=!1;oe(!0);let n=c().client.server.subscribeAuthAccess(e=>{if(!t){switch(e.type){case`snapshot`:z(Mt(e.payload.pairingLinks.map(e=>Pt(e)))),te(Nt(e.payload.clientSessions.map(e=>Ft(e))));break;case`pairingLinkUpserted`:z(t=>It(t,Pt(e.payload)));break;case`pairingLinkRemoved`:z(t=>Lt(t,e.payload.id));break;case`clientUpserted`:te(t=>Rt(t,Ft(e.payload)));break;case`clientRemoved`:te(t=>zt(t,e.payload.sessionId))}U(null),oe(!1)}},{onResubscribe:()=>{t||oe(!0)}});return e?(e.getServerExposureState().then(e=>{t||N(e)}).catch(e=>{if(t)return;let n=e instanceof Error?e.message:`Failed to load network exposure state.`;L(n)}),e.getAdvertisedEndpoints().then(e=>{t||F(e)}).catch(e=>{if(t)return;let n=e instanceof Error?e.message:`Failed to load reachable endpoints.`;L(n)})):(N(null),c().client.server.getAdvertisedEndpoints().then(e=>{t||F(e)}).catch(e=>{if(t)return;let n=e instanceof Error?e.message:`Failed to load reachable endpoints.`;L(n)})),()=>{t=!0,n()}},[Jt,e]),(0,X.useEffect)(()=>{Jt||(oe(!1),z([]),te([]),U(null),N(null),F([]),L(null))},[Jt]);let Sn=(0,X.useMemo)(()=>R.filter(e=>e.role===`client`),[R]),Cn=(0,X.useMemo)(()=>P.find(Vt)??null,[P]),wn=(0,X.useMemo)(()=>Yt?P.filter(e=>!Vt(e)):[],[P,Yt]),Tn=(0,X.useMemo)(()=>Cn?[...wn,Cn]:wn,[Cn,wn]),En=Yt||Cn?.status===`available`,Dn=(0,X.useMemo)(()=>Bt(wn,Kt),[Kt,wn]),On=(0,X.useMemo)(()=>Dn??Bt(Cn?[Cn]:[],Kt),[Kt,Dn,Cn]),kn=On?Ht(On):null,An=(0,X.useCallback)(e=>{qt(Ht(e))},[qt]),jn=(0,X.useCallback)(e=>{let t=wt(e);if(t){Be(t.host),We(t.pairingCode);return}Be(e)},[]),Mn=e=>{let t=Ae===e.mode;return(0,Q.jsxs)(`button`,{type:`button`,"aria-pressed":t,className:G(`group flex min-h-24 items-start gap-3 rounded-lg border p-4 text-left`,t?`border-primary/50 bg-primary/5`:`border-border/60 hover:bg-muted/40`),disabled:et,onClick:()=>{Re(e.mode)},children:[e.icon?(0,Q.jsx)(`span`,{className:G(`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md border`,t?`border-primary/30 bg-primary/10 text-primary`:`border-border/70 bg-background text-muted-foreground group-hover:text-foreground`),children:e.icon}):null,(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[(0,Q.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:e.title}),(0,Q.jsx)(`span`,{className:`mt-1 block text-xs leading-relaxed text-muted-foreground`,children:e.description})]})]})};return(0,Q.jsxs)(Ue,{children:[Jt?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(He,{title:`Manage local backend`,children:[Ut?(0,Q.jsx)(Y,{title:`Version drift`,description:(0,Q.jsxs)(`span`,{className:`flex items-center gap-1 text-warning`,children:[(0,Q.jsx)(ie,{className:`size-3.5 shrink-0`}),`Client `,Ut.clientVersion,`, server`,` `,Ut.serverVersion,`. Sync them if RPC calls or reconnects fail.`]})}):null,e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Y,{title:`Network access`,description:Yt?(0,Q.jsx)($t,{endpoint:Dn,hiddenEndpointCount:Math.max(wn.length-1,0),expanded:Wt,onToggleExpanded:()=>Gt(e=>!e),fallback:M?.endpointUrl?`Reachable at ${M.endpointUrl}`:M?.advertisedHost?`Exposed on all interfaces. Pairing links use ${M.advertisedHost}.`:`Exposed on all interfaces.`}):M?`Limited to this machine.`:`Loading…`,status:I?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:I}):null,control:(0,Q.jsx)(le,{checked:M?.mode===`network-accessible`,disabled:!M||ct,onCheckedChange:e=>{kt(e?`network-accessible`:`local-only`),dt(!0)},"aria-label":`Enable network access`})}),(e=>Wt?wn.map(t=>{let n=Ht(t);return(0,Q.jsx)(Qt,{endpoint:t,isDefault:n===kn,presentation:e,onSetDefault:An,onSetupTailscaleServe:un,onDisableTailscaleServe:fn,isUpdatingTailscaleServe:ft},t.id)}):null)(`endpoint-rail`),(0,Q.jsx)(Y,{title:`Tailscale HTTPS`,description:Cn?Cn.status===`available`?Cn.httpBaseUrl:`Use Tailscale Serve to expose this backend through a MagicDNS HTTPS URL.`:`Start Tailscale to set up HTTPS access through MagicDNS.`,control:Cn?(0,Q.jsx)(le,{checked:Cn.status===`available`,disabled:ft,onCheckedChange:e=>{if(e){un(Cn);return}fn(Cn)},"aria-label":`Enable Tailscale HTTPS`}):null})]}):(0,Q.jsx)(Y,{title:`Network access`,description:r===`remote-reachable`?`This backend is already configured for remote access. Network exposure changes must be made where the server is launched.`:`This backend is only reachable on this machine. Restart it with a non-loopback host to enable remote pairing.`,control:(0,Q.jsxs)(ce,{children:[(0,Q.jsx)(K,{render:(0,Q.jsx)(`span`,{className:`inline-flex`,children:(0,Q.jsx)(le,{checked:Yt,disabled:!0,"aria-label":`Enable network access`})})}),(0,Q.jsx)(se,{side:`top`,children:`Network exposure changes restart the backend and must be controlled where the server process is launched.`})]})})]}),En?(0,Q.jsx)(He,{title:`Authorized clients`,headerAction:(0,Q.jsx)(Xt,{clientSessions:B,isRevokingOtherClients:Te,onRevokeOtherClients:hn}),children:(e=>(0,Q.jsxs)(Q.Fragment,{children:[ne?(0,Q.jsx)(`div`,{className:At(e),children:(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:ne})}):null,(0,Q.jsx)(Zt,{endpointUrl:M?.endpointUrl,endpoints:Tn,defaultEndpointKey:kn,presentation:e,isLoading:ae,pairingLinks:Sn,clientSessions:B,revokingPairingLinkId:fe,revokingClientSessionId:J,onRevokePairingLink:pn,onRevokeClientSession:mn})]}))(`current`)}):null,(0,Q.jsx)(Le,{open:ut,onOpenChange:e=>{ct||dt(e)},onOpenChangeComplete:e=>{e||kt(null)},children:(0,Q.jsxs)(Pe,{children:[(0,Q.jsxs)(je,{children:[(0,Q.jsx)(Ie,{children:Ot===`network-accessible`?`Enable network access?`:`Disable network access?`}),(0,Q.jsx)(Fe,{children:Ot===`network-accessible`?`Ryco will restart to expose this environment over the network.`:`Ryco will restart and limit this environment back to this machine.`})]}),(0,Q.jsxs)(Me,{children:[(0,Q.jsx)(Ne,{disabled:ct,render:(0,Q.jsx)(q,{variant:`outline`,disabled:ct}),children:`Cancel`}),(0,Q.jsx)(q,{variant:Ot===`local-only`?`destructive`:`default`,onClick:cn,disabled:Ot===null||ct,children:ct?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ke,{className:`size-3.5`}),`Restarting…`]}):Ot===`network-accessible`?`Restart and enable`:`Restart and disable`})]})]})}),(0,Q.jsx)(Le,{open:vt,onOpenChange:e=>{ft||yt(e)},children:(0,Q.jsxs)(Pe,{children:[(0,Q.jsxs)(je,{children:[(0,Q.jsx)(Ie,{children:`Disable Tailscale HTTPS?`}),(0,Q.jsx)(Fe,{children:`Ryco will restart the local backend without Tailscale Serve.`})]}),(0,Q.jsxs)(Me,{children:[(0,Q.jsx)(Ne,{disabled:ft,render:(0,Q.jsx)(q,{variant:`outline`,disabled:ft}),children:`Cancel`}),(0,Q.jsx)(q,{variant:`destructive`,onClick:()=>void dn(),disabled:ft,children:ft?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ke,{className:`size-3.5`}),`Restarting…`]}):`Restart and disable`})]})]})}),(0,Q.jsx)(Se,{open:mt!==null,onOpenChange:e=>{ft||e||ht(null)},children:(0,Q.jsxs)(xe,{className:`max-w-md`,children:[(0,Q.jsxs)(me,{children:[(0,Q.jsx)(he,{children:`Set up Tailscale HTTPS?`}),(0,Q.jsx)(be,{children:`Ryco will restart the local backend with Tailscale Serve enabled and ask Tailscale to proxy HTTPS traffic to this backend.`})]}),(0,Q.jsxs)(ye,{className:`space-y-4`,children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`HTTPS port`}),(0,Q.jsx)(ue,{className:`mt-2`,type:`number`,inputMode:`numeric`,min:1,max:65535,step:1,value:bt,onChange:e=>xt(e.target.value),disabled:ft})]}),an?null:(0,Q.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:`Enter a port from 1 to 65535.`}),(0,Q.jsxs)(`div`,{className:`rounded-md border border-border/70 bg-muted/20 px-3 py-2`,children:[(0,Q.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`HTTPS endpoint`}),(0,Q.jsx)(`p`,{className:`mt-1 truncate text-sm text-foreground`,title:on??void 0,children:on??`Pending MagicDNS endpoint`})]})]}),(0,Q.jsxs)(ge,{children:[(0,Q.jsx)(ve,{disabled:ft,render:(0,Q.jsx)(q,{variant:`outline`,disabled:ft}),children:`Cancel`}),(0,Q.jsx)(q,{onClick:()=>void ln(),disabled:ft||!an,children:ft?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ke,{className:`size-3.5`}),`Restarting…`]}):`Enable`})]})]})})]}):(0,Q.jsx)(He,{title:`Local backend access`,children:(0,Q.jsx)(Y,{title:`Owner tools`,description:`Pairing links and client-session management are only available to owner sessions for this backend.`})}),e?(0,Q.jsx)(gt,{desktopBridge:e}):null,(0,Q.jsxs)(He,{title:`Remote environments`,headerAction:(0,Q.jsxs)(Se,{open:De,onOpenChange:e=>{Oe(e),e||Z(null)},children:[(0,Q.jsx)(_e,{render:(0,Q.jsxs)(q,{size:`xs`,variant:`outline`,children:[(0,Q.jsx)(H,{className:`size-3`}),`Add environment`]})}),(0,Q.jsxs)(xe,{className:`max-h-[80dvh] sm:max-w-3xl`,children:[(0,Q.jsxs)(me,{children:[(0,Q.jsx)(he,{children:`Add Environment`}),(0,Q.jsx)(be,{children:`Pair another environment to this client.`})]}),(0,Q.jsx)(ye,{children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[Mn({mode:`remote`,title:`Remote link`,description:`Enter a backend host and pairing code.`,icon:(0,Q.jsx)($e,{"aria-hidden":!0,className:`size-4`})}),e?Mn({mode:`ssh`,title:`SSH`,description:`Use local SSH config, agent, and tunnels for the backend.`,icon:(0,Q.jsx)(re,{"aria-hidden":!0,className:`size-4`})}):null]}),(0,Q.jsx)(Ke,{children:Ae===`ssh`?(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`SSH host or alias`}),(0,Q.jsx)(ue,{value:Ge,onChange:e=>qe(e.target.value),placeholder:`Search hosts or type devbox`,disabled:et,spellCheck:!1})]}),(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_7rem]`,children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Username`}),(0,Q.jsx)(ue,{value:Je,onChange:e=>Ye(e.target.value),placeholder:`root`,disabled:et,spellCheck:!1})]}),(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Port`}),(0,Q.jsx)(ue,{value:Xe,onChange:e=>Ze(e.target.value),placeholder:`22`,inputMode:`numeric`,disabled:et,spellCheck:!1})]})]}),Qe||O?(0,Q.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive`,children:Qe??O}):null,(0,Q.jsxs)(q,{variant:`outline`,className:`w-full`,disabled:et,onClick:()=>void gn(),children:[(0,Q.jsx)(H,{className:`size-3.5`}),et?`Adding…`:`Add environment`]})]}),(0,Q.jsxs)(`div`,{className:`overflow-hidden rounded-lg border border-border/60`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border/60 bg-muted/30 px-3 py-2`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:`Suggested hosts`}),(0,Q.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`From SSH config and known hosts`})]}),(0,Q.jsxs)(q,{size:`xs`,variant:`ghost`,disabled:E,onClick:()=>void bn(),children:[E?(0,Q.jsx)(W,{className:`size-3 animate-spin`}):(0,Q.jsx)(W,{className:`size-3`}),`Refresh`]})]}),(0,Q.jsx)(de,{scrollFade:!0,className:`max-h-56`,children:(0,Q.jsxs)(`div`,{children:[nt.map(e=>(0,Q.jsx)(nn,{target:e,connectingHostAlias:A,onConnect:e=>void xn(e)},`${e.alias}:${e.hostname}:${e.port??``}`)),C&&!E&&nt.length===0?(0,Q.jsx)(`div`,{className:Dt,children:(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No new SSH hosts were discovered.`})}):null]})})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Host`}),(0,Q.jsx)(ue,{value:ze,onChange:e=>jn(e.target.value),placeholder:`backend.example.com`,disabled:et,spellCheck:!1})]}),(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Pairing code`}),(0,Q.jsx)(ue,{value:Ve,onChange:e=>We(e.target.value),placeholder:`PAIRCODE`,disabled:et,spellCheck:!1})]})]}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`span`,{className:`mt-1 block text-[11px] text-muted-foreground`,children:`Paste a full pairing URL here to fill both fields automatically. The pairing code is not kept; the browser stores a bearer token for 7 days.`})})]}),Qe?(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:Qe}):null,(0,Q.jsxs)(q,{variant:`outline`,className:`w-full`,disabled:et,onClick:()=>void gn(),children:[(0,Q.jsx)(H,{className:`size-3.5`}),et?`Adding…`:`Add environment`]})]})})]})})]})]}),children:[s.map(e=>(0,Q.jsx)(en,{environmentId:e,reconnectingEnvironmentId:$,disconnectingEnvironmentId:it,removingEnvironmentId:ot,onConnect:_n,onDisconnect:vn,onRemove:yn},e)),s.length===0?(0,Q.jsx)(`div`,{className:Dt,children:(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No remote environments yet. Click “Add environment” to pair another environment.`})}):null]})]})}function an(e){return e.status!==`unavailable`}function on(e){V.add({type:`success`,title:e===`hosted-link`?`Hosted app link copied`:e===`link`?`Pairing URL copied`:`Pairing code copied`,description:e===`hosted-link`?`Open it in the browser on the device you want to connect.`:e===`link`?`Open it in the client you want to pair to this environment.`:`Paste it into another client to finish pairing.`})}function sn(e){return qt(e)?`hosted-link`:`link`}function cn(e){return!qt(e.url)}function ln(e){return qt(e.url)}function un(e){return e.currentTarget.select()}function dn(e){return e.currentTarget.select()}function fn(e){return e!==null}export{rn as ConnectionsSettings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-Bbz4fkK_.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import{n as i,t as a}from"./env-B4arEvJg.js";import{Jn as o,Jt as s,N as c,Vn as l,Yn as u,bn as d,yn as f}from"./runtime-DKwoXpJv.js";import{i as p}from"./primary-OskAInOO.js";import{It as m}from"./composerDraftStore-CdJJZe42.js";import{t as h}from"./useNavigate-2tVq4iZ2.js";import{t as g}from"./settingsDialogStore-ygYoScKe.js";import{t as _}from"./activity-1CkdQG5u.js";import{a as v,i as y,n as b,o as x,r as S,t as ee}from"./SettingsPanels-BmhZ8u4B.js";import{m as C,p as w}from"./desktopUpdateAtoms-C82GmR67.js";import{t as T}from"./chart-column-Dw6ACmXM.js";import{t as te}from"./git-branch-BKr-Ij4u.js";import{t as E}from"./keyboard-BqeRMHfL.js";import{t as ne}from"./palette-BSD_aJZg.js";import{t as re}from"./search-BGQsenCM.js";import{t as D}from"./settings-2-CZQg_KUQ.js";import{t as O}from"./server-JApJpgLa.js";import{t as k}from"./shield-IZEIJ8r7.js";import{t as A}from"./sparkles-CAf3oJ5S.js";import{t as ie}from"./user-round-Cpzx8pSw.js";import{t as ae}from"./utils-BofFIn5Y.js";import{t as oe}from"./scroll-area-Drsa8bNB.js";import{t as j}from"./button-BAbJxRzt.js";import{c as se,s as ce,t as le}from"./dialog-DQsYchqu.js";import{i as ue,n as de,o as fe,s as pe,t as me}from"./settingsSections.logic-F8RXVmAq.js";var M=e(t(),1),N=r(),he=[{section:`inbox`,title:`AI Focus`,description:`Prioritize the Inbox with bounded, environment-local model ranking.`,keywords:`priority sort active threads model ranking focus refresh`},{section:`inbox`,title:`AI Focus models`,description:`Choose or inherit the ranking model for each connected environment.`,keywords:`provider node disclosure privacy data`},{section:`general`,title:`Time format`,description:`System default, 12-hour or 24-hour clock.`,keywords:`clock hours`},{section:`general`,title:`Default editor`,description:`Pin which editor opens directories and files.`,keywords:`vscode cursor open in`},{section:`general`,title:`Diff line wrapping`,description:`Default wrap state when the diff panel opens.`,keywords:`word wrap`},{section:`general`,title:`Hide whitespace changes`,description:`Whether the diff panel ignores whitespace-only edits.`,keywords:`diff`},{section:`general`,title:`Remote Git status`,description:`Refresh remote branch and pull request metadata.`,keywords:`git polling refresh remote`},{section:`general`,title:`PR & workflow updates`,description:`Choose automatic, reduced, or manual pull request and workflow refreshes.`,keywords:`github actions checks ci polling refresh`},{section:`general`,title:`Stream token by token (legacy)`,description:`Compatibility mode for token-by-token assistant output.`,keywords:`token streaming assistant output streaming tokens buffered`,targetId:`legacy-token-streaming`},{section:`general`,title:`Provider update checks`,description:`Check installed provider CLIs for newer versions.`,keywords:`upgrade cli`},{section:`general`,title:`Auto-open overview`,description:`Open the overview when plans or progress appear.`,keywords:`panel plan`},{section:`general`,title:`New threads`,description:`Default workspace mode for newly created drafts.`,keywords:`local worktree draft`},{section:`general`,title:`Add project starts in`,description:`Starting directory for the Add Project browser.`,keywords:`folder path`},{section:`general`,title:`Archive confirmation`,description:`Ask before archiving a thread.`,keywords:`confirm`},{section:`general`,title:`Delete confirmation`,description:`Ask before deleting a thread.`,keywords:`confirm remove`},{section:`general`,title:`Update track`,description:`Which release channel the app follows.`,keywords:`beta stable release channel`},{section:`appearance`,title:`Interface font`,description:`Normal app text, navigation, dialogs, and controls.`,keywords:`typeface dm sans inter geist`},{section:`appearance`,title:`Code font`,description:`Code blocks, diffs, file paths, and terminal surfaces.`,keywords:`monospace jetbrains fira`},{section:`appearance`,title:`Text size`,description:`Scale the interface independently from the theme.`,keywords:`zoom font size compact`},{section:`appearance`,title:`Corner radius`,description:`Rounding for panels, buttons, inputs, and menus.`,keywords:`round square`},{section:`appearance`,title:`Primary color`,description:`Accent color for links, focus rings, and actions.`,keywords:`accent custom violet amber`},{section:`appearance`,title:`Transparency`,description:`Glass and floating surfaces like dialogs, menus, popups.`,keywords:`glass blur liquid material solid`},{section:`appearance`,title:`Panel layout`,description:`How the overview panel arranges its sections.`,keywords:`stack hybrid status board`},{section:`appearance`,title:`Theme palette`,description:`Built-in and custom color themes; import and export.`,keywords:`dark midnight graphite nord dracula catppuccin`},{section:`appearance`,title:`Auto-collapse wide composer labels`,description:`Show long composer mode labels only on hover or focus.`,keywords:`chips`},{section:`appearance`,title:`Always use Build mode`,description:`Hide the mode selector and send every turn in Build mode.`,keywords:`composer`},{section:`appearance`,title:`Theme variant`,description:`Light, dark, or follow the system preference.`,keywords:`color mode dark light`},{section:`providers`,title:`Provider instances`,description:`Configure Codex, Claude, Copilot, OpenCode, and Cursor.`,keywords:`api model driver accent`},{section:`mcp-servers`,title:`External integrations`,description:`Pair local Codex or Claude MCP clients with scoped, revocable access.`,keywords:`model context protocol tools pairing codex claude approval agent control`},{section:`mcp-servers`,title:`MCP Servers`,description:`Manage Codex, Claude, and other provider-native MCP servers.`,keywords:`model context protocol tools add server oauth profiles providers`},{section:`keybindings`,title:`Keybindings file`,description:`Customize shortcuts via the keybindings configuration file.`,keywords:`shortcuts hotkeys keyboard`},{section:`source-control`,title:`Version Control`,description:`Git behavior and defaults.`,keywords:`git commit`},{section:`source-control`,title:`Source Control Providers`,description:`GitHub and other source control provider connections.`,keywords:`github pr pull request`},{section:`connections`,title:`Network access`,description:`Expose the local backend on your network.`,keywords:`lan host remote`},{section:`connections`,title:`Pairing link`,description:`Scan to open this backend on another device.`,keywords:`qr code phone mobile`},{section:`connections`,title:`Tailscale HTTPS`,description:`Serve over your tailnet with HTTPS.`,keywords:`vpn remote`},{section:`connections`,title:`Authorized clients`,description:`Devices and sessions allowed to connect.`,keywords:`revoke tokens`},{section:`security`,title:`Session code`,description:`Compare this browser's channel against the one your node's CLI shows.`,keywords:`security verification websas e2ee compare short authentication string`},{section:`security`,title:`Enrollment fingerprint`,description:`This node's identity, and the prekey and continuity behind it.`,keywords:`security e2ee key fingerprint rotate lineage`},{section:`security`,title:`Authorized client keys`,description:`Approve, reduce, revoke, or delete a client key, and open a pairing window.`,keywords:`security e2ee pairing fingerprint refused attempts`},{section:`security`,title:`Admission policy`,description:`Require E2EE, require approved clients, and advance the policy generation.`,keywords:`security e2ee strict fallback plaintext`},{section:`diagnostics`,title:`Diagnostics`,description:`Logs, tracing, resource history, and live activity.`,keywords:`debug performance slow`},{section:`diagnostics`,title:`Test notification`,description:`Fire sample notifications to preview the toast design and stacking.`,keywords:`toast notifications preview trigger sample`},{section:`statistics`,title:`Statistics`,description:`Usage activity and history.`,keywords:`heatmap usage tokens`},{section:`archived`,title:`Archive`,description:`Archived threads; restore or delete permanently.`,keywords:`trash restore`}],P=m(),F=[{id:`account`,label:`Account`,icon:ie},{id:`general`,label:`General`,icon:D},{id:`inbox`,label:`Inbox`,icon:A},{id:`providers`,label:`Providers`,icon:x},{id:`opinionated-plugins`,label:`Plugins`,icon:y},{id:`mcp-servers`,label:`Integrations`,icon:O},{id:`appearance`,label:`Appearance`,icon:ne},{id:`keybindings`,label:`Keybindings`,icon:E},{id:`source-control`,label:`Source Control`,icon:te},{id:`connections`,label:`Connections`,icon:v},{id:`security`,label:`Security`,icon:k},{id:`diagnostics`,label:`Diagnostics`,icon:_},{id:`statistics`,label:`Statistics`,icon:T},{id:`archived`,label:`Archive`,icon:C}];F.map(e=>e.id),new Map(F.map(e=>[e.id,e.label]));var ge=new Set([`general`,`providers`,`appearance`]),I=(0,M.lazy)(()=>n(()=>import(`./AccountSettings-BUoiS8x1.js`).then(e=>({default:e.AccountSettingsPanel})),[])),_e=(0,M.lazy)(()=>n(()=>import(`./ProvidersSettingsPanel-v2SvoEGx.js`).then(e=>({default:e.ProvidersSettingsPanel})),[])),ve=(0,M.lazy)(()=>n(()=>import(`./AiFocusSettings-Cz1Uqn7a.js`).then(e=>({default:e.AiFocusSettings})),[])),L=(0,M.lazy)(()=>n(()=>import(`./OpinionatedPluginsSettings-CeoSmZ90.js`).then(e=>({default:e.OpinionatedPluginsSettingsPanel})),[])),R=(0,M.lazy)(()=>n(()=>import(`./IntegrationsSettingsPanel-Cg4eRHm_.js`).then(e=>({default:e.IntegrationsSettingsPanel})),[])),ye=(0,M.lazy)(()=>n(()=>import(`./AppearanceSettings-CYbSApl4.js`).then(e=>({default:e.AppearanceSettingsPanel})),[])),z=(0,M.lazy)(()=>n(()=>import(`./KeybindingsSettings-CYj67N2D.js`).then(e=>({default:e.KeybindingsSettingsPanel})),[])),B=(0,M.lazy)(()=>n(()=>import(`./SourceControlSettings-DvPydmxX.js`).then(e=>({default:e.SourceControlSettingsPanel})),[])),V=(0,M.lazy)(()=>n(()=>import(`./ConnectionsSettings--CbTzkTn.js`).then(e=>({default:e.ConnectionsSettings})),[])),be=(0,M.lazy)(()=>n(()=>import(`./NodeSecuritySettings-DMkkTgfg.js`).then(e=>({default:e.NodeSecuritySettings})),[])),H=(0,M.lazy)(()=>n(()=>import(`./DiagnosticsSettings-C74u3ce5.js`).then(e=>({default:e.DiagnosticsSettings})),[])),U=(0,M.lazy)(()=>n(()=>import(`./StatisticsSettingsLink-Cx43bOeo.js`).then(e=>({default:e.StatisticsSettingsLink})),[]));function xe(e){let t=(0,N.c)(6),{onRestored:n}=e,{changedSettingLabels:r,restoreDefaults:i}=S(n),a=r.length===0,o;t[0]===i?o=t[1]:(o=()=>void i(),t[0]=i,t[1]=o);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,P.jsx)(w,{className:`size-3.5`}),t[2]=s):s=t[2];let c;return t[3]!==a||t[4]!==o?(c=(0,P.jsxs)(j,{size:`xs`,variant:`outline`,disabled:a,onClick:o,children:[s,`Restore defaults`]}),t[3]=a,t[4]=o,t[5]=c):c=t[5],c}function Se(e){let t=(0,N.c)(45),{section:n,searchTargetId:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,P.jsx)(`div`,{className:`flex min-h-80 items-center justify-center text-muted-foreground text-sm`,children:`Loading settings...`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=n===`account`?(0,P.jsx)(I,{}):null,t[1]=n,t[2]=a);let o;t[3]!==r||t[4]!==n?(o=n===`general`?(0,P.jsx)(b,{searchTargetId:r}):null,t[3]=r,t[4]=n,t[5]=o):o=t[5];let s;t[6]===n?s=t[7]:(s=n===`inbox`?(0,P.jsx)(ve,{}):null,t[6]=n,t[7]=s);let c;t[8]===n?c=t[9]:(c=n===`providers`?(0,P.jsx)(_e,{}):null,t[8]=n,t[9]=c);let l;t[10]===n?l=t[11]:(l=n===`opinionated-plugins`?(0,P.jsx)(L,{}):null,t[10]=n,t[11]=l);let u;t[12]===n?u=t[13]:(u=n===`mcp-servers`?(0,P.jsx)(R,{}):null,t[12]=n,t[13]=u);let d;t[14]===n?d=t[15]:(d=n===`appearance`?(0,P.jsx)(ye,{}):null,t[14]=n,t[15]=d);let f;t[16]===n?f=t[17]:(f=n===`keybindings`?(0,P.jsx)(z,{}):null,t[16]=n,t[17]=f);let p;t[18]===n?p=t[19]:(p=n===`source-control`?(0,P.jsx)(B,{}):null,t[18]=n,t[19]=p);let m;t[20]===n?m=t[21]:(m=n===`connections`?(0,P.jsx)(V,{}):null,t[20]=n,t[21]=m);let h;t[22]===n?h=t[23]:(h=n===`security`?(0,P.jsx)(be,{}):null,t[22]=n,t[23]=h);let g;t[24]===n?g=t[25]:(g=n===`diagnostics`?(0,P.jsx)(H,{}):null,t[24]=n,t[25]=g);let _;t[26]===n?_=t[27]:(_=n===`statistics`?(0,P.jsx)(U,{}):null,t[26]=n,t[27]=_);let v;t[28]===n?v=t[29]:(v=n===`archived`?(0,P.jsx)(ee,{}):null,t[28]=n,t[29]=v);let y;return t[30]!==p||t[31]!==m||t[32]!==h||t[33]!==g||t[34]!==_||t[35]!==v||t[36]!==a||t[37]!==o||t[38]!==s||t[39]!==c||t[40]!==l||t[41]!==u||t[42]!==d||t[43]!==f?(y=(0,P.jsxs)(M.Suspense,{fallback:i,children:[a,o,s,c,l,u,d,f,p,m,h,g,_,v]}),t[30]=p,t[31]=m,t[32]=h,t[33]=g,t[34]=_,t[35]=v,t[36]=a,t[37]=o,t[38]=s,t[39]=c,t[40]=l,t[41]=u,t[42]=d,t[43]=f,t[44]=y):y=t[44],y}function Ce(){let e=(0,N.c)(18),t=h(),n=p(),r=l(),m=s(Pe),_=g(Ne),v=g(Me),y=g(je),b=g(Ae),x=g(ke),S=u({requestedEnvironmentId:y,activeEnvironmentId:m,primaryEnvironmentId:n?.environmentId??null}),ee=f(e=>S?e.byId[S]??null:null),C=d(e=>S?e.byId[S]??null:null),w=S!==null&&S===n?.environmentId,T=w?r:C?.serverConfig??null,te=w?n?.label??T?.environment.label??`Current node`:C?.descriptor?.label??T?.environment.label??ee?.label??`Selected node`,E=S?{environmentId:S,nodeLabel:te,serverConfig:T,primary:w,connected:w?T!==null:C?.connectionState===`connected`}:null,ne=c(Oe),D=c(De),O=c(Ee),k=i(),A=me(D,O),ie=de(ne,D,O),j=F.filter(e=>fe(e.id,{hosted:k,role:ie})),I=j.some(e=>e.id===v)?v:j[0]?.id??`appearance`,_e=pe(I),ve=ue(_e,{nativeClient:a,nodeLabel:E?.nodeLabel??null});(0,M.useEffect)(()=>{k&&!A||_&&v!==I&&x(I)},[I,k,_,A,v,x]);let[L,R]=(0,M.useState)(``),[ye,z]=(0,M.useState)(null),B,V;e[0]===_?(B=e[1],V=e[2]):(B=()=>{_||(R(``),z(null))},V=[_],e[0]=_,e[1]=B,e[2]=V),(0,M.useEffect)(B,V);let be=new Set(j.map(Te)),H=L.trim().toLowerCase(),U=H.length===0?[]:he.filter(e=>be.has(e.section)&&`${e.title} ${e.description} ${e.keywords??``}`.toLowerCase().includes(H)),[Ce,Fe]=(0,M.useState)(0),W;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(W=()=>{Fe(we)},e[3]=W):W=e[3];let Ie=W,Le=ge.has(I),Re=Math.max(0,j.findIndex(e=>e.id===I)),G;e[4]===b?G=e[5]:(G=e=>{e||b()},e[4]=b,e[5]=G);let K;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,P.jsx)(se,{className:`text-base font-semibold`,children:`Settings`}),e[6]=K):K=e[6];let q;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,P.jsx)(re,{"aria-hidden":!0,className:`pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground/60`}),e[7]=q):q=e[7];let J;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(J=e=>{z(null),R(e.target.value)},e[8]=J):J=e[8];let Y;e[9]===L?Y=e[10]:(Y=(0,P.jsxs)(`div`,{className:`relative w-72 max-w-[40vw]`,children:[q,(0,P.jsx)(`input`,{type:`search`,value:L,onChange:J,placeholder:`Search settings…`,"aria-label":`Search settings`,className:`h-8 w-full rounded-md border border-input bg-muted/40 pr-3 pl-8 text-[13px] outline-none transition-colors placeholder:text-muted-foreground/60 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40`})]}),e[9]=L,e[10]=Y);let X=Le?(0,P.jsx)(xe,{onRestored:Ie}):null,Z;e[11]===X?Z=e[12]:(Z=(0,P.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 pr-9`,children:X}),e[11]=X,e[12]=Z);let ze=`translateY(${Re*2.5}rem)`,Q;e[13]===ze?Q=e[14]:(Q=(0,P.jsx)(`span`,{className:`pointer-events-none absolute top-2 right-2 left-2 z-0 h-9 rounded-md bg-accent transition-transform duration-[240ms] ease-out`,style:{transform:ze},"aria-hidden":!0}),e[13]=ze,e[14]=Q);let Be=oe,Ve=H.length>0?(0,P.jsx)(`div`,{className:`p-4`,children:(0,P.jsx)(`div`,{className:`flex flex-col gap-0.5 rounded-xl border border-border bg-card p-1.5 shadow-sm/4`,children:U.length===0?(0,P.jsxs)(`p`,{className:`px-2 py-8 text-center text-sm text-muted-foreground`,children:[`No settings match “`,L.trim(),`”.`]}):U.map(e=>{let n=j.find(t=>t.id===e.section)?.label;return(0,P.jsxs)(`button`,{type:`button`,onClick:()=>{if(e.section===`statistics`){b(),t({to:`/statistics`});return}z(e.targetId??null),x(e.section),R(``)},className:`flex flex-col gap-0.5 rounded-md px-3 py-2.5 text-left outline-hidden ring-ring transition-colors hover:bg-accent focus-visible:ring-2`,children:[(0,P.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,P.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),n?(0,P.jsx)(`span`,{className:`text-[11px] text-muted-foreground/70`,children:n}):null]}),(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]},`${e.section}:${e.title}`)})})}):(0,P.jsx)(`div`,{className:`flex flex-col`,children:(0,P.jsx)(Se,{section:I,searchTargetId:ye})},Ce),$;return e[15]!==Be||e[16]!==Ve?($=(0,P.jsx)(Be,{className:`min-h-0 min-w-0 flex-1`,children:Ve}),e[15]=Be,e[16]=Ve,e[17]=$):$=e[17],(0,P.jsx)(le,{open:_,onOpenChange:G,children:(0,P.jsx)(o,{value:E,children:(0,P.jsxs)(ce,{className:`project-glass-surface h-[min(88dvh,880px)] max-w-[1180px] overflow-hidden p-0`,bottomStickOnMobile:!1,showCloseButton:!0,surface:`glass`,children:[(0,P.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center justify-between border-b border-border px-5`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,P.jsxs)(`div`,{className:`flex shrink-0 items-baseline gap-2`,children:[K,(0,P.jsx)(`span`,{"data-testid":`settings-scope-label`,className:`max-w-48 truncate text-xs text-muted-foreground`,children:ve})]}),Y]}),Z]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-row`,children:[(0,P.jsxs)(`nav`,{className:`relative isolate flex w-12 shrink-0 flex-col gap-1 border-r border-border p-2 sm:w-48`,children:[Q,j.map(e=>{let t=e.icon,n=I===e.id;return(0,P.jsxs)(`button`,{type:`button`,onClick:()=>{z(null),x(e.id)},className:ae(`relative z-10 flex h-9 items-center gap-2.5 rounded-md px-2 text-left text-[13px] outline-hidden ring-ring transition-colors duration-150 focus-visible:ring-2`,n?`font-medium text-foreground`:`text-muted-foreground/70 hover:text-foreground/80`),"aria-label":e.label,"aria-current":n?`page`:void 0,children:[(0,P.jsx)(t,{className:ae(`size-4 shrink-0`,n?`text-foreground`:`text-muted-foreground/60`)}),(0,P.jsx)(`span`,{className:`hidden truncate sm:inline`,children:e.label})]},e.id)})]}),$]})]})})})}function we(e){return e+1}function Te(e){return e.id}function Ee(e){return e.transportStatus}function De(e){return e.directoryStatus}function Oe(e){return e.effectiveRole}function ke(e){return e.setSection}function Ae(e){return e.closeSettings}function je(e){return e.targetEnvironmentId}function Me(e){return e.section}function Ne(e){return e.open}function Pe(e){return e.activeEnvironmentId}export{Ce as SettingsDialog};
|