@kaitranntt/ccs 7.49.1-dev.2 → 7.50.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/api/services/index.d.ts +2 -2
- package/dist/api/services/index.d.ts.map +1 -1
- package/dist/api/services/index.js +2 -1
- package/dist/api/services/index.js.map +1 -1
- package/dist/api/services/profile-reader.d.ts.map +1 -1
- package/dist/api/services/profile-reader.js +13 -0
- package/dist/api/services/profile-reader.js.map +1 -1
- package/dist/api/services/profile-types.d.ts +9 -0
- package/dist/api/services/profile-types.d.ts.map +1 -1
- package/dist/api/services/profile-writer.d.ts +8 -2
- package/dist/api/services/profile-writer.d.ts.map +1 -1
- package/dist/api/services/profile-writer.js +68 -6
- package/dist/api/services/profile-writer.js.map +1 -1
- package/dist/auth/profile-detector.d.ts.map +1 -1
- package/dist/auth/profile-detector.js +7 -0
- package/dist/auth/profile-detector.js.map +1 -1
- package/dist/ccs.js +100 -2
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/services/variant-config-adapter.d.ts +4 -35
- package/dist/cliproxy/services/variant-config-adapter.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-config-adapter.js +11 -34
- package/dist/cliproxy/services/variant-config-adapter.js.map +1 -1
- package/dist/cliproxy/services/variant-service.d.ts +5 -1
- package/dist/cliproxy/services/variant-service.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-service.js +19 -9
- package/dist/cliproxy/services/variant-service.js.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.d.ts.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.js +14 -2
- package/dist/cliproxy/sync/profile-mapper.js.map +1 -1
- package/dist/commands/api-command.d.ts +2 -0
- package/dist/commands/api-command.d.ts.map +1 -1
- package/dist/commands/api-command.js +45 -10
- package/dist/commands/api-command.js.map +1 -1
- package/dist/commands/cliproxy/auth-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/auth-subcommand.js +5 -2
- package/dist/commands/cliproxy/auth-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.js +1 -0
- package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/variant-subcommand.d.ts +15 -0
- package/dist/commands/cliproxy/variant-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/variant-subcommand.js +144 -15
- package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
- package/dist/commands/help-command.d.ts.map +1 -1
- package/dist/commands/help-command.js +9 -1
- package/dist/commands/help-command.js.map +1 -1
- package/dist/targets/droid-adapter.d.ts +1 -3
- package/dist/targets/droid-adapter.d.ts.map +1 -1
- package/dist/targets/droid-adapter.js +4 -6
- package/dist/targets/droid-adapter.js.map +1 -1
- package/dist/targets/droid-config-manager.js +3 -3
- package/dist/targets/droid-config-manager.js.map +1 -1
- package/dist/targets/target-resolver.d.ts.map +1 -1
- package/dist/targets/target-resolver.js +6 -3
- package/dist/targets/target-resolver.js.map +1 -1
- package/dist/types/config.d.ts +5 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js.map +1 -1
- package/dist/ui/assets/accounts-BKK-Lc16.js +1 -0
- package/dist/ui/assets/{alert-dialog-YcmZPFim.js → alert-dialog-DmrIcJav.js} +1 -1
- package/dist/ui/assets/api-DzTwRtww.js +1 -0
- package/dist/ui/assets/{auth-section-Amm4rwiS.js → auth-section-CP_2r8oJ.js} +1 -1
- package/dist/ui/assets/{backups-section-DmAsqMfq.js → backups-section-jwtuA5Ay.js} +1 -1
- package/dist/ui/assets/{checkbox-Cfg9kbJX.js → checkbox-CNqHZx7Z.js} +1 -1
- package/dist/ui/assets/cliproxy-CtO9BwgG.js +3 -0
- package/dist/ui/assets/cliproxy-control-panel--WUVyBIk.js +1 -0
- package/dist/ui/assets/{confirm-dialog-CRcV2Yc4.js → confirm-dialog-CQNxkz9X.js} +1 -1
- package/dist/ui/assets/{copilot-EarFqUyJ.js → copilot-DLxxmnsW.js} +2 -2
- package/dist/ui/assets/{cursor-Dbe4Wtw2.js → cursor-YRIza7sP.js} +1 -1
- package/dist/ui/assets/{form-utils-C-pVd1--.js → form-utils-Cn_Uld6y.js} +1 -1
- package/dist/ui/assets/{globalenv-section-CBp73q9k.js → globalenv-section-vUSIK5rf.js} +1 -1
- package/dist/ui/assets/{health-Cvr359ff.js → health-BWPd6F4h.js} +1 -1
- package/dist/ui/assets/icons-Dk2sL3Mr.js +1 -0
- package/dist/ui/assets/index-B9dJZNls.js +1 -0
- package/dist/ui/assets/index-BZdHAol5.js +1 -0
- package/dist/ui/assets/{index-DTDftvd-.js → index-BlldLmNl.js} +1 -1
- package/dist/ui/assets/{index-Cp8K9_TQ.js → index-D244tv89.js} +1 -1
- package/dist/ui/assets/index-DEDy1J8t.css +1 -0
- package/dist/ui/assets/index-PWMOllOf.js +47 -0
- package/dist/ui/assets/proxy-status-widget-MlyNgoPh.js +1 -0
- package/dist/ui/assets/{radix-ui-DKgfU5rd.js → radix-ui-DIWAxjEp.js} +1 -1
- package/dist/ui/assets/{separator-CdOKc0gJ.js → separator-OcJLDgYQ.js} +1 -1
- package/dist/ui/assets/{shared-zsUXmES2.js → shared-LxAdbm4g.js} +1 -1
- package/dist/ui/assets/{switch-B2ALi24E.js → switch-s8pp-m8L.js} +1 -1
- package/dist/ui/assets/{tanstack-5ndrQy-j.js → tanstack-Hn82hibe.js} +1 -1
- package/dist/ui/assets/updates-BQRhDVbP.js +1 -0
- package/dist/ui/index.html +6 -6
- package/dist/web-server/routes/profile-routes.d.ts +2 -0
- package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
- package/dist/web-server/routes/profile-routes.js +60 -6
- package/dist/web-server/routes/profile-routes.js.map +1 -1
- package/dist/web-server/routes/variant-routes.d.ts +2 -0
- package/dist/web-server/routes/variant-routes.d.ts.map +1 -1
- package/dist/web-server/routes/variant-routes.js +50 -6
- package/dist/web-server/routes/variant-routes.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/accounts-DIqClJ7z.js +0 -1
- package/dist/ui/assets/api-BWyCgbMh.js +0 -1
- package/dist/ui/assets/cliproxy-B-q7RjS2.js +0 -3
- package/dist/ui/assets/cliproxy-control-panel-BliRTkbb.js +0 -1
- package/dist/ui/assets/icons-DGASzt3M.js +0 -1
- package/dist/ui/assets/index-8n-yIlea.js +0 -47
- package/dist/ui/assets/index-B5aulDs4.js +0 -1
- package/dist/ui/assets/index-BBCDm6dS.css +0 -1
- package/dist/ui/assets/index-CLBNUja8.js +0 -1
- package/dist/ui/assets/proxy-status-widget-C0G0aOCW.js +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-DKgfU5rd.js";import{r}from"./react-vendor-CNOkPC89.js";import{a as ke,u as rs,b as Is}from"./tanstack-5ndrQy-j.js";import{b as T,C as os,a as ls,c as G,P as he,L as Y,I as oe,X as Ce,Y as ye,Z as Se,_ as Ae,$ as le,a0 as cs,a1 as Fs,a2 as Us,a3 as Hs,u as ds,a4 as Pe,a5 as Me,a6 as Te,a7 as Oe,a8 as us,a9 as Qe,aa as Ks,ab as qs,ac as Gs,ad as ms,ae as pe,B as H,af as Be,ag as $s,ah as Qs,ai as Bs,aj as zs,ak as ze,al as Ve,am as Vs,q as xs,m as Ee,an as Js,ao as Ws,ap as Xs,l as Ys,aq as Zs,ar as et,as as st,at as tt,au as at,av as nt,aw as te,T as ae,o as ne,p as ie,ax as it,ay as rt,az as ot,aA as Je,aB as We,aC as lt,aD as ct,aE as dt,aF as ut,aG as mt,aH as xt,aI as pt,H as ht,J as ft,K as Xe,M as Ye,aJ as gt,aK as jt,aL as vt,aM as Nt,aN as wt,aO as bt,aP as kt,aQ as Ct,aR as yt,aS as St,aT as At,S as Pt}from"./index-8n-yIlea.js";import{C as Ne}from"./default-ports-1QQSffYX.js";import{t as U}from"./notifications-B2HqRBj7.js";import{b as ps,L as z,m as ce,y as Mt,j as W,l as hs,an as _e,R as De,n as re,a0 as ue,T as fs,ao as Tt,ap as fe,Z as me,I as gs,f as Ot,a2 as js,aq as Et,ah as _t,X as Re,$ as vs,s as Ns,t as we,ar as Dt,p as Ze,as as Rt,ag as ws,q as Lt,at as es,k as It,a1 as Ft,ak as Ut,au as bs}from"./icons-DGASzt3M.js";import{C as ks}from"./checkbox-Cfg9kbJX.js";import{C as Ht}from"./confirm-dialog-CRcV2Yc4.js";import{S as Le}from"./separator-CdOKc0gJ.js";import{S as Cs}from"./switch-B2ALi24E.js";import{P as Kt}from"./proxy-status-widget-C0G0aOCW.js";import"./utils-CzKF5WmX.js";import"./form-utils-C-pVd1--.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-YcmZPFim.js";const de={agy:{provider:"agy",displayName:"Antigravity",defaultModel:"claude-opus-4-6-thinking",models:[{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",description:"Latest flagship, extended thinking",extendedContext:!1,presetMapping:{default:"claude-opus-4-6-thinking",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6-thinking",haiku:"claude-sonnet-4-6"}},{id:"claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking",description:"Previous flagship, extended thinking",presetMapping:{default:"claude-opus-4-5-thinking",opus:"claude-opus-4-5-thinking",sonnet:"claude-sonnet-4-6-thinking",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-6-thinking",name:"Claude Sonnet 4.6 Thinking",description:"Latest Sonnet with extended thinking",presetMapping:{default:"claude-sonnet-4-6-thinking",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6-thinking",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Latest Sonnet baseline",presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking",description:"Balanced with extended thinking",presetMapping:{default:"claude-sonnet-4-5-thinking",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-5-thinking",haiku:"claude-sonnet-4-5"}},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",description:"Fast and capable",presetMapping:{default:"claude-sonnet-4-5",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-5",haiku:"claude-sonnet-4-5"}},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",description:"Google latest model via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3-pro-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash",description:"Fast Gemini model via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}}]},gemini:{provider:"gemini",displayName:"Gemini",defaultModel:"gemini-2.5-pro",models:[{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",tier:"paid",description:"Latest model, requires paid Google account",extendedContext:!0,presetMapping:{default:"gemini-3-pro-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash",tier:"paid",description:"Fast Gemini 3 model, requires paid Google account",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",description:"Stable, works with free Google account",extendedContext:!0,presetMapping:{default:"gemini-2.5-pro",opus:"gemini-2.5-pro",sonnet:"gemini-2.5-pro",haiku:"gemini-2.5-flash"}}]},codex:{provider:"codex",displayName:"Codex",defaultModel:"gpt-5.3-codex",models:[{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",description:"Supports up to xhigh effort",presetMapping:{default:"gpt-5.3-codex",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-mini"}},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",description:"Previous stable Codex model",presetMapping:{default:"gpt-5.2-codex",opus:"gpt-5.2-codex",sonnet:"gpt-5.2-codex",haiku:"gpt-5-mini"}},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"Fast, capped at high effort (no xhigh)",presetMapping:{default:"gpt-5-mini",opus:"gpt-5.3-codex",sonnet:"gpt-5-mini",haiku:"gpt-5-mini"}},{id:"gpt-5.1-codex-max",name:"Codex Max (5.1)",description:"Legacy most capable Codex model",presetMapping:{default:"gpt-5.1-codex-max",opus:"gpt-5.1-codex-max",sonnet:"gpt-5.1-codex-max",haiku:"gpt-5.1-codex-mini"}},{id:"gpt-5.2",name:"GPT 5.2",description:"Latest GPT model",presetMapping:{default:"gpt-5.2",opus:"gpt-5.2",sonnet:"gpt-5.2",haiku:"gpt-5.2"}},{id:"gpt-5.1-codex-mini",name:"Codex Mini",description:"Fast and efficient Codex model"}]},qwen:{provider:"qwen",displayName:"Qwen",defaultModel:"qwen3-coder-plus",models:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus",description:"Code-focused model (1M context)",presetMapping:{default:"qwen3-coder-plus",opus:"qwen3-max",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-flash"}},{id:"qwen3-max",name:"Qwen3 Max",description:"Flagship model (256K context)",presetMapping:{default:"qwen3-max",opus:"qwen3-max",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-flash"}},{id:"qwen3-max-preview",name:"Qwen3 Max Preview",description:"Preview with thinking support (256K)",presetMapping:{default:"qwen3-max-preview",opus:"qwen3-max-preview",sonnet:"qwen3-max",haiku:"qwen3-coder-flash"}},{id:"qwen3-235b",name:"Qwen3 235B",description:"Large 235B A22B model",presetMapping:{default:"qwen3-235b",opus:"qwen3-max",sonnet:"qwen3-235b",haiku:"qwen3-coder-flash"}},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus",description:"Vision-language multimodal"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash",description:"Fast code generation"},{id:"qwen3-32b",name:"Qwen3 32B",description:"Qwen3 32B model"}]},iflow:{provider:"iflow",displayName:"iFlow",defaultModel:"iflow-default",models:[{id:"iflow-default",name:"iFlow Default",description:"Default iFlow model"}]},kimi:{provider:"kimi",displayName:"Kimi (Moonshot)",defaultModel:"kimi-k2.5",models:[{id:"kimi-k2.5",name:"Kimi K2.5",description:"Latest multimodal model (262K context)",presetMapping:{default:"kimi-k2.5",opus:"kimi-k2.5",sonnet:"kimi-k2-thinking",haiku:"kimi-k2"}},{id:"kimi-k2-thinking",name:"Kimi K2 Thinking",description:"Extended reasoning model",presetMapping:{default:"kimi-k2-thinking",opus:"kimi-k2.5",sonnet:"kimi-k2-thinking",haiku:"kimi-k2"}},{id:"kimi-k2",name:"Kimi K2",description:"Flagship coding model"}]},kiro:{provider:"kiro",displayName:"Kiro (AWS)",defaultModel:"kiro-claude-sonnet-4-5",models:[{id:"kiro-claude-opus-4-5",name:"Kiro Claude Opus 4.5",description:"Claude Opus 4.5 via Kiro (2.2x credit)",presetMapping:{default:"kiro-claude-opus-4-5",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4-5",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4-5",name:"Kiro Claude Sonnet 4.5",description:"Claude Sonnet 4.5 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4-5",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4-5",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4",name:"Kiro Claude Sonnet 4",description:"Claude Sonnet 4 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-haiku-4-5",name:"Kiro Claude Haiku 4.5",description:"Claude Haiku 4.5 via Kiro (0.4x credit)"}]},ghcp:{provider:"ghcp",displayName:"GitHub Copilot (OAuth)",defaultModel:"claude-sonnet-4.5",models:[{id:"claude-opus-4.5",name:"Claude Opus 4.5",description:"Anthropic Claude Opus 4.5 via GitHub Copilot",presetMapping:{default:"claude-opus-4.5",opus:"claude-opus-4.5",sonnet:"claude-sonnet-4.5",haiku:"claude-haiku-4.5"}},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",description:"Anthropic Claude Sonnet 4.5 via GitHub Copilot",presetMapping:{default:"claude-sonnet-4.5",opus:"claude-opus-4.5",sonnet:"claude-sonnet-4.5",haiku:"claude-haiku-4.5"}},{id:"claude-sonnet-4",name:"Claude Sonnet 4",description:"Anthropic Claude Sonnet 4 via GitHub Copilot"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",description:"Anthropic Claude Haiku 4.5 via GitHub Copilot"},{id:"gpt-5.2",name:"GPT-5.2",description:"OpenAI GPT-5.2 via GitHub Copilot",presetMapping:{default:"gpt-5.2",opus:"gpt-5.2",sonnet:"gpt-5.1",haiku:"gpt-5-mini"}},{id:"gpt-5.1",name:"GPT-5.1",description:"OpenAI GPT-5.1 via GitHub Copilot"},{id:"gpt-5",name:"GPT-5",description:"OpenAI GPT-5 via GitHub Copilot"},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"OpenAI GPT-5 Mini via GitHub Copilot"},{id:"gemini-3-pro",name:"Gemini 3 Pro",description:"Google Gemini 3 Pro via GitHub Copilot"}]},claude:{provider:"claude",displayName:"Claude (Anthropic)",defaultModel:"claude-sonnet-4-5-20250929",models:[{id:"claude-opus-4-6",name:"Claude Opus 4.6",description:"Latest flagship model",extendedContext:!0,presetMapping:{default:"claude-opus-4-6",opus:"claude-opus-4-6",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",description:"Most capable Claude model",extendedContext:!0,presetMapping:{default:"claude-opus-4-5-20251101",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",description:"Balanced performance and speed",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-5-20250929",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4",description:"Previous generation Sonnet",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-20250514",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-20250514",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",description:"Fast and efficient"}]}},je="ccs-internal-managed";async function qt(){try{const s=await fetch("/api/settings/auth/tokens/raw");return s.ok?(await s.json())?.apiKey?.value??je:je}catch{return je}}async function be(s,a){const t=de[s];if(!t)return{success:!1};const n=t.models[0],i=n?.presetMapping||{default:t.defaultModel,opus:t.defaultModel,sonnet:t.defaultModel,haiku:t.defaultModel},o=await qt(),d={env:{ANTHROPIC_BASE_URL:`http://127.0.0.1:${Ne}/api/provider/${s}`,ANTHROPIC_AUTH_TOKEN:o,ANTHROPIC_MODEL:i.default,ANTHROPIC_DEFAULT_OPUS_MODEL:i.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:i.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:i.haiku}};try{return{success:(await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:d})})).ok,presetName:n?.name||t.defaultModel}}catch{return{success:!1}}}function Gt({currentProgress:s,allSteps:a}){return e.jsx("div",{className:"flex justify-center gap-1 pt-2",children:a.map((t,n)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${s>=n?"bg-primary":"bg-muted"}`},t))})}function $t({providers:s,onSelect:a}){return e.jsx("div",{className:"grid gap-2",children:s.map(t=>e.jsxs("button",{onClick:()=>a(t.id),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:t.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:t.description})]}),e.jsx(ps,{className:"w-4 h-4 text-muted-foreground"})]},t.id))})}function Qt({selectedProvider:s,providers:a,authCommand:t,isRefreshing:n,isPending:i,onBack:o,onStartAuth:c,onRefresh:d}){const[g,f]=r.useState(!1),m=async w=>{await navigator.clipboard.writeText(w),f(!0),setTimeout(()=>f(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Authenticate with ",a.find(w=>w.id===s)?.name," to add an account"]}),e.jsx(T,{onClick:c,disabled:i,className:"w-full gap-2",size:"lg",children:i?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"w-4 h-4 animate-spin"}),"Authenticating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4"}),"Authenticate in Browser"]})}),i&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Complete the OAuth flow in your browser..."})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or use terminal"})})]}),e.jsx(os,{children:e.jsxs(ls,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Mt,{className:"w-4 h-4"}),"Run this command in your terminal:"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 px-3 py-2 bg-muted rounded-md font-mono text-sm",children:t}),e.jsx(T,{variant:"outline",size:"icon",onClick:()=>m(t),children:g?e.jsx(W,{className:"w-4 h-4 text-green-500"}):e.jsx(hs,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(T,{variant:"ghost",onClick:o,disabled:i,children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs(T,{variant:"outline",onClick:d,disabled:n||i,children:[e.jsx(De,{className:`w-4 h-4 mr-2 ${n?"animate-spin":""}`}),n?"Checking...":"Refresh Status"]})]})]})}function Bt({accounts:s,privacyMode:a,onSelect:t,onAddNew:n,onBack:i}){return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Select an account (",s.length,")"]}),e.jsx("div",{className:"grid gap-2 max-h-[320px] overflow-y-auto pr-1",children:s.map(o=>e.jsxs("button",{type:"button",onClick:()=>t(o),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center",children:e.jsx(re,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsx("div",{className:G("font-medium",a&&he),children:o.email||o.id}),o.isDefault&&e.jsx("div",{className:"text-xs text-muted-foreground",children:"Default account"})]})]}),e.jsx(ps,{className:"w-4 h-4 text-muted-foreground"})]},o.id))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or"})})]}),e.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 p-3 border-2 border-dashed border-primary/50 rounded-lg hover:border-primary hover:bg-primary/5 transition-colors text-left",onClick:n,children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(ce,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-primary",children:"Add new account"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Authenticate with a different account"})]})]}),e.jsx("div",{className:"flex items-center justify-between pt-2",children:e.jsxs(T,{variant:"ghost",onClick:i,children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Back"]})})]})}const ss="__custom__";function zt({selectedProvider:s,selectedAccount:a,variantName:t,modelName:n,isPending:i,privacyMode:o,onVariantNameChange:c,onModelChange:d,onBack:g,onSkip:f,onCreate:m}){const w=de[s]?.models||[],u=n&&!w.some(v=>v.id===n),[j,S]=r.useState(u),x=v=>{v===ss?(S(!0),d("")):(S(!1),d(v))};return e.jsxs("div",{className:"space-y-4",children:[a&&e.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted/50 rounded-md text-sm",children:[e.jsx(re,{className:"w-4 h-4"}),e.jsxs("span",{children:["Using:"," ",e.jsx("span",{className:G(o&&he),children:a.email||a.id})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"variant-name",children:"Variant Name *"}),e.jsx(oe,{id:"variant-name",value:t,onChange:v=>c(v.target.value),placeholder:"e.g., my-gemini, g3, flash"}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Use this name to invoke: ccs ",t||"<name>",' "prompt"']})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{children:"Model"}),j?e.jsxs("div",{className:"space-y-2",children:[e.jsx(oe,{value:n,onChange:v=>d(v.target.value),placeholder:"e.g., gemini-2.5-pro, claude-opus-4-5"}),e.jsx("button",{type:"button",className:"text-xs text-primary hover:underline",onClick:()=>S(!1),children:"Choose from presets instead"})]}):e.jsxs(Ce,{value:w.some(v=>v.id===n)?n:"",onValueChange:x,children:[e.jsx(ye,{children:e.jsx(Se,{placeholder:"Select a model"})}),e.jsxs(Ae,{children:[w.map(v=>e.jsx(le,{value:v.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:v.name}),v.description&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["- ",v.description]})]})},v.id)),e.jsx(le,{value:ss,children:e.jsx("span",{className:"text-primary",children:"Custom model name..."})})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:j?"Enter any model name supported by CLIProxy":`Default: ${de[s]?.defaultModel||"provider default"}`})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs(T,{variant:"ghost",onClick:g,children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{variant:"ghost",onClick:f,children:"Skip"}),e.jsx(T,{onClick:m,disabled:!t||i,children:i?"Creating...":"Create Variant"})]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"Skip if you just wanted to add an account without creating a variant"})]})}function Vt({variantName:s,onClose:a}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-16 h-16 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center",children:e.jsx(W,{className:"w-8 h-8 text-green-600 dark:text-green-400"})})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-lg",children:"Variant Created!"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Your custom variant is ready to use"})]}),e.jsx(os,{children:e.jsxs(ls,{className:"p-4 space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Usage:"}),e.jsxs("code",{className:"block px-3 py-2 bg-muted rounded-md font-mono text-sm",children:["ccs ",s,' "your prompt here"']})]})}),e.jsx(T,{onClick:a,className:"w-full",children:"Done"})]})}function Jt({open:s,onClose:a}){const[t,n]=r.useState("provider"),[i,o]=r.useState(""),[c,d]=r.useState(null),[g,f]=r.useState(""),[m,w]=r.useState(""),[u,j]=r.useState(!1),[S,x]=r.useState(!1),{data:v,refetch:p}=cs(),N=Fs(),y=Us(),b=Hs(),{privacyMode:M}=ds(),A=v?.authStatus.find(P=>P.provider===i),_=r.useMemo(()=>A?.accounts||[],[A?.accounts]);r.useEffect(()=>{if(!s){const P=setTimeout(()=>{n("provider"),o(""),d(null),f(""),w(""),x(!1)},0);return()=>clearTimeout(P)}},[s]),r.useEffect(()=>{if(t==="auth"&&_.length>0&&!S){const P=setTimeout(()=>{n("account")},0);return()=>clearTimeout(P)}},[t,_,S]);const D=async()=>{j(!0),await p(),j(!1)},L=()=>{const P=(A?.accounts?.length||0)===0;y.mutate({provider:i},{onSuccess:async O=>{if(P){const I=await be(i);I.success&&I.presetName?U.success(`Applied "${I.presetName}" preset`):I.success||U.warning("Account added, but failed to apply default preset")}O.account&&(d(O.account),n("variant")),p()}})},k=P=>{o(P),(v?.authStatus.find(B=>B.provider===P)?.accounts||[]).length===0?n("auth"):n("account")},h=P=>{d(P),n("variant")},C=async()=>{if(!(!g||!i))try{await N.mutateAsync({name:g,provider:i,model:m||void 0,account:c?.id}),n("success")}catch(P){console.error("Failed to create variant:",P)}},R=`ccs ${i} --auth --add`,q=qs(t),$=P=>{if(!P&&(y.isPending&&i&&b.mutate(i),t==="success"||t==="provider")){a();return}};return e.jsx(Pe,{open:s,onOpenChange:$,children:e.jsxs(Me,{className:"sm:max-w-lg",onPointerDownOutside:P=>{t!=="success"&&t!=="provider"&&P.preventDefault()},onEscapeKeyDown:P=>{(y.isPending||N.isPending)&&P.preventDefault()},children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex items-center gap-2",children:[e.jsx(ue,{className:"w-5 h-5 text-primary"}),"Quick Setup Wizard"]}),e.jsxs(us,{children:[t==="provider"&&"Select a provider to get started",t==="auth"&&"Authenticate with your provider",t==="account"&&"Select which account to use",t==="variant"&&"Create your custom variant",t==="success"&&"Setup complete!"]})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[t==="provider"&&e.jsx($t,{providers:Qe,onSelect:k}),t==="auth"&&e.jsx(Qt,{selectedProvider:i,providers:Qe,authCommand:R,isRefreshing:u,isPending:y.isPending,onBack:()=>n("provider"),onStartAuth:L,onRefresh:D}),t==="account"&&e.jsx(Bt,{accounts:_,privacyMode:M,onSelect:h,onAddNew:()=>{x(!0),n("auth")},onBack:()=>n("provider")}),t==="variant"&&e.jsx(zt,{selectedProvider:i,selectedAccount:c,variantName:g,modelName:m,isPending:N.isPending,privacyMode:M,onVariantNameChange:f,onModelChange:w,onBack:()=>_.length>0?n("account"):n("provider"),onSkip:a,onCreate:C}),t==="success"&&e.jsx(Vt,{variantName:g,onClose:a})]}),e.jsx(Gt,{currentProgress:q,allSteps:Ks})]})})}const Wt=3e3,Xt=300*1e3,ee={provider:null,isAuthenticating:!1,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:!1};function Yt(){const[s,a]=r.useState(ee),t=r.useRef(null),n=r.useRef(null),i=r.useRef(0),o=r.useRef(!1),c=ke(),d=r.useCallback(()=>{n.current&&(clearInterval(n.current),n.current=null)},[]);r.useEffect(()=>()=>{t.current?.abort(),d(),o.current=!1},[d]);const g=r.useCallback(async(u,j)=>{if(Date.now()-i.current>Xt){d(),a(S=>({...S,isAuthenticating:!1,error:"Authentication timed out. Please try again."}));return}try{const x=await(await fetch(`/api/cliproxy/auth/${u}/status?state=${encodeURIComponent(j)}`)).json();if(x.status==="ok")d(),c.invalidateQueries({queryKey:["cliproxy-auth"]}),c.invalidateQueries({queryKey:["account-quota"]}),U.success(`${u} authentication successful`),o.current=!1,a(ee);else if(x.status==="auth_url"){const v=x.url||x.auth_url;v&&(a(p=>({...p,authUrl:v})),o.current||(o.current=!0,window.open(v,"_blank")))}else if(x.status==="device_code"){d();const v=x.user_code&&x.verification_url?`Open ${x.verification_url} and enter code: ${x.user_code}`:"Switch to Device Code method and try again.";U.error("Provider returned Device Code flow in callback mode"),a(p=>({...p,isAuthenticating:!1,error:v}))}else if(x.status==="error"){d();const v=x.error||"Authentication failed";U.error(v),a(p=>({...p,isAuthenticating:!1,error:v}))}}catch{}},[c,d]),f=r.useCallback(async(u,j)=>{if(!Gs(u)){a({...ee,error:`Unknown provider: ${u}`});return}t.current?.abort(),d(),o.current=!1;const S=new AbortController;t.current=S;const v=(j?.flowType||(ms(u)?"device_code":"authorization_code"))==="device_code",p=j?.startEndpoint||(v?"start":"start-url"),N={nickname:j?.nickname,kiroMethod:j?.kiroMethod};a({provider:u,isAuthenticating:!0,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:v});try{if(p==="start")fetch(`/api/cliproxy/auth/${u}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N),signal:S.signal}).then(async y=>{const b=await y.json();if(y.ok&&b.success)c.invalidateQueries({queryKey:["cliproxy-auth"]}),c.invalidateQueries({queryKey:["account-quota"]}),o.current=!1,a(ee);else{const M=b.error||"Authentication failed";U.error(M),a(A=>({...A,isAuthenticating:!1,error:M}))}}).catch(y=>{if(y instanceof Error&&y.name==="AbortError")return;const b=y instanceof Error?y.message:"Authentication failed";U.error(b),a(M=>({...M,isAuthenticating:!1,error:b}))});else{const y=await fetch(`/api/cliproxy/auth/${u}/start-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N),signal:S.signal}),b=await y.json();if(!y.ok||!b.success)throw new Error(b.error||"Failed to start OAuth");a(M=>({...M,authUrl:b.authUrl||null,oauthState:b.state})),b.authUrl&&(o.current=!0,window.open(b.authUrl,"_blank")),b.state&&(i.current=Date.now(),n.current=setInterval(()=>{g(u,b.state)},Wt))}}catch(y){if(y instanceof Error&&y.name==="AbortError"){o.current=!1,a(ee);return}const b=y instanceof Error?y.message:"Authentication failed";U.error(b),a(M=>({...M,isAuthenticating:!1,error:b}))}},[g,d,c]),m=r.useCallback(()=>{const u=s.provider;t.current?.abort(),d(),o.current=!1,a(ee),u&&pe.cliproxy.auth.cancel(u).catch(()=>{})},[s.provider,d]),w=r.useCallback(async u=>{if(s.provider){a(j=>({...j,isSubmittingCallback:!0,error:null}));try{const j=await fetch(`/api/cliproxy/auth/${s.provider}/submit-callback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirectUrl:u})}),S=await j.json();if(j.ok&&S.success)d(),c.invalidateQueries({queryKey:["cliproxy-auth"]}),c.invalidateQueries({queryKey:["account-quota"]}),U.success(`${s.provider} authentication successful`),a(ee);else throw new Error(S.error||"Callback submission failed")}catch(j){const S=j instanceof Error?j.message:"Failed to submit callback";U.error(S),a(x=>({...x,isSubmittingCallback:!1,error:S}))}}},[s.provider,c,d]);return r.useMemo(()=>({...s,startAuth:f,cancelAuth:m,submitCallback:w}),[s,f,m,w])}function ys({className:s,showAcknowledgement:a=!1,acknowledged:t=!1,onAcknowledgedChange:n,disabled:i=!1}){return e.jsxs("section",{role:"alert",className:G("relative overflow-hidden rounded-xl border border-amber-500/30 bg-gradient-to-br from-amber-50 via-background to-rose-50/70 shadow-sm dark:from-amber-950/20 dark:to-rose-950/20",s),children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-0.5 bg-gradient-to-r from-amber-500 via-orange-500 to-rose-500"}),e.jsxs("div",{className:"space-y-3 p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"mt-0.5 inline-flex h-7 w-7 items-center justify-center rounded-md bg-amber-500/15 text-amber-700 dark:text-amber-400",children:e.jsx(fs,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:"Account Safety Warning"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Issue #509 · Shared Gemini + AGY account risk"})]})]}),e.jsx(H,{variant:"outline",className:"border-amber-500/40 text-amber-700 dark:text-amber-300",children:"High Risk"})]}),e.jsxs("div",{className:"space-y-2 text-sm leading-relaxed",children:[e.jsxs("p",{children:["Using one Google account for both ",e.jsx("code",{className:"font-mono",children:"ccs gemini"})," and"," ",e.jsx("code",{className:"font-mono",children:"ccs agy"})," can trigger account disable/ban."]}),e.jsx("p",{className:"font-medium text-amber-900 dark:text-amber-200",children:"If you want to keep Google AI access, do not continue this shared-account setup."}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"CCS is provided as-is and does not take responsibility for suspension, bans, or access loss from upstream providers."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("a",{href:"https://github.com/kaitranntt/ccs/issues/509",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-xs font-medium text-amber-800 transition-colors hover:bg-amber-500/15 dark:text-amber-200",children:["Read issue #509",e.jsx(ce,{className:"h-3.5 w-3.5"})]}),e.jsx("span",{className:"rounded-md border border-border/70 bg-muted/60 px-2.5 py-1 text-xs text-muted-foreground",children:"Applies to CLI and dashboard auth"})]}),a&&n&&e.jsx("div",{className:"rounded-lg border border-amber-500/25 bg-amber-500/5 p-2.5",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ks,{id:"account-risk-ack",checked:t,onCheckedChange:o=>n(!!o),disabled:i}),e.jsx(Y,{htmlFor:"account-risk-ack",className:"text-xs leading-5",children:"I understand this risk and that CCS takes no responsibility if I continue this setup."})]})})]})]})}function Zt({open:s,onClose:a,provider:t,displayName:n,isFirstAccount:i=!1}){const[o,c]=r.useState(""),[d,g]=r.useState(""),[f,m]=r.useState(!1),[w,u]=r.useState(null),[j,S]=r.useState(!1),[x,v]=r.useState(Be),p=r.useRef(!1),N=Yt(),y=$s(),b=t==="kiro",M=t==="gemini"||t==="agy",A=ms(t),_=Qs(t),D=Bs(x),L=b?D.flowType==="device_code":A,k=N.isAuthenticating||y.isPending,h=o.trim(),C=w||N.error,R=()=>{c(""),g(""),m(!1),u(null),S(!1),v(Be),p.current=!1,a()};r.useEffect(()=>{s&&(S(!1),u(null))},[t,s]),r.useEffect(()=>{!N.isAuthenticating&&!N.error&&N.provider===null&&s&&p.current&&(p.current=!1,(async()=>{try{const V=await be(t);V.success&&V.presetName&&i&&U.success(`Applied "${V.presetName}" preset`)}catch{}R()})())},[N.isAuthenticating,N.error,N.provider]);const q=()=>{N.cancelAuth(),R()},$=async()=>{N.authUrl&&(await navigator.clipboard.writeText(N.authUrl),m(!0),setTimeout(()=>m(!1),2e3))},P=()=>{d.trim()&&N.submitCallback(d.trim())},O=()=>{if(M&&!j){u("Please acknowledge the account safety warning before authenticating this provider.");return}if(_&&!h){u(`Nickname is required for ${n} accounts.`);return}u(null),p.current=!0,N.startAuth(t,{nickname:h||void 0,kiroMethod:b?x:void 0,flowType:b?D.flowType:void 0,startEndpoint:b?D.startEndpoint:void 0})},I=()=>{p.current=!0,y.mutate(void 0,{onSuccess:async()=>{const E=await be("kiro");E.success&&E.presetName&&i&&U.success(`Applied "${E.presetName}" preset`),R()}})},B=E=>{E||q()},Q=N.isAuthenticating;return e.jsx(Pe,{open:s,onOpenChange:B,children:e.jsxs(Me,{className:"sm:max-w-md",onInteractOutside:E=>{Q&&E.preventDefault()},children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:["Add ",n," Account"]}),e.jsx(us,{children:b?"Choose a Kiro auth method, then authenticate via browser or import from Kiro IDE.":L?"Click Authenticate. A verification code will appear for you to enter on the provider website.":"Click Authenticate to get an OAuth URL. Open it in any browser to sign in."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[M&&!Q&&e.jsx(ys,{showAcknowledgement:!0,acknowledged:j,onAcknowledgedChange:E=>{S(E),u(null)},disabled:k}),b&&!Q&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"kiro-auth-method",children:"Auth Method"}),e.jsxs(Ce,{value:x,onValueChange:E=>{v(E),u(null)},children:[e.jsx(ye,{id:"kiro-auth-method",children:e.jsx(Se,{placeholder:"Select Kiro auth method"})}),e.jsx(Ae,{children:zs.map(E=>e.jsx(le,{value:E.id,children:E.label},E.id))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:D.description})]}),!Q&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"nickname",children:_?"Nickname (required)":"Nickname (optional)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(oe,{id:"nickname",value:o,onChange:E=>{c(E.target.value),u(null)},placeholder:"e.g., work, personal",disabled:k,className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:_?"Required for this provider. Use a unique friendly name (e.g., work, personal).":"A friendly name to identify this account. Auto-generated from email if left empty."})]}),Q&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx(z,{className:"w-4 h-4 inline mr-2 animate-spin"}),"Waiting for authentication..."]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:N.isDeviceCodeFlow?"A verification code dialog will appear shortly. Enter the code on the provider website.":"Complete the authentication in your browser. This dialog closes automatically."})]}),N.authUrl&&!N.isDeviceCodeFlow&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{className:"text-xs",children:"Open this URL in any browser to sign in:"}),e.jsxs("div",{className:"p-3 bg-muted rounded-md",children:[e.jsx("p",{className:"text-xs text-muted-foreground break-all font-mono line-clamp-3",children:N.authUrl}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(T,{variant:"outline",size:"sm",onClick:$,children:f?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-3 h-3 mr-1"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(hs,{className:"w-3 h-3 mr-1"}),"Copy"]})}),e.jsxs(T,{variant:"outline",size:"sm",onClick:()=>{if(!N.authUrl)return;const E=window.open(N.authUrl,"_blank");(!E||E.closed||typeof E.closed>"u")&&U.warning("Popup blocked. Copy the URL above and open it manually in your browser.",{duration:5e3})},children:[e.jsx(ce,{className:"w-3 h-3 mr-1"}),"Open"]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"callback-url",className:"text-xs",children:"Redirect didn't work? Paste the callback URL:"}),e.jsx(oe,{id:"callback-url",value:d,onChange:E=>g(E.target.value),placeholder:"Paste the redirect URL here...",className:"font-mono text-xs"}),e.jsx(T,{variant:"secondary",size:"sm",onClick:P,disabled:!d.trim()||N.isSubmittingCallback,children:N.isSubmittingCallback?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"w-3 h-3 mr-1 animate-spin"}),"Submitting..."]}):"Submit Callback"})]})]}),!N.authUrl&&!N.isDeviceCodeFlow&&e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"Preparing sign-in URL..."})]}),C&&e.jsx("p",{className:"text-xs text-center text-destructive",children:C}),y.isPending&&e.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[e.jsx(z,{className:"w-4 h-4 inline mr-2 animate-spin"}),"Importing token from Kiro IDE..."]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[e.jsx(T,{variant:"ghost",onClick:q,children:"Cancel"}),b&&!Q&&e.jsx(T,{variant:"outline",onClick:I,disabled:k,children:y.isPending?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"w-4 h-4 mr-2 animate-spin"}),"Importing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Tt,{className:"w-4 h-4 mr-2"}),"Import from IDE"]})}),!Q&&e.jsxs(T,{onClick:O,disabled:k||_&&!h||M&&!j,children:[e.jsx(ce,{className:"w-4 h-4 mr-2"}),"Authenticate"]})]})]})]})})}const Ie="[1m]";function ea(s){return s.toLowerCase().startsWith("gemini-")}function Fe(s){return s.toLowerCase().endsWith(Ie.toLowerCase())}function sa(s){return!s||Fe(s)?s:`${s}${Ie}`}function Ss(s){return s&&(Fe(s)?s.slice(0,-Ie.length):s)}const ts=["ANTHROPIC_MODEL"],ta=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"];function aa(s){const a=s?.env||{};return ta.filter(t=>!a[t]?.trim())}function na(s){const[a,t]=r.useState(null),[n,i]=r.useState(!1),o=ke(),{data:c,isLoading:d,refetch:g}=rs({queryKey:["settings",s],queryFn:async()=>{const k=await fetch(`/api/settings/${s}/raw`);return k.ok?k.json():{profile:s,settings:{env:{}},mtime:Date.now(),path:`~/.ccs/profiles/${s}/settings.json`}}}),f=c?.settings,m=r.useMemo(()=>a!==null?a:f?JSON.stringify(f,null,2):`{
|
|
2
|
-
"env": {}
|
|
3
|
-
}`,[a,f]),w=r.useCallback(k=>{t(k)},[]),u=r.useMemo(()=>{try{return JSON.parse(m)}catch{return f||{env:{}}}},[m,f]),j=u?.env?.ANTHROPIC_MODEL,S=u?.env?.ANTHROPIC_DEFAULT_OPUS_MODEL,x=u?.env?.ANTHROPIC_DEFAULT_SONNET_MODEL,v=u?.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL,p=r.useMemo(()=>{const k=u?.env||{};return ts.some(h=>{const C=k[h];return C&&Fe(C)})},[u]),N=r.useCallback((k,h)=>{const C={...u?.env||{},[k]:h},R={...u,env:C};t(JSON.stringify(R,null,2))},[u]),y=r.useCallback(k=>{const h=u?.env||{},C={};for(const $ of ts){const P=h[$];P&&(C[$]=k?sa(P):Ss(P))}const R={...h,...C};delete R.CCS_EXTENDED_CONTEXT;const q={...u,env:R};t(JSON.stringify(q,null,2))},[u]),b=r.useCallback(k=>{const h={...u?.env||{},...k},C={...u,env:h};t(JSON.stringify(C,null,2))},[u]),M=r.useMemo(()=>{try{return JSON.parse(m),!0}catch{return!1}},[m]),A=r.useMemo(()=>a===null?!1:a!==JSON.stringify(f,null,2),[a,f]),_=r.useMemo(()=>aa(u),[u]),D=Is({mutationFn:async()=>{const k=JSON.parse(m),h=await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:k,expectedMtime:c?.mtime})});if(h.status===409)throw new Error("CONFLICT");if(!h.ok)throw new Error("Failed to save");return h.json()},onSuccess:k=>{o.invalidateQueries({queryKey:["settings",s]}),t(null),k?.warning?U.success("Settings saved",{description:k.warning}):U.success("Settings saved")},onError:k=>{k.message==="CONFLICT"?i(!0):U.error(k.message)}}),L=async k=>{i(!1),k?(await g(),D.mutate()):t(null)};return{data:c,isLoading:d,refetch:g,rawJsonContent:m,rawJsonEdits:a,isRawJsonValid:M,hasChanges:A,currentSettings:u,currentModel:j,opusModel:S,sonnetModel:x,haikuModel:v,extendedContextEnabled:p,toggleExtendedContext:y,handleRawJsonChange:w,updateEnvValue:N,updateEnvValues:b,saveMutation:{mutate:()=>D.mutate(),isPending:D.isPending},conflictDialog:n,setConflictDialog:i,handleConflictResolve:L,missingRequiredFields:_}}const ia=/-(medium|high|xhigh)$/i;function ra(s){if(!s)return;const a=s.trim().match(ia);if(a?.[1])return a[1].toLowerCase()}function ve(s){if(!s)return null;const a=ra(s);return a?{label:`Pinned ${a}`,explicit:!0}:{label:"Auto effort",explicit:!1}}function Z({label:s,description:a,value:t,onChange:n,catalog:i,allModels:o,disabled:c}){const d=new Set(i?.models.map(m=>m.id)||[]),g=i?.provider==="codex",f=g?ve(t):null;return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium",children:s}),a&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:a})]}),e.jsxs(Ce,{value:t||"",onValueChange:n,disabled:c,children:[e.jsx(ye,{className:"h-9",children:e.jsx(Se,{placeholder:"Select model",children:t&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:t}),f&&e.jsx(H,{variant:f.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:f.label})]})})}),e.jsxs(Ae,{className:"max-h-[300px]",children:[i&&i.models.length>0&&e.jsxs(ze,{children:[e.jsx(Ve,{className:"text-xs text-primary",children:"Recommended"}),i.models.map(m=>{const w=g?ve(m.id):null;return e.jsx(le,{value:m.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:m.id}),m.tier==="paid"&&e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:"PAID"}),w&&e.jsx(H,{variant:w.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:w.label}),t===m.id&&e.jsx(W,{className:"w-3 h-3 text-primary ml-auto"})]})},m.id)})]}),o.length>0&&e.jsxs(ze,{children:[e.jsxs(Ve,{className:"text-xs text-muted-foreground",children:["All Models (",o.length,")"]}),o.filter(m=>!d.has(m.id)).map(m=>{const w=g?ve(m.id):null;return e.jsx(le,{value:m.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:m.id}),w&&e.jsx(H,{variant:w.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:w.label}),t===m.id&&e.jsx(W,{className:"w-3 h-3 text-primary ml-auto"})]})},m.id)})]}),(!i||i.models.length===0)&&o.length===0&&e.jsx("div",{className:"py-2 px-3 text-xs text-muted-foreground",children:"No models available"})]})]})]})}function oa({open:s,onClose:a,currentValues:t,onApply:n,onSave:i,isSaving:o,catalog:c,allModels:d}){const[g,f]=r.useState(t),[m,w]=r.useState(""),u=j=>{j?(f(t),w("")):a()};return e.jsx(Pe,{open:s,onOpenChange:u,children:e.jsxs(Me,{className:"sm:max-w-md",children:[e.jsx(Te,{children:e.jsxs(Oe,{className:"flex items-center gap-2",children:[e.jsx(ue,{className:"w-4 h-4"}),"Custom Preset"]})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"preset-name",children:"Preset Name (optional)"}),e.jsx(oe,{id:"preset-name",value:m,onChange:j=>w(j.target.value),placeholder:"e.g., My Custom Config",className:"text-sm"})]}),e.jsx(Le,{}),c?.provider==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground rounded-md border bg-muted/30 px-2.5 py-2",children:["Codex tip: suffixes ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and ",e.jsx("code",{children:"-xhigh"})," ","pin effort. Unsuffixed models use Thinking settings."]}),e.jsx(Z,{label:"Default Model",description:"Used when no specific tier is requested",value:g.default,onChange:j=>f({...g,default:j}),catalog:c,allModels:d}),e.jsx(Z,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:g.opus,onChange:j=>f({...g,opus:j}),catalog:c,allModels:d}),e.jsx(Z,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:g.sonnet,onChange:j=>f({...g,sonnet:j}),catalog:c,allModels:d}),e.jsx(Z,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:g.haiku,onChange:j=>f({...g,haiku:j}),catalog:c,allModels:d})]}),e.jsxs(Vs,{className:"gap-2 sm:gap-0",children:[e.jsx(T,{variant:"outline",onClick:a,children:"Cancel"}),i&&e.jsxs(T,{variant:"secondary",onClick:()=>i(g,m||void 0),disabled:o||!m.trim(),children:[o?e.jsx(z,{className:"w-4 h-4 mr-1 animate-spin"}):e.jsx(fe,{className:"w-4 h-4 mr-1"}),"Save Preset"]}),e.jsxs(T,{onClick:()=>n(g,m||void 0),children:[e.jsx(me,{className:"w-4 h-4 mr-1"}),"Apply Preset"]})]})]})})}function xe({label:s,command:a}){return e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:s}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsx("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:a}),e.jsx(xs,{value:a,size:"icon",className:"h-6 w-6"})]})]})}function la({provider:s,displayName:a,data:t,authStatus:n}){return e.jsx(Ee,{className:"h-full",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2 mb-3",children:[e.jsx(gs,{className:"w-4 h-4"}),"Provider Information"]}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Provider"}),e.jsx("span",{className:"font-mono",children:a})]}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"File Path"}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-xs break-all",children:t.path}),e.jsx(xs,{value:t.path,size:"icon",className:"h-5 w-5"})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Last Modified"}),e.jsx("span",{className:"text-xs",children:new Date(t.mtime).toLocaleString()})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Status"}),n.authenticated?e.jsxs(H,{variant:"outline",className:"w-fit text-green-600 border-green-200 bg-green-50",children:[e.jsx(Ot,{className:"w-3 h-3 mr-1"}),"Authenticated"]}):e.jsx(H,{variant:"outline",className:"w-fit text-muted-foreground",children:"Not connected"})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:"Quick Usage"}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsx(xe,{label:"Run with prompt",command:`ccs ${s} "your prompt"`}),e.jsx(xe,{label:"Change model",command:`ccs ${s} --config`}),e.jsx(xe,{label:"Add account",command:`ccs ${s} --add`}),e.jsx(xe,{label:"List accounts",command:`ccs ${s} --accounts`})]})]})]})})}const ca={sm:{container:"w-6 h-6",icon:"w-4 h-4",text:"text-xs"},md:{container:"w-8 h-8",icon:"w-5 h-5",text:"text-sm"},lg:{container:"w-12 h-12",icon:"w-8 h-8",text:"text-lg"}};function Ue({provider:s,className:a,size:t="md"}){const n=Js(s),i=ca[t],o=Ws(s);return e.jsx("div",{className:G("flex items-center justify-center rounded-md",o&&(Xs(s)?"bg-gray-900 p-1":"bg-white p-1"),i.container,a),children:o?e.jsx("img",{src:o,alt:`${s} logo`,className:G(i.icon,"object-contain")}):e.jsx("span",{className:G("font-semibold",n.textClass,i.text),children:n.letter})})}function da({displayName:s,logoProvider:a,provider:t,data:n,isLoading:i,hasChanges:o,isRawJsonValid:c,isSaving:d,isRemoteMode:g,port:f,onRefetch:m,onSave:w}){return e.jsxs("div",{className:"px-6 py-4 border-b bg-background flex items-center justify-between shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ue,{provider:a||t,size:"lg"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),g&&e.jsxs(H,{variant:"secondary",className:"text-xs gap-1 bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:[e.jsx(js,{className:"w-3 h-3"}),"Remote"]}),f&&e.jsxs(H,{variant:"outline",className:"text-xs gap-1 font-mono",children:[e.jsx(Et,{className:"w-3 h-3"}),":",f]}),!g&&n?.path&&e.jsx(H,{variant:"outline",className:"text-xs",children:n.path.replace(/^.*[\\/]/,"")})]}),g?e.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400 mt-0.5",children:"Traffic auto-routed to remote server"}):n&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Last modified: ",new Date(n.mtime).toLocaleString()]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{variant:"ghost",size:"sm",onClick:m,disabled:i,children:e.jsx(De,{className:`w-4 h-4 ${i?"animate-spin":""}`})}),e.jsx(T,{size:"sm",onClick:w,disabled:d||!o||!c,children:d?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(_t,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function ua({model:s,provider:a,enabled:t,onToggle:n,disabled:i,className:o}){if(!s?.extendedContext)return null;const c=ea(s.id);return e.jsxs("div",{className:G("rounded-lg border p-3 space-y-2",t?"border-primary/50 bg-primary/5":"border-border bg-muted/30",o),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(me,{className:G("w-4 h-4",t?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-sm font-medium",children:"Extended Context"}),e.jsx(H,{variant:t?"default":"secondary",className:"text-[10px] h-5 px-1.5",children:"1M tokens"})]}),e.jsx(Cs,{checked:t,onCheckedChange:n,disabled:i})]}),e.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(gs,{className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{children:"Enables 1M token context window instead of default 200K."}),e.jsx("p",{className:"text-[10px]",children:c?e.jsxs("span",{className:"text-primary",children:["Auto-enabled for ",a," Gemini models"]}):e.jsxs("span",{children:["Opt-in for ",a," Claude models via --1m flag"]})}),t&&e.jsx("p",{className:"text-amber-600 dark:text-amber-500",children:"Note: 2x input pricing applies for tokens beyond 200K"})]})]})]})}function ma({catalog:s,savedPresets:a,currentModel:t,opusModel:n,sonnetModel:i,haikuModel:o,providerModels:c,provider:d,extendedContextEnabled:g,onExtendedContextToggle:f,onApplyPreset:m,onUpdateEnvValue:w,onOpenCustomPreset:u,onDeletePreset:j,isDeletePending:S}){const x=s&&s.models.length>0||a.length>0,v=r.useMemo(()=>{if(!s||!t)return;const p=Ss(t);return s.models.find(N=>N.id===p)},[s,t]);return e.jsxs(e.Fragment,{children:[x&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[e.jsx(ue,{className:"w-4 h-4"}),"Presets"]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Apply pre-configured model mappings"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s?.models.slice(0,4).map(p=>e.jsxs(T,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>{const N=p.presetMapping||{default:p.id,opus:p.id,sonnet:p.id,haiku:p.id};m({ANTHROPIC_MODEL:N.default,ANTHROPIC_DEFAULT_OPUS_MODEL:N.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:N.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:N.haiku})},children:[e.jsx(me,{className:"w-3 h-3"}),p.name]},p.id)),a.map(p=>e.jsxs("div",{className:"group relative",children:[e.jsxs(T,{variant:"secondary",size:"sm",className:"text-xs h-7 gap-1 pr-6",onClick:()=>{m({ANTHROPIC_MODEL:p.default,ANTHROPIC_DEFAULT_OPUS_MODEL:p.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:p.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:p.haiku})},children:[e.jsx(fe,{className:"w-3 h-3 fill-current"}),p.name]}),e.jsx(T,{variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-7 w-5 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:N=>{N.stopPropagation(),j(p.name)},disabled:S,children:e.jsx(Re,{className:"w-3 h-3"})})]},p.name)),e.jsxs(T,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1 border-primary/50 text-primary hover:bg-primary/10 hover:border-primary",onClick:u,children:[e.jsx(vs,{className:"w-3 h-3"}),"Custom"]})]})]}),e.jsx(Le,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-2",children:"Model Mapping"}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"Configure which models to use for each tier"}),d==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground mb-3 rounded-md border bg-muted/30 px-2.5 py-2",children:["Codex tip: suffixes ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and ",e.jsx("code",{children:"-xhigh"})," ","pin reasoning effort. Unsuffixed models use Thinking settings."]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(Z,{label:"Default Model",description:"Used when no specific tier is requested",value:t,onChange:p=>w("ANTHROPIC_MODEL",p),catalog:s,allModels:c}),v?.extendedContext&&f&&e.jsx(ua,{model:v,provider:d,enabled:g??!1,onToggle:f}),e.jsx(Z,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:n,onChange:p=>w("ANTHROPIC_DEFAULT_OPUS_MODEL",p),catalog:s,allModels:c}),e.jsx(Z,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:i,onChange:p=>w("ANTHROPIC_DEFAULT_SONNET_MODEL",p),catalog:s,allModels:c}),e.jsx(Z,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:o,onChange:p=>w("ANTHROPIC_DEFAULT_HAIKU_MODEL",p),catalog:s,allModels:c})]})]})]})}function as(s){const a=Math.max(0,Math.min(100,s));return a<=20?"bg-destructive":a<=50?"bg-yellow-500":"bg-green-500"}function ns(s){if(!s)return"";try{const a=new Date(s),n=new Date().getTime()-a.getTime();if(n<0)return"just now";const i=Math.floor(n/(1e3*60)),o=Math.floor(n/(1e3*60*60)),c=Math.floor(n/(1e3*60*60*24));return c>0?`${c}d ago`:o>0?`${o}h ago`:i>0?`${i}m ago`:"just now"}catch{return""}}function xa(s){if(!s)return!1;try{const a=new Date(s);return new Date().getTime()-a.getTime()<3600*1e3}catch{return!1}}function pa({account:s,onSetDefault:a,onRemove:t,onPauseToggle:n,isRemoving:i,isPausingAccount:o,privacyMode:c,showQuota:d,selectable:g,selected:f,onSelectChange:m}){const w=s.provider.toLowerCase(),u=w==="codex",j=w==="claude"||w==="anthropic",{data:S}=Ys(d),{data:x,isLoading:v}=Zs(w,s.id,d),p=S?.accountStats?.[s.email||s.id]?.lastUsedAt,N=xa(p),y=et(s.provider,x),b=st(s.provider,x),M=u&&x&&tt(x)?at(x.windows):null,A=[{label:"5h",value:M?.fiveHourWindow?.remainingPercent??null},{label:"Weekly",value:M?.weeklyWindow?.remainingPercent??null}].filter(h=>h.value!==null),_=j&&x&&nt(x)?[{label:"5h",value:x.coreUsage?.fiveHour?.remainingPercent??x.windows.find(h=>h.rateLimitType==="five_hour")?.remainingPercent??null},{label:"Weekly",value:x.coreUsage?.weekly?.remainingPercent??x.windows.find(h=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(h.rateLimitType))?.remainingPercent??null}].filter(h=>h.value!==null):[],D=u?A:j?_:[],L=y!==null?lt(y):null,k=L!==null?Number(L):null;return e.jsxs("div",{className:G("flex flex-col gap-2 p-3 rounded-lg border transition-colors overflow-hidden",s.isDefault?"border-primary/30 bg-primary/5":"border-border hover:bg-muted/30",s.paused&&"opacity-75",f&&"ring-2 ring-primary/50 bg-primary/5"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[g&&e.jsx("button",{type:"button",onClick:()=>m?.(!f),className:G("flex items-center justify-center w-5 h-5 rounded border-2 transition-colors shrink-0",f?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),"aria-label":f?"Deselect account":"Select account",children:f&&e.jsx(W,{className:"w-3 h-3"})}),n&&e.jsx(te,{children:e.jsxs(ae,{children:[e.jsx(ne,{asChild:!0,children:e.jsx(T,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>n(!s.paused),disabled:o,children:o?e.jsx(z,{className:"w-4 h-4 animate-spin"}):s.paused?e.jsx(Ns,{className:"w-4 h-4 text-emerald-500"}):e.jsx(we,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(ie,{side:"top",children:s.paused?"Resume account":"Pause account"})]})}),e.jsxs("div",{className:"relative shrink-0",children:[e.jsx("div",{className:G("flex items-center justify-center w-8 h-8 rounded-full",s.isDefault?"bg-primary/10":"bg-muted"),children:e.jsx(re,{className:"w-4 h-4"})}),s.tier&&s.tier!=="unknown"&&s.tier!=="free"&&e.jsx("span",{className:G("absolute -bottom-0.5 -right-0.5 text-[7px] font-bold uppercase px-1 py-px rounded","ring-1 ring-background",s.tier==="ultra"?"bg-violet-500/20 text-violet-600 dark:bg-violet-500/30 dark:text-violet-300":"bg-yellow-500/20 text-yellow-700 dark:bg-yellow-500/25 dark:text-yellow-400"),children:s.tier==="ultra"?"U":"P"})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:G("font-medium text-sm truncate",c&&he),children:s.email||s.id}),s.isDefault&&e.jsxs(H,{variant:"secondary",className:"text-[10px] h-4 px-1.5 gap-0.5",children:[e.jsx(fe,{className:"w-2.5 h-2.5 fill-current"}),"Default"]}),s.paused&&e.jsxs(H,{variant:"outline",className:"text-[10px] h-4 px-1.5 border-yellow-500 text-yellow-600",children:[e.jsx(we,{className:"w-2 h-2 mr-0.5"}),"Paused"]})]}),s.provider==="agy"&&e.jsx("div",{className:"flex items-center gap-1.5 mt-1",children:s.projectId?e.jsx(te,{children:e.jsxs(ae,{children:[e.jsx(ne,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(Dt,{className:"w-3 h-3","aria-hidden":"true"}),e.jsx("span",{className:G("font-mono max-w-[180px] truncate",c&&he),title:s.projectId,children:s.projectId})]})}),e.jsx(ie,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:"GCP Project ID (read-only)"})})]})}):e.jsx(te,{children:e.jsxs(ae,{children:[e.jsx(ne,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-500",children:[e.jsx(fs,{className:"w-3 h-3","aria-label":"Warning"}),e.jsx("span",{children:"Project ID: N/A"})]})}),e.jsx(ie,{side:"bottom",className:"max-w-[250px]",children:e.jsxs("div",{className:"text-xs space-y-1",children:[e.jsx("p",{className:"font-medium text-amber-600",children:"Missing Project ID"}),e.jsx("p",{children:"This may cause errors. Remove the account and re-add it to fetch the project ID."})]})})]})})}),s.lastUsedAt&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-0.5",children:[e.jsx(Ze,{className:"w-3 h-3"}),"Last used: ",new Date(s.lastUsedAt).toLocaleDateString()]})]})]}),e.jsxs(it,{children:[e.jsx(rt,{asChild:!0,children:e.jsx(T,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:e.jsx(Rt,{className:"w-4 h-4"})})}),e.jsxs(ot,{align:"end",children:[!s.isDefault&&e.jsxs(Je,{onClick:a,children:[e.jsx(fe,{className:"w-4 h-4 mr-2"}),"Set as default"]}),e.jsxs(Je,{className:"text-destructive focus:text-destructive",onClick:t,disabled:i,children:[e.jsx(ws,{className:"w-4 h-4 mr-2"}),i?"Removing...":"Remove account"]})]})]})]}),d&&e.jsx("div",{className:"pl-11",children:v?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(z,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Loading quota..."})]}):k!==null?e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:N?e.jsxs(e.Fragment,{children:[e.jsx(Lt,{className:"w-3 h-3 text-emerald-500"}),e.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["Active · ",ns(p)]})]}):p?e.jsxs(e.Fragment,{children:[e.jsx(Ze,{className:"w-3 h-3 text-muted-foreground"}),e.jsxs("span",{className:"text-muted-foreground",children:["Last used ",ns(p)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(es,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Not used yet"})]})}),e.jsx(te,{children:e.jsxs(ae,{children:[e.jsx(ne,{asChild:!0,children:D.length>0?e.jsx("div",{className:"space-y-1.5",children:D.map(h=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-10 text-[10px] text-muted-foreground",children:h.label}),e.jsx(We,{value:Math.max(0,Math.min(100,h.value)),className:"h-2 flex-1",indicatorClassName:as(h.value)}),e.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[h.value,"%"]})]},h.label))}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{value:Math.max(0,Math.min(100,k)),className:"h-2 flex-1",indicatorClassName:as(k)}),e.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[L,"%"]})]})}),e.jsx(ie,{side:"bottom",className:"max-w-xs",children:e.jsx(ct,{quota:x,resetTime:b})})]})})]}):x?.success?e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(H,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-muted-foreground/50 text-muted-foreground",children:[e.jsx(es,{className:"w-3 h-3"}),"No limits"]})}):x?.needsReauth?e.jsx(te,{children:e.jsxs(ae,{children:[e.jsx(ne,{asChild:!0,children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(H,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-amber-500/50 text-amber-600 dark:text-amber-400",children:[e.jsx(It,{className:"w-3 h-3"}),"Reauth"]})})}),e.jsx(ie,{side:"bottom",className:"max-w-[220px]",children:e.jsx("p",{className:"text-xs",children:x.error?.includes("No refresh token")?"No refresh token available. Remove and re-add account to fix.":x.error?.includes("refresh")||x.error?.includes("Invalid")?`Auto-refresh failed: ${x.error}`:`Token issue: ${x.error||"Re-authenticate required"}`})})]})}):x?.error||x&&!x.success?e.jsx(te,{children:e.jsxs(ae,{children:[e.jsx(ne,{asChild:!0,children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(H,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-muted-foreground/50 text-muted-foreground",children:[e.jsx(Ft,{className:"w-3 h-3"}),"N/A"]})})}),e.jsx(ie,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:x?.error||"Quota information unavailable"})})]})}):null})]})}function ha({selectedCount:s,onPauseSelected:a,onResumeSelected:t,onClearSelection:n,isPausing:i,isResuming:o}){if(s<1)return null;const c=i||o;return e.jsxs("div",{className:"flex items-center gap-3 p-2 bg-muted/50 rounded-lg border mt-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[s," selected"]}),e.jsx(T,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:n,disabled:c,children:"Clear"}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(T,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:a,disabled:c,children:[i?e.jsx(z,{className:"w-3 h-3 animate-spin"}):e.jsx(we,{className:"w-3 h-3"}),"Pause Selected"]}),e.jsxs(T,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:t,disabled:c,children:[o?e.jsx(z,{className:"w-3 h-3 animate-spin"}):e.jsx(Ns,{className:"w-3 h-3"}),"Resume Selected"]})]})]})}function fa({accounts:s,onAddAccount:a,onSetDefault:t,onRemoveAccount:n,onPauseToggle:i,onSoloMode:o,onBulkPause:c,onBulkResume:d,isRemovingAccount:g,isPausingAccount:f,isSoloingAccount:m,isBulkPausing:w,isBulkResuming:u,privacyMode:j,showQuota:S,isKiro:x,kiroNoIncognito:v,onKiroNoIncognitoChange:p,kiroSettingsLoading:N}){const[y,b]=r.useState(new Set),M=r.useMemo(()=>new Set(s.map(O=>O.id)),[s]),A=r.useMemo(()=>new Set([...y].filter(O=>M.has(O))),[y,M]),_=!!(c&&d),D=A.size,L=s.length>0&&A.size===s.length,k=A.size>0&&A.size<s.length,h=r.useCallback(O=>{b(I=>{const B=new Set(I);return B.has(O)?B.delete(O):B.add(O),B})},[]),C=r.useCallback(()=>{b(new Set(s.map(O=>O.id)))},[s]),R=r.useCallback(()=>{b(new Set)},[]),q=r.useCallback(()=>{L?R():C()},[L,C,R]),$=r.useCallback(()=>{c&&A.size>0&&(c(Array.from(A)),b(new Set))},[c,A]),P=r.useCallback(()=>{d&&A.size>0&&(d(Array.from(A)),b(new Set))},[d,A]);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[_&&s.length>0&&e.jsx(ks,{checked:L,onCheckedChange:q,"aria-label":"Select all accounts",className:k?"data-[state=checked]:bg-primary/50":"",...k?{"data-state":"indeterminate"}:{}}),e.jsx(re,{className:"w-4 h-4"}),"Accounts",s.length>0&&e.jsx(H,{variant:"secondary",className:"text-xs",children:s.length})]}),e.jsxs(T,{variant:"default",size:"sm",className:"h-7 text-xs gap-1",onClick:a,children:[e.jsx(vs,{className:"w-3 h-3"}),"Add"]})]}),_&&D>0&&e.jsx(ha,{selectedCount:D,onPauseSelected:$,onResumeSelected:P,onClearSelection:R,isPausing:!!w,isResuming:!!u}),s.length>0?e.jsx("div",{className:"space-y-2",children:s.map(O=>e.jsx(pa,{account:O,onSetDefault:()=>t(O.id),onRemove:()=>n(O.id),onPauseToggle:i?I=>i(O.id,I):void 0,onSoloMode:o?()=>o(O.id):void 0,isRemoving:g,isPausingAccount:f,isSoloingAccount:m,privacyMode:j,showQuota:S,selectable:_,selected:A.has(O.id),onSelectChange:()=>h(O.id)},O.id))}):e.jsxs("div",{className:"py-6 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed",children:[e.jsx(re,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No accounts connected"}),e.jsx("p",{className:"text-xs opacity-70",children:"Add an account to get started"})]}),x&&p&&e.jsx("div",{className:"mt-3 pt-3 border-t border-dashed",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(js,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Use incognito"})]}),e.jsx(Cs,{checked:!v,onCheckedChange:O=>p(!O),disabled:N,className:"scale-90"})]})})]})}function ga({provider:s,catalog:a,savedPresets:t,currentModel:n,opusModel:i,sonnetModel:o,haikuModel:c,providerModels:d,extendedContextEnabled:g,onExtendedContextToggle:f,onApplyPreset:m,onUpdateEnvValue:w,onOpenCustomPreset:u,onDeletePreset:j,isDeletePending:S,accounts:x,onAddAccount:v,onSetDefault:p,onRemoveAccount:N,onPauseToggle:y,onSoloMode:b,onBulkPause:M,onBulkResume:A,isRemovingAccount:_,isPausingAccount:D,isSoloingAccount:L,isBulkPausing:k,isBulkResuming:h,privacyMode:C,isRemoteMode:R}){const q=s.toLowerCase(),$=(dt.includes(q)||["anthropic","antigravity","gemini-cli","copilot","github-copilot"].includes(q))&&!R,P=s==="kiro",[O,I]=r.useState(!0),[B,Q]=r.useState(!0),[E,V]=r.useState(!1),l=r.useCallback(async()=>{if(P)try{Q(!0);const se=(await pe.config.get()).cliproxy;I(se?.kiro_no_incognito??!0)}catch{I(!0)}finally{Q(!1)}},[P]),F=r.useCallback(async J=>{I(J),V(!0);try{const se=await pe.config.get(),ge=se.cliproxy??{};await pe.config.update({...se,cliproxy:{...ge,kiro_no_incognito:J}})}catch{I(!J)}finally{V(!1)}},[]);return r.useEffect(()=>{l()},[l]),e.jsx(Ee,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsx(ma,{catalog:a,savedPresets:t,currentModel:n,opusModel:i,sonnetModel:o,haikuModel:c,providerModels:d,provider:s,extendedContextEnabled:g,onExtendedContextToggle:f,onApplyPreset:m,onUpdateEnvValue:w,onOpenCustomPreset:u,onDeletePreset:j,isDeletePending:S}),e.jsx(Le,{}),e.jsx(fa,{accounts:x,onAddAccount:v,onSetDefault:p,onRemoveAccount:N,onPauseToggle:y,onSoloMode:b,onBulkPause:M,onBulkResume:A,isRemovingAccount:_,isPausingAccount:D,isSoloingAccount:L,isBulkPausing:k,isBulkResuming:h,privacyMode:C,showQuota:$,isKiro:P,kiroNoIncognito:O,onKiroNoIncognitoChange:F,kiroSettingsLoading:B||E})]})})}function is({provider:s,displayName:a,authStatus:t,catalog:n,logoProvider:i,baseProvider:o,isRemoteMode:c,port:d,onAddAccount:g,onSetDefault:f,onRemoveAccount:m,onPauseToggle:w,onSoloMode:u,onBulkPause:j,onBulkResume:S,isRemovingAccount:x,isPausingAccount:v,isSoloingAccount:p,isBulkPausing:N,isBulkResuming:y}){const[b,M]=r.useState(!1),{privacyMode:A}=ds(),{data:_}=ut(),{data:D}=mt(s),L=xt(),k=pt(),h=D?.presets||[],C=o||s,R=r.useMemo(()=>{if(!_?.models)return[];const X={gemini:["google"],agy:["antigravity"],codex:["openai"],qwen:["alibaba","qwen"],iflow:["iflow"],kiro:["kiro","aws"],ghcp:["github","copilot"],kimi:["kimi","moonshot"]}[C.toLowerCase()]||[C.toLowerCase()];return _.models.filter($e=>X.some(Ls=>$e.owned_by.toLowerCase().includes(Ls)))},[_,C]),q=(o||s).toLowerCase(),{data:$,isLoading:P,refetch:O,rawJsonContent:I,rawJsonEdits:B,isRawJsonValid:Q,hasChanges:E,currentModel:V,opusModel:l,sonnetModel:F,haikuModel:J,extendedContextEnabled:se,toggleExtendedContext:ge,handleRawJsonChange:As,updateEnvValue:Ps,updateEnvValues:He,saveMutation:Ke,conflictDialog:Ms,handleConflictResolve:qe,missingRequiredFields:Ts}=na(s),Os=r.useMemo(()=>(t.accounts||[]).map(K=>({...K,provider:K.provider||o||s})),[t.accounts,o,s]),{data:Es}=rs({queryKey:["auth-tokens-raw"],queryFn:async()=>{const K=await fetch("/api/settings/auth/tokens/raw");return K.ok?K.json():{apiKey:{value:"ccs-internal-managed"}}},staleTime:6e4}),Ge=Es?.apiKey?.value??"ccs-internal-managed",_s=K=>{He({ANTHROPIC_BASE_URL:`http://127.0.0.1:${d??Ne}/api/provider/${q}`,ANTHROPIC_AUTH_TOKEN:Ge,...K}),U.success(`Applied "${K.ANTHROPIC_MODEL?.split("/").pop()||"preset"}" preset`)},Ds=(K,X)=>{He({ANTHROPIC_BASE_URL:`http://127.0.0.1:${d??Ne}/api/provider/${q}`,ANTHROPIC_AUTH_TOKEN:Ge,ANTHROPIC_MODEL:K.default,ANTHROPIC_DEFAULT_OPUS_MODEL:K.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:K.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:K.haiku}),U.success(`Applied ${X?`"${X}"`:"custom"} preset`),M(!1)},Rs=(K,X)=>{if(!X){U.error("Please enter a preset name to save");return}L.mutate({profile:s,data:{name:X,...K}}),M(!1)};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(da,{provider:s,displayName:a,logoProvider:i,data:$,isLoading:P,hasChanges:E,isRawJsonValid:Q,isSaving:Ke.isPending,isRemoteMode:c,port:d,onRefetch:O,onSave:()=>Ke.mutate()}),P?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(z,{className:"w-8 h-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading settings..."})]}):e.jsxs("div",{className:"flex-1 grid grid-cols-[40%_60%] divide-x overflow-hidden",children:[e.jsx("div",{className:"flex flex-col overflow-hidden bg-muted/5",children:e.jsxs(ht,{defaultValue:"config",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(ft,{className:"w-full",children:[e.jsx(Xe,{value:"config",className:"flex-1",children:"Model Config"}),e.jsx(Xe,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsx(Ye,{value:"config",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(ga,{provider:s,catalog:n,savedPresets:h,currentModel:V,opusModel:l,sonnetModel:F,haikuModel:J,providerModels:R,extendedContextEnabled:se,onExtendedContextToggle:ge,onApplyPreset:_s,onUpdateEnvValue:Ps,onOpenCustomPreset:()=>M(!0),onDeletePreset:K=>k.mutate({profile:s,name:K}),isDeletePending:k.isPending,accounts:Os,onAddAccount:g,onSetDefault:f,onRemoveAccount:m,onPauseToggle:w,onSoloMode:u,onBulkPause:j,onBulkResume:S,isRemovingAccount:x,isPausingAccount:v,isSoloingAccount:p,isBulkPausing:N,isBulkResuming:y,privacyMode:A,isRemoteMode:c})}),e.jsx(Ye,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(la,{provider:s,displayName:a,data:$,authStatus:t})})]})]})}),e.jsxs("div",{className:"flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-2 bg-muted/30 border-b flex items-center gap-2 shrink-0 h-[45px]",children:[e.jsx(Ut,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Raw Configuration (JSON)"})]}),e.jsx(gt,{rawJsonContent:I,isRawJsonValid:Q,rawJsonEdits:B,onRawJsonChange:As,profileEnv:$?.settings?.env,missingRequiredFields:Ts})]})]}),e.jsx(Ht,{open:Ms,title:"File Modified Externally",description:"This settings file was modified by another process. Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>qe(!0),onCancel:()=>qe(!1)}),e.jsx(oa,{open:b,onClose:()=>M(!1),currentValues:{default:V||"",opus:l||"",sonnet:F||"",haiku:J||""},onApply:Ds,onSave:Rs,isSaving:L.isPending,catalog:n,allModels:R})]})}function ja({status:s,isSelected:a,onSelect:t}){const n=s.accounts?.length||0;return e.jsxs("button",{className:G("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors cursor-pointer text-left",a?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:t,children:[e.jsx(Ue,{provider:s.provider,size:"md"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:s.displayName}),n>0&&e.jsx(H,{variant:"secondary",className:"text-[10px] h-4 px-1",children:n})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:s.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-green-600",children:"Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Re,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not connected"})]})})]})]})}function va({variant:s,parentAuth:a,isSelected:t,onSelect:n,onDelete:i,isDeleting:o}){return e.jsxs("button",{className:G("group w-full flex items-center gap-3 px-3 py-2 rounded-lg transition-colors cursor-pointer text-left pl-6",t?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:n,children:[e.jsxs("div",{className:"relative",children:[e.jsx(Ue,{provider:s.provider,size:"sm"}),e.jsx(bs,{className:"w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5 text-muted-foreground"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:"variant"})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:a?.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-3 h-3 text-green-600"}),e.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["via ",s.provider]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Re,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Parent not connected"})]})})]}),e.jsx(T,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:c=>{c.stopPropagation(),i()},disabled:o,children:e.jsx(ws,{className:"w-3 h-3"})})]})}function Na({onSetup:s}){return e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20",children:e.jsxs("div",{className:"text-center max-w-md px-8",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mx-auto mb-6",children:e.jsx(me,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"CCS Profile Manager"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Manage OAuth authentication, account preferences, and model selection for CLIProxy providers. Configure how CCS routes requests to different AI backends."}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-6",children:["For live usage stats and real-time monitoring, visit the"," ",e.jsx("a",{href:"/cliproxy/control-panel",className:"text-primary hover:underline",children:"Control Panel"}),"."]}),e.jsxs(T,{onClick:s,className:"gap-2",children:[e.jsx(ue,{className:"w-4 h-4"}),"Quick Setup"]})]})})}function Ia(){const s=ke(),{data:a,isLoading:t}=cs(),{data:n,isFetching:i}=jt(),{data:o}=vt(),c=Nt(),d=wt(),g=bt(),f=kt(),m=Ct(),w=yt(),u=St(),j=At(),[S,x]=r.useState(()=>typeof window<"u"?localStorage.getItem("cliproxy-selected-provider"):null),[v,p]=r.useState(null),[N,y]=r.useState(!1),[b,M]=r.useState(null),A=r.useMemo(()=>a?.authStatus||[],[a?.authStatus]),_=a?.source==="remote",D=r.useMemo(()=>n?.variants||[],[n?.variants]),L=l=>{x(l),l&&localStorage.setItem("cliproxy-selected-provider",l)},k=r.useMemo(()=>v?null:S&&A.some(l=>l.provider===S)?S:A.length>0&&(A.find(F=>(F.accounts?.length||0)>0)?.provider||A[0]?.provider)||null,[S,v,A]),h=A.find(l=>l.provider===k),C=D.find(l=>l.name===v),R=C?A.find(l=>l.provider===C.provider):void 0,q=(C?.provider||h?.provider||"").toLowerCase().trim(),$=q==="gemini"||q==="agy",P=()=>{s.invalidateQueries({queryKey:["cliproxy"]}),s.invalidateQueries({queryKey:["cliproxy-auth"]})},O=(l,F,J)=>{g.isPending||f.isPending||(J?g.mutate({provider:l,accountId:F}):f.mutate({provider:l,accountId:F}))},I=(l,F)=>{m.isPending||m.mutate({provider:l,accountId:F})},B=(l,F)=>{w.isPending||w.mutate({provider:l,accountIds:F})},Q=(l,F)=>{u.isPending||u.mutate({provider:l,accountIds:F})},E=l=>{L(l),p(null)},V=l=>{p(l),L(null)};return e.jsxs("div",{className:"h-[calc(100vh-100px)] flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/30",children:[e.jsxs("div",{className:"p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(me,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:o?.backendLabel??"CLIProxy"})]}),e.jsx(T,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:P,disabled:i,children:e.jsx(De,{className:G("w-4 h-4",i&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"CCS-level account management"}),e.jsxs(T,{variant:"default",size:"sm",className:"w-full gap-2",onClick:()=>y(!0),children:[e.jsx(ue,{className:"w-4 h-4"}),"Quick Setup"]})]}),e.jsx(Ee,{className:"flex-1",children:e.jsxs("div",{className:"p-2",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2",children:"Providers"}),t?e.jsx("div",{className:"space-y-2 px-2",children:[1,2,3,4].map(l=>e.jsx(Pt,{className:"h-14 w-full rounded-lg"},l))}):e.jsx("div",{className:"space-y-1",children:A.map(l=>e.jsx(ja,{status:l,isSelected:k===l.provider,onSelect:()=>E(l.provider)},l.provider))}),D.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2 mt-4 flex items-center gap-1.5",children:[e.jsx(bs,{className:"w-3 h-3"}),"Variants"]}),e.jsx("div",{className:"space-y-1",children:D.map(l=>e.jsx(va,{variant:l,parentAuth:A.find(F=>F.provider===l.provider),isSelected:v===l.name,onSelect:()=>V(l.name),onDelete:()=>j.mutate(l.name),isDeleting:j.isPending},l.name))})]})]})}),e.jsx("div",{className:"p-3 border-t",children:e.jsx(Kt,{})}),e.jsx("div",{className:"p-3 border-t bg-background text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{children:[A.length," provider",A.length!==1?"s":""]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(W,{className:"w-3 h-3 text-green-600"}),A.filter(l=>l.authenticated).length," connected"]})]})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background",children:[$&&e.jsx(ys,{className:"mx-4 mt-4"}),C&&R?e.jsx(is,{provider:C.name,displayName:`${C.name} (${C.provider} variant)`,authStatus:R,catalog:de[C.provider],logoProvider:C.provider,baseProvider:C.provider,isRemoteMode:_,port:C.port,onAddAccount:()=>M({provider:C.provider,displayName:R.displayName,isFirstAccount:(R.accounts?.length||0)===0}),onSetDefault:l=>c.mutate({provider:C.provider,accountId:l}),onRemoveAccount:l=>d.mutate({provider:C.provider,accountId:l}),onPauseToggle:(l,F)=>O(C.provider,l,F),onSoloMode:l=>I(C.provider,l),onBulkPause:l=>B(C.provider,l),onBulkResume:l=>Q(C.provider,l),isRemovingAccount:d.isPending,isPausingAccount:g.isPending||f.isPending,isSoloingAccount:m.isPending,isBulkPausing:w.isPending,isBulkResuming:u.isPending}):h?e.jsx(is,{provider:h.provider,displayName:h.displayName,authStatus:h,catalog:de[h.provider],isRemoteMode:_,onAddAccount:()=>M({provider:h.provider,displayName:h.displayName,isFirstAccount:(h.accounts?.length||0)===0}),onSetDefault:l=>c.mutate({provider:h.provider,accountId:l}),onRemoveAccount:l=>d.mutate({provider:h.provider,accountId:l}),onPauseToggle:(l,F)=>O(h.provider,l,F),onSoloMode:l=>I(h.provider,l),onBulkPause:l=>B(h.provider,l),onBulkResume:l=>Q(h.provider,l),isRemovingAccount:d.isPending,isPausingAccount:g.isPending||f.isPending,isSoloingAccount:m.isPending,isBulkPausing:w.isPending,isBulkResuming:u.isPending}):e.jsx(Na,{onSetup:()=>y(!0)})]}),e.jsx(Jt,{open:N,onClose:()=>y(!1)}),e.jsx(Zt,{open:b!==null,onClose:()=>M(null),provider:b?.provider||"",displayName:b?.displayName||"",isFirstAccount:b?.isFirstAccount||!1})]})}export{Ia as CliproxyPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-DKgfU5rd.js";import{r as s}from"./react-vendor-CNOkPC89.js";import{u as k}from"./tanstack-5ndrQy-j.js";import{ae as K,aU as M}from"./index-8n-yIlea.js";import{C as P}from"./default-ports-1QQSffYX.js";import{G as F,R as L,a1 as H,a2 as q,K as G,S as W,X as _}from"./icons-DGASzt3M.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-C-pVd1--.js";import"./code-highlight-BRUf_pqB.js";function z({port:c=P}){const i=s.useRef(null),[$,b]=s.useState(null),[R,E]=s.useState(0),[g,m]=s.useState(null),[S,d]=s.useState(!1),[I,U]=s.useState(!0),{data:j,error:f}=k({queryKey:["cliproxy-server-config"],queryFn:()=>K.cliproxyServer.get(),staleTime:3e4}),{data:y}=k({queryKey:["auth-tokens-raw"],queryFn:async()=>{const t=await fetch(M("/settings/auth/tokens/raw"));if(!t.ok)throw new Error("Failed to fetch auth tokens");return t.json()},staleTime:3e4});s.useEffect(()=>{f&&console.warn("[ControlPanelEmbed] Config fetch failed, using local mode:",f)},[f]);const{managementUrl:n,checkUrl:u,authToken:r,isRemote:l,displayHost:x}=s.useMemo(()=>{const t=j?.remote;if(t?.enabled&&t?.host){const o=t.protocol||"http",a=t.port||(o==="https"?443:P),v=o==="https"&&a===443||o==="http"&&a===80?"":`:${a}`,w=`${o}://${t.host}${v}`;return{managementUrl:`${w}/management.html`,checkUrl:`${w}/`,authToken:t.auth_token||void 0,isRemote:!0,displayHost:`${t.host}${v}`}}const h=y?.managementSecret?.value||"ccs";return{managementUrl:`http://localhost:${c}/management.html`,checkUrl:`http://localhost:${c}/`,authToken:h,isRemote:!1,displayHost:`localhost:${c}`}},[j,y,c]),p=$===n,N=!p;s.useEffect(()=>{const t=new AbortController,h=async()=>{try{(await fetch(u,{signal:t.signal})).ok?(d(!0),m(null)):(d(!1),m(l?`Remote CLIProxy at ${x} returned an error`:"CLIProxy returned an error"))}catch(a){if(a instanceof Error&&a.name==="AbortError")return;d(!1),m(l?`Remote CLIProxy at ${x} is not reachable`:"CLIProxy is not running")}},o=setTimeout(()=>t.abort(),2e3);return h().finally(()=>clearTimeout(o)),()=>t.abort()},[u,l,x]);const C=s.useCallback(()=>{if(!(!p||!i.current?.contentWindow||!r))try{const t=u.replace(/\/$/,"");if(!i.current.src.startsWith(t)){console.warn("[ControlPanelEmbed] Iframe origin mismatch, skipping postMessage");return}i.current.contentWindow.postMessage({type:"ccs-auto-login",apiBase:t,managementKey:r},t)}catch(t){console.debug("[ControlPanelEmbed] postMessage failed - cross-origin:",t)}},[r,u,p]);s.useEffect(()=>{C()},[C]);const T=s.useCallback(()=>{b(n)},[n]),A=()=>{b(null),E(t=>t+1),m(null),d(!1)};return!S&&g?e.jsxs("div",{className:"flex-1 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"font-semibold",children:"CLIProxy Control Panel"})]}),e.jsxs("button",{className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm border rounded-md hover:bg-muted",onClick:A,children:[e.jsx(L,{className:"w-4 h-4"}),"Retry"]})]}),e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20",children:e.jsxs("div",{className:"text-center max-w-md px-8",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center mx-auto mb-6",children:e.jsx(H,{className:"w-8 h-8 text-destructive"})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"CLIProxy Not Available"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:g}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Start a CLIProxy session with"," ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"ccs gemini"})," or run"," ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"ccs config"})," which auto-starts it."]})]})})]}):e.jsxs("div",{className:"flex-1 flex flex-col relative",children:[I&&!N&&e.jsx("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20",children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800 rounded-md text-sm",children:[l&&e.jsxs(e.Fragment,{children:[e.jsx(q,{className:"h-3.5 w-3.5 text-green-600"}),e.jsx("span",{className:"text-green-600 font-medium",children:"Remote"}),e.jsx("span",{className:"text-blue-300 dark:text-blue-700",children:"|"})]}),e.jsx(G,{className:"h-3.5 w-3.5 text-blue-600"}),e.jsxs("span",{children:["Key:"," ",e.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded font-mono font-semibold",children:r&&r.length>4?`***${r.slice(-4)}`:r||"ccs"})]}),e.jsx("a",{href:"/settings?tab=auth",className:"text-blue-600 hover:text-blue-800 dark:hover:text-blue-400",title:"Manage auth tokens",children:e.jsx(W,{className:"h-3.5 w-3.5"})}),e.jsx("button",{className:"text-blue-600 hover:text-blue-800 dark:hover:text-blue-400",onClick:()=>U(!1),children:e.jsx(_,{className:"h-3.5 w-3.5"})})]})}),N&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/80 z-10",children:e.jsxs("div",{className:"text-center",children:[e.jsx(L,{className:"w-8 h-8 animate-spin text-primary mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l?`Loading Control Panel from ${x}...`:"Loading Control Panel..."})]})}),e.jsx("iframe",{ref:i,src:n,className:"flex-1 w-full border-0",title:"CLIProxy Management Panel",onLoad:T},`${n}:${R}`)]})}function te(){return e.jsx("div",{className:"h-[calc(100vh-100px)] flex flex-col",children:e.jsx(z,{})})}export{te as CliproxyControlPanelPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as h}from"./react-vendor-CNOkPC89.js";const _=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,c,o)=>o?o.toUpperCase():c.toLowerCase()),s=t=>{const a=M(t);return a.charAt(0).toUpperCase()+a.slice(1)},k=(...t)=>t.filter((a,c,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===c).join(" ").trim(),v=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var x={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const m=h.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:d="",children:n,iconNode:r,...y},i)=>h.createElement("svg",{ref:i,...x,width:a,height:a,stroke:t,strokeWidth:o?Number(c)*24/Number(a):c,className:k("lucide",d),...!n&&!v(y)&&{"aria-hidden":"true"},...y},[...r.map(([p,l])=>h.createElement(p,l)),...Array.isArray(n)?n:[n]]));const e=(t,a)=>{const c=h.forwardRef(({className:o,...d},n)=>h.createElement(m,{ref:n,iconNode:a,className:k(`lucide-${_(s(t))}`,`lucide-${t}`,o),...d}));return c.displayName=s(t),c};const g=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],l2=e("activity",g);const w=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],_2=e("archive",w);const f=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],M2=e("arrow-down-left",f);const $=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],v2=e("arrow-down-right",$);const N=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],x2=e("arrow-down",N);const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],m2=e("arrow-left",u);const z=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],g2=e("arrow-right",z);const b=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],w2=e("arrow-up-right",b);const C=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],f2=e("arrow-up",C);const A=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],$2=e("book-open",A);const j=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],N2=e("bot",j);const q=[["path",{d:"M21 8a2 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:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],u2=e("box",q);const H=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],z2=e("brain",H);const V=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],b2=e("bug",V);const L=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],C2=e("calendar",L);const S=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],A2=e("chart-column",S);const B=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],j2=e("chart-pie",B);const P=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],q2=e("check",P);const R=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],H2=e("chevron-down",R);const E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],V2=e("chevron-left",E);const D=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],L2=e("chevron-right",D);const F=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],S2=e("chevron-up",F);const U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],B2=e("circle-alert",U);const G=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],P2=e("circle-check-big",G);const O=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],R2=e("circle-check",O);const W=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],E2=e("circle-question-mark",W);const T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],D2=e("circle-x",T);const Z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],F2=e("circle",Z);const I=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],U2=e("clock",I);const K=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],G2=e("cloud",K);const X=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],O2=e("code-xml",X);const J=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],W2=e("code",J);const Q=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],T2=e("coins",Q);const Y=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Z2=e("copy",Y);const e1=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],I2=e("cpu",e1);const a1=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],K2=e("database",a1);const t1=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],X2=e("dollar-sign",t1);const c1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],J2=e("download",c1);const o1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Q2=e("ellipsis",o1);const n1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Y2=e("external-link",n1);const h1=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],e0=e("eye-off",h1);const d1=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],a0=e("eye",d1);const y1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],t0=e("file-braces",y1);const s1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],c0=e("file-code",s1);const k1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],o0=e("file-down",k1);const r1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n0=e("file-exclamation-point",r1);const i1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],h0=e("file-text",i1);const p1=[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z",key:"1u1bxd"}]],d0=e("folder-code",p1);const l1=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],y0=e("folder-open",l1);const _1=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],s0=e("gauge",_1);const M1=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],k0=e("git-branch",M1);const v1=[["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"}]],r0=e("github",v1);const x1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],i0=e("globe",x1);const m1=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],p0=e("grip-horizontal",m1);const g1=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],l0=e("grip-vertical",g1);const w1=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],_0=e("heart",w1);const f1=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],M0=e("house",f1);const $1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],v0=e("info",$1);const N1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],x0=e("key-round",N1);const u1=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],m0=e("key",u1);const z1=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],g0=e("laptop",z1);const b1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],w0=e("loader-circle",b1);const C1=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],f0=e("lock",C1);const A1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],$0=e("log-out",A1);const j1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],N0=e("monitor",j1);const q1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],u0=e("moon",q1);const H1=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],z0=e("network",H1);const V1=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 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.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],b0=e("package",V1);const L1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],C0=e("panel-left",L1);const S1=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],A0=e("pause",S1);const B1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],j0=e("play",B1);const P1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],q0=e("plus",P1);const R1=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],H0=e("power-off",R1);const E1=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],V0=e("power",E1);const D1=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],L0=e("radio",D1);const F1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],S0=e("refresh-cw",F1);const U1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],B0=e("rotate-ccw",U1);const G1=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],P0=e("rotate-cw",G1);const O1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],R0=e("save",O1);const W1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],E0=e("search",W1);const T1=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],D0=e("server",T1);const Z1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],F0=e("settings-2",Z1);const I1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],U0=e("settings",I1);const K1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],G0=e("shield-check",K1);const X1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],O0=e("shield",X1);const J1=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],W0=e("sparkles",J1);const Q1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],T0=e("square",Q1);const Y1=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Z0=e("star",Y1);const e2=[["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"}]],I0=e("sun",e2);const a2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],K0=e("terminal",a2);const t2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],X0=e("trash-2",t2);const c2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],J0=e("trending-up",c2);const o2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Q0=e("triangle-alert",o2);const n2=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Y0=e("user",n2);const h2=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],ee=e("users",h2);const d2=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],ae=e("wand-sparkles",d2);const y2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],te=e("wifi-off",y2);const s2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],ce=e("wifi",s2);const k2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],oe=e("wrench",k2);const r2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ne=e("x",r2);const i2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],he=e("zap",i2);export{q0 as $,l2 as A,$2 as B,A2 as C,w2 as D,e0 as E,y0 as F,s0 as G,M0 as H,v0 as I,M2 as J,m0 as K,w0 as L,u0 as M,h0 as N,n0 as O,C0 as P,p0 as Q,S0 as R,U0 as S,Q0 as T,ee as U,S2 as V,te as W,ne as X,H2 as Y,he as Z,F0 as _,r0 as a,W0 as a0,B2 as a1,i0 as a2,z2 as a3,D0 as a4,_2 as a5,c0 as a6,V2 as a7,f0 as a8,X2 as a9,N2 as aA,b0 as aB,G2 as aC,g0 as aD,u2 as aE,b2 as aF,o0 as aG,P0 as aH,T0 as aI,x2 as aJ,f2 as aK,K2 as aa,v2 as ab,C2 as ac,T2 as ad,J0 as ae,j2 as af,X0 as ag,R0 as ah,E0 as ai,ae as aj,O2 as ak,g2 as al,t0 as am,m2 as an,J2 as ao,Z0 as ap,z0 as aq,d0 as ar,Q2 as as,E2 as at,k0 as au,V0 as av,H0 as aw,G0 as ax,oe as ay,N0 as az,L2 as b,I0 as c,a0 as d,ce as e,O0 as f,_0 as g,P2 as h,F2 as i,q2 as j,x0 as k,Z2 as l,Y2 as m,Y0 as n,$0 as o,U2 as p,R2 as q,D2 as r,j0 as s,A0 as t,l0 as u,B0 as v,L0 as w,I2 as x,K0 as y,W2 as z};
|