@kaitranntt/ccs 7.75.0-dev.9 → 7.76.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.
Files changed (134) hide show
  1. package/dist/auth/profile-registry.d.ts.map +1 -1
  2. package/dist/auth/profile-registry.js +9 -0
  3. package/dist/auth/profile-registry.js.map +1 -1
  4. package/dist/ccs.js +77 -9
  5. package/dist/ccs.js.map +1 -1
  6. package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
  7. package/dist/cliproxy/auth/oauth-handler.js +20 -0
  8. package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
  9. package/dist/cliproxy/binary/platform-detector.d.ts +4 -4
  10. package/dist/cliproxy/binary/platform-detector.d.ts.map +1 -1
  11. package/dist/cliproxy/binary/platform-detector.js +2 -2
  12. package/dist/cliproxy/binary/platform-detector.js.map +1 -1
  13. package/dist/cliproxy/quota/quota-fetcher.d.ts.map +1 -1
  14. package/dist/cliproxy/quota/quota-fetcher.js +28 -9
  15. package/dist/cliproxy/quota/quota-fetcher.js.map +1 -1
  16. package/dist/commands/command-catalog.d.ts.map +1 -1
  17. package/dist/commands/command-catalog.js +4 -0
  18. package/dist/commands/command-catalog.js.map +1 -1
  19. package/dist/commands/doctor-command.d.ts.map +1 -1
  20. package/dist/commands/doctor-command.js +9 -0
  21. package/dist/commands/doctor-command.js.map +1 -1
  22. package/dist/copilot/copilot-auth.d.ts.map +1 -1
  23. package/dist/copilot/copilot-auth.js +22 -0
  24. package/dist/copilot/copilot-auth.js.map +1 -1
  25. package/dist/copilot/copilot-daemon.d.ts.map +1 -1
  26. package/dist/copilot/copilot-daemon.js +26 -0
  27. package/dist/copilot/copilot-daemon.js.map +1 -1
  28. package/dist/copilot/copilot-executor.d.ts.map +1 -1
  29. package/dist/copilot/copilot-executor.js +22 -0
  30. package/dist/copilot/copilot-executor.js.map +1 -1
  31. package/dist/cursor/cursor-daemon.d.ts.map +1 -1
  32. package/dist/cursor/cursor-daemon.js +28 -1
  33. package/dist/cursor/cursor-daemon.js.map +1 -1
  34. package/dist/cursor/cursor-executor.d.ts.map +1 -1
  35. package/dist/cursor/cursor-executor.js +17 -1
  36. package/dist/cursor/cursor-executor.js.map +1 -1
  37. package/dist/delegation/delegation-handler.d.ts.map +1 -1
  38. package/dist/delegation/delegation-handler.js +4 -1
  39. package/dist/delegation/delegation-handler.js.map +1 -1
  40. package/dist/glmt/glmt-proxy.d.ts.map +1 -1
  41. package/dist/glmt/glmt-proxy.js +7 -0
  42. package/dist/glmt/glmt-proxy.js.map +1 -1
  43. package/dist/glmt/glmt-transformer.d.ts.map +1 -1
  44. package/dist/glmt/glmt-transformer.js +1 -3
  45. package/dist/glmt/glmt-transformer.js.map +1 -1
  46. package/dist/management/instance-manager.d.ts.map +1 -1
  47. package/dist/management/instance-manager.js +9 -0
  48. package/dist/management/instance-manager.js.map +1 -1
  49. package/dist/proxy/server/messages-route.d.ts.map +1 -1
  50. package/dist/proxy/server/messages-route.js +27 -7
  51. package/dist/proxy/server/messages-route.js.map +1 -1
  52. package/dist/proxy/server/proxy-server.d.ts.map +1 -1
  53. package/dist/proxy/server/proxy-server.js +24 -6
  54. package/dist/proxy/server/proxy-server.js.map +1 -1
  55. package/dist/services/logging/index.d.ts +6 -1
  56. package/dist/services/logging/index.d.ts.map +1 -1
  57. package/dist/services/logging/index.js +16 -1
  58. package/dist/services/logging/index.js.map +1 -1
  59. package/dist/services/logging/log-context.d.ts +41 -0
  60. package/dist/services/logging/log-context.d.ts.map +1 -0
  61. package/dist/services/logging/log-context.js +51 -0
  62. package/dist/services/logging/log-context.js.map +1 -0
  63. package/dist/services/logging/log-redaction.d.ts +8 -0
  64. package/dist/services/logging/log-redaction.d.ts.map +1 -1
  65. package/dist/services/logging/log-redaction.js +40 -3
  66. package/dist/services/logging/log-redaction.js.map +1 -1
  67. package/dist/services/logging/log-types.d.ts +30 -0
  68. package/dist/services/logging/log-types.d.ts.map +1 -1
  69. package/dist/services/logging/log-types.js +15 -1
  70. package/dist/services/logging/log-types.js.map +1 -1
  71. package/dist/services/logging/logger.d.ts +17 -0
  72. package/dist/services/logging/logger.d.ts.map +1 -1
  73. package/dist/services/logging/logger.js +23 -4
  74. package/dist/services/logging/logger.js.map +1 -1
  75. package/dist/targets/claude-adapter.d.ts.map +1 -1
  76. package/dist/targets/claude-adapter.js +11 -0
  77. package/dist/targets/claude-adapter.js.map +1 -1
  78. package/dist/targets/codex-adapter.d.ts.map +1 -1
  79. package/dist/targets/codex-adapter.js +11 -0
  80. package/dist/targets/codex-adapter.js.map +1 -1
  81. package/dist/targets/droid-adapter.d.ts.map +1 -1
  82. package/dist/targets/droid-adapter.js +11 -0
  83. package/dist/targets/droid-adapter.js.map +1 -1
  84. package/dist/ui/assets/{accounts-C11yNnFn.js → accounts-CybVGDsm.js} +1 -1
  85. package/dist/ui/assets/{alert-dialog-BDhZ9T12.js → alert-dialog-C6npAhT0.js} +1 -1
  86. package/dist/ui/assets/{api-DXFMasvG.js → api-DZosWVkR.js} +1 -1
  87. package/dist/ui/assets/{auth-section-BQpO_21y.js → auth-section-D4MZkgcP.js} +1 -1
  88. package/dist/ui/assets/{backups-section-BM2lP-ap.js → backups-section-DvMJrmHH.js} +1 -1
  89. package/dist/ui/assets/{channels-qstH8YTZ.js → channels-BVftYfOn.js} +1 -1
  90. package/dist/ui/assets/{charts-BBPXh0Ar.js → charts-CeK2xCSo.js} +1 -1
  91. package/dist/ui/assets/{checkbox-BPx7K8To.js → checkbox-BLRznRTO.js} +1 -1
  92. package/dist/ui/assets/{claude-extension-BD6uQlc-.js → claude-extension-C6OeBQ73.js} +1 -1
  93. package/dist/ui/assets/cliproxy-B3Jyu3r9.js +3 -0
  94. package/dist/ui/assets/{cliproxy-ai-providers-BNffQh5X.js → cliproxy-ai-providers-BAJ78pUc.js} +1 -1
  95. package/dist/ui/assets/{cliproxy-control-panel-CjExrU2o.js → cliproxy-control-panel-XEvUMVJe.js} +1 -1
  96. package/dist/ui/assets/{code-highlight-BRUf_pqB.js → code-highlight-D4E79GKQ.js} +1 -1
  97. package/dist/ui/assets/{codex-Dd2XIT8b.js → codex-CY2vikqX.js} +1 -1
  98. package/dist/ui/assets/{confirm-dialog-BZP3xwZi.js → confirm-dialog-DjLHh1qX.js} +1 -1
  99. package/dist/ui/assets/{copilot-gf-rTcY8.js → copilot-afee2lL9.js} +1 -1
  100. package/dist/ui/assets/{cursor-CJGCGy-H.js → cursor-DuWy60wp.js} +1 -1
  101. package/dist/ui/assets/{droid-D1Wq6rRO.js → droid-FlceoQ6k.js} +1 -1
  102. package/dist/ui/assets/{form-utils-Bcoyqxpq.js → form-utils-CuHzLhJZ.js} +1 -1
  103. package/dist/ui/assets/{globalenv-section-DBqYbsuu.js → globalenv-section-DpJ7unxC.js} +1 -1
  104. package/dist/ui/assets/{health-DW8M92nq.js → health-BEMgcKD3.js} +1 -1
  105. package/dist/ui/assets/icons-DQFHtVq5.js +1 -0
  106. package/dist/ui/assets/{index-JIaHpwil.js → index-0GkznW41.js} +1 -1
  107. package/dist/ui/assets/{index-B0dun58L.js → index-0n_43sCZ.js} +1 -1
  108. package/dist/ui/assets/index-6xrth3Oz.css +1 -0
  109. package/dist/ui/assets/{index-ubH9RpKo.js → index-BRtgic66.js} +3 -3
  110. package/dist/ui/assets/{index-BczU222d.js → index-Ba4ysocb.js} +1 -1
  111. package/dist/ui/assets/{index-CoeauyY0.js → index-Cj7EjEq6.js} +1 -1
  112. package/dist/ui/assets/{index-IiaQMFco.js → index-Cq9VySs6.js} +1 -1
  113. package/dist/ui/assets/{index-B5cw5Mhf.js → index-DOC7_hun.js} +1 -1
  114. package/dist/ui/assets/logs-Dth4naJl.js +1 -0
  115. package/dist/ui/assets/{masked-input-Bmo6mlTB.js → masked-input-DL6pJ8pE.js} +1 -1
  116. package/dist/ui/assets/{notifications-B2HqRBj7.js → notifications-B4_o8bcr.js} +1 -1
  117. package/dist/ui/assets/{proxy-g4_N-fbB.js → proxy-C4-M_9kB.js} +1 -1
  118. package/dist/ui/assets/{proxy-status-widget-EX_Raok7.js → proxy-status-widget-DW4cPFeD.js} +1 -1
  119. package/dist/ui/assets/{radix-ui-Zb8sVEtn.js → radix-ui-nu4wz29m.js} +1 -1
  120. package/dist/ui/assets/{raw-json-settings-editor-panel-C4DFuY4g.js → raw-json-settings-editor-panel-Dcumu3Qi.js} +1 -1
  121. package/dist/ui/assets/{react-vendor-CNOkPC89.js → react-vendor-Bjx91N7w.js} +1 -1
  122. package/dist/ui/assets/{searchable-select-CLhlrHkQ.js → searchable-select-CWL2D5Ft.js} +1 -1
  123. package/dist/ui/assets/{separator-BEJQ4e4O.js → separator-Do_vqTQD.js} +1 -1
  124. package/dist/ui/assets/{shared-4QlIu64T.js → shared-CwWuZx24.js} +1 -1
  125. package/dist/ui/assets/{table-B6xzmyfm.js → table-BP6nBZzg.js} +1 -1
  126. package/dist/ui/assets/{tanstack-CrmUhA7Z.js → tanstack-bhJxV1h8.js} +1 -1
  127. package/dist/ui/assets/{updates-DBkXWRpR.js → updates-BTHJZ7Rk.js} +1 -1
  128. package/dist/ui/index.html +9 -9
  129. package/package.json +1 -1
  130. package/scripts/run-test-bucket.js +2 -0
  131. package/dist/ui/assets/cliproxy-5-BIu9Wb.js +0 -3
  132. package/dist/ui/assets/icons-DyorC3Xk.js +0 -1
  133. package/dist/ui/assets/index-Bbiq6Xkt.css +0 -1
  134. package/dist/ui/assets/logs-DbWcj2t5.js +0 -1
@@ -1,3 +0,0 @@
1
- import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as d}from"./react-vendor-CNOkPC89.js";import{a as ht,u as $t,b as Ss}from"./tanstack-CrmUhA7Z.js";import{a8 as Ms,a as W,d as K,C as Wt,b as Qt,a9 as Jt,aa as Xt,c as X,P as gt,B as H,ab as ue,L as Y,I as de,r as qe,s as ze,t as Ge,v as Be,w as ye,ac as Yt,ad as Zt,ae as Ps,af as Ds,ag as Is,u as es,ah as ft,ai as vt,aj as jt,ak as bt,W as me,al as ts,am as It,an as Es,ao as Ts,ap as Qe,aq as ss,Y as Ve,ar as Rs,as as Et,at as Tt,au as Ls,av as Os,aw as _s,ax as Fs,ay as Us,az as Ks,aA as Hs,aB as qs,aC as Rt,aD as zs,x as as,aE as Gs,n as Nt,aF as Bs,aG as yt,aH as Lt,aI as ns,aJ as Vs,m as $s,aK as Ws,aL as Qs,aM as lt,T as dt,p as ct,q as ut,aN as Js,aO as Xs,aP as Ys,aQ as Ot,aR as Zs,aS as ea,aT as ta,aU as sa,aV as aa,aW as na,Q as ia,R as ra,U as _t,V as Ft,aX as oa,aY as la,aZ as da,a_ as ca,a$ as ua,b0 as ma,b1 as pa,b2 as xa,b3 as ha,b4 as ga,b5 as fa,b6 as va,b7 as ja,S as ba}from"./index-ubH9RpKo.js";import{C as mt}from"./default-ports-1QQSffYX.js";import{t as B}from"./notifications-B2HqRBj7.js";import{C as is,L as ce,p as ke,$ as Na,m as we,o as rs,aG as kt,R as wt,q as Pe,aa as De,T as Je,a7 as Ut,aH as os,aF as ya,z as Ct,Z as Ie,_ as ls,i as ka,u as ds,aI as wa,au as Ca,X as At,a9 as cs,J as us,D as ms,aJ as Aa,at as ps,aK as Sa,ax as Ma,aL as xs}from"./icons-DyorC3Xk.js";import{R as $e,A as Kt,D as at,i as Pa,a as Da}from"./antigravity-responsibility-constants-Bvh4Ybz0.js";import{C as We}from"./checkbox-BPx7K8To.js";import{C as Ia}from"./confirm-dialog-BZP3xwZi.js";import{S as St}from"./separator-BEJQ4e4O.js";import{S as Ea}from"./searchable-select-CLhlrHkQ.js";import{P as Ta}from"./proxy-status-widget-EX_Raok7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-BDhZ9T12.js";const se="gemini-3.1-pro-high",Ce="gemini-3.1-pro-low",Ra=Object.freeze({"gemini-3-pro-high":se,"gemini-3.1-pro-high":se,"gemini-3-pro-low":Ce,"gemini-3.1-pro-low":Ce,"gemini-3-pro-preview":se,"gemini-3-pro-preview-customtools":se,"gemini-3.1-pro-preview":se,"gemini-3.1-pro-preview-customtools":se,"gemini-3-1-pro-preview":se,"gemini-3-1-pro-preview-customtools":se}),hs=Object.freeze({"gemini-3-pro-preview":"gemini-3.1-pro-preview","gemini-3.1-pro-preview":"gemini-3-pro-preview","gemini-3-flash-preview":"gemini-3.1-flash-preview","gemini-3.1-flash-preview":"gemini-3-flash-preview"}),La=/^gemini-(\d+(?:[.-]\d+)*)-(pro|flash)-preview(-customtools)?$/i,Oa=["agy/","gcli/"];function J(t){return Ms(t).toLowerCase()}function _a(t){const a=t.trim(),s=a.toLowerCase();for(const i of Oa)if(s.startsWith(i))return a.slice(i.length);return a}function Fa(t){return t.replace(/-customtools$/i,"")}function Ua(t){return Ra[J(t)]}function Xe(t){const a=J(t),s=a.match(La);if(!s)return null;const[,i,n,c]=s;return{normalizedId:a,version:i.split(/[.-]/).map(l=>Number(l)),family:n,customtools:!!c,dottedVersion:i.includes(".")}}function gs(t,a){const s=Math.max(t.length,a.length);for(let i=0;i<s;i+=1){const n=t[i]??0,c=a[i]??0;if(n!==c)return n>c?1:-1}return 0}function Ka(t,a,s){if(t.customtools!==a.customtools)return t.customtools?1:-1;const i=gs(t.version,a.version);if(i!==0)return i>0?-1:1;const n=+(t.dottedVersion===s.dottedVersion),c=+(a.dottedVersion===s.dottedVersion);return n!==c?c-n:t.normalizedId.localeCompare(a.normalizedId)}function Ht(t,a){const s=J(a);return t.find(i=>J(i.id)===s)?.id}function Ha(t,a){const s=Xe(t);return!s||a.length===0?void 0:a.map(n=>{const c=Xe(n.id);return!c||c.family!==s.family?null:{id:n.id,info:c}}).filter(n=>!!n).sort((n,c)=>Ka(n.info,c.info,s))[0]?.id}const xe={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",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Latest Sonnet with thinking budget support",presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6",haiku:"claude-sonnet-4-6"}},{id:se,name:"Gemini Pro High",description:"Current Antigravity Gemini Pro route with higher reasoning budget",extendedContext:!0,presetMapping:{default:se,opus:se,sonnet:se,haiku:"gemini-3-1-flash-preview"}},{id:Ce,name:"Gemini Pro Low",description:"Current Antigravity Gemini Pro route with the lighter quota tier",extendedContext:!0,presetMapping:{default:Ce,opus:Ce,sonnet:Ce,haiku:"gemini-3-1-flash-preview"}},{id:"gemini-3-1-flash-preview",name:"Gemini Flash",description:"Resolves to the best advertised Gemini Flash preview via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3-1-flash-preview",opus:se,sonnet:se,haiku:"gemini-3-1-flash-preview"}}]},gemini:{provider:"gemini",displayName:"Gemini",defaultModel:"gemini-2.5-pro",models:[{id:"gemini-3.1-pro-preview",name:"Gemini Pro",tier:"paid",description:"Uses the best advertised Gemini Pro preview when Google exposes one",extendedContext:!0,presetMapping:{default:"gemini-3.1-pro-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini Flash",tier:"paid",description:"Uses the best advertised Gemini Flash preview when Google exposes one",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-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-codex",models:[{id:"gpt-5.5",name:"GPT-5.5",tier:"paid",description:"Newest Codex-only GPT-5 family model",codexMaxEffort:"xhigh",presetMapping:{default:"gpt-5.5",opus:"gpt-5.5",sonnet:"gpt-5.5",haiku:"gpt-5-codex-mini"}},{id:"gpt-5-codex",name:"GPT-5 Codex",description:"Cross-plan safe Codex default",codexMaxEffort:"xhigh",presetMapping:{default:"gpt-5-codex",opus:"gpt-5-codex",sonnet:"gpt-5-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5-codex-mini",name:"GPT-5 Codex Mini",description:"Faster and cheaper Codex option",codexMaxEffort:"high",presetMapping:{default:"gpt-5-codex-mini",opus:"gpt-5-codex",sonnet:"gpt-5-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"Legacy mini model ID kept for backwards compatibility",codexMaxEffort:"high",presetMapping:{default:"gpt-5-mini",opus:"gpt-5-codex",sonnet:"gpt-5-mini",haiku:"gpt-5-mini"}},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini",description:"Legacy fast Codex mini model",codexMaxEffort:"high",presetMapping:{default:"gpt-5.1-codex-mini",opus:"gpt-5.1-codex-max",sonnet:"gpt-5.1-codex-max",haiku:"gpt-5.1-codex-mini"}},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max",description:"Higher-effort Codex model with xhigh support",codexMaxEffort:"xhigh",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-codex",name:"GPT-5.2 Codex",description:"Cross-plan Codex model with xhigh support",codexMaxEffort:"xhigh",presetMapping:{default:"gpt-5.2-codex",opus:"gpt-5.2-codex",sonnet:"gpt-5.2-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",tier:"paid",description:"Paid Codex plans only",codexMaxEffort:"xhigh",presetMapping:{default:"gpt-5.3-codex",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",tier:"paid",description:"Paid Codex plans only, ultra-fast coding model",codexMaxEffort:"xhigh",presetMapping:{default:"gpt-5.3-codex-spark",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.4",name:"GPT-5.4",tier:"paid",description:"Paid Codex plans only, latest GPT-5 family model",codexMaxEffort:"xhigh",presetMapping:{default:"gpt-5.4",opus:"gpt-5.4",sonnet:"gpt-5.4",haiku:"gpt-5-codex-mini"}}]},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:"qwen3-coder-plus",models:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus",description:"Recommended default for iFlow accounts",presetMapping:{default:"qwen3-coder-plus",opus:"qwen3-coder-plus",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-plus"}},{id:"qwen3-max",name:"Qwen3 Max",description:"Flagship Qwen model via iFlow"},{id:"kimi-k2",name:"Kimi K2",description:"Kimi model currently available via iFlow"},{id:"deepseek-v3.2",name:"DeepSeek V3.2",description:"Current DeepSeek V3.2 model via iFlow"},{id:"deepseek-r1",name:"DeepSeek R1",description:"Reasoning-focused DeepSeek model"},{id:"glm-4.6",name:"GLM 4.6",description:"Zhipu GLM 4.6 via iFlow"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus",description:"Vision-language 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-6",models:[{id:"kiro-claude-opus-4-6",name:"Kiro Claude Opus 4.6",description:"Claude Opus 4.6 via Kiro (2.2x credit)",presetMapping:{default:"kiro-claude-opus-4-6",opus:"kiro-claude-opus-4-6",sonnet:"kiro-claude-sonnet-4-6",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4-6",name:"Kiro Claude Sonnet 4.6",description:"Claude Sonnet 4.6 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4-6",opus:"kiro-claude-opus-4-6",sonnet:"kiro-claude-sonnet-4-6",haiku:"kiro-claude-haiku-4-5"}},{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-6",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-6",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Balanced performance and speed",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6",sonnet:"claude-sonnet-4-6",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"}]}};function Se(t,a){if(!t)return;const s=J(a);if(t.provider==="agy"){const l=Ua(s);if(l){const o=t.models.find(r=>r.id===l);if(o)return o}}const i=hs[s.toLowerCase()],n=t.models.find(l=>l.id===s||l.id===i);if(n)return n;const c=Xe(s);if(c)return t.models.map(l=>({model:l,info:Xe(l.id)})).filter(l=>!!(l.info&&l.info.family===c.family)).sort((l,o)=>gs(o.info.version,l.info.version))[0]?.model}function qa(t){if(t==="free")return"free";if(typeof t=="string"&&t.trim().length>0)return"paid"}function za(t,a){const s=xe[t.toLowerCase()];if(!a||a.models.length===0)return s;const i=a.models.map(o=>({id:o.id,owned_by:a.provider})),n=a.models.map(o=>{const r=Se(s,o.id);return{...o,name:o.name||r?.name||o.id,tier:r?.tier??qa(o.tier),description:o.description??r?.description,broken:r?.broken,issueUrl:r?.issueUrl,deprecated:r?.deprecated,deprecationReason:r?.deprecationReason,extendedContext:o.extendedContext??r?.extendedContext,presetMapping:r?.presetMapping}}),c=s?.defaultModel?Ae(s.defaultModel,i):void 0,l=typeof c=="string"&&i.some(o=>J(o.id)===J(c));return{provider:a.provider,displayName:a.displayName||s?.displayName||t,defaultModel:l?c:a.defaultModel,models:n}}function Mt(t){const a={},s=new Set([...Object.keys(xe),...Object.keys(t??{})]);for(const i of s){const n=za(i,t?.[i]);n&&(a[i]=n)}return a}function fs(t,a,s){const i=Se(s,a);return i||Se(xe[t.toLowerCase()],a)}function Ae(t,a=[]){const s=J(t),i=Ha(s,a);if(i)return i;const n=Ht(a,s);if(n)return n;const c=hs[s];return(c?Ht(a,c):void 0)??s}function Ga(t,a=[]){return{default:Ae(t.default,a),opus:Ae(t.opus,a),sonnet:Ae(t.sonnet,a),haiku:Ae(t.haiku,a)}}function Pt(t,a=[]){if(!t)return[];const s=xe[t.provider.toLowerCase()]??t,i=new Set;return s.models.map(n=>{const c=Ae(n.id,a),l=n.presetMapping?Ga(n.presetMapping,a):void 0,o=t.models.find(r=>J(r.id)===J(c));return{...n,id:c,name:o?.name||n.name,description:o?.description??n.description,presetMapping:l}}).filter(n=>i.has(n.id)?!1:(i.add(n.id),!0))}function Ba(t,a,s=[]){const i=t.trim().toLowerCase();if(!a||!i)return[];const n=xe[i]??a,c=Pt(a,s),l=new Set(c.map(m=>J(m.id))),o=new Set(c.map(m=>Se(n,m.id)?.id).filter(m=>!!m).map(m=>J(m))),r=new Set,p=new Set(s.map(m=>J(m.id)));return s.filter(m=>{const j=J(m.id),g=_a(m.id),x=Fa(g),T=Se(n,g)??Se(n,x);if(l.has(J(g))||j!==J(g)&&p.has(J(g)))return!1;const k=J(x);if(k!==J(g)&&p.has(k))return!1;const D=T?J(T.id):k;return T&&o.has(D)||r.has(D)||!T&&i==="agy"?!1:(r.add(D),!0)})}function Va(t,a,s){return fs(t,a,s)?.extendedContext===!0}const nt="ccs-internal-managed";async function $a(){try{const t=await fetch("/api/settings/auth/tokens/raw");return t.ok?(await t.json())?.apiKey?.value??nt:nt}catch{return nt}}async function Wa(t,a){if(a)return a;try{const s=await fetch("/api/cliproxy/catalog");if(!s.ok)return xe[t];const i=await s.json();return Mt(i.catalogs)[t]??xe[t]}catch{return xe[t]}}async function pt(t,a,s){const i=await Wa(t,s);if(!i)return{success:!1};const n=i.models.find(p=>p.id===i.defaultModel)||i.models[0],c=n?.presetMapping||{default:i.defaultModel,opus:i.defaultModel,sonnet:i.defaultModel,haiku:i.defaultModel},l=await $a(),r={env:{ANTHROPIC_BASE_URL:`http://127.0.0.1:${mt}/api/provider/${t}`,ANTHROPIC_AUTH_TOKEN:l,ANTHROPIC_MODEL:c.default,ANTHROPIC_DEFAULT_OPUS_MODEL:c.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:c.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:c.haiku}};try{return{success:(await fetch(`/api/settings/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:r})})).ok,presetName:n?.name||i.defaultModel}}catch{return{success:!1}}}function Qa({currentProgress:t,allSteps:a}){return e.jsx("div",{className:"flex justify-center gap-1 pt-2",children:a.map((s,i)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${t>=i?"bg-primary":"bg-muted"}`},s))})}function Ja({providers:t,onSelect:a}){return e.jsx("div",{className:"grid gap-2",children:t.map(s=>e.jsxs("button",{onClick:()=>a(s.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:s.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.description})]}),e.jsx(is,{className:"w-4 h-4 text-muted-foreground"})]},s.id))})}function Xa({selectedProvider:t,providers:a,authCommand:s,isRefreshing:i,isPending:n,onBack:c,onStartAuth:l,onRefresh:o}){const{t:r}=W(),[p,m]=d.useState(!1),j=async g=>{await navigator.clipboard.writeText(g),m(!0),setTimeout(()=>m(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:r("setupWizard.authStep.authenticateWith",{provider:a.find(g=>g.id===t)?.name})}),e.jsx(K,{onClick:l,disabled:n,className:"w-full gap-2",size:"lg",children:n?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 animate-spin"}),r("setupWizard.authStep.authenticating")]}):e.jsxs(e.Fragment,{children:[e.jsx(ke,{className:"w-4 h-4"}),r("setupWizard.authStep.authenticateInBrowser")]})}),n&&e.jsx("p",{className:"text-xs text-muted-foreground",children:r("setupWizard.authStep.completeOAuth")})]}),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:r("setupWizard.authStep.orUseTerminal")})})]}),e.jsx(Wt,{children:e.jsxs(Qt,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Na,{className:"w-4 h-4"}),r("setupWizard.authStep.runCommandHint")]}),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:s}),e.jsx(K,{variant:"outline",size:"icon",onClick:()=>j(s),children:p?e.jsx(we,{className:"w-4 h-4 text-green-500"}):e.jsx(rs,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(K,{variant:"ghost",onClick:c,disabled:n,children:[e.jsx(kt,{className:"w-4 h-4 mr-2"}),r("setupWizard.authStep.back")]}),e.jsxs(K,{variant:"outline",onClick:o,disabled:i||n,children:[e.jsx(wt,{className:`w-4 h-4 mr-2 ${i?"animate-spin":""}`}),r(i?"setupWizard.authStep.checking":"setupWizard.authStep.refreshStatus")]})]})]})}function Ya({accounts:t,privacyMode:a,onSelect:s,onAddNew:i,onBack:n}){const{t:c}=W();return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:c("setupWizard.accountStep.selectAccount",{count:t.length})}),e.jsx("div",{className:"grid gap-2 max-h-[320px] overflow-y-auto pr-1",children:t.map(l=>{const o=Jt(l.id,l.email,l.tokenFile),r=l.provider?.toLowerCase()==="codex"?Xt(o):null;return e.jsxs("button",{type:"button",onClick:()=>s(l),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(Pe,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:X("font-medium",a&&gt),children:o.email}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[r?.label?e.jsx(H,{variant:"outline",className:X("text-[10px] h-4 px-1.5 border-transparent",r.audience==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":r.audience==="free"?"bg-slate-200/70 text-slate-700 dark:bg-slate-700/40 dark:text-slate-200":"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300"),children:r.label}):o.audienceLabel?e.jsx(H,{variant:"outline",className:X("text-[10px] h-4 px-1.5 border-transparent",o.audience==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":o.audience==="free"?"bg-slate-200/70 text-slate-700 dark:bg-slate-700/40 dark:text-slate-200":"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300"),children:o.audienceLabel}):null,!r?.label&&o.detailLabel&&e.jsx(H,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:o.detailLabel}),l.isDefault&&e.jsx("span",{className:"text-xs text-muted-foreground",children:c("setupWizard.accountStep.defaultAccount")})]})]})]}),e.jsx(is,{className:"w-4 h-4 text-muted-foreground"})]},l.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:c("setupWizard.accountStep.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:i,children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(ke,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-primary",children:c("setupWizard.accountStep.addNewAccount")}),e.jsx("div",{className:"text-xs text-muted-foreground",children:c("setupWizard.accountStep.addNewAccountDesc")})]})]}),e.jsx("div",{className:"flex items-center justify-between pt-2",children:e.jsxs(K,{variant:"ghost",onClick:n,children:[e.jsx(kt,{className:"w-4 h-4 mr-2"}),c("setupWizard.accountStep.back")]})})]})}const qt="__custom__";function Za({selectedProvider:t,catalog:a,selectedAccount:s,variantName:i,modelName:n,isPending:c,privacyMode:l,onVariantNameChange:o,onModelChange:r,onBack:p,onSkip:m,onCreate:j}){const{t:g}=W(),x=a||xe[t],T=x?.models||[],k=n&&!T.some(f=>f.id===n),[D,A]=d.useState(k),C=t==="agy"&&n.trim().length>0?ue(n):!1,y=s?Jt(s.id,s.email,s.tokenFile):null,w=t==="codex"&&y?Xt(y):null,h=f=>{f===qt?(A(!0),r("")):(A(!1),r(f))};return e.jsxs("div",{className:"space-y-4",children:[s&&e.jsxs("div",{className:"flex items-start gap-2 p-2 bg-muted/50 rounded-md text-sm",children:[e.jsx(Pe,{className:"w-4 h-4"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("span",{children:[g("setupVariant.using")," ",e.jsx("span",{className:X(l&&gt),children:y?.email})]}),(y?.audienceLabel||y?.detailLabel)&&e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[w?.label?e.jsx(H,{variant:"outline",className:X("text-[10px] h-4 px-1.5 border-transparent",w.audience==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":w.audience==="free"?"bg-slate-200/70 text-slate-700 dark:bg-slate-700/40 dark:text-slate-200":"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300"),children:w.label}):y?.audienceLabel?e.jsx(H,{variant:"outline",className:X("text-[10px] h-4 px-1.5 border-transparent",y.audience==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":y.audience==="free"?"bg-slate-200/70 text-slate-700 dark:bg-slate-700/40 dark:text-slate-200":"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300"),children:y.audienceLabel}):null,!w?.label&&y?.detailLabel&&e.jsx(H,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:y.detailLabel})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"variant-name",children:g("setupVariant.variantNameRequired")}),e.jsx(de,{id:"variant-name",value:i,onChange:f=>o(f.target.value),placeholder:g("setupVariant.variantNamePlaceholder")}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[g("setupVariant.invokeHintPrefix")," ccs ",i||"<name>",' "prompt"']})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{children:g("setupVariant.model")}),D?e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{value:n,onChange:f=>r(f.target.value),placeholder:g("setupVariant.modelPlaceholder")}),C&&e.jsx("p",{className:"text-xs text-destructive",children:g("providerEditor.agyDenylist")}),e.jsx("button",{type:"button",className:"text-xs text-primary hover:underline",onClick:()=>{A(!1),t==="agy"&&ue(n)&&r("")},children:g("setupVariant.choosePresetInstead")})]}):e.jsxs(qe,{value:T.some(f=>f.id===n)?n:"",onValueChange:h,children:[e.jsx(ze,{children:e.jsx(Ge,{placeholder:g("setupVariant.selectModel")})}),e.jsxs(Be,{children:[T.map(f=>e.jsx(ye,{value:f.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:f.name}),f.description&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["- ",f.description]})]})},f.id)),e.jsx(ye,{value:qt,children:e.jsx("span",{className:"text-primary",children:g("setupVariant.customModelName")})})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:D?g("setupVariant.enterAnyModel"):g("setupVariant.defaultModel",{model:x?.defaultModel||g("setupVariant.providerDefault")})})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs(K,{variant:"ghost",onClick:p,children:[e.jsx(kt,{className:"w-4 h-4 mr-2"}),g("setupVariant.back")]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(K,{variant:"ghost",onClick:m,children:g("setupVariant.skip")}),e.jsx(K,{onClick:j,disabled:!i||c||C,children:g(c?"setupVariant.creating":"setupVariant.createVariant")})]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:g("setupVariant.skipHint")})]})}function en({variantName:t,onClose:a}){const{t:s}=W();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(we,{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:s("setupWizard.successStep.title")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("setupWizard.successStep.subtitle")})]}),e.jsx(Wt,{children:e.jsxs(Qt,{className:"p-4 space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:s("setupWizard.successStep.usage")}),e.jsxs("code",{className:"block px-3 py-2 bg-muted rounded-md font-mono text-sm",children:["ccs ",t,' "your prompt here"']})]})}),e.jsx(K,{onClick:a,className:"w-full",children:s("setupWizard.successStep.done")})]})}function tn({open:t,onClose:a}){const[s,i]=d.useState("provider"),[n,c]=d.useState(""),[l,o]=d.useState(null),[r,p]=d.useState(""),[m,j]=d.useState(""),[g,x]=d.useState(!1),[T,k]=d.useState(!1),{data:D,refetch:A}=Yt(),{data:C}=Zt(),y=Ps(),w=Ds(),h=Is(),{privacyMode:f}=es(),I=D?.authStatus.find(R=>R.provider===n),u=d.useMemo(()=>I?.accounts||[],[I?.accounts]),E=d.useMemo(()=>Mt(C?.catalogs),[C?.catalogs]),N=!!C;d.useEffect(()=>{if(!t){const R=setTimeout(()=>{i("provider"),c(""),o(null),p(""),j(""),k(!1)},0);return()=>clearTimeout(R)}},[t]),d.useEffect(()=>{if(s==="auth"&&u.length>0&&!T){const R=setTimeout(()=>{i("account")},0);return()=>clearTimeout(R)}},[s,u,T]);const z=async()=>{x(!0),await A(),x(!1)},P=()=>{const R=(I?.accounts?.length||0)===0;w.mutate({provider:n},{onSuccess:async b=>{if(R){const Q=await pt(n,void 0,N?E[n]:void 0);Q.success&&Q.presetName?B.success(`Applied "${Q.presetName}" preset`):Q.success||B.warning(me.t("commonToast.accountAddedPresetFailed"))}b.account&&(o(b.account),i("variant")),A()}})},L=R=>{c(R),(D?.authStatus.find(te=>te.provider===R)?.accounts||[]).length===0?i("auth"):i("account")},_=R=>{o(R),i("variant")},G=async()=>{if(!(!r||!n))try{await y.mutateAsync({name:r,provider:n,model:m||void 0,account:l?.id}),i("success")}catch(R){console.error("Failed to create variant:",R)}},V=`ccs ${n} --auth --add`,q=Ts(s),S=R=>{if(!R&&(w.isPending&&n&&h.mutate(n),s==="success"||s==="provider")){a();return}};return e.jsx(ft,{open:t,onOpenChange:S,children:e.jsxs(vt,{className:"sm:max-w-lg",onPointerDownOutside:R=>{s!=="success"&&s!=="provider"&&R.preventDefault()},onEscapeKeyDown:R=>{(w.isPending||y.isPending)&&R.preventDefault()},children:[e.jsxs(jt,{children:[e.jsxs(bt,{className:"flex items-center gap-2",children:[e.jsx(De,{className:"w-5 h-5 text-primary"}),me.t("setupWizard.title")]}),e.jsxs(ts,{children:[s==="provider"&&me.t("setupWizard.stepProviderDesc"),s==="auth"&&me.t("setupWizard.stepAuthDesc"),s==="account"&&me.t("setupWizard.stepAccountDesc"),s==="variant"&&me.t("setupWizard.stepVariantDesc"),s==="success"&&me.t("setupWizard.stepSuccessDesc")]})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[s==="provider"&&e.jsx(Ja,{providers:It,onSelect:L}),s==="auth"&&e.jsx(Xa,{selectedProvider:n,providers:It,authCommand:V,isRefreshing:g,isPending:w.isPending,onBack:()=>i("provider"),onStartAuth:P,onRefresh:z}),s==="account"&&e.jsx(Ya,{accounts:u,privacyMode:f,onSelect:_,onAddNew:()=>{k(!0),i("auth")},onBack:()=>i("provider")}),s==="variant"&&e.jsx(Za,{selectedProvider:n,catalog:E[n],selectedAccount:l,variantName:r,modelName:m,isPending:y.isPending,privacyMode:f,onVariantNameChange:p,onModelChange:j,onBack:()=>u.length>0?i("account"):i("provider"),onSkip:a,onCreate:G}),s==="success"&&e.jsx(en,{variantName:r,onClose:a})]}),e.jsx(Qa,{currentProgress:q,allSteps:Es})]})})}const sn=3e3,an=300*1e3,nn=3;function it(t){t.invalidateQueries({queryKey:["cliproxy-catalog"]}),t.invalidateQueries({queryKey:["cliproxy-models"]})}async function rt(t){const a=await t.text();if(!a)return{};try{return JSON.parse(a)}catch{const s=t.status>=400?`Request failed with status ${t.status}`:void 0;return s?{error:s}:{}}}const fe={provider:null,isAuthenticating:!1,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:!1};function rn(){const{t}=W(),[a,s]=d.useState(fe),i=d.useRef(fe),n=d.useRef(0),c=d.useRef(null),l=d.useRef(null),o=d.useRef(0),r=d.useRef(0),p=d.useRef(!1),m=ht(),j=d.useCallback(A=>A===n.current,[]),g=d.useCallback(()=>{l.current&&(clearInterval(l.current),l.current=null),r.current=0},[]);d.useEffect(()=>()=>{c.current?.abort(),g(),p.current=!1},[g]),d.useEffect(()=>{i.current=a},[a]);const x=d.useCallback(async(A,C,y)=>{if(j(y)){if(Date.now()-o.current>an){g(),j(y)&&s(w=>({...w,isAuthenticating:!1,error:t("toasts.providerAuthTimeout")}));return}try{const w=await fetch(`/api/cliproxy/auth/${A}/status?state=${encodeURIComponent(C)}`);if(!j(y))return;const h=await w.json();if(r.current=0,h.status==="ok"){if(!(typeof h.account=="object"&&h.account!==null)){g();const I=t("toasts.providerAccountRegistrationFailed");B.error(I),s(u=>({...u,isAuthenticating:!1,error:I}));return}g(),m.invalidateQueries({queryKey:["cliproxy-auth"]}),m.invalidateQueries({queryKey:["cliproxy-accounts"]}),m.invalidateQueries({queryKey:["account-quota"]}),it(m),B.success(t("toasts.providerAuthSuccess",{provider:A})),p.current=!1,s(fe)}else if(h.status==="auth_url"){const f=h.url||h.auth_url;f&&(s(I=>({...I,authUrl:f})),p.current||(p.current=!0,window.open(f,"_blank")))}else if(h.status==="device_code"){g();const f=h.user_code&&h.verification_url?`Open ${h.verification_url} and enter code: ${h.user_code}`:"Switch to Device Code method and try again.";B.error(t("toasts.providerDeviceCodeInCallback")),s(I=>({...I,isAuthenticating:!1,error:f}))}else if(h.status==="error"){g();const f=h.error||"Authentication failed";B.error(f),s(I=>({...I,isAuthenticating:!1,error:f}))}}catch(w){if(!j(y)||(r.current+=1,r.current<nn))return;g();const h=w instanceof Error&&w.message.trim().length>0?w.message:t("toasts.providerLostStatusEndpoint");B.error(h),s(f=>({...f,isAuthenticating:!1,error:h}))}}},[j,m,g,t]),T=d.useCallback(async(A,C)=>{if(!Qe(A)){s({...fe,error:t("toasts.providerUnknown",{provider:A})});return}c.current?.abort(),g(),p.current=!1,r.current=0;const y=new AbortController,w=n.current+1;n.current=w,c.current=y;const f=(C?.flowType||(ss(A)?"device_code":"authorization_code"))==="device_code",I=C?.startEndpoint||(f?"start":"start-url"),u={nickname:C?.nickname,kiroMethod:C?.kiroMethod,kiroIDCStartUrl:C?.kiroIDCStartUrl,kiroIDCRegion:C?.kiroIDCRegion,kiroIDCFlow:C?.kiroIDCFlow,gitlabAuthMode:C?.gitlabAuthMode,gitlabBaseUrl:C?.gitlabBaseUrl,gitlabPersonalAccessToken:C?.gitlabPersonalAccessToken,riskAcknowledgement:C?.riskAcknowledgement};s({provider:A,isAuthenticating:!0,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:f});try{if(I==="start")fetch(`/api/cliproxy/auth/${A}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u),signal:y.signal}).then(async E=>{if(!j(w))return;const N=await rt(E);if(!j(w))return;const z=N.success===!0,P=typeof N.account=="object"&&N.account!==null;if(E.ok&&z&&P)m.invalidateQueries({queryKey:["cliproxy-auth"]}),m.invalidateQueries({queryKey:["cliproxy-accounts"]}),m.invalidateQueries({queryKey:["account-quota"]}),it(m),p.current=!1,s(fe);else{const L=typeof N.error=="string"?N.error:t(z?"toasts.providerAccountRegistrationFailed":"auth.loginFailed");B.error(L),s(_=>({..._,isAuthenticating:!1,error:L}))}}).catch(E=>{if(!j(w)||E instanceof Error&&E.name==="AbortError")return;const N=E instanceof Error?E.message:"Authentication failed";B.error(N),s(z=>({...z,isAuthenticating:!1,error:N}))});else{const E=await fetch(`/api/cliproxy/auth/${A}/start-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u),signal:y.signal});if(!j(w))return;const N=await rt(E);if(!j(w))return;const z=N.success===!0;if(!E.ok||!z){const _=typeof N.error=="string"?N.error:t("toasts.providerStartOAuthFailed");throw new Error(_)}const P=typeof N.authUrl=="string"?N.authUrl:null,L=typeof N.state=="string"?N.state:null;if(s(_=>({..._,authUrl:P,oauthState:L})),P&&(p.current=!0,window.open(P,"_blank")),L){if(o.current=Date.now(),!P){if(await x(A,L,w),!j(w))return;const _=i.current;if(!_.isAuthenticating||_.provider!==A)return}l.current=setInterval(()=>{x(A,L,w)},sn)}}}catch(E){if(!j(w))return;if(E instanceof Error&&E.name==="AbortError"){p.current=!1,s(fe);return}const N=E instanceof Error?E.message:t("auth.loginFailed");B.error(N),s(z=>({...z,isAuthenticating:!1,error:N}))}},[j,x,g,m,t]),k=d.useCallback(()=>{const A=a.provider;n.current+=1,c.current?.abort(),g(),p.current=!1,s(fe),A&&Ve.cliproxy.auth.cancel(A).catch(()=>{})},[a.provider,g]),D=d.useCallback(async A=>{if(!a.provider)return;const C=n.current,y=a.provider;s(w=>({...w,isSubmittingCallback:!0,error:null}));try{const w=await fetch(`/api/cliproxy/auth/${y}/submit-callback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirectUrl:A})});if(!j(C))return;const h=await rt(w);if(!j(C))return;const f=h.success===!0,I=h.status==="wait",u=typeof h.account=="object"&&h.account!==null;if(w.ok&&I)s(E=>({...E,isSubmittingCallback:!1,error:null}));else if(w.ok&&f&&u)g(),m.invalidateQueries({queryKey:["cliproxy-auth"]}),m.invalidateQueries({queryKey:["cliproxy-accounts"]}),m.invalidateQueries({queryKey:["account-quota"]}),it(m),B.success(t("toasts.providerAuthSuccess",{provider:y})),s(fe);else{const E=typeof h.error=="string"?h.error:t(f?"toasts.providerAccountRegistrationFailed":"toasts.providerCallbackFailed");throw new Error(E)}}catch(w){if(!j(C))return;const h=w instanceof Error?w.message:t("toasts.providerSubmitCallbackFailed");B.error(h),s(f=>({...f,isSubmittingCallback:!1,error:h}))}},[j,a.provider,m,g,t]);return d.useMemo(()=>({...a,startAuth:T,cancelAuth:k,submitCallback:D}),[a,T,k,D])}function xt({className:t,compact:a=!1,showAcknowledgement:s=!1,acknowledgementPhrase:i=$e,acknowledgementText:n="",onAcknowledgementTextChange:c,disabled:l=!1,showProxySettingsLink:o=!1}){const{t:r}=W(),p=r("accountSafetyWarning.title"),m=r("accountSafetyWarning.subtitle"),j=r("accountSafetyWarning.firstLine"),g=r("accountSafetyWarning.secondLine"),x="https://github.com/kaitranntt/ccs/issues/509",T=r("accountSafetyWarning.issueLabel"),k=r("accountSafetyWarning.proxySettingsLabel");return a?e.jsx("section",{role:"alert",className:X("border-b border-amber-200/70 bg-amber-50/45 dark:bg-amber-950/5",t),children:e.jsxs("div",{className:"flex flex-col gap-3 px-6 py-3 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{className:"min-w-0 flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 inline-flex h-6 w-6 items-center justify-center rounded-md bg-amber-500/12 text-amber-700 dark:text-amber-300",children:e.jsx(Je,{className:"h-3.5 w-3.5"})}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-xs font-semibold leading-5",children:p}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:m})]}),e.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:j}),e.jsx("p",{className:"text-xs font-medium leading-5 text-amber-900 dark:text-amber-200",children:g})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[e.jsxs("a",{href:x,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-amber-500/25 bg-background/90 px-2 py-1 text-[11px] font-medium text-amber-800 transition-colors hover:bg-amber-500/10 dark:text-amber-200",children:[T,e.jsx(ke,{className:"h-3 w-3"})]}),o?e.jsxs("a",{href:"/settings?tab=proxy",className:"inline-flex items-center gap-1 rounded-md border border-amber-500/25 bg-background/90 px-2 py-1 text-[11px] font-medium text-amber-800 transition-colors hover:bg-amber-500/10 dark:text-amber-200",children:[e.jsx(Ut,{className:"h-3 w-3"}),k]}):null,e.jsx(H,{variant:"outline",className:"border-amber-500/40 text-[10px] text-amber-700 dark:text-amber-300",children:"High Risk"})]})]})}):e.jsxs("section",{role:"alert",className:X("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",t),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(Je,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:p}),e.jsx("p",{className:"text-xs text-muted-foreground",children:m})]})]}),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.jsx("p",{children:j}),e.jsx("p",{className:"font-medium text-amber-900 dark:text-amber-200",children:g}),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:x,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:[T,e.jsx(ke,{className:"h-3.5 w-3.5"})]}),o&&e.jsxs("a",{href:"/settings?tab=proxy",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:[e.jsx(Ut,{className:"h-3.5 w-3.5"}),k]}),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"})]}),s&&c&&e.jsxs("div",{className:"rounded-lg border border-amber-500/25 bg-amber-500/5 p-2.5",children:[e.jsxs(Y,{htmlFor:"account-risk-ack-text",className:"text-xs leading-5",children:["Type exact phrase to continue:"," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:i})]}),e.jsx(de,{id:"account-risk-ack-text",value:n,onChange:D=>c(D.target.value),placeholder:i,disabled:l,className:"mt-2 font-mono text-xs"})]})]})]})}function on({className:t,value:a,onChange:s,disabled:i=!1}){const{t:n}=W(),c=[a.reviewedIssue509,a.understandsBanRisk,a.acceptsFullResponsibility,a.typedPhrase.trim().replace(/\s+/g," ").toUpperCase()===Kt].filter(Boolean).length,l=c/4*100,o=r=>{s({...a,...r})};return e.jsxs("section",{role:"alert",className:X("relative overflow-hidden rounded-xl border border-rose-500/35 bg-gradient-to-br from-rose-50 via-background to-amber-50/70 p-4 shadow-sm dark:from-rose-950/20 dark:to-amber-950/20",t),children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-0.5 bg-gradient-to-r from-rose-500 via-orange-500 to-amber-500"}),e.jsxs("div",{className:"space-y-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-rose-500/15 text-rose-700 dark:text-rose-300",children:e.jsx(Je,{className:"h-4 w-4"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:n("antigravityChecklist.title")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n("antigravityChecklist.subtitle")})]})]}),e.jsx(H,{variant:"outline",className:"border-rose-500/40 text-rose-700 dark:text-rose-300",children:n("antigravityChecklist.mandatory")})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:n("antigravityChecklist.completion")}),e.jsx("span",{children:n("antigravityChecklist.stepsCount",{current:c})})]}),e.jsx(Rs,{value:l,className:"h-2"})]}),e.jsxs("div",{className:"space-y-3 rounded-lg border border-rose-500/20 bg-rose-500/5 p-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(We,{id:"agy-step-reviewed-issue",checked:a.reviewedIssue509,onCheckedChange:r=>o({reviewedIssue509:!!r}),disabled:i}),e.jsx(Y,{htmlFor:"agy-step-reviewed-issue",className:"text-xs leading-5",children:"Step 1: I reviewed issue #509 and understand AGY OAuth can trigger account bans/suspensions."})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(We,{id:"agy-step-understands-risk",checked:a.understandsBanRisk,onCheckedChange:r=>o({understandsBanRisk:!!r}),disabled:i}),e.jsx(Y,{htmlFor:"agy-step-understands-risk",className:"text-xs leading-5",children:"Step 2: I understand this OAuth action is my own decision and I accept the upstream risk."})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(We,{id:"agy-step-accept-responsibility",checked:a.acceptsFullResponsibility,onCheckedChange:r=>o({acceptsFullResponsibility:!!r}),disabled:i}),e.jsx(Y,{htmlFor:"agy-step-accept-responsibility",className:"text-xs leading-5",children:"Step 3: I accept full responsibility. CCS is not liable for suspension, bans, or access loss."})]})]}),e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/25 bg-amber-500/5 p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-amber-800 dark:text-amber-200",children:[e.jsx(os,{className:"h-3.5 w-3.5"}),"Step 4: Type exact phrase to continue"]}),e.jsx(de,{value:a.typedPhrase,onChange:r=>o({typedPhrase:r.target.value}),placeholder:Kt,disabled:i,className:"font-mono text-xs"})]}),e.jsx("div",{className:"flex flex-wrap items-center gap-2 text-xs",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-rose-500/30 bg-rose-500/10 px-2.5 py-1 font-medium text-rose-800 transition-colors hover:bg-rose-500/15 dark:text-rose-200",children:["Read issue #509",e.jsx(ke,{className:"h-3.5 w-3.5"})]})})]})]})}function ln(t){return t.trim().replace(/\s+/g," ").toUpperCase()}function dn({open:t,onClose:a,provider:s,displayName:i,catalog:n,isFirstAccount:c=!1}){const[l,o]=d.useState(""),[r,p]=d.useState(""),[m,j]=d.useState(!1),[g,x]=d.useState(null),[T,k]=d.useState(""),[D,A]=d.useState(at),[C,y]=d.useState(!1),[w,h]=d.useState(!1),[f,I]=d.useState(Et),[u,E]=d.useState(""),[N,z]=d.useState(""),[P,L]=d.useState(Tt),[_,G]=d.useState("oauth"),[V,q]=d.useState(""),[S,R]=d.useState(""),{t:b}=W(),Q=d.useRef(!1),te=d.useRef(0),ne=d.useRef(!1),U=rn(),ae=Ls(),$=s==="kiro",Z=s==="gitlab",ie=s==="agy"||s==="gemini",v=s==="gemini"&&!C,O=s==="agy"&&!C,be=ie&&w,Ee=Pa(D),Te=ln(T)===$e,Ye=ss(s),Re=Os(f),he=$&&f==="idc",Ne=$&&Fs(f),Me=$?_s(f,P):void 0,Ze=$?Ks(f):void 0,et=$?Me==="device_code":Ye,re=U.isAuthenticating||ae.isPending,Le=l.trim(),Oe=u.trim(),_e=N.trim(),Fe=V.trim(),F=S.trim(),ee=g||U.error,oe=d.useCallback(async()=>{const M=await fetch("/api/settings/auth/antigravity-risk");if(!M.ok)throw new Error("Failed to load power user mode setting");return(await M.json()).antigravityAckBypass===!0},[]),ge=d.useCallback(async({pendingMessage:M=null,disabledMessage:pe=null}={})=>{const st=++te.current;h(!0),M!==null&&x(M);try{const Ue=await oe();return te.current!==st||(y(Ue),pe?x(Ue?null:pe):M!==null&&x(null)),Ue}catch{return te.current!==st||(y(!1),x(pe??b("addAccountDialog.powerUserLoadFailed")),ne.current||(ne.current=!0,B.error(b("addAccountDialog.powerUserLoadFailed")))),!1}finally{te.current===st&&h(!1)}},[oe,b]),tt=()=>{o(""),p(""),j(!1),x(null),k(""),A(at),y(!1),h(!1),I(Et),E(""),z(""),L(Tt),G("oauth"),q(""),R(""),te.current+=1,ne.current=!1,Q.current=!1,a()};d.useEffect(()=>{t&&(k(""),A(at),x(null))},[s,t]),d.useEffect(()=>()=>{te.current+=1},[]),d.useEffect(()=>{if(!t||!ie){te.current+=1,y(!1),h(!1);return}ge()},[t,s,ie,ge]),d.useEffect(()=>{if(!t||s!=="agy"||!U.error||!C)return;const M=U.error.toLowerCase();(M.includes("agy_risk_ack_required")||M.includes("responsibility acknowledgement")||M.includes("responsibility checklist"))&&ge({pendingMessage:b("addAccountDialog.powerUserLoading"),disabledMessage:b("addAccountDialog.powerUserUnavailableRetry")})},[U.error,t,C,s,ge,b]),d.useEffect(()=>{!U.isAuthenticating&&!U.error&&U.provider===null&&t&&Q.current&&(Q.current=!1,(async()=>{try{const pe=await pt(s,void 0,n);pe.success&&pe.presetName&&c&&B.success(`Applied "${pe.presetName}" preset`)}catch{}tt()})())},[U.isAuthenticating,U.error,U.provider]);const Dt=()=>{U.cancelAuth(),tt()},ys=async()=>{U.authUrl&&(await navigator.clipboard.writeText(U.authUrl),j(!0),setTimeout(()=>j(!1),2e3))},ks=()=>{r.trim()&&U.submitCallback(r.trim())},ws=()=>{if(be){x(b("addAccountDialog.powerUserLoading"));return}if(O&&!Ee){x("Complete all Antigravity responsibility steps before authenticating this provider.");return}if(v&&!Te){x(`Type "${$e}" to acknowledge the account safety warning before authenticating this provider.`);return}if(x(null),he&&!Oe){x("IDC Start URL is required for Kiro IAM Identity Center login.");return}if(Z&&_==="pat"&&!F){x(b("addAccountDialog.gitlabPatRequired"));return}Q.current=!0,U.startAuth(s,{nickname:Le||void 0,kiroMethod:$?f:void 0,kiroIDCStartUrl:he?Oe:void 0,kiroIDCRegion:he&&_e?_e:void 0,kiroIDCFlow:he?P:void 0,gitlabAuthMode:Z?_:void 0,gitlabBaseUrl:Z&&Fe?Fe:void 0,gitlabPersonalAccessToken:Z&&_==="pat"&&F?F:void 0,flowType:$?Me:void 0,startEndpoint:$?Ze:Z&&_==="pat"?"start":void 0,riskAcknowledgement:O?{version:Da,reviewedIssue509:D.reviewedIssue509,understandsBanRisk:D.understandsBanRisk,acceptsFullResponsibility:D.acceptsFullResponsibility,typedPhrase:D.typedPhrase}:void 0})},Cs=()=>{Q.current=!0,ae.mutate(void 0,{onSuccess:async()=>{const M=await pt("kiro",void 0,n);M.success&&M.presetName&&c&&B.success(`Applied "${M.presetName}" preset`),tt()}})},As=M=>{M||Dt()},le=U.isAuthenticating;return e.jsx(ft,{open:t,onOpenChange:As,children:e.jsxs(vt,{className:"sm:max-w-md",onInteractOutside:M=>{le&&M.preventDefault()},children:[e.jsxs(jt,{children:[e.jsx(bt,{children:b("addAccountDialog.title",{displayName:i})}),e.jsx(ts,{children:b($?"addAccountDialog.descKiro":et?"addAccountDialog.descDeviceCode":"addAccountDialog.descOauth")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[O&&!le&&e.jsx(on,{value:D,onChange:M=>{A(M),x(null)},disabled:re}),ie&&C&&!le&&e.jsxs("div",{className:"rounded-lg border border-amber-400/35 bg-amber-50/70 p-3 text-xs text-amber-900 dark:border-amber-800/60 dark:bg-amber-950/25 dark:text-amber-100",children:[e.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 font-semibold",children:[e.jsx(os,{className:"h-3.5 w-3.5"}),b("addAccountDialog.powerUserEnabled")]}),b("addAccountDialog.powerUserSkipped")]}),v&&!le&&e.jsx(xt,{showAcknowledgement:!0,acknowledgementPhrase:$e,acknowledgementText:T,onAcknowledgementTextChange:M=>{k(M),x(null)},disabled:re}),$&&!le&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"kiro-auth-method",children:b("addAccountDialog.authMethod")}),e.jsxs(qe,{value:f,onValueChange:M=>{I(M),x(null)},children:[e.jsx(ze,{id:"kiro-auth-method",children:e.jsx(Ge,{placeholder:b("addAccountDialog.selectKiroAuthMethod")})}),e.jsx(Be,{children:Us.map(M=>e.jsx(ye,{value:M.id,children:M.label},M.id))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:Re.description}),Ne&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["If your browser does not return automatically after login, CCS can accept the final",e.jsx("span",{className:"mx-1 rounded bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"kiro://..."}),"callback URL in the next step."]})]}),he&&!le&&e.jsxs("div",{className:"space-y-4 rounded-lg border border-border/60 bg-muted/20 p-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"kiro-idc-start-url",children:"IDC Start URL"}),e.jsx(de,{id:"kiro-idc-start-url",value:u,onChange:M=>{E(M.target.value),x(null)},placeholder:"https://d-xxx.awsapps.com/start",disabled:re}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Required for organization IAM Identity Center login."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"kiro-idc-region",children:"IDC Region"}),e.jsx(de,{id:"kiro-idc-region",value:N,onChange:M=>{z(M.target.value),x(null)},placeholder:"us-east-1",disabled:re}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Leave blank to use the upstream default region."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"kiro-idc-flow",children:"IDC Flow"}),e.jsxs(qe,{value:P,onValueChange:M=>{L(M),x(null)},children:[e.jsx(ze,{id:"kiro-idc-flow",children:e.jsx(Ge,{placeholder:"{/* TODO i18n: missing key */}Select IDC flow"})}),e.jsxs(Be,{children:[e.jsx(ye,{value:"authcode",children:"Authorization Code"}),e.jsx(ye,{value:"device",children:"Device Code"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Auth Code opens a browser and may need the final callback URL pasted back. Device Code shows a verification code instead."})]})]}),Z&&!le&&e.jsxs("div",{className:"space-y-4 rounded-lg border border-border/60 bg-muted/20 p-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"gitlab-auth-mode",children:b("addAccountDialog.gitlabAuthMethod")}),e.jsxs(qe,{value:_,onValueChange:M=>{G(M),x(null)},children:[e.jsx(ze,{id:"gitlab-auth-mode",children:e.jsx(Ge,{placeholder:b("addAccountDialog.selectGitlabAuthMethod")})}),e.jsxs(Be,{children:[e.jsx(ye,{value:"oauth",children:b("addAccountDialog.gitlabAuthOAuth")}),e.jsx(ye,{value:"pat",children:b("addAccountDialog.gitlabAuthPat")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:b("addAccountDialog.gitlabAuthHint")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"gitlab-base-url",children:b("addAccountDialog.gitlabUrl")}),e.jsx(de,{id:"gitlab-base-url",value:V,onChange:M=>{q(M.target.value),x(null)},placeholder:b("addAccountDialog.gitlabUrlPlaceholder"),disabled:re}),e.jsx("p",{className:"text-xs text-muted-foreground",children:b("addAccountDialog.gitlabUrlHint")})]}),_==="pat"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"gitlab-pat",children:b("addAccountDialog.gitlabPat")}),e.jsx(de,{id:"gitlab-pat",type:"password",value:S,onChange:M=>{R(M.target.value),x(null)},placeholder:b("addAccountDialog.gitlabPatPlaceholder"),disabled:re}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[b("addAccountDialog.gitlabPatHint")," ",e.jsx("span",{className:"font-mono",children:"api"})," and"," ",e.jsx("span",{className:"font-mono",children:"read_user"})," scopes."]})]})]}),!le&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"nickname",children:b("addAccountDialog.nicknameOptional")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Pe,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(de,{id:"nickname",value:l,onChange:M=>{o(M.target.value),x(null)},placeholder:b("addAccountDialog.nicknamePlaceholder"),disabled:re,className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:b("addAccountDialog.nicknameOptionalHint")})]}),le&&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(ce,{className:"w-4 h-4 inline mr-2 animate-spin"}),b("addAccountDialog.waitingForAuth")]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:U.isDeviceCodeFlow?b("addAccountDialog.deviceCodeHint"):Ne?"Complete sign-in in your browser. If it does not return automatically, paste the final kiro:// callback URL below.":b("addAccountDialog.browserHint")})]}),U.authUrl&&!U.isDeviceCodeFlow&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{className:"text-xs",children:b("addAccountDialog.openUrlLabel")}),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:U.authUrl}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(K,{variant:"outline",size:"sm",onClick:ys,children:m?e.jsxs(e.Fragment,{children:[e.jsx(we,{className:"w-3 h-3 mr-1"}),b("addAccountDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(rs,{className:"w-3 h-3 mr-1"}),b("addAccountDialog.copy")]})}),e.jsxs(K,{variant:"outline",size:"sm",onClick:()=>{if(!U.authUrl)return;const M=window.open(U.authUrl,"_blank");(!M||M.closed||typeof M.closed>"u")&&B.warning(b("addAccountDialog.popupBlocked"),{duration:5e3})},children:[e.jsx(ke,{className:"w-3 h-3 mr-1"}),b("addAccountDialog.open")]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{htmlFor:"callback-url",className:"text-xs",children:Ne?"Browser did not return? Paste the final kiro:// callback URL:":b("addAccountDialog.redirectPasteLabel")}),e.jsx(de,{id:"callback-url",value:r,onChange:M=>p(M.target.value),placeholder:Ne?"kiro://kiro.kiroAgent/authenticate-success?code=...&state=...":b("addAccountDialog.callbackPlaceholder"),className:"font-mono text-xs"}),e.jsx(K,{variant:"secondary",size:"sm",onClick:ks,disabled:!r.trim()||U.isSubmittingCallback,children:U.isSubmittingCallback?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-3 h-3 mr-1 animate-spin"}),b("addAccountDialog.submitting")]}):b("addAccountDialog.submitCallback")})]})]}),!U.authUrl&&!U.isDeviceCodeFlow&&e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:Ne?"Preparing the Kiro sign-in URL. If it does not open automatically, it will appear here shortly.":b("addAccountDialog.preparingUrl")})]}),ee&&e.jsx("p",{className:"text-xs text-center text-destructive",children:ee}),ae.isPending&&e.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[e.jsx(ce,{className:"w-4 h-4 inline mr-2 animate-spin"}),b("addAccountDialog.importingToken")]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[e.jsx(K,{variant:"ghost",onClick:Dt,children:b("addAccountDialog.cancel")}),$&&!le&&e.jsx(K,{variant:"outline",onClick:Cs,disabled:re,children:ae.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),b("addAccountDialog.importing")]}):e.jsxs(e.Fragment,{children:[e.jsx(ya,{className:"w-4 h-4 mr-2"}),b("addAccountDialog.importFromIde")]})}),!le&&e.jsxs(K,{onClick:ws,disabled:re||be||O&&!Ee||v&&!Te,children:[e.jsx(ke,{className:"w-4 h-4 mr-2"}),b("addAccountDialog.authenticate")]})]})]})]})})}const cn=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"];function un(t){const a=t?.env||{};return cn.filter(s=>!a[s]?.trim())}function mn(t,a){const[s,i]=d.useState(null),[n,c]=d.useState(!1),l=ht(),{data:o,isLoading:r,refetch:p}=$t({queryKey:["settings",t],queryFn:async()=>{const P=await fetch(`/api/settings/${t}/raw`);if(!P.ok){const L=t==="cursor"?`~/.ccs/cliproxy/providers/${t}.settings.json`:Qe(t)?`~/.ccs/${t}.settings.json`:`~/.ccs/profiles/${t}/settings.json`;return{profile:t,settings:{env:{}},mtime:Date.now(),path:L}}return P.json()}}),m=o?.settings,j=d.useMemo(()=>s!==null?s:m?JSON.stringify(m,null,2):`{
2
- "env": {}
3
- }`,[s,m]),g=d.useCallback(P=>{i(P)},[]),x=d.useMemo(()=>{try{return JSON.parse(j)}catch{return m||{env:{}}}},[j,m]),T=x?.env?.ANTHROPIC_MODEL,k=x?.env?.ANTHROPIC_DEFAULT_OPUS_MODEL,D=x?.env?.ANTHROPIC_DEFAULT_SONNET_MODEL,A=x?.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL,C=d.useMemo(()=>Hs(x?.env||{}),[x]),y=d.useCallback((P,L)=>qs(P,L,{supportsExtendedContext:_=>Va(t,_,a)}),[a,t]),w=d.useCallback((P,L)=>{const _={...x?.env||{},[P]:L},G=Rt(P)?y(_,C):_;delete G.CCS_EXTENDED_CONTEXT;const V={...x,env:G};i(JSON.stringify(V,null,2))},[y,x,C]),h=d.useCallback(P=>{const L=x?.env||{},_=y(L,P);delete _.CCS_EXTENDED_CONTEXT;const G={...x,env:_};i(JSON.stringify(G,null,2))},[y,x]),f=d.useCallback(P=>{const L={...x?.env||{},...P},G=Object.keys(P).some(Rt)?y(L,C):L;delete G.CCS_EXTENDED_CONTEXT;const V={...x,env:G};i(JSON.stringify(V,null,2))},[y,x,C]),I=d.useMemo(()=>{try{return JSON.parse(j),!0}catch{return!1}},[j]),u=d.useMemo(()=>s===null?!1:s!==JSON.stringify(m,null,2),[s,m]),E=d.useMemo(()=>un(x),[x]),N=Ss({mutationFn:async()=>{const P=JSON.parse(j),L=await fetch(`/api/settings/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:P,expectedMtime:o?.mtime})});if(L.status===409)throw new Error("CONFLICT");if(!L.ok)throw new Error("Failed to save");return L.json()},onSuccess:P=>{l.invalidateQueries({queryKey:["settings",t]}),i(null),P?.warning?B.success(me.t("settings.saved"),{description:P.warning}):B.success(me.t("settings.saved"))},onError:P=>{P.message==="CONFLICT"?c(!0):B.error(P.message)}}),z=async P=>{c(!1),P?(await p(),N.mutate()):i(null)};return{data:o,isLoading:r,refetch:p,rawJsonContent:j,rawJsonEdits:s,isRawJsonValid:I,hasChanges:u,currentSettings:x,currentModel:T,opusModel:k,sonnetModel:D,haikuModel:A,extendedContextEnabled:C,toggleExtendedContext:h,handleRawJsonChange:g,updateEnvValue:w,updateEnvValues:f,saveMutation:{mutate:()=>N.mutate(),isPending:N.isPending},conflictDialog:n,setConflictDialog:c,handleConflictResolve:z,missingRequiredFields:E}}const vs=/-(medium|high|xhigh)$/i,pn=["medium","high","xhigh"];function js(t){return t?.trim()??""}function bs(t){if(!t)return;const a=js(t).match(vs);if(a?.[1])return a[1].toLowerCase()}function Ns(t){return js(t).replace(vs,"")}function zt(t,a){const s=Ns(t);return!s||!a?s:`${s}-${a}`}function xn(t,a){if(!a){const n=bs(t);return[zt(t,n)]}const s=Ns(t),i=[s];for(const n of pn)if(i.push(zt(s,n)),n===a)break;return i}function hn(t,a){if(!t)return null;const s=bs(t);return s?{label:`Pinned ${s}`,explicit:!0}:{label:"Auto effort",explicit:!1}}function gn({label:t}){return e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:t})}function Ke({modelId:t}){const a=hn(t);return a?e.jsx(H,{variant:a.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:a.label}):null}function Gt(t,a){if(!t)return"";if(!a?.prefix)return t;const s=`${a.prefix}/`;return t.startsWith(s)?t.slice(s.length):t}function He(t,a){return a?.recommendedModelId??t}function ot(t,a,s){return s?xn(a,t):[a]}function je({label:t,description:a,value:s,onChange:i,catalog:n,allModels:c,routing:l,disabled:o}){const{t:r}=W(),p=n?.provider==="codex",m=d.useMemo(()=>Pt(n,c),[c,n]),j=d.useMemo(()=>Ba(n?.provider??"",n,c),[c,n]),g=new Set(m.map(h=>h.id)),x=d.useMemo(()=>new Map((l?.models??[]).map(h=>[h.modelId.toLowerCase(),h])),[l]),T=d.useMemo(()=>new Set(m.flatMap(h=>ot(h.codexMaxEffort,He(h.id,x.get(h.id.toLowerCase())),p))),[p,m,x]),k=d.useMemo(()=>x.get(Gt(s,l).toLowerCase()),[l,x,s]),D=m.flatMap(h=>{const f=x.get(h.id.toLowerCase());return ot(h.codexMaxEffort,He(h.id,f),p).map(u=>({value:u,groupKey:"recommended",searchText:`${u} ${h.id} ${h.name} ${f?.recommendedModelId??""}`,keywords:[h.tier??"",n?.provider??""],triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:u}),f?.pinnedAvailable?e.jsx(H,{variant:"secondary",className:"text-[9px] h-4 px-1 uppercase",children:f.prefix}):null,p&&e.jsx(Ke,{modelId:u})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:u}),h.tier==="paid"&&e.jsx(gn,{label:r("providerModelSelector.paid")}),f?.unprefixedStatus==="shadowed"?e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:r("providerModelSelector.shadowed")}):null,f?.unprefixedStatus==="prefix-only"?e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:r("providerModelSelector.prefixOnly")}):null,p&&e.jsx(Ke,{modelId:u})]})}))}),A=j.filter(h=>!g.has(h.id)).filter(h=>!T.has(He(h.id,x.get(h.id.toLowerCase())))).flatMap(h=>{const f=x.get(h.id.toLowerCase());return ot(void 0,He(h.id,f),p).map(u=>({value:u,groupKey:"all",searchText:`${u} ${h.id} ${f?.recommendedModelId??""}`,keywords:[h.owned_by],triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:u}),f?.pinnedAvailable?e.jsx(H,{variant:"secondary",className:"text-[9px] h-4 px-1 uppercase",children:f.prefix}):null,p&&e.jsx(Ke,{modelId:u})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:u}),f?.unprefixedStatus==="shadowed"?e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:r("providerModelSelector.shadowed")}):null,f?.unprefixedStatus==="prefix-only"?e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:r("providerModelSelector.prefixOnly")}):null,p&&e.jsx(Ke,{modelId:u})]})}))}),C=!!s&&!D.some(h=>h.value===s)&&!A.some(h=>h.value===s),y=s?{value:s,groupKey:"current",searchText:s,triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:s}),e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:r("providerModelSelector.current")})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:s}),e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:r("providerModelSelector.current")})]})}:null,w=D.length+A.length>0;return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium",children:t}),a&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:a})]}),e.jsx(Ea,{value:s||void 0,onChange:i,disabled:o,placeholder:r("providerModelSelector.selectModel"),searchPlaceholder:r("searchableSelect.searchModels"),emptyText:r(w?"searchableSelect.noResults":"providerModelSelector.noModelsAvailable"),triggerClassName:"h-9",groups:[...C&&y?[{key:"current",label:e.jsx("span",{className:"text-xs text-muted-foreground",children:r("providerModelSelector.currentValue")})}]:[],{key:"recommended",label:e.jsx("span",{className:"text-xs text-primary",children:r("providerModelSelector.recommended")})},...A.length>0?[{key:"all",label:e.jsx("span",{className:"text-xs text-muted-foreground",children:r("providerModelSelector.allModelsCount",{count:A.length})})}]:[]],options:[...C&&y?[y]:[],...D,...A]}),k?e.jsxs("div",{className:X("rounded-md border px-2.5 py-2 text-[11px]",k.unprefixedStatus==="safe"?"border-border/70 bg-muted/25 text-muted-foreground":"border-amber-300/60 bg-amber-50 text-amber-900 dark:border-amber-500/30 dark:bg-amber-950/25 dark:text-amber-100"),children:[e.jsxs("div",{className:"font-medium",children:[k.pinnedAvailable?r("providerModelSelector.preferredPinnedModel"):r("providerModelSelector.pinnedRouteStatus")," ",e.jsx("code",{children:k.pinnedAvailable?k.recommendedModelId:k.pinnedModelId})]}),e.jsx("p",{className:"mt-1 leading-5",children:k.summary})]}):null,s&&!k&&Gt(s,l)!==s?e.jsx("div",{className:"rounded-md border border-amber-300/60 bg-amber-50 px-2.5 py-2 text-[11px] text-amber-900 dark:border-amber-500/30 dark:bg-amber-950/25 dark:text-amber-100",children:r("providerModelSelector.pinnedModelNotAdvertised",{model:s})}):null]})}function Bt(t,a){const s=i=>a?.models.find(c=>c.modelId.toLowerCase()===i.toLowerCase())?.recommendedModelId??i;return{default:s(t.default),opus:s(t.opus),sonnet:s(t.sonnet),haiku:s(t.haiku)}}function fn({open:t,onClose:a,currentValues:s,onApply:i,onSave:n,isSaving:c,catalog:l,allModels:o,routing:r}){const{t:p}=W(),[m,j]=d.useState(Bt(s,r)),[g,x]=d.useState(""),T=k=>{k?(j(Bt(s,r)),x("")):a()};return e.jsx(ft,{open:t,onOpenChange:T,children:e.jsxs(vt,{className:"sm:max-w-md",children:[e.jsx(jt,{children:e.jsxs(bt,{className:"flex items-center gap-2",children:[e.jsx(De,{className:"w-4 h-4"}),p("customPresetDialog.title")]})}),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:p("customPresetDialog.presetNameOptional")}),e.jsx(de,{id:"preset-name",value:g,onChange:k=>x(k.target.value),placeholder:p("customPresetDialog.presetNamePlaceholder"),className:"text-sm"})]}),e.jsx(St,{}),l?.provider==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground rounded-md border bg-muted/30 px-2.5 py-2",children:[p("customPresetDialog.codexTipPrefix")," ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and"," ",e.jsx("code",{children:"-xhigh"})," ",p("customPresetDialog.codexTipSuffix")]}),e.jsx(je,{label:p("customPresetDialog.defaultModel"),description:p("customPresetDialog.defaultModelDesc"),value:m.default,onChange:k=>j({...m,default:k}),catalog:l,allModels:o,routing:r}),e.jsx(je,{label:p("customPresetDialog.opusModel"),description:p("customPresetDialog.opusModelDesc"),value:m.opus,onChange:k=>j({...m,opus:k}),catalog:l,allModels:o,routing:r}),e.jsx(je,{label:p("customPresetDialog.sonnetModel"),description:p("customPresetDialog.sonnetModelDesc"),value:m.sonnet,onChange:k=>j({...m,sonnet:k}),catalog:l,allModels:o,routing:r}),e.jsx(je,{label:p("customPresetDialog.haikuModel"),description:p("customPresetDialog.haikuModelDesc"),value:m.haiku,onChange:k=>j({...m,haiku:k}),catalog:l,allModels:o,routing:r})]}),e.jsxs(zs,{className:"gap-2 sm:gap-0",children:[e.jsx(K,{variant:"outline",onClick:a,children:p("customPresetDialog.cancel")}),n&&e.jsxs(K,{variant:"secondary",onClick:()=>n(m,g||void 0),disabled:c||!g.trim(),children:[c?e.jsx(ce,{className:"w-4 h-4 mr-1 animate-spin"}):e.jsx(Ct,{className:"w-4 h-4 mr-1"}),p("customPresetDialog.savePreset")]}),e.jsxs(K,{onClick:()=>i(m,g||void 0),children:[e.jsx(Ie,{className:"w-4 h-4 mr-1"}),p("customPresetDialog.applyPreset")]})]})]})})}function ve({label:t,command:a}){return e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:t}),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(as,{value:a,size:"icon",className:"h-6 w-6"})]})]})}function vn({provider:t,displayName:a,baseProvider:s,defaultTarget:i,data:n,authStatus:c,supportsModelConfig:l=!1}){const{t:o}=W(),r=i||"claude",p=r==="droid",m=t==="codex",j=s||c.provider||t,g=Gs(j),x=r==="claude"?`ccs ${t}`:`ccs ${t} --target claude`,T=`${x} --config`,k=`${x} --auth --add`,D=`${x} --accounts`;return e.jsx(Nt,{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(ls,{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:o("providerEditor.provider")}),e.jsx("span",{className:"font-mono",children:a})]}),n&&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:o("providerEditor.filePath")}),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:n.path}),e.jsx(as,{value:n.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:o("providerEditor.lastModified")}),e.jsx("span",{className:"text-xs",children:new Date(n.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:o("providerEditor.status")}),c.authenticated?e.jsxs(H,{variant:"outline",className:"w-fit text-green-600 border-green-200 bg-green-50",children:[e.jsx(ka,{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",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:o("providerEditor.defaultTarget")}),e.jsx("span",{className:"font-mono",children:r})]}),g&&e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-start",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:o("providerConfig.trackLabel")}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"font-mono",children:o(g.labelKey)}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[o(g.hintKey),Bs(j)?` ${o("providerConfig.plusTrackNote")}`:""]})]})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:o("providerEditor.quickUsage")}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsx(ve,{label:"Run with prompt",command:`ccs ${t} "your prompt"`}),m&&e.jsxs(e.Fragment,{children:[e.jsx(ve,{label:"Run on native Codex (shortcut)",command:'ccsxp "your prompt"'}),e.jsx(ve,{label:"Run on native Codex (--target)",command:`ccs ${t} --target codex "your prompt"`})]}),e.jsx(ve,{label:p?"Droid alias (explicit)":"Run on Droid",command:`ccs-droid ${t} "your prompt"`}),e.jsx(ve,{label:p?"Override to Claude":"Run on Droid (--target)",command:`ccs ${t} --target ${p?"claude":"droid"} "your prompt"`}),l&&e.jsx(ve,{label:r==="claude"?"Change model":"Change model (Claude target)",command:T}),e.jsx(ve,{label:r==="claude"?"Add account":"Add account (Claude target)",command:k}),e.jsx(ve,{label:r==="claude"?"List accounts":"List accounts (Claude target)",command:D}),r!=="claude"&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Account and model-management flags stay on Claude target. Codex and Droid runtime launches reject those CLIProxy management commands."})]})]})]})})}function jn(t){const a=t.replace(/\\/g,"/"),i=a.lastIndexOf("/cliproxy/providers/");return i!==-1?a.slice(i+1):a.replace(/^.*\//,"")}function bn({displayName:t,logoProvider:a,provider:s,data:i,isLoading:n,hasChanges:c,isRawJsonValid:l,isSaving:o,isRemoteMode:r,port:p,onRefetch:m,onSave:j}){const{t:g}=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(yt,{provider:a||s,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:t}),r&&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(ds,{className:"w-3 h-3"}),"Remote"]}),p&&e.jsxs(H,{variant:"outline",className:"text-xs gap-1 font-mono",children:[e.jsx(wa,{className:"w-3 h-3"}),":",p]}),!r&&i?.path&&e.jsx(H,{variant:"outline",className:"text-xs",children:jn(i.path)})]}),r?e.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400 mt-0.5",children:"Traffic auto-routed to remote server"}):i&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[g("providerEditor.lastModified"),": ",new Date(i.mtime).toLocaleString()]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(K,{variant:"ghost",size:"sm",onClick:m,disabled:n,children:e.jsx(wt,{className:`w-4 h-4 ${n?"animate-spin":""}`})}),e.jsx(K,{size:"sm",onClick:j,disabled:o||!c||!l,children:o?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Ca,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function Nn({models:t,provider:a,enabled:s,onToggle:i,disabled:n,className:c}){const{t:l}=W();if(t.length===0)return null;const o=t.some(m=>Lt(m.id)),r=t.some(m=>!Lt(m.id));let p="Compatible mappings stay on standard context unless you turn this on.";return o&&r?p="Gemini-compatible mappings can use 1M automatically. Claude mappings stay plain unless you turn this on.":o&&(p="Gemini-compatible mappings can use 1M by default. Turn this off to keep standard context."),e.jsxs("div",{className:X("rounded-lg border p-3 space-y-2",s?"border-primary/50 bg-primary/5":"border-border bg-muted/30",c),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:X("w-4 h-4",s?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-sm font-medium",children:l("extendedContext.extendedContext")}),e.jsx(H,{variant:s?"default":"secondary",className:"text-[10px] h-5 px-1.5",children:"1M tokens"})]}),e.jsx(ns,{checked:s,onCheckedChange:i,disabled:n})]}),e.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(ls,{className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{children:["Applies the explicit ",e.jsx("code",{children:"[1m]"})," long-context suffix to compatible saved mappings."]}),e.jsx("p",{className:"text-[10px]",children:p}),e.jsxs("p",{className:"text-amber-600 dark:text-amber-500",children:["CCS only saves ",e.jsx("code",{children:"[1m]"}),". Provider pricing and entitlement are separate, and some accounts can still return 429 extra-usage errors for long-context requests."]})]})]})]})}function yn(t,a){const s=t.presetMapping||{default:t.id,opus:t.id,sonnet:t.id,haiku:t.id};return{ANTHROPIC_MODEL:a(s.default),ANTHROPIC_DEFAULT_OPUS_MODEL:a(s.opus),ANTHROPIC_DEFAULT_SONNET_MODEL:a(s.sonnet),ANTHROPIC_DEFAULT_HAIKU_MODEL:a(s.haiku)}}function kn({catalog:t,savedPresets:a,currentModel:s,opusModel:i,sonnetModel:n,haikuModel:c,providerModels:l,routing:o,provider:r,extendedContextEnabled:p,onExtendedContextToggle:m,onApplyPreset:j,onUpdateEnvValue:g,onOpenCustomPreset:x,onDeletePreset:T,isDeletePending:k}){const{t:D}=W(),A=(o?.models??[]).some(u=>u.pinnedAvailable),C=d.useMemo(()=>new Map((o?.models??[]).map(u=>[u.modelId.toLowerCase(),u])),[o]),y=u=>C.get(u.toLowerCase())?.recommendedModelId??u,w=d.useMemo(()=>{if(!t)return[];const u=[s,i,n,c].filter(N=>!!N).map(N=>Vs(N));return[...new Set(u)].map(N=>fs(t.provider,N,t)).filter(N=>!!N?.extendedContext)},[t,s,i,n,c]),h=d.useMemo(()=>Pt(t,l),[t,l]),f=d.useMemo(()=>{const u=h.filter(N=>N.presetMapping);return u.length===0?[]:u.some(N=>N.tier==="paid")?[{key:"free",label:"Free Tier",description:"Available on free or paid plans",badgeClassName:"text-[10px] bg-green-100 text-green-700 border-green-200",iconClassName:"text-green-600",models:u.filter(N=>N.tier!=="paid")},{key:"paid",label:"Paid Tier",description:"Requires paid access",badgeClassName:"text-[10px] bg-amber-100 text-amber-700 border-amber-200",iconClassName:"text-amber-700",models:u.filter(N=>N.tier==="paid")}].filter(N=>N.models.length>0):[{key:"default",models:u.slice(0,4)}]},[h]),I=f.length>0||a.length>0;return e.jsxs(e.Fragment,{children:[I&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[e.jsx(De,{className:"w-4 h-4"}),"Presets"]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:D("providerEditor.presets")}),e.jsxs("div",{className:"space-y-4",children:[f.map(u=>e.jsxs("div",{children:["label"in u&&u.label&&e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(H,{variant:"outline",className:u.badgeClassName,children:u.label}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:u.description})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:u.models.map(E=>e.jsxs(K,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>j(yn(E,y)),children:[e.jsx(Ie,{className:`w-3 h-3 ${"iconClassName"in u?u.iconClassName:""}`}),E.name]},E.id))})]},u.key)),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.map(u=>e.jsxs("div",{className:"group relative",children:[e.jsxs(K,{variant:"secondary",size:"sm",className:"text-xs h-7 gap-1 pr-6",onClick:()=>{j({ANTHROPIC_MODEL:y(u.default),ANTHROPIC_DEFAULT_OPUS_MODEL:y(u.opus),ANTHROPIC_DEFAULT_SONNET_MODEL:y(u.sonnet),ANTHROPIC_DEFAULT_HAIKU_MODEL:y(u.haiku)})},children:[e.jsx(Ct,{className:"w-3 h-3 fill-current"}),u.name]}),e.jsx(K,{variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-7 w-5 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:E=>{E.stopPropagation(),T(u.name)},disabled:k,children:e.jsx(At,{className:"w-3 h-3"})})]},u.name)),e.jsxs(K,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1 border-primary/50 text-primary hover:bg-primary/10 hover:border-primary",onClick:x,children:[e.jsx(cs,{className:"w-3 h-3"}),"Custom"]})]})]})]}),e.jsx(St,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-2",children:D("providerEditor.modelMapping")}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"Configure which models to use for each tier"}),o?e.jsx("p",{className:"text-[11px] text-muted-foreground mb-3 rounded-md border bg-muted/30 px-2.5 py-2",children:A?e.jsxs(e.Fragment,{children:["Preferred pinned model names use the ",e.jsxs("code",{children:[o.prefix,"/"]})," prefix. Unprefixed names can still resolve to a different backend when providers overlap."]}):e.jsxs(e.Fragment,{children:["Managed pinning for ",e.jsxs("code",{children:[o.prefix,"/"]})," is not currently advertised by the proxy. Unprefixed names may still be ambiguous until prefix repair completes."]})}):null,r==="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. Select a suffixed model to pin effort; unsuffixed models use Thinking settings."]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(je,{label:"Default Model",description:"Used when no specific tier is requested",value:s,onChange:u=>g("ANTHROPIC_MODEL",u),catalog:t,allModels:l,routing:o}),w.length>0&&m&&e.jsx(Nn,{models:w,provider:r,enabled:p??!1,onToggle:m}),e.jsx(je,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:i,onChange:u=>g("ANTHROPIC_DEFAULT_OPUS_MODEL",u),catalog:t,allModels:l,routing:o}),e.jsx(je,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:n,onChange:u=>g("ANTHROPIC_DEFAULT_SONNET_MODEL",u),catalog:t,allModels:l,routing:o}),e.jsx(je,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:c,onChange:u=>g("ANTHROPIC_DEFAULT_HAIKU_MODEL",u),catalog:t,allModels:l,routing:o})]})]})]})}function wn(t,a,s){return t?e.jsx(lt,{children:e.jsxs(dt,{children:[e.jsx(ct,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Sa,{className:"w-3 h-3","aria-hidden":"true"}),e.jsx("span",{className:X("font-mono max-w-[180px] truncate",a&&gt),title:t,children:t})]})}),e.jsx(ut,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:s("providerEditor.gcpProjectIdReadonly")})})]})}):e.jsx(lt,{children:e.jsxs(dt,{children:[e.jsx(ct,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-500",children:[e.jsx(Je,{className:"w-3 h-3","aria-label":"Warning"}),e.jsx("span",{children:s("providerEditor.projectIdNA")})]})}),e.jsx(ut,{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:s("providerEditor.missingProjectId")}),e.jsx("p",{children:s("providerEditor.missingProjectIdHint")})]})})]})})}function Cn({account:t,onSetDefault:a,onRemove:s,onPauseToggle:i,isRemoving:n,isPausingAccount:c,privacyMode:l,showQuota:o,selectable:r,selected:p,onSelectChange:m}){const{t:j}=W(),g=t.provider.toLowerCase(),{data:x}=$s(o),{data:T,isLoading:k}=Ws(g,t.id,o),D=Qs(x,t)?.lastUsedAt,A=r||i?e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[r&&e.jsx("button",{type:"button",onClick:()=>m?.(!p),className:X("flex items-center justify-center w-5 h-5 rounded border-2 transition-colors shrink-0",p?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),"aria-label":p?"Deselect account":"Select account",children:p&&e.jsx(we,{className:"w-3 h-3"})}),i&&e.jsx(lt,{children:e.jsxs(dt,{children:[e.jsx(ct,{asChild:!0,children:e.jsx(K,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>i(!t.paused),disabled:c,children:c?e.jsx(ce,{className:"w-4 h-4 animate-spin"}):t.paused?e.jsx(us,{className:"w-4 h-4 text-emerald-500"}):e.jsx(ms,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(ut,{side:"top",children:t.paused?"Resume account":"Pause account"})]})})]}):void 0,C=e.jsxs(Js,{children:[e.jsx(Xs,{asChild:!0,children:e.jsx(K,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:e.jsx(Aa,{className:"w-4 h-4"})})}),e.jsxs(Ys,{align:"end",children:[!t.isDefault&&e.jsxs(Ot,{onClick:a,children:[e.jsx(Ct,{className:"w-4 h-4 mr-2"}),"Set as default"]}),e.jsxs(Ot,{className:"text-destructive focus:text-destructive",onClick:s,disabled:n,children:[e.jsx(ps,{className:"w-4 h-4 mr-2"}),n?"Removing...":"Remove account"]})]})]});return e.jsx("div",{className:X("rounded-lg border p-3 transition-colors overflow-hidden",t.isDefault?"border-primary/30 bg-primary/5":"border-border hover:bg-muted/30",t.paused&&"opacity-75",p&&"ring-2 ring-primary/50 bg-primary/5"),children:e.jsx(Zs,{mode:"detailed",provider:t.provider,accountId:t.id,email:t.email,displayEmail:t.email||t.id,tokenFile:t.tokenFile,tier:t.tier,isDefault:t.isDefault,paused:t.paused,privacyMode:l,showQuota:o,quota:T,quotaLoading:k,runtimeLastUsed:D,beforeIdentity:A,headerEnd:C,bodySlot:t.provider==="agy"?wn(t.projectId,l,j):null,quotaInsetClassName:"pl-11"})})}function An({selectedCount:t,onPauseSelected:a,onResumeSelected:s,onClearSelection:i,isPausing:n,isResuming:c}){if(t<1)return null;const l=n||c;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:[t," selected"]}),e.jsx(K,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:i,disabled:l,children:"Clear"}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(K,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:a,disabled:l,children:[n?e.jsx(ce,{className:"w-3 h-3 animate-spin"}):e.jsx(ms,{className:"w-3 h-3"}),"Pause Selected"]}),e.jsxs(K,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:s,disabled:l,children:[c?e.jsx(ce,{className:"w-3 h-3 animate-spin"}):e.jsx(us,{className:"w-3 h-3"}),"Resume Selected"]})]})]})}function Sn({accounts:t,onAddAccount:a,onSetDefault:s,onRemoveAccount:i,onPauseToggle:n,onSoloMode:c,onBulkPause:l,onBulkResume:o,isRemovingAccount:r,isPausingAccount:p,isSoloingAccount:m,isBulkPausing:j,isBulkResuming:g,privacyMode:x,showQuota:T,isKiro:k,kiroNoIncognito:D,onKiroNoIncognitoChange:A,kiroSettingsLoading:C}){const{t:y}=W(),[w,h]=d.useState(new Set),f=d.useMemo(()=>new Set(t.map(S=>S.id)),[t]),I=d.useMemo(()=>new Set([...w].filter(S=>f.has(S))),[w,f]),u=!!(l&&o),E=I.size,N=t.length>0&&I.size===t.length,z=I.size>0&&I.size<t.length,P=d.useCallback(S=>{h(R=>{const b=new Set(R);return b.has(S)?b.delete(S):b.add(S),b})},[]),L=d.useCallback(()=>{h(new Set(t.map(S=>S.id)))},[t]),_=d.useCallback(()=>{h(new Set)},[]),G=d.useCallback(()=>{N?_():L()},[N,L,_]),V=d.useCallback(()=>{l&&I.size>0&&(l(Array.from(I)),h(new Set))},[l,I]),q=d.useCallback(()=>{o&&I.size>0&&(o(Array.from(I)),h(new Set))},[o,I]);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:[u&&t.length>0&&e.jsx(We,{checked:N,onCheckedChange:G,"aria-label":"Select all accounts",className:z?"data-[state=checked]:bg-primary/50":"",...z?{"data-state":"indeterminate"}:{}}),e.jsx(Pe,{className:"w-4 h-4"}),"Accounts",t.length>0&&e.jsx(H,{variant:"secondary",className:"text-xs",children:t.length})]}),e.jsxs(K,{variant:"default",size:"sm",className:"h-7 text-xs gap-1",onClick:a,children:[e.jsx(cs,{className:"w-3 h-3"}),"Add"]})]}),u&&E>0&&e.jsx(An,{selectedCount:E,onPauseSelected:V,onResumeSelected:q,onClearSelection:_,isPausing:!!j,isResuming:!!g}),t.length>0?e.jsx("div",{className:"space-y-2",children:t.map(S=>e.jsx(Cn,{account:S,onSetDefault:()=>s(S.id),onRemove:()=>i(S.id),onPauseToggle:n?R=>n(S.id,R):void 0,onSoloMode:c?()=>c(S.id):void 0,isRemoving:r,isPausingAccount:p,isSoloingAccount:m,privacyMode:x,showQuota:T,selectable:u,selected:I.has(S.id),onSelectChange:()=>P(S.id)},S.id))}):e.jsxs("div",{className:"py-6 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed",children:[e.jsx(Pe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:y("providerEditor.noAccountsConnected")}),e.jsx("p",{className:"text-xs opacity-70",children:y("providerEditor.addAccountToStart")})]}),k&&A&&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(ds,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:y("providerEditor.useIncognito")})]}),e.jsx(ns,{checked:!D,onCheckedChange:S=>A(!S),disabled:C,className:"scale-90"})]})})]})}function Mn({provider:t,catalog:a,savedPresets:s,currentModel:i,opusModel:n,sonnetModel:c,haikuModel:l,providerModels:o,routing:r,extendedContextEnabled:p,onExtendedContextToggle:m,onApplyPreset:j,onUpdateEnvValue:g,onOpenCustomPreset:x,onDeletePreset:T,isDeletePending:k,accounts:D,onAddAccount:A,onSetDefault:C,onRemoveAccount:y,onPauseToggle:w,onSoloMode:h,onBulkPause:f,onBulkResume:I,isRemovingAccount:u,isPausingAccount:E,isSoloingAccount:N,isBulkPausing:z,isBulkResuming:P,privacyMode:L,isRemoteMode:_}){const G=t.toLowerCase(),V=(ea.includes(G)||["anthropic","antigravity","gemini-cli","copilot","github-copilot"].includes(G))&&!_,q=t==="kiro",[S,R]=d.useState(!0),[b,Q]=d.useState(!0),[te,ne]=d.useState(!1),U=d.useCallback(async()=>{if(q)try{Q(!0);const Z=(await Ve.config.get()).cliproxy;R(Z?.kiro_no_incognito??!0)}catch{R(!0)}finally{Q(!1)}},[q]),ae=d.useCallback(async $=>{R($),ne(!0);try{const Z=await Ve.config.get(),ie=Z.cliproxy??{};await Ve.config.update({...Z,cliproxy:{...ie,kiro_no_incognito:$}})}catch{R(!$)}finally{ne(!1)}},[]);return d.useEffect(()=>{U()},[U]),e.jsx(Nt,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsx(kn,{catalog:a,savedPresets:s,currentModel:i,opusModel:n,sonnetModel:c,haikuModel:l,providerModels:o,routing:r,provider:t,extendedContextEnabled:p,onExtendedContextToggle:m,onApplyPreset:j,onUpdateEnvValue:g,onOpenCustomPreset:x,onDeletePreset:T,isDeletePending:k}),e.jsx(St,{}),e.jsx(Sn,{accounts:D,onAddAccount:A,onSetDefault:C,onRemoveAccount:y,onPauseToggle:w,onSoloMode:h,onBulkPause:f,onBulkResume:I,isRemovingAccount:u,isPausingAccount:E,isSoloingAccount:N,isBulkPausing:z,isBulkResuming:P,privacyMode:L,showQuota:V,isKiro:q,kiroNoIncognito:S,onKiroNoIncognitoChange:ae,kiroSettingsLoading:b||te})]})})}function Vt({provider:t,displayName:a,authStatus:s,catalog:i,routing:n,logoProvider:c,baseProvider:l,isRemoteMode:o,port:r,defaultTarget:p,topNotice:m,onAddAccount:j,onSetDefault:g,onRemoveAccount:x,onPauseToggle:T,onSoloMode:k,onBulkPause:D,onBulkResume:A,isRemovingAccount:C,isPausingAccount:y,isSoloingAccount:w,isBulkPausing:h,isBulkResuming:f}){const[I,u]=d.useState(!1),{privacyMode:E}=es(),{t:N}=W(),{data:z}=ta(),{data:P}=sa(t),L=aa(),_=na(),G=l||t,V=G.toLowerCase()==="agy",q=d.useMemo(()=>{const F=P?.presets||[];return V?F.filter(ee=>!ue(ee.default)&&!ue(ee.opus)&&!ue(ee.sonnet)&&!ue(ee.haiku)):F},[V,P?.presets]),S=d.useMemo(()=>{if(!z?.models)return[];const ee={gemini:["google"],agy:["antigravity"],codex:["openai"],cursor:["cursor"],gitlab:["gitlab","duo"],codebuddy:["codebuddy"],qwen:["alibaba","qwen"],iflow:["iflow"],kilo:["kilo"],kiro:["kiro","aws"],ghcp:["github","copilot"],kimi:["kimi","moonshot"]}[G.toLowerCase()]||[G.toLowerCase()];return z.models.filter(oe=>ee.some(ge=>oe.owned_by.toLowerCase().includes(ge))?V?!ue(oe.id):!0:!1)},[V,z,G]),R=(l||t).toLowerCase(),{data:b,isLoading:Q,refetch:te,rawJsonContent:ne,rawJsonEdits:U,isRawJsonValid:ae,hasChanges:$,currentModel:Z,opusModel:ie,sonnetModel:v,haikuModel:O,extendedContextEnabled:be,toggleExtendedContext:Ee,handleRawJsonChange:Te,updateEnvValue:Ye,updateEnvValues:Re,saveMutation:he,conflictDialog:Ne,handleConflictResolve:Me,missingRequiredFields:Ze}=mn(t,i),et=d.useMemo(()=>(s.accounts||[]).map(F=>({...F,provider:F.provider||l||t})),[s.accounts,l,t]),{data:re}=$t({queryKey:["auth-tokens-raw"],queryFn:async()=>{const F=await fetch("/api/settings/auth/tokens/raw");return F.ok?F.json():{apiKey:{value:"ccs-internal-managed"}}},staleTime:6e4}),Le=re?.apiKey?.value??"ccs-internal-managed",Oe=F=>{if(V&&[F.ANTHROPIC_MODEL,F.ANTHROPIC_DEFAULT_OPUS_MODEL,F.ANTHROPIC_DEFAULT_SONNET_MODEL,F.ANTHROPIC_DEFAULT_HAIKU_MODEL].some(oe=>typeof oe=="string"&&ue(oe))){B.error(N("providerEditor.agyDenylist"));return}Re({ANTHROPIC_BASE_URL:`http://127.0.0.1:${r??mt}/api/provider/${R}`,ANTHROPIC_AUTH_TOKEN:Le,...F}),B.success(`Applied "${F.ANTHROPIC_MODEL?.split("/").pop()||"preset"}" preset`)},_e=(F,ee)=>{if(V&&[F.default,F.opus,F.sonnet,F.haiku].some(ge=>ue(ge))){B.error(N("providerEditor.agyDenylist"));return}Re({ANTHROPIC_BASE_URL:`http://127.0.0.1:${r??mt}/api/provider/${R}`,ANTHROPIC_AUTH_TOKEN:Le,ANTHROPIC_MODEL:F.default,ANTHROPIC_DEFAULT_OPUS_MODEL:F.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:F.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:F.haiku}),B.success(`Applied ${ee?`"${ee}"`:"custom"} preset`),u(!1)},Fe=(F,ee)=>{if(!ee){B.error(me.t("commonToast.enterPresetName"));return}if(V&&[F.default,F.opus,F.sonnet,F.haiku].some(oe=>ue(oe))){B.error(N("providerEditor.agyDenylist"));return}L.mutate({profile:t,data:{name:ee,...F}}),u(!1)};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(bn,{provider:t,displayName:a,logoProvider:c,data:b,isLoading:Q,hasChanges:$,isRawJsonValid:ae,isSaving:he.isPending,isRemoteMode:o,port:r,onRefetch:te,onSave:()=>he.mutate()}),m?e.jsx("div",{className:"border-b bg-muted/10 px-4 py-3",children:m}):null,Q?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(ce,{className:"w-8 h-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:N("providerEditor.loadingSettings")})]}):e.jsxs("div",{className:"min-h-0 flex-1 grid grid-cols-[40%_60%] divide-x overflow-hidden",children:[e.jsx("div",{className:"flex min-h-0 min-w-0 flex-col overflow-hidden bg-muted/5",children:e.jsxs(ia,{defaultValue:"config",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(ra,{className:"w-full",children:[e.jsx(_t,{value:"config",className:"flex-1",children:"Model Config"}),e.jsx(_t,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsx(Ft,{value:"config",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(Mn,{provider:t,catalog:i,savedPresets:q,currentModel:Z,opusModel:ie,sonnetModel:v,haikuModel:O,providerModels:S,routing:n,extendedContextEnabled:be,onExtendedContextToggle:Ee,onApplyPreset:Oe,onUpdateEnvValue:Ye,onOpenCustomPreset:()=>u(!0),onDeletePreset:F=>_.mutate({profile:t,name:F}),isDeletePending:_.isPending,accounts:et,onAddAccount:j,onSetDefault:g,onRemoveAccount:x,onPauseToggle:T,onSoloMode:k,onBulkPause:D,onBulkResume:A,isRemovingAccount:C,isPausingAccount:y,isSoloingAccount:w,isBulkPausing:h,isBulkResuming:f,privacyMode:E,isRemoteMode:o})}),e.jsx(Ft,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(vn,{provider:t,displayName:a,baseProvider:l,defaultTarget:p,data:b,authStatus:s,supportsModelConfig:!!i})})]})]})}),e.jsxs("div",{className:"flex min-h-0 min-w-0 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(Ma,{className:"w-4 h-4 text-muted-foreground"}),e.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:[N("rawEditorSection.rawConfig")," (JSON)"]})]}),e.jsx(oa,{rawJsonContent:ne,isRawJsonValid:ae,rawJsonEdits:U,onRawJsonChange:Te,profileEnv:b?.settings?.env,missingRequiredFields:Ze})]})]}),e.jsx(Ia,{open:Ne,title:"File Modified Externally",description:"This settings file was modified by another process. Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>Me(!0),onCancel:()=>Me(!1)}),e.jsx(fn,{open:I,onClose:()=>u(!1),currentValues:{default:Z||"",opus:ie||"",sonnet:v||"",haiku:O||""},onApply:_e,onSave:Fe,isSaving:L.isPending,catalog:i,allModels:S,routing:n})]})}function Pn({status:t,isSelected:a,onSelect:s}){const{t:i}=W(),n=t.accounts?.length||0;return e.jsxs("button",{className:X("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:s,children:[e.jsx(yt,{provider:t.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:t.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:t.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(we,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-green-600",children:i("cliproxyPage.connected")})]}):e.jsxs(e.Fragment,{children:[e.jsx(At,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:i("cliproxyPage.notConnected")})]})})]})]})}function Dn({variant:t,parentAuth:a,isSelected:s,onSelect:i,onDelete:n,isDeleting:c}){const{t:l}=W(),o=()=>{i()};return e.jsxs("div",{role:"button",tabIndex:0,className:X("group w-full flex items-center gap-3 px-3 py-2 rounded-lg transition-colors cursor-pointer text-left pl-6",s?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:o,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),o())},children:[e.jsxs("div",{className:"relative",children:[e.jsx(yt,{provider:t.provider,size:"sm"}),e.jsx(xs,{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:t.name}),e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1",children:l("cliproxyPage.variant")}),e.jsx(H,{variant:"outline",className:"text-[9px] h-4 px-1 uppercase",children:t.target||"claude"})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:a?.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(we,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:l("cliproxyPage.viaProvider",{provider:t.provider})})]}):e.jsxs(e.Fragment,{children:[e.jsx(At,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:l("cliproxyPage.parentNotConnected")})]})})]}),e.jsx(K,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:r=>{r.stopPropagation(),n()},disabled:c,children:e.jsx(ps,{className:"w-3 h-3"})})]})}function In({onSetup:t}){const{t:a}=W();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(Ie,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:a("cliproxyPage.emptyTitle")}),e.jsx("p",{className:"text-muted-foreground mb-4",children:a("cliproxyPage.emptyDesc")}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-6",children:[a("cliproxyPage.emptyControlPanelPrefix")," ",e.jsx("a",{href:"/cliproxy/control-panel",className:"text-primary hover:underline",children:a("cliproxyPage.controlPanel")}),"."]}),e.jsxs(K,{onClick:t,className:"gap-2",children:[e.jsx(De,{className:"w-4 h-4"}),a("cliproxyPage.quickSetup")]})]})})}function Qn(){const{t}=W(),a=ht(),{data:s,isLoading:i}=Yt(),{data:n,isFetching:c}=la(),{data:l}=Zt(),{data:o}=da(),r=ca(),p=ua(),m=ma(),j=pa(),g=xa(),x=ha(),T=ga(),k=fa(),[D,A]=d.useState(()=>{if(typeof window<"u"){const O=new URLSearchParams(window.location.search).get("provider")?.trim().toLowerCase();return O&&Qe(O)?O:localStorage.getItem("cliproxy-selected-provider")}return null}),[C,y]=d.useState(null),[w,h]=d.useState(!1),[f,I]=d.useState(()=>{if(typeof window>"u")return null;const v=new URLSearchParams(window.location.search),O=v.get("provider")?.trim().toLowerCase();return v.get("action")!=="auth"||!O||!Qe(O)?null:{provider:O,displayName:va(O),isFirstAccount:!1}}),u=d.useMemo(()=>s?.authStatus||[],[s?.authStatus]),E=d.useMemo(()=>ja(u,v=>v.provider),[u]),N=s?.source==="remote",z=d.useMemo(()=>n?.variants||[],[n?.variants]),P=d.useMemo(()=>Mt(l?.catalogs),[l?.catalogs]),L=l?.routing??{},_=!!l,G=v=>{A(v),v&&localStorage.setItem("cliproxy-selected-provider",v)},V=d.useMemo(()=>C?null:D&&u.some(v=>v.provider===D)?D:u.length>0&&(u.find(O=>(O.accounts?.length||0)>0)?.provider||u[0]?.provider)||null,[D,C,u]),q=u.find(v=>v.provider===V),S=z.find(v=>v.name===C),R=S?u.find(v=>v.provider===S.provider):void 0,b=(S?.provider||q?.provider||"").toLowerCase().trim(),Q=b==="gemini"||b==="agy",te=()=>{a.invalidateQueries({queryKey:["cliproxy"]}),a.invalidateQueries({queryKey:["cliproxy-auth"]}),a.invalidateQueries({queryKey:["cliproxy-catalog"]}),a.invalidateQueries({queryKey:["cliproxy-models"]})},ne=(v,O,be)=>{m.isPending||j.isPending||(be?m.mutate({provider:v,accountId:O}):j.mutate({provider:v,accountId:O}))},U=(v,O)=>{g.isPending||g.mutate({provider:v,accountId:O})},ae=(v,O)=>{x.isPending||x.mutate({provider:v,accountIds:O})},$=(v,O)=>{T.isPending||T.mutate({provider:v,accountIds:O})},Z=v=>{G(v),y(null)},ie=v=>{y(v),G(null)};return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",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(Ie,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:o?.backendLabel??"CLIProxy"})]}),e.jsx(K,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:te,disabled:c,children:e.jsx(wt,{className:X("w-4 h-4",c&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:t("cliproxyPage.accountManagement")}),e.jsxs(K,{variant:"default",size:"sm",className:"w-full gap-2",onClick:()=>h(!0),children:[e.jsx(De,{className:"w-4 h-4"}),t("cliproxyPage.quickSetup")]})]}),e.jsx(Nt,{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:t("cliproxyPage.providers")}),i?e.jsx("div",{className:"space-y-2 px-2",children:[1,2,3,4].map(v=>e.jsx(ba,{className:"h-14 w-full rounded-lg"},v))}):e.jsx("div",{className:"space-y-4",children:E.map(v=>e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"px-3",children:[e.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:t(v.labelKey)}),e.jsx("p",{className:"mt-1 text-[11px] leading-relaxed text-muted-foreground",children:t(v.hintKey)})]}),e.jsx("div",{className:"space-y-1",children:v.items.map(O=>e.jsx(Pn,{status:O,isSelected:V===O.provider,onSelect:()=>Z(O.provider)},O.provider))})]},v.id))}),z.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(xs,{className:"w-3 h-3"}),t("cliproxyPage.variants")]}),e.jsx("div",{className:"space-y-1",children:z.map(v=>e.jsx(Dn,{variant:v,parentAuth:u.find(O=>O.provider===v.provider),isSelected:C===v.name,onSelect:()=>ie(v.name),onDelete:()=>k.mutate(v.name),isDeleting:k.isPending},v.name))})]})]})}),e.jsx("div",{className:"p-3 border-t",children:e.jsx(Ta,{})}),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.jsx("span",{children:t("cliproxyPage.providerCount",{count:u.length})}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(we,{className:"w-3 h-3 text-green-600"}),t("cliproxyPage.connectedCount",{count:u.filter(v=>v.authenticated).length})]})]})})]}),e.jsx("div",{className:"flex-1 flex min-w-0 flex-col overflow-hidden bg-background",children:S&&R?e.jsx(e.Fragment,{children:e.jsx(Vt,{provider:S.name,displayName:t("cliproxyPage.variantDisplay",{name:S.name,provider:S.provider}),authStatus:R,catalog:P[S.provider],routing:L[S.provider],logoProvider:S.provider,baseProvider:S.provider,defaultTarget:S.target,isRemoteMode:N,port:S.port,topNotice:Q?e.jsx(xt,{compact:!0,showProxySettingsLink:!0}):void 0,onAddAccount:()=>I({provider:S.provider,displayName:R.displayName,isFirstAccount:(R.accounts?.length||0)===0}),onSetDefault:v=>r.mutate({provider:S.provider,accountId:v}),onRemoveAccount:v=>p.mutate({provider:S.provider,accountId:v}),onPauseToggle:(v,O)=>ne(S.provider,v,O),onSoloMode:v=>U(S.provider,v),onBulkPause:v=>ae(S.provider,v),onBulkResume:v=>$(S.provider,v),isRemovingAccount:p.isPending,isPausingAccount:m.isPending||j.isPending,isSoloingAccount:g.isPending,isBulkPausing:x.isPending,isBulkResuming:T.isPending})}):q?e.jsx(e.Fragment,{children:e.jsx(Vt,{provider:q.provider,displayName:q.displayName,authStatus:q,catalog:P[q.provider],routing:L[q.provider],isRemoteMode:N,topNotice:Q?e.jsx(xt,{compact:!0,showProxySettingsLink:!0}):void 0,onAddAccount:()=>I({provider:q.provider,displayName:q.displayName,isFirstAccount:(q.accounts?.length||0)===0}),onSetDefault:v=>r.mutate({provider:q.provider,accountId:v}),onRemoveAccount:v=>p.mutate({provider:q.provider,accountId:v}),onPauseToggle:(v,O)=>ne(q.provider,v,O),onSoloMode:v=>U(q.provider,v),onBulkPause:v=>ae(q.provider,v),onBulkResume:v=>$(q.provider,v),isRemovingAccount:p.isPending,isPausingAccount:m.isPending||j.isPending,isSoloingAccount:g.isPending,isBulkPausing:x.isPending,isBulkResuming:T.isPending})}):e.jsx(In,{onSetup:()=>h(!0)})}),e.jsx(tn,{open:w,onClose:()=>h(!1)}),e.jsx(dn,{open:f!==null,onClose:()=>I(null),provider:f?.provider||"",displayName:f?.displayName||"",catalog:_&&f?.provider?P[f.provider]:void 0,isFirstAccount:f?.isFirstAccount||!1})]})}export{Qn as CliproxyPage};
@@ -1 +0,0 @@
1
- import{r as d}from"./react-vendor-CNOkPC89.js";const M=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,c)=>c?c.toUpperCase():o.toLowerCase()),s=t=>{const e=_(t);return e.charAt(0).toUpperCase()+e.slice(1)},k=(...t)=>t.filter((e,o,c)=>!!e&&e.trim()!==""&&c.indexOf(e)===o).join(" ").trim(),v=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var m={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 x=d.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:n="",children:h,iconNode:p,...y},r)=>d.createElement("svg",{ref:r,...m,width:e,height:e,stroke:t,strokeWidth:c?Number(o)*24/Number(e):o,className:k("lucide",n),...!h&&!v(y)&&{"aria-hidden":"true"},...y},[...p.map(([i,l])=>d.createElement(i,l)),...Array.isArray(h)?h:[h]]));const a=(t,e)=>{const o=d.forwardRef(({className:c,...n},h)=>d.createElement(x,{ref:h,iconNode:e,className:k(`lucide-${M(s(t))}`,`lucide-${t}`,c),...n}));return o.displayName=s(t),o};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"}]],Q2=a("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"}]],J2=a("archive",w);const f=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],Y2=a("arrow-down-left",f);const $=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],a0=a("arrow-down-right",$);const N=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],e0=a("arrow-down",N);const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],t0=a("arrow-left",u);const b=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],o0=a("arrow-right-left",b);const z=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],c0=a("arrow-right",z);const q=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],h0=a("arrow-up-right",q);const C=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],d0=a("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"}]],n0=a("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"}]],y0=a("bot",j);const H=[["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"}]],s0=a("box",H);const V=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],k0=a("brain-circuit",V);const L=[["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"}]],p0=a("brain",L);const S=[["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"}]],r0=a("bug",S);const P=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],i0=a("calendar-clock",P);const F=[["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"}]],l0=a("calendar",F);const R=[["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"}]],M0=a("chart-column",R);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"}]],_0=a("chart-pie",B);const D=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],v0=a("check-check",D);const U=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],m0=a("check",U);const Z=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],x0=a("chevron-down",Z);const E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],g0=a("chevron-left",E);const T=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],w0=a("chevron-right",T);const W=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],f0=a("chevron-up",W);const O=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],$0=a("chevrons-up-down",O);const G=[["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"}]],N0=a("circle-alert",G);const I=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],u0=a("circle-check-big",I);const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],b0=a("circle-check",K);const X=[["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"}]],z0=a("circle-question-mark",X);const Q=[["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"}]],q0=a("circle-x",Q);const J=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],C0=a("circle",J);const Y=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],A0=a("clipboard",Y);const a1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],j0=a("clock",a1);const e1=[["path",{d:"m10.852 19.772-.383.924",key:"r7sl7d"}],["path",{d:"m13.148 14.228.383-.923",key:"1d5zpm"}],["path",{d:"M13.148 19.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1ydik7"}],["path",{d:"m13.53 20.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1m1vsf"}],["path",{d:"m14.772 15.852.923-.383",key:"660p6e"}],["path",{d:"m14.772 18.148.923.383",key:"hrcpis"}],["path",{d:"M4.2 15.1a7 7 0 1 1 9.93-9.858A7 7 0 0 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.2",key:"j2q98n"}],["path",{d:"m9.228 15.852-.923-.383",key:"1p9ong"}],["path",{d:"m9.228 18.148-.923.383",key:"6558rz"}]],H0=a("cloud-cog",e1);const t1=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],V0=a("cloud",t1);const o1=[["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"}]],L0=a("code-xml",o1);const c1=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],S0=a("code",c1);const h1=[["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"}]],P0=a("coins",h1);const d1=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],F0=a("command",d1);const n1=[["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"}]],R0=a("copy",n1);const y1=[["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"}]],B0=a("cpu",y1);const s1=[["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"}]],D0=a("database",s1);const k1=[["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"}]],U0=a("dollar-sign",k1);const p1=[["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"}]],Z0=a("download",p1);const r1=[["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"}]],E0=a("ellipsis",r1);const i1=[["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"}]],T0=a("external-link",i1);const l1=[["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"}]],W0=a("eye-off",l1);const M1=[["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"}]],O0=a("eye",M1);const _1=[["path",{d:"M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6",key:"14cnrg"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1",key:"sr0ebq"}],["path",{d:"M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1",key:"w793db"}]],G0=a("file-braces-corner",_1);const v1=[["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"}]],I0=a("file-braces",v1);const m1=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],K0=a("file-code-corner",m1);const x1=[["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"}]],X0=a("file-code",x1);const g1=[["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"}]],Q0=a("file-down",g1);const w1=[["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"}]],J0=a("file-exclamation-point",w1);const f1=[["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"}]],Y0=a("file-text",f1);const $1=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],aa=a("fingerprint-pattern",$1);const N1=[["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:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]],ea=a("folder-check",N1);const u1=[["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"}]],ta=a("folder-code",u1);const b1=[["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"}]],oa=a("folder-open",b1);const z1=[["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:"1kt360"}]],ca=a("folder",z1);const q1=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],ha=a("funnel",q1);const C1=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],da=a("gauge",C1);const A1=[["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"}]],na=a("git-branch",A1);const j1=[["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"}]],ya=a("github",j1);const H1=[["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"}]],sa=a("globe",H1);const V1=[["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"}]],ka=a("grip-horizontal",V1);const L1=[["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"}]],pa=a("grip-vertical",L1);const S1=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m16 6-4 4-4-4",key:"6wukr"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",key:"w68u3i"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 18h.01",key:"h775k"}]],ra=a("hard-drive-download",S1);const P1=[["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"}]],ia=a("heart",P1);const F1=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],la=a("history",F1);const R1=[["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"}]],Ma=a("house",R1);const B1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],_a=a("image",B1);const D1=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],va=a("inbox",D1);const U1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ma=a("info",U1);const Z1=[["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"}]],xa=a("key-round",Z1);const E1=[["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"}]],ga=a("key",E1);const T1=[["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"}]],wa=a("laptop",T1);const W1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],fa=a("layers",W1);const O1=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],$a=a("link-2",O1);const G1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Na=a("list-filter",G1);const I1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ua=a("loader-circle",I1);const K1=[["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"}]],ba=a("lock",K1);const X1=[["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"}]],za=a("log-out",X1);const Q1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],qa=a("megaphone",Q1);const J1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Ca=a("message-square",J1);const Y1=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],Aa=a("monitor-smartphone",Y1);const a2=[["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"}]],ja=a("monitor",a2);const e2=[["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"}]],Ha=a("moon",e2);const t2=[["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"}]],Va=a("network",t2);const o2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],La=a("panel-left",o2);const c2=[["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"}]],Sa=a("pause",c2);const h2=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Pa=a("pen-line",h2);const d2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Fa=a("pencil",d2);const n2=[["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"}]],Ra=a("play",n2);const y2=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Ba=a("plug-zap",y2);const s2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Da=a("plus",s2);const k2=[["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"}]],Ua=a("power-off",k2);const p2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Za=a("power",p2);const r2=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Ea=a("puzzle",r2);const i2=[["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"}]],Ta=a("radio",i2);const l2=[["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"}]],Wa=a("refresh-cw",l2);const M2=[["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"}]],Oa=a("rotate-ccw",M2);const _2=[["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"}]],Ga=a("rotate-cw",_2);const v2=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],Ia=a("route",v2);const m2=[["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"}]],Ka=a("save",m2);const x2=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Xa=a("scroll-text",x2);const g2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qa=a("search",g2);const w2=[["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"}]],Ja=a("server",w2);const f2=[["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"}]],Ya=a("settings-2",f2);const $2=[["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"}]],ae=a("settings",$2);const N2=[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],ee=a("shield-alert",N2);const u2=[["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"}]],te=a("shield-check",u2);const b2=[["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"}]],oe=a("shield",b2);const z2=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],ce=a("sliders-horizontal",z2);const q2=[["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"}]],he=a("sparkles",q2);const C2=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],de=a("square-terminal",C2);const A2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ne=a("square",A2);const j2=[["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"}]],ye=a("star",j2);const H2=[["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"}]],se=a("sun",H2);const V2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ke=a("terminal",V2);const L2=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],pe=a("timer-reset",L2);const S2=[["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"}]],re=a("trash-2",S2);const P2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],ie=a("trending-up",P2);const F2=[["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"}]],le=a("triangle-alert",F2);const R2=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],Me=a("unlink",R2);const B2=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],_e=a("upload",B2);const D2=[["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"}]],ve=a("user",D2);const U2=[["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"}]],me=a("users",U2);const Z2=[["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"}]],xe=a("wand-sparkles",Z2);const E2=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],ge=a("waves",E2);const T2=[["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"}]],we=a("wifi-off",T2);const W2=[["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"}]],fe=a("wifi",W2);const O2=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],$e=a("workflow",O2);const G2=[["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"}]],Ne=a("wrench",G2);const I2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ue=a("x",I2);const K2=[["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"}]],be=a("zap",K2);export{ke as $,Q2 as A,n0 as B,w0 as C,Sa as D,W0 as E,oa as F,da as G,Ma as H,q0 as I,Ra as J,ga as K,ua as L,Ha as M,pa as N,Na as O,La as P,Oa as Q,Wa as R,de as S,le as T,me as U,Ta as V,we as W,ue as X,B0 as Y,be as Z,ma as _,M0 as a,ha as a$,S0 as a0,h0 as a1,Y2 as a2,Y0 as a3,J0 as a4,ka as a5,c0 as a6,Ya as a7,_a as a8,Da as a9,wa as aA,ra as aB,ce as aC,_e as aD,I0 as aE,Z0 as aF,t0 as aG,ee as aH,Va as aI,E0 as aJ,ta as aK,na as aL,$e as aM,Ia as aN,G0 as aO,Za as aP,Ua as aQ,$0 as aR,Ba as aS,fa as aT,ea as aU,Pa as aV,la as aW,K0 as aX,ca as aY,aa as aZ,va as a_,he as aa,ja as ab,Ca as ac,p0 as ad,Ja as ae,J2 as af,X0 as ag,g0 as ah,te as ai,Aa as aj,ba as ak,F0 as al,U0 as am,D0 as an,a0 as ao,l0 as ap,P0 as aq,ie as ar,_0 as as,re as at,Ka as au,Qa as av,xe as aw,L0 as ax,k0 as ay,H0 as az,ya as b,pe as b0,Me as b1,$a as b2,ge as b3,Fa as b4,v0 as b5,Ne as b6,y0 as b7,i0 as b8,qa as b9,A0 as ba,V0 as bb,s0 as bc,r0 as bd,o0 as be,Q0 as bf,Ga as bg,ne as bh,e0 as bi,d0 as bj,Ea as c,Xa as d,ae as e,se as f,O0 as g,fe as h,oe as i,ia as j,u0 as k,C0 as l,m0 as m,xa as n,R0 as o,T0 as p,ve as q,za as r,x0 as s,f0 as t,sa as u,j0 as v,N0 as w,b0 as x,z0 as y,ye as z};