local-operator-ui 0.34.52 → 0.34.53
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/out/main/index.js +1616 -17
- package/out/preload/index.js +54 -0
- package/out/renderer/assets/{_basePickBy-jKP04X-l.js → _basePickBy-CvpcKweF.js} +1 -1
- package/out/renderer/assets/{_baseUniq-C1Tb5Z81.js → _baseUniq-D1oOSrqB.js} +1 -1
- package/out/renderer/assets/{agent-details-page-BXYnUttm.js → agent-details-page-Dbd7Qqbd.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-SrDPuy2R.js → agent-hub-page-hB4xULfK.js} +2 -2
- package/out/renderer/assets/{agents-page-BGpbOr-D.js → agents-page-DfuX5-79.js} +3 -3
- package/out/renderer/assets/{arc-C60IJR4W.js → arc-BajJ7pje.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-CG2aUgQQ.js → architectureDiagram-IEHRJDOE-D1-CNSAD.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-DG6vLb5j.js → blockDiagram-JOT3LUYC-CD5T8WZA.js} +1 -1
- package/out/renderer/assets/{book-open-CqpAQX_h.js → book-open-CfuxuX-l.js} +1 -1
- package/out/renderer/assets/browser-page-DbFH9sog.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-BICZWWTE.js → browser-webauthn-prompt-DW800ko_.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-Dxl-T2ot.js → c4Diagram-VJAJSXHY-COKPfAva.js} +1 -1
- package/out/renderer/assets/channel-5khbBi1K.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-BTZU1mmj.js → chunk-4BMEZGHF-iSOGNS5q.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-q4ATawsA.js → chunk-A2AXSNBT-B7eDvfbn.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-ZenDipzf.js → chunk-AEK57VVT-CTtvvIx6.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-LiclW27B.js → chunk-D6G4REZN-D89NRhvc.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-rimlHqns.js → chunk-RZ5BOZE2-D9-5Iwp7.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-W4sbYp78.js → chunk-XZIHB7SX-Cdyx-enm.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-B_cQ6qiw.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-B_cQ6qiw.js +1 -0
- package/out/renderer/assets/clone-DUh4Smnq.js +1 -0
- package/out/renderer/assets/{console-mirror-CqKozfMV.js → console-mirror-D4VUczn2.js} +1 -1
- package/out/renderer/assets/{consoleCapture-Dt4bXfA5.js → consoleCapture-BZscABJW.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-Bud_iL2h.js → conversation-input-sync-Dlf10JWF.js} +259 -259
- package/out/renderer/assets/{dagre-OKDRZEBW-DReye3bj.js → dagre-OKDRZEBW-hOluomAX.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-yQnXG8y9.js → diagram-SSKATNLV-BWdY9OnP.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-Dy1ho1KJ.js → diagram-VNBRO52H-CUZoZ2hJ.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-MvZHt7NH.js → erDiagram-Q7BY3M3F-BaXRnwVj.js} +1 -1
- package/out/renderer/assets/{error-boundary-CnAfZpXJ.js → error-boundary-BCQ7FGQc.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-BSFgzIoa.js → flowDiagram-4HSFHLVR-D3gvS8EU.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-Dedj3NlS.js → ganttDiagram-APWFNJXF-DRKxbsB1.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-Cu4jn0rm.js → gitGraphDiagram-7IBYFJ6S-B-6CMRoo.js} +1 -1
- package/out/renderer/assets/{graph-CQdRsT3g.js → graph-Bvgoe8Zc.js} +1 -1
- package/out/renderer/assets/{index-Dv4cmAE_.js → index-Bg8G2adf.js} +1 -1
- package/out/renderer/assets/index-C9huVbt8.js +57 -0
- package/out/renderer/assets/{index-gCeAf81g.js → index-DWZ82U8c.js} +1 -1
- package/out/renderer/assets/index-DxyRyuQP.css +1 -0
- package/out/renderer/assets/{index-Cq2MGZTE.js → index-dNBOt_b9.js} +193 -193
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-CuAzIGSj.js → infoDiagram-PH2N3AL5-g5rZp0e7.js} +1 -1
- package/out/renderer/assets/{installer-CNLF7ICd.js → installer-BRjexwGb.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-CWJ2JJ4t.js → journeyDiagram-U35MCT3I-CyyN61cm.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-E-V1z1_U.js → kanban-definition-NDS4AKOZ-BcYjcFGg.js} +1 -1
- package/out/renderer/assets/{layout-CpEZBnkZ.js → layout-DIrLHdoU.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-z45uS7-l.js → legacy-agents-page-C4087qcZ.js} +2 -2
- package/out/renderer/assets/{mermaid.core-DD0sotYo.js → mermaid.core-TBXZ6m8l.js} +5 -5
- package/out/renderer/assets/{mesh-page-BwlyEepu.js → mesh-page-Z6_brJoS.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-B83-pecE.js → mindmap-definition-ALO5MXBD-CDtMt6Do.js} +1 -1
- package/out/renderer/assets/{mini-DtTMJOfC.js → mini-DDoFzOhf.js} +1 -1
- package/out/renderer/assets/{notebook-pen-7O_-yyf1.js → notebook-pen-Dd0WXtBw.js} +1 -1
- package/out/renderer/assets/{org-access-CTWNNvUI.js → org-access-BVkMTwKq.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-DqM2fDEM.js → org-surface-gate-CV-1baVy.js} +1 -1
- package/out/renderer/assets/{page-header-C9NIPdYQ.js → page-header-Dl5IO6UP.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DdgrLAL8.js → pieDiagram-IB7DONF6-gmMGr-ui.js} +1 -1
- package/out/renderer/assets/projects-page-B4mpUcqQ.js +45 -0
- package/out/renderer/assets/{publication-validation-DxWRtzXi.js → publication-validation-cIO-Z0gj.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-DgXs6rcx.js → quadrantDiagram-7GDLP6J5-Ctwtym9P.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-FIFs14Hm.js → radar-MK3ICKWK-CApF2ugX.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-CjTgEezA.js → radient-auth-buttons-B1WkSc0e.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-DJ_fulOC.js → requirementDiagram-KVF5MWMF-DB3NXRpA.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DkDkmgpo.js → sankeyDiagram-QLVOVGJD-lcLgzHR-.js} +1 -1
- package/out/renderer/assets/{schedules-page-BYp0ooeI.js → schedules-page-ByfZ04x2.js} +2 -2
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DslLI_jv.js → sequenceDiagram-X6HHIX6F-C92s7I-3.js} +1 -1
- package/out/renderer/assets/settings-page-DaWmx0G_.js +292 -0
- package/out/renderer/assets/{stateDiagram-DGXRK772-WjXX5ZFj.js → stateDiagram-DGXRK772-D1MupxMG.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BsNwRWuq.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-B5dMwIwc.js → timeline-definition-BDJGKUSR-SK8QkNlF.js} +1 -1
- package/out/renderer/assets/{ui-preferences-store-C_k6yzj8.js → ui-preferences-store-BSjv1eml.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-Duu1Yzmd.js → use-download-agent-mutation-Bik5KhXj.js} +1 -1
- package/out/renderer/assets/{use-memberships-query-D0178BB5.js → use-memberships-query-CXnke9-r.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-DylLmksx.js → use-session-snapshot-D20-nQEA.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-ClyMBBI3.js → xychartDiagram-VJFVF3MP-_YTSS36c.js} +1 -1
- package/out/renderer/console-capture.html +5 -5
- package/out/renderer/index.html +7 -7
- package/out/renderer/installer.html +4 -4
- package/out/renderer/mini.html +7 -7
- package/package.json +4 -3
- package/out/renderer/assets/browser-page-C52F14Yv.js +0 -1
- package/out/renderer/assets/channel-Yjo7b_td.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-Cdmkh24H.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-Cdmkh24H.js +0 -1
- package/out/renderer/assets/clone-BOQDMNRz.js +0 -1
- package/out/renderer/assets/index-CF-SqRCw.js +0 -57
- package/out/renderer/assets/index-CSvB6_Ie.css +0 -1
- package/out/renderer/assets/projects-page-Y9v0wFR-.js +0 -45
- package/out/renderer/assets/settings-page-CR012gt8.js +0 -292
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DPmr9Ge_.js +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import{r as c,t as n,j as t,c as ce,e as Hn,L as Ot}from"./index-C9huVbt8.js";import{cs as ht,ct as Vn,cu as Lt,cv as be,bM as Gn,C as Ne,ah as rn,ai as Nt,a4 as cn,u as ln,aG as qn,aH as Yn,cw as Zn,cx as Qn,cy as Wn,cz as Jn,cA as dn,cB as St,af as un,cC as Xn,aL as es,cD as Ft,ad as ts,cE as ns,cF as ss,cG as as,cH as is,Z as Mt,cI as os,cJ as rs,a3 as gn,aN as ft,aO as yt,cK as cs,aS as ls,cL as ds,c7 as xt,a as _n,c as Dt,ar as Ze,cM as us,cN as gs,cO as _s,d as we,cP as kt,cQ as ms,cR as ps,cS as hs,aJ as fs,bA as ys,cT as mn,cU as xs,cV as ks,cW as vs,B as bs,cX as pn,aM as hn,cY as fn,cZ as ws,c_ as js,c$ as Ns,d0 as Ss,d1 as Ms,d2 as Cs,d3 as As,d4 as Es,D as Rs,bH as yn,aT as Ts,bh as Is,d5 as Ue,d6 as vt,d7 as zt,d8 as Os,d9 as Ls,da as Fs,db as Ds,dc as xn,dd as zs,bu as Us,bP as Ps,bO as Ks,de as $s,df as Bs,dg as Hs,dh as Vs,di as Gs,dj as qs}from"./conversation-input-sync-Dlf10JWF.js";import{K as Ys,u as je,n as Zs,o as Qs,q as Ws,T as Js,r as kn}from"./ui-preferences-store-BSjv1eml.js";import{bh as vn,bi as Xs,bj as ea,bk as ta,bl as ne,b1 as nt,b2 as re,bm as na,aH as Ut,bn as sa,bo as aa,bp as Ge,S as ia,b0 as oa,bq as ra,br as ca,bs as la,bt as da,bu as ua,bv as ga,bw as _a,aS as Pt,bx as ma,aN as pa,aZ as Kt,by as ha,a_ as fa,a$ as ya,bz as xa,bA as ka}from"./index-dNBOt_b9.js";import{P as va}from"./page-header-Dl5IO6UP.js";import{c as w,u as q,B as P,S as le,M as ba,Y as Xe,Z as et,_ as Le,F as wa,G as ja,H as Na,J as Sa,K as Ma,l as $e,a0 as tt,L as xe,I as Re,ab as $t,T as bn,C as Ca,q as Aa,r as Ea,s as Ra,v as Ta,w as Bt,p as Ia,A as se,z as Oa,E as La,ac as Fa,a4 as Da,g as za,k as wn}from"./error-boundary-BCQ7FGQc.js";import{R as Ua}from"./radient-auth-buttons-B1WkSc0e.js";import{N as Pa}from"./notebook-pen-Dd0WXtBw.js";import{B as Ka}from"./book-open-CfuxuX-l.js";import{a as $a,p as dt}from"./parseISO-BHJWTxrA.js";import{i as Ba,a as Ee,f as Ha}from"./format-esAOn2VS.js";import{t as Va}from"./en-US-CHJkXXr4.js";import"./console-mirror-D4VUczn2.js";/**
|
|
2
|
+
* @license lucide-react v0.507.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Ga=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m14.31 8 5.74 9.94",key:"1y6ab4"}],["path",{d:"M9.69 8h11.48",key:"1wxppr"}],["path",{d:"m7.38 12 5.74-9.94",key:"1grp0k"}],["path",{d:"M9.69 16 3.95 6.06",key:"libnyf"}],["path",{d:"M14.31 16H2.83",key:"x5fava"}],["path",{d:"m16.62 12-5.74 9.94",key:"1vwawt"}]],qa=w("aperture",Ga);/**
|
|
7
|
+
* @license lucide-react v0.507.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Ya=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]],Za=w("atom",Ya);/**
|
|
12
|
+
* @license lucide-react v0.507.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Qa=[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]],Wa=w("audio-waveform",Qa);/**
|
|
17
|
+
* @license lucide-react v0.507.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Ja=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]],Xa=w("binary",Ja);/**
|
|
22
|
+
* @license lucide-react v0.507.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const ei=[["path",{d:"M10 7v10.9",key:"1gynux"}],["path",{d:"M14 6.1V17",key:"116kdf"}],["path",{d:"M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4",key:"gpb6xx"}],["path",{d:"M16.536 7.465a5 5 0 0 0-7.072 0l-2 2a5 5 0 0 0 0 7.07 5 5 0 0 0 7.072 0l2-2a5 5 0 0 0 0-7.07",key:"1tsln4"}],["path",{d:"M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4",key:"qexcha"}]],ti=w("candy",ei);/**
|
|
27
|
+
* @license lucide-react v0.507.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const ni=[["path",{d:"m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8",key:"1imjwt"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 14h.01",key:"7oqj8z"}],["rect",{width:"18",height:"8",x:"3",y:"10",rx:"2",key:"a7itu8"}],["path",{d:"M5 18v2",key:"ppbyun"}],["path",{d:"M19 18v2",key:"gy7782"}]],si=w("car-front",ni);/**
|
|
32
|
+
* @license lucide-react v0.507.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const ai=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["circle",{cx:"8",cy:"10",r:"2",key:"1xl4ub"}],["path",{d:"M8 12h8",key:"1wcyev"}],["circle",{cx:"16",cy:"10",r:"2",key:"r14t7q"}],["path",{d:"m6 20 .7-2.9A1.4 1.4 0 0 1 8.1 16h7.8a1.4 1.4 0 0 1 1.4 1l.7 3",key:"l01ucn"}]],ii=w("cassette-tape",ai);/**
|
|
37
|
+
* @license lucide-react v0.507.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const oi=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],ri=w("chart-line",oi);/**
|
|
42
|
+
* @license lucide-react v0.507.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const ci=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]],li=w("circle-play",ci);/**
|
|
47
|
+
* @license lucide-react v0.507.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const di=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],ui=w("circle-plus",di);/**
|
|
52
|
+
* @license lucide-react v0.507.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const gi=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]],_i=w("circuit-board",gi);/**
|
|
57
|
+
* @license lucide-react v0.507.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const mi=[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",key:"1cez44"}],["path",{d:"m13 12-3 5h4l-3 5",key:"1t22er"}]],pi=w("cloud-lightning",mi);/**
|
|
62
|
+
* @license lucide-react v0.507.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const hi=[["path",{d:"M10.188 8.5A6 6 0 0 1 16 4a1 1 0 0 0 6 6 6 6 0 0 1-3 5.197",key:"erj67n"}],["path",{d:"M13 16a3 3 0 1 1 0 6H7a5 5 0 1 1 4.9-6Z",key:"p44pc9"}]],fi=w("cloud-moon",hi);/**
|
|
67
|
+
* @license lucide-react v0.507.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const yi=[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M8 19h.01",key:"puxtts"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M12 21h.01",key:"h35vbk"}],["path",{d:"M16 15h.01",key:"rnfrdf"}],["path",{d:"M16 19h.01",key:"1vcnzz"}]],xi=w("cloud-snow",yi);/**
|
|
72
|
+
* @license lucide-react v0.507.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const ki=[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}],["path",{d:"M15.947 12.65a4 4 0 0 0-5.925-4.128",key:"dpwdj0"}],["path",{d:"M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z",key:"s09mg5"}]],vi=w("cloud-sun",ki);/**
|
|
77
|
+
* @license lucide-react v0.507.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const bi=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],wi=w("coffee",bi);/**
|
|
82
|
+
* @license lucide-react v0.507.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const ji=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 18a6 6 0 0 0 0-12v12z",key:"j4l70d"}]],jn=w("contrast",ji);/**
|
|
87
|
+
* @license lucide-react v0.507.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Ni=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Si=w("credit-card",Ni);/**
|
|
92
|
+
* @license lucide-react v0.507.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Mi=[["path",{d:"m6 8 1.75 12.28a2 2 0 0 0 2 1.72h4.54a2 2 0 0 0 2-1.72L18 8",key:"8166m8"}],["path",{d:"M5 8h14",key:"pcz4l3"}],["path",{d:"M7 15a6.47 6.47 0 0 1 5 0 6.47 6.47 0 0 0 5 0",key:"yjz344"}],["path",{d:"m12 8 1-6h2",key:"3ybfa4"}]],Ci=w("cup-soda",Mi);/**
|
|
97
|
+
* @license lucide-react v0.507.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Ai=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M6 12c0-1.7.7-3.2 1.8-4.2",key:"oqkarx"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M18 12c0 1.7-.7 3.2-1.8 4.2",key:"1eah9h"}]],Ei=w("disc-3",Ai);/**
|
|
102
|
+
* @license lucide-react v0.507.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Ri=[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]],Ti=w("droplet",Ri);/**
|
|
107
|
+
* @license lucide-react v0.507.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Ii=[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]],Oi=w("droplets",Ii);/**
|
|
112
|
+
* @license lucide-react v0.507.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Li=[["path",{d:"M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z",key:"15baut"}],["path",{d:"M18 12v.5",key:"18hhni"}],["path",{d:"M16 17.93a9.77 9.77 0 0 1 0-11.86",key:"16dt7o"}],["path",{d:"M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33",key:"l9di03"}],["path",{d:"M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4",key:"1kjonw"}],["path",{d:"m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98",key:"1zlm23"}]],Fi=w("fish",Li);/**
|
|
117
|
+
* @license lucide-react v0.507.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Di=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],zi=w("flame",Di);/**
|
|
122
|
+
* @license lucide-react v0.507.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Ui=[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]],Pi=w("flower-2",Ui);/**
|
|
127
|
+
* @license lucide-react v0.507.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Ki=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5",key:"14wa3c"}],["path",{d:"M12 7.5V9",key:"1oy5b0"}],["path",{d:"M7.5 12H9",key:"eltsq1"}],["path",{d:"M16.5 12H15",key:"vk5kw4"}],["path",{d:"M12 16.5V15",key:"k7eayi"}],["path",{d:"m8 8 1.88 1.88",key:"nxy4qf"}],["path",{d:"M14.12 9.88 16 8",key:"1lst6k"}],["path",{d:"m8 16 1.88-1.88",key:"h2eex1"}],["path",{d:"M14.12 14.12 16 16",key:"uqkrx3"}]],$i=w("flower",Ki);/**
|
|
132
|
+
* @license lucide-react v0.507.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const Bi=[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]],Hi=w("ghost",Bi);/**
|
|
137
|
+
* @license lucide-react v0.507.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Vi=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Gi=w("github",Vi);/**
|
|
142
|
+
* @license lucide-react v0.507.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const qi=[["path",{d:"m11.9 12.1 4.514-4.514",key:"109xqo"}],["path",{d:"M20.1 2.3a1 1 0 0 0-1.4 0l-1.114 1.114A2 2 0 0 0 17 4.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 17.828 7h1.344a2 2 0 0 0 1.414-.586L21.7 5.3a1 1 0 0 0 0-1.4z",key:"txyc8t"}],["path",{d:"m6 16 2 2",key:"16qmzd"}],["path",{d:"M8.23 9.85A3 3 0 0 1 11 8a5 5 0 0 1 5 5 3 3 0 0 1-1.85 2.77l-.92.38A2 2 0 0 0 12 18a4 4 0 0 1-4 4 6 6 0 0 1-6-6 4 4 0 0 1 4-4 2 2 0 0 0 1.85-1.23z",key:"1de1vg"}]],Yi=w("guitar",qi);/**
|
|
147
|
+
* @license lucide-react v0.507.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const Zi=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]],Qi=w("hexagon",Zi);/**
|
|
152
|
+
* @license lucide-react v0.507.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const Wi=[["path",{d:"M12 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6m-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0",key:"1uxfcu"}],["path",{d:"M12.14 11a3.5 3.5 0 1 1 6.71 0",key:"4k3m1s"}],["path",{d:"M15.5 6.5a3.5 3.5 0 1 0-7 0",key:"zmuahr"}]],Ji=w("ice-cream-bowl",Wi);/**
|
|
157
|
+
* @license lucide-react v0.507.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const Xi=[["path",{d:"M21 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-2Z",key:"jg2n2t"}],["path",{d:"M6 15v-2",key:"gd6mvg"}],["path",{d:"M12 15V9",key:"8c7uyn"}],["circle",{cx:"12",cy:"6",r:"3",key:"1gm2ql"}]],eo=w("joystick",Xi);/**
|
|
162
|
+
* @license lucide-react v0.507.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const to=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],no=w("leaf",to);/**
|
|
167
|
+
* @license lucide-react v0.507.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const so=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],ao=w("lightbulb",so);/**
|
|
172
|
+
* @license lucide-react v0.507.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const io=[["path",{d:"M8 2h8",key:"1ssgc1"}],["path",{d:"M9 2v2.789a4 4 0 0 1-.672 2.219l-.656.984A4 4 0 0 0 7 10.212V20a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-9.789a4 4 0 0 0-.672-2.219l-.656-.984A4 4 0 0 1 15 4.788V2",key:"qtp12x"}],["path",{d:"M7 15a6.472 6.472 0 0 1 5 0 6.47 6.47 0 0 0 5 0",key:"ygeh44"}]],oo=w("milk",io);/**
|
|
177
|
+
* @license lucide-react v0.507.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const ro=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9",key:"4ay0iu"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}]],co=w("moon-star",ro);/**
|
|
182
|
+
* @license lucide-react v0.507.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const lo=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],uo=w("moon",lo);/**
|
|
187
|
+
* @license lucide-react v0.507.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const go=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}],["path",{d:"M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19",key:"1pvmmp"}]],_o=w("mountain-snow",go);/**
|
|
192
|
+
* @license lucide-react v0.507.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const mo=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],po=w("mountain",mo);/**
|
|
197
|
+
* @license lucide-react v0.507.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const ho=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],fo=w("radio",ho);/**
|
|
202
|
+
* @license lucide-react v0.507.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const yo=[["path",{d:"M22 18H2a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4Z",key:"1404fh"}],["path",{d:"M21 14 10 2 3 14h18Z",key:"1nzg7v"}],["path",{d:"M10 2v16",key:"1labyt"}]],xo=w("sailboat",yo);/**
|
|
207
|
+
* @license lucide-react v0.507.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const ko=[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]],vo=w("shirt",ko);/**
|
|
212
|
+
* @license lucide-react v0.507.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const bo=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],wo=w("skull",bo);/**
|
|
217
|
+
* @license lucide-react v0.507.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const jo=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],No=w("snowflake",jo);/**
|
|
222
|
+
* @license lucide-react v0.507.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const So=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}]],Mo=w("sparkle",So);/**
|
|
227
|
+
* @license lucide-react v0.507.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const Co=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M20 12h.01",key:"1ykeid"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M4 12h.01",key:"158zrr"}],["path",{d:"M17.657 6.343h.01",key:"31pqzk"}],["path",{d:"M17.657 17.657h.01",key:"jehnf4"}],["path",{d:"M6.343 17.657h.01",key:"gdk6ow"}],["path",{d:"M6.343 6.343h.01",key:"1uurf0"}]],Ao=w("sun-dim",Co);/**
|
|
232
|
+
* @license lucide-react v0.507.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const Eo=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Ro=w("sun",Eo);/**
|
|
237
|
+
* @license lucide-react v0.507.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const To=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],Io=w("sunrise",To);/**
|
|
242
|
+
* @license lucide-react v0.507.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const Oo=[["path",{d:"M12 10V2",key:"16sf7g"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m16 6-4 4-4-4",key:"6wukr"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],Lo=w("sunset",Oo);/**
|
|
247
|
+
* @license lucide-react v0.507.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const Fo=[["path",{d:"M3.5 21 14 3",key:"1szst5"}],["path",{d:"M20.5 21 10 3",key:"1310c3"}],["path",{d:"M15.5 21 12 15l-3.5 6",key:"1ddtfw"}],["path",{d:"M2 21h20",key:"1nyx9w"}]],Do=w("tent",Fo);/**
|
|
252
|
+
* @license lucide-react v0.507.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const zo=[["path",{d:"M8 19a4 4 0 0 1-2.24-7.32A3.5 3.5 0 0 1 9 6.03V6a3 3 0 1 1 6 0v.04a3.5 3.5 0 0 1 3.24 5.65A4 4 0 0 1 16 19Z",key:"oadzkq"}],["path",{d:"M12 19v3",key:"npa21l"}]],Uo=w("tree-deciduous",zo);/**
|
|
257
|
+
* @license lucide-react v0.507.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const Po=[["path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4",key:"foxbe7"}],["path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3",key:"18arnh"}],["path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35",key:"ywahnh"}],["path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14",key:"ft0feo"}]],Ko=w("tree-palm",Po);/**
|
|
262
|
+
* @license lucide-react v0.507.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const $o=[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]],Bo=w("tree-pine",$o);/**
|
|
267
|
+
* @license lucide-react v0.507.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const Ho=[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]],Vo=w("trees",Ho);/**
|
|
272
|
+
* @license lucide-react v0.507.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const Go=[["path",{d:"M22 12a10.06 10.06 1 0 0-20 0Z",key:"1teyop"}],["path",{d:"M12 12v8a2 2 0 0 0 4 0",key:"ulpmoc"}],["path",{d:"M12 2v1",key:"11qlp1"}]],qo=w("umbrella",Go);/**
|
|
277
|
+
* @license lucide-react v0.507.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const Yo=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],Zo=w("waves",Yo);/**
|
|
282
|
+
* @license lucide-react v0.507.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const Qo=[["path",{d:"M2 22 16 8",key:"60hf96"}],["path",{d:"M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"1rdhi6"}],["path",{d:"M7.47 8.53 9 7l1.53 1.53a3.5 3.5 0 0 1 0 4.94L9 15l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"1sdzmb"}],["path",{d:"M11.47 4.53 13 3l1.53 1.53a3.5 3.5 0 0 1 0 4.94L13 11l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"eoatbi"}],["path",{d:"M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z",key:"19rau1"}],["path",{d:"M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"tc8ph9"}],["path",{d:"M15.47 13.47 17 15l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"2m8kc5"}],["path",{d:"M19.47 9.47 21 11l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L13 11l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"vex3ng"}]],Wo=w("wheat",Qo);/**
|
|
287
|
+
* @license lucide-react v0.507.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const Jo=[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]],Xo=w("wind",Jo),er=({appVersion:e=null,slowWaitHintMs:s})=>{q();const a="https://local-operator.com/download",[i,o]=c.useState(!1),r=vn(i,s??Xs),[d,_]=c.useState(!1),[l,g]=c.useState(null),[h,x]=c.useState("info"),[f,m]=c.useState(null),[y,E]=c.useState(null),M=e?.trim()?e.trim():null,V=c.useRef(!1),S=ht(z=>z.openDetail),K=c.useRef(!1),H=c.useRef(0),A=c.useRef(!1),C=c.useCallback((z,I)=>{K.current=!1,g(z),x(I),_(!0)},[]),W=c.useCallback(z=>{K.current=!0,g(z),x("success"),_(!0)},[]),Z=c.useCallback(()=>{K.current&&(K.current=!1,_(!1),g(null))},[]),{clearDeferredUpdate:J}=Vn();c.useEffect(()=>{const z=window.api.updater.onUpdateError(p=>{V.current&&p.includes("manually")&&(m({message:n("ui.common.updates.check_for_updates_button.the_server_is_installed_outside_the_app_so_use_the_tool_you_insta"),command:""}),K.current=!1,g(null),x("warning"),_(!0))}),I=window.api.updater.onBackendUpdateDevMode(p=>{V.current&&C(p,"info")}),Y=()=>{A.current=!0,Z()},L=window.api.updater.onUpdateAvailable(Y),$=window.api.updater.onUpdateNpxAvailable(Y),de=window.api.updater.onBackendUpdateAvailable(Y);return()=>{z(),I(),L(),$(),de()}},[Z,C]),c.useEffect(()=>{let z=!1;const I=()=>{window.api.updater.getLastInstallAttempt().then(L=>{z||E(L)}).catch(()=>{})};I();const Y=window.api.updater.onUpdateInstallFailed(()=>I());return()=>{z=!0,Y()}},[]);const O=async()=>{const z=++H.current;Z(),A.current=!1;try{o(!0),V.current=!0,J(be.UI),J(be.BACKEND);const I=await window.api.updater.checkForAllUpdates({manual:!0});if(z!==H.current)return;I.app==="available"&&S(be.UI),I.server==="available"&&S(be.BACKEND),I?.affirmation&&!A.current?W(I.affirmation):Z()}catch(I){if(z!==H.current)return;console.warn(`Update check failed; the app-level alert owns the report: ${ea(I)}`)}finally{z===H.current&&o(!1),setTimeout(()=>{V.current=!1},2e3)}},ae=()=>{K.current=!1,_(!1),g(null)};return t.jsxs(t.Fragment,{children:[y&&t.jsxs("div",{className:"mb-3 rounded-sm bg-sunken p-3",children:[t.jsxs("p",{className:"text-body-sm text-ink",children:[n("ui.common.updates.check_for_updates_button.the_last_update_to_version"),y.targetVersion," ",n("ui.common.updates.check_for_updates_button.didn_t_finish"),y.attempts>1?n("ui.common.updates.check_for_updates_button.detail",{attempts:y.attempts,attemptsText:String(y.attempts)}):"",".",M?n("ui.common.updates.check_for_updates_button.version",{liveversion:String(M)}):null]}),t.jsxs("p",{className:"mt-1 text-meta text-ink-dim",children:[n("ui.common.updates.check_for_updates_button.detected")," ",y.detectedAt?new Date(y.detectedAt).toLocaleString():"at an unknown time",". ",y.detail]}),t.jsx(P,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>void window.api.openExternal(a),children:n("ui.common.updates.check_for_updates_button.download_a_fresh_copy")})]}),t.jsxs(P,{variant:"outline",onClick:()=>void O(),disabled:i,children:[i?t.jsx(le,{size:"sm"}):null,i?n("ui.common.updates.check_for_updates_button.checking"):n("ui.common.updates.check_for_updates_button.check_for_updates")]}),r&&t.jsx("p",{className:"mt-2 text-meta text-ink-muted",children:n("ui.common.updates.check_for_updates_button.still_checking_a_slow_or_stalled_connection_can_hold_this_for_abo")}),f&&t.jsxs(Lt,{open:d,autoHideDuration:1e4,onClose:ae,variant:"warning",children:[t.jsx("p",{className:"text-body-sm",children:f.message}),f.command&&t.jsx("code",{className:"mt-2 block rounded-sm bg-sunken p-2 text-mono-sm text-ink",children:f.command})]}),l&&h!=="danger"&&t.jsx(Lt,{open:d,autoHideDuration:6e3,onClose:ae,variant:h,children:l})]})},Qe=["system-prompt"],tr=()=>{const{shouldEnableQuery:e}=Gn();return Ne({enabled:e({bypassInternetCheck:!0}),queryKey:Qe,queryFn:async()=>{try{const a=await rn(Nt.baseUrl).config.getSystemPrompt();if(a===null)return null;if(a.status>=400)throw new Error(a.message||"Failed to fetch system prompt");return a.result}catch(s){const a=s instanceof Error?s.message:"An unknown error occurred while fetching system prompt";throw cn(a),s}},refetchOnWindowFocus:!1,staleTime:5e3})},nr=()=>{const e=ln(),s=rn(Nt.baseUrl);return qn({mutationFn:async a=>{try{const i=await s.config.updateSystemPrompt(a);if(i.status>=400)throw new Error(i.message||"Failed to update system prompt");return i.result}catch(i){const o=i instanceof Error?i.message:"An unknown error occurred while updating system prompt";throw cn(o),i}},onSuccess:async a=>{await e.invalidateQueries({queryKey:Qe,refetchType:"none"}),e.setQueryData(Qe,i=>i&&{...i,...a}),await e.refetchQueries({queryKey:Qe,type:"all"}),Yn("System prompt updated")},onError:a=>{console.error("Error updating system prompt:",a)}})},Nn=({value:e,label:s,description:a,onChange:i,icon:o,isSaving:r=!1})=>{const[d,_]=c.useState(e),l=c.useId(),g=`${l}-label`,h=`${l}-description`,x=async f=>{if(!r){_(f);try{await i(f)}catch(m){_(!f),console.error("Error toggling setting:",m)}}};return t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("span",{id:g,className:"flex min-h-6 items-center gap-2 text-body text-ink",children:[o&&t.jsx(o,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim"}),s]}),a&&t.jsx("p",{id:h,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:a})]}),t.jsx("div",{className:"flex h-6 shrink-0 items-center",children:r?t.jsx(le,{size:"md",label:`Saving ${s}`}):t.jsx(ba,{checked:d,onCheckedChange:x,"aria-labelledby":g,"aria-describedby":a?h:void 0})})]})};function Ht(e,s){const a=Va(e,s?.in);if(!Ba(a))throw new RangeError("Invalid time value");const i=Ee(a.getDate(),2),o=Ee(a.getMonth()+1,2),r=a.getFullYear(),d=Ee(a.getHours(),2),_=Ee(a.getMinutes(),2),l=Ee(a.getSeconds(),2);let g="",h="";const x=a.getTimezoneOffset();if(x!==0){const f=Math.abs(x),m=Ee(Math.trunc(f/60),2),y=Ee(f%60,2);h=`${x<0?"+":"-"}${m}:${y}`}else h="Z";return`${r}-${o}-${i}T${d}:${_}:${l}${g}${h}`}function sr(e,s,a){return $a(e,-30,a)}var ar=Zn({chartName:"LineChart",GraphicalChild:dn,axisComponents:[{axisType:"xAxis",AxisComp:Qn},{axisType:"yAxis",AxisComp:Wn}],formatAxisMap:Jn});const ir=["radient","creditBalance"],or=e=>{const{user:s,isAuthenticated:a}=St(),i=s?.account?.tenant_id,o=a&&!!i&&e?.enabled;return Ne({queryKey:[ir,i],queryFn:async()=>{if(!i)throw new Error("Tenant ID not available");const r=await un({operation:"credits",tenantId:i});if(!r||typeof r.balance!="number")throw new Error("Invalid credit balance response format");return r},enabled:o,staleTime:5*60*1e3,refetchOnWindowFocus:!0})},rr=["radient","usageRollup"],cr=(e,s)=>{const{user:a,isAuthenticated:i}=St(),o=a?.account?.tenant_id,r=i&&!!o&&s?.enabled;return Ne({queryKey:[...rr,o,e],queryFn:async()=>{if(!o)throw new Error("Tenant ID not available");const d={};for(const[l,g]of Object.entries(e))g!=null&&(d[l]=String(g));const _=await un({operation:"usage",tenantId:o,query:d});if(!_)throw new Error("Invalid usage rollup response format");return _},enabled:r,staleTime:5*60*1e3,refetchOnWindowFocus:!0})},lr=e=>e==="sidebars"?n("ui.settings.appearance.window_glass.coverage_sidebars"):n("ui.settings.appearance.window_glass.coverage_full"),dr=e=>{switch(e){case"window":return n("ui.settings.appearance.window_glass.material_window");case"menu":return n("ui.settings.appearance.window_glass.material_menu");case"popover":return n("ui.settings.appearance.window_glass.material_popover");case"mica":return n("ui.settings.appearance.window_glass.material_mica");case"acrylic":return n("ui.settings.appearance.window_glass.material_acrylic");case"tabbed":return n("ui.settings.appearance.window_glass.material_tabbed")}},ur=e=>{switch(e){case"reduced-transparency":return n("ui.settings.appearance.window_glass.unsupported_reduced_transparency");case"windows-too-old":return n("ui.settings.appearance.window_glass.unsupported_windows_too_old");case"linux-no-native-blur":return n("ui.settings.appearance.window_glass.unsupported_linux");default:return n("ui.settings.appearance.window_glass.unsupported_other")}},Vt=({label:e,description:s,value:a,onValueChange:i,options:o})=>{const r=c.useId();return t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("span",{id:r,className:"flex min-h-6 items-center text-body text-ink",children:e}),t.jsx("p",{className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:s})]}),t.jsx("div",{className:"flex h-6 shrink-0 items-center",children:t.jsx(Xe,{value:a,onValueChange:i,children:t.jsx(et,{"aria-labelledby":r,children:o.map(d=>t.jsx(Le,{value:d.value,children:d.label},d.value))})})})]})},gr=({state:e,onChange:s})=>{q();const a=c.useId(),i=`${a}-description`,[o,r]=c.useState(null),d=c.useRef(!1),_=c.useRef(null),l=e?.settings.intensity??0;if(!e)return null;if(!e.capability.supported)return t.jsx("p",{"data-glass-unsupported":e.capability.reason,className:"max-w-2xl text-body-sm text-ink-muted",children:ur(e.capability.reason)});const g=async f=>{if(d.current){_.current=f;return}d.current=!0;try{await s({intensity:f})}finally{d.current=!1;const m=_.current;_.current=null,m!==null&&m!==f?g(m):r(null)}},h=e.settings.enabled,x=o??l;return t.jsxs("div",{className:"flex flex-col gap-4","data-window-glass":"",children:[t.jsx(Nn,{value:h,label:n("ui.settings.appearance.window_glass.label"),description:n("ui.settings.appearance.window_glass.description"),onChange:async f=>s({enabled:f})}),e.restartRequired&&t.jsx("output",{className:"block max-w-2xl text-body-sm text-ink","data-glass-restart":"",children:n("ui.settings.appearance.window_glass.restart_needed")}),h&&t.jsxs(t.Fragment,{children:[t.jsx(Vt,{label:n("ui.settings.appearance.window_glass.coverage_label"),description:n("ui.settings.appearance.window_glass.coverage_description"),value:e.settings.coverage,onValueChange:f=>void s({coverage:f}),options:ta.map(f=>({value:f,label:lr(f)}))}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex min-h-6 items-center justify-between gap-3",children:[t.jsx("label",{htmlFor:a,className:"text-body text-ink",children:n("ui.settings.appearance.window_glass.intensity_label")}),t.jsx("span",{"data-glass-readout":"",className:"shrink-0 text-meta text-ink-dim tabular-nums",children:n("ui.settings.appearance.window_glass.intensity_value",{value:String(x)})})]}),t.jsx("p",{id:i,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:n("ui.settings.appearance.window_glass.intensity_description")}),t.jsx("input",{id:a,type:"range",min:0,max:100,step:5,value:x,"aria-describedby":i,"aria-valuetext":n("ui.settings.appearance.window_glass.intensity_value",{value:String(x)}),onChange:f=>{const m=Number(f.target.value);r(m),g(m)},style:{"--fill":`${x}%`},className:"mt-3 h-4 w-full cursor-pointer appearance-none bg-transparent bg-center bg-no-repeat bg-[length:100%_6px] bg-[linear-gradient(to_right,var(--color-accent)_0_var(--fill),var(--color-sunken)_var(--fill)_100%)] [&::-webkit-slider-thumb]:size-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-accent [&::-webkit-slider-thumb]:transition-colors [&::-webkit-slider-thumb]:duration-fast [&::-webkit-slider-thumb]:ease-out-quart [&::-webkit-slider-thumb]:hover:bg-accent-hover"}),t.jsxs("div",{"aria-hidden":"true",className:"mt-1 flex justify-between text-meta text-ink-dim",children:[t.jsx("span",{children:n("ui.settings.appearance.window_glass.intensity_start")}),t.jsx("span",{children:n("ui.settings.appearance.window_glass.intensity_end")})]})]}),t.jsx(Vt,{label:n("ui.settings.appearance.window_glass.material_label"),description:n("ui.settings.appearance.window_glass.material_description"),value:e.settings.material,onValueChange:f=>void s({material:f}),options:e.capability.materials.map(f=>({value:f,label:dr(f)}))})]})]})},Gt={get[be.UI](){return n("ui.settings.updates.update_following.application_updates")},get[be.BACKEND](){return n("ui.settings.updates.update_following.server_updates")}},qe={patch:{get label(){return n("ui.settings.updates.update_following.patch_label")},get description(){return n("ui.settings.updates.update_following.patch_help")}},minor:{get label(){return n("ui.settings.updates.update_following.minor_label")},get description(){return n("ui.settings.updates.update_following.minor_help")}},major:{get label(){return n("ui.settings.updates.update_following.major_label")},get description(){return n("ui.settings.updates.update_following.major_help")}}},qt=({type:e})=>{q();const s=ht(i=>i.followed[e]),a=ht(i=>i.setFollowedSegment);return t.jsxs("div",{className:"flex flex-col gap-1.5 sm:flex-row sm:items-center sm:justify-between sm:gap-6",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-body-sm text-ink",children:Gt[e]}),t.jsx("div",{className:"mt-0.5 text-meta text-ink-muted",children:qe[s].description})]}),t.jsxs(wa,{value:s,onValueChange:i=>a(e,i),children:[t.jsx(ja,{"aria-label":n("ui.settings.updates.update_following.surface_choice",{surface:Gt[e],choice:qe[s].label}),className:"w-full sm:w-56","data-followed-segment":e,children:t.jsx(Na,{})}),t.jsx(Sa,{children:Xn.map(i=>t.jsx(Ma,{value:i,title:qe[i].description,children:qe[i].label},i))})]})]})},_r=()=>(q(),t.jsxs("div",{className:ce("flex flex-col gap-3"),children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-heading text-ink",children:n("ui.settings.updates.update_following.update_notifications")}),t.jsx("p",{className:"mt-1 text-meta text-ink-muted",children:n("ui.settings.updates.update_following.how_much_of_a_version_change_shows_the_update_notice_at_the_botto")})]}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(qt,{type:be.UI}),t.jsx(qt,{type:be.BACKEND})]})]})),mr=({appVersion:e})=>t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(_r,{}),t.jsx(er,{appVersion:e})]}),pr=e=>{if(!e)return null;try{return new URL(e).host}catch{return null}};function ut(e){switch(e){case"Loading...":return n("ui.settings.updates.app_updates_section.state_loading");case"Not connected":return n("ui.settings.updates.app_updates_section.state_not_connected");case"Not attached":return n("ui.settings.updates.app_updates_section.state_not_attached");case"Version unknown":return n("ui.settings.updates.app_updates_section.state_version_unknown");case"Unavailable":return n("ui.settings.updates.app_updates_section.state_unavailable");default:return e}}const hr=()=>{q();const[e,s]=c.useState(null),[a,i]=c.useState({value:"Loading...",detail:null,degraded:!1}),[o,r]=c.useState({platform:"Loading...",arch:"...",nodeVersion:"Loading...",electronVersion:"Loading...",chromeVersion:"Loading..."});c.useEffect(()=>{let _=!0;const l=m=>{if(!_)return;const y=pr(m.url);if(m.state==="connecting"){i({value:"Loading...",detail:null,degraded:!1});return}if(m.state==="detached"){i({value:"Not connected",detail:m.detail||null,degraded:!1});return}if(m.state==="wedged"){i({value:"Not attached",detail:m.detail||null,degraded:!1});return}const E=m.version||"Version unknown";i({value:y?`${E} · ${y}`:E,detail:m.detail||null,degraded:m.state==="degraded"})};let g=!1;const h=window.api?.backend?.onStatusChange(m=>{g=!0,l(m)}),x=async()=>{try{const[m,y]=await Promise.all([window.api.systemInfo.getAppVersion(),window.api.systemInfo.getPlatformInfo()]);_&&(s(m),r(y))}catch(m){console.error("Error fetching app information:",m)}},f=async()=>{try{const m=window.api?.backend;if(m){const M=await m.getStatus();g||l(M);return}const y=await Ft.healthCheck(Nt.baseUrl),E=Ft.getServerVersion(y);_&&i({value:E,detail:null,degraded:!1})}catch(m){console.error("Error fetching server version:",m),_&&i({value:"Unavailable",detail:null,degraded:!1})}};return x(),f(),()=>{_=!1,h?.()}},[]);const d=(_,l,g,h={})=>t.jsx(re,{label:t.jsx($e,{content:g,children:t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[t.jsx(tt,{size:12,className:"shrink-0"}),_]})}),valueClassName:h.valueClassName,value:t.jsxs(t.Fragment,{children:[h.valueTooltip?t.jsx($e,{content:h.valueTooltip,children:t.jsx("span",{"data-backend-version":h.valueHoverTarget?"":void 0,children:l})}):l,h.statusNote?t.jsx("span",{className:"mt-0.5 block text-meta text-ink-dim",children:h.statusNote}):null]})});return t.jsx(ne,{title:n("ui.settings.updates.app_updates_section.application_updates_and_info"),icon:es,description:n("ui.settings.updates.app_updates_section.check_for_updates_and_view_information_about_your_local_operator_"),dataTourTag:"settings-app-updates-section",children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs(nt,{children:[d(n("ui.settings.updates.app_updates_section.application_version"),e??n("ui.settings.updates.app_updates_section.state_loading"),n("ui.settings.updates.app_updates_section.the_version_of_the_local_operator_user_interface_application")),d(n("ui.settings.updates.app_updates_section.server_version"),ut(a.value),n("ui.settings.updates.app_updates_section.the_version_of_the_local_operator_api_server_backend_and_the_addr"),{valueTooltip:a.detail,valueHoverTarget:!0,statusNote:a.degraded?n("ui.settings.updates.app_updates_section.not_answering"):void 0,valueClassName:a.degraded?"text-ink-muted":void 0}),d(n("ui.settings.updates.app_updates_section.platform"),`${o.platform} (${o.arch})`,n("ui.settings.updates.app_updates_section.the_operating_system_and_architecture_your_application_is_running")),d(n("ui.settings.updates.app_updates_section.node_js_version"),ut(o.nodeVersion),n("ui.settings.updates.app_updates_section.the_javascript_runtime_environment_version")),d(n("ui.settings.updates.app_updates_section.electron_version"),ut(o.electronVersion),n("ui.settings.updates.app_updates_section.the_framework_version_enabling_this_desktop_application"))]}),t.jsx(mr,{appVersion:e})]})})},fr=e=>{const s=e.label.replace(/^Open\s+/,"");return s.charAt(0).toUpperCase()+s.slice(1)},yr=({action:e})=>{q();const s=c.useId(),a=c.useRef(null),i=je(y=>y.shortcutBindings),o=i[e.id],r=je(y=>y.setShortcutBinding),d=je(y=>y.clearShortcutBinding),[_,l]=c.useState(!1),[g,h]=c.useState(null),x=c.useMemo(ts,[]),f=Zs(e.id,i),m=fr(e);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx(xe,{htmlFor:s,className:"w-32 text-body-sm text-ink",children:m}),t.jsx(Re,{id:s,readOnly:!0,value:f===null?n("ui.settings.shortcuts.keyboard_shortcuts_section.no_shortcut"):Qs(f,x),"aria-label":n("ui.settings.shortcuts.keyboard_shortcuts_section.label_press_the_keys_you_want",{label:String(m)}),"data-shortcut-action":e.id,ref:a,className:ce("w-52",f===null?"text-body-sm":"font-mono text-body-sm"),onFocus:()=>l(!0),onBlur:()=>{l(!1),h(null)},onKeyDown:y=>{if(ns.has(y.key))return;if(ss.has(y.key)){l(!1),h(null);return}if(as.has(y.key)||y.nativeEvent.isComposing)return;const E=is({key:y.key,metaKey:y.metaKey,ctrlKey:y.ctrlKey,altKey:y.altKey,shiftKey:y.shiftKey}),M=Ws(E,e.id,i,x);if(M!==null){y.preventDefault(),l(!0),h(M);return}if(E===f){l(!0),h(null);return}y.preventDefault(),l(!0),h(null),E===e.defaultChord?r(e.id,null):E!==null&&r(e.id,E)}}),f!==null&&t.jsx(P,{variant:"secondary",size:"sm","aria-label":n("ui.settings.shortcuts.keyboard_shortcuts_section.clear_label_s_shortcut",{label:String(m)}),onClick:()=>{d(e.id),a.current?.focus()},children:n("ui.settings.shortcuts.keyboard_shortcuts_section.clear")}),o!==void 0&&t.jsx(P,{variant:"secondary",size:"sm","aria-label":n("ui.settings.shortcuts.keyboard_shortcuts_section.reset_label_to_its_default",{label:String(m)}),onClick:()=>{r(e.id,null),a.current?.focus()},children:n("ui.settings.shortcuts.keyboard_shortcuts_section.reset")})]}),_&&t.jsx("span",{className:"text-meta text-ink-dim",children:n("ui.settings.shortcuts.keyboard_shortcuts_section.press_the_keys_you_want_esc_cancels")}),g!==null&&t.jsx("output",{className:"text-meta text-danger",children:g})]})},xr=({sectionRef:e})=>(q(),t.jsx(ne,{title:n("ui.settings.shortcuts.keyboard_shortcuts_section.keyboard_shortcuts"),icon:na,description:n("ui.settings.shortcuts.keyboard_shortcuts_section.shortcuts_for_the_panel_rail_focus_a_field_and_press_the_keys_you"),sectionRef:e,children:t.jsx("div",{className:"flex flex-col gap-4",children:Ys.map(s=>t.jsx(yr,{action:s},s.id))})})),kr=[[[".claude.json"],"Claude Code"],[[".claude",".mcp.json"],"Claude Code"],[[".cursor","mcp.json"],"Cursor"],[[".vscode","mcp.json"],"VS Code"],[[".codex","config.toml"],"Codex CLI"]];function Sn(e){if(!e)return null;const s=e.split("\\").join("/").split("/").filter(Boolean);for(const[a,i]of kr)if(!(s.length<a.length)&&s.slice(-a.length).join("/")===a.join("/"))return i;return null}const We=e=>n("ui.settings.integrations.integration_model.tool_count",{count:e}),vr=e=>n("ui.settings.integrations.integration_model.integration_count",{count:e}),br=["connected","needs_sign_in","not_started","connecting","error"],Mn=e=>br.includes(e),Fe=(e,s)=>[...s].filter(a=>a.name===e&&a.status==="running").sort((a,i)=>i.created_at-a.created_at)[0]??null,wr={connectedAt:null,connectedToolCount:null,settledGroup:null,pinnedGroup:null,pinnedOperationId:null,needsKey:!1,needsSignIn:!1,disconnectedAt:null,holdUntil:null,lastDecisive:null},jr=1e12,Nr=1e9,Sr=60*60*1e3,Cn=(e,s=Date.now())=>{if(typeof e!="number"||!Number.isFinite(e))return null;const a=e>=jr?e:e<Nr?null:e*1e3;return a===null||a>s+Sr?null:Math.min(a,s)},Te=(e,s)=>e?.[s]??wr,He=(e,s,a)=>Ar(e,s)??a?.lastDecisive??null,Mr=e=>({id:e.id,name:e.name,action:e.action,status:e.status,created_at:e.created_at,credential_removed:e.credential_removed,...e.message?{message:e.message}:{}}),Ct=(e,s)=>e.status==="not_started"&&typeof e.tool_count=="number"&&(s.connectedAt!==null||e.status_basis==="stored"&&e.tool_count_basis==="last_seen"),Cr=(e,s)=>[...s].filter(a=>a.name===e).sort((a,i)=>i.created_at-a.created_at)[0]??null,Ar=(e,s)=>Cr(e,s.filter(a=>a.status!=="cancelled")),st=e=>e.actions.includes("set_key")||e.actions.includes("add_key");function Er(e,s){const a=Math.max(0,Math.round((e-s)/1e3));if(a<60)return n("ui.settings.integrations.integration_model.just_now");const i=Math.round(a/60);if(i<60)return n("ui.settings.integrations.integration_model.minutes_min_ago",{minutes:i});const o=Math.round(i/60);return o<24?n("ui.settings.integrations.integration_model.hours_h_ago",{hours:o}):n("ui.settings.integrations.integration_model.days_ago",{days:Math.round(o/24)})}function gt(e){if(!e)return null;const s=e.trim();if(!s||/^\/\w/.test(s)||/\/mcp\s+\w+/.test(s))return null;let a=s;for(let i=0;i<3;i+=1){const o=a.replace(/^(?:connection (?:closed|error|refused)|error|closed|failed)\s*:\s*/i,"").trim();if(o===a)break;a=o}return a=a.replace(/\s*\(\s*\d{3}\s*\)/g,"").replace(/\s+([.,;])/g,"$1").replace(/\s{2,}/g," ").trim(),a||null}function Rr(e,s=[],a,i=Date.now()){const o=Te(a,e.name),r=Fe(e.name,s);if(r){if(r.action==="login"||r.action==="reauth")return{label:n("ui.settings.integrations.integration_model.signing_in"),tone:"info",detail:null,busy:!0};if(r.action==="logout")return{label:n("ui.settings.integrations.integration_model.signing_out"),tone:"info",detail:null,busy:!0}}if(!Mn(e.status))return{label:n("ui.settings.integrations.integration_model.status_unavailable"),tone:"neutral",detail:null,busy:!1};const d=He(e.name,s,o),_=at(d)&&e.status!=="connected",l=Ct(e,o),g=Rt(d)&&e.status!=="connected",h=(d?.action==="login"||d?.action==="reauth")&&d.status==="failed";if(o.disconnectedAt!==null)return{label:n("ui.settings.integrations.integration_model.not_connected"),tone:"neutral",detail:null,busy:!1};switch(e.status){case"connected":return{label:typeof e.tool_count=="number"?n("ui.settings.integrations.integration_model.connected_with_tools",{tools:String(We(e.tool_count))}):n("ui.settings.integrations.integration_model.connected"),tone:"success",detail:null,busy:!1};case"connecting":return{label:n("ui.settings.integrations.integration_model.connecting"),tone:"info",detail:null,busy:!0};case"needs_sign_in":return{label:e.auth.kind==="api_key"||Ke(e,s,o)?n("ui.settings.integrations.integration_model.needs_a_key"):n("ui.settings.integrations.integration_model.needs_sign_in"),tone:"warning",detail:gt(e.status_reason),busy:!1};case"error":return{label:n("ui.settings.integrations.integration_model.couldn_t_start"),tone:"danger",detail:gt(e.status_reason)??n("ui.settings.integrations.integration_model.no_reason_was_given"),busy:!1};default:if(_)return{label:n("ui.settings.integrations.integration_model.signed_out"),tone:"warning",detail:null,busy:!1};if(g)return{label:n("ui.settings.integrations.integration_model.sign_out_didn_t_finish"),tone:"warning",detail:n("ui.settings.integrations.integration_model.the_sign_in_is_still_saved"),busy:!1};if(Ke(e,s,o))return{label:n("ui.settings.integrations.integration_model.needs_a_key"),tone:"warning",detail:null,busy:!1};if(h)return{label:n("ui.settings.integrations.integration_model.sign_in_didn_t_finish"),tone:"warning",detail:null,busy:!1};if(o.needsSignIn)return{label:e.auth.kind==="api_key"||Ke(e,s,o)?n("ui.settings.integrations.integration_model.needs_a_key"):n("ui.settings.integrations.integration_model.needs_sign_in"),tone:"warning",detail:gt(e.status_reason),busy:!1};if(e.status_basis==="stored"&&l&&o.disconnectedAt===null){const x=o.connectedAt??Cn(e.last_seen_at,i);return{label:x!==null?n("ui.settings.integrations.integration_model.worked_when_with_tools",{when:String(Er(i,x)),tools:String(We(e.tool_count))}):n("ui.settings.integrations.integration_model.worked_earlier_with_tools",{tools:String(We(e.tool_count))}),tone:"success",detail:null,busy:!1}}return e.status_basis==="live"?{label:n("ui.settings.integrations.integration_model.not_connected"),tone:"neutral",detail:null,busy:!1}:{label:n("ui.settings.integrations.integration_model.ready"),tone:"neutral",detail:null,busy:!1}}}const An=e=>n("ui.settings.integrations.integration_model.replace_keys",{count:e}),Tr=/[,;]?\s*(?:or|and)?\s*add (?:its|a|the) key instead\.?\s*$/i;function Ir(e,s){const a=e?.trim()??"";if(!a)return null;if(s)return a;const i=a.replace(Tr,"").trim();return i?/\.$/.test(i)?i:`${i}.`:a}const Or="ui.settings.integrations.integration_model.copy_ready_explanation",Lr="ui.settings.integrations.integration_model.copy_not_connected_explanation",Fr=e=>e.transport==="local_command"?n("ui.settings.integrations.integration_model.local_command"):n("ui.settings.integrations.integration_model.remote_url");function En(e){switch(e.source.kind){case"local-operator":case"project-mcp-json":return null;case"claude-code":return n("ui.settings.integrations.integration_model.claude_code");case"cursor":return"Cursor";case"vscode":return n("ui.settings.integrations.integration_model.vs_code");case"codex":return n("ui.settings.integrations.integration_model.codex_cli");default:return Sn(e.source.path)}}function Dr(e,s){const a=[Fr(e)];e.status!=="connected"&&e.tool_count_basis==="last_seen"&&typeof e.tool_count=="number"&&a.push(n("ui.settings.integrations.integration_model.tools_when_last_checked",{tools:String(We(e.tool_count))})),s&&a.push(e.scope==="project"?n("ui.settings.integrations.integration_model.this_project"):n("ui.settings.integrations.integration_model.global"));const i=En(e);return i?a.push(n("ui.settings.integrations.integration_model.imported_from_origin",{origin:String(i)})):e.source.editable||a.push(n("ui.settings.integrations.integration_model.imported_from_a_project_file")),a}const At=(e,s)=>s.disconnectedAt!==null?"not_started":e.status;function Et(e,s=[],a){const i=Te(a,e.name),o=Fe(e.name,s);if(o)return o.action==="login"||o.action==="reauth"?{kind:"sign_in",label:n("ui.settings.integrations.integration_model.continue_sign_in")}:null;const r=h=>e.actions.includes(h),d=st(e),_=Ke(e,s,i);if(!Mn(e.status))return r("test")?{kind:"test",label:n("ui.settings.integrations.integration_model.check_again")}:null;const l=He(e.name,s,i),g=l?.status==="failed"&&Ve(l);switch(At(e,i)){case"connected":case"connecting":return null;case"needs_sign_in":return _?{kind:"set_key",label:n("ui.settings.integrations.integration_model.add_key")}:r("sign_in")?{kind:"sign_in",label:n("ui.settings.integrations.integration_model.sign_in")}:d?{kind:"set_key",label:n("ui.settings.integrations.integration_model.add_key")}:r("reauth")?{kind:"reauth",label:n("ui.settings.integrations.integration_model.sign_in_again")}:{kind:"fix",label:n("ui.settings.integrations.integration_model.fix")};case"error":return r("connect")?{kind:"connect",label:n("ui.settings.integrations.integration_model.reconnect")}:r("test")?{kind:"test",label:n("ui.settings.integrations.integration_model.retry")}:{kind:"fix",label:n("ui.settings.integrations.integration_model.fix")};default:{if(at(l)&&r("sign_in"))return{kind:"sign_in",label:n("ui.settings.integrations.integration_model.sign_in")};if(Rt(l)&&r("sign_out"))return{kind:"sign_out",label:n("ui.settings.integrations.integration_model.sign_out_again")};if(i.disconnectedAt!==null&&r("connect"))return{kind:"connect",label:n("ui.settings.integrations.integration_model.connect")};if(i.needsSignIn){if(_&&d)return{kind:"set_key",label:n("ui.settings.integrations.integration_model.add_key")};if(r("sign_in"))return{kind:"sign_in",label:n("ui.settings.integrations.integration_model.sign_in")}}return _&&d?{kind:"set_key",label:n("ui.settings.integrations.integration_model.add_key")}:g&&r("sign_in")?{kind:"sign_in",label:n("ui.settings.integrations.integration_model.try_again")}:Ct(e,i)&&!r("connect")?null:r("connect")?{kind:"connect",label:n("ui.settings.integrations.integration_model.connect"),...i.connectedAt===null&&e.status_basis!=="live"?{variant:"ghost"}:{}}:r("test")&&e.tool_count===null&&e.tool_count_basis===null?{kind:"test",label:n("ui.settings.integrations.integration_model.test"),variant:"ghost"}:null}}}const Ve=e=>e.action==="login"||e.action==="reauth",at=e=>!!(e&&e.action==="logout"&&e.status==="complete"),Rt=e=>!!(e&&e.action==="logout"&&e.status!=="running"&&e.status!=="complete"),Rn=/no oauth authorization server/i;function Ke(e,s,a){if(!st(e))return!1;const i=He(e.name,s,a);return i&&Ve(i)&&i.status==="failed"&&Rn.test(i.message??"")?!0:a.needsKey}function zr(e,s=[],a){const i=Et(e,s,a)?.kind,o=At(e,Te(a,e.name)),r=l=>e.actions.includes(l),d=[],_=Fe(e.name,s);if(_&&d.push({kind:"cancel",label:n("ui.settings.integrations.integration_model.cancel")}),!_&&r("test")&&i!=="test"&&d.push({kind:"test",label:n("ui.settings.integrations.integration_model.test_connection")}),r("connect")&&i!=="connect"&&o!=="connected"&&d.push({kind:"connect",label:n("ui.settings.integrations.integration_model.reconnect")}),!_&&r("sign_in")&&i!=="sign_in"&&o!=="connected"&&d.push({kind:"sign_in",label:n("ui.settings.integrations.integration_model.sign_in")}),r("reload")&&d.push({kind:"reload",label:n("ui.settings.integrations.integration_model.reload")}),!_&&r("reauth")&&i!=="reauth"&&d.push({kind:"reauth",label:n("ui.settings.integrations.integration_model.sign_in_again")}),st(e)&&i!=="set_key"&&d.push({kind:"set_key",label:e.auth.secret_refs.length>0?n("ui.settings.integrations.integration_model.update_key"):n("ui.settings.integrations.integration_model.add_key")}),r("sign_out")&&d.push({kind:"sign_out",label:n("ui.settings.integrations.integration_model.sign_out")}),r("disconnect")&&o==="connected"&&d.push({kind:"disconnect",label:n("ui.settings.integrations.integration_model.disconnect")}),r("copy_setup")&&e.setup_prompt&&d.push({kind:"copy_setup",label:n("ui.settings.integrations.integration_model.copy_setup_prompt")}),i!=="fix"&&d.push({kind:"open_config",label:n("ui.settings.integrations.integration_model.open_config_file")}),r("remove"))d.push({kind:"remove",label:n("ui.settings.integrations.integration_model.remove"),destructive:!0});else if(!e.source.editable){const l=En(e);d.push({kind:"remove_elsewhere",label:l?n("ui.settings.integrations.integration_model.remove_in_origin",{origin:String(l)}):n("ui.settings.integrations.integration_model.remove_in_its_own_file"),hint:l?n("ui.settings.integrations.integration_model.defined_in_origin_s_config_remove_it_there",{origin:String(l)}):n("ui.settings.integrations.integration_model.defined_in_a_file_this_app_doesn_t_write_remove_it_there")})}return d}const Ur={get attention(){return n("ui.settings.integrations.integration_model.needs_attention")},get connected(){return n("ui.settings.integrations.integration_model.connected")},get ready(){return n("ui.settings.integrations.integration_model.available")}};function Tn(e,s=[],a){const i=Te(a,e.name),o=Fe(e.name,s),r=At(e,i);if(o&&i.pinnedGroup&&i.pinnedOperationId===o.id)return i.pinnedGroup;if(r==="needs_sign_in"||r==="error")return"attention";const d=He(e.name,s,i);return at(d)&&r!=="connected"||Rt(d)&&r!=="connected"?"attention":i.disconnectedAt!==null?"ready":Ke(e,s,i)||i.needsSignIn&&r!=="connected"||d?.status==="failed"&&Ve(d)&&r!=="connected"?"attention":r==="connected"||e.status_basis==="stored"&&Ct(e,i)?"connected":o&&o.action!=="test"?"attention":"ready"}function Pr(e,s=[],a){return["attention","connected","ready"].map(o=>({id:o,title:Ur[o],rows:e.filter(r=>Tn(r,s,a)===o)})).filter(o=>o.rows.length>0)}function Kr(e,s,a=Date.now()){if(!s)return e??{};const i={};for(const o of s.servers){const r=Te(e,o.name),d=Fe(o.name,s.operations),_=He(o.name,s.operations,r),l=at(_),g=o.status==="connected"&&(o.status_basis==="probe"||o.status_basis==="live"),h=r.holdUntil!==null&&a<r.holdUntil,x=!h&&!l&&r.connectedAt===null&&o.status_basis==="stored"&&o.tool_count_basis==="last_seen"?Cn(o.last_seen_at,a):null,f=!l,m=_?.status==="failed"&&Ve(_)&&Rn.test(_.message??""),y={connectedAt:g&&!h?a:x!==null?x:f?r.connectedAt:null,connectedToolCount:g&&!h||x!==null?o.tool_count??r.connectedToolCount:f?r.connectedToolCount:null,settledGroup:r.settledGroup,pinnedGroup:d&&r.pinnedOperationId===d.id?r.pinnedGroup:d?r.settledGroup:null,pinnedOperationId:d?d.id:null,needsKey:g?!1:r.needsKey||m,needsSignIn:g||l?!1:r.needsSignIn||o.status==="needs_sign_in",disconnectedAt:g&&!h?null:r.disconnectedAt,holdUntil:h?r.holdUntil:null,lastDecisive:_?Mr(_):null};d||(y.settledGroup=Tn(o,s.operations,{...i,[o.name]:y})),i[o.name]=y}return i}const $r=(e,s)=>e!==null&&s===e,bt="local-operator.settings.integrations.row-memory",In=(e,s)=>`${e}#${s}`;function Br(e,s){const a={};if(!s)return a;for(const i of s.servers){const o=e[i.name];o&&(a[In(i.source.path,i.name)]=o)}return a}function Hr(e,s,a){if(!s)return e;let i=null;for(const o of s.servers){if(Object.prototype.hasOwnProperty.call(e,o.name))continue;const r=qr(a[In(o.source.path,o.name)]);r&&(i=i??{...e},i[o.name]=r)}return i??e}const Vr=["attention","connected","ready"],On=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Tt=e=>typeof e=="number"&&Number.isFinite(e)?e:null,Yt=e=>Vr.includes(e)?e:null,_t=e=>{const s=Tt(e);return s!==null&&s>=1e12?s:null};function Gr(e){if(!On(e)||typeof e.id!="string"||typeof e.name!="string")return null;const s=e.action,a=e.status;return s!=="login"&&s!=="logout"&&s!=="reauth"&&s!=="test"||a!=="running"&&a!=="complete"&&a!=="cancelled"&&a!=="failed"?null:{id:e.id,name:e.name,action:s,status:a,created_at:Tt(e.created_at)??0,credential_removed:e.credential_removed===!0,...typeof e.message=="string"?{message:e.message}:{}}}function qr(e){if(!On(e))return null;const s=_t(e.connectedAt),a=_t(e.disconnectedAt),i=e.needsKey===!0,o=e.needsSignIn===!0,r=Gr(e.lastDecisive);return s===null&&a===null&&!i&&!o&&!r?null:{connectedAt:s,connectedToolCount:Tt(e.connectedToolCount),settledGroup:Yt(e.settledGroup),pinnedGroup:Yt(e.pinnedGroup),pinnedOperationId:typeof e.pinnedOperationId=="string"?e.pinnedOperationId:null,needsKey:i,needsSignIn:o,disconnectedAt:a,holdUntil:_t(e.holdUntil),lastDecisive:r}}const Ln=2e3,Zt=8e3;function Yr(e){return e&&(e.servers.some(a=>a.status==="connecting")||e.operations.some(a=>a.status==="running"))?Ln:!1}const Zr=/^[A-Za-z0-9_.:-]{1,100}$/,Qr=/:\/\//;function Wr(e,s){const a=e.trim();return a?Zr.test(a)?s.includes(a)?n("ui.settings.integrations.integration_model.an_integration_named_trimmed_already_exists",{trimmed:String(a)}):null:n("ui.settings.integrations.integration_model.use_letters_numbers_dots_dashes_underscores_or_colons_with_no_spa"):n("ui.settings.integrations.integration_model.give_it_a_name")}function Jr(e){const s=e.trim();if(!s)return n("ui.settings.integrations.integration_model.enter_the_server_s_url");let a;try{a=new URL(s)}catch{return n("ui.settings.integrations.integration_model.enter_a_full_url_like_https_mcp_example_com_mcp")}return a.protocol!=="https:"&&a.protocol!=="http:"?n("ui.settings.integrations.integration_model.the_url_must_start_with_https_or_http"):a.hostname?a.username||a.password?n("ui.settings.integrations.integration_model.remove_the_username_or_password_from_the_url_keys_are_added_after"):a.search||a.hash?n("ui.settings.integrations.integration_model.remove_the_or_part_of_the_url_keys_are_added_after_it_s_saved"):Qr.test(s.slice(a.protocol.length+2))?n("ui.settings.integrations.integration_model.this_looks_like_two_urls_pasted_together_enter_just_one"):null:n("ui.settings.integrations.integration_model.the_url_needs_a_host_name")}const Xr=e=>e.split(`
|
|
292
|
+
`).map(s=>s.trim()).filter(Boolean);function wt(e,s){const a=!!e?.cold,i=(e?.servers??[]).map(o=>{const r=o.transport==="http",d=o.secret_refs??[],_=o.status==="connected"?"connected":o.status==="connecting"?"connecting":o.status==="auth-required"?"needs_sign_in":"not_started",l=[];_!=="connected"&&l.push("connect"),_==="connected"&&l.push("disconnect"),a||l.push("reload"),r&&o.transport_oauth_supported!==!1&&l.push("sign_in"),d.length>0&&l.push("set_key"),o.owned_scope&&l.push("remove"),o.setup?.text&&l.push("copy_setup");const g=Sn(o.source);return{id:o.name,name:o.name,scope:o.owned_scope??"global",project_cwd:null,source:{kind:ec(o.source,g,o.owned_scope),path:o.source??"",editable:o.owned_scope!==null,owned_scope:o.owned_scope},transport:r?"remote_url":"local_command",endpoint:{command:null,url:null,endpoint_redacted:!1},status:_,status_reason:null,status_observed_at:null,last_seen_at:null,status_basis:a?"stored":"live",auth:{kind:d.length?"api_key":r?"unknown":"none",signed_in:null,secret_refs:d.map(h=>({id:h.id,state:"missing"}))},tool_count:typeof o.tool_count=="number"?o.tool_count:null,tool_count_basis:typeof o.tool_count=="number"?"live":null,actions:l,setup_prompt:o.setup?.text??null}});return{cwd:"",project_scope_available:i.some(o=>o.source.owned_scope==="project"),global_path:"",project_path:null,status_source:a?"config":"live",session_id:s,servers:i,operations:(e?.operations??[]).map(o=>({...o}))}}const ec=(e,s,a)=>s==="Claude Code"?"claude-code":s==="Cursor"?"cursor":s==="VS Code"?"vscode":s==="Codex CLI"?"codex":a?"local-operator":e?"project-mcp-json":"local-operator",Qt={get invalid_config(){return n("ui.settings.integrations.integration_model.that_configuration_isn_t_valid_check_the_command_or_the_url_then_")},get operation_unavailable(){return n("ui.settings.integrations.integration_model.that_sign_in_or_test_isn_t_running_any_more_try_again")},get exists(){return n("ui.settings.integrations.integration_model.an_integration_with_this_name_already_exists_choose_another_name")},get not_owned(){return n("ui.settings.integrations.integration_model.it_s_defined_in_another_tool_s_config_so_it_can_t_be_changed_here")},get project_scope_unavailable(){return n("ui.settings.integrations.integration_model.there_s_no_separate_project_config_here_so_it_can_only_be_added_g")},get unknown_server(){return n("ui.settings.integrations.integration_model.it_no_longer_exists_the_list_has_been_refreshed")},get oauth_unsupported(){return n("ui.settings.integrations.integration_model.it_doesn_t_use_browser_sign_in")},get grant_running(){return n("ui.settings.integrations.integration_model.a_sign_in_or_test_is_already_running_wait_for_it_to_finish_or_can")},get too_many_operations(){return n("ui.settings.integrations.integration_model.too_many_sign_ins_and_tests_are_waiting_try_again_in_a_moment")},get write_failed(){return n("ui.settings.integrations.integration_model.the_config_file_couldn_t_be_written_check_that_it_isn_t_read_only")},get mcp_starting(){return n("ui.settings.integrations.integration_model.integrations_are_still_starting_try_again_in_a_moment")},get mcp_control_refused(){return n("ui.settings.integrations.integration_model.the_server_refused_it_so_nothing_was_changed")}},tc="ui.settings.integrations.integration_model.copy_catalog_refusal_fallback";function Ye(e,s,a){if(s instanceof Mt&&s.status===409){const i=typeof s.code=="string"&&Object.prototype.hasOwnProperty.call(Qt,s.code)?Qt[s.code]:n(tc);return`${os[e]}. ${i}`}return rs(e,s,a).message}const nc="ui.settings.integrations.add_integration_form.copy_add_integration_pickup_note",sc="ui.settings.integrations.add_integration_form.copy_transport_hint",ac=({existingNames:e,projectScopeAvailable:s,projectLabel:a,onSubmit:i,onCancel:o,initial:r})=>{q();const[d,_]=c.useState(r?.name??""),[l,g]=c.useState(r?.mode??"command"),[h,x]=c.useState(r?.command??""),[f,m]=c.useState(r?.args??""),[y,E]=c.useState(r?.url??""),[M,V]=c.useState("global"),[S,K]=c.useState(r?.touched?{name:!0,command:!0,url:!0}:{}),[H,A]=c.useState(!!r?.touched),[C,W]=c.useState(!1),[Z,J]=c.useState(null),O=c.useRef(null),ae=c.useRef(null),z=c.useRef(null);c.useEffect(()=>{O.current?.focus()},[]);const I=Wr(d,e),Y=l==="command"&&!h.trim()?n("ui.settings.integrations.add_integration_form.enter_the_command_to_run"):null,L=l==="url"?Jr(y):null,$=j=>H||S[j],de=async j=>{if(j.preventDefault(),A(!0),I||Y||L){I?O.current?.focus():Y?ae.current?.focus():z.current?.focus();return}W(!0),J(null);const T=s?M:"global",G=l==="command"?{name:d.trim(),scope:T,mode:l,command:h.trim(),args:Xr(f)}:{name:d.trim(),scope:T,mode:l,url:y.trim()},X=await i(G);W(!1),J(X)},p=(j,T,G)=>T&&$(G)?t.jsx("p",{id:j,className:"text-body-sm text-danger",children:T}):null,D=j=>j.preventDefault();return t.jsxs("form",{noValidate:!0,"aria-label":n("ui.settings.integrations.add_integration_form.add_integration"),className:"flex flex-col gap-4 rounded-lg bg-surface p-4",onSubmit:j=>void de(j),onKeyDown:j=>{j.key==="Escape"&&(j.stopPropagation(),o())},children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(xe,{htmlFor:"integration-add-name",children:n("ui.settings.integrations.add_integration_form.name")}),t.jsx(Re,{ref:O,id:"integration-add-name",value:d,placeholder:n("ui.settings.integrations.add_integration_form.e_g_notion"),autoComplete:"off","aria-invalid":!!(I&&$("name")),"aria-describedby":I&&$("name")?"integration-add-name-error":void 0,onChange:j=>_(j.target.value),onBlur:()=>K(j=>({...j,name:!0}))}),p("integration-add-name-error",I,"name")]}),t.jsxs(Xe,{value:l,onValueChange:j=>g(j==="url"?"url":"command"),className:"flex flex-col gap-1.5",children:[t.jsx("span",{id:"integration-add-transport-label",className:"font-medium text-body-sm text-ink",children:n("ui.settings.integrations.add_integration_form.how_it_runs")}),t.jsxs(et,{"aria-labelledby":"integration-add-transport-label",children:[t.jsx(Le,{value:"command","data-integration-transport":"command",children:n("ui.settings.integrations.add_integration_form.local_command")}),t.jsx(Le,{value:"url","data-integration-transport":"url",children:n("ui.settings.integrations.add_integration_form.remote_url")})]}),t.jsx("p",{className:"text-ink-dim text-meta",children:n(sc)}),t.jsxs($t,{value:"command",className:"mt-0 flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(xe,{htmlFor:"integration-add-command",children:n("ui.settings.integrations.add_integration_form.command")}),t.jsx(Re,{ref:ae,id:"integration-add-command",value:h,placeholder:n("ui.settings.integrations.add_integration_form.e_g_npx"),autoComplete:"off",className:"font-mono","aria-invalid":!!(Y&&$("command")),"aria-describedby":Y&&$("command")?"integration-add-command-error":void 0,onChange:j=>x(j.target.value),onBlur:()=>K(j=>({...j,command:!0}))}),p("integration-add-command-error",Y,"command")]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs(xe,{htmlFor:"integration-add-args",children:[n("ui.settings.integrations.add_integration_form.arguments")," ",t.jsx("span",{className:"font-normal text-ink-dim",children:n("ui.settings.integrations.add_integration_form.one_per_line")})]}),t.jsx(bn,{id:"integration-add-args",value:f,rows:2,className:"font-mono",onChange:j=>m(j.target.value)})]})]}),t.jsx($t,{value:"url",className:"mt-0 flex flex-col gap-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(xe,{htmlFor:"integration-add-url",children:n("ui.settings.integrations.add_integration_form.url")}),t.jsx(Re,{ref:z,id:"integration-add-url",type:"url",value:y,placeholder:n("ui.settings.integrations.add_integration_form.https_mcp_example_com_mcp"),autoComplete:"off",className:"font-mono","aria-invalid":!!(L&&$("url")),"aria-describedby":L&&$("url")?"integration-add-url-error":"integration-add-url-help",onChange:j=>E(j.target.value),onBlur:()=>K(j=>({...j,url:!0}))}),p("integration-add-url-error",L,"url")??t.jsx("p",{id:"integration-add-url-help",className:"text-ink-dim text-meta",children:n("ui.settings.integrations.add_integration_form.if_it_needs_a_sign_in_or_a_key_you_ll_be_asked_after_it_s_added")})]})})]}),s?t.jsxs(Xe,{value:M,onValueChange:j=>V(j==="project"?"project":"global"),className:"flex flex-col gap-1.5",children:[t.jsx("span",{id:"integration-add-scope-label",className:"font-medium text-body-sm text-ink",children:n("ui.settings.integrations.add_integration_form.available_in")}),t.jsxs(et,{"aria-labelledby":"integration-add-scope-label",children:[t.jsx(Le,{value:"global","data-integration-scope":"global",children:n("ui.settings.integrations.add_integration_form.all_chats")}),t.jsx(Le,{value:"project","data-integration-scope":"project",children:n("ui.settings.integrations.add_integration_form.this_project")})]}),a?t.jsx("p",{className:"text-ink-dim text-meta",children:M==="project"?n("ui.settings.integrations.add_integration_form.only_chats_working_in_projectlabel",{projectLabel:String(a)}):n("ui.settings.integrations.add_integration_form.every_chat_in_any_folder")}):null]}):null,Z?t.jsx("p",{className:"text-body-sm text-danger",role:"alert",children:Z}):null,t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx("p",{className:ce("text-body-sm text-ink-dim"),children:n(nc)}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(P,{type:"button",variant:"ghost",size:"md",onMouseDown:D,onClick:o,children:n("ui.settings.integrations.add_integration_form.cancel")}),t.jsxs(P,{type:"submit",variant:"primary",size:"md",disabled:C,onMouseDown:D,children:[C?t.jsx(le,{size:"xs"}):null,n("ui.settings.integrations.add_integration_form.add_integration")]})]})]})]})},ic=4;function oc(e){return e.rowMoving?e.now+e.windowMs:Math.max(e.hold.until,e.lastMovingAt+e.windowMs)}function rc(e){return e.now>e.hold.until||e.hold.reanchors>=ic?"drop":e.hold.landedOn.isConnected&&(!e.candidate||e.candidate===e.hold.landedOn)?"settled":e.active&&e.active!==e.body&&e.active!==e.hold.landedOn?"drop":e.candidate?.isConnected?"restore":"drop"}function cc(e){const s=oc({hold:e.hold,now:e.now,windowMs:e.windowMs,rowMoving:e.rowMoving,lastMovingAt:e.lastMovingAt});if(e.now>s)return{hold:null,land:null};const a=e.hold.landedOn??null,i=e.candidate;if(!i)return{hold:{until:s,reanchors:e.hold.reanchors,landedOn:a},land:null};if(!a)return{hold:{until:s,reanchors:e.hold.reanchors,landedOn:i},land:i};const o=rc({hold:{until:s,reanchors:e.hold.reanchors,landedOn:a},candidate:i,active:e.active,body:e.body,now:e.now});if(o==="settled")return{hold:{until:s,reanchors:e.hold.reanchors,landedOn:a},land:null};if(o==="drop")return{hold:null,land:null};const r=!a.isConnected;return{hold:{until:r?e.now+e.windowMs:s,reanchors:r?e.hold.reanchors+1:e.hold.reanchors,landedOn:i},land:i}}function lc(e){const{row:s,target:a}=e;return!s||!a||typeof a.nodeType!="number"?!1:!s.contains(a)}const Wt=250;function Jt(e){return e?!e.disabled:!1}function dc(e){return Jt(e.primary)?e.primary??null:Jt(e.overflow)?e.overflow??null:null}function uc(e){return e.verdict==="finished"?null:e.watchMs}const Fn="key";function gc(e){const{name:s,keyless:a,freeName:i,names:o,values:r,replace:d,canReplace:_}=e;if(a){const l=jt(s,i);return{values:{[l]:(r[Fn]??"").trim()},confirmedReplace:d&&_?[l]:[],header:i.trim()}}return{values:Object.fromEntries(o.map(l=>[l,(r[l]??"").trim()])),confirmedReplace:d&&_?o:[],header:void 0}}function jt(e,s){const a=Xt(e),i=Xt(s);if(!i)return"";const o=[a,i].filter(Boolean).join("_"),r=/^[A-Za-z_]/.test(o)?o:`K_${o}`;if(r.length<=mt)return r;const d=_c(a),_=mt-i.length-d.length-2,l=[a.slice(0,Math.max(_,0)),d,i].filter(Boolean).join("_");return l.length<=mt?l:l.slice(-128)}const mt=128,Xt=e=>e.trim().toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,""),_c=e=>{let s=2166136261;for(let a=0;a<e.length;a+=1)s^=e.charCodeAt(a),s=Math.imul(s,16777619)>>>0;return s.toString(36).toUpperCase().slice(0,5)},mc=({name:e,keyNames:s,keyless:a=!1,savedKeys:i=[],saving:o,failure:r,onSave:d,onClose:_})=>{q();const[l,g]=c.useState({}),[h,x]=c.useState(!1),[f,m]=c.useState(""),y=a?[jt(e,f)]:[...s],E=a?[Fn]:y,M=(a?jt(e,f).length>0:!0)&&E.every(S=>(l[S]??"").trim()),V=y.some(S=>i.includes(S));return t.jsx(gn,{open:!0,onClose:_,maxWidth:"xs",title:n("ui.settings.integrations.integration_key_dialog.add_keys_heading",{count:a?1:s.length,name:e}),actions:t.jsxs(t.Fragment,{children:[t.jsx(ft,{onClick:_,children:n("ui.settings.integrations.integration_key_dialog.cancel")}),t.jsx(yt,{disabled:!M||o,onClick:()=>{const S=gc({name:e,keyless:a,freeName:f,names:y,values:l,replace:h,canReplace:V});d(S.values,S.confirmedReplace,S.header)},children:o?n("ui.settings.integrations.integration_key_dialog.saving"):n("ui.settings.integrations.integration_key_dialog.save_and_test")})]}),children:t.jsxs("div",{className:"flex flex-col gap-3 p-1.5 text-body text-ink-muted",children:[t.jsx("p",{className:"-mx-1.5",children:a?n("ui.settings.integrations.integration_key_dialog.keys_are_saved_encrypted_on_this_computer_this_one_is_stored_unde"):n("ui.settings.integrations.integration_key_dialog.keys_are_saved_encrypted_on_this_computer_other_integrations_that")}),a?t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(xe,{htmlFor:"integration-key-name",children:n("ui.settings.integrations.integration_key_dialog.the_header_this_server_wants_the_key_in")}),t.jsx(Re,{id:"integration-key-name",autoComplete:"off",placeholder:n("ui.settings.integrations.integration_key_dialog.e_g_authorization_or_x_api_key"),value:f,onChange:S=>m(S.target.value)}),t.jsx("p",{className:"-mx-1.5 text-ink-dim text-meta",children:n("ui.settings.integrations.integration_key_dialog.this_server_declares_no_key_of_its_own_so_local_operator_adds_one")})]}):null,E.filter(S=>a!==!0||S.trim().length>0).map(S=>t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(xe,{htmlFor:`integration-key-${S}`,className:"font-mono",children:a?"Key":S}),t.jsx(Re,{id:`integration-key-${S}`,type:"password",autoComplete:"off",value:l[S]??"",onChange:K=>g(H=>({...H,[S]:K.target.value}))})]},S)),V?t.jsxs("div",{className:"flex items-center gap-2 text-body-sm",children:[t.jsx(Ca,{id:"integration-key-replace",checked:h,onCheckedChange:S=>x(S===!0)}),t.jsx(xe,{htmlFor:"integration-key-replace",className:"font-normal",children:An(y.length)})]}):null,r?t.jsx("p",{className:"-mx-1.5 text-body-sm text-danger",role:"alert",children:r}):null]})})},pc={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",neutral:"bg-ink-dim"},hc={success:"text-ink-muted",warning:"text-warning",danger:"text-danger",info:"text-ink-muted",neutral:"text-ink-dim"};function en(e){if(e===n("ui.settings.integrations.integration_model.ready"))return n(Or);if(e===n("ui.settings.integrations.integration_model.not_connected"))return n(Lr)}const fc=({row:e,operations:s,memories:a,now:i,projectScopeAvailable:o,highlighted:r=!1,rowRef:d,primaryRef:_,overflowRef:l,pending:g,failure:h,confirm:x,onPrimary:f,onOverflow:m,onConfirm:y,onCancelConfirm:E})=>{q();const M=Rr(e,s,a,i),V=r&&M.tone==="danger"?"text-ink":hc[M.tone],S=Et(e,s,a),K=zr(e,s,a),H=Dr(e,o),A=K.findIndex(C=>C.kind==="remove"||C.kind==="remove_elsewhere");return t.jsxs("li",{ref:d,"data-integration":e.name,"data-status":e.status,className:ce("flex min-h-14 flex-col justify-center gap-1 px-4 py-2.5",r&&"bg-row-selected"),onKeyDown:C=>{!x||C.key!=="Escape"||(C.stopPropagation(),E())},children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:M.busy?t.jsx(le,{size:"xs"}):t.jsx("span",{"aria-hidden":"true","data-tone":M.tone,className:ce("size-2 rounded-full",pc[M.tone])})}),t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[t.jsx("span",{className:"truncate font-medium text-body text-ink",title:e.name,children:e.name}),t.jsx("span",{className:"truncate text-ink-dim text-meta",children:H.map((C,W)=>t.jsxs("span",{children:[W>0?" · ":null,C.startsWith("Imported from")&&e.source.path?t.jsx($e,{content:cs(e.source.path),children:t.jsx("span",{className:"underline decoration-dotted underline-offset-2",children:C})}):C]},C))})]}),en(M.label)?t.jsx($e,{content:en(M.label),children:t.jsx("span",{className:ce("shrink-0 text-body-sm",V),children:M.label})}):t.jsx("span",{className:ce("shrink-0 text-body-sm",V),children:M.label}),S?t.jsxs(P,{ref:_,variant:S.variant??"secondary",size:"sm","aria-label":`${S.label} ${e.name}`,disabled:g,"data-integration-action":S.kind,onClick:()=>f(S),children:[g?t.jsx(le,{size:"xs"}):null,S.label]}):null,t.jsxs(Aa,{children:[t.jsx(Ea,{asChild:!0,children:t.jsx(P,{ref:l,variant:"ghost",size:"icon-sm","aria-label":n("ui.settings.integrations.integration_row.more_actions_for_name",{name:String(e.name)}),disabled:g,children:t.jsx(ls,{"aria-hidden":"true"})})}),t.jsx(Ra,{align:"end",className:"min-w-48",children:K.map((C,W)=>t.jsx(yc,{item:C,separated:W===A&&W>0,onSelect:()=>m(C)},C.kind))})]})]}),M.detail?t.jsx("p",{className:ce("pl-7 text-body-sm",M.tone==="danger"?"text-ink-muted":"text-ink-dim"),children:M.detail}):null,h?t.jsx("p",{className:ce("pl-7 text-body-sm",r?"text-ink":"text-danger"),role:"alert",children:h}):null,x?t.jsxs("div",{className:"flex flex-wrap items-center gap-2 pl-7",children:[t.jsx("span",{className:"text-body-sm text-ink",children:x.kind==="remove"?n("ui.settings.integrations.integration_row.remove_name",{name:String(e.name)}):n("ui.settings.integrations.integration_row.sign_out_of_name",{name:String(e.name)})}),t.jsx("span",{className:"text-body-sm text-ink-muted",children:x.kind==="remove"?n("ui.settings.integrations.integration_row.agents_in_every_chat_lose_access_to_name",{name:String(e.name)}):e.auth.kind==="oauth"?n("ui.settings.integrations.integration_row.the_saved_sign_in_is_removed_too"):n("ui.settings.integrations.integration_row.its_saved_credential_is_removed_too")}),t.jsx(P,{variant:"danger",size:"sm",onClick:y,"data-integration-confirm":x.kind,children:x.kind==="remove"?n("ui.settings.integrations.integration_row.remove"):n("ui.settings.integrations.integration_row.sign_out")}),t.jsx(P,{variant:"ghost",size:"sm",onClick:E,children:n("ui.settings.integrations.integration_row.keep")})]}):null]})},yc=({item:e,separated:s,onSelect:a})=>(q(),t.jsxs(t.Fragment,{children:[s?t.jsx(Ta,{}):null,e.kind==="remove_elsewhere"?t.jsxs(Bt,{disabled:!0,className:"flex-col items-start gap-0.5",children:[t.jsx("span",{children:e.label}),t.jsx("span",{className:"text-meta text-ink-dim",children:e.hint})]}):t.jsx(Bt,{destructive:e.kind==="remove",onSelect:a,"data-integration-menu":e.kind,children:e.label})]}));function xc(e,s,a){return!s||s.status==="running"?s?.browser_opened===!0?{message:n("ui.settings.integrations.integration_sign_in_dialog.your_browser_opened_approve_access_to_name_there_then_come_back_h",{name:String(e)}),tone:"progress",link:s.authorization_url??null}:s?.browser_opened===!1?{message:s.authorization_url?n("ui.settings.integrations.integration_sign_in_dialog.your_browser_didn_t_open_open_this_link_to_approve_access"):n("ui.settings.integrations.integration_sign_in_dialog.your_browser_didn_t_open_and_no_link_was_provided_cancel_and_try_"),tone:"progress",link:s.authorization_url??null}:{message:n("ui.settings.integrations.integration_sign_in_dialog.waiting_for_you_to_approve_access_to_name",{name:String(e)}),tone:"progress",link:s?.authorization_url??null}:s.status==="complete"?{message:n("ui.settings.integrations.integration_sign_in_dialog.signed_in_to_name_agents_can_use_it_now",{name:String(e)}),tone:"success",link:null}:s.status==="cancelled"?{message:n("ui.settings.integrations.integration_sign_in_dialog.sign_in_cancelled"),tone:"failure",link:null,reason:null,nextStep:n("ui.settings.integrations.integration_sign_in_dialog.press_try_again_when_you_are_ready")}:{message:n("ui.settings.integrations.integration_sign_in_dialog.sign_in_didn_t_finish"),tone:"failure",link:null,reason:Ir(s.message,a)??n("ui.settings.integrations.integration_sign_in_dialog.the_server_didn_t_say_why"),nextStep:kc(s.message??null,a)}}function kc(e,s){const a=(e??"").toLowerCase();return a.includes("redirect")?s?n("ui.settings.integrations.integration_sign_in_dialog.this_server_may_not_accept_sign_ins_from_local_operator_check_the"):n("ui.settings.integrations.integration_sign_in_dialog.this_server_may_not_accept_sign_ins_from_local_operator_check_the_2"):a.includes("no oauth")||a.includes("authorization server")?s?n("ui.settings.integrations.integration_sign_in_dialog.this_server_doesn_t_publish_a_browser_sign_in_add_its_key_instead"):n("ui.settings.integrations.integration_sign_in_dialog.this_server_doesn_t_publish_a_browser_sign_in_check_the_server_s_"):a.includes("network")||a.includes("connect")?n("ui.settings.integrations.integration_sign_in_dialog.check_the_server_s_url_and_your_network_then_try_again"):n("ui.settings.integrations.integration_sign_in_dialog.check_the_server_s_settings_then_try_again")}function vc(e,s){return e.kind==="ready"?"ready":e.kind==="running"&&s&&s.tone!=="progress"?s.tone==="success"?"success":"failure":"running"}const bc=({name:e,action:s,keyRoute:a,phase:i,onStart:o,onCancel:r,onOpenLink:d,onClose:_})=>{q();const l=i.kind==="running"?i.operation:null,g=i.kind==="running"?xc(e,l,a):null,h=i.kind==="starting"||i.kind==="running"&&g?.tone==="progress",x=g&&g.tone!=="progress",f=c.useRef(null),m=c.useRef(!1),y=vc(i,g);c.useEffect(()=>{if(!m.current){m.current=!0;return}y&&f.current?.focus()},[y]);const E=()=>_(g?.tone==="success"?"signed-in":"dismissed");return t.jsx(gn,{open:!0,onClose:E,maxWidth:"xs",fullWidth:!0,title:n("ui.settings.integrations.integration_sign_in_dialog.sign_in_to_name",{name:String(e)}),dialogProps:{onOpenAutoFocus:M=>{M.preventDefault(),f.current?.focus()}},actions:t.jsxs(t.Fragment,{children:[h&&l?t.jsx(ft,{ref:f,onClick:()=>r(l.id),children:n("ui.settings.integrations.integration_sign_in_dialog.cancel_sign_in")}):t.jsx(ft,{ref:i.kind==="ready"?void 0:f,onClick:E,children:g?.tone==="success"?n("ui.settings.integrations.integration_sign_in_dialog.done"):n("ui.settings.integrations.integration_sign_in_dialog.close")}),i.kind==="ready"?t.jsx(yt,{ref:f,onClick:o,children:n("ui.settings.integrations.integration_sign_in_dialog.continue_in_browser")}):null,i.kind==="refused"||g?.tone==="failure"?t.jsx(yt,{ref:g?.tone==="failure"?f:void 0,onClick:o,children:n("ui.settings.integrations.integration_sign_in_dialog.try_again")}):null]}),children:t.jsxs("div",{className:"flex flex-col gap-3 p-1.5 text-body text-ink-muted","aria-live":"polite",children:[i.kind==="ready"?t.jsx("p",{className:"-mx-1.5",children:n("ui.settings.integrations.integration_sign_in_dialog.browser_approval_notice",{name:e,replaces:s==="reauth"?"yes":"no"})}):null,i.kind==="starting"?t.jsxs("p",{className:"-mx-1.5 flex items-center gap-2",children:[t.jsx(le,{size:"xs"}),n("ui.settings.integrations.integration_sign_in_dialog.starting_sign_in")]}):null,g?t.jsxs("div",{className:"flex flex-col gap-1",role:x?"status":void 0,children:[t.jsxs("p",{className:(g.tone==="success","-mx-1.5 flex items-start gap-2 text-ink"),children:[g.tone==="progress"?t.jsx(le,{size:"xs",className:"mt-0.5"}):null,g.tone==="failure"?t.jsx(Ia,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-danger"}):null,t.jsx("span",{children:g.message})]}),g.reason?t.jsx("p",{className:"-mx-1.5 text-ink-muted",children:g.reason}):null,g.nextStep?t.jsx("p",{className:"-mx-1.5 text-ink-muted",children:g.nextStep}):null]}):null,g?.link&&g.tone==="progress"?t.jsxs("div",{className:"flex flex-col items-start gap-1",children:[t.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[t.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-ink-dim text-mono-sm",title:g.link,children:g.link}),t.jsx(P,{variant:"ghost",size:"icon-sm","aria-label":n("ui.settings.integrations.integration_sign_in_dialog.copy_the_sign_in_link"),title:n("ui.settings.integrations.integration_sign_in_dialog.copy_the_sign_in_link"),onClick:()=>{navigator.clipboard.writeText(g.link??"").then(()=>xt(n("ui.settings.integrations.integration_sign_in_dialog.sign_in_link_copied"))).catch(()=>{})},children:t.jsx(ds,{"aria-hidden":"true"})})]}),t.jsx(P,{variant:"link",size:"sm",onClick:()=>d(g.link??""),children:n("ui.settings.integrations.integration_sign_in_dialog.open_the_sign_in_page")})]}):null,i.kind==="refused"?t.jsx("p",{className:"text-danger",role:"alert",children:i.message}):null]})})},wc=e=>e.reduce((s,a)=>s?(a.updated_at??0)>(s.updated_at??0)?a:s:a,null),jc=/^[A-Za-z]:[\\/]/,Je=e=>{const s=e?.trim();return s&&(s.startsWith("/")||jc.test(s))?s:null};function Nc(e){const o=e?.payload?.frontend?.snapshot?.cwd;return typeof o=="string"&&o.trim()?o:null}const Be="local-operator.settings.integrations.last-cwd";function Sc(e,s,a=typeof localStorage>"u"?null:localStorage){const i=Je(s);if(!(!e||!i||!a))try{const o=a.getItem(Be),r=o?JSON.parse(o):{};if(r[e]===i)return;a.setItem(Be,JSON.stringify({...r,[e]:i}))}catch{}}const Dn=()=>typeof localStorage>"u"?null:localStorage;function zn(e=Dn()){if(!e)return{};try{const s=e.getItem(bt);if(!s)return{};const a=JSON.parse(s);return!a||typeof a!="object"||Array.isArray(a)?{}:a}catch{return{}}}const tn=256;function Mc(e,s=Dn()){if(s)try{const a={...zn(s),...e},i=Object.keys(a);if(i.length>tn){const o={};for(const r of i.slice(-tn))o[r]=a[r];s.setItem(bt,JSON.stringify(o));return}s.setItem(bt,JSON.stringify(a))}catch{}}function nn(e,s,a){if(e==="saved")return null;if(e==="replace_confirmation_required"){const o=An(Object.keys(a).length);return n("ui.settings.integrations.use_integrations.a_saved_value_already_exists_for_this_key_tick_label_to_overwrite",{label:String(o)})}if(e==="invalid_target")return n("ui.settings.integrations.use_integrations.that_header_can_t_carry_this_key_it_may_already_be_set_on_the_ser");const i=s.length?s:Object.keys(a);return n("ui.settings.integrations.use_integrations.keys_not_saved",{keys:String(i.join(", "))})}function Cc(e,s=typeof localStorage>"u"?null:localStorage){if(!(!e||!s))try{const a=s.getItem(Be);if(!a)return;const i=JSON.parse(a);if(!(e in i))return;const o={...i};delete o[e],s.setItem(Be,JSON.stringify(o))}catch{}}const Ac=e=>!!(e&&typeof e=="object"&&"code"in e&&e.code==="invalid_cwd"),Ec=(e,s)=>s!==null&&e===s?null:e;function Rc(e,s=typeof localStorage>"u"?null:localStorage){if(!e||!s)return null;try{const a=s.getItem(Be);if(!a)return null;const o=JSON.parse(a)[e];return typeof o=="string"?o:null}catch{return null}}const Tc=e=>e.action==="disconnect"?"disconnected":"connected";function Ic(e){switch(e.action){case"cancel":return{action:"cancel",operation_id:e.operationId};case"connect":case"disconnect":case"reload":return null;case"test":return{action:"test",name:e.name};default:return{...e,confirmed:!0}}}function Oc(e){switch(e.action){case"cancel":return{action:"cancel",operation_id:e.operationId};case"test":case"connect":return{action:"connect",name:e.name};case"reload":return{action:"reload",name:e.name};case"add":return e;case"remove":return{...e,confirmed:!0};default:return{action:e.action,name:e.name,confirmed:!0}}}function Lc({sessionId:e}){const s=_n(),a=Dt(s.data,"mcp_catalog"),i=Dt(s.data,"mcp"),o=a?"catalog":i?"session":null,[r,d]=c.useState(null),_=ln(),l=Ze(v=>v.sessions),g=Ze(v=>v.fetchSessions),h=Ze(v=>v.loading),x=c.useMemo(()=>l.find(v=>v.session_id===e)??null,[l,e]),f=c.useMemo(()=>o==="session"&&!e?wc(l):null,[o,e,l]),m=o==="session"?e??f?.session_id??null:null;c.useEffect(()=>{o!=="session"||e||l.length>0||g(us)},[o,e,l.length,g]);const y=o==="catalog"?Je(x?.cwd):null,E=o==="catalog"&&!!e&&y===null,M=Ne({queryKey:["desktop","session-cwd",e??""],queryFn:()=>we({op:"sessions.get",sessionId:e??""}),enabled:E,staleTime:Number.POSITIVE_INFINITY,retry:!1}),V=E&&!M.isFetched,S=y??Je(Nc(M.data))??(M.isFetched?Je(Rc(e)):null),K=Ec(S,r),H=o==="catalog"?K:null,A=o==="catalog"?e??null:null,C=gs.catalog(H,A);c.useEffect(()=>{o!=="catalog"||!e||!H||Sc(e,H)},[o,e,H]);const W=c.useRef(0),[Z,J]=c.useState(0),O=c.useRef(null),ae=c.useCallback((v,R)=>{const F=Date.now()+Zt;W.current=F,O.current={name:v,expect:R},J(F)},[]),z=c.useCallback(v=>Date.now()<W.current?Ln:Yr(v),[]),I=Ne({queryKey:C,queryFn:()=>ps(H,A),enabled:o==="catalog"&&!V,staleTime:1e4,refetchInterval:v=>z(v.state.data)}),Y=Ac(I.error);c.useEffect(()=>{!Y||!S||r===S||(d(S),Cc(e))},[Y,S,r,e]);const L=Ne({queryKey:kt.list(m??""),queryFn:()=>hs(m??""),enabled:o==="session"&&!!m,staleTime:1e4,refetchInterval:v=>z(v.state.data?wt(v.state.data,m??""):void 0)}),$=c.useMemo(()=>{if(o==="catalog")return I.data;if(o==="session"&&L.data&&m)return wt(L.data,m)},[o,I.data,L.data,m]),de=c.useCallback(()=>Fc({queryClient:_,route:o,catalogKey:C,sessionId:m}),[o,C,_,m]);c.useEffect(()=>{if(!Z)return;const v=O.current;if(!v)return;const R=$?.servers.find(b=>b.name===v.name);!R||!(v.expect==="connected"?R.status==="connected":R.status_basis==="live"&&R.status!=="connected")||(W.current=0,O.current=null,J(0))},[$,Z]);const p=c.useRef({}),[D,j]=c.useState(0),T=c.useMemo(()=>(p.current=Kr(Hr(p.current,$,zn()),$),p.current),[$,D]),G=c.useRef("");c.useEffect(()=>{const v=Br(T,$);if(!Object.keys(v).length)return;const R=JSON.stringify(v);R!==G.current&&(G.current=R,Mc(v))},[T,$]);const X=c.useCallback(v=>{const R=Te(p.current,v);R.needsKey||(p.current={...p.current,[v]:{...R,needsKey:!0}},j(F=>F+1))},[]),ee=c.useCallback(v=>{if(v.action!=="disconnect"&&v.action!=="connect"&&v.action!=="reload")return;const R=Te(p.current,v.name),F=Date.now()+Zt,b=v.action==="disconnect"?{...R,connectedAt:null,disconnectedAt:Date.now(),holdUntil:F}:{...R,disconnectedAt:null,holdUntil:F};p.current={...p.current,[v.name]:b},ae(v.name,Tc(v)),j(U=>U+1)},[ae]),ie=c.useCallback(async v=>{if(o==="catalog"){const R=Ic(v);if(!R)return null;try{const F=await _s(H,R);return _.setQueryData(C,F),ee(v),F.operation?.id??null}catch(F){throw F instanceof Mt&&F.status===409&&_.invalidateQueries({queryKey:C}),F}}if(o==="session"&&m){const R=await we({op:"mcp.control",sessionId:m,control:Oc(v)});ee(v);const F=kt.list(m),b=R?.data;return b&&"servers"in b&&Array.isArray(b.servers)?(_.setQueryData(F,b),null):(_.invalidateQueries({queryKey:F}),b&&"id"in b&&typeof b.id=="string"?b.id:null)}return null},[o,H,C,_,m,ee]),ue=c.useCallback(async v=>{if(o==="catalog"&&A&&(v.action==="connect"||v.action==="disconnect"||v.action==="reload")){try{await we({op:"mcp.control",sessionId:A,control:{action:v.action,name:v.name,...v.action==="disconnect"?{confirmed:!0}:{}}})}catch(R){throw _.invalidateQueries({queryKey:C}),R}return ee(v),await _.invalidateQueries({queryKey:C}),null}return ie(v)},[o,A,_,C,ie,ee]),Se=c.useCallback(async(v,R,F,b)=>{if(o==="catalog"){const U=await ms(H,v,R,F,b);if(U.catalog&&_.setQueryData(C,U.catalog),U.code!=="saved")return{saved:!1,message:nn(U.code,U.failed_ids,R)};try{await ie({action:"test",name:v})}catch{}return{saved:!0,message:null}}if(o==="session"&&m){const U=await we({op:"mcp.credentials.store",sessionId:m,name:v,values:R,confirmedReplace:F});if(U.data?.code!=="saved")return{saved:!1,message:nn(U.data?.code,U.data?.failed_ids??[],R)};try{await ie({action:"connect",name:v})}catch{}return{saved:!0,message:null}}return{saved:!1,message:null}},[o,H,C,_,ie,m]),_e=o==="catalog"?I:L,Ie=c.useCallback(()=>{_e.refetch()},[_e]);return{enabled:o!==null,route:o,sessionId:o==="catalog"?A:m,borrowed:f,noConversation:o==="session"&&!m&&!h,document:$,isLoading:s.isLoading||o==="catalog"&&(V||I.isLoading)||o==="session"&&(m?L.isLoading:h),isError:_e.isError,folderUnavailable:$r(r,S),refetch:Ie,readDocument:de,control:ue,storeKeys:Se,memories:T,markNeedsKey:X}}function Fc(e){if(e.route==="catalog")return e.queryClient.getQueryData(e.catalogKey);if(e.route==="session"&&e.sessionId){const s=e.queryClient.getQueryData(kt.list(e.sessionId));return s?wt(s,e.sessionId):void 0}}const Dc=(e,s)=>{const a=e?.trim();if(!a)return null;const i=ks(a,s);return i.kind==="auth"?{kind:"matched",name:i.name,unresolved:null}:{kind:"miss",asked:a}},zc=6,pt="ui.settings.integrations.mcp_management_section.copy_section_title",Uc="ui.settings.integrations.mcp_management_section.copy_section_description",Pc={test:"test",connect:"reconnect",disconnect:"disconnect",reload:"reload",remove:"remove",sign_out:"disconnect",cancel:"cancel",login:"grant",reauth:"grant"},Kc=({sessionId:e,sectionRef:s,highlightServer:a})=>{q();const i=Lc({sessionId:e}),{document:o,control:r,readDocument:d}=i,_=fs(),l=o?.servers??[],g=o?.operations??[],h=o?.project_scope_available??!1,[x,f]=c.useState(!1),[m,y]=c.useState(""),[E,M]=c.useState(null),[V,S]=c.useState({}),[K,H]=c.useState(null),[A,C]=c.useState(null),[W,Z]=c.useState({kind:"ready"}),[J,O]=c.useState(null),[ae,z]=c.useState(null),[I,Y]=c.useState(!1),L=c.useRef({}),$=c.useRef({}),de=c.useRef({}),p=c.useRef(0),D=c.useRef(null),j=c.useRef(null),T=c.useRef(null),[G,X]=c.useState(null),[ee,ie]=c.useState(null),[ue,Se]=c.useState(null),_e=c.useCallback(()=>{const u=T.current;T.current=null,C(null),O(null),window.setTimeout(()=>{u?.isConnected&&u.focus()},0)},[]),Ie=c.useCallback(u=>{const k=window.document.activeElement;T.current=k instanceof HTMLElement?k:null,C(u)},[]),v=c.useCallback((u,k)=>{ie({name:u,waitForSignIn:k==="signed-in",until:Date.now()+Pe,reanchors:0}),_e()},[_e]),R=c.useMemo(()=>Dc(a,l.map(u=>u.name)),[a,l]),F=R?.kind==="matched"?R.name:null,b=c.useRef(null),U=c.useRef(null),Q=m.trim().toLowerCase(),te=c.useMemo(()=>Q?l.filter(u=>u.name.toLowerCase().includes(Q)):l,[l,Q]),ye=Pr(te,g,i.memories),oe=A?.kind==="sign_in"?l.find(u=>u.name===A.name)??null:null;c.useEffect(()=>{!F||U.current===F||!m||y("")},[F,m]),c.useEffect(()=>{!F||U.current===F||te.some(u=>u.name===F)&&(U.current=F,b.current?.scrollIntoView({block:"center",behavior:"smooth"}))},[F,te]),c.useEffect(()=>{if(!J)return;const u=g.find(k=>k.id===J)??null;Z({kind:"running",operation:u})},[g,J]);const ke=g.some(u=>u.status==="running"),me=u=>{const k=window.document.activeElement;k&&k!==window.document.body&&k.isConnected||ie({name:u,waitForSignIn:!1,until:Date.now()+Pe,reanchors:0})},ge=async(u,k,N)=>{M(u),S(({[u]:Ce,...Ae})=>Ae);let B=null,fe=!1;try{B=await N()}catch(Ce){fe=!0,S(Ae=>({...Ae,[u]:Ye(Pc[k]??"status",Ce,ke)}))}finally{M(null),k!=="sign_out"&&(k!=="remove"||fe)&&me(u)}return{operationId:B,failed:fe}},pe=u=>l.find(k=>k.name===u),he=u=>{u.source.path&&vs(u.source.path)},Me=async(u,k)=>{Z({kind:"starting"}),O(null);try{const N=await r({action:k,name:u});N?O(N):Z({kind:"running",operation:null})}catch(N){N instanceof Mt&&N.code==="oauth_unsupported"&&i.markNeedsKey(u),Z({kind:"refused",message:Ye("grant",N,ke)})}},ve=(u,k)=>{switch(k.kind){case"sign_in":case"reauth":{const N=g.find(B=>B.name===u.name&&B.status==="running");N&&Ve(N)?(Z({kind:"running",operation:N}),O(N.id)):(Z({kind:"ready"}),O(null)),Ie({kind:"sign_in",name:u.name,action:k.kind==="reauth"?"reauth":"login"});return}case"set_key":z(null),Ie({kind:"key",name:u.name,keyNames:u.auth.secret_refs.map(N=>N.id)});return;case"fix":he(u);return;case"sign_out":H({name:u.name,kind:"sign_out"});return;default:{const N=k.kind;ge(u.name,N,()=>r({action:N,name:u.name}))}}},it=(u,k)=>{switch(k.kind){case"remove":case"sign_out":H({name:u.name,kind:k.kind});return;case"sign_in":case"reauth":case"set_key":ve(u,{kind:k.kind,label:k.label});return;case"open_config":he(u);return;case"copy_setup":navigator.clipboard.writeText(u.setup_prompt??"").then(()=>xt(n("ui.settings.integrations.mcp_management_section.setup_steps_copied_paste_them_into_a_chat"))).catch(()=>{});return;case"cancel":{const N=g.find(B=>B.name===u.name&&B.status==="running");N&&ge(u.name,"cancel",()=>r({action:"cancel",operationId:N.id}));return}case"test":case"connect":case"disconnect":case"reload":{const N=k.kind;ge(u.name,N,()=>r({action:N,name:u.name}));return}default:return}},ot=(u,k)=>{if(H(null),k==="remove"){const N=u.source.owned_scope;if(!N)return;const B=te.findIndex(fe=>fe.name===u.name);ge(u.name,"remove",()=>r({action:"remove",name:u.name,scope:N})).then(({operationId:fe,failed:Ce})=>{Ce||fe!==null||(xt(n("ui.settings.integrations.mcp_management_section.removed_name",{name:String(u.name)})),B>=0&&Se({index:B}))});return}ge(u.name,"sign_out",()=>r({action:"logout",name:u.name})).then(()=>{ie({name:u.name,waitForSignIn:!1,until:Date.now()+Pe,reanchors:0})})},rt=async u=>{try{return await r({action:"add",name:u.name,scope:u.scope,...u.mode==="command"?{command:u.command,args:u.args}:{url:u.url}}),f(!1),X(u.name),null}catch(k){return Ye("add",k,!1)}},ct=t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("h2",{className:"text-heading text-ink",children:n(pt)}),t.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:n(Uc)})]}),i.enabled&&l.length>0&&!x?t.jsxs(P,{ref:D,variant:"secondary",size:"sm",onClick:()=>f(!0),"data-tour-tag":"mcp-add-server",children:[t.jsx(Ut,{"aria-hidden":"true"}),n("ui.settings.integrations.mcp_management_section.add_integration")]}):null]});if(!i.enabled&&!i.isLoading)return t.jsx(ne,{title:n(pt),titleComponent:ct,sectionRef:s,children:t.jsx(se,{variant:"warning",children:n("ui.settings.integrations.mcp_management_section.integrations_need_a_newer_local_operator_backend_update_it_and_re")})});const De=t.jsx(ac,{existingNames:l.map(u=>u.name),projectScopeAvailable:h,projectLabel:o?.cwd?Bc(o.cwd):null,onSubmit:rt,onCancel:()=>{f(!1),window.setTimeout(()=>D.current?.focus(),0)}}),ze=A?pe(A.name):void 0,Kn=Object.entries(V).filter(([u])=>!l.some(k=>k.name===u)),$n=u=>S(({[u]:k,...N})=>N);c.useEffect(()=>{if(!G)return;const u=L.current[G];if(!u){l.some(k=>k.name===G)&&($.current[G]?.focus(),X(null));return}u.focus(),X(null)},[G,l]),c.useEffect(()=>{if(!ue)return;const k=te[Math.min(ue.index,te.length-1)]??te.at(-1);if(k){const N=L.current[k.name]??$.current[k.name];if(!N)return;N.focus()}else D.current?.focus();Se(null)},[ue,te]);const lt=c.useCallback((u,k)=>{const N=d()??o,B=N?.servers.find(Bn=>Bn.name===u.name),fe=N?.operations??[],Ce=B?B.status==="connecting"||Fe(B.name,fe)!==null:!1;Ce&&B&&(p.current=k);const Ae=B?Et(B,fe,i.memories):null;if(B&&u.waitForSignIn&&(Ae?.kind==="sign_in"||Ae?.kind==="reauth"))return"kept";const Oe=cc({hold:u,now:k,windowMs:Pe,rowMoving:Ce,lastMovingAt:p.current,candidate:B?dc({primary:Ae?L.current[B.name]:null,overflow:$.current[B.name]}):void 0,active:window.document.activeElement,body:window.document.body});if(!Oe.hold)return ie(null),"finished";if(!Oe.land)return"kept";ie({name:u.name,waitForSignIn:!1,until:Oe.hold.until,landedOn:Oe.land,reanchors:Oe.hold.reanchors});const It=Oe.land;return window.setTimeout(()=>{It.isConnected&&It.focus()},0),"landed"},[d,o,i.memories]);return c.useEffect(()=>{if(!ee)return;lt(ee,Date.now());let u=0,k=!1;const N=()=>{if(k)return;const B=uc({verdict:lt(ee,Date.now()),watchMs:Wt});B!==null&&(u=window.setTimeout(N,B))};return u=window.setTimeout(N,Wt),()=>{k=!0,window.clearTimeout(u)}},[ee,lt]),c.useEffect(()=>{if(!ee)return;const u=k=>{lc({target:k.target,row:de.current[ee.name]})&&ie(null)};return window.document.addEventListener("pointerdown",u,!0),()=>{window.document.removeEventListener("pointerdown",u,!0)}},[ee]),t.jsxs(ne,{title:n(pt),titleComponent:ct,sectionRef:s,children:[t.jsxs("div",{className:"flex flex-col gap-4",children:[i.route==="session"&&i.borrowed?t.jsx("p",{className:"text-body-sm text-ink-muted",children:n("ui.settings.integrations.mcp_management_section.borrowed_chat_notice",{chat:i.borrowed.title?.trim()||i.borrowed.session_id.slice(0,6)})}):null,i.noConversation?t.jsxs("div",{className:"flex flex-col items-start gap-2",children:[t.jsx("p",{className:"text-body-sm text-ink-muted",children:n("ui.settings.integrations.mcp_management_section.integrations_can_be_managed_here_once_a_chat_has_started")}),t.jsx(P,{variant:"primary",size:"sm",onClick:()=>_("/chat"),children:n("ui.settings.integrations.mcp_management_section.start_a_chat")}),t.jsx("p",{className:"text-ink-dim text-meta",children:n("ui.settings.integrations.mcp_management_section.updating_local_operator_removes_this_step")})]}):null,i.isLoading?t.jsx("div",{className:"flex h-24 items-center justify-center",children:t.jsx(le,{size:"lg",label:n("ui.settings.integrations.mcp_management_section.loading_integrations")})}):null,i.folderUnavailable?t.jsx(se,{variant:"warning",children:t.jsx("span",{children:n("ui.settings.integrations.mcp_management_section.this_chat_s_folder_no_longer_exists_so_only_global_integrations_a")})}):null,i.isError?t.jsx(se,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:n("ui.settings.integrations.mcp_management_section.integrations_couldn_t_be_loaded")}),t.jsx(P,{variant:"secondary",size:"sm",onClick:i.refetch,children:n("ui.settings.integrations.mcp_management_section.retry")})]})}):null,Kn.map(([u,k])=>t.jsx(se,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:k}),t.jsx(P,{variant:"ghost",size:"sm",onClick:()=>$n(u),children:n("ui.settings.integrations.mcp_management_section.dismiss")})]})},u)),x&&l.length>0?De:null,l.length>=zc?t.jsxs("div",{className:"relative",children:[t.jsx(ys,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-ink-dim"}),t.jsx(Re,{ref:j,value:m,onChange:u=>y(u.target.value),onKeyDown:u=>{u.key!=="Escape"||!m||(u.preventDefault(),y(""))},placeholder:n("ui.settings.integrations.mcp_management_section.search_integrations_placeholder",{integrations:vr(l.length)}),"aria-label":n("ui.settings.integrations.mcp_management_section.search_integrations"),className:"pl-9"})]}):null,R?.kind==="miss"&&l.length>0?t.jsx("p",{className:"text-body-sm text-ink-muted",children:n("ui.settings.integrations.mcp_management_section.no_match_for_name",{asked:String(R.asked)})}):null,R?.kind==="matched"&&R.unresolved?t.jsx("p",{className:"text-body-sm text-ink-muted",children:n("ui.settings.integrations.mcp_management_section.showing_fallback_for_unknown",{shown:String(R.name),asked:String(R.unresolved)})}):null,o&&l.length===0&&!i.isLoading?x?De:t.jsxs("div",{className:"flex flex-col items-start gap-3 rounded-lg bg-surface p-6",children:[t.jsx(mn,{"aria-hidden":"true",className:"size-5 text-ink-muted"}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("h3",{className:"text-heading text-ink",children:n("ui.settings.integrations.mcp_management_section.no_integrations_yet")}),t.jsx("p",{className:"max-w-xl text-body-sm text-ink-muted",children:n("ui.settings.integrations.mcp_management_section.integrations_let_agents_read_and_act_in_your_other_tools_like_not")})]}),t.jsxs(P,{variant:"primary",size:"md",onClick:()=>f(!0),"data-tour-tag":"mcp-add-server",children:[t.jsx(Ut,{"aria-hidden":"true"}),n("ui.settings.integrations.mcp_management_section.add_integration")]})]}):null,l.length>0&&te.length===0?t.jsxs("div",{className:"flex flex-col items-start gap-2",children:[t.jsx("p",{className:"text-body-sm text-ink-muted",children:n("ui.settings.integrations.mcp_management_section.no_integrations_match_this_search")}),t.jsx(P,{variant:"secondary",size:"sm",onClick:()=>{y(""),window.setTimeout(()=>{(j.current??D.current)?.focus()},0)},children:n("ui.settings.integrations.mcp_management_section.clear_search")})]}):null,ye.map(u=>t.jsxs("section",{"aria-labelledby":`integrations-group-${u.id}`,className:"flex flex-col gap-1.5",children:[t.jsxs("h3",{id:`integrations-group-${u.id}`,className:"px-1 text-ink-dim text-meta",children:[u.title," · ",u.rows.length]}),t.jsx("ul",{className:"flex flex-col divide-y divide-hairline overflow-hidden rounded-lg bg-surface",children:u.rows.map(k=>t.jsx(fc,{row:k,operations:g,memories:i.memories,projectScopeAvailable:h,highlighted:k.name===F,rowRef:N=>{de.current[k.name]=N,k.name===F&&(b.current=N)},primaryRef:N=>{L.current[k.name]=N},overflowRef:N=>{$.current[k.name]=N},pending:E===k.name,failure:V[k.name]??null,confirm:K?.name===k.name?{kind:K.kind}:null,onPrimary:N=>ve(k,N),onOverflow:N=>it(k,N),onConfirm:()=>K&&ot(k,K.kind),onCancelConfirm:()=>{H(null),window.setTimeout(()=>{$.current[k.name]?.focus()},0)}},k.id))})]},u.id))]}),A?.kind==="sign_in"?t.jsx(bc,{name:A.name,action:A.action,keyRoute:oe?st(oe):!1,phase:W,onStart:()=>void Me(A.name,A.action),onCancel:u=>void r({action:"cancel",operationId:u}).catch(()=>{}),onOpenLink:u=>void xs(u),onClose:u=>v(A.name,u)}):null,A?.kind==="key"?t.jsx(mc,{name:A.name,keyNames:A.keyNames.length?A.keyNames:ze?.auth.secret_refs.map(u=>u.id)??[],keyless:A.keyNames.length===0,savedKeys:ze?.auth.secret_refs.filter(u=>u.state==="encrypted").map(u=>u.id),saving:I,failure:ae,onClose:_e,onSave:(u,k,N)=>{Y(!0),z(null),i.storeKeys(A.name,u,k,N).then(B=>{if(!B.saved){z(B.message);return}C(null),ie({name:A.name,waitForSignIn:!1,until:Date.now()+Pe,reanchors:0})}).catch(B=>z(Ye("key",B,!1))).finally(()=>Y(!1))}}):null]})},Pe=4e3,$c=/^\/(?:Users|home)\/[^/]+(?=\/|$)/,Bc=e=>e.replace($c,"~"),Hc=({verification:e})=>{q();const{prices:s}=ws(),a=e.grant_amount??s?.default_new_credits,{sentence:i,action:o}=js(e.signup_grant,Ns(a)),r=Ss(e.claim_url,Ms);return t.jsxs("div",{className:"mt-8 flex items-start gap-3 rounded-sm border border-hairline bg-surface p-3",children:[t.jsx(tt,{className:"mt-0.5 size-4 shrink-0 text-ink-muted","aria-hidden":"true"}),t.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-2",children:[t.jsx("p",{className:"text-body-sm text-ink",children:i}),t.jsx(P,{variant:"secondary",size:"sm",onClick:()=>Cs(r),children:o})]})]})},Vc=({onAfterCredentialUpdate:e})=>{q();const{isAuthenticated:s,user:a,isLoading:i,accountRead:o,signOut:r}=bs(),d=pn(x=>x.isSigningOut),_=c.useCallback(async()=>{try{await r()}catch(x){console.error("Error signing out:",x)}},[r]),l=(()=>{if(!s||!a?.radientUser)return null;const{account:x,identity:f,verification:m}=a.radientUser,y=m!=null&&!m.email_verified&&m.signup_grant!=="claimed";return t.jsxs(t.Fragment,{children:[t.jsxs(nt,{children:[t.jsx(re,{label:n("ui.settings.account.radient_account_section.status"),value:t.jsxs("span",{className:"inline-flex items-center gap-2",children:[n("ui.settings.account.radient_account_section.connected"),t.jsx(Oa,{variant:"success",className:"capitalize",children:x.status})]})}),t.jsx(re,{label:n("ui.settings.account.radient_account_section.name"),value:x.name||n("ui.settings.account.radient_account_section.not_provided")}),t.jsx(re,{label:n("ui.settings.account.radient_account_section.email"),value:x.email}),t.jsx(re,{label:n("ui.settings.account.radient_account_section.account_id"),value:t.jsx("span",{className:"text-mono-sm",children:x.id})}),t.jsx(re,{label:n("ui.settings.account.radient_account_section.tenant_id"),value:t.jsx("span",{className:"text-mono-sm",children:x.tenant_id})}),t.jsx(re,{label:n("ui.settings.account.radient_account_section.provider"),value:t.jsx("span",{className:"capitalize",children:f.provider})}),t.jsx(re,{label:n("ui.settings.account.radient_account_section.created"),value:hn(x.created_at)})]}),y&&m?t.jsx(Hc,{verification:m}):null,t.jsx("div",{className:"mt-8",children:t.jsx(sa,{offerSignIn:!0})}),t.jsxs("div",{className:"mt-8",children:[t.jsx("p",{className:"text-body-sm text-ink-muted",children:n("ui.settings.account.radient_account_section.need_to_sign_out_or_switch_accounts")}),t.jsxs(P,{variant:"danger",className:"mt-3",onClick:_,children:[t.jsx(aa,{}),n("ui.settings.account.radient_account_section.sign_out_from_radient")]})]})]})})(),g=o==="refused"?n("ui.settings.account.radient_account_section.radient_refused_the_sign_in_this_app_is_holding_so_your_account_d"):fn(o)?n("ui.settings.account.radient_account_section.your_radient_account_could_not_be_read_so_this_app_cannot_show_yo"):n("ui.settings.account.radient_account_section.you_are_not_currently_signed_in_to_radient"),h=s&&a?null:t.jsxs("div",{children:[t.jsxs("p",{className:"text-body-sm text-ink-muted",children:[g," ",n("ui.settings.account.radient_account_section.sign_in_to_access_your_account_details_or_sign_up_to_get_free_cre")]}),t.jsx("div",{className:"mt-6",children:t.jsx(Ua,{titleText:"",onAfterCredentialUpdate:e,descriptionText:"",onSignInSuccess:()=>{}})})]});return i||d?t.jsxs("div",{className:"flex min-h-36 flex-col items-center justify-center gap-3",children:[t.jsx(le,{size:"lg",label:n("ui.settings.account.radient_account_section.loading_account")}),!d&&t.jsx("p",{className:"text-meta text-ink-dim",children:n("ui.settings.account.radient_account_section.loading_your_radient_account_details")})]}):s&&a?.radientUser?l:t.jsx("div",{className:"flex flex-col gap-4",children:h})};function Gc({metric:e,data:s}){return q(),t.jsx(As,{title:"",heightClassName:"h-62",yAxisWidth:48,unit:e==="credits"?"credits":"tokens",srSummary:e==="credits"?n("ui.settings.account.settings_usage_chart.credits_summary",{days:s.length}):n("ui.settings.account.settings_usage_chart.tokens_summary",{days:s.length}),xTickFormatter:a=>a,yTickFormatter:a=>e==="credits"?`$${a.toFixed(2)}`:Es(a),children:t.jsx(ar,{data:s,children:t.jsx(dn,{type:"monotone",dataKey:"value",strokeWidth:2,dot:!1,activeDot:{r:4,strokeWidth:0},name:e==="credits"?n("ui.settings.account.settings_usage_chart.credits_consumed"):n("ui.settings.account.settings_usage_chart.tokens_used")})})})}const qc={all:["desktop","tts-path-resolution"]};function Yc(e){return Ne({queryKey:qc.all,queryFn:()=>we({op:"tts.paths"}),enabled:e,staleTime:Number.POSITIVE_INFINITY,refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:Rs})}const Zc=["speech.voice.gender","speech.voice.tone","speech.voice.expressiveness","speech.voice.pace","speech.voice.language","speech.voice.accent","speech.voice.instructions"];function sn(e){const s=new Map(e.map(o=>[o.key,o])),a=[],i=[];for(const o of Zc){const r=s.get(o);r?a.push(r):i.push(o)}return{rows:a,missing:i}}const Qc=["provider_tts_radient","provider_tts_elevenlabs","provider_tts_openai","none"];function an(e){return typeof e=="string"&&Qc.includes(e)}function Wc(e){if(e===null||typeof e!="object")return null;const s=e;if(!an(s.path)||typeof s.reason!="string"||typeof s.servable!="boolean"||!Array.isArray(s.rungs))return null;const a=[];for(const i of s.rungs){if(i===null||typeof i!="object")return null;const o=i;if(!an(o.path)||typeof o.available!="boolean"||typeof o.reason!="string")return null;a.push({path:o.path,available:o.available,reason:o.reason})}return{path:s.path,reason:s.reason,servable:s.servable,rungs:a}}const Jc={get provider_tts_radient(){return n("ui.settings.speech.speech_settings_model.radient_pass")},provider_tts_elevenlabs:"ElevenLabs",provider_tts_openai:"OpenAI",get none(){return n("ui.settings.speech.speech_settings_model.no_provider")}};function Un(e){return Jc[e]}function Xc(e){return{servable:e.servable,serving:e.path==="none"?null:e.path,reason:e.reason,rungs:e.rungs.map(s=>({path:s.path,name:Un(s.path),available:s.available,reason:s.reason}))}}const el="ui.settings.speech.speech_section.copy_backend_older_sentence",Pn="ui.settings.speech.speech_section.copy_unavailable_sentence",tl=({resetErrorBoundary:e})=>(q(),t.jsx(se,{variant:"warning",children:t.jsxs("div",{className:"flex flex-col items-start gap-3",children:[t.jsx("span",{children:n(Pn)}),t.jsxs(P,{variant:"secondary",onClick:e,children:[t.jsx(Fa,{"aria-hidden":"true"}),n("ui.settings.speech.speech_section.try_again")]})]})}));function nl(e){return e==="enabled"?"ready":e==="below-version"?"older":"pairing"}const sl=({sectionRef:e})=>{q();const s=_n(),a=yn(),i=Ts(s.data,"tts"),o=nl(i),r=Ne({queryKey:Ds.all,queryFn:()=>we({op:"settings.list"}),enabled:o==="ready",staleTime:1e4}),d=Yc(o==="ready"),{hasRadientApiKey:_,hasRadientSession:l,speechBlock:g}=Is(),h=`${l}:${_}`,x=c.useRef(h),f=d.refetch;c.useEffect(()=>{x.current!==h&&(x.current=h,f())},[h,f]);const m=r.data,y=c.useMemo(()=>sn(m?.settings??[]),[m]),[E,M]=c.useState({}),[V,S]=c.useState({}),[K,H]=c.useState({});c.useEffect(()=>{m&&M(p=>{let D=!1;const j={...p};for(const T of sn(m.settings).rows){const G=p[T.key];if(G&&G.value!==Ue(T).value)continue;const X=Ue(T);G&&G.value===X.value&&G.cascadeBase===X.cascadeBase||(j[T.key]=X,D=!0)}return D?j:p})},[m]);const A=(p,D)=>S(j=>({...j,[p]:D})),C=(p,D)=>H(j=>({...j,[p]:D})),W=async p=>{const D=E[p.key];if(!D)return;const j=Fs(p,D);if(!j.ok){C(p.key,j.error);return}A(p.key,!0),C(p.key,null);try{await we(j.request),A(p.key,!1);const G=(await r.refetch()).data?.settings.find(X=>X.key===p.key);G&&M(X=>{const ee=X[p.key];return ee&&ee.value===D.value&&ee.cascadeBase===D.cascadeBase?{...X,[p.key]:Ue(G)}:X})}catch(T){A(p.key,!1),C(p.key,T instanceof Error?T.message:n("ui.settings.speech.speech_section.the_setting_could_not_be_saved"))}},Z=async p=>{A(p.key,!0),C(p.key,null);try{await we({op:"settings.reset",key:p.key}),M(D=>({...D,[p.key]:Ue({...p,value:p.default,is_default:!0})})),A(p.key,!1),await r.refetch()}catch(D){A(p.key,!1),C(p.key,D instanceof Error?D.message:n("ui.settings.speech.speech_section.the_setting_could_not_be_reset"))}},J=c.useMemo(()=>Wc(d.data),[d.data]),O=J?Xc(J):null,ae=d.isSuccess&&J===null,z=(s.data?null:s.error)??null,I=r.error,Y=n("ui.settings.speech.speech_section.speech_voicing"),L=n("ui.settings.speech.speech_section.how_the_assistant_sounds_when_it_speaks_aloud");if(o==="pairing"){const{sentence:p}=vt(a??null,n("ui.settings.speech.speech_section.speech_settings_could_not_be_loaded"),z);return t.jsx(ne,{title:Y,icon:Ge,description:L,sectionRef:e,children:t.jsx(se,{variant:"warning",children:p})})}if(o==="older")return t.jsx(ne,{title:Y,icon:Ge,description:L,sectionRef:e,children:t.jsx(se,{variant:"warning",children:n(el)})});if(I||!m){const{sentence:p,remedy:D}=vt(a??null,n("ui.settings.speech.speech_section.speech_settings_could_not_be_loaded"),I);return t.jsx(ne,{title:Y,icon:Ge,description:L,sectionRef:e,children:t.jsx(se,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:p}),D&&t.jsx(P,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>{r.refetch()},children:n("ui.settings.speech.speech_section.retry")})]})})})}const $=O?!O.servable:g==="offline",de=O?O.rungs.find(p=>p.path===O.serving)??null:null;return t.jsx(ne,{title:Y,icon:Ge,description:L,sectionRef:e,children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("section",{className:"flex flex-col gap-3",children:[d.isPending&&t.jsxs("p",{className:"flex items-center gap-2 text-body-sm text-ink-muted",children:[t.jsx(le,{}),zt("checking")]}),(d.isError||ae)&&!O&&g!=="offline"&&t.jsx(se,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("span",{children:[n(Pn)," ",d.error instanceof Error?d.error.message:""]}),t.jsx(P,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>{d.refetch()},children:n("ui.settings.speech.speech_section.retry")})]})}),t.jsx(La,{fallbackRender:tl,resetKeys:[d.dataUpdatedAt],children:O&&t.jsxs(t.Fragment,{children:[t.jsxs(nt,{children:[t.jsx(re,{label:n("ui.settings.speech.speech_section.speaks_through"),value:O.serving?Un(O.serving):n("ui.settings.speech.speech_section.nothing_yet")}),t.jsx(re,{label:n("ui.settings.speech.speech_section.availability"),value:O.servable?n("ui.settings.speech.speech_section.ready"):n("ui.settings.speech.speech_section.no_provider")})]}),O.reason&&O.reason!==de?.reason&&t.jsx("p",{className:"text-body-sm text-ink-muted",children:O.reason}),t.jsx("ul",{className:"flex flex-col gap-1",children:O.rungs.map(p=>t.jsxs("li",{className:"flex flex-col gap-0.5 text-body-sm",children:[t.jsxs("span",{className:p.path===O.serving?"text-ink":"text-ink-muted",children:[p.name,t.jsxs("span",{className:p.path===O.serving?"text-ink-muted":"text-ink-dim",children:[" ",p.available?n("ui.settings.speech.speech_section.available"):n("ui.settings.speech.speech_section.not_available")]})]}),t.jsx("span",{className:"text-meta text-ink-dim",children:p.reason})]},p.path))})]})})]}),$&&t.jsx(se,{variant:"warning",children:zt(g)}),t.jsx("div",{className:"flex flex-col gap-1",children:y.rows.map(p=>t.jsx(Os,{setting:p,draft:E[p.key]??Ue(p),tier:Ls(p),saving:!!V[p.key],error:K[p.key]??null,onDraftChange:D=>M(j=>({...j,[p.key]:D})),onSave:()=>{W(p)},onReset:()=>{Z(p)}},p.key))}),y.missing.length>0&&t.jsx("p",{className:"text-meta text-ink-dim",children:n("ui.settings.speech.speech_section.missing_voice_rows",{count:y.missing.length,rows:y.missing.join(", ")})})]})})},al=()=>{q();const{data:e,isLoading:s,error:a,refetch:i}=tr(),o=nr(),[r,d]=c.useState(""),[_,l]=c.useState(!1);c.useEffect(()=>{d(e?.content??""),l(!1)},[e]);const g=y=>{const E=y.target.value;d(E),l(E!==(e?.content??""))},h=async()=>{if(!(!_||o.isPending))try{const y={content:r};await o.mutateAsync(y),await i(),l(!1)}catch(y){console.error("Error updating system prompt:",y)}},x=()=>{d(e?.content??""),l(!1)},f=o.isPending,m=()=>t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(xe,{htmlFor:"app-system-prompt",children:n("ui.settings.model.system_prompt.instructions")}),t.jsx(bn,{id:"app-system-prompt",name:"systemPrompt",value:r,onChange:g,placeholder:n("ui.settings.model.system_prompt.enter_instructions_for_how_all_agents_should_behave_and_respond_t"),className:"min-h-50"})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsxs(P,{variant:"primary",onClick:h,disabled:!_||f,children:[f?t.jsx(le,{size:"sm"}):t.jsx(ia,{}),f?n("ui.settings.model.system_prompt.saving"):n("ui.settings.model.system_prompt.save_changes")]}),t.jsx(P,{onClick:x,disabled:!_||f,children:n("ui.settings.model.system_prompt.cancel")})]}),e?.last_modified&&t.jsxs("p",{className:"text-ink-dim text-meta",children:[n("ui.settings.model.system_prompt.last_modified")," ",t.jsx("span",{className:"font-mono text-mono-sm",children:xn(e.last_modified)})]})]});return t.jsx(ne,{title:n("ui.settings.model.system_prompt.system_prompt"),icon:Pa,description:n("ui.settings.model.system_prompt.every_local_operator_agent_receives_this_prompt_in_addition_to_it"),children:s?t.jsx("div",{className:"flex min-h-50 items-center justify-center",children:t.jsx(le,{size:"lg",label:n("ui.settings.model.system_prompt.loading_system_prompt")})}):a?t.jsx(se,{variant:"danger",children:n("ui.settings.model.system_prompt.load_failed",{reason:a instanceof Error?a.message:n("ui.settings.model.system_prompt.unknown_error")})}):m()})},il=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"],ol=e=>il.includes(e),rl=e=>{const s=[];let a=0;for(const i of e){const o=Math.max(0,Math.floor(i.count)),r=Math.max(1,Math.floor(i.columns));for(let d=0;d<o;d+=r)s.push({start:a+d,count:Math.min(r,o-d)});a+=o}return s},cl=({index:e,key:s,groups:a})=>{const i=rl(a),o=i.reduce((r,d)=>r+d.count,0);if(!Number.isInteger(e)||e<0||e>=o)return e;switch(s){case"Home":return 0;case"End":return o-1;case"ArrowLeft":return Math.max(0,e-1);case"ArrowRight":return Math.min(o-1,e+1);case"ArrowUp":case"ArrowDown":{const r=i.findIndex(l=>e>=l.start&&e<l.start+l.count),d=i[r+(s==="ArrowDown"?1:-1)];if(!d)return e;const _=e-i[r].start;return d.start+Math.min(_,d.count-1)}default:return e}},ll={localOperatorDark:uo,localOperatorLight:Ro,dracula:wo,dune:zi,sage:no,monokai:ca,tokyoNight:po,iceberg:No,radient:Qi,neon:zs,obsidian:jn,synth:Wa,catppuccinMocha:wi,catppuccinLatte:oo,tokyoNightStorm:pi,gruvbox:ii,nord:Xo,oneDark:Za,solarizedDark:Ao,rosePine:$i,rosePineMoon:co,rosePineDawn:vi,alucard:Hi,gruvboxLight:Ei,tokyoNightDay:_o,oneLight:ao,catppuccinFrappe:Ci,catppuccinMacchiato:Ji,palenight:ra,everforest:Vo,everforestLight:Bo,kanagawaWave:Zo,kanagawaLotus:Pi,ayuDark:Ti,ayuMirage:Oi,ayuLight:xo,nightfox:fi,duskfox:Lo,synthwave:fo,matrix:Xa,tron:_i,cyberpunk:oa,vaporwave:Ko,outrun:si,neonNoir:qo,arcade:eo,forest:Uo,ocean:Fi,desert:Do,autumn:Wo,lavender:Mo,arctic:xi,rosewood:Yi,solarizedLight:Io,githubLight:Gi,paper:Ka,linen:vo,highContrastLight:qa,mintLight:ti},on="bg-[color-mix(in_srgb,var(--color-accent)_8%,var(--color-accent-wash))]",dl=({id:e})=>t.jsxs("div",{"data-theme":e,"aria-hidden":"true",className:"flex h-full bg-canvas",children:[t.jsxs("div",{className:"flex w-1/4 flex-col gap-1 bg-sunken p-1",children:[t.jsx("span",{className:"flex h-2.5 items-center rounded-xs bg-accent-wash px-1",children:t.jsx("span",{className:"h-1 w-full rounded-xs bg-accent"})}),t.jsx("span",{className:"mx-1 h-1 w-2/3 rounded-xs bg-ink-dim"}),t.jsx("span",{className:"mx-1 h-1 w-1/2 rounded-xs bg-ink-dim"})]}),t.jsxs("div",{className:"flex flex-1 flex-col justify-between p-1",children:[t.jsxs("div",{className:"flex flex-col gap-1 rounded-xs bg-surface p-1",children:[t.jsx("span",{className:"h-1 w-3/5 rounded-xs bg-ink"}),t.jsx("span",{className:"h-1 w-full rounded-xs bg-ink-dim"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"h-2.5 w-6 rounded-xs bg-elevated"}),t.jsx("span",{className:"h-2.5 w-5 rounded-xs bg-accent"}),t.jsx("span",{className:"h-2.5 w-4 rounded-xs bg-accent-alt"}),t.jsx("span",{className:"h-2.5 w-4 rounded-xs border border-control"})]})]})]}),ul=({id:e,name:s,description:a,isSelected:i,isTabStop:o,onSelect:r,onFocusTile:d})=>{const _=ll[e];return t.jsx($e,{side:"bottom",align:"start",content:a,children:t.jsxs("button",{type:"button","data-theme-tile":e,"aria-pressed":i,tabIndex:o?0:-1,onFocus:d,onClick:r,className:ce("relative flex flex-col gap-1.5 rounded-md p-1 text-left transition-colors duration-fast ease-out-quart",i?on:"hover:bg-surface"),children:[t.jsxs("span",{className:ce("relative block h-10 overflow-hidden rounded-sm border transition-colors duration-fast ease-out-quart",i?"border-accent":"border-hairline"),children:[t.jsx(dl,{id:e}),i&&t.jsx("span",{className:ce("pointer-events-none absolute top-0.5 right-0.5 flex h-4 w-4 items-center justify-center rounded-full",on),children:t.jsx(za,{size:12,className:"text-accent","aria-hidden":"true"})})]}),t.jsxs("span",{className:"flex items-center gap-1.5",children:[t.jsx(_,{size:12,className:"shrink-0 text-ink-dim","aria-hidden":"true"}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-meta text-ink",children:s})]})]})})},gl=e=>[...e.querySelectorAll("[data-theme-grid]")].map(s=>{const a=[...s.querySelectorAll("[data-theme-tile]")],i=a[0]?.getBoundingClientRect().top??0;return{count:a.length,columns:Math.max(1,a.filter(o=>Math.abs(o.getBoundingClientRect().top-i)<1).length)}}),_l=()=>{q();const{themeName:e,setTheme:s}=je(),a=Object.values(Hn),i=[{label:n("ui.settings.appearance.theme_selector.dark"),items:a.filter(l=>l.theme.palette.mode==="dark")},{label:n("ui.settings.appearance.theme_selector.light"),items:a.filter(l=>l.theme.palette.mode==="light")}].filter(l=>l.items.length>0),[o,r]=c.useState(null),d=c.useMemo(()=>{const l=i.flatMap(g=>g.items.map(h=>h.id));return o&&l.includes(o)?o:l.includes(e)?e:l[0]},[i,o,e]),_=l=>{if(!ol(l.key))return;const g=[...l.currentTarget.querySelectorAll("[data-theme-tile]")],h=g.indexOf(l.target);if(h<0)return;l.preventDefault();const x=cl({index:h,key:l.key,groups:gl(l.currentTarget)});x!==h&&g[x]?.focus()};return t.jsx(Da,{children:t.jsx("div",{onKeyDown:_,className:"flex flex-col gap-6",children:i.map(l=>t.jsxs("div",{children:[t.jsx("h3",{className:"px-1 pb-2 text-meta text-ink-dim",children:l.label}),t.jsx("div",{"data-theme-grid":l.label,className:"grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-2",children:l.items.map(({id:g,name:h,description:x})=>t.jsx(ul,{id:g,name:h,description:x,isSelected:g===e,isTabStop:g===d,onSelect:()=>s(g),onFocusTile:()=>r(g)},g))})]},l.label))})})},ml=({value:e,onChange:s})=>{q();const a=c.useId();return t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("span",{id:a,className:"flex min-h-6 items-center text-body text-ink",children:n("ui.settings.appearance.transcript_display_mode_setting.transcript_display")}),t.jsx("p",{className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:n("ui.settings.appearance.transcript_display_mode_setting.by_turn_condenses_each_turn_to_its_answer_by_response_keeps_every")})]}),t.jsx("div",{className:"flex h-6 shrink-0 items-center",children:t.jsx(Xe,{value:e,onValueChange:i=>s(kn(i)),children:t.jsx(et,{"aria-labelledby":a,children:Js.map(i=>t.jsx(Le,{value:i.value,children:i.value==="by-turn"?n("ui.settings.appearance.transcript_display_mode_setting.by_turn"):n("ui.settings.appearance.transcript_display_mode_setting.by_response")},i.value))})})})]})},pl=()=>{q();const{data:e,isLoading:s,error:a}=or({enabled:!0});return t.jsxs("div",{children:[t.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-heading text-ink",children:[t.jsx(Si,{size:16,className:"shrink-0 text-ink-dim"}),n("ui.settings.account.settings_page.radient_pass")]}),s&&t.jsx(wn,{className:"h-6 w-36"}),a&&t.jsx(se,{variant:"warning",children:n("ui.settings.account.settings_page.credit_balance_load_failed",{reason:a.message})}),e&&!s&&!a&&t.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[t.jsxs("p",{className:"flex-1 text-body-sm text-ink-muted",children:[n("ui.settings.account.settings_page.available_credits")," ",t.jsx("span",{className:"font-medium text-ink",children:e.balance.toFixed(2)})]}),t.jsx(P,{variant:"secondary",size:"sm",asChild:!0,children:t.jsxs("a",{href:"https://console.radienthq.com/dashboard/billing",target:"_blank",rel:"noopener noreferrer",children:[t.jsx(ui,{}),n("ui.settings.account.settings_page.add_credits")]})})]})]})},hl=[{id:"credits",get label(){return n("ui.settings.account.settings_page.credits")}},{id:"tokens",get label(){return n("ui.settings.account.settings_page.tokens")}}],fl=()=>{q();const[e,s]=c.useState("credits"),a=c.useMemo(()=>{const _=new Date,l=sr(_);return{start_date:Ht(l),end_date:Ht(_),rollup:"daily"}},[]),{data:i,isLoading:o,error:r}=cr(a,{enabled:!0}),d=c.useMemo(()=>i?.data_points?[...i.data_points].sort((l,g)=>dt(l.timestamp).getTime()-dt(g.timestamp).getTime()).map(l=>({bucket:Gs(Ha(dt(l.timestamp),"yyyy-MM-dd")),value:e==="credits"?Number.parseFloat(l.total_cost.toFixed(2)):l.total_tokens})):[],[i,e]);return t.jsxs("div",{children:[t.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[t.jsxs("h3",{className:"flex items-center gap-2 text-heading text-ink",children:[t.jsx(ri,{size:16,className:"shrink-0 text-ink-dim"}),n("ui.settings.account.settings_page.usage_last_30_days")]}),t.jsxs("fieldset",{className:"m-0 w-fit border-0 p-0",children:[t.jsx("legend",{className:"sr-only",children:n("ui.settings.account.settings_page.usage_metric")}),t.jsx("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:hl.map(({id:_,label:l})=>t.jsx(P,{variant:"ghost",size:"sm","aria-pressed":e===_,onClick:()=>s(_),className:ce(e===_&&"bg-surface text-ink hover:bg-surface"),children:l},_))})]})]}),o&&t.jsx(wn,{className:"h-62 w-full"}),r&&t.jsx(se,{variant:"warning",children:n("ui.settings.account.settings_page.usage_load_failed",{reason:r.message})}),!o&&!r&&i&&d.length>0&&t.jsx(Gc,{metric:e,data:d}),!o&&!r&&(!i||d.length===0)&&t.jsx("p",{className:"text-body-sm text-ink-muted",children:n("ui.settings.account.settings_page.no_usage_recorded_in_the_last_30_days")})]})},yl=()=>(q(),t.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[t.jsx(ka,{size:16,className:"shrink-0 text-ink-dim"}),n("ui.settings.account.settings_page.radient_account")]}),t.jsx(P,{variant:"secondary",size:"sm",className:"self-start sm:self-center",asChild:!0,children:t.jsxs("a",{href:"https://console.radienthq.com",target:"_blank",rel:"noopener noreferrer",children:[n("ui.settings.account.settings_page.go_to_radient_console"),t.jsx(qs,{})]})})]})),Tl=()=>{q();const e=Us("surface"),s=la(),a=je(b=>b.showAgentReasoning),i=je(b=>b.setShowAgentReasoning),o=je(b=>b.transcriptDisplayMode),r=je(b=>b.setTranscriptDisplayMode),{data:d,isLoading:_,isFetching:l,error:g,refetch:h}=Ps(),x=yn(),{sentence:f,remedy:m}=vt(x??null,n("ui.settings.navigation.settings_page.your_settings_could_not_be_loaded"),g),y=da(),[E,M]=c.useState(null),V=pn(),{isAuthenticated:S,accountRead:K,isFetching:H,isRefreshing:A,refreshUser:C}=St(),W=Ze(b=>b.activeSessionId),[Z,J]=c.useState("general"),[O,ae]=c.useState(!1),z=c.useRef(null),I=c.useRef(null),{startTour:Y}=ua(),L=Ks(),{data:$,refetch:de}=$s(),{refreshModels:p}=Bs(),D=c.useMemo(()=>$?.keys?[...$.keys].sort():[],[$?.keys]),j=c.useRef({keys:"",hosting:void 0});c.useEffect(()=>{const b=D.join(","),U=d?.values?.hosting;(j.current.keys!==b||j.current.hosting!==U)&&(j.current={keys:b,hosting:U},p().catch(Q=>{console.error("Failed to refresh models after credentials or hosting change:",Q)}))},[D,d?.values?.hosting,p]);const T=c.useRef({general:c.useRef(null),radient:c.useRef(null),integrations:c.useRef(null),appearance:c.useRef(null),speech:c.useRef(null),keyboard:c.useRef(null),providers:c.useRef(null),backend:c.useRef(null),updates:c.useRef(null)}).current,G=c.useMemo(()=>new URLSearchParams(L.search).get("setting"),[L.search]),X=c.useMemo(()=>new URLSearchParams(L.search).get("filter")??"",[L.search]),ee=c.useMemo(()=>new URLSearchParams(L.search).get("mcp")??void 0,[L.search]),ie=c.useMemo(()=>new URLSearchParams(L.search).get("provider"),[L.search]),ue=c.useCallback(b=>{J(b),ae(!0);const U=T[b],Q=I.current;if(U?.current&&Q){const ye=U.current.getBoundingClientRect().top-Q.getBoundingClientRect().top;Q.scrollHeight>Q.clientHeight?Q.scrollTo({top:Math.max(0,Q.scrollTop+ye-80),behavior:"smooth"}):window.scrollTo({top:Math.max(0,U.current.getBoundingClientRect().top+window.scrollY-80),behavior:"smooth"}),clearTimeout(z.current??void 0),z.current=setTimeout(()=>{ae(!1),z.current=null},800)}else ae(!1)},[T]);c.useEffect(()=>{const b=setTimeout(()=>{const U=I.current;if(!U)return;const Q=()=>{if(O)return;const te=U.getBoundingClientRect(),ye=te.height;let oe="",ke=0;for(const[me,ge]of Object.entries(T))if(ge.current){const pe=ge.current.getBoundingClientRect(),he=te.top,Me=pe.top-he,ve=pe.bottom-he,it=pe.height,ot=Math.max(0,Me),rt=Math.min(ye,ve),De=Math.max(0,rt-ot)/it,ze=De+(Me<ye*.3?.1:0);ze>ke&&De>.1&&(ke=ze,oe=me)}oe&&oe!==Z&&J(oe)};return Q(),U.addEventListener("scroll",Q,{passive:!0}),()=>{U.removeEventListener("scroll",Q),clearTimeout(z.current??void 0)}},100);return()=>clearTimeout(b)},[T,Z,O]),c.useEffect(()=>{const b=new URLSearchParams(L.search),U=b.get("section"),Q=b.get("setting"),te=Q?Hs(Q,"backend"):U,ye=te?T[te]:void 0;if(!te||!ye)return;let oe=!1,ke=Number.NaN,me=0;const ge=window.setTimeout(()=>{oe||(oe=!0,he.disconnect(),ue(te))},2e3),pe=()=>{if(oe)return;const Me=ye.current;if(!Me){me=requestAnimationFrame(pe);return}const ve=Math.round(Me.getBoundingClientRect().top+window.scrollY);if(ve===ke&&ve>0){oe=!0,he.disconnect(),window.clearTimeout(ge),ue(te);return}ke=ve,me=requestAnimationFrame(pe)},he=new ResizeObserver(()=>{oe||(cancelAnimationFrame(me),me=requestAnimationFrame(pe))});return I.current&&he.observe(I.current),me=requestAnimationFrame(pe),()=>{oe=!0,cancelAnimationFrame(me),he.disconnect(),window.clearTimeout(ge)}},[L.search,T,ue]);const Se=async(b,U)=>{M(b);try{await y.mutateAsync({[b]:U}),await h()}catch(Q){console.error(`Error updating ${b}:`,Q)}finally{M(null)}},_e=_,Ie=K==="checking",v=fn(K),R=K==="ready"||K==="checking"||H,F=vn(_e,4e3);return g?t.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:t.jsx(se,{variant:"warning",className:"w-full max-w-xl",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:f}),m&&t.jsx(P,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>void h(),disabled:l,children:l?n("ui.settings.navigation.settings_page.retrying"):n("ui.settings.navigation.settings_page.retry")})]})})}):_e?t.jsxs("div",{role:"status",className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-canvas",children:[t.jsx(le,{size:"lg",label:F?void 0:n("ui.settings.navigation.settings_page.loading_settings")}),F&&t.jsx("p",{className:"max-w-sm text-center text-body-sm text-ink-muted",children:n("ui.settings.navigation.settings_page.the_local_operator_server_is_taking_longer_than_usual_to_answer_i")})]}):d?t.jsxs("div",{"data-glass-region":"canvas","data-glass-split":"",className:"flex h-full w-full overflow-hidden bg-canvas",children:[t.jsx("div",{ref:e,className:"w-12 shrink-0 overflow-y-auto min-[1040px]:w-55",children:t.jsx(ga,{activeSection:Z,onSelectSection:ue,sections:_a})}),t.jsx("div",{ref:I,"data-settings-content":!0,"data-glass-region":"canvas-content","data-tour-tag":"settings-general-section",className:"flex-1 overflow-y-auto overflow-x-hidden p-4 sm:p-6 md:p-8",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[t.jsx(va,{title:n("ui.settings.page.title"),icon:Pt}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{ref:T.general,className:"flex flex-col gap-8",children:[t.jsx(ma,{focus:G===Ot}),t.jsxs(ne,{title:n("ui.settings.profile.title"),icon:pa,description:n(S?"ui.settings.profile.description_authenticated":"ui.settings.profile.description_anonymous"),children:[Ie&&t.jsx("p",{className:"text-meta text-ink-dim",children:n("ui.settings.profile.account_checking")}),v&&t.jsx(se,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:n(K==="refused"?"ui.settings.profile.account_read_failed_refused":"ui.settings.profile.account_read_failed_retry")}),t.jsx(P,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>C(),disabled:A,children:A?n("ui.settings.profile.retrying"):n("ui.settings.profile.retry")})]})}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(Kt,{value:V.profile.name,label:n("ui.settings.profile.display_name.label"),placeholder:n("ui.settings.profile.display_name.placeholder"),isSaving:E==="user_name",onSave:async b=>{M("user_name");try{V.updateName(b)}finally{M(null)}},readOnly:R}),t.jsx(Kt,{value:V.profile.email,label:n("ui.settings.profile.email.label"),placeholder:n("ui.settings.profile.email.placeholder"),isSaving:E==="user_email",onSave:async b=>{M("user_email");try{V.updateEmail(b)}finally{M(null)}},readOnly:R})]})]}),t.jsx(ne,{title:n("ui.settings.tour.title"),description:n("ui.settings.tour.description"),children:t.jsxs(P,{variant:"secondary",onClick:()=>{Y({forceModalCompleted:!0})},children:[t.jsx(li,{}),n("ui.settings.tour.action")]})}),t.jsx(ne,{id:"model-settings",title:n("ui.settings.model.settings_page.model_settings"),icon:ha,description:n("ui.settings.model.settings_page.configure_the_default_ai_model_and_hosting_providers_used_for_gen"),children:t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(fa,{value:d.values.hosting,isSaving:E==="hosting",onSave:b=>Se("hosting",b),filterByCredentials:!0,allowCustom:!0,allowDefault:!1,emptyHelperText:n("ui.settings.model.settings_page.no_hosting_options")}),t.jsx(ya,{value:d.values.model_name,hostingId:d.values.hosting,isSaving:E==="model_name",onSave:b=>Se("model_name",b),allowCustom:!0,allowDefault:!1}),t.jsx(se,{variant:"neutral",icon:t.jsx(tt,{className:"size-4","aria-hidden":"true"}),children:n("ui.settings.model.settings_page.you_need_a_radient_account_or_your_own_api_keys_to_reach_cloud_pr")})]})}),t.jsx(al,{}),t.jsx(ne,{title:n("ui.settings.configuration.settings_page.configuration_information"),icon:tt,description:n("ui.settings.configuration.settings_page.system_information_about_the_current_configuration"),children:t.jsxs(nt,{children:[t.jsx(re,{label:n("ui.settings.configuration.settings_page.version"),value:t.jsx("span",{className:"text-mono-sm",children:d.version})}),t.jsx(re,{label:n("ui.settings.configuration.settings_page.created"),value:hn(d.metadata.created_at)}),t.jsx(re,{label:n("ui.settings.configuration.settings_page.last_modified"),value:xn(d.metadata.last_modified)}),t.jsx(re,{label:n("ui.settings.configuration.settings_page.description"),value:d.metadata.description||n("ui.settings.configuration.settings_page.no_description_available")})]})})]}),t.jsx(ne,{title:n("ui.settings.appearance.settings_page.appearance"),icon:jn,description:n("ui.settings.appearance.settings_page.customize_the_look_and_feel_of_local_operator"),sectionRef:T.appearance,dataTourTag:"settings-appearance-section",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(_l,{}),t.jsx(Nn,{value:a,label:n("ui.settings.appearance.settings_page.show_agent_reasoning"),description:n("ui.settings.appearance.settings_page.adds_the_agent_s_reasoning_and_thinking_rows_to_conversations_the"),onChange:async b=>i(b)}),t.jsx(ml,{value:kn(o),onChange:b=>r(b)}),t.jsx(gr,{state:s.state,onChange:s.set})]})}),t.jsx(sl,{sectionRef:T.speech}),t.jsx(xr,{sectionRef:T.keyboard}),t.jsx(ne,{title:n("ui.settings.model.settings_page.model_providers"),icon:mn,description:n("ui.settings.navigation.settings_page.sign_in_to_the_services_your_agents_think_with_new_chats_use_your"),sectionRef:T.providers,children:t.jsx(xa,{initialProviderId:ie,onChangeModel:()=>ue("general")})}),t.jsx(Kc,{sessionId:W??void 0,sectionRef:T.integrations,highlightServer:ee}),t.jsx(ne,{title:n("ui.settings.account.settings_page.radient_account"),titleComponent:t.jsx(yl,{}),description:n("ui.settings.account.settings_page.your_radient_account_radient_pass_details_and_credits_to_use_radi"),sectionRef:T.radient,dataTourTag:"settings-radient-account-section",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsx(Vc,{onAfterCredentialUpdate:()=>{p(),de()}}),S&&t.jsxs(t.Fragment,{children:[t.jsx(pl,{}),t.jsx(fl,{})]})]})}),t.jsx(ne,{title:n("ui.settings.navigation.settings_page.backend_settings"),icon:Pt,description:n("ui.settings.navigation.settings_page.every_setting_the_backend_registry_owns_searchable_with_typed_edi"),sectionRef:T.backend,children:t.jsx(Vs,{hideInterfaceLanguage:!0,focusKey:G===Ot?null:G,initialFilter:X})}),t.jsx("div",{ref:T.updates,children:t.jsx(hr,{})})]})]})})]}):t.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:t.jsx(se,{variant:"warning",className:"w-full max-w-xl",children:n("ui.settings.navigation.settings_page.your_settings_could_not_be_loaded")})})};export{Tl as SettingsPage};
|