@kaitranntt/ccs 7.54.0 → 7.55.0-dev.2

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 (230) hide show
  1. package/README.md +26 -4
  2. package/config/base-codex.settings.json +4 -4
  3. package/dist/auth/commands/create-command.js +1 -1
  4. package/dist/auth/commands/create-command.js.map +1 -1
  5. package/dist/auth/commands/remove-command.js +1 -1
  6. package/dist/auth/commands/remove-command.js.map +1 -1
  7. package/dist/ccs.js +70 -370
  8. package/dist/ccs.js.map +1 -1
  9. package/dist/cliproxy/codex-plan-compatibility.d.ts +29 -0
  10. package/dist/cliproxy/codex-plan-compatibility.d.ts.map +1 -0
  11. package/dist/cliproxy/codex-plan-compatibility.js +130 -0
  12. package/dist/cliproxy/codex-plan-compatibility.js.map +1 -0
  13. package/dist/cliproxy/codex-reasoning-proxy.d.ts +5 -0
  14. package/dist/cliproxy/codex-reasoning-proxy.d.ts.map +1 -1
  15. package/dist/cliproxy/codex-reasoning-proxy.js +103 -20
  16. package/dist/cliproxy/codex-reasoning-proxy.js.map +1 -1
  17. package/dist/cliproxy/executor/index.d.ts.map +1 -1
  18. package/dist/cliproxy/executor/index.js +8 -0
  19. package/dist/cliproxy/executor/index.js.map +1 -1
  20. package/dist/cliproxy/index.d.ts +1 -0
  21. package/dist/cliproxy/index.d.ts.map +1 -1
  22. package/dist/cliproxy/index.js +6 -2
  23. package/dist/cliproxy/index.js.map +1 -1
  24. package/dist/cliproxy/model-catalog.d.ts.map +1 -1
  25. package/dist/cliproxy/model-catalog.js +81 -12
  26. package/dist/cliproxy/model-catalog.js.map +1 -1
  27. package/dist/cliproxy/model-config.d.ts.map +1 -1
  28. package/dist/cliproxy/model-config.js +2 -2
  29. package/dist/cliproxy/model-config.js.map +1 -1
  30. package/dist/cliproxy/services/variant-settings.d.ts +3 -1
  31. package/dist/cliproxy/services/variant-settings.d.ts.map +1 -1
  32. package/dist/cliproxy/services/variant-settings.js +5 -2
  33. package/dist/cliproxy/services/variant-settings.js.map +1 -1
  34. package/dist/commands/api-command/copy-command.d.ts +2 -0
  35. package/dist/commands/api-command/copy-command.d.ts.map +1 -0
  36. package/dist/commands/api-command/copy-command.js +41 -0
  37. package/dist/commands/api-command/copy-command.js.map +1 -0
  38. package/dist/commands/api-command/create-command.d.ts +2 -0
  39. package/dist/commands/api-command/create-command.d.ts.map +1 -0
  40. package/dist/commands/api-command/create-command.js +249 -0
  41. package/dist/commands/api-command/create-command.js.map +1 -0
  42. package/dist/commands/api-command/discover-command.d.ts +2 -0
  43. package/dist/commands/api-command/discover-command.d.ts.map +1 -0
  44. package/dist/commands/api-command/discover-command.js +69 -0
  45. package/dist/commands/api-command/discover-command.js.map +1 -0
  46. package/dist/commands/api-command/export-command.d.ts +2 -0
  47. package/dist/commands/api-command/export-command.d.ts.map +1 -0
  48. package/dist/commands/api-command/export-command.js +73 -0
  49. package/dist/commands/api-command/export-command.js.map +1 -0
  50. package/dist/commands/api-command/help.d.ts +3 -0
  51. package/dist/commands/api-command/help.d.ts.map +1 -0
  52. package/dist/commands/api-command/help.js +100 -0
  53. package/dist/commands/api-command/help.js.map +1 -0
  54. package/dist/commands/api-command/import-command.d.ts +2 -0
  55. package/dist/commands/api-command/import-command.d.ts.map +1 -0
  56. package/dist/commands/api-command/import-command.js +111 -0
  57. package/dist/commands/api-command/import-command.js.map +1 -0
  58. package/dist/commands/api-command/index.d.ts +3 -0
  59. package/dist/commands/api-command/index.d.ts.map +1 -0
  60. package/dist/commands/api-command/index.js +34 -0
  61. package/dist/commands/api-command/index.js.map +1 -0
  62. package/dist/commands/api-command/list-command.d.ts +2 -0
  63. package/dist/commands/api-command/list-command.d.ts.map +1 -0
  64. package/dist/commands/api-command/list-command.js +53 -0
  65. package/dist/commands/api-command/list-command.js.map +1 -0
  66. package/dist/commands/api-command/remove-command.d.ts +2 -0
  67. package/dist/commands/api-command/remove-command.d.ts.map +1 -0
  68. package/dist/commands/api-command/remove-command.js +63 -0
  69. package/dist/commands/api-command/remove-command.js.map +1 -0
  70. package/dist/commands/api-command/shared.d.ts +36 -0
  71. package/dist/commands/api-command/shared.d.ts.map +1 -0
  72. package/dist/commands/api-command/shared.js +164 -0
  73. package/dist/commands/api-command/shared.js.map +1 -0
  74. package/dist/commands/api-command.d.ts +1 -26
  75. package/dist/commands/api-command.d.ts.map +1 -1
  76. package/dist/commands/api-command.js +3 -807
  77. package/dist/commands/api-command.js.map +1 -1
  78. package/dist/commands/arg-extractor.d.ts +15 -0
  79. package/dist/commands/arg-extractor.d.ts.map +1 -1
  80. package/dist/commands/arg-extractor.js +48 -2
  81. package/dist/commands/arg-extractor.js.map +1 -1
  82. package/dist/commands/config-auth/index.d.ts.map +1 -1
  83. package/dist/commands/config-auth/index.js +35 -19
  84. package/dist/commands/config-auth/index.js.map +1 -1
  85. package/dist/commands/config-command-options.d.ts +14 -0
  86. package/dist/commands/config-command-options.d.ts.map +1 -0
  87. package/dist/commands/config-command-options.js +108 -0
  88. package/dist/commands/config-command-options.js.map +1 -0
  89. package/dist/commands/config-command.d.ts +1 -1
  90. package/dist/commands/config-command.d.ts.map +1 -1
  91. package/dist/commands/config-command.js +91 -104
  92. package/dist/commands/config-command.js.map +1 -1
  93. package/dist/commands/config-dashboard-host.d.ts +17 -0
  94. package/dist/commands/config-dashboard-host.d.ts.map +1 -0
  95. package/dist/commands/config-dashboard-host.js +99 -0
  96. package/dist/commands/config-dashboard-host.js.map +1 -0
  97. package/dist/commands/env-command.d.ts.map +1 -1
  98. package/dist/commands/env-command.js +5 -0
  99. package/dist/commands/env-command.js.map +1 -1
  100. package/dist/commands/help-command.js +1 -1
  101. package/dist/commands/help-command.js.map +1 -1
  102. package/dist/commands/named-command-router.d.ts +17 -0
  103. package/dist/commands/named-command-router.d.ts.map +1 -0
  104. package/dist/commands/named-command-router.js +39 -0
  105. package/dist/commands/named-command-router.js.map +1 -0
  106. package/dist/commands/persist-command.js +1 -1
  107. package/dist/commands/persist-command.js.map +1 -1
  108. package/dist/commands/root-command-router.d.ts +2 -0
  109. package/dist/commands/root-command-router.d.ts.map +1 -0
  110. package/dist/commands/root-command-router.js +209 -0
  111. package/dist/commands/root-command-router.js.map +1 -0
  112. package/dist/config/unified-config-loader.js +1 -1
  113. package/dist/config/unified-config-loader.js.map +1 -1
  114. package/dist/cursor/cursor-anthropic-response.d.ts +6 -0
  115. package/dist/cursor/cursor-anthropic-response.d.ts.map +1 -0
  116. package/dist/cursor/cursor-anthropic-response.js +190 -0
  117. package/dist/cursor/cursor-anthropic-response.js.map +1 -0
  118. package/dist/cursor/cursor-anthropic-translator.d.ts +11 -0
  119. package/dist/cursor/cursor-anthropic-translator.d.ts.map +1 -0
  120. package/dist/cursor/cursor-anthropic-translator.js +167 -0
  121. package/dist/cursor/cursor-anthropic-translator.js.map +1 -0
  122. package/dist/cursor/cursor-anthropic-types.d.ts +46 -0
  123. package/dist/cursor/cursor-anthropic-types.d.ts.map +1 -0
  124. package/dist/cursor/cursor-anthropic-types.js +3 -0
  125. package/dist/cursor/cursor-anthropic-types.js.map +1 -0
  126. package/dist/cursor/cursor-daemon-entry.d.ts.map +1 -1
  127. package/dist/cursor/cursor-daemon-entry.js +53 -24
  128. package/dist/cursor/cursor-daemon-entry.js.map +1 -1
  129. package/dist/cursor/cursor-models.d.ts.map +1 -1
  130. package/dist/cursor/cursor-models.js +36 -2
  131. package/dist/cursor/cursor-models.js.map +1 -1
  132. package/dist/glmt/glmt-proxy.d.ts +4 -3
  133. package/dist/glmt/glmt-proxy.d.ts.map +1 -1
  134. package/dist/glmt/glmt-proxy.js +4 -3
  135. package/dist/glmt/glmt-proxy.js.map +1 -1
  136. package/dist/glmt/sse-parser.d.ts +2 -0
  137. package/dist/glmt/sse-parser.d.ts.map +1 -1
  138. package/dist/glmt/sse-parser.js +4 -0
  139. package/dist/glmt/sse-parser.js.map +1 -1
  140. package/dist/management/instance-manager.d.ts +2 -1
  141. package/dist/management/instance-manager.d.ts.map +1 -1
  142. package/dist/management/instance-manager.js +23 -8
  143. package/dist/management/instance-manager.js.map +1 -1
  144. package/dist/management/profile-context-sync-lock.d.ts +3 -0
  145. package/dist/management/profile-context-sync-lock.d.ts.map +1 -1
  146. package/dist/management/profile-context-sync-lock.js +75 -3
  147. package/dist/management/profile-context-sync-lock.js.map +1 -1
  148. package/dist/management/recovery-manager.d.ts +2 -2
  149. package/dist/management/recovery-manager.js +2 -2
  150. package/dist/management/shared-manager.d.ts +31 -1
  151. package/dist/management/shared-manager.d.ts.map +1 -1
  152. package/dist/management/shared-manager.js +420 -23
  153. package/dist/management/shared-manager.js.map +1 -1
  154. package/dist/shared/claude-extension-setup.d.ts.map +1 -1
  155. package/dist/shared/claude-extension-setup.js +16 -2
  156. package/dist/shared/claude-extension-setup.js.map +1 -1
  157. package/dist/shared/provider-preset-catalog.d.ts +1 -1
  158. package/dist/shared/provider-preset-catalog.d.ts.map +1 -1
  159. package/dist/shared/provider-preset-catalog.js +34 -40
  160. package/dist/shared/provider-preset-catalog.js.map +1 -1
  161. package/dist/ui/assets/{accounts-CZEg1_PX.js → accounts-CxIwtPW5.js} +1 -1
  162. package/dist/ui/assets/{alert-dialog-DhwS38kc.js → alert-dialog-D0M-j0xk.js} +1 -1
  163. package/dist/ui/assets/{api-sWNND4wP.js → api-D_GvXEjg.js} +1 -1
  164. package/dist/ui/assets/{auth-section-nJIpOcnm.js → auth-section-DtxR8sof.js} +1 -1
  165. package/dist/ui/assets/{backups-section-D3A6hmrU.js → backups-section-DAPwVCGp.js} +1 -1
  166. package/dist/ui/assets/checkbox-D470Q1y9.js +1 -0
  167. package/dist/ui/assets/{claude-extension-BjInaILv.js → claude-extension-vRIHOe5q.js} +1 -1
  168. package/dist/ui/assets/cliproxy-DGsWe0cf.js +3 -0
  169. package/dist/ui/assets/{cliproxy-control-panel-CKO2Sn9B.js → cliproxy-control-panel-BoKpt64d.js} +1 -1
  170. package/dist/ui/assets/{confirm-dialog-DTKxwrat.js → confirm-dialog-BnNUvB5u.js} +1 -1
  171. package/dist/ui/assets/copilot-DCkXk9mK.js +3 -0
  172. package/dist/ui/assets/cursor-9aQfYlGU.js +1 -0
  173. package/dist/ui/assets/{droid-Cl8QsJJL.js → droid-Bzp6uHqU.js} +2 -2
  174. package/dist/ui/assets/{globalenv-section-C3dxxoD9.js → globalenv-section-BM9oGUk_.js} +1 -1
  175. package/dist/ui/assets/{health-BUifaDU7.js → health-DLIgkfxF.js} +1 -1
  176. package/dist/ui/assets/icons-DtwH984l.js +1 -0
  177. package/dist/ui/assets/index-C-7tLTU2.js +47 -0
  178. package/dist/ui/assets/index-ClEn7Y7g.css +1 -0
  179. package/dist/ui/assets/{index-CPdceT1C.js → index-D9tmeP-H.js} +1 -1
  180. package/dist/ui/assets/{index-CYo-E5rU.js → index-DGQhzUIq.js} +1 -1
  181. package/dist/ui/assets/{index-BOsbrhaa.js → index-DimlYMhI.js} +1 -1
  182. package/dist/ui/assets/{index-xayyyR26.js → index-DykKl5b0.js} +1 -1
  183. package/dist/ui/assets/providers/llama-cpp.svg +5 -0
  184. package/dist/ui/assets/{proxy-status-widget-D94htBPb.js → proxy-status-widget-DloYg7yP.js} +1 -1
  185. package/dist/ui/assets/{radix-ui-BR1vy4kf.js → radix-ui-Dt3edmE5.js} +8 -8
  186. package/dist/ui/assets/searchable-select-CSREngvO.js +1 -0
  187. package/dist/ui/assets/{separator-3fBbTn-V.js → separator-DzrBeBn-.js} +1 -1
  188. package/dist/ui/assets/{shared-q_FNNbjD.js → shared-qRzQxB-N.js} +1 -1
  189. package/dist/ui/assets/{switch-5N8qBdBr.js → switch-BP9rnaI6.js} +1 -1
  190. package/dist/ui/assets/{tanstack-e99Cjjy2.js → tanstack-B8i0evp-.js} +1 -1
  191. package/dist/ui/assets/{updates-CubQ54J0.js → updates-BQvHbU9s.js} +1 -1
  192. package/dist/ui/icons/novita.svg +9 -0
  193. package/dist/ui/index.html +5 -5
  194. package/dist/utils/config-manager.d.ts +1 -1
  195. package/dist/utils/config-manager.js +1 -1
  196. package/dist/utils/fetch-proxy-setup.d.ts.map +1 -1
  197. package/dist/utils/fetch-proxy-setup.js.map +1 -1
  198. package/dist/utils/glmt-deprecation.d.ts +11 -0
  199. package/dist/utils/glmt-deprecation.d.ts.map +1 -0
  200. package/dist/utils/glmt-deprecation.js +64 -0
  201. package/dist/utils/glmt-deprecation.js.map +1 -0
  202. package/dist/utils/shell-executor.d.ts.map +1 -1
  203. package/dist/utils/shell-executor.js +12 -0
  204. package/dist/utils/shell-executor.js.map +1 -1
  205. package/dist/web-server/index.d.ts +1 -0
  206. package/dist/web-server/index.d.ts.map +1 -1
  207. package/dist/web-server/index.js +39 -3
  208. package/dist/web-server/index.js.map +1 -1
  209. package/dist/web-server/routes/account-routes.js +2 -2
  210. package/dist/web-server/routes/account-routes.js.map +1 -1
  211. package/dist/web-server/routes/profile-routes.d.ts +1 -0
  212. package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
  213. package/dist/web-server/routes/profile-routes.js +3 -0
  214. package/dist/web-server/routes/profile-routes.js.map +1 -1
  215. package/dist/web-server/routes/variant-routes.d.ts +1 -0
  216. package/dist/web-server/routes/variant-routes.d.ts.map +1 -1
  217. package/dist/web-server/routes/variant-routes.js +3 -0
  218. package/dist/web-server/routes/variant-routes.js.map +1 -1
  219. package/package.json +3 -2
  220. package/scripts/completion/README.md +1 -1
  221. package/scripts/completion/ccs.fish +1 -2
  222. package/scripts/completion/ccs.zsh +1 -2
  223. package/scripts/postinstall.js +3 -3
  224. package/dist/ui/assets/checkbox-CZrxD1iS.js +0 -1
  225. package/dist/ui/assets/cliproxy-BGiSCGkl.js +0 -3
  226. package/dist/ui/assets/copilot-CuRngdBg.js +0 -3
  227. package/dist/ui/assets/cursor-Dxo0uIiU.js +0 -1
  228. package/dist/ui/assets/icons-DrEfTmfX.js +0 -1
  229. package/dist/ui/assets/index-Btf_ow2V.css +0 -1
  230. package/dist/ui/assets/index-Cw9Urr0S.js +0 -47
@@ -0,0 +1,47 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DimlYMhI.js","assets/radix-ui-Dt3edmE5.js","assets/react-vendor-CNOkPC89.js","assets/switch-BP9rnaI6.js","assets/icons-DtwH984l.js","assets/tanstack-B8i0evp-.js","assets/notifications-B2HqRBj7.js","assets/utils-CzKF5WmX.js","assets/form-utils-Bcoyqxpq.js","assets/code-highlight-BRUf_pqB.js","assets/globalenv-section-BM9oGUk_.js","assets/index-DykKl5b0.js","assets/index-D9tmeP-H.js","assets/default-ports-1QQSffYX.js","assets/proxy-status-widget-DloYg7yP.js","assets/alert-dialog-D0M-j0xk.js","assets/auth-section-DtxR8sof.js","assets/backups-section-DAPwVCGp.js","assets/index-DGQhzUIq.js","assets/charts-BBPXh0Ar.js","assets/api-D_GvXEjg.js","assets/confirm-dialog-BnNUvB5u.js","assets/separator-DzrBeBn-.js","assets/cliproxy-DGsWe0cf.js","assets/checkbox-D470Q1y9.js","assets/searchable-select-CSREngvO.js","assets/cliproxy-control-panel-BoKpt64d.js","assets/copilot-DCkXk9mK.js","assets/cursor-9aQfYlGU.js","assets/claude-extension-vRIHOe5q.js","assets/droid-Bzp6uHqU.js","assets/accounts-CxIwtPW5.js","assets/health-DLIgkfxF.js","assets/shared-qRzQxB-N.js","assets/updates-BQvHbU9s.js"])))=>i.map(i=>d[i]);
2
+ import{j as r,S as gr,R as ky,C as Dy,a as Ty,T as My,D as jy,P as Ey,O as Oy,b as B0,c as K0,d as q0,e as G0,f as Y0,A as F0,g as V0,h as Q0,i as W0,k as $0,l as X0,m as Z0,n as J0,I as eS,o as Py,p as tS,q as Ry,r as Ly,s as nS,t as _y,V as aS,L as zy,u as Iy,v as iS,w as oS,x as Uy,y as sS,z as lS,B as Hy,E as rS,F as cS,G as By,H as uS,J as Ky,K as qy,M as Gy,N as dS,Q as fS,U as hS,W as Yy,X as pS,Y as mS,Z as gS}from"./radix-ui-Dt3edmE5.js";import{e as Md,f as yS,r as S,u as yr,O as md,N as xS,h as jd,L as gd,R as bS,g as vS,i as SS,c as oe,B as CS,j as wS,k as Pt}from"./react-vendor-CNOkPC89.js";import{Q as NS,u as Dt,a as it,b as et,c as AS}from"./tanstack-B8i0evp-.js";import{t as le,T as kS}from"./notifications-B2HqRBj7.js";import{L as jn,X as vo,P as DS,C as xr,H as TS,a as MS,K as Fy,G as jS,Z as Vy,b as Qy,F as Wy,U as $y,c as ES,S as OS,A as js,d as PS,e as RS,M as LS,E as br,f as vr,B as _S,R as Es,W as zS,g as IS,h as US,i as HS,j as cg,k as ug,l as xo,m as Ed,n as rr,o as Xy,p as BS,q as KS,r as zs,s as Od,t as Zy,u as Os,v as Sr,w as Pd,T as qn,x as Cr,y as qS,z as GS,D as wr,I as YS,J as FS,N as VS,O as Nr,Q as QS,V as WS,Y as $S,_ as XS,$ as ZS,a0 as JS,a1 as eC,a2 as Rd,a3 as dg,a4 as tC,a5 as nC,a6 as aC,a7 as iC,a8 as fg,a9 as oC,aa as sC}from"./icons-DtwH984l.js";import{t as lC,c as rC,a as Ar,e as xs,f as Cs,b as cC,d as uC,g as dC,h as fC,i as hC,j as pC,k as mC,l as gC,m as yC,n as xC,o as bC,p as vC,q as SC,r as CC,s as wC,u as NC,v as AC,w as kC,x as DC,y as TC,z as MC,A as jC,B as EC,C as OC,D as PC,E as RC,F as LC,G as _C,H as zC,I as IC,J as UC}from"./utils-CzKF5WmX.js";import{o as hg,s as pg,p as HC,a as BC,$ as KC,b as Jy,c as Va,d as qC,_ as GC,u as YC,e as mg}from"./form-utils-Bcoyqxpq.js";import{H as FC,t as gg}from"./code-highlight-BRUf_pqB.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function s(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(c){if(c.ep)return;c.ep=!0;const f=s(c);fetch(c.href,f)}})();var Vu={exports:{}},bs={},Qu={exports:{}},Wu={};var yg;function VC(){return yg||(yg=1,(function(n){function a(P,V){var ae=P.length;P.push(V);e:for(;0<ae;){var pe=ae-1>>>1,xe=P[pe];if(0<c(xe,V))P[pe]=V,P[ae]=xe,ae=pe;else break e}}function s(P){return P.length===0?null:P[0]}function l(P){if(P.length===0)return null;var V=P[0],ae=P.pop();if(ae!==V){P[0]=ae;e:for(var pe=0,xe=P.length,ie=xe>>>1;pe<ie;){var Z=2*(pe+1)-1,G=P[Z],$=Z+1,re=P[$];if(0>c(G,ae))$<xe&&0>c(re,G)?(P[pe]=re,P[$]=ae,pe=$):(P[pe]=G,P[Z]=ae,pe=Z);else if($<xe&&0>c(re,ae))P[pe]=re,P[$]=ae,pe=$;else break e}}return V}function c(P,V){var ae=P.sortIndex-V.sortIndex;return ae!==0?ae:P.id-V.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var m=[],y=[],C=1,x=null,v=3,N=!1,w=!1,T=!1,O=!1,M=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function I(P){for(var V=s(y);V!==null;){if(V.callback===null)l(y);else if(V.startTime<=P)l(y),V.sortIndex=V.expirationTime,a(m,V);else break;V=s(y)}}function E(P){if(T=!1,I(P),!w)if(s(m)!==null)w=!0,k||(k=!0,J());else{var V=s(y);V!==null&&Ce(E,V.startTime-P)}}var k=!1,z=-1,Q=5,W=-1;function ee(){return O?!0:!(n.unstable_now()-W<Q)}function ne(){if(O=!1,k){var P=n.unstable_now();W=P;var V=!0;try{e:{w=!1,T&&(T=!1,U(z),z=-1),N=!0;var ae=v;try{t:{for(I(P),x=s(m);x!==null&&!(x.expirationTime>P&&ee());){var pe=x.callback;if(typeof pe=="function"){x.callback=null,v=x.priorityLevel;var xe=pe(x.expirationTime<=P);if(P=n.unstable_now(),typeof xe=="function"){x.callback=xe,I(P),V=!0;break t}x===s(m)&&l(m),I(P)}else l(m);x=s(m)}if(x!==null)V=!0;else{var ie=s(y);ie!==null&&Ce(E,ie.startTime-P),V=!1}}break e}finally{x=null,v=ae,N=!1}V=void 0}}finally{V?J():k=!1}}}var J;if(typeof K=="function")J=function(){K(ne)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,ue=ge.port2;ge.port1.onmessage=ne,J=function(){ue.postMessage(null)}}else J=function(){M(ne,0)};function Ce(P,V){z=M(function(){P(n.unstable_now())},V)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(P){P.callback=null},n.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<P?Math.floor(1e3/P):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(P){switch(v){case 1:case 2:case 3:var V=3;break;default:V=v}var ae=v;v=V;try{return P()}finally{v=ae}},n.unstable_requestPaint=function(){O=!0},n.unstable_runWithPriority=function(P,V){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ae=v;v=P;try{return V()}finally{v=ae}},n.unstable_scheduleCallback=function(P,V,ae){var pe=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?pe+ae:pe):ae=pe,P){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=ae+xe,P={id:C++,callback:V,priorityLevel:P,startTime:ae,expirationTime:xe,sortIndex:-1},ae>pe?(P.sortIndex=ae,a(y,P),s(m)===null&&P===s(y)&&(T?(U(z),z=-1):T=!0,Ce(E,ae-pe))):(P.sortIndex=xe,a(m,P),w||N||(w=!0,k||(k=!0,J()))),P},n.unstable_shouldYield=ee,n.unstable_wrapCallback=function(P){var V=v;return function(){var ae=v;v=V;try{return P.apply(this,arguments)}finally{v=ae}}}})(Wu)),Wu}var xg;function QC(){return xg||(xg=1,Qu.exports=VC()),Qu.exports}var bg;function WC(){if(bg)return bs;bg=1;var n=QC(),a=Md(),s=yS();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(f(e)!==e)throw Error(l(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(l(188));return t!==e?null:e}for(var i=e,o=t;;){var u=i.return;if(u===null)break;var d=u.alternate;if(d===null){if(o=u.return,o!==null){i=o;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===i)return m(u),e;if(d===o)return m(u),t;d=d.sibling}throw Error(l(188))}if(i.return!==o.return)i=u,o=d;else{for(var g=!1,b=u.child;b;){if(b===i){g=!0,i=u,o=d;break}if(b===o){g=!0,o=u,i=d;break}b=b.sibling}if(!g){for(b=d.child;b;){if(b===i){g=!0,i=d,o=u;break}if(b===o){g=!0,o=d,i=u;break}b=b.sibling}if(!g)throw Error(l(189))}}if(i.alternate!==o)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,v=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),K=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case M:return"Profiler";case O:return"StrictMode";case E:return"Suspense";case k:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case K:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var Ce=Array.isArray,P=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},pe=[],xe=-1;function ie(e){return{current:e}}function Z(e){0>xe||(e.current=pe[xe],pe[xe]=null,xe--)}function G(e,t){xe++,pe[xe]=e.current,e.current=t}var $=ie(null),re=ie(null),te=ie(null),se=ie(null);function be(e,t){switch(G(te,t),G(re,e),G($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Om(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Om(t),e=Pm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z($),G($,e)}function Re(){Z($),Z(re),Z(te)}function Ye(e){e.memoizedState!==null&&G(se,e);var t=$.current,i=Pm(t,e.type);t!==i&&(G(re,e),G($,i))}function St(e){re.current===e&&(Z($),Z(re)),se.current===e&&(Z(se),ps._currentValue=ae)}var Ct,Ve;function ot(e){if(Ct===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Ct=t&&t[1]||"",Ve=-1<i.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Ct+e+Ve}var It=!1;function Qt(e,t){if(!e||It)return"";It=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(H){var _=H}Reflect.construct(e,[],F)}else{try{F.call()}catch(H){_=H}e.call(F.prototype)}}else{try{throw Error()}catch(H){_=H}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(H){if(H&&_&&typeof H.stack=="string")return[H.stack,_.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),g=d[0],b=d[1];if(g&&b){var A=g.split(`
5
+ `),L=b.split(`
6
+ `);for(u=o=0;o<A.length&&!A[o].includes("DetermineComponentFrameRoot");)o++;for(;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;if(o===A.length||u===L.length)for(o=A.length-1,u=L.length-1;1<=o&&0<=u&&A[o]!==L[u];)u--;for(;1<=o&&0<=u;o--,u--)if(A[o]!==L[u]){if(o!==1||u!==1)do if(o--,u--,0>u||A[o]!==L[u]){var q=`
7
+ `+A[o].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=o&&0<=u);break}}}finally{It=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ot(i):""}function Yn(e,t){switch(e.tag){case 26:case 27:case 5:return ot(e.type);case 16:return ot("Lazy");case 13:return e.child!==t&&t!==null?ot("Suspense Fallback"):ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return Qt(e.type,!1);case 11:return Qt(e.type.render,!1);case 1:return Qt(e.type,!0);case 31:return ot("Activity");default:return""}}function De(e){try{var t="",i=null;do t+=Yn(e,i),i=e,e=e.return;while(e);return t}catch(o){return`
8
+ Error generating stack: `+o.message+`
9
+ `+o.stack}}var Wt=Object.prototype.hasOwnProperty,En=n.unstable_scheduleCallback,$t=n.unstable_cancelCallback,Sa=n.unstable_shouldYield,Fn=n.unstable_requestPaint,pt=n.unstable_now,Xt=n.unstable_getCurrentPriorityLevel,Vn=n.unstable_ImmediatePriority,ei=n.unstable_UserBlockingPriority,On=n.unstable_NormalPriority,Pn=n.unstable_LowPriority,Di=n.unstable_IdlePriority,wo=n.log,No=n.unstable_setDisableYieldValue,Qn=null,X=null;function je(e){if(typeof wo=="function"&&No(e),X&&typeof X.setStrictMode=="function")try{X.setStrictMode(Qn,e)}catch{}}var ve=Math.clz32?Math.clz32:he,Ee=Math.log,st=Math.LN2;function he(e){return e>>>=0,e===0?32:31-(Ee(e)/st|0)|0}var ke=256,Se=262144,Oe=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ne(e,t,i){var o=e.pendingLanes;if(o===0)return 0;var u=0,d=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var b=o&134217727;return b!==0?(o=b&~d,o!==0?u=tt(o):(g&=b,g!==0?u=tt(g):i||(i=b&~e,i!==0&&(u=tt(i))))):(b=o&~d,b!==0?u=tt(b):g!==0?u=tt(g):i||(i=o&~e,i!==0&&(u=tt(i)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,i=t&-t,d>=i||d===32&&(i&4194048)!==0)?t:u}function _t(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Wn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nt(){var e=Oe;return Oe<<=1,(Oe&62914560)===0&&(Oe=4194304),e}function Zt(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function wn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ao(e,t,i,o,u,d){var g=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,A=e.expirationTimes,L=e.hiddenUpdates;for(i=g&~i;0<i;){var q=31-ve(i),F=1<<q;b[q]=0,A[q]=-1;var _=L[q];if(_!==null)for(L[q]=null,q=0;q<_.length;q++){var H=_[q];H!==null&&(H.lane&=-536870913)}i&=~F}o!==0&&ti(e,o,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(g&~t))}function ti(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-ve(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function ko(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var o=31-ve(i),u=1<<o;u&t|e[o]&t&&(e[o]|=t),i&=~u}}function fn(e,t){var i=t&-t;return i=(i&42)!==0?1:$n(i),(i&(e.suspendedLanes|t))!==0?0:i}function $n(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ti(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Do(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:ng(e.type))}function To(e,t){var i=V.p;try{return V.p=e,t()}finally{V.p=i}}var Ca=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Ca,Ut="__reactProps$"+Ca,Mi="__reactContainer$"+Ca,Ir="__reactEvents$"+Ca,jb="__reactListeners$"+Ca,Eb="__reactHandles$"+Ca,bf="__reactResources$"+Ca,Mo="__reactMarker$"+Ca;function Ur(e){delete e[Tt],delete e[Ut],delete e[Ir],delete e[jb],delete e[Eb]}function ji(e){var t=e[Tt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Mi]||i[Tt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Hm(e);e!==null;){if(i=e[Tt])return i;e=Hm(e)}return t}e=i,i=e.parentNode}return null}function Ei(e){if(e=e[Tt]||e[Mi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jo(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function Oi(e){var t=e[bf];return t||(t=e[bf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function At(e){e[Mo]=!0}var vf=new Set,Sf={};function ni(e,t){Pi(e,t),Pi(e+"Capture",t)}function Pi(e,t){for(Sf[e]=t,e=0;e<t.length;e++)vf.add(t[e])}var Ob=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Cf={},wf={};function Pb(e){return Wt.call(wf,e)?!0:Wt.call(Cf,e)?!1:Ob.test(e)?wf[e]=!0:(Cf[e]=!0,!1)}function Bs(e,t,i){if(Pb(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Ks(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Xn(e,t,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+o)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rb(e,t,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,d=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(g){i=""+g,d.call(this,g)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hr(e){if(!e._valueTracker){var t=Nf(e)?"checked":"value";e._valueTracker=Rb(e,t,""+e[t])}}function Af(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),o="";return e&&(o=Nf(e)?e.checked?"true":"false":e.value),e=o,e!==i?(t.setValue(e),!0):!1}function qs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Lb=/[\n"\\]/g;function pn(e){return e.replace(Lb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Br(e,t,i,o,u,d,g,b){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hn(t)):e.value!==""+hn(t)&&(e.value=""+hn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Kr(e,g,hn(t)):i!=null?Kr(e,g,hn(i)):o!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+hn(b):e.removeAttribute("name")}function kf(e,t,i,o,u,d,g,b){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Hr(e);return}i=i!=null?""+hn(i):"",t=t!=null?""+hn(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=b?e.checked:!!o,e.defaultChecked=!!o,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Hr(e)}function Kr(e,t,i){t==="number"&&qs(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ri(e,t,i,o){if(e=e.options,t){t={};for(var u=0;u<i.length;u++)t["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=t.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&o&&(e[i].defaultSelected=!0)}else{for(i=""+hn(i),t=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Df(e,t,i){if(t!=null&&(t=""+hn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+hn(i):""}function Tf(e,t,i,o){if(t==null){if(o!=null){if(i!=null)throw Error(l(92));if(Ce(o)){if(1<o.length)throw Error(l(93));o=o[0]}i=o}i==null&&(i=""),t=i}i=hn(t),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),Hr(e)}function Li(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var _b=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Mf(e,t,i){var o=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,i):typeof i!="number"||i===0||_b.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function jf(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var u in t)o=t[u],t.hasOwnProperty(u)&&i[u]!==o&&Mf(e,u,o)}else for(var d in t)t.hasOwnProperty(d)&&Mf(e,d,t[d])}function qr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ib=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gs(e){return Ib.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var Gr=null;function Yr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _i=null,zi=null;function Ef(e){var t=Ei(e);if(t&&(e=t.stateNode)){var i=e[Ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Br(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var o=i[t];if(o!==e&&o.form===e.form){var u=o[Ut]||null;if(!u)throw Error(l(90));Br(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<i.length;t++)o=i[t],o.form===e.form&&Af(o)}break e;case"textarea":Df(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ri(e,!!i.multiple,t,!1)}}}var Fr=!1;function Of(e,t,i){if(Fr)return e(t,i);Fr=!0;try{var o=e(t);return o}finally{if(Fr=!1,(_i!==null||zi!==null)&&(El(),_i&&(t=_i,e=zi,zi=_i=null,Ef(t),e)))for(t=0;t<e.length;t++)Ef(e[t])}}function Eo(e,t){var i=e.stateNode;if(i===null)return null;var o=i[Ut]||null;if(o===null)return null;i=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vr=!1;if(Jn)try{var Oo={};Object.defineProperty(Oo,"passive",{get:function(){Vr=!0}}),window.addEventListener("test",Oo,Oo),window.removeEventListener("test",Oo,Oo)}catch{Vr=!1}var wa=null,Qr=null,Ys=null;function Pf(){if(Ys)return Ys;var e,t=Qr,i=t.length,o,u="value"in wa?wa.value:wa.textContent,d=u.length;for(e=0;e<i&&t[e]===u[e];e++);var g=i-e;for(o=1;o<=g&&t[i-o]===u[d-o];o++);return Ys=u.slice(e,1<o?1-o:void 0)}function Fs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vs(){return!0}function Rf(){return!1}function Ht(e){function t(i,o,u,d,g){this._reactName=i,this._targetInst=u,this.type=o,this.nativeEvent=d,this.target=g,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(d):d[b]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Vs:Rf,this.isPropagationStopped=Rf,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Vs)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Vs)},persist:function(){},isPersistent:Vs}),t}var ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qs=Ht(ai),Po=x({},ai,{view:0,detail:0}),Ub=Ht(Po),Wr,$r,Ro,Ws=x({},Po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ro&&(Ro&&e.type==="mousemove"?(Wr=e.screenX-Ro.screenX,$r=e.screenY-Ro.screenY):$r=Wr=0,Ro=e),Wr)},movementY:function(e){return"movementY"in e?e.movementY:$r}}),Lf=Ht(Ws),Hb=x({},Ws,{dataTransfer:0}),Bb=Ht(Hb),Kb=x({},Po,{relatedTarget:0}),Xr=Ht(Kb),qb=x({},ai,{animationName:0,elapsedTime:0,pseudoElement:0}),Gb=Ht(qb),Yb=x({},ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fb=Ht(Yb),Vb=x({},ai,{data:0}),_f=Ht(Vb),Qb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},$b={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$b[e])?!!t[e]:!1}function Zr(){return Xb}var Zb=x({},Po,{key:function(e){if(e.key){var t=Qb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zr,charCode:function(e){return e.type==="keypress"?Fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jb=Ht(Zb),ev=x({},Ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zf=Ht(ev),tv=x({},Po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zr}),nv=Ht(tv),av=x({},ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),iv=Ht(av),ov=x({},Ws,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),sv=Ht(ov),lv=x({},ai,{newState:0,oldState:0}),rv=Ht(lv),cv=[9,13,27,32],Jr=Jn&&"CompositionEvent"in window,Lo=null;Jn&&"documentMode"in document&&(Lo=document.documentMode);var uv=Jn&&"TextEvent"in window&&!Lo,If=Jn&&(!Jr||Lo&&8<Lo&&11>=Lo),Uf=" ",Hf=!1;function Bf(e,t){switch(e){case"keyup":return cv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ii=!1;function dv(e,t){switch(e){case"compositionend":return Kf(t);case"keypress":return t.which!==32?null:(Hf=!0,Uf);case"textInput":return e=t.data,e===Uf&&Hf?null:e;default:return null}}function fv(e,t){if(Ii)return e==="compositionend"||!Jr&&Bf(e,t)?(e=Pf(),Ys=Qr=wa=null,Ii=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return If&&t.locale!=="ko"?null:t.data;default:return null}}var hv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hv[e.type]:t==="textarea"}function Gf(e,t,i,o){_i?zi?zi.push(o):zi=[o]:_i=o,t=Il(t,"onChange"),0<t.length&&(i=new Qs("onChange","change",null,i,o),e.push({event:i,listeners:t}))}var _o=null,zo=null;function pv(e){km(e,0)}function $s(e){var t=jo(e);if(Af(t))return e}function Yf(e,t){if(e==="change")return t}var Ff=!1;if(Jn){var ec;if(Jn){var tc="oninput"in document;if(!tc){var Vf=document.createElement("div");Vf.setAttribute("oninput","return;"),tc=typeof Vf.oninput=="function"}ec=tc}else ec=!1;Ff=ec&&(!document.documentMode||9<document.documentMode)}function Qf(){_o&&(_o.detachEvent("onpropertychange",Wf),zo=_o=null)}function Wf(e){if(e.propertyName==="value"&&$s(zo)){var t=[];Gf(t,zo,e,Yr(e)),Of(pv,t)}}function mv(e,t,i){e==="focusin"?(Qf(),_o=t,zo=i,_o.attachEvent("onpropertychange",Wf)):e==="focusout"&&Qf()}function gv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(zo)}function yv(e,t){if(e==="click")return $s(t)}function xv(e,t){if(e==="input"||e==="change")return $s(t)}function bv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:bv;function Io(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var u=i[o];if(!Wt.call(t,u)||!Jt(e[u],t[u]))return!1}return!0}function $f(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xf(e,t){var i=$f(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=t&&o>=t)return{node:i,offset:t-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=$f(i)}}function Zf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qs(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=qs(e.document)}return t}function nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var vv=Jn&&"documentMode"in document&&11>=document.documentMode,Ui=null,ac=null,Uo=null,ic=!1;function eh(e,t,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ic||Ui==null||Ui!==qs(o)||(o=Ui,"selectionStart"in o&&nc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Uo&&Io(Uo,o)||(Uo=o,o=Il(ac,"onSelect"),0<o.length&&(t=new Qs("onSelect","select",null,t,i),e.push({event:t,listeners:o}),t.target=Ui)))}function ii(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Hi={animationend:ii("Animation","AnimationEnd"),animationiteration:ii("Animation","AnimationIteration"),animationstart:ii("Animation","AnimationStart"),transitionrun:ii("Transition","TransitionRun"),transitionstart:ii("Transition","TransitionStart"),transitioncancel:ii("Transition","TransitionCancel"),transitionend:ii("Transition","TransitionEnd")},oc={},th={};Jn&&(th=document.createElement("div").style,"AnimationEvent"in window||(delete Hi.animationend.animation,delete Hi.animationiteration.animation,delete Hi.animationstart.animation),"TransitionEvent"in window||delete Hi.transitionend.transition);function oi(e){if(oc[e])return oc[e];if(!Hi[e])return e;var t=Hi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in th)return oc[e]=t[i];return e}var nh=oi("animationend"),ah=oi("animationiteration"),ih=oi("animationstart"),Sv=oi("transitionrun"),Cv=oi("transitionstart"),wv=oi("transitioncancel"),oh=oi("transitionend"),sh=new Map,sc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sc.push("scrollEnd");function Nn(e,t){sh.set(e,t),ni(t,[e])}var Xs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mn=[],Bi=0,lc=0;function Zs(){for(var e=Bi,t=lc=Bi=0;t<e;){var i=mn[t];mn[t++]=null;var o=mn[t];mn[t++]=null;var u=mn[t];mn[t++]=null;var d=mn[t];if(mn[t++]=null,o!==null&&u!==null){var g=o.pending;g===null?u.next=u:(u.next=g.next,g.next=u),o.pending=u}d!==0&&lh(i,u,d)}}function Js(e,t,i,o){mn[Bi++]=e,mn[Bi++]=t,mn[Bi++]=i,mn[Bi++]=o,lc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function rc(e,t,i,o){return Js(e,t,i,o),el(e)}function si(e,t){return Js(e,null,null,t),el(e)}function lh(e,t,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var u=!1,d=e.return;d!==null;)d.childLanes|=i,o=d.alternate,o!==null&&(o.childLanes|=i),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-ve(i),e=d.hiddenUpdates,o=e[u],o===null?e[u]=[t]:o.push(t),t.lane=i|536870912),d):null}function el(e){if(50<ls)throw ls=0,yu=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ki={};function Nv(e,t,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,i,o){return new Nv(e,t,i,o)}function cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ea(e,t){var i=e.alternate;return i===null?(i=en(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function rh(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function tl(e,t,i,o,u,d){var g=0;if(o=e,typeof e=="function")cc(e)&&(g=1);else if(typeof e=="string")g=M0(e,i,$.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=en(31,i,t,u),e.elementType=W,e.lanes=d,e;case T:return li(i.children,u,d,t);case O:g=8,u|=24;break;case M:return e=en(12,i,t,u|2),e.elementType=M,e.lanes=d,e;case E:return e=en(13,i,t,u),e.elementType=E,e.lanes=d,e;case k:return e=en(19,i,t,u),e.elementType=k,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:g=10;break e;case U:g=9;break e;case I:g=11;break e;case z:g=14;break e;case Q:g=16,o=null;break e}g=29,i=Error(l(130,e===null?"null":typeof e,"")),o=null}return t=en(g,i,t,u),t.elementType=e,t.type=o,t.lanes=d,t}function li(e,t,i,o){return e=en(7,e,o,t),e.lanes=i,e}function uc(e,t,i){return e=en(6,e,null,t),e.lanes=i,e}function ch(e){var t=en(18,null,null,0);return t.stateNode=e,t}function dc(e,t,i){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var uh=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var i=uh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:De(t)},uh.set(e,t),t)}return{value:e,source:t,stack:De(t)}}var qi=[],Gi=0,nl=null,Ho=0,yn=[],xn=0,Na=null,Rn=1,Ln="";function ta(e,t){qi[Gi++]=Ho,qi[Gi++]=nl,nl=e,Ho=t}function dh(e,t,i){yn[xn++]=Rn,yn[xn++]=Ln,yn[xn++]=Na,Na=e;var o=Rn;e=Ln;var u=32-ve(o)-1;o&=~(1<<u),i+=1;var d=32-ve(t)+u;if(30<d){var g=u-u%5;d=(o&(1<<g)-1).toString(32),o>>=g,u-=g,Rn=1<<32-ve(t)+u|i<<u|o,Ln=d+e}else Rn=1<<d|i<<u|o,Ln=e}function fc(e){e.return!==null&&(ta(e,1),dh(e,1,0))}function hc(e){for(;e===nl;)nl=qi[--Gi],qi[Gi]=null,Ho=qi[--Gi],qi[Gi]=null;for(;e===Na;)Na=yn[--xn],yn[xn]=null,Ln=yn[--xn],yn[xn]=null,Rn=yn[--xn],yn[xn]=null}function fh(e,t){yn[xn++]=Rn,yn[xn++]=Ln,yn[xn++]=Na,Rn=t.id,Ln=t.overflow,Na=e}var Mt=null,nt=null,Ue=!1,Aa=null,bn=!1,pc=Error(l(519));function ka(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bo(gn(t,e)),pc}function hh(e){var t=e.stateNode,i=e.type,o=e.memoizedProps;switch(t[Tt]=e,t[Ut]=o,i){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(i=0;i<cs.length;i++)_e(cs[i],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),kf(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),Tf(t,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||o.suppressHydrationWarning===!0||jm(t.textContent,i)?(o.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),o.onScroll!=null&&_e("scroll",t),o.onScrollEnd!=null&&_e("scrollend",t),o.onClick!=null&&(t.onclick=Zn),t=!0):t=!1,t||ka(e,!0)}function ph(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:Mt=Mt.return}}function Yi(e){if(e!==Mt)return!1;if(!Ue)return ph(e),Ue=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Ou(e.type,e.memoizedProps)),i=!i),i&&nt&&ka(e),ph(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));nt=Um(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));nt=Um(e)}else t===27?(t=nt,Ha(e.type)?(e=zu,zu=null,nt=e):nt=t):nt=Mt?Sn(e.stateNode.nextSibling):null;return!0}function ri(){nt=Mt=null,Ue=!1}function mc(){var e=Aa;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),Aa=null),e}function Bo(e){Aa===null?Aa=[e]:Aa.push(e)}var gc=ie(null),ci=null,na=null;function Da(e,t,i){G(gc,t._currentValue),t._currentValue=i}function aa(e){e._currentValue=gc.current,Z(gc)}function yc(e,t,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===i)break;e=e.return}}function xc(e,t,i,o){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var g=u.child;d=d.firstContext;e:for(;d!==null;){var b=d;d=u;for(var A=0;A<t.length;A++)if(b.context===t[A]){d.lanes|=i,b=d.alternate,b!==null&&(b.lanes|=i),yc(d.return,i,e),o||(g=null);break e}d=b.next}}else if(u.tag===18){if(g=u.return,g===null)throw Error(l(341));g.lanes|=i,d=g.alternate,d!==null&&(d.lanes|=i),yc(g,i,e),g=null}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===e){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}}function Fi(e,t,i,o){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var g=u.alternate;if(g===null)throw Error(l(387));if(g=g.memoizedProps,g!==null){var b=u.type;Jt(u.pendingProps.value,g.value)||(e!==null?e.push(b):e=[b])}}else if(u===se.current){if(g=u.alternate,g===null)throw Error(l(387));g.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ps):e=[ps])}u=u.return}e!==null&&xc(t,e,i,o),t.flags|=262144}function al(e){for(e=e.firstContext;e!==null;){if(!Jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ui(e){ci=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return mh(ci,e)}function il(e,t){return ci===null&&ui(e),mh(e,t)}function mh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},na===null){if(e===null)throw Error(l(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return i}var Av=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},kv=n.unstable_scheduleCallback,Dv=n.unstable_NormalPriority,yt={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bc(){return{controller:new Av,data:new Map,refCount:0}}function Ko(e){e.refCount--,e.refCount===0&&kv(Dv,function(){e.controller.abort()})}var qo=null,vc=0,Vi=0,Qi=null;function Tv(e,t){if(qo===null){var i=qo=[];vc=0,Vi=wu(),Qi={status:"pending",value:void 0,then:function(o){i.push(o)}}}return vc++,t.then(gh,gh),t}function gh(){if(--vc===0&&qo!==null){Qi!==null&&(Qi.status="fulfilled");var e=qo;qo=null,Vi=0,Qi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mv(e,t){var i=[],o={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var u=0;u<i.length;u++)(0,i[u])(t)},function(u){for(o.status="rejected",o.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),o}var yh=P.S;P.S=function(e,t){em=pt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Tv(e,t),yh!==null&&yh(e,t)};var di=ie(null);function Sc(){var e=di.current;return e!==null?e:Je.pooledCache}function ol(e,t){t===null?G(di,di.current):G(di,t.pool)}function xh(){var e=Sc();return e===null?null:{parent:yt._currentValue,pool:e}}var Wi=Error(l(460)),Cc=Error(l(474)),sl=Error(l(542)),ll={then:function(){}};function bh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Zn,Zn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ch(e),e;default:if(typeof t.status=="string")t.then(Zn,Zn);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=o}},function(o){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ch(e),e}throw hi=t,Wi}}function fi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(hi=i,Wi):i}}var hi=null;function Sh(){if(hi===null)throw Error(l(459));var e=hi;return hi=null,e}function Ch(e){if(e===Wi||e===sl)throw Error(l(483))}var $i=null,Go=0;function rl(e){var t=Go;return Go+=1,$i===null&&($i=[]),vh($i,e,t)}function Yo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function cl(e,t){throw t.$$typeof===v?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wh(e){function t(j,D){if(e){var R=j.deletions;R===null?(j.deletions=[D],j.flags|=16):R.push(D)}}function i(j,D){if(!e)return null;for(;D!==null;)t(j,D),D=D.sibling;return null}function o(j){for(var D=new Map;j!==null;)j.key!==null?D.set(j.key,j):D.set(j.index,j),j=j.sibling;return D}function u(j,D){return j=ea(j,D),j.index=0,j.sibling=null,j}function d(j,D,R){return j.index=R,e?(R=j.alternate,R!==null?(R=R.index,R<D?(j.flags|=67108866,D):R):(j.flags|=67108866,D)):(j.flags|=1048576,D)}function g(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function b(j,D,R,Y){return D===null||D.tag!==6?(D=uc(R,j.mode,Y),D.return=j,D):(D=u(D,R),D.return=j,D)}function A(j,D,R,Y){var ye=R.type;return ye===T?q(j,D,R.props.children,Y,R.key):D!==null&&(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Q&&fi(ye)===D.type)?(D=u(D,R.props),Yo(D,R),D.return=j,D):(D=tl(R.type,R.key,R.props,null,j.mode,Y),Yo(D,R),D.return=j,D)}function L(j,D,R,Y){return D===null||D.tag!==4||D.stateNode.containerInfo!==R.containerInfo||D.stateNode.implementation!==R.implementation?(D=dc(R,j.mode,Y),D.return=j,D):(D=u(D,R.children||[]),D.return=j,D)}function q(j,D,R,Y,ye){return D===null||D.tag!==7?(D=li(R,j.mode,Y,ye),D.return=j,D):(D=u(D,R),D.return=j,D)}function F(j,D,R){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=uc(""+D,j.mode,R),D.return=j,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case N:return R=tl(D.type,D.key,D.props,null,j.mode,R),Yo(R,D),R.return=j,R;case w:return D=dc(D,j.mode,R),D.return=j,D;case Q:return D=fi(D),F(j,D,R)}if(Ce(D)||J(D))return D=li(D,j.mode,R,null),D.return=j,D;if(typeof D.then=="function")return F(j,rl(D),R);if(D.$$typeof===K)return F(j,il(j,D),R);cl(j,D)}return null}function _(j,D,R,Y){var ye=D!==null?D.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ye!==null?null:b(j,D,""+R,Y);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case N:return R.key===ye?A(j,D,R,Y):null;case w:return R.key===ye?L(j,D,R,Y):null;case Q:return R=fi(R),_(j,D,R,Y)}if(Ce(R)||J(R))return ye!==null?null:q(j,D,R,Y,null);if(typeof R.then=="function")return _(j,D,rl(R),Y);if(R.$$typeof===K)return _(j,D,il(j,R),Y);cl(j,R)}return null}function H(j,D,R,Y,ye){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return j=j.get(R)||null,b(D,j,""+Y,ye);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case N:return j=j.get(Y.key===null?R:Y.key)||null,A(D,j,Y,ye);case w:return j=j.get(Y.key===null?R:Y.key)||null,L(D,j,Y,ye);case Q:return Y=fi(Y),H(j,D,R,Y,ye)}if(Ce(Y)||J(Y))return j=j.get(R)||null,q(D,j,Y,ye,null);if(typeof Y.then=="function")return H(j,D,R,rl(Y),ye);if(Y.$$typeof===K)return H(j,D,R,il(D,Y),ye);cl(D,Y)}return null}function ce(j,D,R,Y){for(var ye=null,Ke=null,de=D,Me=D=0,Ie=null;de!==null&&Me<R.length;Me++){de.index>Me?(Ie=de,de=null):Ie=de.sibling;var qe=_(j,de,R[Me],Y);if(qe===null){de===null&&(de=Ie);break}e&&de&&qe.alternate===null&&t(j,de),D=d(qe,D,Me),Ke===null?ye=qe:Ke.sibling=qe,Ke=qe,de=Ie}if(Me===R.length)return i(j,de),Ue&&ta(j,Me),ye;if(de===null){for(;Me<R.length;Me++)de=F(j,R[Me],Y),de!==null&&(D=d(de,D,Me),Ke===null?ye=de:Ke.sibling=de,Ke=de);return Ue&&ta(j,Me),ye}for(de=o(de);Me<R.length;Me++)Ie=H(de,j,Me,R[Me],Y),Ie!==null&&(e&&Ie.alternate!==null&&de.delete(Ie.key===null?Me:Ie.key),D=d(Ie,D,Me),Ke===null?ye=Ie:Ke.sibling=Ie,Ke=Ie);return e&&de.forEach(function(Ya){return t(j,Ya)}),Ue&&ta(j,Me),ye}function we(j,D,R,Y){if(R==null)throw Error(l(151));for(var ye=null,Ke=null,de=D,Me=D=0,Ie=null,qe=R.next();de!==null&&!qe.done;Me++,qe=R.next()){de.index>Me?(Ie=de,de=null):Ie=de.sibling;var Ya=_(j,de,qe.value,Y);if(Ya===null){de===null&&(de=Ie);break}e&&de&&Ya.alternate===null&&t(j,de),D=d(Ya,D,Me),Ke===null?ye=Ya:Ke.sibling=Ya,Ke=Ya,de=Ie}if(qe.done)return i(j,de),Ue&&ta(j,Me),ye;if(de===null){for(;!qe.done;Me++,qe=R.next())qe=F(j,qe.value,Y),qe!==null&&(D=d(qe,D,Me),Ke===null?ye=qe:Ke.sibling=qe,Ke=qe);return Ue&&ta(j,Me),ye}for(de=o(de);!qe.done;Me++,qe=R.next())qe=H(de,j,Me,qe.value,Y),qe!==null&&(e&&qe.alternate!==null&&de.delete(qe.key===null?Me:qe.key),D=d(qe,D,Me),Ke===null?ye=qe:Ke.sibling=qe,Ke=qe);return e&&de.forEach(function(H0){return t(j,H0)}),Ue&&ta(j,Me),ye}function Ze(j,D,R,Y){if(typeof R=="object"&&R!==null&&R.type===T&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case N:e:{for(var ye=R.key;D!==null;){if(D.key===ye){if(ye=R.type,ye===T){if(D.tag===7){i(j,D.sibling),Y=u(D,R.props.children),Y.return=j,j=Y;break e}}else if(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Q&&fi(ye)===D.type){i(j,D.sibling),Y=u(D,R.props),Yo(Y,R),Y.return=j,j=Y;break e}i(j,D);break}else t(j,D);D=D.sibling}R.type===T?(Y=li(R.props.children,j.mode,Y,R.key),Y.return=j,j=Y):(Y=tl(R.type,R.key,R.props,null,j.mode,Y),Yo(Y,R),Y.return=j,j=Y)}return g(j);case w:e:{for(ye=R.key;D!==null;){if(D.key===ye)if(D.tag===4&&D.stateNode.containerInfo===R.containerInfo&&D.stateNode.implementation===R.implementation){i(j,D.sibling),Y=u(D,R.children||[]),Y.return=j,j=Y;break e}else{i(j,D);break}else t(j,D);D=D.sibling}Y=dc(R,j.mode,Y),Y.return=j,j=Y}return g(j);case Q:return R=fi(R),Ze(j,D,R,Y)}if(Ce(R))return ce(j,D,R,Y);if(J(R)){if(ye=J(R),typeof ye!="function")throw Error(l(150));return R=ye.call(R),we(j,D,R,Y)}if(typeof R.then=="function")return Ze(j,D,rl(R),Y);if(R.$$typeof===K)return Ze(j,D,il(j,R),Y);cl(j,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,D!==null&&D.tag===6?(i(j,D.sibling),Y=u(D,R),Y.return=j,j=Y):(i(j,D),Y=uc(R,j.mode,Y),Y.return=j,j=Y),g(j)):i(j,D)}return function(j,D,R,Y){try{Go=0;var ye=Ze(j,D,R,Y);return $i=null,ye}catch(de){if(de===Wi||de===sl)throw de;var Ke=en(29,de,null,j.mode);return Ke.lanes=Y,Ke.return=j,Ke}finally{}}}var pi=wh(!0),Nh=wh(!1),Ta=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ma(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Fe&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,t=el(e),lh(e,null,i),t}return Js(e,o,t,i),el(e)}function Fo(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,ko(e,i)}}function Ac(e,t){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var u=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var g={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?u=d=g:d=d.next=g,i=i.next}while(i!==null);d===null?u=d=t:d=d.next=t}else u=d=t;i={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var kc=!1;function Vo(){if(kc){var e=Qi;if(e!==null)throw e}}function Qo(e,t,i,o){kc=!1;var u=e.updateQueue;Ta=!1;var d=u.firstBaseUpdate,g=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var A=b,L=A.next;A.next=null,g===null?d=L:g.next=L,g=A;var q=e.alternate;q!==null&&(q=q.updateQueue,b=q.lastBaseUpdate,b!==g&&(b===null?q.firstBaseUpdate=L:b.next=L,q.lastBaseUpdate=A))}if(d!==null){var F=u.baseState;g=0,q=L=A=null,b=d;do{var _=b.lane&-536870913,H=_!==b.lane;if(H?(ze&_)===_:(o&_)===_){_!==0&&_===Vi&&(kc=!0),q!==null&&(q=q.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ce=e,we=b;_=t;var Ze=i;switch(we.tag){case 1:if(ce=we.payload,typeof ce=="function"){F=ce.call(Ze,F,_);break e}F=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=we.payload,_=typeof ce=="function"?ce.call(Ze,F,_):ce,_==null)break e;F=x({},F,_);break e;case 2:Ta=!0}}_=b.callback,_!==null&&(e.flags|=64,H&&(e.flags|=8192),H=u.callbacks,H===null?u.callbacks=[_]:H.push(_))}else H={lane:_,tag:b.tag,payload:b.payload,callback:b.callback,next:null},q===null?(L=q=H,A=F):q=q.next=H,g|=_;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;H=b,b=H.next,H.next=null,u.lastBaseUpdate=H,u.shared.pending=null}}while(!0);q===null&&(A=F),u.baseState=A,u.firstBaseUpdate=L,u.lastBaseUpdate=q,d===null&&(u.shared.lanes=0),La|=g,e.lanes=g,e.memoizedState=F}}function Ah(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function kh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Ah(i[e],t)}var Xi=ie(null),ul=ie(0);function Dh(e,t){e=fa,G(ul,e),G(Xi,t),fa=e|t.baseLanes}function Dc(){G(ul,fa),G(Xi,Xi.current)}function Tc(){fa=ul.current,Z(Xi),Z(ul)}var tn=ie(null),vn=null;function Ea(e){var t=e.alternate;G(mt,mt.current&1),G(tn,e),vn===null&&(t===null||Xi.current!==null||t.memoizedState!==null)&&(vn=e)}function Mc(e){G(mt,mt.current),G(tn,e),vn===null&&(vn=e)}function Th(e){e.tag===22?(G(mt,mt.current),G(tn,e),vn===null&&(vn=e)):Oa()}function Oa(){G(mt,mt.current),G(tn,tn.current)}function nn(e){Z(tn),vn===e&&(vn=null),Z(mt)}var mt=ie(0);function dl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Lu(i)||_u(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ia=0,Te=null,$e=null,xt=null,fl=!1,Zi=!1,mi=!1,hl=0,Wo=0,Ji=null,jv=0;function ut(){throw Error(l(321))}function jc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Jt(e[i],t[i]))return!1;return!0}function Ec(e,t,i,o,u,d){return ia=d,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?dp:Fc,mi=!1,d=i(o,u),mi=!1,Zi&&(d=jh(t,i,o,u)),Mh(e),d}function Mh(e){P.H=Zo;var t=$e!==null&&$e.next!==null;if(ia=0,xt=$e=Te=null,fl=!1,Wo=0,Ji=null,t)throw Error(l(300));e===null||bt||(e=e.dependencies,e!==null&&al(e)&&(bt=!0))}function jh(e,t,i,o){Te=e;var u=0;do{if(Zi&&(Ji=null),Wo=0,Zi=!1,25<=u)throw Error(l(301));if(u+=1,xt=$e=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}P.H=fp,d=t(i,o)}while(Zi);return d}function Ev(){var e=P.H,t=e.useState()[0];return t=typeof t.then=="function"?$o(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Te.flags|=1024),t}function Oc(){var e=hl!==0;return hl=0,e}function Pc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Rc(e){if(fl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fl=!1}ia=0,xt=$e=Te=null,Zi=!1,Wo=hl=0,Ji=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Te.memoizedState=xt=e:xt=xt.next=e,xt}function gt(){if($e===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=xt===null?Te.memoizedState:xt.next;if(t!==null)xt=t,$e=e;else{if(e===null)throw Te.alternate===null?Error(l(467)):Error(l(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},xt===null?Te.memoizedState=xt=e:xt=xt.next=e}return xt}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $o(e){var t=Wo;return Wo+=1,Ji===null&&(Ji=[]),e=vh(Ji,e,t),t=Te,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?dp:Fc),e}function ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $o(e);if(e.$$typeof===K)return jt(e)}throw Error(l(438,String(e)))}function Lc(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var o=Te.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=pl(),Te.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),o=0;o<e;o++)i[o]=ee;return t.index++,i}function oa(e,t){return typeof t=="function"?t(e):t}function gl(e){var t=gt();return _c(t,$e,e)}function _c(e,t,i){var o=e.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=i;var u=e.baseQueue,d=o.pending;if(d!==null){if(u!==null){var g=u.next;u.next=d.next,d.next=g}t.baseQueue=u=d,o.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var b=g=null,A=null,L=t,q=!1;do{var F=L.lane&-536870913;if(F!==L.lane?(ze&F)===F:(ia&F)===F){var _=L.revertLane;if(_===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),F===Vi&&(q=!0);else if((ia&_)===_){L=L.next,_===Vi&&(q=!0);continue}else F={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(b=A=F,g=d):A=A.next=F,Te.lanes|=_,La|=_;F=L.action,mi&&i(d,F),d=L.hasEagerState?L.eagerState:i(d,F)}else _={lane:F,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(b=A=_,g=d):A=A.next=_,Te.lanes|=F,La|=F;L=L.next}while(L!==null&&L!==t);if(A===null?g=d:A.next=b,!Jt(d,e.memoizedState)&&(bt=!0,q&&(i=Qi,i!==null)))throw i;e.memoizedState=d,e.baseState=g,e.baseQueue=A,o.lastRenderedState=d}return u===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function zc(e){var t=gt(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var o=i.dispatch,u=i.pending,d=t.memoizedState;if(u!==null){i.pending=null;var g=u=u.next;do d=e(d,g.action),g=g.next;while(g!==u);Jt(d,t.memoizedState)||(bt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),i.lastRenderedState=d}return[d,o]}function Eh(e,t,i){var o=Te,u=gt(),d=Ue;if(d){if(i===void 0)throw Error(l(407));i=i()}else i=t();var g=!Jt(($e||u).memoizedState,i);if(g&&(u.memoizedState=i,bt=!0),u=u.queue,Hc(Rh.bind(null,o,u,e),[e]),u.getSnapshot!==t||g||xt!==null&&xt.memoizedState.tag&1){if(o.flags|=2048,eo(9,{destroy:void 0},Ph.bind(null,o,u,i,t),null),Je===null)throw Error(l(349));d||(ia&127)!==0||Oh(o,t,i)}return i}function Oh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=pl(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Ph(e,t,i,o){t.value=i,t.getSnapshot=o,Lh(t)&&_h(e)}function Rh(e,t,i){return i(function(){Lh(t)&&_h(e)})}function Lh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Jt(e,i)}catch{return!0}}function _h(e){var t=si(e,2);t!==null&&Yt(t,e,2)}function Ic(e){var t=zt();if(typeof e=="function"){var i=e;if(e=i(),mi){je(!0);try{i()}finally{je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:e},t}function zh(e,t,i,o){return e.baseState=i,_c(e,$e,typeof o=="function"?o:oa)}function Ov(e,t,i,o,u){if(bl(e))throw Error(l(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){d.listeners.push(g)}};P.T!==null?i(!0):d.isTransition=!1,o(d),i=t.pending,i===null?(d.next=t.pending=d,Ih(t,d)):(d.next=i.next,t.pending=i.next=d)}}function Ih(e,t){var i=t.action,o=t.payload,u=e.state;if(t.isTransition){var d=P.T,g={};P.T=g;try{var b=i(u,o),A=P.S;A!==null&&A(g,b),Uh(e,t,b)}catch(L){Uc(e,t,L)}finally{d!==null&&g.types!==null&&(d.types=g.types),P.T=d}}else try{d=i(u,o),Uh(e,t,d)}catch(L){Uc(e,t,L)}}function Uh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){Hh(e,t,o)},function(o){return Uc(e,t,o)}):Hh(e,t,i)}function Hh(e,t,i){t.status="fulfilled",t.value=i,Bh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Ih(e,i)))}function Uc(e,t,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=i,Bh(t),t=t.next;while(t!==o)}e.action=null}function Bh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Kh(e,t){return t}function qh(e,t){if(Ue){var i=Je.formState;if(i!==null){e:{var o=Te;if(Ue){if(nt){t:{for(var u=nt,d=bn;u.nodeType!==8;){if(!d){u=null;break t}if(u=Sn(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){nt=Sn(u.nextSibling),o=u.data==="F!";break e}}ka(o)}o=!1}o&&(t=i[0])}}return i=zt(),i.memoizedState=i.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kh,lastRenderedState:t},i.queue=o,i=rp.bind(null,Te,o),o.dispatch=i,o=Ic(!1),d=Yc.bind(null,Te,!1,o.queue),o=zt(),u={state:t,dispatch:null,action:e,pending:null},o.queue=u,i=Ov.bind(null,Te,u,d,i),u.dispatch=i,o.memoizedState=e,[t,i,!1]}function Gh(e){var t=gt();return Yh(t,$e,e)}function Yh(e,t,i){if(t=_c(e,t,Kh)[0],e=gl(oa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=$o(t)}catch(g){throw g===Wi?sl:g}else o=t;t=gt();var u=t.queue,d=u.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,eo(9,{destroy:void 0},Pv.bind(null,u,i),null)),[o,d,e]}function Pv(e,t){e.action=t}function Fh(e){var t=gt(),i=$e;if(i!==null)return Yh(t,i,e);gt(),t=t.memoizedState,i=gt();var o=i.queue.dispatch;return i.memoizedState=e,[t,o,!1]}function eo(e,t,i,o){return e={tag:e,create:i,deps:o,inst:t,next:null},t=Te.updateQueue,t===null&&(t=pl(),Te.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,t.lastEffect=e),e}function Vh(){return gt().memoizedState}function yl(e,t,i,o){var u=zt();Te.flags|=e,u.memoizedState=eo(1|t,{destroy:void 0},i,o===void 0?null:o)}function xl(e,t,i,o){var u=gt();o=o===void 0?null:o;var d=u.memoizedState.inst;$e!==null&&o!==null&&jc(o,$e.memoizedState.deps)?u.memoizedState=eo(t,d,i,o):(Te.flags|=e,u.memoizedState=eo(1|t,d,i,o))}function Qh(e,t){yl(8390656,8,e,t)}function Hc(e,t){xl(2048,8,e,t)}function Rv(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=pl(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Wh(e){var t=gt().memoizedState;return Rv({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function $h(e,t){return xl(4,2,e,t)}function Xh(e,t){return xl(4,4,e,t)}function Zh(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Jh(e,t,i){i=i!=null?i.concat([e]):null,xl(4,4,Zh.bind(null,t,e),i)}function Bc(){}function ep(e,t){var i=gt();t=t===void 0?null:t;var o=i.memoizedState;return t!==null&&jc(t,o[1])?o[0]:(i.memoizedState=[e,t],e)}function tp(e,t){var i=gt();t=t===void 0?null:t;var o=i.memoizedState;if(t!==null&&jc(t,o[1]))return o[0];if(o=e(),mi){je(!0);try{e()}finally{je(!1)}}return i.memoizedState=[o,t],o}function Kc(e,t,i){return i===void 0||(ia&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=nm(),Te.lanes|=e,La|=e,i)}function np(e,t,i,o){return Jt(i,t)?i:Xi.current!==null?(e=Kc(e,i,o),Jt(e,t)||(bt=!0),e):(ia&42)===0||(ia&1073741824)!==0&&(ze&261930)===0?(bt=!0,e.memoizedState=i):(e=nm(),Te.lanes|=e,La|=e,t)}function ap(e,t,i,o,u){var d=V.p;V.p=d!==0&&8>d?d:8;var g=P.T,b={};P.T=b,Yc(e,!1,t,i);try{var A=u(),L=P.S;if(L!==null&&L(b,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var q=Mv(A,o);Xo(e,t,q,sn(e))}else Xo(e,t,o,sn(e))}catch(F){Xo(e,t,{then:function(){},status:"rejected",reason:F},sn())}finally{V.p=d,g!==null&&b.types!==null&&(g.types=b.types),P.T=g}}function Lv(){}function qc(e,t,i,o){if(e.tag!==5)throw Error(l(476));var u=ip(e).queue;ap(e,u,t,ae,i===null?Lv:function(){return op(e),i(o)})}function ip(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:ae},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function op(e){var t=ip(e);t.next===null&&(t=e.alternate.memoizedState),Xo(e,t.next.queue,{},sn())}function Gc(){return jt(ps)}function sp(){return gt().memoizedState}function lp(){return gt().memoizedState}function _v(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=sn();e=Ma(i);var o=ja(t,e,i);o!==null&&(Yt(o,t,i),Fo(o,t,i)),t={cache:bc()},e.payload=t;return}t=t.return}}function zv(e,t,i){var o=sn();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},bl(e)?cp(t,i):(i=rc(e,t,i,o),i!==null&&(Yt(i,e,o),up(i,t,o)))}function rp(e,t,i){var o=sn();Xo(e,t,i,o)}function Xo(e,t,i,o){var u={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(bl(e))cp(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var g=t.lastRenderedState,b=d(g,i);if(u.hasEagerState=!0,u.eagerState=b,Jt(b,g))return Js(e,t,u,0),Je===null&&Zs(),!1}catch{}finally{}if(i=rc(e,t,u,o),i!==null)return Yt(i,e,o),up(i,t,o),!0}return!1}function Yc(e,t,i,o){if(o={lane:2,revertLane:wu(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},bl(e)){if(t)throw Error(l(479))}else t=rc(e,i,o,2),t!==null&&Yt(t,e,2)}function bl(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function cp(e,t){Zi=fl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function up(e,t,i){if((i&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,ko(e,i)}}var Zo={readContext:jt,use:ml,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Zo.useEffectEvent=ut;var dp={readContext:jt,use:ml,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:Qh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,yl(4194308,4,Zh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return yl(4194308,4,e,t)},useInsertionEffect:function(e,t){yl(4,2,e,t)},useMemo:function(e,t){var i=zt();t=t===void 0?null:t;var o=e();if(mi){je(!0);try{e()}finally{je(!1)}}return i.memoizedState=[o,t],o},useReducer:function(e,t,i){var o=zt();if(i!==void 0){var u=i(t);if(mi){je(!0);try{i(t)}finally{je(!1)}}}else u=t;return o.memoizedState=o.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},o.queue=e,e=e.dispatch=zv.bind(null,Te,e),[o.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ic(e);var t=e.queue,i=rp.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Bc,useDeferredValue:function(e,t){var i=zt();return Kc(i,e,t)},useTransition:function(){var e=Ic(!1);return e=ap.bind(null,Te,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var o=Te,u=zt();if(Ue){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),Je===null)throw Error(l(349));(ze&127)!==0||Oh(o,t,i)}u.memoizedState=i;var d={value:i,getSnapshot:t};return u.queue=d,Qh(Rh.bind(null,o,d,e),[e]),o.flags|=2048,eo(9,{destroy:void 0},Ph.bind(null,o,d,i,t),null),i},useId:function(){var e=zt(),t=Je.identifierPrefix;if(Ue){var i=Ln,o=Rn;i=(o&~(1<<32-ve(o)-1)).toString(32)+i,t="_"+t+"R_"+i,i=hl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=jv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Gc,useFormState:qh,useActionState:qh,useOptimistic:function(e){var t=zt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Yc.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:Lc,useCacheRefresh:function(){return zt().memoizedState=_v.bind(null,Te)},useEffectEvent:function(e){var t=zt(),i={impl:e};return t.memoizedState=i,function(){if((Fe&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Fc={readContext:jt,use:ml,useCallback:ep,useContext:jt,useEffect:Hc,useImperativeHandle:Jh,useInsertionEffect:$h,useLayoutEffect:Xh,useMemo:tp,useReducer:gl,useRef:Vh,useState:function(){return gl(oa)},useDebugValue:Bc,useDeferredValue:function(e,t){var i=gt();return np(i,$e.memoizedState,e,t)},useTransition:function(){var e=gl(oa)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:$o(e),t]},useSyncExternalStore:Eh,useId:sp,useHostTransitionStatus:Gc,useFormState:Gh,useActionState:Gh,useOptimistic:function(e,t){var i=gt();return zh(i,$e,e,t)},useMemoCache:Lc,useCacheRefresh:lp};Fc.useEffectEvent=Wh;var fp={readContext:jt,use:ml,useCallback:ep,useContext:jt,useEffect:Hc,useImperativeHandle:Jh,useInsertionEffect:$h,useLayoutEffect:Xh,useMemo:tp,useReducer:zc,useRef:Vh,useState:function(){return zc(oa)},useDebugValue:Bc,useDeferredValue:function(e,t){var i=gt();return $e===null?Kc(i,e,t):np(i,$e.memoizedState,e,t)},useTransition:function(){var e=zc(oa)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:$o(e),t]},useSyncExternalStore:Eh,useId:sp,useHostTransitionStatus:Gc,useFormState:Fh,useActionState:Fh,useOptimistic:function(e,t){var i=gt();return $e!==null?zh(i,$e,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Lc,useCacheRefresh:lp};fp.useEffectEvent=Wh;function Vc(e,t,i,o){t=e.memoizedState,i=i(o,t),i=i==null?t:x({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Qc={enqueueSetState:function(e,t,i){e=e._reactInternals;var o=sn(),u=Ma(o);u.payload=t,i!=null&&(u.callback=i),t=ja(e,u,o),t!==null&&(Yt(t,e,o),Fo(t,e,o))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var o=sn(),u=Ma(o);u.tag=1,u.payload=t,i!=null&&(u.callback=i),t=ja(e,u,o),t!==null&&(Yt(t,e,o),Fo(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=sn(),o=Ma(i);o.tag=2,t!=null&&(o.callback=t),t=ja(e,o,i),t!==null&&(Yt(t,e,i),Fo(t,e,i))}};function hp(e,t,i,o,u,d,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,g):t.prototype&&t.prototype.isPureReactComponent?!Io(i,o)||!Io(u,d):!0}function pp(e,t,i,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,o),t.state!==e&&Qc.enqueueReplaceState(t,t.state,null)}function gi(e,t){var i=t;if("ref"in t){i={};for(var o in t)o!=="ref"&&(i[o]=t[o])}if(e=e.defaultProps){i===t&&(i=x({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function mp(e){Xs(e)}function gp(e){console.error(e)}function yp(e){Xs(e)}function vl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function xp(e,t,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Wc(e,t,i){return i=Ma(i),i.tag=3,i.payload={element:null},i.callback=function(){vl(e,t)},i}function bp(e){return e=Ma(e),e.tag=3,e}function vp(e,t,i,o){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var d=o.value;e.payload=function(){return u(d)},e.callback=function(){xp(t,i,o)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){xp(t,i,o),typeof u!="function"&&(_a===null?_a=new Set([this]):_a.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})})}function Iv(e,t,i,o,u){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=i.alternate,t!==null&&Fi(t,i,u,!0),i=tn.current,i!==null){switch(i.tag){case 31:case 13:return vn===null?Ol():i.alternate===null&&dt===0&&(dt=3),i.flags&=-257,i.flags|=65536,i.lanes=u,o===ll?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([o]):t.add(o),vu(e,o,u)),!1;case 22:return i.flags|=65536,o===ll?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([o]):i.add(o)),vu(e,o,u)),!1}throw Error(l(435,i.tag))}return vu(e,o,u),Ol(),!1}if(Ue)return t=tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,o!==pc&&(e=Error(l(422),{cause:o}),Bo(gn(e,i)))):(o!==pc&&(t=Error(l(423),{cause:o}),Bo(gn(t,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,o=gn(o,i),u=Wc(e.stateNode,o,u),Ac(e,u),dt!==4&&(dt=2)),!1;var d=Error(l(520),{cause:o});if(d=gn(d,i),ss===null?ss=[d]:ss.push(d),dt!==4&&(dt=2),t===null)return!0;o=gn(o,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=Wc(i.stateNode,o,e),Ac(i,e),!1;case 1:if(t=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(_a===null||!_a.has(d))))return i.flags|=65536,u&=-u,i.lanes|=u,u=bp(u),vp(u,e,i,o),Ac(i,u),!1}i=i.return}while(i!==null);return!1}var $c=Error(l(461)),bt=!1;function Et(e,t,i,o){t.child=e===null?Nh(t,null,i,o):pi(t,e.child,i,o)}function Sp(e,t,i,o,u){i=i.render;var d=t.ref;if("ref"in o){var g={};for(var b in o)b!=="ref"&&(g[b]=o[b])}else g=o;return ui(t),o=Ec(e,t,i,g,d,u),b=Oc(),e!==null&&!bt?(Pc(e,t,u),sa(e,t,u)):(Ue&&b&&fc(t),t.flags|=1,Et(e,t,o,u),t.child)}function Cp(e,t,i,o,u){if(e===null){var d=i.type;return typeof d=="function"&&!cc(d)&&d.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=d,wp(e,t,d,o,u)):(e=tl(i.type,null,o,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!iu(e,u)){var g=d.memoizedProps;if(i=i.compare,i=i!==null?i:Io,i(g,o)&&e.ref===t.ref)return sa(e,t,u)}return t.flags|=1,e=ea(d,o),e.ref=t.ref,e.return=t,t.child=e}function wp(e,t,i,o,u){if(e!==null){var d=e.memoizedProps;if(Io(d,o)&&e.ref===t.ref)if(bt=!1,t.pendingProps=o=d,iu(e,u))(e.flags&131072)!==0&&(bt=!0);else return t.lanes=e.lanes,sa(e,t,u)}return Xc(e,t,i,o,u)}function Np(e,t,i,o){var u=o.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,e!==null){for(o=t.child=e.child,u=0;o!==null;)u=u|o.lanes|o.childLanes,o=o.sibling;o=u&~d}else o=0,t.child=null;return Ap(e,t,d,i,o)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ol(t,d!==null?d.cachePool:null),d!==null?Dh(t,d):Dc(),Th(t);else return o=t.lanes=536870912,Ap(e,t,d!==null?d.baseLanes|i:i,i,o)}else d!==null?(ol(t,d.cachePool),Dh(t,d),Oa(),t.memoizedState=null):(e!==null&&ol(t,null),Dc(),Oa());return Et(e,t,u,i),t.child}function Jo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ap(e,t,i,o,u){var d=Sc();return d=d===null?null:{parent:yt._currentValue,pool:d},t.memoizedState={baseLanes:i,cachePool:d},e!==null&&ol(t,null),Dc(),Th(t),e!==null&&Fi(e,t,o,!0),t.childLanes=u,null}function Sl(e,t){return t=wl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kp(e,t,i){return pi(t,e.child,null,i),e=Sl(t,t.pendingProps),e.flags|=2,nn(t),t.memoizedState=null,e}function Uv(e,t,i){var o=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ue){if(o.mode==="hidden")return e=Sl(t,o),t.lanes=536870912,Jo(null,e);if(Mc(t),(e=nt)?(e=Im(e,bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Rn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},i=ch(e),i.return=t,t.child=i,Mt=t,nt=null)):e=null,e===null)throw ka(t);return t.lanes=536870912,null}return Sl(t,o)}var d=e.memoizedState;if(d!==null){var g=d.dehydrated;if(Mc(t),u)if(t.flags&256)t.flags&=-257,t=kp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(bt||Fi(e,t,i,!1),u=(i&e.childLanes)!==0,bt||u){if(o=Je,o!==null&&(g=fn(o,i),g!==0&&g!==d.retryLane))throw d.retryLane=g,si(e,g),Yt(o,e,g),$c;Ol(),t=kp(e,t,i)}else e=d.treeContext,nt=Sn(g.nextSibling),Mt=t,Ue=!0,Aa=null,bn=!1,e!==null&&fh(t,e),t=Sl(t,o),t.flags|=4096;return t}return e=ea(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Cl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Xc(e,t,i,o,u){return ui(t),i=Ec(e,t,i,o,void 0,u),o=Oc(),e!==null&&!bt?(Pc(e,t,u),sa(e,t,u)):(Ue&&o&&fc(t),t.flags|=1,Et(e,t,i,u),t.child)}function Dp(e,t,i,o,u,d){return ui(t),t.updateQueue=null,i=jh(t,o,i,u),Mh(e),o=Oc(),e!==null&&!bt?(Pc(e,t,d),sa(e,t,d)):(Ue&&o&&fc(t),t.flags|=1,Et(e,t,i,d),t.child)}function Tp(e,t,i,o,u){if(ui(t),t.stateNode===null){var d=Ki,g=i.contextType;typeof g=="object"&&g!==null&&(d=jt(g)),d=new i(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Qc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},wc(t),g=i.contextType,d.context=typeof g=="object"&&g!==null?jt(g):Ki,d.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Vc(t,i,g,o),d.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(g=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),g!==d.state&&Qc.enqueueReplaceState(d,d.state,null),Qo(t,o,d,u),Vo(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var b=t.memoizedProps,A=gi(i,b);d.props=A;var L=d.context,q=i.contextType;g=Ki,typeof q=="object"&&q!==null&&(g=jt(q));var F=i.getDerivedStateFromProps;q=typeof F=="function"||typeof d.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,q||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b||L!==g)&&pp(t,d,o,g),Ta=!1;var _=t.memoizedState;d.state=_,Qo(t,o,d,u),Vo(),L=t.memoizedState,b||_!==L||Ta?(typeof F=="function"&&(Vc(t,i,F,o),L=t.memoizedState),(A=Ta||hp(t,i,A,o,_,L,g))?(q||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=L),d.props=o,d.state=L,d.context=g,o=A):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,Nc(e,t),g=t.memoizedProps,q=gi(i,g),d.props=q,F=t.pendingProps,_=d.context,L=i.contextType,A=Ki,typeof L=="object"&&L!==null&&(A=jt(L)),b=i.getDerivedStateFromProps,(L=typeof b=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(g!==F||_!==A)&&pp(t,d,o,A),Ta=!1,_=t.memoizedState,d.state=_,Qo(t,o,d,u),Vo();var H=t.memoizedState;g!==F||_!==H||Ta||e!==null&&e.dependencies!==null&&al(e.dependencies)?(typeof b=="function"&&(Vc(t,i,b,o),H=t.memoizedState),(q=Ta||hp(t,i,q,o,_,H,A)||e!==null&&e.dependencies!==null&&al(e.dependencies))?(L||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,H,A),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,H,A)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=H),d.props=o,d.state=H,d.context=A,o=q):(typeof d.componentDidUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,Cl(e,t),o=(t.flags&128)!==0,d||o?(d=t.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&o?(t.child=pi(t,e.child,null,u),t.child=pi(t,null,i,u)):Et(e,t,i,u),t.memoizedState=d.state,e=t.child):e=sa(e,t,u),e}function Mp(e,t,i,o){return ri(),t.flags|=256,Et(e,t,i,o),t.child}var Zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:xh()}}function eu(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=on),e}function jp(e,t,i){var o=t.pendingProps,u=!1,d=(t.flags&128)!==0,g;if((g=d)||(g=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),g&&(u=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(u?Ea(t):Oa(),(e=nt)?(e=Im(e,bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Rn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},i=ch(e),i.return=t,t.child=i,Mt=t,nt=null)):e=null,e===null)throw ka(t);return _u(e)?t.lanes=32:t.lanes=536870912,null}var b=o.children;return o=o.fallback,u?(Oa(),u=t.mode,b=wl({mode:"hidden",children:b},u),o=li(o,u,i,null),b.return=t,o.return=t,b.sibling=o,t.child=b,o=t.child,o.memoizedState=Jc(i),o.childLanes=eu(e,g,i),t.memoizedState=Zc,Jo(null,o)):(Ea(t),tu(t,b))}var A=e.memoizedState;if(A!==null&&(b=A.dehydrated,b!==null)){if(d)t.flags&256?(Ea(t),t.flags&=-257,t=nu(e,t,i)):t.memoizedState!==null?(Oa(),t.child=e.child,t.flags|=128,t=null):(Oa(),b=o.fallback,u=t.mode,o=wl({mode:"visible",children:o.children},u),b=li(b,u,i,null),b.flags|=2,o.return=t,b.return=t,o.sibling=b,t.child=o,pi(t,e.child,null,i),o=t.child,o.memoizedState=Jc(i),o.childLanes=eu(e,g,i),t.memoizedState=Zc,t=Jo(null,o));else if(Ea(t),_u(b)){if(g=b.nextSibling&&b.nextSibling.dataset,g)var L=g.dgst;g=L,o=Error(l(419)),o.stack="",o.digest=g,Bo({value:o,source:null,stack:null}),t=nu(e,t,i)}else if(bt||Fi(e,t,i,!1),g=(i&e.childLanes)!==0,bt||g){if(g=Je,g!==null&&(o=fn(g,i),o!==0&&o!==A.retryLane))throw A.retryLane=o,si(e,o),Yt(g,e,o),$c;Lu(b)||Ol(),t=nu(e,t,i)}else Lu(b)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,nt=Sn(b.nextSibling),Mt=t,Ue=!0,Aa=null,bn=!1,e!==null&&fh(t,e),t=tu(t,o.children),t.flags|=4096);return t}return u?(Oa(),b=o.fallback,u=t.mode,A=e.child,L=A.sibling,o=ea(A,{mode:"hidden",children:o.children}),o.subtreeFlags=A.subtreeFlags&65011712,L!==null?b=ea(L,b):(b=li(b,u,i,null),b.flags|=2),b.return=t,o.return=t,o.sibling=b,t.child=o,Jo(null,o),o=t.child,b=e.child.memoizedState,b===null?b=Jc(i):(u=b.cachePool,u!==null?(A=yt._currentValue,u=u.parent!==A?{parent:A,pool:A}:u):u=xh(),b={baseLanes:b.baseLanes|i,cachePool:u}),o.memoizedState=b,o.childLanes=eu(e,g,i),t.memoizedState=Zc,Jo(e.child,o)):(Ea(t),i=e.child,e=i.sibling,i=ea(i,{mode:"visible",children:o.children}),i.return=t,i.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=i,t.memoizedState=null,i)}function tu(e,t){return t=wl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wl(e,t){return e=en(22,e,null,t),e.lanes=0,e}function nu(e,t,i){return pi(t,e.child,null,i),e=tu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ep(e,t,i){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),yc(e.return,t,i)}function au(e,t,i,o,u,d){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:u,treeForkCount:d}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=o,g.tail=i,g.tailMode=u,g.treeForkCount=d)}function Op(e,t,i){var o=t.pendingProps,u=o.revealOrder,d=o.tail;o=o.children;var g=mt.current,b=(g&2)!==0;if(b?(g=g&1|2,t.flags|=128):g&=1,G(mt,g),Et(e,t,o,i),o=Ue?Ho:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ep(e,i,t);else if(e.tag===19)Ep(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(i=t.child,u=null;i!==null;)e=i.alternate,e!==null&&dl(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),au(t,!1,u,i,d,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&dl(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}au(t,!0,i,null,d,o);break;case"together":au(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function sa(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),La|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Fi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=ea(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=ea(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function iu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&al(e)))}function Hv(e,t,i){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),Da(t,yt,e.memoizedState.cache),ri();break;case 27:case 5:Ye(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:Da(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mc(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Ea(t),t.flags|=128,null):(i&t.child.childLanes)!==0?jp(e,t,i):(Ea(t),e=sa(e,t,i),e!==null?e.sibling:null);Ea(t);break;case 19:var u=(e.flags&128)!==0;if(o=(i&t.childLanes)!==0,o||(Fi(e,t,i,!1),o=(i&t.childLanes)!==0),u){if(o)return Op(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),G(mt,mt.current),o)break;return null;case 22:return t.lanes=0,Np(e,t,i,t.pendingProps);case 24:Da(t,yt,e.memoizedState.cache)}return sa(e,t,i)}function Pp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)bt=!0;else{if(!iu(e,i)&&(t.flags&128)===0)return bt=!1,Hv(e,t,i);bt=(e.flags&131072)!==0}else bt=!1,Ue&&(t.flags&1048576)!==0&&dh(t,Ho,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=fi(t.elementType),t.type=e,typeof e=="function")cc(e)?(o=gi(e,o),t.tag=1,t=Tp(null,t,e,o,i)):(t.tag=0,t=Xc(null,t,e,o,i));else{if(e!=null){var u=e.$$typeof;if(u===I){t.tag=11,t=Sp(null,t,e,o,i);break e}else if(u===z){t.tag=14,t=Cp(null,t,e,o,i);break e}}throw t=ue(e)||e,Error(l(306,t,""))}}return t;case 0:return Xc(e,t,t.type,t.pendingProps,i);case 1:return o=t.type,u=gi(o,t.pendingProps),Tp(e,t,o,u,i);case 3:e:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(l(387));o=t.pendingProps;var d=t.memoizedState;u=d.element,Nc(e,t),Qo(t,o,null,i);var g=t.memoizedState;if(o=g.cache,Da(t,yt,o),o!==d.cache&&xc(t,[yt],i,!0),Vo(),o=g.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Mp(e,t,o,i);break e}else if(o!==u){u=gn(Error(l(424)),t),Bo(u),t=Mp(e,t,o,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=Sn(e.firstChild),Mt=t,Ue=!0,Aa=null,bn=!0,i=Nh(t,null,o,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ri(),o===u){t=sa(e,t,i);break e}Et(e,t,o,i)}t=t.child}return t;case 26:return Cl(e,t),e===null?(i=Gm(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ue||(i=t.type,e=t.pendingProps,o=Ul(te.current).createElement(i),o[Tt]=t,o[Ut]=e,Ot(o,i,e),At(o),t.stateNode=o):t.memoizedState=Gm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ye(t),e===null&&Ue&&(o=t.stateNode=Bm(t.type,t.pendingProps,te.current),Mt=t,bn=!0,u=nt,Ha(t.type)?(zu=u,nt=Sn(o.firstChild)):nt=u),Et(e,t,t.pendingProps.children,i),Cl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((u=o=nt)&&(o=g0(o,t.type,t.pendingProps,bn),o!==null?(t.stateNode=o,Mt=t,nt=Sn(o.firstChild),bn=!1,u=!0):u=!1),u||ka(t)),Ye(t),u=t.type,d=t.pendingProps,g=e!==null?e.memoizedProps:null,o=d.children,Ou(u,d)?o=null:g!==null&&Ou(u,g)&&(t.flags|=32),t.memoizedState!==null&&(u=Ec(e,t,Ev,null,null,i),ps._currentValue=u),Cl(e,t),Et(e,t,o,i),t.child;case 6:return e===null&&Ue&&((e=i=nt)&&(i=y0(i,t.pendingProps,bn),i!==null?(t.stateNode=i,Mt=t,nt=null,e=!0):e=!1),e||ka(t)),null;case 13:return jp(e,t,i);case 4:return be(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=pi(t,null,o,i):Et(e,t,o,i),t.child;case 11:return Sp(e,t,t.type,t.pendingProps,i);case 7:return Et(e,t,t.pendingProps,i),t.child;case 8:return Et(e,t,t.pendingProps.children,i),t.child;case 12:return Et(e,t,t.pendingProps.children,i),t.child;case 10:return o=t.pendingProps,Da(t,t.type,o.value),Et(e,t,o.children,i),t.child;case 9:return u=t.type._context,o=t.pendingProps.children,ui(t),u=jt(u),o=o(u),t.flags|=1,Et(e,t,o,i),t.child;case 14:return Cp(e,t,t.type,t.pendingProps,i);case 15:return wp(e,t,t.type,t.pendingProps,i);case 19:return Op(e,t,i);case 31:return Uv(e,t,i);case 22:return Np(e,t,i,t.pendingProps);case 24:return ui(t),o=jt(yt),e===null?(u=Sc(),u===null&&(u=Je,d=bc(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=i),u=d),t.memoizedState={parent:o,cache:u},wc(t),Da(t,yt,u)):((e.lanes&i)!==0&&(Nc(e,t),Qo(t,null,null,i),Vo()),u=e.memoizedState,d=t.memoizedState,u.parent!==o?(u={parent:o,cache:o},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Da(t,yt,o)):(o=d.cache,Da(t,yt,o),o!==u.cache&&xc(t,[yt],i,!0))),Et(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function la(e){e.flags|=4}function ou(e,t,i,o,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(sm())e.flags|=8192;else throw hi=ll,Cc}else e.flags&=-16777217}function Rp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Wm(t))if(sm())e.flags|=8192;else throw hi=ll,Cc}function Nl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Nt():536870912,e.lanes|=t,io|=t)}function es(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(t)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags&65011712,o|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=i,t}function Bv(e,t,i){var o=t.pendingProps;switch(hc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return i=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),aa(yt),Re(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Yi(t)?la(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,mc())),at(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(la(t),d!==null?(at(t),Rp(t,d)):(at(t),ou(t,u,null,o,i))):d?d!==e.memoizedState?(la(t),at(t),Rp(t,d)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&la(t),at(t),ou(t,u,e,o,i)),null;case 27:if(St(t),i=te.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&la(t);else{if(!o){if(t.stateNode===null)throw Error(l(166));return at(t),null}e=$.current,Yi(t)?hh(t):(e=Bm(u,o,i),t.stateNode=e,la(t))}return at(t),null;case 5:if(St(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&la(t);else{if(!o){if(t.stateNode===null)throw Error(l(166));return at(t),null}if(d=$.current,Yi(t))hh(t);else{var g=Ul(te.current);switch(d){case 1:d=g.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=g.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=g.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?g.createElement("select",{is:o.is}):g.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?g.createElement(u,{is:o.is}):g.createElement(u)}}d[Tt]=t,d[Ut]=o;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)d.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=d;e:switch(Ot(d,u,o),u){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&la(t)}}return at(t),ou(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&la(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(l(166));if(e=te.current,Yi(t)){if(e=t.stateNode,i=t.memoizedProps,o=null,u=Mt,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||jm(e.nodeValue,i)),e||ka(t,!0)}else e=Ul(e).createTextNode(o),e[Tt]=t,t.stateNode=e}return at(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(o=Yi(t),i!==null){if(e===null){if(!o)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Tt]=t}else ri(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else i=mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(nn(t),t):(nn(t),null);if((t.flags&128)!==0)throw Error(l(558))}return at(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Yi(t),o!==null&&o.dehydrated!==null){if(e===null){if(!u)throw Error(l(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(l(317));u[Tt]=t}else ri(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),u=!1}else u=mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(nn(t),t):(nn(t),null)}return nn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=t.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==u&&(o.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Nl(t,t.updateQueue),at(t),null);case 4:return Re(),e===null&&Du(t.stateNode.containerInfo),at(t),null;case 10:return aa(t.type),at(t),null;case 19:if(Z(mt),o=t.memoizedState,o===null)return at(t),null;if(u=(t.flags&128)!==0,d=o.rendering,d===null)if(u)es(o,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=dl(e),d!==null){for(t.flags|=128,es(o,!1),e=d.updateQueue,t.updateQueue=e,Nl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)rh(i,e),i=i.sibling;return G(mt,mt.current&1|2),Ue&&ta(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&pt()>Ml&&(t.flags|=128,u=!0,es(o,!1),t.lanes=4194304)}else{if(!u)if(e=dl(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Nl(t,e),es(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!Ue)return at(t),null}else 2*pt()-o.renderingStartTime>Ml&&i!==536870912&&(t.flags|=128,u=!0,es(o,!1),t.lanes=4194304);o.isBackwards?(d.sibling=t.child,t.child=d):(e=o.last,e!==null?e.sibling=d:t.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=pt(),e.sibling=null,i=mt.current,G(mt,u?i&1|2:i&1),Ue&&ta(t,o.treeForkCount),e):(at(t),null);case 22:case 23:return nn(t),Tc(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(i&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),i=t.updateQueue,i!==null&&Nl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==i&&(t.flags|=2048),e!==null&&Z(di),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),aa(yt),at(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function Kv(e,t){switch(hc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa(yt),Re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return St(t),null;case 31:if(t.memoizedState!==null){if(nn(t),t.alternate===null)throw Error(l(340));ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(nn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Z(mt),null;case 4:return Re(),null;case 10:return aa(t.type),null;case 22:case 23:return nn(t),Tc(),e!==null&&Z(di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return aa(yt),null;case 25:return null;default:return null}}function Lp(e,t){switch(hc(t),t.tag){case 3:aa(yt),Re();break;case 26:case 27:case 5:St(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&nn(t);break;case 13:nn(t);break;case 19:Z(mt);break;case 10:aa(t.type);break;case 22:case 23:nn(t),Tc(),e!==null&&Z(di);break;case 24:aa(yt)}}function ts(e,t){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var u=o.next;i=u;do{if((i.tag&e)===e){o=void 0;var d=i.create,g=i.inst;o=d(),g.destroy=o}i=i.next}while(i!==u)}}catch(b){We(t,t.return,b)}}function Pa(e,t,i){try{var o=t.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var d=u.next;o=d;do{if((o.tag&e)===e){var g=o.inst,b=g.destroy;if(b!==void 0){g.destroy=void 0,u=t;var A=i,L=b;try{L()}catch(q){We(u,A,q)}}}o=o.next}while(o!==d)}}catch(q){We(t,t.return,q)}}function _p(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{kh(t,i)}catch(o){We(e,e.return,o)}}}function zp(e,t,i){i.props=gi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){We(e,t,o)}}function ns(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof i=="function"?e.refCleanup=i(o):i.current=o}}catch(u){We(e,t,u)}}function _n(e,t){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(u){We(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){We(e,t,u)}else i.current=null}function Ip(e){var t=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(u){We(e,e.return,u)}}function su(e,t,i){try{var o=e.stateNode;u0(o,e.type,i,t),o[Ut]=t}catch(u){We(e,e.return,u)}}function Up(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ha(e.type)||e.tag===4}function lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Up(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ha(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ru(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Zn));else if(o!==4&&(o===27&&Ha(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(ru(e,t,i),e=e.sibling;e!==null;)ru(e,t,i),e=e.sibling}function Al(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(o!==4&&(o===27&&Ha(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Al(e,t,i),e=e.sibling;e!==null;)Al(e,t,i),e=e.sibling}function Hp(e){var t=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ot(t,o,i),t[Tt]=e,t[Ut]=i}catch(d){We(e,e.return,d)}}var ra=!1,vt=!1,cu=!1,Bp=typeof WeakSet=="function"?WeakSet:Set,kt=null;function qv(e,t){if(e=e.containerInfo,ju=Fl,e=Jf(e),nc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var u=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var g=0,b=-1,A=-1,L=0,q=0,F=e,_=null;t:for(;;){for(var H;F!==i||u!==0&&F.nodeType!==3||(b=g+u),F!==d||o!==0&&F.nodeType!==3||(A=g+o),F.nodeType===3&&(g+=F.nodeValue.length),(H=F.firstChild)!==null;)_=F,F=H;for(;;){if(F===e)break t;if(_===i&&++L===u&&(b=g),_===d&&++q===o&&(A=g),(H=F.nextSibling)!==null)break;F=_,_=F.parentNode}F=H}i=b===-1||A===-1?null:{start:b,end:A}}else i=null}i=i||{start:0,end:0}}else i=null;for(Eu={focusedElem:e,selectionRange:i},Fl=!1,kt=t;kt!==null;)if(t=kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,kt=e;else for(;kt!==null;){switch(t=kt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)u=e[i],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,i=t,u=d.memoizedProps,d=d.memoizedState,o=i.stateNode;try{var ce=gi(i.type,u);e=o.getSnapshotBeforeUpdate(ce,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(we){We(i,i.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Ru(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ru(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,kt=e;break}kt=t.return}}function Kp(e,t,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:ua(e,i),o&4&&ts(5,i);break;case 1:if(ua(e,i),o&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){We(i,i.return,g)}else{var u=gi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){We(i,i.return,g)}}o&64&&_p(i),o&512&&ns(i,i.return);break;case 3:if(ua(e,i),o&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{kh(e,t)}catch(g){We(i,i.return,g)}}break;case 27:t===null&&o&4&&Hp(i);case 26:case 5:ua(e,i),t===null&&o&4&&Ip(i),o&512&&ns(i,i.return);break;case 12:ua(e,i);break;case 31:ua(e,i),o&4&&Yp(e,i);break;case 13:ua(e,i),o&4&&Fp(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Zv.bind(null,i),x0(e,i))));break;case 22:if(o=i.memoizedState!==null||ra,!o){t=t!==null&&t.memoizedState!==null||vt,u=ra;var d=vt;ra=o,(vt=t)&&!d?da(e,i,(i.subtreeFlags&8772)!==0):ua(e,i),ra=u,vt=d}break;case 30:break;default:ua(e,i)}}function qp(e){var t=e.alternate;t!==null&&(e.alternate=null,qp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ur(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var lt=null,Bt=!1;function ca(e,t,i){for(i=i.child;i!==null;)Gp(e,t,i),i=i.sibling}function Gp(e,t,i){if(X&&typeof X.onCommitFiberUnmount=="function")try{X.onCommitFiberUnmount(Qn,i)}catch{}switch(i.tag){case 26:vt||_n(i,t),ca(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:vt||_n(i,t);var o=lt,u=Bt;Ha(i.type)&&(lt=i.stateNode,Bt=!1),ca(e,t,i),ds(i.stateNode),lt=o,Bt=u;break;case 5:vt||_n(i,t);case 6:if(o=lt,u=Bt,lt=null,ca(e,t,i),lt=o,Bt=u,lt!==null)if(Bt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(i.stateNode)}catch(d){We(i,t,d)}else try{lt.removeChild(i.stateNode)}catch(d){We(i,t,d)}break;case 18:lt!==null&&(Bt?(e=lt,_m(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),ho(e)):_m(lt,i.stateNode));break;case 4:o=lt,u=Bt,lt=i.stateNode.containerInfo,Bt=!0,ca(e,t,i),lt=o,Bt=u;break;case 0:case 11:case 14:case 15:Pa(2,i,t),vt||Pa(4,i,t),ca(e,t,i);break;case 1:vt||(_n(i,t),o=i.stateNode,typeof o.componentWillUnmount=="function"&&zp(i,t,o)),ca(e,t,i);break;case 21:ca(e,t,i);break;case 22:vt=(o=vt)||i.memoizedState!==null,ca(e,t,i),vt=o;break;default:ca(e,t,i)}}function Yp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ho(e)}catch(i){We(t,t.return,i)}}}function Fp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ho(e)}catch(i){We(t,t.return,i)}}function Gv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Bp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Bp),t;default:throw Error(l(435,e.tag))}}function kl(e,t){var i=Gv(e);t.forEach(function(o){if(!i.has(o)){i.add(o);var u=Jv.bind(null,e,o);o.then(u,u)}})}function Kt(e,t){var i=t.deletions;if(i!==null)for(var o=0;o<i.length;o++){var u=i[o],d=e,g=t,b=g;e:for(;b!==null;){switch(b.tag){case 27:if(Ha(b.type)){lt=b.stateNode,Bt=!1;break e}break;case 5:lt=b.stateNode,Bt=!1;break e;case 3:case 4:lt=b.stateNode.containerInfo,Bt=!0;break e}b=b.return}if(lt===null)throw Error(l(160));Gp(d,g,u),lt=null,Bt=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Vp(t,e),t=t.sibling}var An=null;function Vp(e,t){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(t,e),qt(e),o&4&&(Pa(3,e,e.return),ts(3,e),Pa(5,e,e.return));break;case 1:Kt(t,e),qt(e),o&512&&(vt||i===null||_n(i,i.return)),o&64&&ra&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var u=An;if(Kt(t,e),qt(e),o&512&&(vt||i===null||_n(i,i.return)),o&4){var d=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(o){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Mo]||d[Tt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(o),u.head.insertBefore(d,u.querySelector("head > title"))),Ot(d,o,i),d[Tt]=e,At(d),o=d;break e;case"link":var g=Vm("link","href",u).get(o+(i.href||""));if(g){for(var b=0;b<g.length;b++)if(d=g[b],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){g.splice(b,1);break t}}d=u.createElement(o),Ot(d,o,i),u.head.appendChild(d);break;case"meta":if(g=Vm("meta","content",u).get(o+(i.content||""))){for(b=0;b<g.length;b++)if(d=g[b],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){g.splice(b,1);break t}}d=u.createElement(o),Ot(d,o,i),u.head.appendChild(d);break;default:throw Error(l(468,o))}d[Tt]=e,At(d),o=d}e.stateNode=o}else Qm(u,e.type,e.stateNode);else e.stateNode=Fm(u,o,e.memoizedProps);else d!==o?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,o===null?Qm(u,e.type,e.stateNode):Fm(u,o,e.memoizedProps)):o===null&&e.stateNode!==null&&su(e,e.memoizedProps,i.memoizedProps)}break;case 27:Kt(t,e),qt(e),o&512&&(vt||i===null||_n(i,i.return)),i!==null&&o&4&&su(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Kt(t,e),qt(e),o&512&&(vt||i===null||_n(i,i.return)),e.flags&32){u=e.stateNode;try{Li(u,"")}catch(ce){We(e,e.return,ce)}}o&4&&e.stateNode!=null&&(u=e.memoizedProps,su(e,u,i!==null?i.memoizedProps:u)),o&1024&&(cu=!0);break;case 6:if(Kt(t,e),qt(e),o&4){if(e.stateNode===null)throw Error(l(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(ce){We(e,e.return,ce)}}break;case 3:if(Kl=null,u=An,An=Hl(t.containerInfo),Kt(t,e),An=u,qt(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{ho(t.containerInfo)}catch(ce){We(e,e.return,ce)}cu&&(cu=!1,Qp(e));break;case 4:o=An,An=Hl(e.stateNode.containerInfo),Kt(t,e),qt(e),An=o;break;case 12:Kt(t,e),qt(e);break;case 31:Kt(t,e),qt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,kl(e,o)));break;case 13:Kt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Tl=pt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,kl(e,o)));break;case 22:u=e.memoizedState!==null;var A=i!==null&&i.memoizedState!==null,L=ra,q=vt;if(ra=L||u,vt=q||A,Kt(t,e),vt=q,ra=L,qt(e),o&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(i===null||A||ra||vt||yi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){A=i=t;try{if(d=A.stateNode,u)g=d.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{b=A.stateNode;var F=A.memoizedProps.style,_=F!=null&&F.hasOwnProperty("display")?F.display:null;b.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ce){We(A,A.return,ce)}}}else if(t.tag===6){if(i===null){A=t;try{A.stateNode.nodeValue=u?"":A.memoizedProps}catch(ce){We(A,A.return,ce)}}}else if(t.tag===18){if(i===null){A=t;try{var H=A.stateNode;u?zm(H,!0):zm(A.stateNode,!1)}catch(ce){We(A,A.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,kl(e,i))));break;case 19:Kt(t,e),qt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,kl(e,o)));break;case 30:break;case 21:break;default:Kt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var i,o=e.return;o!==null;){if(Up(o)){i=o;break}o=o.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var u=i.stateNode,d=lu(e);Al(e,d,u);break;case 5:var g=i.stateNode;i.flags&32&&(Li(g,""),i.flags&=-33);var b=lu(e);Al(e,b,g);break;case 3:case 4:var A=i.stateNode.containerInfo,L=lu(e);ru(e,L,A);break;default:throw Error(l(161))}}catch(q){We(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Qp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ua(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Kp(e,t.alternate,t),t=t.sibling}function yi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pa(4,t,t.return),yi(t);break;case 1:_n(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&zp(t,t.return,i),yi(t);break;case 27:ds(t.stateNode);case 26:case 5:_n(t,t.return),yi(t);break;case 22:t.memoizedState===null&&yi(t);break;case 30:yi(t);break;default:yi(t)}e=e.sibling}}function da(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,u=e,d=t,g=d.flags;switch(d.tag){case 0:case 11:case 15:da(u,d,i),ts(4,d);break;case 1:if(da(u,d,i),o=d,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(L){We(o,o.return,L)}if(o=d,u=o.updateQueue,u!==null){var b=o.stateNode;try{var A=u.shared.hiddenCallbacks;if(A!==null)for(u.shared.hiddenCallbacks=null,u=0;u<A.length;u++)Ah(A[u],b)}catch(L){We(o,o.return,L)}}i&&g&64&&_p(d),ns(d,d.return);break;case 27:Hp(d);case 26:case 5:da(u,d,i),i&&o===null&&g&4&&Ip(d),ns(d,d.return);break;case 12:da(u,d,i);break;case 31:da(u,d,i),i&&g&4&&Yp(u,d);break;case 13:da(u,d,i),i&&g&4&&Fp(u,d);break;case 22:d.memoizedState===null&&da(u,d,i),ns(d,d.return);break;case 30:break;default:da(u,d,i)}t=t.sibling}}function uu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Ko(i))}function du(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ko(e))}function kn(e,t,i,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wp(e,t,i,o),t=t.sibling}function Wp(e,t,i,o){var u=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,i,o),u&2048&&ts(9,t);break;case 1:kn(e,t,i,o);break;case 3:kn(e,t,i,o),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ko(e)));break;case 12:if(u&2048){kn(e,t,i,o),e=t.stateNode;try{var d=t.memoizedProps,g=d.id,b=d.onPostCommit;typeof b=="function"&&b(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){We(t,t.return,A)}}else kn(e,t,i,o);break;case 31:kn(e,t,i,o);break;case 13:kn(e,t,i,o);break;case 23:break;case 22:d=t.stateNode,g=t.alternate,t.memoizedState!==null?d._visibility&2?kn(e,t,i,o):as(e,t):d._visibility&2?kn(e,t,i,o):(d._visibility|=2,to(e,t,i,o,(t.subtreeFlags&10256)!==0||!1)),u&2048&&uu(g,t);break;case 24:kn(e,t,i,o),u&2048&&du(t.alternate,t);break;default:kn(e,t,i,o)}}function to(e,t,i,o,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,g=t,b=i,A=o,L=g.flags;switch(g.tag){case 0:case 11:case 15:to(d,g,b,A,u),ts(8,g);break;case 23:break;case 22:var q=g.stateNode;g.memoizedState!==null?q._visibility&2?to(d,g,b,A,u):as(d,g):(q._visibility|=2,to(d,g,b,A,u)),u&&L&2048&&uu(g.alternate,g);break;case 24:to(d,g,b,A,u),u&&L&2048&&du(g.alternate,g);break;default:to(d,g,b,A,u)}t=t.sibling}}function as(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,o=t,u=o.flags;switch(o.tag){case 22:as(i,o),u&2048&&uu(o.alternate,o);break;case 24:as(i,o),u&2048&&du(o.alternate,o);break;default:as(i,o)}t=t.sibling}}var is=8192;function no(e,t,i){if(e.subtreeFlags&is)for(e=e.child;e!==null;)$p(e,t,i),e=e.sibling}function $p(e,t,i){switch(e.tag){case 26:no(e,t,i),e.flags&is&&e.memoizedState!==null&&j0(i,An,e.memoizedState,e.memoizedProps);break;case 5:no(e,t,i);break;case 3:case 4:var o=An;An=Hl(e.stateNode.containerInfo),no(e,t,i),An=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=is,is=16777216,no(e,t,i),is=o):no(e,t,i));break;default:no(e,t,i)}}function Xp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function os(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var o=t[i];kt=o,Jp(o,e)}Xp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zp(e),e=e.sibling}function Zp(e){switch(e.tag){case 0:case 11:case 15:os(e),e.flags&2048&&Pa(9,e,e.return);break;case 3:os(e);break;case 12:os(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Dl(e)):os(e);break;default:os(e)}}function Dl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var o=t[i];kt=o,Jp(o,e)}Xp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pa(8,t,t.return),Dl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Dl(t));break;default:Dl(t)}e=e.sibling}}function Jp(e,t){for(;kt!==null;){var i=kt;switch(i.tag){case 0:case 11:case 15:Pa(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Ko(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,kt=o;else e:for(i=e;kt!==null;){o=kt;var u=o.sibling,d=o.return;if(qp(o),o===i){kt=null;break e}if(u!==null){u.return=d,kt=u;break e}kt=d}}}var Yv={getCacheForType:function(e){var t=jt(yt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return jt(yt).controller.signal}},Fv=typeof WeakMap=="function"?WeakMap:Map,Fe=0,Je=null,Le=null,ze=0,Qe=0,an=null,Ra=!1,ao=!1,fu=!1,fa=0,dt=0,La=0,xi=0,hu=0,on=0,io=0,ss=null,Gt=null,pu=!1,Tl=0,em=0,Ml=1/0,jl=null,_a=null,wt=0,za=null,oo=null,ha=0,mu=0,gu=null,tm=null,ls=0,yu=null;function sn(){return(Fe&2)!==0&&ze!==0?ze&-ze:P.T!==null?wu():Do()}function nm(){if(on===0)if((ze&536870912)===0||Ue){var e=Se;Se<<=1,(Se&3932160)===0&&(Se=262144),on=e}else on=536870912;return e=tn.current,e!==null&&(e.flags|=32),on}function Yt(e,t,i){(e===Je&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(so(e,0),Ia(e,ze,on,!1)),wn(e,i),((Fe&2)===0||e!==Je)&&(e===Je&&((Fe&2)===0&&(xi|=i),dt===4&&Ia(e,ze,on,!1)),zn(e))}function am(e,t,i){if((Fe&6)!==0)throw Error(l(327));var o=!i&&(t&127)===0&&(t&e.expiredLanes)===0||_t(e,t),u=o?Wv(e,t):bu(e,t,!0),d=o;do{if(u===0){ao&&!o&&Ia(e,t,0,!1);break}else{if(i=e.current.alternate,d&&!Vv(i)){u=bu(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var b=e;u=ss;var A=b.current.memoizedState.isDehydrated;if(A&&(so(b,g).flags|=256),g=bu(b,g,!1),g!==2){if(fu&&!A){b.errorRecoveryDisabledLanes|=d,xi|=d,u=4;break e}d=Gt,Gt=u,d!==null&&(Gt===null?Gt=d:Gt.push.apply(Gt,d))}u=g}if(d=!1,u!==2)continue}}if(u===1){so(e,0),Ia(e,t,0,!0);break}e:{switch(o=e,d=u,d){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:Ia(o,t,on,!Ra);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(u=Tl+300-pt(),10<u)){if(Ia(o,t,on,!Ra),Ne(o,0,!0)!==0)break e;ha=t,o.timeoutHandle=Rm(im.bind(null,o,i,Gt,jl,pu,t,on,xi,io,Ra,d,"Throttled",-0,0),u);break e}im(o,i,Gt,jl,pu,t,on,xi,io,Ra,d,null,-0,0)}}break}while(!0);zn(e)}function im(e,t,i,o,u,d,g,b,A,L,q,F,_,H){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},$p(t,d,F);var ce=(d&62914560)===d?Tl-pt():(d&4194048)===d?em-pt():0;if(ce=E0(F,ce),ce!==null){ha=d,e.cancelPendingCommit=ce(fm.bind(null,e,t,d,i,o,u,g,b,A,q,F,null,_,H)),Ia(e,d,g,!L);return}}fm(e,t,d,i,o,u,g,b,A)}function Vv(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var u=i[o],d=u.getSnapshot;u=u.value;try{if(!Jt(d(),u))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ia(e,t,i,o){t&=~hu,t&=~xi,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var u=t;0<u;){var d=31-ve(u),g=1<<d;o[d]=-1,u&=~g}i!==0&&ti(e,i,t)}function El(){return(Fe&6)===0?(rs(0),!1):!0}function xu(){if(Le!==null){if(Qe===0)var e=Le.return;else e=Le,na=ci=null,Rc(e),$i=null,Go=0,e=Le;for(;e!==null;)Lp(e.alternate,e),e=e.return;Le=null}}function so(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,h0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ha=0,xu(),Je=e,Le=i=ea(e.current,null),ze=t,Qe=0,an=null,Ra=!1,ao=_t(e,t),fu=!1,io=on=hu=xi=La=dt=0,Gt=ss=null,pu=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var u=31-ve(o),d=1<<u;t|=e[u],o&=~d}return fa=t,Zs(),i}function om(e,t){Te=null,P.H=Zo,t===Wi||t===sl?(t=Sh(),Qe=3):t===Cc?(t=Sh(),Qe=4):Qe=t===$c?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,Le===null&&(dt=1,vl(e,gn(t,e.current)))}function sm(){var e=tn.current;return e===null?!0:(ze&4194048)===ze?vn===null:(ze&62914560)===ze||(ze&536870912)!==0?e===vn:!1}function lm(){var e=P.H;return P.H=Zo,e===null?Zo:e}function rm(){var e=P.A;return P.A=Yv,e}function Ol(){dt=4,Ra||(ze&4194048)!==ze&&tn.current!==null||(ao=!0),(La&134217727)===0&&(xi&134217727)===0||Je===null||Ia(Je,ze,on,!1)}function bu(e,t,i){var o=Fe;Fe|=2;var u=lm(),d=rm();(Je!==e||ze!==t)&&(jl=null,so(e,t)),t=!1;var g=dt;e:do try{if(Qe!==0&&Le!==null){var b=Le,A=an;switch(Qe){case 8:xu(),g=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(t=!0);var L=Qe;if(Qe=0,an=null,lo(e,b,A,L),i&&ao){g=0;break e}break;default:L=Qe,Qe=0,an=null,lo(e,b,A,L)}}Qv(),g=dt;break}catch(q){om(e,q)}while(!0);return t&&e.shellSuspendCounter++,na=ci=null,Fe=o,P.H=u,P.A=d,Le===null&&(Je=null,ze=0,Zs()),g}function Qv(){for(;Le!==null;)cm(Le)}function Wv(e,t){var i=Fe;Fe|=2;var o=lm(),u=rm();Je!==e||ze!==t?(jl=null,Ml=pt()+500,so(e,t)):ao=_t(e,t);e:do try{if(Qe!==0&&Le!==null){t=Le;var d=an;t:switch(Qe){case 1:Qe=0,an=null,lo(e,t,d,1);break;case 2:case 9:if(bh(d)){Qe=0,an=null,um(t);break}t=function(){Qe!==2&&Qe!==9||Je!==e||(Qe=7),zn(e)},d.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:bh(d)?(Qe=0,an=null,um(t)):(Qe=0,an=null,lo(e,t,d,7));break;case 5:var g=null;switch(Le.tag){case 26:g=Le.memoizedState;case 5:case 27:var b=Le;if(g?Wm(g):b.stateNode.complete){Qe=0,an=null;var A=b.sibling;if(A!==null)Le=A;else{var L=b.return;L!==null?(Le=L,Pl(L)):Le=null}break t}}Qe=0,an=null,lo(e,t,d,5);break;case 6:Qe=0,an=null,lo(e,t,d,6);break;case 8:xu(),dt=6;break e;default:throw Error(l(462))}}$v();break}catch(q){om(e,q)}while(!0);return na=ci=null,P.H=o,P.A=u,Fe=i,Le!==null?0:(Je=null,ze=0,Zs(),dt)}function $v(){for(;Le!==null&&!Sa();)cm(Le)}function cm(e){var t=Pp(e.alternate,e,fa);e.memoizedProps=e.pendingProps,t===null?Pl(e):Le=t}function um(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Dp(i,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Dp(i,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Rc(t);default:Lp(i,t),t=Le=rh(t,fa),t=Pp(i,t,fa)}e.memoizedProps=e.pendingProps,t===null?Pl(e):Le=t}function lo(e,t,i,o){na=ci=null,Rc(t),$i=null,Go=0;var u=t.return;try{if(Iv(e,u,t,i,ze)){dt=1,vl(e,gn(i,e.current)),Le=null;return}}catch(d){if(u!==null)throw Le=u,d;dt=1,vl(e,gn(i,e.current)),Le=null;return}t.flags&32768?(Ue||o===1?e=!0:ao||(ze&536870912)!==0?e=!1:(Ra=e=!0,(o===2||o===9||o===3||o===6)&&(o=tn.current,o!==null&&o.tag===13&&(o.flags|=16384))),dm(t,e)):Pl(t)}function Pl(e){var t=e;do{if((t.flags&32768)!==0){dm(t,Ra);return}e=t.return;var i=Bv(t.alternate,t,fa);if(i!==null){Le=i;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);dt===0&&(dt=5)}function dm(e,t){do{var i=Kv(e.alternate,e);if(i!==null){i.flags&=32767,Le=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Le=e;return}Le=e=i}while(e!==null);dt=6,Le=null}function fm(e,t,i,o,u,d,g,b,A){e.cancelPendingCommit=null;do Rl();while(wt!==0);if((Fe&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(d=t.lanes|t.childLanes,d|=lc,Ao(e,i,d,g,b,A),e===Je&&(Le=Je=null,ze=0),oo=t,za=e,ha=i,mu=d,gu=u,tm=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,e0(On,function(){return ym(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=P.T,P.T=null,u=V.p,V.p=2,g=Fe,Fe|=4;try{qv(e,t,i)}finally{Fe=g,V.p=u,P.T=o}}wt=1,hm(),pm(),mm()}}function hm(){if(wt===1){wt=0;var e=za,t=oo,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=P.T,P.T=null;var o=V.p;V.p=2;var u=Fe;Fe|=4;try{Vp(t,e);var d=Eu,g=Jf(e.containerInfo),b=d.focusedElem,A=d.selectionRange;if(g!==b&&b&&b.ownerDocument&&Zf(b.ownerDocument.documentElement,b)){if(A!==null&&nc(b)){var L=A.start,q=A.end;if(q===void 0&&(q=L),"selectionStart"in b)b.selectionStart=L,b.selectionEnd=Math.min(q,b.value.length);else{var F=b.ownerDocument||document,_=F&&F.defaultView||window;if(_.getSelection){var H=_.getSelection(),ce=b.textContent.length,we=Math.min(A.start,ce),Ze=A.end===void 0?we:Math.min(A.end,ce);!H.extend&&we>Ze&&(g=Ze,Ze=we,we=g);var j=Xf(b,we),D=Xf(b,Ze);if(j&&D&&(H.rangeCount!==1||H.anchorNode!==j.node||H.anchorOffset!==j.offset||H.focusNode!==D.node||H.focusOffset!==D.offset)){var R=F.createRange();R.setStart(j.node,j.offset),H.removeAllRanges(),we>Ze?(H.addRange(R),H.extend(D.node,D.offset)):(R.setEnd(D.node,D.offset),H.addRange(R))}}}}for(F=[],H=b;H=H.parentNode;)H.nodeType===1&&F.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<F.length;b++){var Y=F[b];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Fl=!!ju,Eu=ju=null}finally{Fe=u,V.p=o,P.T=i}}e.current=t,wt=2}}function pm(){if(wt===2){wt=0;var e=za,t=oo,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=P.T,P.T=null;var o=V.p;V.p=2;var u=Fe;Fe|=4;try{Kp(e,t.alternate,t)}finally{Fe=u,V.p=o,P.T=i}}wt=3}}function mm(){if(wt===4||wt===3){wt=0,Fn();var e=za,t=oo,i=ha,o=tm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?wt=5:(wt=0,oo=za=null,gm(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(_a=null),Ti(i),t=t.stateNode,X&&typeof X.onCommitFiberRoot=="function")try{X.onCommitFiberRoot(Qn,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=P.T,u=V.p,V.p=2,P.T=null;try{for(var d=e.onRecoverableError,g=0;g<o.length;g++){var b=o[g];d(b.value,{componentStack:b.stack})}}finally{P.T=t,V.p=u}}(ha&3)!==0&&Rl(),zn(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===yu?ls++:(ls=0,yu=e):ls=0,rs(0)}}function gm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ko(t)))}function Rl(){return hm(),pm(),mm(),ym()}function ym(){if(wt!==5)return!1;var e=za,t=mu;mu=0;var i=Ti(ha),o=P.T,u=V.p;try{V.p=32>i?32:i,P.T=null,i=gu,gu=null;var d=za,g=ha;if(wt=0,oo=za=null,ha=0,(Fe&6)!==0)throw Error(l(331));var b=Fe;if(Fe|=4,Zp(d.current),Wp(d,d.current,g,i),Fe=b,rs(0,!1),X&&typeof X.onPostCommitFiberRoot=="function")try{X.onPostCommitFiberRoot(Qn,d)}catch{}return!0}finally{V.p=u,P.T=o,gm(e,t)}}function xm(e,t,i){t=gn(i,t),t=Wc(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(wn(e,2),zn(e))}function We(e,t,i){if(e.tag===3)xm(e,e,i);else for(;t!==null;){if(t.tag===3){xm(t,e,i);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(_a===null||!_a.has(o))){e=gn(i,e),i=bp(2),o=ja(t,i,2),o!==null&&(vp(i,o,t,e),wn(o,2),zn(o));break}}t=t.return}}function vu(e,t,i){var o=e.pingCache;if(o===null){o=e.pingCache=new Fv;var u=new Set;o.set(t,u)}else u=o.get(t),u===void 0&&(u=new Set,o.set(t,u));u.has(i)||(fu=!0,u.add(i),e=Xv.bind(null,e,t,i),t.then(e,e))}function Xv(e,t,i){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Je===e&&(ze&i)===i&&(dt===4||dt===3&&(ze&62914560)===ze&&300>pt()-Tl?(Fe&2)===0&&so(e,0):hu|=i,io===ze&&(io=0)),zn(e)}function bm(e,t){t===0&&(t=Nt()),e=si(e,t),e!==null&&(wn(e,t),zn(e))}function Zv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),bm(e,i)}function Jv(e,t){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(t),bm(e,i)}function e0(e,t){return En(e,t)}var Ll=null,ro=null,Su=!1,_l=!1,Cu=!1,Ua=0;function zn(e){e!==ro&&e.next===null&&(ro===null?Ll=ro=e:ro=ro.next=e),_l=!0,Su||(Su=!0,n0())}function rs(e,t){if(!Cu&&_l){Cu=!0;do for(var i=!1,o=Ll;o!==null;){if(e!==0){var u=o.pendingLanes;if(u===0)var d=0;else{var g=o.suspendedLanes,b=o.pingedLanes;d=(1<<31-ve(42|e)+1)-1,d&=u&~(g&~b),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,wm(o,d))}else d=ze,d=Ne(o,o===Je?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||_t(o,d)||(i=!0,wm(o,d));o=o.next}while(i);Cu=!1}}function t0(){vm()}function vm(){_l=Su=!1;var e=0;Ua!==0&&f0()&&(e=Ua);for(var t=pt(),i=null,o=Ll;o!==null;){var u=o.next,d=Sm(o,t);d===0?(o.next=null,i===null?Ll=u:i.next=u,u===null&&(ro=i)):(i=o,(e!==0||(d&3)!==0)&&(_l=!0)),o=u}wt!==0&&wt!==5||rs(e),Ua!==0&&(Ua=0)}function Sm(e,t){for(var i=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var g=31-ve(d),b=1<<g,A=u[g];A===-1?((b&i)===0||(b&o)!==0)&&(u[g]=Wn(b,t)):A<=t&&(e.expiredLanes|=b),d&=~b}if(t=Je,i=ze,i=Ne(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&$t(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||_t(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(o!==null&&$t(o),Ti(i)){case 2:case 8:i=ei;break;case 32:i=On;break;case 268435456:i=Di;break;default:i=On}return o=Cm.bind(null,e),i=En(i,o),e.callbackPriority=t,e.callbackNode=i,t}return o!==null&&o!==null&&$t(o),e.callbackPriority=2,e.callbackNode=null,2}function Cm(e,t){if(wt!==0&&wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Rl()&&e.callbackNode!==i)return null;var o=ze;return o=Ne(e,e===Je?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(am(e,o,t),Sm(e,pt()),e.callbackNode!=null&&e.callbackNode===i?Cm.bind(null,e):null)}function wm(e,t){if(Rl())return null;am(e,t,!0)}function n0(){p0(function(){(Fe&6)!==0?En(Vn,t0):vm()})}function wu(){if(Ua===0){var e=Vi;e===0&&(e=ke,ke<<=1,(ke&261888)===0&&(ke=256)),Ua=e}return Ua}function Nm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gs(""+e)}function Am(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function a0(e,t,i,o,u){if(t==="submit"&&i&&i.stateNode===u){var d=Nm((u[Ut]||null).action),g=o.submitter;g&&(t=(t=g[Ut]||null)?Nm(t.formAction):g.getAttribute("formAction"),t!==null&&(d=t,g=null));var b=new Qs("action","action",null,o,u);e.push({event:b,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ua!==0){var A=g?Am(u,g):new FormData(u);qc(i,{pending:!0,data:A,method:u.method,action:d},null,A)}}else typeof d=="function"&&(b.preventDefault(),A=g?Am(u,g):new FormData(u),qc(i,{pending:!0,data:A,method:u.method,action:d},d,A))},currentTarget:u}]})}}for(var Nu=0;Nu<sc.length;Nu++){var Au=sc[Nu],i0=Au.toLowerCase(),o0=Au[0].toUpperCase()+Au.slice(1);Nn(i0,"on"+o0)}Nn(nh,"onAnimationEnd"),Nn(ah,"onAnimationIteration"),Nn(ih,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(Sv,"onTransitionRun"),Nn(Cv,"onTransitionStart"),Nn(wv,"onTransitionCancel"),Nn(oh,"onTransitionEnd"),Pi("onMouseEnter",["mouseout","mouseover"]),Pi("onMouseLeave",["mouseout","mouseover"]),Pi("onPointerEnter",["pointerout","pointerover"]),Pi("onPointerLeave",["pointerout","pointerover"]),ni("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ni("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ni("onBeforeInput",["compositionend","keypress","textInput","paste"]),ni("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ni("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ni("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),s0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cs));function km(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],u=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var g=o.length-1;0<=g;g--){var b=o[g],A=b.instance,L=b.currentTarget;if(b=b.listener,A!==d&&u.isPropagationStopped())break e;d=b,u.currentTarget=L;try{d(u)}catch(q){Xs(q)}u.currentTarget=null,d=A}else for(g=0;g<o.length;g++){if(b=o[g],A=b.instance,L=b.currentTarget,b=b.listener,A!==d&&u.isPropagationStopped())break e;d=b,u.currentTarget=L;try{d(u)}catch(q){Xs(q)}u.currentTarget=null,d=A}}}}function _e(e,t){var i=t[Ir];i===void 0&&(i=t[Ir]=new Set);var o=e+"__bubble";i.has(o)||(Dm(t,e,2,!1),i.add(o))}function ku(e,t,i){var o=0;t&&(o|=4),Dm(i,e,o,t)}var zl="_reactListening"+Math.random().toString(36).slice(2);function Du(e){if(!e[zl]){e[zl]=!0,vf.forEach(function(i){i!=="selectionchange"&&(s0.has(i)||ku(i,!1,e),ku(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zl]||(t[zl]=!0,ku("selectionchange",!1,t))}}function Dm(e,t,i,o){switch(ng(t)){case 2:var u=R0;break;case 8:u=L0;break;default:u=Ku}i=u.bind(null,t,i,e),u=void 0,!Vr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(t,i,{capture:!0,passive:u}):e.addEventListener(t,i,!0):u!==void 0?e.addEventListener(t,i,{passive:u}):e.addEventListener(t,i,!1)}function Tu(e,t,i,o,u){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var g=o.tag;if(g===3||g===4){var b=o.stateNode.containerInfo;if(b===u)break;if(g===4)for(g=o.return;g!==null;){var A=g.tag;if((A===3||A===4)&&g.stateNode.containerInfo===u)return;g=g.return}for(;b!==null;){if(g=ji(b),g===null)return;if(A=g.tag,A===5||A===6||A===26||A===27){o=d=g;continue e}b=b.parentNode}}o=o.return}Of(function(){var L=d,q=Yr(i),F=[];e:{var _=sh.get(e);if(_!==void 0){var H=Qs,ce=e;switch(e){case"keypress":if(Fs(i)===0)break e;case"keydown":case"keyup":H=Jb;break;case"focusin":ce="focus",H=Xr;break;case"focusout":ce="blur",H=Xr;break;case"beforeblur":case"afterblur":H=Xr;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Lf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=Bb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=nv;break;case nh:case ah:case ih:H=Gb;break;case oh:H=iv;break;case"scroll":case"scrollend":H=Ub;break;case"wheel":H=sv;break;case"copy":case"cut":case"paste":H=Fb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=zf;break;case"toggle":case"beforetoggle":H=rv}var we=(t&4)!==0,Ze=!we&&(e==="scroll"||e==="scrollend"),j=we?_!==null?_+"Capture":null:_;we=[];for(var D=L,R;D!==null;){var Y=D;if(R=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||R===null||j===null||(Y=Eo(D,j),Y!=null&&we.push(us(D,Y,R))),Ze)break;D=D.return}0<we.length&&(_=new H(_,ce,null,i,q),F.push({event:_,listeners:we}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",_&&i!==Gr&&(ce=i.relatedTarget||i.fromElement)&&(ji(ce)||ce[Mi]))break e;if((H||_)&&(_=q.window===q?q:(_=q.ownerDocument)?_.defaultView||_.parentWindow:window,H?(ce=i.relatedTarget||i.toElement,H=L,ce=ce?ji(ce):null,ce!==null&&(Ze=f(ce),we=ce.tag,ce!==Ze||we!==5&&we!==27&&we!==6)&&(ce=null)):(H=null,ce=L),H!==ce)){if(we=Lf,Y="onMouseLeave",j="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(we=zf,Y="onPointerLeave",j="onPointerEnter",D="pointer"),Ze=H==null?_:jo(H),R=ce==null?_:jo(ce),_=new we(Y,D+"leave",H,i,q),_.target=Ze,_.relatedTarget=R,Y=null,ji(q)===L&&(we=new we(j,D+"enter",ce,i,q),we.target=R,we.relatedTarget=Ze,Y=we),Ze=Y,H&&ce)t:{for(we=l0,j=H,D=ce,R=0,Y=j;Y;Y=we(Y))R++;Y=0;for(var ye=D;ye;ye=we(ye))Y++;for(;0<R-Y;)j=we(j),R--;for(;0<Y-R;)D=we(D),Y--;for(;R--;){if(j===D||D!==null&&j===D.alternate){we=j;break t}j=we(j),D=we(D)}we=null}else we=null;H!==null&&Tm(F,_,H,we,!1),ce!==null&&Ze!==null&&Tm(F,Ze,ce,we,!0)}}e:{if(_=L?jo(L):window,H=_.nodeName&&_.nodeName.toLowerCase(),H==="select"||H==="input"&&_.type==="file")var Ke=Yf;else if(qf(_))if(Ff)Ke=xv;else{Ke=gv;var de=mv}else H=_.nodeName,!H||H.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?L&&qr(L.elementType)&&(Ke=Yf):Ke=yv;if(Ke&&(Ke=Ke(e,L))){Gf(F,Ke,i,q);break e}de&&de(e,_,L),e==="focusout"&&L&&_.type==="number"&&L.memoizedProps.value!=null&&Kr(_,"number",_.value)}switch(de=L?jo(L):window,e){case"focusin":(qf(de)||de.contentEditable==="true")&&(Ui=de,ac=L,Uo=null);break;case"focusout":Uo=ac=Ui=null;break;case"mousedown":ic=!0;break;case"contextmenu":case"mouseup":case"dragend":ic=!1,eh(F,i,q);break;case"selectionchange":if(vv)break;case"keydown":case"keyup":eh(F,i,q)}var Me;if(Jr)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Ii?Bf(e,i)&&(Ie="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ie="onCompositionStart");Ie&&(If&&i.locale!=="ko"&&(Ii||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Ii&&(Me=Pf()):(wa=q,Qr="value"in wa?wa.value:wa.textContent,Ii=!0)),de=Il(L,Ie),0<de.length&&(Ie=new _f(Ie,e,null,i,q),F.push({event:Ie,listeners:de}),Me?Ie.data=Me:(Me=Kf(i),Me!==null&&(Ie.data=Me)))),(Me=uv?dv(e,i):fv(e,i))&&(Ie=Il(L,"onBeforeInput"),0<Ie.length&&(de=new _f("onBeforeInput","beforeinput",null,i,q),F.push({event:de,listeners:Ie}),de.data=Me)),a0(F,e,L,i,q)}km(F,t)})}function us(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Il(e,t){for(var i=t+"Capture",o=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=Eo(e,i),u!=null&&o.unshift(us(e,u,d)),u=Eo(e,t),u!=null&&o.push(us(e,u,d))),e.tag===3)return o;e=e.return}return[]}function l0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Tm(e,t,i,o,u){for(var d=t._reactName,g=[];i!==null&&i!==o;){var b=i,A=b.alternate,L=b.stateNode;if(b=b.tag,A!==null&&A===o)break;b!==5&&b!==26&&b!==27||L===null||(A=L,u?(L=Eo(i,d),L!=null&&g.unshift(us(i,L,A))):u||(L=Eo(i,d),L!=null&&g.push(us(i,L,A)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var r0=/\r\n?/g,c0=/\u0000|\uFFFD/g;function Mm(e){return(typeof e=="string"?e:""+e).replace(r0,`
10
+ `).replace(c0,"")}function jm(e,t){return t=Mm(t),Mm(e)===t}function Xe(e,t,i,o,u,d){switch(i){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Li(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Li(e,""+o);break;case"className":Ks(e,"class",o);break;case"tabIndex":Ks(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Ks(e,i,o);break;case"style":jf(e,o,d);break;case"data":if(t!=="object"){Ks(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=Gs(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(i==="formAction"?(t!=="input"&&Xe(e,t,"name",u.name,u,null),Xe(e,t,"formEncType",u.formEncType,u,null),Xe(e,t,"formMethod",u.formMethod,u,null),Xe(e,t,"formTarget",u.formTarget,u,null)):(Xe(e,t,"encType",u.encType,u,null),Xe(e,t,"method",u.method,u,null),Xe(e,t,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=Gs(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=Zn);break;case"onScroll":o!=null&&_e("scroll",e);break;case"onScrollEnd":o!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(i=o.__html,i!=null){if(u.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}i=Gs(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""+o):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":_e("beforetoggle",e),_e("toggle",e),Bs(e,"popover",o);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Bs(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=zb.get(i)||i,Bs(e,i,o))}}function Mu(e,t,i,o,u,d){switch(i){case"style":jf(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(i=o.__html,i!=null){if(u.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof o=="string"?Li(e,o):(typeof o=="number"||typeof o=="bigint")&&Li(e,""+o);break;case"onScroll":o!=null&&_e("scroll",e);break;case"onScrollEnd":o!=null&&_e("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sf.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),t=i.slice(2,u?i.length-7:void 0),d=e[Ut]||null,d=d!=null?d[i]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof o=="function")){typeof d!="function"&&d!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,o,u);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):Bs(e,i,o)}}}function Ot(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var o=!1,u=!1,d;for(d in i)if(i.hasOwnProperty(d)){var g=i[d];if(g!=null)switch(d){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:Xe(e,t,d,g,i,null)}}u&&Xe(e,t,"srcSet",i.srcSet,i,null),o&&Xe(e,t,"src",i.src,i,null);return;case"input":_e("invalid",e);var b=d=g=u=null,A=null,L=null;for(o in i)if(i.hasOwnProperty(o)){var q=i[o];if(q!=null)switch(o){case"name":u=q;break;case"type":g=q;break;case"checked":A=q;break;case"defaultChecked":L=q;break;case"value":d=q;break;case"defaultValue":b=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(l(137,t));break;default:Xe(e,t,o,q,i,null)}}kf(e,d,b,A,L,g,u,!1);return;case"select":_e("invalid",e),o=g=d=null;for(u in i)if(i.hasOwnProperty(u)&&(b=i[u],b!=null))switch(u){case"value":d=b;break;case"defaultValue":g=b;break;case"multiple":o=b;default:Xe(e,t,u,b,i,null)}t=d,i=g,e.multiple=!!o,t!=null?Ri(e,!!o,t,!1):i!=null&&Ri(e,!!o,i,!0);return;case"textarea":_e("invalid",e),d=u=o=null;for(g in i)if(i.hasOwnProperty(g)&&(b=i[g],b!=null))switch(g){case"value":o=b;break;case"defaultValue":u=b;break;case"children":d=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(l(91));break;default:Xe(e,t,g,b,i,null)}Tf(e,o,u,d);return;case"option":for(A in i)if(i.hasOwnProperty(A)&&(o=i[A],o!=null))switch(A){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Xe(e,t,A,o,i,null)}return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(o=0;o<cs.length;o++)_e(cs[o],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in i)if(i.hasOwnProperty(L)&&(o=i[L],o!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:Xe(e,t,L,o,i,null)}return;default:if(qr(t)){for(q in i)i.hasOwnProperty(q)&&(o=i[q],o!==void 0&&Mu(e,t,q,o,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(o=i[b],o!=null&&Xe(e,t,b,o,i,null))}function u0(e,t,i,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,g=null,b=null,A=null,L=null,q=null;for(H in i){var F=i[H];if(i.hasOwnProperty(H)&&F!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":A=F;default:o.hasOwnProperty(H)||Xe(e,t,H,null,o,F)}}for(var _ in o){var H=o[_];if(F=i[_],o.hasOwnProperty(_)&&(H!=null||F!=null))switch(_){case"type":d=H;break;case"name":u=H;break;case"checked":L=H;break;case"defaultChecked":q=H;break;case"value":g=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(137,t));break;default:H!==F&&Xe(e,t,_,H,o,F)}}Br(e,g,b,A,L,q,d,u);return;case"select":H=g=b=_=null;for(d in i)if(A=i[d],i.hasOwnProperty(d)&&A!=null)switch(d){case"value":break;case"multiple":H=A;default:o.hasOwnProperty(d)||Xe(e,t,d,null,o,A)}for(u in o)if(d=o[u],A=i[u],o.hasOwnProperty(u)&&(d!=null||A!=null))switch(u){case"value":_=d;break;case"defaultValue":b=d;break;case"multiple":g=d;default:d!==A&&Xe(e,t,u,d,o,A)}t=b,i=g,o=H,_!=null?Ri(e,!!i,_,!1):!!o!=!!i&&(t!=null?Ri(e,!!i,t,!0):Ri(e,!!i,i?[]:"",!1));return;case"textarea":H=_=null;for(b in i)if(u=i[b],i.hasOwnProperty(b)&&u!=null&&!o.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Xe(e,t,b,null,o,u)}for(g in o)if(u=o[g],d=i[g],o.hasOwnProperty(g)&&(u!=null||d!=null))switch(g){case"value":_=u;break;case"defaultValue":H=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(l(91));break;default:u!==d&&Xe(e,t,g,u,o,d)}Df(e,_,H);return;case"option":for(var ce in i)if(_=i[ce],i.hasOwnProperty(ce)&&_!=null&&!o.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:Xe(e,t,ce,null,o,_)}for(A in o)if(_=o[A],H=i[A],o.hasOwnProperty(A)&&_!==H&&(_!=null||H!=null))switch(A){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Xe(e,t,A,_,o,H)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in i)_=i[we],i.hasOwnProperty(we)&&_!=null&&!o.hasOwnProperty(we)&&Xe(e,t,we,null,o,_);for(L in o)if(_=o[L],H=i[L],o.hasOwnProperty(L)&&_!==H&&(_!=null||H!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(l(137,t));break;default:Xe(e,t,L,_,o,H)}return;default:if(qr(t)){for(var Ze in i)_=i[Ze],i.hasOwnProperty(Ze)&&_!==void 0&&!o.hasOwnProperty(Ze)&&Mu(e,t,Ze,void 0,o,_);for(q in o)_=o[q],H=i[q],!o.hasOwnProperty(q)||_===H||_===void 0&&H===void 0||Mu(e,t,q,_,o,H);return}}for(var j in i)_=i[j],i.hasOwnProperty(j)&&_!=null&&!o.hasOwnProperty(j)&&Xe(e,t,j,null,o,_);for(F in o)_=o[F],H=i[F],!o.hasOwnProperty(F)||_===H||_==null&&H==null||Xe(e,t,F,_,o,H)}function Em(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function d0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var u=i[o],d=u.transferSize,g=u.initiatorType,b=u.duration;if(d&&b&&Em(g)){for(g=0,b=u.responseEnd,o+=1;o<i.length;o++){var A=i[o],L=A.startTime;if(L>b)break;var q=A.transferSize,F=A.initiatorType;q&&Em(F)&&(A=A.responseEnd,g+=q*(A<b?1:(b-L)/(A-L)))}if(--o,t+=8*(d+g)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ju=null,Eu=null;function Ul(e){return e.nodeType===9?e:e.ownerDocument}function Om(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ou(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pu=null;function f0(){var e=window.event;return e&&e.type==="popstate"?e===Pu?!1:(Pu=e,!0):(Pu=null,!1)}var Rm=typeof setTimeout=="function"?setTimeout:void 0,h0=typeof clearTimeout=="function"?clearTimeout:void 0,Lm=typeof Promise=="function"?Promise:void 0,p0=typeof queueMicrotask=="function"?queueMicrotask:typeof Lm<"u"?function(e){return Lm.resolve(null).then(e).catch(m0)}:Rm;function m0(e){setTimeout(function(){throw e})}function Ha(e){return e==="head"}function _m(e,t){var i=t,o=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(u),ho(t);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")ds(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ds(i);for(var d=i.firstChild;d;){var g=d.nextSibling,b=d.nodeName;d[Mo]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=g}}else i==="body"&&ds(e.ownerDocument.body);i=u}while(i);ho(t)}function zm(e,t){var i=e;e=0;do{var o=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function Ru(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Ru(i),Ur(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function g0(e,t,i,o){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Mo])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Sn(e.nextSibling),e===null)break}return null}function y0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Sn(e.nextSibling),e===null))return null;return e}function Im(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Sn(e.nextSibling),e===null))return null;return e}function Lu(e){return e.data==="$?"||e.data==="$~"}function _u(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function x0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var o=function(){t(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Sn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var zu=null;function Um(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Sn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Hm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Bm(e,t,i){switch(t=Ul(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function ds(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ur(e)}var Cn=new Map,Km=new Set;function Hl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pa=V.d;V.d={f:b0,r:v0,D:S0,C:C0,L:w0,m:N0,X:k0,S:A0,M:D0};function b0(){var e=pa.f(),t=El();return e||t}function v0(e){var t=Ei(e);t!==null&&t.tag===5&&t.type==="form"?op(t):pa.r(e)}var co=typeof document>"u"?null:document;function qm(e,t,i){var o=co;if(o&&typeof t=="string"&&t){var u=pn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),Km.has(u)||(Km.add(u),e={rel:e,crossOrigin:i,href:t},o.querySelector(u)===null&&(t=o.createElement("link"),Ot(t,"link",e),At(t),o.head.appendChild(t)))}}function S0(e){pa.D(e),qm("dns-prefetch",e,null)}function C0(e,t){pa.C(e,t),qm("preconnect",e,t)}function w0(e,t,i){pa.L(e,t,i);var o=co;if(o&&e&&t){var u='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+pn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+pn(i.imageSizes)+'"]')):u+='[href="'+pn(e)+'"]';var d=u;switch(t){case"style":d=uo(e);break;case"script":d=fo(e)}Cn.has(d)||(e=x({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Cn.set(d,e),o.querySelector(u)!==null||t==="style"&&o.querySelector(fs(d))||t==="script"&&o.querySelector(hs(d))||(t=o.createElement("link"),Ot(t,"link",e),At(t),o.head.appendChild(t)))}}function N0(e,t){pa.m(e,t);var i=co;if(i&&e){var o=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+pn(o)+'"][href="'+pn(e)+'"]',d=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=fo(e)}if(!Cn.has(d)&&(e=x({rel:"modulepreload",href:e},t),Cn.set(d,e),i.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(hs(d)))return}o=i.createElement("link"),Ot(o,"link",e),At(o),i.head.appendChild(o)}}}function A0(e,t,i){pa.S(e,t,i);var o=co;if(o&&e){var u=Oi(o).hoistableStyles,d=uo(e);t=t||"default";var g=u.get(d);if(!g){var b={loading:0,preload:null};if(g=o.querySelector(fs(d)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Cn.get(d))&&Iu(e,i);var A=g=o.createElement("link");At(A),Ot(A,"link",e),A._p=new Promise(function(L,q){A.onload=L,A.onerror=q}),A.addEventListener("load",function(){b.loading|=1}),A.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Bl(g,t,o)}g={type:"stylesheet",instance:g,count:1,state:b},u.set(d,g)}}}function k0(e,t){pa.X(e,t);var i=co;if(i&&e){var o=Oi(i).hoistableScripts,u=fo(e),d=o.get(u);d||(d=i.querySelector(hs(u)),d||(e=x({src:e,async:!0},t),(t=Cn.get(u))&&Uu(e,t),d=i.createElement("script"),At(d),Ot(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(u,d))}}function D0(e,t){pa.M(e,t);var i=co;if(i&&e){var o=Oi(i).hoistableScripts,u=fo(e),d=o.get(u);d||(d=i.querySelector(hs(u)),d||(e=x({src:e,async:!0,type:"module"},t),(t=Cn.get(u))&&Uu(e,t),d=i.createElement("script"),At(d),Ot(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(u,d))}}function Gm(e,t,i,o){var u=(u=te.current)?Hl(u):null;if(!u)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=uo(i.href),i=Oi(u).hoistableStyles,o=i.get(t),o||(o={type:"style",instance:null,count:0,state:null},i.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=uo(i.href);var d=Oi(u).hoistableStyles,g=d.get(e);if(g||(u=u.ownerDocument||u,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,g),(d=u.querySelector(fs(e)))&&!d._p&&(g.instance=d,g.state.loading=5),Cn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Cn.set(e,i),d||T0(u,e,i,g.state))),t&&o===null)throw Error(l(528,""));return g}if(t&&o!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=fo(i),i=Oi(u).hoistableScripts,o=i.get(t),o||(o={type:"script",instance:null,count:0,state:null},i.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function uo(e){return'href="'+pn(e)+'"'}function fs(e){return'link[rel="stylesheet"]['+e+"]"}function Ym(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function T0(e,t,i,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Ot(t,"link",i),At(t),e.head.appendChild(t))}function fo(e){return'[src="'+pn(e)+'"]'}function hs(e){return"script[async]"+e}function Fm(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+pn(i.href)+'"]');if(o)return t.instance=o,At(o),o;var u=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),At(o),Ot(o,"style",u),Bl(o,i.precedence,e),t.instance=o;case"stylesheet":u=uo(i.href);var d=e.querySelector(fs(u));if(d)return t.state.loading|=4,t.instance=d,At(d),d;o=Ym(i),(u=Cn.get(u))&&Iu(o,u),d=(e.ownerDocument||e).createElement("link"),At(d);var g=d;return g._p=new Promise(function(b,A){g.onload=b,g.onerror=A}),Ot(d,"link",o),t.state.loading|=4,Bl(d,i.precedence,e),t.instance=d;case"script":return d=fo(i.src),(u=e.querySelector(hs(d)))?(t.instance=u,At(u),u):(o=i,(u=Cn.get(d))&&(o=x({},i),Uu(o,u)),e=e.ownerDocument||e,u=e.createElement("script"),At(u),Ot(u,"link",o),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Bl(o,i.precedence,e));return t.instance}function Bl(e,t,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,d=u,g=0;g<o.length;g++){var b=o[g];if(b.dataset.precedence===t)d=b;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Iu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Kl=null;function Vm(e,t,i){if(Kl===null){var o=new Map,u=Kl=new Map;u.set(i,o)}else u=Kl,o=u.get(i),o||(o=new Map,u.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var d=i[u];if(!(d[Mo]||d[Tt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var g=d.getAttribute(t)||"";g=e+g;var b=o.get(g);b?b.push(d):o.set(g,[d])}}return o}function Qm(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function M0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Wm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function j0(e,t,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=uo(o.href),d=t.querySelector(fs(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ql.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=d,At(d);return}d=t.ownerDocument||t,o=Ym(o),(u=Cn.get(u))&&Iu(o,u),d=d.createElement("link"),At(d);var g=d;g._p=new Promise(function(b,A){g.onload=b,g.onerror=A}),Ot(d,"link",o),i.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ql.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Hu=0;function E0(e,t){return e.stylesheets&&e.count===0&&Yl(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&Yl(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Hu===0&&(Hu=62500*d0());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Yl(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Hu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function ql(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Gl=null;function Yl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Gl=new Map,t.forEach(O0,e),Gl=null,ql.call(e))}function O0(e,t){if(!(t.state.loading&4)){var i=Gl.get(e);if(i)var o=i.get(null);else{i=new Map,Gl.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var g=u[d];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(i.set(g.dataset.precedence,g),o=g)}o&&i.set(null,o)}u=t.instance,g=u.getAttribute("data-precedence"),d=i.get(g)||o,d===o&&i.set(null,u),i.set(g,u),this.count++,o=ql.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var ps={$$typeof:K,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function P0(e,t,i,o,u,d,g,b,A){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zt(0),this.hiddenUpdates=Zt(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function $m(e,t,i,o,u,d,g,b,A,L,q,F){return e=new P0(e,t,i,g,A,L,q,F,b),t=1,d===!0&&(t|=24),d=en(3,null,null,t),e.current=d,d.stateNode=e,t=bc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:i,cache:t},wc(d),e}function Xm(e){return e?(e=Ki,e):Ki}function Zm(e,t,i,o,u,d){u=Xm(u),o.context===null?o.context=u:o.pendingContext=u,o=Ma(t),o.payload={element:i},d=d===void 0?null:d,d!==null&&(o.callback=d),i=ja(e,o,t),i!==null&&(Yt(i,e,t),Fo(i,e,t))}function Jm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Bu(e,t){Jm(e,t),(e=e.alternate)&&Jm(e,t)}function eg(e){if(e.tag===13||e.tag===31){var t=si(e,67108864);t!==null&&Yt(t,e,67108864),Bu(e,67108864)}}function tg(e){if(e.tag===13||e.tag===31){var t=sn();t=$n(t);var i=si(e,t);i!==null&&Yt(i,e,t),Bu(e,t)}}var Fl=!0;function R0(e,t,i,o){var u=P.T;P.T=null;var d=V.p;try{V.p=2,Ku(e,t,i,o)}finally{V.p=d,P.T=u}}function L0(e,t,i,o){var u=P.T;P.T=null;var d=V.p;try{V.p=8,Ku(e,t,i,o)}finally{V.p=d,P.T=u}}function Ku(e,t,i,o){if(Fl){var u=qu(o);if(u===null)Tu(e,t,o,Vl,i),ag(e,o);else if(z0(u,e,t,i,o))o.stopPropagation();else if(ag(e,o),t&4&&-1<_0.indexOf(e)){for(;u!==null;){var d=Ei(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var g=tt(d.pendingLanes);if(g!==0){var b=d;for(b.pendingLanes|=2,b.entangledLanes|=2;g;){var A=1<<31-ve(g);b.entanglements[1]|=A,g&=~A}zn(d),(Fe&6)===0&&(Ml=pt()+500,rs(0))}}break;case 31:case 13:b=si(d,2),b!==null&&Yt(b,d,2),El(),Bu(d,2)}if(d=qu(o),d===null&&Tu(e,t,o,Vl,i),d===u)break;u=d}u!==null&&o.stopPropagation()}else Tu(e,t,o,null,i)}}function qu(e){return e=Yr(e),Gu(e)}var Vl=null;function Gu(e){if(Vl=null,e=ji(e),e!==null){var t=f(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=h(t),e!==null)return e;e=null}else if(i===31){if(e=p(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Vl=e,null}function ng(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xt()){case Vn:return 2;case ei:return 8;case On:case Pn:return 32;case Di:return 268435456;default:return 32}default:return 32}}var Yu=!1,Ba=null,Ka=null,qa=null,ms=new Map,gs=new Map,Ga=[],_0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ag(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":ms.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gs.delete(t.pointerId)}}function ys(e,t,i,o,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:i,eventSystemFlags:o,nativeEvent:d,targetContainers:[u]},t!==null&&(t=Ei(t),t!==null&&eg(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function z0(e,t,i,o,u){switch(t){case"focusin":return Ba=ys(Ba,e,t,i,o,u),!0;case"dragenter":return Ka=ys(Ka,e,t,i,o,u),!0;case"mouseover":return qa=ys(qa,e,t,i,o,u),!0;case"pointerover":var d=u.pointerId;return ms.set(d,ys(ms.get(d)||null,e,t,i,o,u)),!0;case"gotpointercapture":return d=u.pointerId,gs.set(d,ys(gs.get(d)||null,e,t,i,o,u)),!0}return!1}function ig(e){var t=ji(e.target);if(t!==null){var i=f(t);if(i!==null){if(t=i.tag,t===13){if(t=h(i),t!==null){e.blockedOn=t,To(e.priority,function(){tg(i)});return}}else if(t===31){if(t=p(i),t!==null){e.blockedOn=t,To(e.priority,function(){tg(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ql(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=qu(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);Gr=o,i.target.dispatchEvent(o),Gr=null}else return t=Ei(i),t!==null&&eg(t),e.blockedOn=i,!1;t.shift()}return!0}function og(e,t,i){Ql(e)&&i.delete(t)}function I0(){Yu=!1,Ba!==null&&Ql(Ba)&&(Ba=null),Ka!==null&&Ql(Ka)&&(Ka=null),qa!==null&&Ql(qa)&&(qa=null),ms.forEach(og),gs.forEach(og)}function Wl(e,t){e.blockedOn===t&&(e.blockedOn=null,Yu||(Yu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,I0)))}var $l=null;function sg(e){$l!==e&&($l=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$l===e&&($l=null);for(var t=0;t<e.length;t+=3){var i=e[t],o=e[t+1],u=e[t+2];if(typeof o!="function"){if(Gu(o||i)===null)continue;break}var d=Ei(i);d!==null&&(e.splice(t,3),t-=3,qc(d,{pending:!0,data:u,method:i.method,action:o},o,u))}}))}function ho(e){function t(A){return Wl(A,e)}Ba!==null&&Wl(Ba,e),Ka!==null&&Wl(Ka,e),qa!==null&&Wl(qa,e),ms.forEach(t),gs.forEach(t);for(var i=0;i<Ga.length;i++){var o=Ga[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ga.length&&(i=Ga[0],i.blockedOn===null);)ig(i),i.blockedOn===null&&Ga.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var u=i[o],d=i[o+1],g=u[Ut]||null;if(typeof d=="function")g||sg(i);else if(g){var b=null;if(d&&d.hasAttribute("formAction")){if(u=d,g=d[Ut]||null)b=g.formAction;else if(Gu(u)!==null)continue}else b=g.action;typeof b=="function"?i[o+1]=b:(i.splice(o,3),o-=3),sg(i)}}}function lg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(g){return u=g})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Fu(e){this._internalRoot=e}Xl.prototype.render=Fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,o=sn();Zm(i,o,e,t,null,null)},Xl.prototype.unmount=Fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zm(e.current,2,null,e,null,null),El(),t[Mi]=null}};function Xl(e){this._internalRoot=e}Xl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Do();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ga.length&&t!==0&&t<Ga[i].priority;i++);Ga.splice(i,0,e),i===0&&ig(e)}};var rg=a.version;if(rg!=="19.2.1")throw Error(l(527,rg,"19.2.1"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=y(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e};var U0={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zl.isDisabled&&Zl.supportsFiber)try{Qn=Zl.inject(U0),X=Zl}catch{}}return bs.createRoot=function(e,t){if(!c(e))throw Error(l(299));var i=!1,o="",u=mp,d=gp,g=yp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=$m(e,1,!1,null,null,i,o,null,u,d,g,lg),e[Mi]=t.current,Du(e),new Fu(t)},bs.hydrateRoot=function(e,t,i){if(!c(e))throw Error(l(299));var o=!1,u="",d=mp,g=gp,b=yp,A=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(A=i.formState)),t=$m(e,1,!0,t,i??null,o,u,A,d,g,b,lg),t.context=Xm(null),i=t.current,o=sn(),o=$n(o),u=Ma(o),u.callback=null,ja(i,u,o),i=o,t.current.lanes=i,wn(t,i),zn(t),e[Mi]=t.current,Du(e),new Xl(t)},bs.version="19.2.1",bs}var vg;function $C(){if(vg)return Vu.exports;vg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Vu.exports=WC(),Vu.exports}var XC=$C();const ZC="modulepreload",JC=function(n){return"/"+n},Sg={},ht=function(a,s,l){let c=Promise.resolve();if(s&&s.length>0){let m=function(y){return Promise.all(y.map(C=>Promise.resolve(C).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),p=h?.nonce||h?.getAttribute("nonce");c=m(s.map(y=>{if(y=JC(y),y in Sg)return;Sg[y]=!0;const C=y.endsWith(".css"),x=C?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${x}`))return;const v=document.createElement("link");if(v.rel=C?"stylesheet":ZC,C||(v.as="script"),v.crossOrigin="",v.href=y,p&&v.setAttribute("nonce",p),document.head.appendChild(v),C)return new Promise((N,w)=>{v.addEventListener("load",N),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${y}`)))})}))}function f(h){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=h,window.dispatchEvent(p),!p.defaultPrevented)throw h}return c.then(h=>{for(const p of h||[])p.status==="rejected"&&f(p.reason);return a().catch(f)})},ew=new NS({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1,retry:1},mutations:{retry:!1}}}),Ae=n=>typeof n=="string",vs=()=>{let n,a;const s=new Promise((l,c)=>{n=l,a=c});return s.resolve=n,s.reject=a,s},Cg=n=>n==null?"":""+n,tw=(n,a,s)=>{n.forEach(l=>{a[l]&&(s[l]=a[l])})},nw=/###/g,wg=n=>n&&n.indexOf("###")>-1?n.replace(nw,"."):n,Ng=n=>!n||Ae(n),Ds=(n,a,s)=>{const l=Ae(a)?a.split("."):a;let c=0;for(;c<l.length-1;){if(Ng(n))return{};const f=wg(l[c]);!n[f]&&s&&(n[f]=new s),Object.prototype.hasOwnProperty.call(n,f)?n=n[f]:n={},++c}return Ng(n)?{}:{obj:n,k:wg(l[c])}},Ag=(n,a,s)=>{const{obj:l,k:c}=Ds(n,a,Object);if(l!==void 0||a.length===1){l[c]=s;return}let f=a[a.length-1],h=a.slice(0,a.length-1),p=Ds(n,h,Object);for(;p.obj===void 0&&h.length;)f=`${h[h.length-1]}.${f}`,h=h.slice(0,h.length-1),p=Ds(n,h,Object),p?.obj&&typeof p.obj[`${p.k}.${f}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${f}`]=s},aw=(n,a,s,l)=>{const{obj:c,k:f}=Ds(n,a,Object);c[f]=c[f]||[],c[f].push(s)},cr=(n,a)=>{const{obj:s,k:l}=Ds(n,a);if(s&&Object.prototype.hasOwnProperty.call(s,l))return s[l]},iw=(n,a,s)=>{const l=cr(n,s);return l!==void 0?l:cr(a,s)},ex=(n,a,s)=>{for(const l in a)l!=="__proto__"&&l!=="constructor"&&(l in n?Ae(n[l])||n[l]instanceof String||Ae(a[l])||a[l]instanceof String?s&&(n[l]=a[l]):ex(n[l],a[l],s):n[l]=a[l]);return n},bi=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ow={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const sw=n=>Ae(n)?n.replace(/[&<>"'\/]/g,a=>ow[a]):n;class lw{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const s=this.regExpMap.get(a);if(s!==void 0)return s;const l=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,l),this.regExpQueue.push(a),l}}const rw=[" ",",","?","!",";"],cw=new lw(20),uw=(n,a,s)=>{a=a||"",s=s||"";const l=rw.filter(h=>a.indexOf(h)<0&&s.indexOf(h)<0);if(l.length===0)return!0;const c=cw.getRegExp(`(${l.map(h=>h==="?"?"\\?":h).join("|")})`);let f=!c.test(n);if(!f){const h=n.indexOf(s);h>0&&!c.test(n.substring(0,h))&&(f=!0)}return f},yd=(n,a,s=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const l=a.split(s);let c=n;for(let f=0;f<l.length;){if(!c||typeof c!="object")return;let h,p="";for(let m=f;m<l.length;++m)if(m!==f&&(p+=s),p+=l[m],h=c[p],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&m<l.length-1)continue;f+=m-f+1;break}c=h}return c},Ps=n=>n?.replace("_","-"),dw={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class ur{constructor(a,s={}){this.init(a,s)}init(a,s={}){this.prefix=s.prefix||"i18next:",this.logger=a||dw,this.options=s,this.debug=s.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,s,l,c){return c&&!this.debug?null:(Ae(a[0])&&(a[0]=`${l}${this.prefix} ${a[0]}`),this.logger[s](a))}create(a){return new ur(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new ur(this.logger,a)}}var Hn=new ur;class kr{constructor(){this.observers={}}on(a,s){return a.split(" ").forEach(l=>{this.observers[l]||(this.observers[l]=new Map);const c=this.observers[l].get(s)||0;this.observers[l].set(s,c+1)}),this}off(a,s){if(this.observers[a]){if(!s){delete this.observers[a];return}this.observers[a].delete(s)}}emit(a,...s){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([c,f])=>{for(let h=0;h<f;h++)c(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,f])=>{for(let h=0;h<f;h++)c.apply(c,[a,...s])})}}class kg extends kr{constructor(a,s={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const s=this.options.ns.indexOf(a);s>-1&&this.options.ns.splice(s,1)}getResource(a,s,l,c={}){const f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,h=c.ignoreJSONStructure!==void 0?c.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;a.indexOf(".")>-1?p=a.split("."):(p=[a,s],l&&(Array.isArray(l)?p.push(...l):Ae(l)&&f?p.push(...l.split(f)):p.push(l)));const m=cr(this.data,p);return!m&&!s&&!l&&a.indexOf(".")>-1&&(a=p[0],s=p[1],l=p.slice(2).join(".")),m||!h||!Ae(l)?m:yd(this.data?.[a]?.[s],l,f)}addResource(a,s,l,c,f={silent:!1}){const h=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let p=[a,s];l&&(p=p.concat(h?l.split(h):l)),a.indexOf(".")>-1&&(p=a.split("."),c=s,s=p[1]),this.addNamespaces(s),Ag(this.data,p,c),f.silent||this.emit("added",a,s,l,c)}addResources(a,s,l,c={silent:!1}){for(const f in l)(Ae(l[f])||Array.isArray(l[f]))&&this.addResource(a,s,f,l[f],{silent:!0});c.silent||this.emit("added",a,s,l)}addResourceBundle(a,s,l,c,f,h={silent:!1,skipCopy:!1}){let p=[a,s];a.indexOf(".")>-1&&(p=a.split("."),c=l,l=s,s=p[1]),this.addNamespaces(s);let m=cr(this.data,p)||{};h.skipCopy||(l=JSON.parse(JSON.stringify(l))),c?ex(m,l,f):m={...m,...l},Ag(this.data,p,m),h.silent||this.emit("added",a,s,l)}removeResourceBundle(a,s){this.hasResourceBundle(a,s)&&delete this.data[a][s],this.removeNamespaces(s),this.emit("removed",a,s)}hasResourceBundle(a,s){return this.getResource(a,s)!==void 0}getResourceBundle(a,s){return s||(s=this.options.defaultNS),this.getResource(a,s)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const s=this.getDataByLanguage(a);return!!(s&&Object.keys(s)||[]).find(c=>s[c]&&Object.keys(s[c]).length>0)}toJSON(){return this.data}}var tx={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,s,l,c){return n.forEach(f=>{a=this.processors[f]?.process(a,s,l,c)??a}),a}};const nx=Symbol("i18next/PATH_KEY");function fw(){const n=[],a=Object.create(null);let s;return a.get=(l,c)=>(s?.revoke?.(),c===nx?n:(n.push(c),s=Proxy.revocable(l,a),s.proxy)),Proxy.revocable(Object.create(null),a).proxy}function xd(n,a){const{[nx]:s}=n(fw());return s.join(a?.keySeparator??".")}const Dg={},$u=n=>!Ae(n)&&typeof n!="boolean"&&typeof n!="number";class dr extends kr{constructor(a,s={}){super(),tw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,s={interpolation:{}}){const l={...s};if(a==null)return!1;const c=this.resolve(a,l);if(c?.res===void 0)return!1;const f=$u(c.res);return!(l.returnObjects===!1&&f)}extractFromKey(a,s){let l=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let f=s.ns||this.options.defaultNS||[];const h=l&&a.indexOf(l)>-1,p=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!uw(a,l,c);if(h&&!p){const m=a.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:a,namespaces:Ae(f)?[f]:f};const y=a.split(l);(l!==c||l===c&&this.options.ns.indexOf(y[0])>-1)&&(f=y.shift()),a=y.join(c)}return{key:a,namespaces:Ae(f)?[f]:f}}translate(a,s,l){let c=typeof s=="object"?{...s}:s;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),a==null)return"";typeof a=="function"&&(a=xd(a,{...this.options,...c})),Array.isArray(a)||(a=[String(a)]);const f=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,h=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:p,namespaces:m}=this.extractFromKey(a[a.length-1],c),y=m[m.length-1];let C=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;C===void 0&&(C=":");const x=c.lng||this.language,v=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return v?f?{res:`${y}${C}${p}`,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(c)}:`${y}${C}${p}`:f?{res:p,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(c)}:p;const N=this.resolve(a,c);let w=N?.res;const T=N?.usedKey||p,O=N?.exactUsedKey||p,M=["[object Number]","[object Function]","[object RegExp]"],U=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,K=!this.i18nFormat||this.i18nFormat.handleAsObject,I=c.count!==void 0&&!Ae(c.count),E=dr.hasDefaultValue(c),k=I?this.pluralResolver.getSuffix(x,c.count,c):"",z=c.ordinal&&I?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",Q=I&&!c.ordinal&&c.count===0,W=Q&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${k}`]||c[`defaultValue${z}`]||c.defaultValue;let ee=w;K&&!w&&E&&(ee=W);const ne=$u(ee),J=Object.prototype.toString.apply(ee);if(K&&ee&&ne&&M.indexOf(J)<0&&!(Ae(U)&&Array.isArray(ee))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ge=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,ee,{...c,ns:m}):`key '${p} (${this.language})' returned an object instead of string.`;return f?(N.res=ge,N.usedParams=this.getUsedParamsDetails(c),N):ge}if(h){const ge=Array.isArray(ee),ue=ge?[]:{},Ce=ge?O:T;for(const P in ee)if(Object.prototype.hasOwnProperty.call(ee,P)){const V=`${Ce}${h}${P}`;E&&!w?ue[P]=this.translate(V,{...c,defaultValue:$u(W)?W[P]:void 0,joinArrays:!1,ns:m}):ue[P]=this.translate(V,{...c,joinArrays:!1,ns:m}),ue[P]===V&&(ue[P]=ee[P])}w=ue}}else if(K&&Ae(U)&&Array.isArray(w))w=w.join(U),w&&(w=this.extendTranslation(w,a,c,l));else{let ge=!1,ue=!1;!this.isValidLookup(w)&&E&&(ge=!0,w=W),this.isValidLookup(w)||(ue=!0,w=p);const P=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ue?void 0:w,V=E&&W!==w&&this.options.updateMissing;if(ue||ge||V){if(this.logger.log(V?"updateKey":"missingKey",x,y,p,V?W:w),h){const ie=this.resolve(p,{...c,keySeparator:!1});ie&&ie.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ae=[];const pe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&pe&&pe[0])for(let ie=0;ie<pe.length;ie++)ae.push(pe[ie]);else this.options.saveMissingTo==="all"?ae=this.languageUtils.toResolveHierarchy(c.lng||this.language):ae.push(c.lng||this.language);const xe=(ie,Z,G)=>{const $=E&&G!==w?G:P;this.options.missingKeyHandler?this.options.missingKeyHandler(ie,y,Z,$,V,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ie,y,Z,$,V,c),this.emit("missingKey",ie,y,Z,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?ae.forEach(ie=>{const Z=this.pluralResolver.getSuffixes(ie,c);Q&&c[`defaultValue${this.options.pluralSeparator}zero`]&&Z.indexOf(`${this.options.pluralSeparator}zero`)<0&&Z.push(`${this.options.pluralSeparator}zero`),Z.forEach(G=>{xe([ie],p+G,c[`defaultValue${G}`]||W)})}):xe(ae,p,W))}w=this.extendTranslation(w,a,c,N,l),ue&&w===p&&this.options.appendNamespaceToMissingKey&&(w=`${y}${C}${p}`),(ue||ge)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${y}${C}${p}`:p,ge?w:void 0,c))}return f?(N.res=w,N.usedParams=this.getUsedParamsDetails(c),N):w}extendTranslation(a,s,l,c,f){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const m=Ae(a)&&(l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(m){const x=a.match(this.interpolator.nestingRegexp);y=x&&x.length}let C=l.replace&&!Ae(l.replace)?l.replace:l;if(this.options.interpolation.defaultVariables&&(C={...this.options.interpolation.defaultVariables,...C}),a=this.interpolator.interpolate(a,C,l.lng||this.language||c.usedLng,l),m){const x=a.match(this.interpolator.nestingRegexp),v=x&&x.length;y<v&&(l.nest=!1)}!l.lng&&c&&c.res&&(l.lng=this.language||c.usedLng),l.nest!==!1&&(a=this.interpolator.nest(a,(...x)=>f?.[0]===x[0]&&!l.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${s[0]}`),null):this.translate(...x,s),l)),l.interpolation&&this.interpolator.reset()}const h=l.postProcess||this.options.postProcess,p=Ae(h)?[h]:h;return a!=null&&p?.length&&l.applyPostProcessor!==!1&&(a=tx.handle(p,a,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),a}resolve(a,s={}){let l,c,f,h,p;return Ae(a)&&(a=[a]),a.forEach(m=>{if(this.isValidLookup(l))return;const y=this.extractFromKey(m,s),C=y.key;c=C;let x=y.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const v=s.count!==void 0&&!Ae(s.count),N=v&&!s.ordinal&&s.count===0,w=s.context!==void 0&&(Ae(s.context)||typeof s.context=="number")&&s.context!=="",T=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);x.forEach(O=>{this.isValidLookup(l)||(p=O,!Dg[`${T[0]}-${O}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(Dg[`${T[0]}-${O}`]=!0,this.logger.warn(`key "${c}" for languages "${T.join(", ")}" won't get resolved as namespace "${p}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(M=>{if(this.isValidLookup(l))return;h=M;const U=[C];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(U,C,M,O,s);else{let I;v&&(I=this.pluralResolver.getSuffix(M,s.count,s));const E=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(s.ordinal&&I.indexOf(k)===0&&U.push(C+I.replace(k,this.options.pluralSeparator)),U.push(C+I),N&&U.push(C+E)),w){const z=`${C}${this.options.contextSeparator||"_"}${s.context}`;U.push(z),v&&(s.ordinal&&I.indexOf(k)===0&&U.push(z+I.replace(k,this.options.pluralSeparator)),U.push(z+I),N&&U.push(z+E))}}let K;for(;K=U.pop();)this.isValidLookup(l)||(f=K,l=this.getResource(M,O,K,s))}))})}),{res:l,usedKey:c,exactUsedKey:f,usedLng:h,usedNS:p}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,s,l,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,s,l,c):this.resourceStore.getResource(a,s,l,c)}getUsedParamsDetails(a={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=a.replace&&!Ae(a.replace);let c=l?a.replace:a;if(l&&typeof a.count<"u"&&(c.count=a.count),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!l){c={...c};for(const f of s)delete c[f]}return c}static hasDefaultValue(a){const s="defaultValue";for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)&&s===l.substring(0,s.length)&&a[l]!==void 0)return!0;return!1}}class Tg{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hn.create("languageUtils")}getScriptPartFromCode(a){if(a=Ps(a),!a||a.indexOf("-")<0)return null;const s=a.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(a){if(a=Ps(a),!a||a.indexOf("-")<0)return a;const s=a.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(a){if(Ae(a)&&a.indexOf("-")>-1){let s;try{s=Intl.getCanonicalLocales(a)[0]}catch{}return s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let s;return a.forEach(l=>{if(s)return;const c=this.formatLanguageCode(l);(!this.options.supportedLngs||this.isSupportedCode(c))&&(s=c)}),!s&&this.options.supportedLngs&&a.forEach(l=>{if(s)return;const c=this.getScriptPartFromCode(l);if(this.isSupportedCode(c))return s=c;const f=this.getLanguagePartFromCode(l);if(this.isSupportedCode(f))return s=f;s=this.options.supportedLngs.find(h=>{if(h===f)return h;if(!(h.indexOf("-")<0&&f.indexOf("-")<0)&&(h.indexOf("-")>0&&f.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===f||h.indexOf(f)===0&&f.length>1))return h})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(a,s){if(!a)return[];if(typeof a=="function"&&(a=a(s)),Ae(a)&&(a=[a]),Array.isArray(a))return a;if(!s)return a.default||[];let l=a[s];return l||(l=a[this.getScriptPartFromCode(s)]),l||(l=a[this.formatLanguageCode(s)]),l||(l=a[this.getLanguagePartFromCode(s)]),l||(l=a.default),l||[]}toResolveHierarchy(a,s){const l=this.getFallbackCodes((s===!1?[]:s)||this.options.fallbackLng||[],a),c=[],f=h=>{h&&(this.isSupportedCode(h)?c.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return Ae(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(a))):Ae(a)&&f(this.formatLanguageCode(a)),l.forEach(h=>{c.indexOf(h)<0&&f(this.formatLanguageCode(h))}),c}}const Mg={zero:0,one:1,two:2,few:3,many:4,other:5},jg={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class hw{constructor(a,s={}){this.languageUtils=a,this.options=s,this.logger=Hn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(a,s={}){const l=Ps(a==="dev"?"en":a),c=s.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:l,type:c});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let h;try{h=new Intl.PluralRules(l,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),jg;if(!a.match(/-|_/))return jg;const m=this.languageUtils.getLanguagePartFromCode(a);h=this.getRule(m,s)}return this.pluralRulesCache[f]=h,h}needsPlural(a,s={}){let l=this.getRule(a,s);return l||(l=this.getRule("dev",s)),l?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,s,l={}){return this.getSuffixes(a,l).map(c=>`${s}${c}`)}getSuffixes(a,s={}){let l=this.getRule(a,s);return l||(l=this.getRule("dev",s)),l?l.resolvedOptions().pluralCategories.sort((c,f)=>Mg[c]-Mg[f]).map(c=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${c}`):[]}getSuffix(a,s,l={}){const c=this.getRule(a,l);return c?`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${c.select(s)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",s,l))}}const Eg=(n,a,s,l=".",c=!0)=>{let f=iw(n,a,s);return!f&&c&&Ae(s)&&(f=yd(n,s,l),f===void 0&&(f=yd(a,s,l))),f},Xu=n=>n.replace(/\$/g,"$$$$");class Og{constructor(a={}){this.logger=Hn.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(s=>s),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:s,escapeValue:l,useRawValueToEscape:c,prefix:f,prefixEscaped:h,suffix:p,suffixEscaped:m,formatSeparator:y,unescapeSuffix:C,unescapePrefix:x,nestingPrefix:v,nestingPrefixEscaped:N,nestingSuffix:w,nestingSuffixEscaped:T,nestingOptionsSeparator:O,maxReplaces:M,alwaysFormat:U}=a.interpolation;this.escape=s!==void 0?s:sw,this.escapeValue=l!==void 0?l:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=f?bi(f):h||"{{",this.suffix=p?bi(p):m||"}}",this.formatSeparator=y||",",this.unescapePrefix=C?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":C||"",this.nestingPrefix=v?bi(v):N||bi("$t("),this.nestingSuffix=w?bi(w):T||bi(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=M||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(s,l)=>s?.source===l?(s.lastIndex=0,s):new RegExp(l,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(a,s,l,c){let f,h,p;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},y=N=>{if(N.indexOf(this.formatSeparator)<0){const M=Eg(s,m,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,l,{...c,...s,interpolationkey:N}):M}const w=N.split(this.formatSeparator),T=w.shift().trim(),O=w.join(this.formatSeparator).trim();return this.format(Eg(s,m,T,this.options.keySeparator,this.options.ignoreJSONStructure),O,l,{...c,...s,interpolationkey:T})};this.resetRegExp();const C=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>Xu(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?Xu(this.escape(N)):Xu(N)}].forEach(N=>{for(p=0;f=N.regex.exec(a);){const w=f[1].trim();if(h=y(w),h===void 0)if(typeof C=="function"){const O=C(a,f,c);h=Ae(O)?O:""}else if(c&&Object.prototype.hasOwnProperty.call(c,w))h="";else if(x){h=f[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${a}`),h="";else!Ae(h)&&!this.useRawValueToEscape&&(h=Cg(h));const T=N.safeValue(h);if(a=a.replace(f[0],T),x?(N.regex.lastIndex+=h.length,N.regex.lastIndex-=f[0].length):N.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),a}nest(a,s,l={}){let c,f,h;const p=(m,y)=>{const C=this.nestingOptionsSeparator;if(m.indexOf(C)<0)return m;const x=m.split(new RegExp(`${bi(C)}[ ]*{`));let v=`{${x[1]}`;m=x[0],v=this.interpolate(v,h);const N=v.match(/'/g),w=v.match(/"/g);((N?.length??0)%2===0&&!w||(w?.length??0)%2!==0)&&(v=v.replace(/'/g,'"'));try{h=JSON.parse(v),y&&(h={...y,...h})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,T),`${m}${C}${v}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,m};for(;c=this.nestingRegexp.exec(a);){let m=[];h={...l},h=h.replace&&!Ae(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;const y=/{.*}/.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(y!==-1&&(m=c[1].slice(y).split(this.formatSeparator).map(C=>C.trim()).filter(Boolean),c[1]=c[1].slice(0,y)),f=s(p.call(this,c[1].trim(),h),h),f&&c[0]===a&&!Ae(f))return f;Ae(f)||(f=Cg(f)),f||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${a}`),f=""),m.length&&(f=m.reduce((C,x)=>this.format(C,x,l.lng,{...l,interpolationkey:c[1].trim()}),f.trim())),a=a.replace(c[0],f),this.regexp.lastIndex=0}return a}}const pw=n=>{let a=n.toLowerCase().trim();const s={};if(n.indexOf("(")>-1){const l=n.split("(");a=l[0].toLowerCase().trim();const c=l[1].substring(0,l[1].length-1);a==="currency"&&c.indexOf(":")<0?s.currency||(s.currency=c.trim()):a==="relativetime"&&c.indexOf(":")<0?s.range||(s.range=c.trim()):c.split(";").forEach(h=>{if(h){const[p,...m]=h.split(":"),y=m.join(":").trim().replace(/^'+|'+$/g,""),C=p.trim();s[C]||(s[C]=y),y==="false"&&(s[C]=!1),y==="true"&&(s[C]=!0),isNaN(y)||(s[C]=parseInt(y,10))}})}return{formatName:a,formatOptions:s}},Pg=n=>{const a={};return(s,l,c)=>{let f=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(f={...f,[c.interpolationkey]:void 0});const h=l+JSON.stringify(f);let p=a[h];return p||(p=n(Ps(l),c),a[h]=p),p(s)}},mw=n=>(a,s,l)=>n(Ps(s),l)(a);class gw{constructor(a={}){this.logger=Hn.create("formatter"),this.options=a,this.init(a)}init(a,s={interpolation:{}}){this.formatSeparator=s.interpolation.formatSeparator||",";const l=s.cacheInBuiltFormats?Pg:mw;this.formats={number:l((c,f)=>{const h=new Intl.NumberFormat(c,{...f});return p=>h.format(p)}),currency:l((c,f)=>{const h=new Intl.NumberFormat(c,{...f,style:"currency"});return p=>h.format(p)}),datetime:l((c,f)=>{const h=new Intl.DateTimeFormat(c,{...f});return p=>h.format(p)}),relativetime:l((c,f)=>{const h=new Intl.RelativeTimeFormat(c,{...f});return p=>h.format(p,f.range||"day")}),list:l((c,f)=>{const h=new Intl.ListFormat(c,{...f});return p=>h.format(p)})}}add(a,s){this.formats[a.toLowerCase().trim()]=s}addCached(a,s){this.formats[a.toLowerCase().trim()]=Pg(s)}format(a,s,l,c={}){const f=s.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(p=>p.indexOf(")")>-1)){const p=f.findIndex(m=>m.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,p)].join(this.formatSeparator)}return f.reduce((p,m)=>{const{formatName:y,formatOptions:C}=pw(m);if(this.formats[y]){let x=p;try{const v=c?.formatParams?.[c.interpolationkey]||{},N=v.locale||v.lng||c.locale||c.lng||l;x=this.formats[y](p,N,{...C,...c,...v})}catch(v){this.logger.warn(v)}return x}else this.logger.warn(`there was no format function for ${y}`);return p},a)}}const yw=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class xw extends kr{constructor(a,s,l,c={}){super(),this.backend=a,this.store=s,this.services=l,this.languageUtils=l.languageUtils,this.options=c,this.logger=Hn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=c.maxParallelReads||10,this.readingCalls=0,this.maxRetries=c.maxRetries>=0?c.maxRetries:5,this.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(l,c.backend,c)}queueLoad(a,s,l,c){const f={},h={},p={},m={};return a.forEach(y=>{let C=!0;s.forEach(x=>{const v=`${y}|${x}`;!l.reload&&this.store.hasResourceBundle(y,x)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?h[v]===void 0&&(h[v]=!0):(this.state[v]=1,C=!1,h[v]===void 0&&(h[v]=!0),f[v]===void 0&&(f[v]=!0),m[x]===void 0&&(m[x]=!0)))}),C||(p[y]=!0)}),(Object.keys(f).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(f),pending:Object.keys(h),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(m)}}loaded(a,s,l){const c=a.split("|"),f=c[0],h=c[1];s&&this.emit("failedLoading",f,h,s),!s&&l&&this.store.addResourceBundle(f,h,l,void 0,void 0,{skipCopy:!0}),this.state[a]=s?-1:2,s&&l&&(this.state[a]=0);const p={};this.queue.forEach(m=>{aw(m.loaded,[f],h),yw(m,a),s&&m.errors.push(s),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(y=>{p[y]||(p[y]={});const C=m.loaded[y];C.length&&C.forEach(x=>{p[y][x]===void 0&&(p[y][x]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(m=>!m.done)}read(a,s,l,c=0,f=this.retryTimeout,h){if(!a.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:s,fcName:l,tried:c,wait:f,callback:h});return}this.readingCalls++;const p=(y,C)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(y&&C&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,a,s,l,c+1,f*2,h)},f);return}h(y,C)},m=this.backend[l].bind(this.backend);if(m.length===2){try{const y=m(a,s);y&&typeof y.then=="function"?y.then(C=>p(null,C)).catch(p):p(null,y)}catch(y){p(y)}return}return m(a,s,p)}prepareLoading(a,s,l={},c){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),c&&c();Ae(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Ae(s)&&(s=[s]);const f=this.queueLoad(a,s,l,c);if(!f.toLoad.length)return f.pending.length||c(),null;f.toLoad.forEach(h=>{this.loadOne(h)})}load(a,s,l){this.prepareLoading(a,s,{},l)}reload(a,s,l){this.prepareLoading(a,s,{reload:!0},l)}loadOne(a,s=""){const l=a.split("|"),c=l[0],f=l[1];this.read(c,f,"read",void 0,void 0,(h,p)=>{h&&this.logger.warn(`${s}loading namespace ${f} for language ${c} failed`,h),!h&&p&&this.logger.log(`${s}loaded namespace ${f} for language ${c}`,p),this.loaded(a,h,p)})}saveMissing(a,s,l,c,f,h={},p=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(s)){this.logger.warn(`did not save key "${l}" as the namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(l==null||l==="")){if(this.backend?.create){const m={...h,isUpdate:f},y=this.backend.create.bind(this.backend);if(y.length<6)try{let C;y.length===5?C=y(a,s,l,c,m):C=y(a,s,l,c),C&&typeof C.then=="function"?C.then(x=>p(null,x)).catch(p):p(null,C)}catch(C){p(C)}else y(a,s,l,c,p,m)}!a||!a[0]||this.store.addResource(a[0],s,l,c)}}}const Zu=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),Ae(n[1])&&(a.defaultValue=n[1]),Ae(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const s=n[3]||n[2];Object.keys(s).forEach(l=>{a[l]=s[l]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Rg=n=>(Ae(n.ns)&&(n.ns=[n.ns]),Ae(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Ae(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),Jl=()=>{},bw=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(s=>{typeof n[s]=="function"&&(n[s]=n[s].bind(n))})},ax="__i18next_supportNoticeShown",vw=()=>typeof globalThis<"u"&&!!globalThis[ax],Sw=()=>{typeof globalThis<"u"&&(globalThis[ax]=!0)},Cw=n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(a=>a?.name?.indexOf("Locize")>0||a?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(a=>a?.projectId));class Ts extends kr{constructor(a={},s){if(super(),this.options=Rg(a),this.services={},this.logger=Hn,this.modules={external:[]},bw(this),s&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,s),this;setTimeout(()=>{this.init(a,s)},0)}}init(a={},s){this.isInitializing=!0,typeof a=="function"&&(s=a,a={}),a.defaultNS==null&&a.ns&&(Ae(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const l=Zu();this.options={...l,...this.options,...Rg(a)},this.options.interpolation={...l.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Cw(this)&&!vw()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Sw());const c=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?Hn.init(c(this.modules.logger),this.options):Hn.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=gw;const C=new Tg(this.options);this.store=new kg(this.options.resources,this.options);const x=this.services;x.logger=Hn,x.resourceStore=this.store,x.languageUtils=C,x.pluralResolver=new hw(C,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),y&&(!this.options.interpolation.format||this.options.interpolation.format===l.interpolation.format)&&(x.formatter=c(y),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new Og(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new xw(c(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(N,...w)=>{this.emit(N,...w)}),this.modules.languageDetector&&(x.languageDetector=c(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=c(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new dr(this.services,this.options),this.translator.on("*",(N,...w)=>{this.emit(N,...w)}),this.modules.external.forEach(N=>{N.init&&N.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Jl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(y=>{this[y]=(...C)=>this.store[y](...C)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=(...C)=>(this.store[y](...C),this)});const p=vs(),m=()=>{const y=(C,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),p.resolve(x),s(C,x)};if(this.languages&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),p}loadResources(a,s=Jl){let l=s;const c=Ae(a)?a:this.language;if(typeof a=="function"&&(l=a),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const f=[],h=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(y=>{y!=="cimode"&&f.indexOf(y)<0&&f.push(y)})};c?h(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>h(m)),this.options.preload?.forEach?.(p=>h(p)),this.services.backendConnector.load(f,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(p)})}else l(null)}reloadResources(a,s,l){const c=vs();return typeof a=="function"&&(l=a,a=void 0),typeof s=="function"&&(l=s,s=void 0),a||(a=this.languages),s||(s=this.options.ns),l||(l=Jl),this.services.backendConnector.reload(a,s,f=>{c.resolve(),l(f)}),c}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&tx.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let s=0;s<this.languages.length;s++){const l=this.languages[s];if(!(["cimode","dev"].indexOf(l)>-1)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,s){this.isLanguageChangingTo=a;const l=vs();this.emit("languageChanging",a);const c=p=>{this.language=p,this.languages=this.services.languageUtils.toResolveHierarchy(p),this.resolvedLanguage=void 0,this.setResolvedLanguage(p)},f=(p,m)=>{m?this.isLanguageChangingTo===a&&(c(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,l.resolve((...y)=>this.t(...y)),s&&s(p,(...y)=>this.t(...y))},h=p=>{!a&&!p&&this.services.languageDetector&&(p=[]);const m=Ae(p)?p:p&&p[0],y=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(Ae(p)?[p]:p);y&&(this.language||c(y),this.translator.language||this.translator.changeLanguage(y),this.services.languageDetector?.cacheUserLanguage?.(y)),this.loadResources(y,C=>{f(C,y)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(a),l}getFixedT(a,s,l){const c=(f,h,...p)=>{let m;typeof h!="object"?m=this.options.overloadTranslationOptionHandler([f,h].concat(p)):m={...h},m.lng=m.lng||c.lng,m.lngs=m.lngs||c.lngs,m.ns=m.ns||c.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||l||c.keyPrefix);const y=this.options.keySeparator||".";let C;return m.keyPrefix&&Array.isArray(f)?C=f.map(x=>(typeof x=="function"&&(x=xd(x,{...this.options,...h})),`${m.keyPrefix}${y}${x}`)):(typeof f=="function"&&(f=xd(f,{...this.options,...h})),C=m.keyPrefix?`${m.keyPrefix}${y}${f}`:f),this.t(C,m)};return Ae(a)?c.lng=a:c.lngs=a,c.ns=s,c.keyPrefix=l,c}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,s={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=s.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const h=(p,m)=>{const y=this.services.backendConnector.state[`${p}|${m}`];return y===-1||y===0||y===2};if(s.precheck){const p=s.precheck(this,h);if(p!==void 0)return p}return!!(this.hasResourceBundle(l,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(l,a)&&(!c||h(f,a)))}loadNamespaces(a,s){const l=vs();return this.options.ns?(Ae(a)&&(a=[a]),a.forEach(c=>{this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}),this.loadResources(c=>{l.resolve(),s&&s(c)}),l):(s&&s(),Promise.resolve())}loadLanguages(a,s){const l=vs();Ae(a)&&(a=[a]);const c=this.options.preload||[],f=a.filter(h=>c.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return f.length?(this.options.preload=c.concat(f),this.loadResources(h=>{l.resolve(),s&&s(h)}),l):(s&&s(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const c=new Intl.Locale(a);if(c&&c.getTextInfo){const f=c.getTextInfo();if(f&&f.direction)return f.direction}}catch{}const s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=this.services?.languageUtils||new Tg(Zu());return a.toLowerCase().indexOf("-latn")>1?"ltr":s.indexOf(l.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},s){const l=new Ts(a,s);return l.createInstance=Ts.createInstance,l}cloneInstance(a={},s=Jl){const l=a.forkResourceStore;l&&delete a.forkResourceStore;const c={...this.options,...a,isClone:!0},f=new Ts(c);if((a.debug!==void 0||a.prefix!==void 0)&&(f.logger=f.logger.clone(a)),["store","services","language"].forEach(p=>{f[p]=this[p]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},l){const p=Object.keys(this.store.data).reduce((m,y)=>(m[y]={...this.store.data[y]},m[y]=Object.keys(m[y]).reduce((C,x)=>(C[x]={...m[y][x]},C),m[y]),m),{});f.store=new kg(p,c),f.services.resourceStore=f.store}if(a.interpolation){const m={...Zu().interpolation,...this.options.interpolation,...a.interpolation},y={...c,interpolation:m};f.services.interpolator=new Og(y)}return f.translator=new dr(f.services,c),f.translator.on("*",(p,...m)=>{f.emit(p,...m)}),f.init(c,s),f.translator.options=c,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const He=Ts.createInstance();He.createInstance;He.dir;He.init;He.loadResources;He.reloadResources;He.use;He.changeLanguage;He.getFixedT;He.t;He.exists;He.setDefaultNamespace;He.hasLoadedNamespace;He.loadNamespaces;He.loadLanguages;const ww=(n,a,s,l)=>{const c=[s,{code:a,...l||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(c,"warn","react-i18next::",!0);Ni(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},Lg={},ix=(n,a,s,l)=>{Ni(s)&&Lg[s]||(Ni(s)&&(Lg[s]=new Date),ww(n,a,s,l))},ox=(n,a)=>()=>{if(n.isInitialized)a();else{const s=()=>{setTimeout(()=>{n.off("initialized",s)},0),a()};n.on("initialized",s)}},bd=(n,a,s)=>{n.loadNamespaces(a,ox(n,s))},_g=(n,a,s,l)=>{if(Ni(s)&&(s=[s]),n.options.preload&&n.options.preload.indexOf(a)>-1)return bd(n,s,l);s.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(a,ox(n,l))},Nw=(n,a,s={})=>!a.languages||!a.languages.length?(ix(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:s.lng,precheck:(l,c)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!c(l.isLanguageChangingTo,n))return!1}}),Ni=n=>typeof n=="string",Aw=n=>typeof n=="object"&&n!==null,kw=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Dw={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Tw=n=>Dw[n],Mw=n=>n.replace(kw,Tw);let vd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Mw,transDefaultProps:void 0};const jw=(n={})=>{vd={...vd,...n}},Ew=()=>vd;let sx;const Ow=n=>{sx=n},Pw=()=>sx,Rw={type:"3rdParty",init(n){jw(n.options.react),Ow(n)}},Lw=S.createContext();class _w{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Ju={exports:{}},ed={};var zg;function zw(){if(zg)return ed;zg=1;var n=Md();function a(x,v){return x===v&&(x!==0||1/x===1/v)||x!==x&&v!==v}var s=typeof Object.is=="function"?Object.is:a,l=n.useState,c=n.useEffect,f=n.useLayoutEffect,h=n.useDebugValue;function p(x,v){var N=v(),w=l({inst:{value:N,getSnapshot:v}}),T=w[0].inst,O=w[1];return f(function(){T.value=N,T.getSnapshot=v,m(T)&&O({inst:T})},[x,N,v]),c(function(){return m(T)&&O({inst:T}),x(function(){m(T)&&O({inst:T})})},[x]),h(N),N}function m(x){var v=x.getSnapshot;x=x.value;try{var N=v();return!s(x,N)}catch{return!0}}function y(x,v){return v()}var C=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?y:p;return ed.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:C,ed}var Ig;function Iw(){return Ig||(Ig=1,Ju.exports=zw()),Ju.exports}var Uw=Iw();const Hw=(n,a)=>Ni(a)?a:Aw(a)&&Ni(a.defaultValue)?a.defaultValue:Array.isArray(n)?n[n.length-1]:n,Bw={t:Hw,ready:!1},Kw=()=>()=>{},Lt=(n,a={})=>{const{i18n:s}=a,{i18n:l,defaultNS:c}=S.useContext(Lw)||{},f=s||l||Pw();f&&!f.reportNamespaces&&(f.reportNamespaces=new _w),f||ix(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=S.useMemo(()=>({...Ew(),...f?.options?.react,...a}),[f,a]),{useSuspense:p,keyPrefix:m}=h,y=c||f?.options?.defaultNS,C=Ni(y)?[y]:y||["translation"],x=S.useMemo(()=>C,C);f?.reportNamespaces?.addUsedNamespaces?.(x);const v=S.useRef(0),N=S.useCallback(W=>{if(!f)return Kw;const{bindI18n:ee,bindI18nStore:ne}=h,J=()=>{v.current+=1,W()};return ee&&f.on(ee,J),ne&&f.store.on(ne,J),()=>{ee&&ee.split(" ").forEach(ge=>f.off(ge,J)),ne&&ne.split(" ").forEach(ge=>f.store.off(ge,J))}},[f,h]),w=S.useRef(),T=S.useCallback(()=>{if(!f)return Bw;const W=!!(f.isInitialized||f.initializedStoreOnce)&&x.every(Ce=>Nw(Ce,f,h)),ee=a.lng||f.language,ne=v.current,J=w.current;if(J&&J.ready===W&&J.lng===ee&&J.keyPrefix===m&&J.revision===ne)return J;const ue={t:f.getFixedT(ee,h.nsMode==="fallback"?x:x[0],m),ready:W,lng:ee,keyPrefix:m,revision:ne};return w.current=ue,ue},[f,x,m,h,a.lng]),[O,M]=S.useState(0),{t:U,ready:K}=Uw.useSyncExternalStore(N,T,T);S.useEffect(()=>{if(f&&!K&&!p){const W=()=>M(ee=>ee+1);a.lng?_g(f,a.lng,x,W):bd(f,x,W)}},[f,a.lng,x,K,p,O]);const I=f||{},E=S.useRef(null),k=S.useRef(),z=W=>{const ee=Object.getOwnPropertyDescriptors(W);ee.__original&&delete ee.__original;const ne=Object.create(Object.getPrototypeOf(W),ee);if(!Object.prototype.hasOwnProperty.call(ne,"__original"))try{Object.defineProperty(ne,"__original",{value:W,writable:!1,enumerable:!1,configurable:!1})}catch{}return ne},Q=S.useMemo(()=>{const W=I,ee=W?.language;let ne=W;W&&(E.current&&E.current.__original===W?k.current!==ee?(ne=z(W),E.current=ne,k.current=ee):ne=E.current:(ne=z(W),E.current=ne,k.current=ee));const J=[U,ne,K];return J.t=U,J.i18n=ne,J.ready=K,J},[U,I,K,I.resolvedLanguage,I.language,I.languages]);if(f&&p&&!K)throw new Promise(W=>{const ee=()=>W();a.lng?_g(f,a.lng,x,ee):bd(f,x,ee)});return Q},lx="ccs-ui-locale",qw=["en","zh-CN","vi","ja"];function Is(n){return n?n.toLowerCase().startsWith("ja")?"ja":n.toLowerCase().startsWith("zh")?"zh-CN":n.toLowerCase().startsWith("vi")?"vi":"en":"en"}function rx(){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(lx);return n?Is(n):null}catch{return null}}function Gw(){const n=rx();return n||(typeof navigator<"u"?Is(navigator.language):"en")}function Ld(n){const a=rx();return a||(typeof navigator<"u"?Is(navigator.language):"en")}function Yw(n){const a=Is(n);if(typeof window<"u")try{window.localStorage.setItem(lx,a)}catch{}return a}const Fw={en:{translation:{locale:{en:"English","zh-CN":"Simplified Chinese",vi:"Vietnamese",ja:"Japanese"},layout:{languageSwitcher:"Language"},nav:{general:"General",home:"Home",analytics:"Analytics",identityAccess:"Identity & Access",apiProfiles:"API Profiles",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"Overview",controlPanel:"Control Panel",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"Accounts",allAccounts:"All Accounts",sharedData:"Shared Data",compatibleClis:"Compatible",factoryDroid:"Factory Droid",system:"System",health:"Health",settings:"Settings",openrouterTooltip:"Featured: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"Profiles",cliproxy:"CLIProxy",accounts:"Accounts",health:"Health",configurationRequired:"Configuration Required"},auth:{dashboardTitle:"CCS Dashboard",loginDescription:"Enter your credentials to access the dashboard",username:"Username",password:"Password",usernamePlaceholder:"Enter username",passwordPlaceholder:"Enter password",signIn:"Sign In",signingIn:"Signing in...",loginFailed:"Login failed"},commonToast:{apiKeyRequired:"API key is required",accountAddedPresetFailed:"Account added, but failed to apply default preset",settingsCopied:"Settings copied to clipboard",enterPresetName:"Please enter a preset name to save",codeCopied:"Code copied to clipboard",copyCodeFailed:"Failed to copy code",appliedModelAllTiers:"Applied model to all tiers",settingsSaved:"Settings saved",defaultTargetUpdated:"Default target updated",failedUpdateDefaultTarget:"Failed to update default target to {{target}}{{suffix}}"},profileDialog:{editTitle:"Edit Profile",createTitle:"Create API Profile",name:"Name",namePlaceholder:"my-api",baseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com",apiKey:"API Key",defaultModel:"Default Model (ANTHROPIC_MODEL)",defaultModelHint:"Leave blank to use: {{model}}",modelMappingTitle:"Model Mapping (Opus/Sonnet/Haiku)",modelMappingDesc:"Configure different model IDs for each tier. Useful for API proxies that route different model types to different backends.",opusModel:"Opus Model (ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Sonnet Model (ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Haiku Model (ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"Cancel",saving:"Saving...",update:"Update",create:"Create"},modelTierMapping:{title:"Model Tier Mapping",advanced:"Advanced",description:"Configure different models for Claude Code's opus/sonnet/haiku tiers.",autoSuggest:"Auto-suggest based on {{provider}}",opusPlaceholder:"e.g., anthropic/claude-opus-4",sonnetPlaceholder:"e.g., anthropic/claude-sonnet-4",haikuPlaceholder:"e.g., anthropic/claude-3.5-haiku",footer:"These set ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL."},envEditor:{sensitive:"sensitive",none:"No environment variables configured.",noneHint:"Add variables using the input below or edit the JSON directly.",addVariable:"Add Environment Variable",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"value"},setupVariant:{using:"Using:",variantNameRequired:"Variant Name *",variantNamePlaceholder:"e.g., my-gemini, g3, flash",invokeHintPrefix:"Use this name to invoke:",model:"Model",modelPlaceholder:"e.g., gemini-2.5-pro, claude-opus-4-6-thinking",choosePresetInstead:"Choose from presets instead",selectModel:"Select a model",customModelName:"Custom model name...",enterAnyModel:"Enter any model name supported by CLIProxy",defaultModel:"Default: {{model}}",providerDefault:"provider default",back:"Back",skip:"Skip",creating:"Creating...",createVariant:"Create Variant",skipHint:"Skip if you just wanted to add an account without creating a variant"},customPresetDialog:{title:"Custom Preset",presetNameOptional:"Preset Name (optional)",presetNamePlaceholder:"e.g., My Custom Config",codexTipPrefix:"Codex tip: suffixes",codexTipSuffix:"pin effort. Unsuffixed models use Thinking settings.",defaultModel:"Default Model",defaultModelDesc:"Used when no specific tier is requested",opusModel:"Opus (Most capable)",opusModelDesc:"For complex reasoning tasks",sonnetModel:"Sonnet (Balanced)",sonnetModelDesc:"Balance of speed and capability",haikuModel:"Haiku (Fast)",haikuModelDesc:"Quick responses for simple tasks",cancel:"Cancel",savePreset:"Save Preset",applyPreset:"Apply Preset"},componentModelSelector:{selectModel:"Select model",availableModelsCount:"Available Models ({{count}})",preview:"Preview"},searchableSelect:{searchModels:"Search models...",noResults:"No results found."},copilotSettings:{enableCopilot:"Enable Copilot",enableCopilotDesc:"Allow using GitHub Copilot subscription",basicSettings:"Basic Settings",accountType:"Account Type",accountTypeIndividual:"Individual",accountTypeBusiness:"Business",accountTypeEnterprise:"Enterprise",rateLimiting:"Rate Limiting",rateLimitSeconds:"Rate Limit (seconds)",noLimit:"No limit",waitOnRateLimit:"Wait on Rate Limit",waitOnRateLimitDesc:"Wait instead of error when limit hit",daemonSettings:"Daemon Settings",autoStartDaemon:"Auto-start Daemon",autoStartDaemonDesc:"Start copilot-api when using profile"},providerModelSelector:{selectModel:"Select model",noModelsForProvider:"No models available for this provider",broken:"BROKEN",deprecated:"DEPRECATED",paid:"PAID",freeTier:"Free Tier",paidTier:"Paid Tier",modelKnownIssues:"This model has known issues",viewIssueDetails:"View issue details",modelDeprecated:"This model is deprecated",recommended:"Recommended",allModelsCount:"All Models ({{count}})",noModelsAvailable:"No models available"},createAuthProfileDialog:{title:"Create New Account",description:"Auth profiles require Claude CLI login. Run the command below in your terminal. You can edit sync mode, group, and continuity depth later from the Accounts table.",profileName:"Profile Name",profileNamePlaceholder:"e.g., work, personal, client",invalidProfileName:"Name must start with a letter and contain only letters, numbers, dashes, or underscores.",enableSharedHistory:"Enable shared history sync with other ccs auth accounts",historySyncGroupOptional:"History Sync Group (optional)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"Leave empty to use the default shared group. Spaces are normalized to dashes.",deeperContinuity:"Advanced: deeper continuity mode",deeperContinuityHint:"Adds sync for session-env, file-history, shell-snapshots, and todos. Credentials stay isolated.",invalidContextGroup:"Group must start with a letter and use only letters, numbers, dashes, or underscores (max {{max}} chars).",command:"Command",commandFallback:"ccs auth create <name>",afterRunPrefix:"After running the command:",afterRunStep1:"Complete the Claude login in your browser",afterRunStep2:"Return here and refresh to see the new account",poolingHint:"Prefer pooled Claude OAuth routing instead? Use CLIProxy Claude pool from the Accounts page action button.",close:"Close",copied:"Copied!",copyCommand:"Copy Command"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"Other"},cliproxyOverviewComponents:{availableModels:"Available Models",noModelsAvailable:"No models available",startSessionHint:"Start a CLIProxy session to fetch available models",totalCount:"{{count}} total",availableThroughGroupedByProvider:"Models available through {{backendLabel}}, grouped by provider",moreCount:"+{{count}} more"},categorizedModelSelector:{selectModel:"Select a model",noModelsAvailable:"No models available",modelPlaceholder:"Model..."},openrouterQuickStart:{recommended:"Recommended",title:"Start with OpenRouter",description:"Access {{modelCountLabel}} models from OpenAI, Anthropic, Google, Meta and more - all through one API.",featureOneApi:"One API, all providers",featureTierMapping:"Model tier mapping",createOpenRouterProfile:"Create OpenRouter Profile",getApiKeyAt:"Get your API key at",or:"or",createCustomProfile:"Create Custom API Profile"},alibabaCodingPlanQuickStart:{recommended:"Recommended",title:"Try Alibaba Coding Plan",description:"Use Alibaba Cloud Coding Plan through an Anthropic-compatible endpoint for coding workloads.",featureEndpoint:"Anthropic-compatible endpoint",featureKeyFormat:"Dedicated sk-sp API keys",createAlibabaProfile:"Create Alibaba Coding Plan Profile",readGuideAt:"Read setup guide at"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Model Studio Coding Plan via Anthropic endpoint",add:"Add"},credentialHealth:{title:"Credential Health",ready:"Ready",noCredentialsConfigured:"No credentials configured. Use the login buttons above to authenticate.",neverUsed:"Never used",justNow:"Just now",unknown:"Unknown",daysAgo:"{{count}}d ago",hoursAgo:"{{count}}h ago",minutesAgo:"{{count}}m ago"},proxyStatusWidget:{justNow:"just now",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",syncReady:"Sync Ready",noConfig:"No Config",remoteProxy:"Remote Proxy",active:"Active",trafficAutoRouted:"Traffic auto-routed to remote server",tooltipSync:"Sync profiles to CLIProxy",tooltipRestart:"Restart",tooltipStop:"Stop",tooltipClose:"Close",tooltipVersionSettings:"Version settings",versionManagement:"Version Management",selectVersionPlaceholder:"Select version to install...",stable:"(stable)",install:"Install",versionsAboveUnstable:"Versions above {{version}} have known issues",versionsKnownIssues:"Version {{version}} has known issues",lastChecked:"Last checked {{time}}",notRunning:"Not running",start:"Start",port:"Port {{port}}",sessionCount:"{{count}} session",sessionCount_other:"{{count}} sessions",installFaultyTitle:"Install Version With Known Issues?",installFaultyDesc:"You are about to install <strong>v{{version}}</strong>, which falls inside the known faulty range <strong>{{range}}</strong>.",installFaultyWarning:"This version has known bugs and may fail or leave the proxy in a bad state.",installUnstableTitle:"Install Unstable Version?",installUnstableDesc:"You are about to install <strong>v{{version}}</strong>, which is above the maximum stable version <strong>v{{maxStable}}</strong>.",installUnstableWarning:"This version has known stability issues and may cause unexpected behavior.",installUnstableConfirm:"Are you sure you want to proceed?",cancel:"Cancel",installAnyway:"Install Anyway",clickToDowngrade:"Click to downgrade",clickToUpdate:"Click to update"},syncStatusCard:{profileSync:"Profile Sync",ready:"Ready",noConfig:"No Config",syncsProfilesDesc:"Syncs API profiles to local CLIProxy config",runDoctorHint:"Run <code>ccs doctor --fix</code> to generate config.",details:"Details",syncNow:"Sync Now"},syncDialog:{title:"Sync Profiles to Local CLIProxy",description:"Sync your CCS API profiles to the local CLIProxy config.yaml.",noProfiles:"No profiles configured to sync.",createProfilesFirst:"Create API profiles first using the Profiles tab.",modelLabel:"Model:",ready:"Ready",profilesToSync_one:"{{count}} profile to sync",profilesToSync_other:"{{count}} profiles to sync",cancel:"Cancel",syncing:"Syncing...",synced:"Synced!",syncNow:"Sync Now"},errorLogs:{title:"Error Logs",failedRequests_one:"{{count}} failed request",failedRequests_other:"{{count}} failed requests",cliproxyDiagnostics:"CLIProxy Diagnostics",showingCount:"Showing 50 of {{total}} logs",selectLog:"Select a log to view details",failedLoadContent:"Failed to load log content",copyAbsolutePath:"Copy absolute path",copyRawContent:"Copy raw log content",tabOverview:"Overview",tabHeaders:"Headers",tabRequest:"Request",tabResponse:"Response",tabRaw:"Raw",modelLabel:"Model:",quotaResetsIn:"Quota resets in ",method:"Method",provider:"Provider",version:"Version",endpoint:"Endpoint",url:"URL",timestamp:"Timestamp",na:"N/A",noHeaders:"No headers available",noRequestBody:"No request body",noResponseBody:"No response body",rateLimitedMsg:"Rate Limited. Switch to a different account or wait for quota reset. Model {{model}} has exhausted quota.",rateLimitedMsgNoModel:"Rate Limited. Switch to a different account or wait for quota reset.",authFailedMsg:"Authentication failed. Re-authenticate via CLIProxy Settings or check API key.",notFoundMsg:"Endpoint not found. This endpoint may not exist on this provider.",serverErrorMsg:"Server error from upstream. Retry later or check provider status page.",timeoutMsg:"Request timed out. Check network connection or increase timeout settings.",unknown:"unknown"},editAccountContext:{title:"Edit History Sync",description:'Configure how "{{name}}" shares history and continuity with other ccs auth accounts.',syncMode:"Sync Mode",selectContextMode:"Select context mode",isolatedOption:"isolated (no sync)",sharedOption:"shared (sync enabled)",sharedModeHint:"Shared mode reuses workspace context for accounts in the same history sync group.",isolatedModeHint:"Isolated mode keeps this account fully separate from other ccs auth accounts.",historySyncGroup:"History Sync Group",groupPlaceholder:"default",groupHint:"Normalized to lowercase (spaces become dashes). Allowed: letters, numbers, _ , - (max {{max}} chars).",invalidGroup:"Enter a valid group name that starts with a letter.",continuityDepth:"Continuity Depth",selectContinuityDepth:"Select continuity depth",standardOption:"standard (projects only)",deeperOption:"deeper continuity (advanced)",deeperHint:"Advanced mode also syncs session-env, file-history, shell-snapshots, and todos.",standardHint:"Standard mode syncs project workspace context only.",credentialsIsolated:"Credentials and .anthropic remain isolated per account in all modes.",cancel:"Cancel",save:"Save",saving:"Saving..."},historySyncLearningMap:{title:"How History Sync Works",description:"Isolated -> Shared -> Deeper. Use Sync per row for all changes.",learningMap:"Learning Map",isolated:"Isolated",shared:"Shared",deeper:"Deeper",cliproxyManaged_one:"{{count}} CLIProxy Claude pool account is managed in Action Center / CLIProxy page.",cliproxyManaged_other:"{{count}} CLIProxy Claude pool accounts are managed in Action Center / CLIProxy page.",showDetails:"Show details: groups, switching, and legacy policy",modeSwitch:"Mode Switch",modeSwitchDesc:"Sync dialog lets users move between isolated/shared and choose deeper continuity.",historySyncGroup:"History Sync Group",historySyncGroupDesc:"Same group means shared project context lane. Default fallback is default.",legacyConfirmation_one:"{{count}} legacy account still needs explicit confirmation.",legacyConfirmation_other:"{{count}} legacy accounts still need explicit confirmation."},accountsTable:{name:"Name",type:"Type",defaultBadge:"default",created:"Created",lastUsed:"Last Used",historySync:"History Sync",actions:"Actions",syncTitle:"Edit sync mode, group, and continuity depth",confirmLegacyTitle:"Confirm this legacy account's current mode as explicit",sync:"Sync",confirm:"Confirm",active:"Active",setDefault:"Set Default",deleteAccount:"Delete account",cannotDeleteDefault:"Cannot delete default account",noAccounts:"No CCS auth accounts found. Use ccs auth create to add accounts.",resetToDefault:"Reset to CCS Default",deleteDialogTitle:"Delete Account",deleteDialogDesc:'Are you sure you want to delete the account "{{name}}"? This will remove the profile and all its session data. This action cannot be undone.',cancel:"Cancel",delete:"Delete",sharedGroupStandard:"shared ({{group}}, standard)",sharedGroupDeeper:"shared ({{group}}, deeper)",sharedGroupLegacy:"shared ({{group}}, standard legacy)",isolatedLegacy:"isolated (legacy default)",isolated:"isolated"},addAccountDialog:{title:"Add {{displayName}} Account",descKiro:"Choose a Kiro auth method, then authenticate via browser or import from Kiro IDE.",descDeviceCode:"Click Authenticate. A verification code will appear for you to enter on the provider website.",descOauth:"Click Authenticate to get an OAuth URL. Open it in any browser to sign in.",powerUserEnabled:"Power user mode enabled",powerUserSkipped:"AGY responsibility checklist is skipped from Settings > Proxy. You accept full responsibility for OAuth/account risk.",authMethod:"Auth Method",selectKiroAuthMethod:"Select Kiro auth method",nicknameRequired:"Nickname (required)",nicknameOptional:"Nickname (optional)",nicknamePlaceholder:"e.g., work, personal",nicknameRequiredHint:"Required for this provider. Use a unique friendly name (e.g., work, personal).",nicknameOptionalHint:"A friendly name to identify this account. Auto-generated from email if left empty.",waitingForAuth:"Waiting for authentication...",deviceCodeHint:"A verification code dialog will appear shortly. Enter the code on the provider website.",browserHint:"Complete the authentication in your browser. This dialog closes automatically.",openUrlLabel:"Open this URL in any browser to sign in:",copied:"Copied",copy:"Copy",open:"Open",popupBlocked:"Popup blocked. Copy the URL above and open it manually in your browser.",redirectPasteLabel:"Redirect didn't work? Paste the callback URL:",callbackPlaceholder:"Paste the redirect URL here...",submitCallback:"Submit Callback",submitting:"Submitting...",preparingUrl:"Preparing sign-in URL...",cancel:"Cancel",importingToken:"Importing token from Kiro IDE...",authenticate:"Authenticate",importFromIde:"Import from IDE",importing:"Importing..."},flowViz:{backToProviders:"Back to providers",showDetails:"Show Details",hideDetails:"Hide Details",resetLayout:"Reset layout",provider:"Provider",totalRequests:"Total Requests",accounts:"Accounts",connectionTimeline:"Connection Timeline",noRecentConnections:"No recent connections"},quickStats:{totalRequests:"Total Requests",successRate:"Success Rate",totalTokens:"Total Tokens",activeModels:"Active Models"},authMonitor:{accounts:"Accounts",accountsCount:"{{count}} accounts",success:"Success",failed:"Failed",successRate:"Success Rate"},accountCard:{resumeAccount:"Resume account",pauseAccount:"Pause account",quotaLoading:"Quota...",quota:"Quota",quotaUnavailable:"Quota limits unavailable",reauthNeeded:"Reauth needed",failureLabelReauth:"Reauth",failureLabelWorkspace:"Workspace",failureLabelNoAccess:"No Access",failureLabelRetry:"Retry",failureLabelReconnect:"Reconnect",failureLabelTemporary:"Temporary",failureLabelUnavailable:"Unavailable",failureHintReauth:"Refresh this account by running its auth flow again.",failureHintWorkspace:"Move this account back to an active workspace, then remove and re-add it.",failureHintNoAccess:"This account cannot access the provider quota endpoint.",failureHintRetry:"Wait a bit, then retry the quota request.",failureHintReconnect:"Remove the stale account and authenticate it again.",failureHintTemporary:"Retry later. This looks temporary.",removeAndReadd:"Remove and re-add account",autoRefreshFailed:"Auto-refresh failed"},antigravityChecklist:{title:"Antigravity OAuth Responsibility",subtitle:"Complete all 4 steps before you can authenticate.",mandatory:"Mandatory",completion:"Completion",stepsCount:"{{current}}/4 steps"},accountSafetyWarning:{title:"OAuth Account Safety Warning",subtitle:"Issue #509 · Gemini + AGY OAuth risk",firstLine:"Issue #509 documents suspension/ban reports tied to ccs agy and shared-account usage between ccs gemini and ccs agy.",secondLine:"Continue only if you accept full responsibility for OAuth and account-access risk.",issueLabel:"Read issue #509",proxySettingsLabel:"Gemini + AGY controls: Settings > Proxy"},cliproxyDialog:{name:"Name",provider:"Provider",account:"Account",accountOptional:"Account (optional)",model:"Model",modelOptional:"Model (optional)",defaultTarget:"Default Target",defaultTier:"Default Tier",tierConfig:"Tier Configuration",selectProvider:"Select provider...",useDefaultAccount:"Use default account",defaultSuffix:"(default)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"Cancel",create:"Create",creating:"Creating...",saveChanges:"Save Changes",saving:"Saving...",placeholderName:"my-gemini",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"Edit Composite Variant: {{name}}",editSingleTitle:"Edit Single Variant: {{name}}"},profileEditor:{profileInfo:"Profile Information",profileName:"Profile Name",filePath:"File Path",lastModified:"Last Modified",defaultTarget:"Default Target",quickUsage:"Quick Usage",runWithProfile:"Run with profile",runOnDroid:"Run on Droid",droidAliasExplicit:"Droid alias (explicit)",overrideToClaude:"Override to Claude",overrideToClaudeExplicit:"Override to Claude (explicit)",setAsDefault:"Set as default",provider:"Provider",custom:"Custom",providerChooserHint:"Start with a preset, then adjust the URL, API key, or model mapping as needed.",featuredProviders:"Featured Providers",scrollHint:"Scroll if your screen is narrow",customEndpoint:"Custom Endpoint",morePresets:"More Presets",customEndpointDescription:"Start from a blank Anthropic-compatible URL and configure everything manually."},settings:{sectionLoadFailed:"Failed to load section",unknownError:"Unknown error occurred",reloadPage:"Reload page",refresh:"Refresh",copy:"Copy",copied:"Copied",saved:"Saved",loading:"Loading...",configFileNotFound:"Config file not found"},settingsTabs:{web:"Web",env:"Env",think:"Think",proxy:"Proxy",auth:"Auth",backup:"Backup"},settingsAuth:{failedFetchTokens:"Failed to fetch auth tokens",failedSaveTokens:"Failed to save tokens",tokensUpdated:"Tokens updated. Restart CLIProxy to apply.",failedRegenerate:"Failed to regenerate secret",secretRegenerated:"New management secret generated. Restart CLIProxy to apply.",failedReset:"Failed to reset tokens",tokensReset:"Tokens reset to defaults. Restart CLIProxy to apply.",description:"Configure CLIProxy authentication tokens. Changes require CLIProxy restart.",apiKey:"API Key",custom:"Custom",apiKeyDesc:"Used by Claude Code to authenticate with CLIProxy",apiKeyPlaceholder:"API key",managementSecret:"Management Secret",managementSecretDesc:"Used by CCS dashboard to access CLIProxy management APIs",managementSecretPlaceholder:"Management secret",generateSecret:"Generate new secure secret",resetDefaults:"Reset to Defaults",resetDesc:"Resets both API key and management secret to their default values.",saving:"Saving...",save:"Save"},settingsGlobalEnv:{description:"Environment variables injected into all non-Claude subscription profiles (gemini, codex, agy, ghcp, etc.)",enabled:"Global Env enabled",disabled:"Global Env disabled",enabledDesc:"Env vars will be injected into third-party profiles",disabledDesc:"Env vars will not be injected",envVars:"Environment Variables",noneConfigured:"No environment variables configured",addNew:"Add New Variable",keyName:"KEY_NAME",value:"value",add:"Add",quickAdd:"Quick Add Common Variables",allConfigured:"All common variables are configured"},settingsBackups:{failedFetch:"Failed to fetch backups",failedRestore:"Failed to restore backup",restoreSuccess:"Backup restored successfully",title:"Settings Backups",description:"Restore previous versions of your settings.json file. Backups are created automatically when settings are modified.",none:"No backups available",noneHint:"Backups will appear here when you modify settings",latest:"Latest",restoring:"Restoring...",restore:"Restore",restoreConfirmTitle:"Restore Backup?",restoreConfirmPrefix:"This will replace your current settings with backup from",restoreConfirmSuffix:"This action cannot be undone.",cancel:"Cancel"},settingsWebsearch:{description:"CLI-based web search for third-party profiles (gemini, codex, agy, etc.)",enabled:"WebSearch enabled",disabled:"WebSearch disabled",checking:"Checking status...",providers:"Providers",noneConfigured:"No providers configured",noneConfiguredHint:"Install CLI tools to enable web search providers",checkProviders:"Check for providers",installed:"installed",notInstalled:"not installed",model:"Model:",howInstall:"How to install {{name}} CLI",installGlobally:"Install globally",requiresKey:"(requires xAI API key)",freeTier:"(FREE tier available)",viewDocs:"View documentation"},settingsProxy:{failedLoadAgyMode:"Failed to load AGY power user mode",failedUpdateAgyMode:"Failed to update AGY power user mode",failedVerifyAgyMode:"Failed to verify AGY power user mode persistence",notPersistedAgyMode:"AGY power user mode was not persisted. Config may have been modified by another process.",agyModeEnabled:"AGY power user mode enabled.",agyModeDisabled:"AGY power user mode disabled.",typePhraseToContinue:'Type "{{value}}" to continue.',description:"Configure local or remote {{backend}} connection for proxy-based profiles",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"Instance Status",connectionMode:"Connection Mode",local:"Local",remote:"Remote",localDesc:"Run {{backend}} binary on this machine",remoteDesc:"Connect to a remote {{backend}} server",backendBinary:"Backend Binary",stopProxyToSwitch:"Stop the running proxy in Instance Status to switch backend.",default:"Default",plusDesc:"Full provider support including Kiro and GitHub Copilot",originalDesc:"Original binary (Gemini, Codex, Antigravity only)",variantsIncompatible:"Existing Kiro/Copilot variants will not work with CLIProxyAPI. Switch to CLIProxyAPIPlus or remove those variants.",safety:"Safety",agyModeTitle:"Antigravity Power User Mode",agyModeDesc:"Skip AGY responsibility checklist in Add Account and `ccs agy` flows.",agyWarning:"Use only if you fully understand the OAuth suspension/ban risk pattern (#509). CCS cannot assume responsibility for account loss.",finalConfirm:"Final confirmation required",finalConfirmDesc:"Enabling this will skip AGY safety checkpoints in both dashboard and CLI. Review issue #509 and type the exact phrase to proceed.",step1:"Step 1",readIssue:"Read issue #509",step2:"Step 2",typePrefix:"Type",typeSuffix:"to enable.",typePhraseAria:"Type I ACCEPT RISK to enable Antigravity power user mode",exactPhrase:"Exact phrase required.",enableAgyMode:"Enable Power User Mode",toggleAgyMode:"Toggle AGY power user mode",fallbackSettings:"Fallback Settings",enableFallback:"Enable fallback to local",enableFallbackDesc:"Use local proxy if remote is unreachable",autoStartLocal:"Auto-start local proxy",autoStartLocalDesc:"Automatically start local proxy on fallback",advanced:"Advanced",debugMode:"Debug Mode",debugModeDesc:"Enable developer diagnostics in browser console",debugModeEnabled:"Debug mode enabled. Check browser console for detailed logs.",localProxy:"Local Proxy",port:"Port",autoStart:"Auto-start",localAutoStartDesc:"Start local proxy automatically when needed",remoteConfigTitle:"Remote Server Configuration",host:"Host",hostPlaceholder:"192.168.1.100 or proxy.example.com",defaultPort:"default: {{value}}",portPlaceholder:"Leave empty for {{value}}",protocol:"Protocol",http:"HTTP",https:"HTTPS",apiKeyOptional:"API Key (optional)",apiKeyPlaceholder:"For /v1/* API endpoints",apiKeyDesc:"Used for API requests to /v1/chat/completions",managementKeyOptional:"Management Key (optional)",managementKeyPlaceholder:"For /v0/management/* endpoints",managementKeyDesc:"Used for dashboard management APIs. Falls back to API Key if not set.",testing:"Testing...",testConnection:"Test Connection",connectedLatency:"Connected ({{value}}ms)",connectionFailed:"Connection failed",invalidPortOrEmpty:"Port must be an integer between 1 and 65535, or empty for default",invalidLocalPort:"Local port must be an integer between 1 and 65535",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"Configure extended thinking/reasoning for supported models.",supportedProviders:"Supported Providers",modeTitle:"Thinking Mode",modeAutoDesc:"Automatically set thinking based on model tier",modeOffDesc:"Disable extended thinking",modeManualDesc:"Set a persistent override level or use CLI flags per run",tierDefaults:"Tier Defaults",tierDefaultsDesc:"Default thinking level for each model tier when in auto mode.",persistentOverride:"Persistent Override",persistentOverrideDesc:"Applied to all sessions. CLI flags still take priority.",enterCustomBudget:"Enter custom budget",apply:"Apply",providerOverrides:"Provider Overrides ({{count}})",providerOverridesDesc:"Override tier defaults for specific providers. Add custom provider keys as needed.",addProviderPlaceholder:"Add provider key (e.g. qwen)",showWarnings:"Show Warnings",showWarningsDesc:"Display warnings when thinking values are clamped or adjusted",cliEnvOverride:"CLI & Env Override",supportLine1Prefix:"Thinking budget:",supportLine1Suffix:"(token-based)",supportLine2Prefix:"Reasoning effort:",supportLine2SuffixPrefix:"(suffix or ",supportLine2SuffixPostfix:": medium/high/xhigh)",supportLine3Prefix:"Codex suffixes pin effort (for example ",supportLine3Suffix:"); unsuffixed models use Thinking mode."},analytics:{title:"Analytics",subtitle:"Track usage and insights",month:"Month",allTime:"All Time",updated:"Updated {{value}}"},analyticsSummary:{totalTokens:"Total Tokens",totalTokensSubtitle:"{{input}} in / {{output}} out",totalCost:"Total Cost",totalCostSubtitle:"${{value}}/day avg",cacheTokens:"Cache Tokens",cacheTokensSubtitle:"${{cost}} ({{percent}}% of cost)",inputCost:"Input Cost",outputCost:"Output Cost",tokensSubtitle:"{{value}} tokens"},apiProfiles:{title:"API Profiles",new:"New",searchPlaceholder:"Search profiles...",loadingProfiles:"Loading profiles...",failedLoadTitle:"Failed to load profiles",failedLoadDesc:"Unable to fetch API profiles. Please try again.",retry:"Retry",noProfilesYet:"No API profiles yet",noProfilesDesc:"Create your first profile to connect to custom API endpoints",createProfile:"Create Profile",noProfileMatch:'No profiles match "{{query}}"',profileCount:"{{count}} profile",profileCount_other:"{{count}} profiles",configuredCount:"{{count}} configured",deleteProfileTitle:"Delete Profile",deleteProfileDesc:'Are you sure you want to delete "{{name}}"? This will remove the settings file and cannot be undone.',delete:"Delete",unsavedChangesTitle:"Unsaved Changes",unsavedChangesDesc:'You have unsaved changes in "{{current}}". Discard and switch to "{{next}}"?',discardSwitch:"Discard and Switch"},accountsPage:{title:"Accounts",managePrefix:"Manage",manageSuffix:"accounts and pool onboarding from one panel.",mobileManageSuffix:"continuity per account.",primaryActions:"Primary Actions",createAccount:"Create Account",authClaudeInPool:"Authenticate Claude in Pool",openClaudePoolSettings:"Open Claude Pool Settings",openCliProxyClaudePool:"Open CLIProxy Claude Pool",migrationFollowup:"Migration Follow-up",legacyContextPending:"{{count}} account still needs first-time mode confirmation.",legacyContextPending_other:"{{count}} accounts still need first-time mode confirmation.",legacyContinuityPending:"{{count}} shared account remains on standard legacy continuity depth.",legacyContinuityPending_other:"{{count}} shared accounts remain on standard legacy continuity depth.",confirmingLegacy:"Confirming Legacy Policies...",confirmLegacy:"Confirm Legacy Policies ({{count}})",noLegacyFollowup:"No legacy follow-up pending.",continuityGuide:"Continuity Guide",expandWhenNeeded:"Expand only when needed.",sharedStandard:"Shared Standard",sharedStandardDesc:"Project workspace sync only. Best default for most teams.",sharedDeeper:"Shared Deeper",sharedDeeperPrefix:"Adds",isolated:"Isolated",isolatedDesc:"No link. Best for strict separation.",quickCommands:"Quick Commands",quickCommandsDesc:"Copy and run in terminal.",workspaceBadge:"ccs auth Workspace",historySyncBadge:"History Sync Controls",authAccounts:"Auth Accounts",tableScopePrefix:"This table is intentionally scoped to",tableScopeMiddle:"accounts. Use",tableScopeSuffix:"for mode/group/depth changes.",accountMatrix:"Account Matrix",sharedTotalDesc:"Shared total: {{count}}. Actions include Sync settings and legacy confirmation.",loadingAccounts:"Loading accounts..."},health:{justNow:"just now",secondsAgo:"{{count}}s ago",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",systemHealth:"System Health",build:"build {{version}}",lastScan:"Last scan:",autoRefresh:"Auto-refresh:",refresh:"Refresh",checks:"Checks",version:"Version",platform:"Platform",liveMonitoring:"Live monitoring active",copied:"Copied to clipboard",refreshing:"Refreshing health checks...",fix:"Fix",applyFix:"Apply Fix",healthLabel:"health"},updates:{actionRequired:"Action Required",done:"Done",all:"All",inboxTitle:"Updates Inbox",inboxSubtitle:"Focus on actions, then mark updates done or dismissed.",needsAction:"Needs Action",doneCount:"Done",searchPlaceholder:"Search actions or commands",noNotices:"No notices match this view.",noUpdates:"No updates available.",published:"Published {{date}}",markDone:"Mark done",dismiss:"Dismiss",reopen:"Reopen",doNext:"Do Next",impactedIntegrations:"Impacted Integrations",impactedDesc:"Related areas based on update scope and routing.",whyMatters:"Why It Matters",whyMattersDesc:"Short context only, no wall-of-text release notes.",open:"Open",progressNeedsAction:"Needs Action",progressInReview:"In Review",progressDone:"Done",progressDismissed:"Dismissed",statusNew:"New",statusStable:"Stable",statusPlanned:"Planned",dashboard:"Dashboard",cliUsage:"CLI Usage"},cliproxyPage:{connected:"Connected",notConnected:"Not connected",variant:"variant",parentNotConnected:"Parent not connected",viaProvider:"via {{provider}}",emptyTitle:"CCS Profile Manager",emptyDesc:"Manage OAuth authentication, account preferences, and model selection for CLIProxy providers. Configure how CCS routes requests to different AI backends.",emptyControlPanelPrefix:"For live usage stats and real-time monitoring, visit the",controlPanel:"Control Panel",quickSetup:"Quick Setup",accountManagement:"CCS-level account management",providers:"Providers",variants:"Variants",providerCount:"{{count}} provider",providerCount_other:"{{count}} providers",connectedCount:"{{count}} connected",variantDisplay:"{{name}} ({{provider}} variant)"},copilotPage:{title:"Copilot",subtitle:"GitHub Copilot proxy",setup:"Setup",auth:"Auth",daemon:"Daemon",unofficialTitle:"Unofficial API - Use at Your Own Risk",unofficialItem1:"Reverse-engineered API - may break anytime",unofficialItem2:"Excessive use may trigger account restrictions",unofficialItem3:"No warranty, no responsibility from CCS",yes:"Yes",no:"No",installed:"Installed",missing:"Missing",integration:"Integration",enabled:"Enabled",disabled:"Disabled",github:"GitHub",connected:"Connected",notConnected:"Not Connected",authenticate:"Authenticate",authenticating:"Authenticating...",status:"Status",running:"Running",stopped:"Stopped",port:"Port",stopping:"Stopping...",stop:"Stop",starting:"Starting...",start:"Start",installing:"Installing...",installCopilotApi:"Install copilot-api",proxy:"Proxy",active:"Active",inactive:"Inactive"},cursorPage:{title:"Cursor",beta:"Beta",subtitle:"Dedicated Cursor integration controls",unofficialTitle:"Unofficial API - Use at Your Own Risk",unofficialItem1:"Reverse-engineered integration may break anytime",unofficialItem2:"Abuse or excessive usage may risk account restrictions",unofficialItem3:"No warranty, no responsibility from CCS",integration:"Integration",authentication:"Authentication",daemon:"Daemon",enabled:"Enabled",disabled:"Disabled",expired:"Expired",connected:"Connected",notConnected:"Not connected",running:"Running",stopped:"Stopped",actions:"Actions",disableIntegration:"Disable Integration",enableIntegration:"Enable Integration",autoDetectAuth:"Auto-detect Auth",manualAuthImport:"Manual Auth Import",stopDaemon:"Stop Daemon",startDaemon:"Start Daemon",port:"Port",configuration:"Cursor Configuration",lastModified:"Last modified:",neverSaved:"Never saved",saving:"Saving...",save:"Save",modelConfig:"Model Config",settings:"Settings",info:"Info",presets:"Presets",presetsDesc:"Apply pre-configured model mappings",modelMapping:"Model Mapping",modelMappingDesc:"Configure which models to use for each tier",defaultModel:"Default Model",defaultModelDesc:"Used when no specific tier is requested.",opusModel:"Opus (Most capable)",opusModelDesc:"Complex reasoning and highest quality responses.",sonnetModel:"Sonnet (Balanced)",sonnetModelDesc:"General coding and day-to-day chat workloads.",haikuModel:"Haiku (Fast)",haikuModelDesc:"Low-latency and lightweight request paths.",runtimeSettings:"Runtime Settings",autoStartDaemon:"Auto-start Daemon",autoStartDesc:"Start Cursor daemon automatically when integration is used.",ghostMode:"Ghost Mode",ghostModeDesc:"Request x-ghost-mode to reduce telemetry.",provider:"Provider",filePath:"File Path",availableModels:"Available Models",loadingModels:"Loading models...",noModels:"No model metadata available yet. Start daemon and refresh.",default:"Default",rawConfiguration:"Raw Configuration (JSON)",manualImportTitle:"Manual Cursor Auth Import",manualImportDesc:"Provide Cursor access token and machine ID if auto-detect is unavailable.",accessToken:"Access Token",accessTokenPlaceholder:"Paste Cursor access token",machineId:"Machine ID",machineIdPlaceholder:"32-char hex (UUID without hyphens)",cancel:"Cancel",import:"Import",selectModel:"Select model",useDefaultModel:"Use Default Model",availableModelCount:"Available Models ({{count}})",invalidPort:"Port must be an integer between 1 and 65535",defaultModelRequired:"Default model is required",savedConfig:"Cursor config and model mapping saved",failedSaveConfig:"Failed to save config",modelsLoadingWait:"Models are still loading. Please wait before applying a preset.",noModelsAvailable:"No models available yet. Start the daemon and refresh first.",appliedCodexPreset:"Applied GPT-5.3 Codex preset",appliedClaudePreset:"Applied Claude 4.6 preset",appliedGeminiPreset:"Applied Gemini 3 preset",integrationEnabled:"Cursor integration enabled",integrationDisabled:"Cursor integration disabled",failedUpdateIntegration:"Failed to update integration state",credentialsImported:"Cursor credentials imported",autoDetectFailed:"Auto-detect failed",manualRequired:"Token and machine ID are required",manualImportFailed:"Manual import failed",failedStartDaemon:"Failed to start daemon",daemonStarted:"Daemon started",daemonStartedWithPid:"Daemon started (PID: {{pid}})",failedStopDaemon:"Failed to stop daemon",daemonStopped:"Daemon stopped",rawLoading:"Raw settings are still loading. Please wait and try again.",invalidJson:"Invalid JSON",rawSaved:"Raw settings saved",rawChanged:"Raw settings changed externally. Refresh and retry.",failedSaveRaw:"Failed to save raw settings",savedAll:"Cursor configuration saved"},droidPage:{loadingDiagnostics:"Loading Droid diagnostics...",failedDiagnostics:"Failed to load Droid diagnostics.",overview:"Overview",byok:"BYOK",docs:"Docs",runtimeInstall:"Runtime and Installation",status:"Status",detected:"Detected",notFound:"Not Found",detectionSource:"Detection source",binaryPath:"Binary path",installDirectory:"Install directory",version:"Version",overridePath:"Override (CCS_DROID_PATH)",configFiles:"Config Files",path:"Path",resolved:"Resolved",size:"Size",lastModified:"Last modified",parseWarning:"Parse warning: {{value}}",readWarning:"Read warning: {{value}}",warnings:"Warnings",byokSummary:"BYOK Summary",activeModelSelector:"Active model selector",customModels:"Custom models",ccsManaged:"CCS-managed",userManaged:"User-managed",malformedEntries:"Malformed entries",providers:"Providers",none:"none",customModelsTitle:"Custom Models",modelName:"Name / Model",provider:"Provider",baseUrl:"Base URL",noCustomModels:"No custom models",docsAlignedNotes:"Docs-Aligned Notes",factoryDocs:"Factory Docs",providerFactCheckDocs:"Provider Fact-Check Docs",providerValues:"Provider values: {{value}}",settingsHierarchy:"Settings hierarchy: {{value}}",settingsTitle:"Droid BYOK Settings",fixJsonBeforeQuickSettings:"Fix JSON syntax before using quick settings controls.",fixJsonBeforeReasoning:"Fix JSON syntax before updating BYOK reasoning settings.",unableUpdateReasoning:"Unable to update selected BYOK model reasoning setting.",fixJsonBeforeBudget:"Fix JSON syntax before updating thinking budget.",anthropicOnlyBudget:"Thinking budget is only available for Anthropic BYOK models.",invalidJson:"Invalid JSON: {{value}}",saved:"Droid settings saved",changedExternally:"Droid settings changed externally. Refresh and retry.",failedSave:"Failed to save Droid settings"},sharedPage:{commands:"Commands",skills:"Skills",agents:"Agents",title:"Shared Data",subtitle:"Commands, skills, and agents shared across Claude instances",totalShared:"Total Shared",visible:"Visible",markdownDetail:"Markdown detail view",filterPrefix:"Filter:",configurationRequired:"Configuration Required",countsUnavailable:"Counts unavailable",retryCounts:"Retry counts",filterPlaceholder:"Filter {{tab}} by name, description, or path",showing:"Showing {{visible}} of {{total}} {{tab}}",showingQuery:' for "{{query}}"',refreshing:" (refreshing...)",loadingShared:"Loading shared {{tab}}...",failedLoadShared:"Failed to load shared {{tab}}",retry:"Retry",noSharedFound:"No shared {{tab}} found. Run `ccs sync` or add items in your shared directory.",noMatch:'No {{tab}} match "{{query}}".',selectOne:"Select a {{tab}} to view full content.",pathLabel:"Path",resolvedSource:"Resolved Source",loadingMarkdown:"Loading markdown content...",failedLoadContent:"Failed to load content",retryContent:"Retry content",noMarkdown:"No markdown content available."}}},"zh-CN":{translation:{locale:{en:"English","zh-CN":"简体中文",vi:"越南语",ja:"日语"},layout:{languageSwitcher:"语言"},nav:{general:"通用",home:"首页",analytics:"分析",identityAccess:"身份与访问",apiProfiles:"API 配置",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"概览",controlPanel:"控制面板",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"账号",allAccounts:"全部账号",sharedData:"共享数据",compatibleClis:"兼容",factoryDroid:"Factory Droid",system:"系统",health:"健康",settings:"设置",openrouterTooltip:"精选:OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"配置",cliproxy:"CLIProxy",accounts:"账号",health:"健康",configurationRequired:"需要配置"},auth:{dashboardTitle:"CCS 控制台",loginDescription:"请输入凭据以访问控制台",username:"用户名",password:"密码",usernamePlaceholder:"请输入用户名",passwordPlaceholder:"请输入密码",signIn:"登录",signingIn:"登录中...",loginFailed:"登录失败"},commonToast:{apiKeyRequired:"API key 为必填项",accountAddedPresetFailed:"账号已添加,但应用默认预设失败",settingsCopied:"设置已复制到剪贴板",enterPresetName:"请先输入预设名称再保存",codeCopied:"验证码已复制到剪贴板",copyCodeFailed:"复制验证码失败",appliedModelAllTiers:"已将模型应用到全部层级",settingsSaved:"设置已保存",defaultTargetUpdated:"默认目标已更新",failedUpdateDefaultTarget:"更新默认目标到 {{target}} 失败{{suffix}}"},profileDialog:{editTitle:"编辑配置",createTitle:"创建 API 配置",name:"名称",namePlaceholder:"my-api",baseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com",apiKey:"API Key",defaultModel:"默认模型(ANTHROPIC_MODEL)",defaultModelHint:"留空则使用:{{model}}",modelMappingTitle:"模型映射(Opus/Sonnet/Haiku)",modelMappingDesc:"为不同档位配置不同模型 ID,适合按模型类型路由到不同后端的 API 代理。",opusModel:"Opus 模型(ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Sonnet 模型(ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Haiku 模型(ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"取消",saving:"保存中...",update:"更新",create:"创建"},modelTierMapping:{title:"模型档位映射",advanced:"高级",description:"为 Claude Code 的 opus/sonnet/haiku 档位配置不同模型。",autoSuggest:"基于 {{provider}} 自动建议",opusPlaceholder:"例如:anthropic/claude-opus-4",sonnetPlaceholder:"例如:anthropic/claude-sonnet-4",haikuPlaceholder:"例如:anthropic/claude-3.5-haiku",footer:"这些字段对应 ANTHROPIC_DEFAULT_OPUS_MODEL、ANTHROPIC_DEFAULT_SONNET_MODEL、ANTHROPIC_DEFAULT_HAIKU_MODEL。"},envEditor:{sensitive:"敏感",none:"尚未配置环境变量。",noneHint:"可在下方输入添加,或直接编辑 JSON。",addVariable:"添加环境变量",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"value"},setupVariant:{using:"当前使用:",variantNameRequired:"变体名称 *",variantNamePlaceholder:"例如:my-gemini、g3、flash",invokeHintPrefix:"可通过该名称调用:",model:"模型",modelPlaceholder:"例如:gemini-2.5-pro、claude-opus-4-6-thinking",choosePresetInstead:"改为从预设中选择",selectModel:"选择模型",customModelName:"自定义模型名称...",enterAnyModel:"可输入 CLIProxy 支持的任意模型名",defaultModel:"默认:{{model}}",providerDefault:"提供商默认值",back:"返回",skip:"跳过",creating:"创建中...",createVariant:"创建变体",skipHint:"如果你只想添加账号而不创建变体,可以直接跳过"},customPresetDialog:{title:"自定义预设",presetNameOptional:"预设名称(可选)",presetNamePlaceholder:"例如:我的自定义配置",codexTipPrefix:"Codex 提示:后缀",codexTipSuffix:"会固定 effort。无后缀模型使用 Thinking 设置。",defaultModel:"默认模型",defaultModelDesc:"未指定档位时使用",opusModel:"Opus(最强)",opusModelDesc:"用于复杂推理任务",sonnetModel:"Sonnet(均衡)",sonnetModelDesc:"兼顾速度与能力",haikuModel:"Haiku(快速)",haikuModelDesc:"适合简单任务的快速响应",cancel:"取消",savePreset:"保存预设",applyPreset:"应用预设"},componentModelSelector:{selectModel:"选择模型",availableModelsCount:"可用模型({{count}})",preview:"预览"},searchableSelect:{searchModels:"搜索模型...",noResults:"未找到匹配结果。"},copilotSettings:{enableCopilot:"启用 Copilot",enableCopilotDesc:"允许使用 GitHub Copilot 订阅",basicSettings:"基础设置",accountType:"账户类型",accountTypeIndividual:"个人",accountTypeBusiness:"企业",accountTypeEnterprise:"组织",rateLimiting:"速率限制",rateLimitSeconds:"速率限制(秒)",noLimit:"不限制",waitOnRateLimit:"触发限速时等待",waitOnRateLimitDesc:"达到限制时等待而不是报错",daemonSettings:"守护进程设置",autoStartDaemon:"自动启动守护进程",autoStartDaemonDesc:"使用配置时自动启动 copilot-api"},providerModelSelector:{selectModel:"选择模型",noModelsForProvider:"该提供商暂无可用模型",broken:"故障",deprecated:"已弃用",paid:"付费",freeTier:"免费档",paidTier:"付费档",modelKnownIssues:"该模型存在已知问题",viewIssueDetails:"查看问题详情",modelDeprecated:"该模型已弃用",recommended:"推荐",allModelsCount:"全部模型({{count}})",noModelsAvailable:"暂无可用模型"},createAuthProfileDialog:{title:"创建新账号",description:"Auth 配置需要先完成 Claude CLI 登录。请在终端执行下方命令。稍后你仍可在 Accounts 表中编辑同步模式、分组与连续性深度。",profileName:"配置名称",profileNamePlaceholder:"例如:work、personal、client",invalidProfileName:"名称必须以字母开头,且只能包含字母、数字、短横线或下划线。",enableSharedHistory:"与其他 ccs auth 账号启用共享历史同步",historySyncGroupOptional:"历史同步分组(可选)",historySyncGroupPlaceholder:"default、sprint-a、client-x",historySyncGroupHint:"留空将使用默认共享分组。空格会自动规范为短横线。",deeperContinuity:"高级:更深连续性模式",deeperContinuityHint:"会同步 session-env、file-history、shell-snapshots 与 todos。凭据仍保持隔离。",invalidContextGroup:"分组必须以字母开头,且只能包含字母、数字、短横线或下划线(最多 {{max}} 个字符)。",command:"命令",commandFallback:"ccs auth create <name>",afterRunPrefix:"执行命令后:",afterRunStep1:"在浏览器中完成 Claude 登录",afterRunStep2:"返回此处并刷新,即可看到新账号",poolingHint:"如果更倾向于共享池化 Claude OAuth 路由,可在 Accounts 页面操作按钮中使用 CLIProxy Claude pool。",close:"关闭",copied:"已复制!",copyCommand:"复制命令"},cliproxyModelCategory:{google:"Google(Gemini)",openai:"OpenAI(GPT)",anthropic:"Anthropic(Claude)",antigravity:"Antigravity",other:"其他"},cliproxyOverviewComponents:{availableModels:"可用模型",noModelsAvailable:"暂无可用模型",startSessionHint:"启动 CLIProxy 会话后即可拉取可用模型",totalCount:"共 {{count}} 个",availableThroughGroupedByProvider:"通过 {{backendLabel}} 提供的模型,按提供商分组",moreCount:"另外 {{count}} 个"},categorizedModelSelector:{selectModel:"选择模型",noModelsAvailable:"暂无可用模型",modelPlaceholder:"模型..."},openrouterQuickStart:{recommended:"推荐",title:"从 OpenRouter 开始",description:"通过一个 API 即可访问来自 OpenAI、Anthropic、Google、Meta 等的 {{modelCountLabel}} 个模型。",featureOneApi:"一个 API,接入全部提供商",featureTierMapping:"模型档位映射",createOpenRouterProfile:"创建 OpenRouter 配置",getApiKeyAt:"在此获取 API Key:",or:"或",createCustomProfile:"创建自定义 API 配置"},alibabaCodingPlanQuickStart:{recommended:"推荐",title:"试用阿里云 Coding Plan",description:"通过 Anthropic 兼容端点接入阿里云 Model Studio Coding Plan。",featureEndpoint:"Anthropic 兼容端点",featureKeyFormat:"专用 sk-sp API Key",createAlibabaProfile:"创建 Alibaba Coding Plan 配置",readGuideAt:"查看配置文档:"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"通过 Anthropic 端点接入 Model Studio Coding Plan",add:"添加"},credentialHealth:{title:"凭据健康状态",ready:"就绪",noCredentialsConfigured:"尚未配置凭据。请使用上方登录按钮完成认证。",neverUsed:"从未使用",justNow:"刚刚",unknown:"未知",daysAgo:"{{count}} 天前",hoursAgo:"{{count}} 小时前",minutesAgo:"{{count}} 分钟前"},proxyStatusWidget:{justNow:"刚刚",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",syncReady:"同步就绪",noConfig:"未配置",remoteProxy:"远程代理",active:"已连接",trafficAutoRouted:"流量已自动转发到远程服务器",tooltipSync:"同步配置到 CLIProxy",tooltipRestart:"重启",tooltipStop:"停止",tooltipClose:"关闭",tooltipVersionSettings:"版本设置",versionManagement:"版本管理",selectVersionPlaceholder:"选择要安装的版本...",stable:"(稳定版)",install:"安装",versionsAboveUnstable:"高于 {{version}} 的版本存在已知问题",versionsKnownIssues:"版本 {{version}} 存在已知问题",lastChecked:"上次检查 {{time}}",notRunning:"未运行",start:"启动",port:"端口 {{port}}",sessionCount:"{{count}} 个会话",sessionCount_other:"{{count}} 个会话",installFaultyTitle:"安装存在已知问题的版本?",installFaultyDesc:"即将安装 <strong>v{{version}}</strong>,该版本位于已知故障范围 <strong>{{range}}</strong> 内。",installFaultyWarning:"该版本存在已知缺陷,可能安装失败或让代理处于异常状态。",installUnstableTitle:"安装非稳定版本?",installUnstableDesc:"即将安装 <strong>v{{version}}</strong>,该版本高于当前最大稳定版 <strong>v{{maxStable}}</strong>。",installUnstableWarning:"该版本存在已知稳定性问题,可能导致异常行为。",installUnstableConfirm:"确定要继续吗?",cancel:"取消",installAnyway:"仍要安装",clickToDowngrade:"点击降级",clickToUpdate:"点击更新"},syncStatusCard:{profileSync:"配置同步",ready:"就绪",noConfig:"未配置",syncsProfilesDesc:"将 API 配置同步到本地 CLIProxy 配置",runDoctorHint:"运行 <code>ccs doctor --fix</code> 生成配置。",details:"详情",syncNow:"立即同步"},syncDialog:{title:"同步配置到本地 CLIProxy",description:"将 CCS API 配置同步到本地 CLIProxy 的 config.yaml。",noProfiles:"没有可同步的配置。",createProfilesFirst:"请先在「配置」页创建 API 配置。",modelLabel:"模型:",ready:"就绪",profilesToSync_one:"{{count}} 个配置待同步",profilesToSync_other:"{{count}} 个配置待同步",cancel:"取消",syncing:"同步中...",synced:"已同步!",syncNow:"立即同步"},errorLogs:{title:"错误日志",failedRequests_one:"{{count}} 个失败请求",failedRequests_other:"{{count}} 个失败请求",cliproxyDiagnostics:"CLIProxy 诊断",showingCount:"显示 50 / {{total}} 条",selectLog:"选择一条日志查看详情",failedLoadContent:"加载日志内容失败",copyAbsolutePath:"复制绝对路径",copyRawContent:"复制原始日志",tabOverview:"概览",tabHeaders:"请求头",tabRequest:"请求体",tabResponse:"响应体",tabRaw:"原始",modelLabel:"模型:",quotaResetsIn:"配额重置于 ",method:"方法",provider:"提供商",version:"版本",endpoint:"端点",url:"URL",timestamp:"时间戳",na:"无",noHeaders:"无请求头",noRequestBody:"无请求体内容",noResponseBody:"无响应体内容",rateLimitedMsg:"触发限速。请切换账号或等待配额重置。模型 {{model}} 配额已用尽。",rateLimitedMsgNoModel:"触发限速。请切换账号或等待配额重置。",authFailedMsg:"认证失败。请通过 CLIProxy 设置重新认证或检查 API Key。",notFoundMsg:"端点未找到,该提供商可能不存在此端点。",serverErrorMsg:"上游服务器错误。请稍后重试或查看提供商状态页。",timeoutMsg:"请求超时。请检查网络或增大超时设置。",unknown:"未知"},editAccountContext:{title:"编辑历史同步",description:"配置「{{name}}」与其他 ccs auth 账号共享历史与连续性的方式。",syncMode:"同步模式",selectContextMode:"选择同步模式",isolatedOption:"隔离(不同步)",sharedOption:"共享(启用同步)",sharedModeHint:"共享模式会为同一历史同步分组内的账号复用工作区上下文。",isolatedModeHint:"隔离模式使该账号与其他 ccs auth 账号完全独立。",historySyncGroup:"历史同步分组",groupPlaceholder:"default",groupHint:"会规范为小写(空格变为短横线)。允许:字母、数字、_、-(最多 {{max}} 字符)。",invalidGroup:"请输入以字母开头的有效分组名。",continuityDepth:"连续性深度",selectContinuityDepth:"选择连续性深度",standardOption:"标准(仅项目)",deeperOption:"更深连续性(高级)",deeperHint:"高级模式还会同步 session-env、file-history、shell-snapshots 和 todos。",standardHint:"标准模式仅同步项目工作区上下文。",credentialsIsolated:"凭据与 .anthropic 在所有模式下均按账号隔离。",cancel:"取消",save:"保存",saving:"保存中..."},historySyncLearningMap:{title:"历史同步说明",description:"隔离 -> 共享 -> 更深。在每行使用「同步」进行所有更改。",learningMap:"说明",isolated:"隔离",shared:"共享",deeper:"更深",cliproxyManaged_one:"{{count}} 个 CLIProxy Claude 池账号在操作中心 / CLIProxy 页面管理。",cliproxyManaged_other:"{{count}} 个 CLIProxy Claude 池账号在操作中心 / CLIProxy 页面管理。",showDetails:"显示详情:分组、切换与旧策略",modeSwitch:"模式切换",modeSwitchDesc:"同步对话框可让用户在隔离/共享间切换并选择更深连续性。",historySyncGroup:"历史同步分组",historySyncGroupDesc:"同一分组即共享项目上下文。默认回退为 default。",legacyConfirmation_one:"{{count}} 个旧账号仍需要显式确认。",legacyConfirmation_other:"{{count}} 个旧账号仍需要显式确认。"},accountsTable:{name:"名称",type:"类型",defaultBadge:"默认",created:"创建时间",lastUsed:"最后使用",historySync:"历史同步",actions:"操作",syncTitle:"编辑同步模式、分组与连续性深度",confirmLegacyTitle:"确认此旧账号的当前模式为显式",sync:"同步",confirm:"确认",active:"当前",setDefault:"设为默认",deleteAccount:"删除账号",cannotDeleteDefault:"不能删除默认账号",noAccounts:"未找到 CCS auth 账号。请使用 ccs auth create 添加。",resetToDefault:"恢复为 CCS 默认",deleteDialogTitle:"删除账号",deleteDialogDesc:"确定要删除账号「{{name}}」吗?将移除该配置及其所有会话数据,且无法撤销。",cancel:"取消",delete:"删除",sharedGroupStandard:"共享({{group}},标准)",sharedGroupDeeper:"共享({{group}},更深)",sharedGroupLegacy:"共享({{group}},标准旧策略)",isolatedLegacy:"隔离(旧默认)",isolated:"隔离"},addAccountDialog:{title:"添加 {{displayName}} 账号",descKiro:"选择 Kiro 认证方式,然后通过浏览器或从 Kiro IDE 导入完成认证。",descDeviceCode:"点击认证后,验证码将显示,请在提供商网站输入。",descOauth:"点击认证获取 OAuth URL,在任意浏览器中打开即可登录。",powerUserEnabled:"已启用高级用户模式",powerUserSkipped:"已在设置 > 代理 中跳过 AGY 责任清单,您需自行承担 OAuth/账号风险。",authMethod:"认证方式",selectKiroAuthMethod:"选择 Kiro 认证方式",nicknameRequired:"昵称(必填)",nicknameOptional:"昵称(选填)",nicknamePlaceholder:"例如:工作、个人",nicknameRequiredHint:"该提供商必填。请使用唯一易记名称(如工作、个人)。",nicknameOptionalHint:"用于区分账号的友好名称。留空将根据邮箱自动生成。",waitingForAuth:"等待认证中...",deviceCodeHint:"验证码对话框即将出现,请在提供商网站输入验证码。",browserHint:"在浏览器中完成认证后,本对话框将自动关闭。",openUrlLabel:"在任意浏览器中打开此 URL 登录:",copied:"已复制",copy:"复制",open:"打开",popupBlocked:"弹窗被拦截。请复制上方 URL 在浏览器中手动打开。",redirectPasteLabel:"重定向未生效?请粘贴回调 URL:",callbackPlaceholder:"在此粘贴重定向 URL...",submitCallback:"提交回调",submitting:"提交中...",preparingUrl:"正在准备登录 URL...",cancel:"取消",importingToken:"正在从 Kiro IDE 导入令牌...",authenticate:"认证",importFromIde:"从 IDE 导入",importing:"导入中..."},flowViz:{backToProviders:"返回提供商",showDetails:"显示详情",hideDetails:"隐藏详情",resetLayout:"重置布局",provider:"提供商",totalRequests:"总请求数",accounts:"账号",connectionTimeline:"连接时间线",noRecentConnections:"暂无最近连接"},quickStats:{totalRequests:"总请求数",successRate:"成功率",totalTokens:"总 Token 数",activeModels:"活跃模型数"},authMonitor:{accounts:"账号",accountsCount:"{{count}} 个账号",success:"成功",failed:"失败",successRate:"成功率"},accountCard:{resumeAccount:"恢复账号",pauseAccount:"暂停账号",quotaLoading:"配额...",quota:"配额",quotaUnavailable:"配额限制不可用",reauthNeeded:"需要重新认证",failureLabelReauth:"重新认证",failureLabelWorkspace:"工作区",failureLabelNoAccess:"无权限",failureLabelRetry:"重试",failureLabelReconnect:"重新连接",failureLabelTemporary:"临时问题",failureLabelUnavailable:"不可用",failureHintReauth:"请重新运行该账号的认证流程以刷新访问权限。",failureHintWorkspace:"请将该账号移回可用的工作区,然后移除并重新添加。",failureHintNoAccess:"该账号无法访问提供商的配额接口。",failureHintRetry:"稍后再试一次。",failureHintReconnect:"请移除这个失效账号并重新认证。",failureHintTemporary:"这看起来是临时问题,请稍后重试。",removeAndReadd:"移除并重新添加账号",autoRefreshFailed:"自动刷新失败"},antigravityChecklist:{title:"Antigravity OAuth 责任须知",subtitle:"认证前请完成全部 4 步。",mandatory:"必读",completion:"完成度",stepsCount:"{{current}}/4 步"},accountSafetyWarning:{title:"OAuth 账号安全提示",subtitle:"Issue #509 · Gemini + AGY OAuth 风险",firstLine:"Issue #509 记录了与 ccs agy 及 ccs gemini 与 ccs agy 共享账号使用相关的封禁/停用报告。",secondLine:"仅在您愿意承担 OAuth 与账号访问风险的前提下继续。",issueLabel:"查看 issue #509",proxySettingsLabel:"Gemini + AGY 控制:设置 > 代理"},cliproxyDialog:{name:"名称",provider:"提供商",account:"账号",accountOptional:"账号(选填)",model:"模型",modelOptional:"模型(选填)",defaultTarget:"默认目标",defaultTier:"默认档位",tierConfig:"档位配置",selectProvider:"选择提供商...",useDefaultAccount:"使用默认账号",defaultSuffix:"(默认)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"取消",create:"创建",creating:"创建中...",saveChanges:"保存更改",saving:"保存中...",placeholderName:"my-gemini",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"编辑复合变体:{{name}}",editSingleTitle:"编辑单一样式:{{name}}"},profileEditor:{profileInfo:"配置信息",profileName:"配置名称",filePath:"文件路径",lastModified:"最后修改",defaultTarget:"默认目标",quickUsage:"快速使用",runWithProfile:"使用配置运行",runOnDroid:"在 Droid 上运行",droidAliasExplicit:"Droid 别名(显式)",overrideToClaude:"切换为 Claude",overrideToClaudeExplicit:"切换为 Claude(显式)",setAsDefault:"设为默认",provider:"提供商",custom:"自定义",providerChooserHint:"先选择一个预设,之后仍可调整 URL、API key 和模型映射。",featuredProviders:"精选提供商",scrollHint:"屏幕较窄时可横向滚动",customEndpoint:"自定义端点",morePresets:"更多预设",customEndpointDescription:"从空白的 Anthropic 兼容 URL 开始,手动配置全部内容。"},settings:{sectionLoadFailed:"加载分区失败",unknownError:"发生未知错误",reloadPage:"重新加载页面",refresh:"刷新",copy:"复制",copied:"已复制",saved:"已保存",loading:"加载中...",configFileNotFound:"未找到配置文件"},settingsTabs:{web:"网页",env:"环境",think:"思考",proxy:"代理",auth:"认证",backup:"备份"},settingsAuth:{failedFetchTokens:"获取认证令牌失败",failedSaveTokens:"保存令牌失败",tokensUpdated:"令牌已更新,请重启 CLIProxy 生效。",failedRegenerate:"重新生成密钥失败",secretRegenerated:"新的管理密钥已生成,请重启 CLIProxy 生效。",failedReset:"重置令牌失败",tokensReset:"令牌已重置为默认值,请重启 CLIProxy 生效。",description:"配置 CLIProxy 认证令牌。修改后需要重启 CLIProxy。",apiKey:"API Key",custom:"自定义",apiKeyDesc:"Claude Code 通过该值向 CLIProxy 鉴权",apiKeyPlaceholder:"API key",managementSecret:"管理密钥",managementSecretDesc:"CCS Dashboard 使用该值访问 CLIProxy 管理接口",managementSecretPlaceholder:"管理密钥",generateSecret:"生成新的安全密钥",resetDefaults:"重置为默认值",resetDesc:"将 API key 和管理密钥都恢复为默认值。",saving:"保存中...",save:"保存"},settingsGlobalEnv:{description:"向所有非 Claude 订阅型配置注入环境变量(gemini、codex、agy、ghcp 等)",enabled:"全局环境变量已启用",disabled:"全局环境变量已禁用",enabledDesc:"环境变量将注入第三方配置",disabledDesc:"环境变量不会被注入",envVars:"环境变量",noneConfigured:"尚未配置环境变量",addNew:"新增变量",keyName:"KEY_NAME",value:"value",add:"添加",quickAdd:"快速添加常用变量",allConfigured:"常用变量已全部配置"},settingsBackups:{failedFetch:"获取备份失败",failedRestore:"恢复备份失败",restoreSuccess:"备份恢复成功",title:"设置备份",description:"恢复 settings.json 的历史版本。每次修改设置时会自动创建备份。",none:"暂无备份",noneHint:"修改设置后,备份会显示在这里",latest:"最新",restoring:"恢复中...",restore:"恢复",restoreConfirmTitle:"确认恢复备份?",restoreConfirmPrefix:"这将用以下备份替换当前设置:",restoreConfirmSuffix:"此操作不可撤销。",cancel:"取消"},settingsWebsearch:{description:"面向第三方配置(gemini、codex、agy 等)的 CLI 网页搜索",enabled:"WebSearch 已启用",disabled:"WebSearch 已禁用",checking:"正在检查状态...",providers:"提供商",noneConfigured:"未配置任何提供商",noneConfiguredHint:"请先安装 CLI 工具以启用网页搜索提供商",checkProviders:"检查可用提供商",installed:"已安装",notInstalled:"未安装",model:"模型:",howInstall:"如何安装 {{name}} CLI",installGlobally:"全局安装",requiresKey:"(需要 xAI API key)",freeTier:"(提供免费额度)",viewDocs:"查看文档"},settingsProxy:{failedLoadAgyMode:"加载 AGY 高级模式失败",failedUpdateAgyMode:"更新 AGY 高级模式失败",failedVerifyAgyMode:"校验 AGY 高级模式持久化失败",notPersistedAgyMode:"AGY 高级模式未成功持久化,配置可能被其他进程修改。",agyModeEnabled:"AGY 高级模式已启用。",agyModeDisabled:"AGY 高级模式已关闭。",typePhraseToContinue:"请输入“{{value}}”后继续。",description:"为基于代理的配置设置本地或远程 {{backend}} 连接",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"实例状态",connectionMode:"连接模式",local:"本地",remote:"远程",localDesc:"在本机运行 {{backend}} 二进制",remoteDesc:"连接到远程 {{backend}} 服务器",backendBinary:"后端二进制",stopProxyToSwitch:"请先在实例状态中停止正在运行的代理,再切换后端。",default:"默认",plusDesc:"完整支持包括 Kiro 和 GitHub Copilot 在内的提供商",originalDesc:"原版二进制(仅 Gemini、Codex、Antigravity)",variantsIncompatible:"现有 Kiro/Copilot 变体与 CLIProxyAPI 不兼容。请切换到 CLIProxyAPIPlus 或移除这些变体。",safety:"安全",agyModeTitle:"Antigravity 高级模式",agyModeDesc:"在 Add Account 与 `ccs agy` 流程中跳过 AGY 责任确认清单。",agyWarning:"仅在你充分理解 OAuth 封禁风险模式(#509)后使用。CCS 不对账号损失承担责任。",finalConfirm:"需要最终确认",finalConfirmDesc:"启用后会跳过 Dashboard 与 CLI 的 AGY 安全检查。请先阅读 issue #509,并输入精确短语后继续。",step1:"步骤 1",readIssue:"阅读 issue #509",step2:"步骤 2",typePrefix:"输入",typeSuffix:"以启用。",typePhraseAria:"输入 I ACCEPT RISK 以启用 Antigravity 高级模式",exactPhrase:"必须输入完全一致的短语。",enableAgyMode:"启用高级模式",toggleAgyMode:"切换 AGY 高级模式",fallbackSettings:"回退设置",enableFallback:"启用本地回退",enableFallbackDesc:"远程不可达时使用本地代理",autoStartLocal:"自动启动本地代理",autoStartLocalDesc:"发生回退时自动启动本地代理",advanced:"高级",debugMode:"调试模式",debugModeDesc:"在浏览器控制台输出开发诊断信息",debugModeEnabled:"调试模式已开启,请在浏览器控制台查看详细日志。",localProxy:"本地代理",port:"端口",autoStart:"自动启动",localAutoStartDesc:"需要时自动启动本地代理",remoteConfigTitle:"远程服务器配置",host:"主机",hostPlaceholder:"192.168.1.100 或 proxy.example.com",defaultPort:"默认:{{value}}",portPlaceholder:"留空使用 {{value}}",protocol:"协议",http:"HTTP",https:"HTTPS",apiKeyOptional:"API Key(可选)",apiKeyPlaceholder:"用于 /v1/* API 接口",apiKeyDesc:"用于 /v1/chat/completions 接口请求",managementKeyOptional:"管理密钥(可选)",managementKeyPlaceholder:"用于 /v0/management/* 接口",managementKeyDesc:"用于 Dashboard 管理接口。未设置时回退使用 API Key。",testing:"测试中...",testConnection:"测试连接",connectedLatency:"已连接({{value}}ms)",connectionFailed:"连接失败",invalidPortOrEmpty:"端口必须是 1 到 65535 的整数,或留空使用默认值",invalidLocalPort:"本地端口必须是 1 到 65535 的整数",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"为支持的模型配置扩展思考/推理。",supportedProviders:"支持的提供商",modeTitle:"思考模式",modeAutoDesc:"根据模型档位自动设置思考级别",modeOffDesc:"关闭扩展思考",modeManualDesc:"设置持久覆盖级别,或按次使用 CLI 参数",tierDefaults:"档位默认值",tierDefaultsDesc:"自动模式下各模型档位的默认思考级别。",persistentOverride:"持久覆盖",persistentOverrideDesc:"应用到所有会话。CLI 参数仍具有更高优先级。",enterCustomBudget:"输入自定义预算",apply:"应用",providerOverrides:"提供商覆盖({{count}})",providerOverridesDesc:"为特定提供商覆盖档位默认值。可按需添加自定义提供商键。",addProviderPlaceholder:"添加提供商键(例如 qwen)",showWarnings:"显示告警",showWarningsDesc:"当思考值被限制或调整时显示告警",cliEnvOverride:"CLI 与环境变量覆盖",supportLine1Prefix:"思考预算:",supportLine1Suffix:"(基于 token)",supportLine2Prefix:"推理强度:",supportLine2SuffixPrefix:"(后缀或 ",supportLine2SuffixPostfix:":medium/high/xhigh)",supportLine3Prefix:"Codex 后缀会固定强度(例如 ",supportLine3Suffix:");无后缀模型使用 Thinking mode。"},analytics:{title:"分析",subtitle:"追踪使用情况与洞察",month:"本月",allTime:"全部时间",updated:"更新于 {{value}}"},analyticsSummary:{totalTokens:"总 Token",totalTokensSubtitle:"输入 {{input}} / 输出 {{output}}",totalCost:"总成本",totalCostSubtitle:"日均 ${{value}}",cacheTokens:"缓存 Token",cacheTokensSubtitle:"${{cost}}(占成本 {{percent}}%)",inputCost:"输入成本",outputCost:"输出成本",tokensSubtitle:"{{value}} 个 token"},apiProfiles:{title:"API 配置",new:"新建",searchPlaceholder:"搜索配置...",loadingProfiles:"正在加载配置...",failedLoadTitle:"加载配置失败",failedLoadDesc:"无法获取 API 配置,请稍后重试。",retry:"重试",noProfilesYet:"还没有 API 配置",noProfilesDesc:"创建你的第一个配置以连接自定义 API 端点",createProfile:"创建配置",noProfileMatch:"没有匹配“{{query}}”的配置",profileCount:"{{count}} 个配置",profileCount_other:"{{count}} 个配置",configuredCount:"{{count}} 个已配置",deleteProfileTitle:"删除配置",deleteProfileDesc:"确定要删除“{{name}}”吗?这会移除设置文件且无法恢复。",delete:"删除",unsavedChangesTitle:"未保存的更改",unsavedChangesDesc:"你在“{{current}}”中有未保存内容,是否丢弃并切换到“{{next}}”?",discardSwitch:"丢弃并切换"},accountsPage:{title:"账号",managePrefix:"统一管理",manageSuffix:"账号与池化接入流程。",mobileManageSuffix:"的连续性配置。",primaryActions:"主要操作",createAccount:"创建账号",authClaudeInPool:"在 Pool 中认证 Claude",openClaudePoolSettings:"打开 Claude Pool 设置",openCliProxyClaudePool:"打开 CLIProxy Claude Pool",migrationFollowup:"迁移后续处理",legacyContextPending:"{{count}} 个账号仍需首次模式确认。",legacyContextPending_other:"{{count}} 个账号仍需首次模式确认。",legacyContinuityPending:"{{count}} 个共享账号仍处于标准旧版连续性深度。",legacyContinuityPending_other:"{{count}} 个共享账号仍处于标准旧版连续性深度。",confirmingLegacy:"正在确认旧版策略...",confirmLegacy:"确认旧版策略({{count}})",noLegacyFollowup:"暂无待处理的迁移后续项。",continuityGuide:"连续性指南",expandWhenNeeded:"按需展开查看。",sharedStandard:"共享标准",sharedStandardDesc:"仅同步项目工作区。适合大多数团队。",sharedDeeper:"共享更深",sharedDeeperPrefix:"额外包含",isolated:"隔离",isolatedDesc:"不建立链接。适合严格隔离场景。",quickCommands:"快捷命令",quickCommandsDesc:"复制后在终端运行。",workspaceBadge:"ccs auth 工作区",historySyncBadge:"历史同步控制",authAccounts:"认证账号",tableScopePrefix:"该表仅展示",tableScopeMiddle:"账号。模式/分组/深度调整请使用",tableScopeSuffix:"。",accountMatrix:"账号矩阵",sharedTotalDesc:"共享总数:{{count}}。可执行 Sync 设置和旧版确认操作。",loadingAccounts:"正在加载账号..."},health:{justNow:"刚刚",secondsAgo:"{{count}} 秒前",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",systemHealth:"系统健康",build:"构建 {{version}}",lastScan:"上次扫描:",autoRefresh:"自动刷新:",refresh:"刷新",checks:"检查项",version:"版本",platform:"平台",liveMonitoring:"实时监控已启用",copied:"已复制到剪贴板",refreshing:"正在刷新健康检查...",fix:"修复",applyFix:"应用修复",healthLabel:"健康"},updates:{actionRequired:"待处理",done:"已完成",all:"全部",inboxTitle:"更新收件箱",inboxSubtitle:"先处理操作,再将更新标记为完成或忽略。",needsAction:"需处理",doneCount:"已完成",searchPlaceholder:"搜索操作或命令",noNotices:"当前视图下没有通知。",noUpdates:"暂无更新。",published:"发布于 {{date}}",markDone:"标记完成",dismiss:"忽略",reopen:"重新打开",doNext:"下一步",impactedIntegrations:"受影响的集成",impactedDesc:"根据更新范围与路由匹配的相关区域。",whyMatters:"为什么重要",whyMattersDesc:"仅保留简要背景,不展示冗长发布说明。",open:"打开",progressNeedsAction:"需处理",progressInReview:"审阅中",progressDone:"已完成",progressDismissed:"已忽略",statusNew:"新",statusStable:"稳定",statusPlanned:"计划中",dashboard:"Dashboard",cliUsage:"CLI 用法"},cliproxyPage:{connected:"已连接",notConnected:"未连接",variant:"变体",parentNotConnected:"上游未连接",viaProvider:"通过 {{provider}}",emptyTitle:"CCS 配置管理",emptyDesc:"管理 CLIProxy 提供商的 OAuth 认证、账号偏好与模型选择,配置 CCS 的请求路由。",emptyControlPanelPrefix:"如需查看实时用量和监控,请前往",controlPanel:"控制面板",quickSetup:"快速设置",accountManagement:"CCS 级账号管理",providers:"提供商",variants:"变体",providerCount:"{{count}} 个提供商",providerCount_other:"{{count}} 个提供商",connectedCount:"{{count}} 个已连接",variantDisplay:"{{name}}({{provider}} 变体)"},copilotPage:{title:"Copilot",subtitle:"GitHub Copilot 代理",setup:"安装",auth:"认证",daemon:"守护进程",unofficialTitle:"非官方 API - 风险自负",unofficialItem1:"逆向接口,可能随时失效",unofficialItem2:"过度使用可能触发账号限制",unofficialItem3:"CCS 不提供担保,也不承担责任",yes:"是",no:"否",installed:"已安装",missing:"缺失",integration:"集成",enabled:"已启用",disabled:"已禁用",github:"GitHub",connected:"已连接",notConnected:"未连接",authenticate:"去认证",authenticating:"认证中...",status:"状态",running:"运行中",stopped:"已停止",port:"端口",stopping:"停止中...",stop:"停止",starting:"启动中...",start:"启动",installing:"安装中...",installCopilotApi:"安装 copilot-api",proxy:"代理",active:"活跃",inactive:"未激活"},cursorPage:{title:"Cursor",beta:"Beta",subtitle:"Cursor 集成专用控制面板",unofficialTitle:"非官方 API - 风险自负",unofficialItem1:"逆向集成可能随时失效",unofficialItem2:"滥用或过量使用可能导致账号受限",unofficialItem3:"CCS 不提供担保,也不承担责任",integration:"集成",authentication:"认证",daemon:"守护进程",enabled:"已启用",disabled:"已禁用",expired:"已过期",connected:"已连接",notConnected:"未连接",running:"运行中",stopped:"已停止",actions:"操作",disableIntegration:"禁用集成",enableIntegration:"启用集成",autoDetectAuth:"自动检测认证",manualAuthImport:"手动导入认证",stopDaemon:"停止守护进程",startDaemon:"启动守护进程",port:"端口",configuration:"Cursor 配置",lastModified:"最后修改:",neverSaved:"从未保存",saving:"保存中...",save:"保存",modelConfig:"模型配置",settings:"设置",info:"信息",presets:"预设",presetsDesc:"应用预设模型映射",modelMapping:"模型映射",modelMappingDesc:"为不同档位配置使用模型",defaultModel:"默认模型",defaultModelDesc:"未指定档位时使用。",opusModel:"Opus(最强)",opusModelDesc:"复杂推理与最高质量输出。",sonnetModel:"Sonnet(均衡)",sonnetModelDesc:"日常编码和通用对话。",haikuModel:"Haiku(快速)",haikuModelDesc:"低延迟与轻量请求。",runtimeSettings:"运行时设置",autoStartDaemon:"自动启动守护进程",autoStartDesc:"在使用集成时自动启动 Cursor 守护进程。",ghostMode:"Ghost 模式",ghostModeDesc:"请求时附带 x-ghost-mode 以减少遥测。",provider:"提供商",filePath:"文件路径",availableModels:"可用模型",loadingModels:"加载模型中...",noModels:"暂无模型元数据,请先启动守护进程后刷新。",default:"默认",rawConfiguration:"原始配置(JSON)",manualImportTitle:"手动导入 Cursor 认证",manualImportDesc:"若无法自动检测,请提供 Cursor access token 与 machine ID。",accessToken:"访问令牌",accessTokenPlaceholder:"粘贴 Cursor access token",machineId:"机器 ID",machineIdPlaceholder:"32 位十六进制(无连字符 UUID)",cancel:"取消",import:"导入",selectModel:"选择模型",useDefaultModel:"使用默认模型",availableModelCount:"可用模型({{count}})",invalidPort:"端口必须是 1 到 65535 之间的整数",defaultModelRequired:"默认模型必填",savedConfig:"Cursor 配置与模型映射已保存",failedSaveConfig:"保存配置失败",modelsLoadingWait:"模型仍在加载中,请稍后再应用预设。",noModelsAvailable:"暂无可用模型,请先启动守护进程并刷新。",appliedCodexPreset:"已应用 GPT-5.3 Codex 预设",appliedClaudePreset:"已应用 Claude 4.6 预设",appliedGeminiPreset:"已应用 Gemini 3 预设",integrationEnabled:"Cursor 集成已启用",integrationDisabled:"Cursor 集成已禁用",failedUpdateIntegration:"更新集成状态失败",credentialsImported:"Cursor 凭据已导入",autoDetectFailed:"自动检测失败",manualRequired:"Token 和 machine ID 为必填项",manualImportFailed:"手动导入失败",failedStartDaemon:"启动守护进程失败",daemonStarted:"守护进程已启动",daemonStartedWithPid:"守护进程已启动(PID: {{pid}})",failedStopDaemon:"停止守护进程失败",daemonStopped:"守护进程已停止",rawLoading:"原始设置仍在加载,请稍后重试。",invalidJson:"JSON 无效",rawSaved:"原始设置已保存",rawChanged:"原始设置已被外部修改,请刷新后重试。",failedSaveRaw:"保存原始设置失败",savedAll:"Cursor 配置已保存"},droidPage:{loadingDiagnostics:"加载 Droid 诊断中...",failedDiagnostics:"加载 Droid 诊断失败。",overview:"概览",byok:"BYOK",docs:"文档",runtimeInstall:"运行时与安装",status:"状态",detected:"已检测",notFound:"未找到",detectionSource:"检测来源",binaryPath:"二进制路径",installDirectory:"安装目录",version:"版本",overridePath:"覆盖路径(CCS_DROID_PATH)",configFiles:"配置文件",path:"路径",resolved:"解析结果",size:"大小",lastModified:"最后修改",parseWarning:"解析告警:{{value}}",readWarning:"读取告警:{{value}}",warnings:"告警",byokSummary:"BYOK 概览",activeModelSelector:"当前模型选择器",customModels:"自定义模型",ccsManaged:"CCS 管理",userManaged:"用户管理",malformedEntries:"异常条目",providers:"提供商",none:"无",customModelsTitle:"自定义模型",modelName:"名称 / 模型",provider:"提供商",baseUrl:"Base URL",noCustomModels:"没有自定义模型",docsAlignedNotes:"文档对齐说明",factoryDocs:"Factory 文档",providerFactCheckDocs:"Provider 校验文档",providerValues:"Provider 值:{{value}}",settingsHierarchy:"Settings 层级:{{value}}",settingsTitle:"Droid BYOK 设置",fixJsonBeforeQuickSettings:"请先修复 JSON 语法,再使用快速设置。",fixJsonBeforeReasoning:"请先修复 JSON 语法,再更新 BYOK 推理设置。",unableUpdateReasoning:"无法更新所选 BYOK 模型的推理设置。",fixJsonBeforeBudget:"请先修复 JSON 语法,再更新思考预算。",anthropicOnlyBudget:"思考预算仅适用于 Anthropic BYOK 模型。",invalidJson:"JSON 无效:{{value}}",saved:"Droid 设置已保存",changedExternally:"Droid 设置已被外部修改,请刷新后重试。",failedSave:"保存 Droid 设置失败"},sharedPage:{commands:"命令",skills:"技能",agents:"代理",title:"共享数据",subtitle:"在 Claude 实例间共享的命令、技能和代理",totalShared:"共享总数",visible:"可见",markdownDetail:"Markdown 详情视图",filterPrefix:"筛选:",configurationRequired:"需要配置",countsUnavailable:"统计不可用",retryCounts:"重试统计",filterPlaceholder:"按名称、描述或路径筛选 {{tab}}",showing:"显示 {{visible}} / {{total}} 个{{tab}}",showingQuery:"(关键字“{{query}}”)",refreshing:"(刷新中...)",loadingShared:"正在加载共享{{tab}}...",failedLoadShared:"加载共享{{tab}}失败",retry:"重试",noSharedFound:"未找到共享{{tab}}。请运行 `ccs sync` 或在共享目录添加内容。",noMatch:"没有匹配“{{query}}”的{{tab}}。",selectOne:"选择一个{{tab}}查看完整内容。",pathLabel:"路径",resolvedSource:"解析后来源",loadingMarkdown:"正在加载 Markdown 内容...",failedLoadContent:"加载内容失败",retryContent:"重试内容加载",noMarkdown:"暂无 Markdown 内容。"}}},vi:{translation:{locale:{en:"Tiếng Anh","zh-CN":"Tiếng Trung giản thể",vi:"Tiếng Việt",ja:"Tiếng Nhật"},layout:{languageSwitcher:"Ngôn ngữ"},nav:{general:"Chung",home:"Trang chủ",analytics:"Phân tích",identityAccess:"Nhận dạng & Quyền truy cập",apiProfiles:"Hồ sơ API",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"Tổng quan",controlPanel:"Bảng điều khiển",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"Tài khoản",allAccounts:"Tất cả tài khoản",sharedData:"Dữ liệu dùng chung",compatibleClis:"Tương thích",factoryDroid:"Factory Droid",system:"Hệ thống",health:"Sức khỏe",settings:"Cài đặt",openrouterTooltip:"Nổi bật: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"Hồ sơ",cliproxy:"CLIProxy",accounts:"Tài khoản",health:"Sức khỏe",configurationRequired:"Cần cấu hình"},auth:{dashboardTitle:"Bảng điều khiển CCS",loginDescription:"Nhập thông tin đăng nhập của bạn để truy cập bảng điều khiển",username:"Tên người dùng",password:"Mật khẩu",usernamePlaceholder:"Nhập tên người dùng",passwordPlaceholder:"Nhập mật khẩu",signIn:"Đăng nhập",signingIn:"Đang đăng nhập...",loginFailed:"Đăng nhập không thành công"},commonToast:{apiKeyRequired:"Cần có khóa API",accountAddedPresetFailed:"Đã thêm tài khoản nhưng không áp dụng được preset mặc định",settingsCopied:"Đã sao chép cài đặt vào bảng nhớ tạm",enterPresetName:"Vui lòng nhập tên preset để lưu",codeCopied:"Đã sao chép mã vào bảng nhớ tạm",copyCodeFailed:"Không sao chép được mã",appliedModelAllTiers:"Đã áp dụng mô hình cho tất cả các tier",settingsSaved:"Đã lưu cài đặt",defaultTargetUpdated:"Đã cập nhật mục tiêu mặc định",failedUpdateDefaultTarget:"Không cập nhật được mục tiêu mặc định thành {{target}}{{suffix}}"},profileDialog:{editTitle:"Chỉnh sửa hồ sơ",createTitle:"Tạo hồ sơ API",name:"Tên",namePlaceholder:"my-api",baseUrl:"URL cơ sở",baseUrlPlaceholder:"https://api.example.com",apiKey:"Khóa API",defaultModel:"Mô hình mặc định (ANTHROPIC_MODEL)",defaultModelHint:"Để trống để sử dụng: {{model}}",modelMappingTitle:"Ánh xạ mô hình (Opus/Sonnet/Haiku)",modelMappingDesc:"Cấu hình ID mô hình riêng cho từng tier. Hữu ích với API proxy định tuyến từng loại mô hình đến backend khác nhau.",opusModel:"Mô hình Opus (ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Mô hình Sonnet (ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Mô hình Haiku (ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"Hủy bỏ",saving:"Đang lưu...",update:"Cập nhật",create:"Tạo"},modelTierMapping:{title:"Ánh xạ tầng mô hình",advanced:"Nâng cao",description:"Định cấu hình các mô hình khác nhau cho các cấp độ opus/sonnet/haiku của Claude Code.",autoSuggest:"Tự động đề xuất dựa trên {{provider}}",opusPlaceholder:"vd: anthropic/claude-opus-4",sonnetPlaceholder:"ví dụ: anthropic/claude-sonnet-4",haikuPlaceholder:"vd: anthropic/claude-3.5-haiku",footer:"Các biến này thiết lập ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL."},envEditor:{sensitive:"nhạy cảm",none:"Không có biến môi trường nào được cấu hình.",noneHint:"Thêm biến bằng ô nhập bên dưới hoặc chỉnh sửa trực tiếp JSON.",addVariable:"Thêm biến môi trường",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"giá trị"},setupVariant:{using:"Sử dụng:",variantNameRequired:"Tên biến thể *",variantNamePlaceholder:"ví dụ: my-gemini, g3, flash",invokeHintPrefix:"Sử dụng tên này để gọi:",model:"Mô hình",modelPlaceholder:"ví dụ: gemini-2.5-pro, claude-opus-4-5",choosePresetInstead:"Hoặc chọn từ preset có sẵn",selectModel:"Chọn mô hình",customModelName:"Tên mô hình tùy chỉnh...",enterAnyModel:"Nhập bất kỳ tên mô hình nào được CLIProxy hỗ trợ",defaultModel:"Mặc định: {{model}}",providerDefault:"mặc định theo nhà cung cấp",back:"Quay lại",skip:"Bỏ qua",creating:"Đang tạo...",createVariant:"Tạo biến thể",skipHint:"Bỏ qua nếu bạn chỉ muốn thêm tài khoản mà không tạo biến thể"},customPresetDialog:{title:"Preset tùy chỉnh",presetNameOptional:"Tên preset (tùy chọn)",presetNamePlaceholder:"ví dụ: Preset tùy chỉnh của tôi",codexTipPrefix:"Mẹo Codex: hậu tố",codexTipSuffix:"nỗ lực ghim. Các mô hình không có hậu tố sử dụng cài đặt Tư duy.",defaultModel:"Mô hình mặc định",defaultModelDesc:"Dùng khi không yêu cầu cấp mô hình cụ thể",opusModel:"Opus (Có khả năng nhất)",opusModelDesc:"Đối với các nhiệm vụ lý luận phức tạp",sonnetModel:"Sonnet (Cân bằng)",sonnetModelDesc:"Cân bằng giữa tốc độ và khả năng",haikuModel:"Haiku (Nhanh)",haikuModelDesc:"Phản hồi nhanh cho các tác vụ đơn giản",cancel:"Hủy bỏ",savePreset:"Lưu preset",applyPreset:"Áp dụng cài sẵn"},componentModelSelector:{selectModel:"Chọn mô hình",availableModelsCount:"Mô hình khả dụng ({{count}})",preview:"Xem trước"},searchableSelect:{searchModels:"Tìm mô hình...",noResults:"Không tìm thấy kết quả phù hợp."},copilotSettings:{enableCopilot:"Bật Copilot",enableCopilotDesc:"Cho phép sử dụng đăng ký GitHub Copilot",basicSettings:"Cài đặt cơ bản",accountType:"Loại tài khoản",accountTypeIndividual:"Cá nhân",accountTypeBusiness:"Business",accountTypeEnterprise:"Enterprise",rateLimiting:"Giới hạn tỷ lệ",rateLimitSeconds:"Giới hạn tốc độ (giây)",noLimit:"Không giới hạn",waitOnRateLimit:"Chờ giới hạn tỷ lệ",waitOnRateLimitDesc:"Chờ thay vì lỗi khi đạt đến giới hạn",daemonSettings:"Cài đặt Daemon",autoStartDaemon:"Daemon tự động khởi động",autoStartDaemonDesc:"Bắt đầu copilot-api khi sử dụng hồ sơ"},providerModelSelector:{selectModel:"Chọn mô hình",noModelsForProvider:"Không có mô hình nào cho nhà cung cấp này",broken:"BROKEN",deprecated:"DEPRECATED",paid:"PAID",freeTier:"Gói miễn phí",paidTier:"Gói trả phí",modelKnownIssues:"Mô hình này có vấn đề đã biết",viewIssueDetails:"Xem chi tiết vấn đề",modelDeprecated:"Mô hình này không được dùng nữa",recommended:"Đề xuất",allModelsCount:"Tất cả mô hình ({{count}})",noModelsAvailable:"Không có mô hình khả dụng"},createAuthProfileDialog:{title:"Tạo tài khoản mới",description:"Hồ sơ xác thực yêu cầu đăng nhập Claude CLI. Chạy lệnh dưới đây trong terminal của bạn. Bạn có thể chỉnh sửa chế độ đồng bộ hóa, nhóm và độ liên tục sau này từ bảng Tài khoản.",profileName:"Tên hồ sơ",profileNamePlaceholder:"ví dụ: công việc, cá nhân, khách hàng",invalidProfileName:"Tên phải bắt đầu bằng một chữ cái và chỉ chứa các chữ cái, số, dấu gạch ngang hoặc dấu gạch dưới.",enableSharedHistory:"Bật đồng bộ hóa lịch sử chia sẻ với các tài khoản xác thực ccs khác",historySyncGroupOptional:"Nhóm đồng bộ hóa lịch sử (tùy chọn)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"Để trống để sử dụng nhóm chia sẻ mặc định. Dấu cách được chuẩn hóa thành dấu gạch ngang.",deeperContinuity:"Nâng cao: chế độ liên tục sâu hơn",deeperContinuityHint:"Thêm đồng bộ cho session-env, file-history, shell-snapshots và todos. Thông tin xác thực vẫn tách biệt.",invalidContextGroup:"Nhóm phải bắt đầu bằng một chữ cái và chỉ sử dụng các chữ cái, số, dấu gạch ngang hoặc dấu gạch dưới (tối đa {{max}} ký tự).",command:"Lệnh",commandFallback:"ccs auth create <name>",afterRunPrefix:"Sau khi chạy lệnh:",afterRunStep1:"Hoàn tất đăng nhập Claude trong trình duyệt của bạn",afterRunStep2:"Quay lại đây và làm mới để xem tài khoản mới",poolingHint:"Muốn dùng định tuyến Claude OAuth dạng pool? Dùng CLIProxy Claude pool từ nút hành động ở trang Tài khoản.",close:"Đóng",copied:"Đã sao chép!",copyCommand:"Sao chép lệnh"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"Khác"},cliproxyOverviewComponents:{availableModels:"Mô hình khả dụng",noModelsAvailable:"Không có mô hình khả dụng",startSessionHint:"Bắt đầu phiên CLIProxy để tải danh sách mô hình khả dụng",totalCount:"tổng cộng {{count}}",availableThroughGroupedByProvider:"Các mô hình khả dụng qua {{backendLabel}}, được nhóm theo nhà cung cấp",moreCount:"+{{count}} thêm"},categorizedModelSelector:{selectModel:"Chọn mô hình",noModelsAvailable:"Không có mô hình khả dụng",modelPlaceholder:"Mô hình..."},openrouterQuickStart:{recommended:"Đề xuất",title:"Bắt đầu với OpenRouter",description:"Truy cập các mô hình {{modelCountLabel}} từ OpenAI, Anthropic, Google, Meta, v.v. - tất cả đều thông qua một API.",featureOneApi:"Một API cho mọi nhà cung cấp",featureTierMapping:"Ánh xạ tầng mô hình",createOpenRouterProfile:"Tạo hồ sơ OpenRouter",getApiKeyAt:"Nhận khóa API của bạn tại",or:"hoặc",createCustomProfile:"Tạo hồ sơ API tùy chỉnh"},alibabaCodingPlanQuickStart:{recommended:"Đề xuất",title:"Dùng thử Alibaba Coding Plan",description:"Sử dụng Alibaba Cloud Coding Plan qua endpoint tương thích Anthropic cho tác vụ lập trình.",featureEndpoint:"Endpoint tương thích Anthropic",featureKeyFormat:"Khóa API sk-sp chuyên dụng",createAlibabaProfile:"Tạo hồ sơ Alibaba Coding Plan",readGuideAt:"Xem hướng dẫn tại"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Model Studio Coding Plan qua endpoint Anthropic",add:"Thêm"},credentialHealth:{title:"Tình trạng thông tin xác thực",ready:"Sẵn sàng",noCredentialsConfigured:"Không có thông tin xác thực nào được định cấu hình. Sử dụng các nút đăng nhập ở trên để xác thực.",neverUsed:"Chưa bao giờ sử dụng",justNow:"Vừa rồi",unknown:"Không xác định",daysAgo:"{{count}} ngày trước",hoursAgo:"{{count}} giờ trước",minutesAgo:"{{count}} phút trước"},proxyStatusWidget:{justNow:"vừa xong",minutesAgo:"{{count}} phút trước",hoursAgo:"{{count}} giờ trước",syncReady:"Sẵn sàng đồng bộ hóa",noConfig:"Không có cấu hình",remoteProxy:"Proxy từ xa",active:"Đang hoạt động",trafficAutoRouted:"Lưu lượng truy cập tự động được định tuyến đến máy chủ từ xa",tooltipSync:"Đồng bộ hóa hồ sơ với CLIProxy",tooltipRestart:"Khởi động lại",tooltipStop:"Dừng lại",tooltipClose:"Đóng",tooltipVersionSettings:"Cài đặt phiên bản",versionManagement:"Quản lý phiên bản",selectVersionPlaceholder:"Chọn phiên bản để cài đặt...",stable:"(ổn định)",install:"Cài đặt",versionsAboveUnstable:"Các phiên bản trên {{version}} có vấn đề đã biết",versionsKnownIssues:"Phiên bản {{version}} có vấn đề đã biết",lastChecked:"Đã kiểm tra lần cuối {{time}}",notRunning:"Không chạy",start:"Bắt đầu",port:"Cổng {{port}}",sessionCount:"{{count}} phiên",sessionCount_other:"{{count}} phiên",installFaultyTitle:"Cài đặt phiên bản có lỗi đã biết?",installFaultyDesc:"Bạn sắp cài đặt <strong>v{{version}}</strong>, phiên bản này nằm trong dải lỗi đã biết <strong>{{range}}</strong>.",installFaultyWarning:"Phiên bản này có lỗi đã biết và có thể cài đặt thất bại hoặc làm proxy ở trạng thái xấu.",installUnstableTitle:"Cài đặt phiên bản không ổn định?",installUnstableDesc:"Bạn sắp cài đặt <strong>v{{version}}</strong>, phiên bản này cao hơn phiên bản ổn định tối đa <strong>v{{maxStable}}</strong>.",installUnstableWarning:"Phiên bản này đã biết có vấn đề về độ ổn định và có thể gây ra hành vi không mong muốn.",installUnstableConfirm:"Bạn có chắc chắn muốn tiếp tục không?",cancel:"Hủy bỏ",installAnyway:"Vẫn cài đặt",clickToDowngrade:"Bấm để hạ cấp",clickToUpdate:"Bấm để cập nhật"},syncStatusCard:{profileSync:"Đồng bộ hồ sơ",ready:"Sẵn sàng",noConfig:"Không có cấu hình",syncsProfilesDesc:"Đồng bộ hóa cấu hình API với cấu hình CLIProxy cục bộ",runDoctorHint:"Chạy <code>ccs doctor --fix</code> để tạo cấu hình.",details:"Chi tiết",syncNow:"Đồng bộ ngay"},syncDialog:{title:"Đồng bộ hóa hồ sơ với CLIProxy cục bộ",description:"Đồng bộ hóa cấu hình API CCS của bạn với CLIProxy config.yaml cục bộ.",noProfiles:"Không có profile nào để đồng bộ.",createProfilesFirst:"Trước tiên hãy tạo hồ sơ API bằng tab Hồ sơ.",modelLabel:"Mô hình:",ready:"Sẵn sàng",profilesToSync_one:"{{count}} hồ sơ để đồng bộ hóa",profilesToSync_other:"{{count}} hồ sơ cần đồng bộ hóa",cancel:"Hủy bỏ",syncing:"Đang đồng bộ hóa...",synced:"Đã đồng bộ hóa!",syncNow:"Đồng bộ ngay"},errorLogs:{title:"Nhật ký lỗi",failedRequests_one:"{{count}} yêu cầu thất bại",failedRequests_other:"{{count}} yêu cầu thất bại",cliproxyDiagnostics:"Chẩn đoán CLIProxy",showingCount:"Hiển thị 50 trong số {{total}} nhật ký",selectLog:"Chọn nhật ký để xem chi tiết",failedLoadContent:"Không tải được nội dung nhật ký",copyAbsolutePath:"Sao chép đường dẫn tuyệt đối",copyRawContent:"Sao chép nội dung nhật ký thô",tabOverview:"Tổng quan",tabHeaders:"Tiêu đề",tabRequest:"Yêu cầu",tabResponse:"Phản hồi",tabRaw:"Raw",modelLabel:"Mô hình:",quotaResetsIn:"Quota sẽ được đặt lại sau",method:"Phương thức",provider:"Nhà cung cấp",version:"Phiên bản",endpoint:"Điểm cuối",url:"URL",timestamp:"Dấu thời gian",na:"không áp dụng",noHeaders:"Không có tiêu đề nào",noRequestBody:"Không có nội dung yêu cầu",noResponseBody:"Không có nội dung phản hồi",rateLimitedMsg:"Bị giới hạn tốc độ. Hãy chuyển sang tài khoản khác hoặc chờ reset hạn ngạch. Mô hình {{model}} đã hết quota.",rateLimitedMsgNoModel:"Bị giới hạn tốc độ. Hãy chuyển sang tài khoản khác hoặc chờ reset hạn ngạch.",authFailedMsg:"Xác thực không thành công. Xác thực lại thông qua Cài đặt CLIProxy hoặc kiểm tra khóa API.",notFoundMsg:"Không tìm thấy điểm cuối. Điểm cuối này có thể không tồn tại trên nhà cung cấp này.",serverErrorMsg:"Lỗi máy chủ từ upstream. Hãy thử lại sau hoặc kiểm tra trang trạng thái của nhà cung cấp.",timeoutMsg:"Yêu cầu hết thời gian chờ. Kiểm tra kết nối mạng hoặc tăng timeout.",unknown:"không rõ"},editAccountContext:{title:"Chỉnh sửa đồng bộ hóa lịch sử",description:'Định cấu hình cách "{{name}}" chia sẻ lịch sử và tính liên tục với các tài khoản xác thực ccs khác.',syncMode:"Chế độ đồng bộ",selectContextMode:"Chọn chế độ ngữ cảnh",isolatedOption:"tách biệt (không đồng bộ)",sharedOption:"chia sẻ (đã bật đồng bộ)",sharedModeHint:"Chế độ chia sẻ sử dụng lại ngữ cảnh không gian làm việc cho các tài khoản trong cùng một nhóm đồng bộ lịch sử.",isolatedModeHint:"Chế độ biệt lập giúp tài khoản này tách biệt hoàn toàn với các tài khoản xác thực ccs khác.",historySyncGroup:"Nhóm đồng bộ hóa lịch sử",groupPlaceholder:"mặc định",groupHint:"Chuẩn hóa thành chữ thường (dấu cách trở thành dấu gạch ngang). Được phép: chữ cái, số, _ , - (tối đa {{max}} ký tự).",invalidGroup:"Nhập tên nhóm hợp lệ bắt đầu bằng một chữ cái.",continuityDepth:"Độ sâu liên tục",selectContinuityDepth:"Chọn độ sâu liên tục",standardOption:"tiêu chuẩn (chỉ đồng bộ project)",deeperOption:"tính liên tục sâu hơn (nâng cao)",deeperHint:"Chế độ nâng cao cũng đồng bộ hóa phiên-env, lịch sử tệp, ảnh chụp nhanh shell và todos.",standardHint:"Chế độ tiêu chuẩn chỉ đồng bộ hóa bối cảnh không gian làm việc của dự án.",credentialsIsolated:"Thông tin xác thực và .anthropic vẫn được tách riêng cho mỗi tài khoản ở tất cả các chế độ.",cancel:"Hủy bỏ",save:"Lưu",saving:"Đang lưu..."},historySyncLearningMap:{title:"Cách đồng bộ hóa lịch sử hoạt động",description:"Tách biệt -> Chia sẻ -> Sâu hơn. Dùng Sync trên từng dòng để áp dụng thay đổi.",learningMap:"Bản đồ học tập",isolated:"Tách biệt",shared:"Chia sẻ",deeper:"Sâu hơn",cliproxyManaged_one:"{{count}} Tài khoản nhóm CLIProxy Claude được quản lý trong trang Action Center / CLIProxy.",cliproxyManaged_other:"{{count}} Tài khoản CLIProxy Claude pool được quản lý trong trang Action Center / CLIProxy.",showDetails:"Hiển thị chi tiết: nhóm, chuyển đổi và chính sách kế thừa",modeSwitch:"Chuyển đổi chế độ",modeSwitchDesc:"Hộp thoại đồng bộ hóa cho phép người dùng di chuyển giữa cách ly/chia sẻ và chọn tính liên tục sâu hơn.",historySyncGroup:"Nhóm đồng bộ hóa lịch sử",historySyncGroupDesc:"Cùng một nhóm nghĩa là chia sẻ cùng bối cảnh project. Nếu để trống sẽ dùng nhóm mặc định.",legacyConfirmation_one:"{{count}} tài khoản cũ vẫn cần xác nhận rõ ràng.",legacyConfirmation_other:"{{count}} tài khoản cũ vẫn cần xác nhận rõ ràng."},accountsTable:{name:"Tên",type:"Kiểu",defaultBadge:"mặc định",created:"Ngày tạo",lastUsed:"Được sử dụng lần cuối",historySync:"Đồng bộ hóa lịch sử",actions:"Hành động",syncTitle:"Chỉnh sửa chế độ đồng bộ, nhóm và độ sâu liên tục",confirmLegacyTitle:"Xác nhận chế độ hiện tại của tài khoản cũ này là rõ ràng",sync:"Đồng bộ hóa",confirm:"Xác nhận",active:"Đang hoạt động",setDefault:"Đặt mặc định",deleteAccount:"Xóa tài khoản",cannotDeleteDefault:"Không thể xóa tài khoản mặc định",noAccounts:"Không tìm thấy tài khoản xác thực CCS nào. Sử dụng ccs auth create để thêm tài khoản.",resetToDefault:"Đặt lại về mặc định CCS",deleteDialogTitle:"Xóa tài khoản",deleteDialogDesc:'Bạn có chắc chắn muốn xóa tài khoản "{{name}}" không? Thao tác này sẽ xóa hồ sơ và tất cả dữ liệu phiên của nó. Không thể hoàn tác hành động này.',cancel:"Hủy bỏ",delete:"Xóa",sharedGroupStandard:"chia sẻ ({{group}}, tiêu chuẩn)",sharedGroupDeeper:"chia sẻ ({{group}}, sâu hơn)",sharedGroupLegacy:"chia sẻ ({{group}}, kế thừa tiêu chuẩn)",isolatedLegacy:"tách biệt (mặc định cũ)",isolated:"tách biệt"},addAccountDialog:{title:"Thêm tài khoản {{displayName}}",descKiro:"Chọn phương thức xác thực Kiro, sau đó xác thực qua trình duyệt hoặc nhập từ Kiro IDE.",descDeviceCode:"Nhấp vào Xác thực. Mã xác minh sẽ xuất hiện để bạn nhập vào trang web của nhà cung cấp.",descOauth:"Nhấp vào Xác thực để nhận URL OAuth. Mở nó trong bất kỳ trình duyệt nào để đăng nhập.",powerUserEnabled:"Đã bật chế độ power user",powerUserSkipped:"Danh sách kiểm tra trách nhiệm của AGY bị bỏ qua khỏi Cài đặt > Proxy. Bạn chấp nhận hoàn toàn trách nhiệm về rủi ro tài khoản/OAuth.",authMethod:"Phương thức xác thực",selectKiroAuthMethod:"Chọn phương thức xác thực Kiro",nicknameRequired:"Biệt danh (bắt buộc)",nicknameOptional:"Biệt danh (tùy chọn)",nicknamePlaceholder:"ví dụ: công việc, cá nhân",nicknameRequiredHint:"Bắt buộc với nhà cung cấp này. Dùng tên thân thiện duy nhất (ví dụ: work, personal).",nicknameOptionalHint:"Một cái tên thân thiện để xác định tài khoản này. Tự động tạo từ email nếu để trống.",waitingForAuth:"Đang chờ xác thực...",deviceCodeHint:"Hộp thoại mã xác minh sẽ sớm xuất hiện. Nhập mã trên trang web của nhà cung cấp.",browserHint:"Hoàn tất xác thực trong trình duyệt của bạn. Hộp thoại này sẽ tự động đóng lại.",openUrlLabel:"Mở URL này trong bất kỳ trình duyệt nào để đăng nhập:",copied:"Đã sao chép",copy:"Sao chép",open:"Mở",popupBlocked:"Cửa sổ bật lên bị chặn. Sao chép URL ở trên và mở thủ công trong trình duyệt của bạn.",redirectPasteLabel:"Chuyển hướng không hoạt động? Dán URL gọi lại:",callbackPlaceholder:"Dán URL chuyển hướng vào đây...",submitCallback:"Gửi cuộc gọi lại",submitting:"Đang gửi...",preparingUrl:"Đang chuẩn bị URL đăng nhập...",cancel:"Hủy bỏ",importingToken:"Đang nhập token từ Kiro IDE...",authenticate:"Xác thực",importFromIde:"Nhập từ IDE",importing:"Đang nhập..."},flowViz:{backToProviders:"Quay lại nhà cung cấp",showDetails:"Hiển thị chi tiết",hideDetails:"Ẩn chi tiết",resetLayout:"Đặt lại bố cục",provider:"Nhà cung cấp",totalRequests:"Tổng số yêu cầu",accounts:"Tài khoản",connectionTimeline:"Dòng thời gian kết nối",noRecentConnections:"Không có kết nối gần đây"},quickStats:{totalRequests:"Tổng số yêu cầu",successRate:"Tỷ lệ thành công",totalTokens:"Tổng số token",activeModels:"Mô hình hoạt động"},authMonitor:{accounts:"Tài khoản",accountsCount:"{{count}} tài khoản",success:"Thành công",failed:"Thất bại",successRate:"Tỷ lệ thành công"},accountCard:{resumeAccount:"Tiếp tục tài khoản",pauseAccount:"Tạm dừng tài khoản",quotaLoading:"Hạn ngạch...",quota:"hạn ngạch",quotaUnavailable:"Thông tin quota chưa khả dụng",reauthNeeded:"Cần xác thực lại",failureLabelReauth:"Xác thực lại",failureLabelWorkspace:"Workspace",failureLabelNoAccess:"Không có quyền",failureLabelRetry:"Thử lại",failureLabelReconnect:"Kết nối lại",failureLabelTemporary:"Tạm thời",failureLabelUnavailable:"Chưa khả dụng",failureHintReauth:"Chạy lại luồng xác thực của tài khoản này để làm mới quyền truy cập.",failureHintWorkspace:"Chuyển tài khoản này về workspace còn hoạt động rồi xóa và thêm lại.",failureHintNoAccess:"Tài khoản này không thể truy cập endpoint quota của nhà cung cấp.",failureHintRetry:"Đợi một chút rồi thử lại yêu cầu quota.",failureHintReconnect:"Xóa tài khoản cũ rồi xác thực lại.",failureHintTemporary:"Có vẻ đây là lỗi tạm thời. Hãy thử lại sau.",removeAndReadd:"Xóa và thêm lại tài khoản",autoRefreshFailed:"Tự động làm mới không thành công"},antigravityChecklist:{title:"Trách nhiệm OAuth Antigravity",subtitle:"Hoàn thành tất cả 4 bước trước khi bạn có thể xác thực.",mandatory:"Bắt buộc",completion:"Hoàn thành",stepsCount:"{{current}}/4 bước"},accountSafetyWarning:{title:"Cảnh báo an toàn tài khoản OAuth",subtitle:"Vấn đề #509 · Rủi ro Gemini + AGY OAuth",firstLine:"Issue #509 ghi nhận các trường hợp bị đình chỉ/cấm liên quan đến ccs agy và việc dùng chung tài khoản giữa ccs gemini và ccs agy.",secondLine:"Chỉ tiếp tục nếu bạn chấp nhận hoàn toàn trách nhiệm về OAuth và rủi ro truy cập tài khoản.",issueLabel:"Đọc vấn đề #509",proxySettingsLabel:"Điều khiển Gemini + AGY: Cài đặt > Proxy"},cliproxyDialog:{name:"Tên",provider:"Nhà cung cấp",account:"Tài khoản",accountOptional:"Tài khoản (tùy chọn)",model:"Mô hình",modelOptional:"Mô hình (tùy chọn)",defaultTarget:"Mục tiêu mặc định",defaultTier:"Cấp mặc định",tierConfig:"Cấu hình cấp độ",selectProvider:"Chọn nhà cung cấp...",useDefaultAccount:"Sử dụng tài khoản mặc định",defaultSuffix:"(mặc định)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"Hủy bỏ",create:"Tạo",creating:"Đang tạo...",saveChanges:"Lưu thay đổi",saving:"Đang lưu...",placeholderName:"Gemini của tôi",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"Chỉnh sửa biến thể tổng hợp: {{name}}",editSingleTitle:"Chỉnh sửa biến thể: {{name}}"},profileEditor:{profileInfo:"Thông tin hồ sơ",profileName:"Tên hồ sơ",filePath:"Đường dẫn tệp",lastModified:"Sửa đổi lần cuối",defaultTarget:"Mục tiêu mặc định",quickUsage:"Sử dụng nhanh",runWithProfile:"Chạy với hồ sơ",runOnDroid:"Chạy trên Droid",droidAliasExplicit:"Bí danh Droid (rõ ràng)",overrideToClaude:"Ghi đè lên Claude",overrideToClaudeExplicit:"Ghi đè lên Claude (rõ ràng)",setAsDefault:"Đặt làm mặc định",provider:"Nhà cung cấp",custom:"Tùy chỉnh",providerChooserHint:"Bắt đầu với preset, sau đó bạn vẫn có thể chỉnh URL, API key và ánh xạ mô hình.",featuredProviders:"Nhà cung cấp nổi bật",scrollHint:"Có thể cuộn ngang trên màn hình hẹp",customEndpoint:"Endpoint tùy chỉnh",morePresets:"Thêm preset",customEndpointDescription:"Bắt đầu với URL tương thích Anthropic trống và tự cấu hình mọi thứ."},settings:{sectionLoadFailed:"Không tải được phần",unknownError:"Đã xảy ra lỗi không xác định",reloadPage:"Tải lại trang",refresh:"Làm mới",copy:"Sao chép",copied:"Đã sao chép",saved:"Đã lưu",loading:"Đang tải...",configFileNotFound:"Không tìm thấy tập tin cấu hình"},settingsTabs:{web:"Web",env:"Env",think:"Tư duy",proxy:"Proxy",auth:"Xác thực",backup:"Sao lưu"},settingsAuth:{failedFetchTokens:"Không thể tải token xác thực",failedSaveTokens:"Không thể lưu token",tokensUpdated:"Đã cập nhật token. Khởi động lại CLIProxy để áp dụng.",failedRegenerate:"Không thể tạo lại bí mật",secretRegenerated:"Bí mật quản lý mới được tạo. Khởi động lại CLIProxy để áp dụng.",failedReset:"Không thể đặt lại token",tokensReset:"Token đã được đặt lại về mặc định. Khởi động lại CLIProxy để áp dụng.",description:"Cấu hình token xác thực CLIProxy. Các thay đổi yêu cầu khởi động lại CLIProxy.",apiKey:"Khóa API",custom:"Tùy chỉnh",apiKeyDesc:"Được Claude Code dùng để xác thực qua CLIProxy",apiKeyPlaceholder:"Khóa API",managementSecret:"Bí mật quản lý",managementSecretDesc:"Được bảng điều khiển CCS sử dụng để truy cập API quản lý CLIProxy",managementSecretPlaceholder:"Bí mật quản lý",generateSecret:"Tạo bí mật an toàn mới",resetDefaults:"Đặt lại về mặc định",resetDesc:"Đặt lại cả khóa API và bí mật quản lý về giá trị mặc định.",saving:"Đang lưu...",save:"Lưu"},settingsGlobalEnv:{description:"Biến môi trường được áp dụng cho tất cả hồ sơ không dùng Claude subscription (gemini, codex, agy, ghcp, v.v.)",enabled:"Đã bật Env toàn cầu",disabled:"Env toàn cầu bị vô hiệu hóa",enabledDesc:"Biến Env sẽ được áp dụng cho các hồ sơ bên thứ ba",disabledDesc:"Biến Env sẽ không được áp dụng",envVars:"Biến môi trường",noneConfigured:"Không có biến môi trường nào được cấu hình",addNew:"Thêm biến mới",keyName:"KEY_NAME",value:"giá trị",add:"Thêm",quickAdd:"Thêm nhanh các biến phổ biến",allConfigured:"Tất cả biến phổ biến đã được cấu hình"},settingsBackups:{failedFetch:"Không tìm nạp được bản sao lưu",failedRestore:"Không thể khôi phục bản sao lưu",restoreSuccess:"Đã khôi phục bản sao lưu thành công",title:"Sao lưu cài đặt",description:"Khôi phục các phiên bản trước của tệp settings.json của bạn. Bản sao lưu được tạo tự động khi cài đặt được sửa đổi.",none:"Không có bản sao lưu nào",noneHint:"Bản sao lưu sẽ xuất hiện ở đây khi bạn sửa đổi cài đặt",latest:"Mới nhất",restoring:"Đang khôi phục...",restore:"Khôi phục",restoreConfirmTitle:"Khôi phục bản sao lưu?",restoreConfirmPrefix:"Điều này sẽ thay thế cài đặt hiện tại của bạn bằng bản sao lưu từ",restoreConfirmSuffix:"Không thể hoàn tác hành động này.",cancel:"Hủy bỏ"},settingsWebsearch:{description:"Tìm kiếm trên web dựa trên CLI cho hồ sơ của bên thứ ba (gemini, codex, agy, v.v.)",enabled:"Đã bật Tìm kiếm trên web",disabled:"Tìm kiếm trên web bị vô hiệu hóa",checking:"Đang kiểm tra trạng thái...",providers:"Nhà cung cấp",noneConfigured:"Không có nhà cung cấp nào được cấu hình",noneConfiguredHint:"Cài công cụ CLI để bật các nhà cung cấp WebSearch",checkProviders:"Kiểm tra các nhà cung cấp",installed:"đã cài đặt",notInstalled:"chưa được cài đặt",model:"Mô hình:",howInstall:"Cách cài đặt {{name}} CLI",installGlobally:"Cài đặt trên toàn cầu",requiresKey:"(cần khóa API xAI)",freeTier:"(Có sẵn cấp MIỄN PHÍ)",viewDocs:"Xem tài liệu"},settingsProxy:{failedLoadAgyMode:"Không thể tải chế độ power user AGY",failedUpdateAgyMode:"Không thể cập nhật chế độ power user AGY",failedVerifyAgyMode:"Không thể xác minh trạng thái lưu của chế độ power user AGY",notPersistedAgyMode:"Chế độ power user AGY chưa được lưu bền vững. Cấu hình có thể đã bị tiến trình khác sửa.",agyModeEnabled:"Đã bật chế độ power user AGY.",agyModeDisabled:"Đã tắt chế độ power user AGY.",typePhraseToContinue:'Nhập "{{value}}" để tiếp tục.',description:"Định cấu hình kết nối {{backend}} cục bộ hoặc từ xa cho cấu hình dựa trên proxy",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"Trạng thái phiên bản",connectionMode:"Chế độ kết nối",local:"Cục bộ",remote:"Từ xa",localDesc:"Chạy nhị phân {{backend}} trên máy này",remoteDesc:"Kết nối với máy chủ {{backend}} từ xa",backendBinary:"Tệp thực thi backend",stopProxyToSwitch:"Dừng proxy đang chạy trong Trạng thái phiên bản trước khi chuyển backend.",default:"Mặc định",plusDesc:"Hỗ trợ đầy đủ nhà cung cấp, bao gồm Kiro và GitHub Copilot",originalDesc:"Binary gốc (chỉ Gemini, Codex, Antigravity)",variantsIncompatible:"Các biến thể Kiro/Copilot hiện tại sẽ không hoạt động với CLIProxyAPI. Chuyển sang CLIProxyAPIPlus hoặc xóa các biến thể đó.",safety:"An toàn",agyModeTitle:"Chế độ power user Antigravity",agyModeDesc:"Bỏ qua danh sách kiểm tra trách nhiệm AGY trong quy trình Thêm tài khoản và `ccs agy`.",agyWarning:"Chỉ bật nếu bạn hiểu rõ rủi ro bị đình chỉ/cấm OAuth (#509). CCS không chịu trách nhiệm khi mất tài khoản.",finalConfirm:"Xác nhận cuối cùng",finalConfirmDesc:"Việc bật tính năng này sẽ bỏ qua các điểm kiểm tra an toàn AGY trong cả bảng điều khiển và CLI. Xem lại vấn đề #509 và nhập cụm từ chính xác để tiếp tục.",step1:"Bước 1",readIssue:"Đọc vấn đề #509",step2:"Bước 2",typePrefix:"Nhập",typeSuffix:"để kích hoạt.",typePhraseAria:"Nhập I ACCEPT RISK để bật chế độ power user Antigravity",exactPhrase:"Phải nhập chính xác cụm từ.",enableAgyMode:"Bật chế độ power user",toggleAgyMode:"Chuyển đổi chế độ power user AGY",fallbackSettings:"Cài đặt dự phòng",enableFallback:"Cho phép dự phòng về cục bộ",enableFallbackDesc:"Sử dụng proxy cục bộ nếu không thể truy cập được từ xa",autoStartLocal:"Tự động khởi động proxy cục bộ",autoStartLocalDesc:"Tự động khởi động proxy cục bộ khi dự phòng",advanced:"Nâng cao",debugMode:"Chế độ gỡ lỗi",debugModeDesc:"Bật chẩn đoán dành cho nhà phát triển trong bảng điều khiển trình duyệt",debugModeEnabled:"Đã bật chế độ gỡ lỗi. Kiểm tra bảng điều khiển trình duyệt để biết nhật ký chi tiết.",localProxy:"Proxy cục bộ",port:"Cổng",autoStart:"Tự động khởi động",localAutoStartDesc:"Tự động khởi động proxy cục bộ khi cần",remoteConfigTitle:"Cấu hình máy chủ từ xa",host:"Host",hostPlaceholder:"192.168.1.100 hoặc proxy.example.com",defaultPort:"mặc định {{value}}",portPlaceholder:"Để trống để dùng {{value}}",protocol:"Giao thức",http:"HTTP",https:"HTTPS",apiKeyOptional:"Khóa API (tùy chọn)",apiKeyPlaceholder:"Đối với điểm cuối API /v1/*",apiKeyDesc:"Dùng cho các yêu cầu API đến /v1/chat/completions",managementKeyOptional:"Khóa quản lý (tùy chọn)",managementKeyPlaceholder:"Đối với điểm cuối /v0/management/*",managementKeyDesc:"Dùng cho API quản lý dashboard. Nếu bỏ trống sẽ dùng Khóa API.",testing:"Đang thử nghiệm...",testConnection:"Kiểm tra kết nối",connectedLatency:"Đã kết nối ({{value}}ms)",connectionFailed:"Kết nối không thành công",invalidPortOrEmpty:"Cổng phải là số nguyên từ 1 đến 65535 hoặc để trống theo mặc định",invalidLocalPort:"Cổng cục bộ phải là số nguyên từ 1 đến 65535",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"Định cấu hình tư duy/lý luận mở rộng cho các mô hình được hỗ trợ.",supportedProviders:"Nhà cung cấp được hỗ trợ",modeTitle:"Chế độ Thinking",modeAutoDesc:"Tự động thiết lập tư duy dựa trên tầng mô hình",modeOffDesc:"Vô hiệu hóa suy nghĩ mở rộng",modeManualDesc:"Đặt mức ghi đè liên tục hoặc sử dụng cờ CLI mỗi lần chạy",tierDefaults:"Mặc định cấp độ",tierDefaultsDesc:"Mức độ tư duy mặc định cho từng tầng mô hình khi ở chế độ tự động.",persistentOverride:"Ghi đè liên tục",persistentOverrideDesc:"Áp dụng cho tất cả các buổi. Cờ CLI vẫn được ưu tiên.",enterCustomBudget:"Nhập ngân sách tùy chỉnh",apply:"Áp dụng",providerOverrides:"Ghi đè nhà cung cấp ({{count}})",providerOverridesDesc:"Ghi đè mặc định cấp độ cho các nhà cung cấp cụ thể. Thêm khóa nhà cung cấp tùy chỉnh nếu cần.",addProviderPlaceholder:"Thêm khóa nhà cung cấp (ví dụ: qwen)",showWarnings:"Hiển thị cảnh báo",showWarningsDesc:"Hiển thị cảnh báo khi các giá trị suy nghĩ bị hạn chế hoặc điều chỉnh",cliEnvOverride:"Ghi đè CLI & Env",supportLine1Prefix:"Ngân sách suy nghĩ:",supportLine1Suffix:"(dựa trên token)",supportLine2Prefix:"Nỗ lực lý luận:",supportLine2SuffixPrefix:"(hậu tố hoặc ",supportLine2SuffixPostfix:": medium/high/xhigh)",supportLine3Prefix:"Hậu tố Codex cố định mức effort (ví dụ ",supportLine3Suffix:"); model không hậu tố sẽ dùng chế độ Thinking."},analytics:{title:"Phân tích",subtitle:"Theo dõi việc sử dụng và thông tin chi tiết",month:"Tháng",allTime:"Tất cả thời gian",updated:"Đã cập nhật {{value}}"},analyticsSummary:{totalTokens:"Tổng số token",totalTokensSubtitle:"{{input}} vào / {{output}} ra",totalCost:"Tổng chi phí",totalCostSubtitle:"trung bình ${{value}}/ngày",cacheTokens:"Token bộ đệm",cacheTokensSubtitle:"${{cost}} ({{percent}}% chi phí)",inputCost:"Chi phí đầu vào",outputCost:"Chi phí đầu ra",tokensSubtitle:"{{value}} token"},apiProfiles:{title:"Hồ sơ API",new:"Mới",searchPlaceholder:"Tìm kiếm hồ sơ...",loadingProfiles:"Đang tải hồ sơ...",failedLoadTitle:"Không tải được hồ sơ",failedLoadDesc:"Không thể tìm nạp hồ sơ API. Vui lòng thử lại.",retry:"Thử lại",noProfilesYet:"Chưa có hồ sơ API nào",noProfilesDesc:"Tạo hồ sơ đầu tiên của bạn để kết nối với các điểm cuối API tùy chỉnh",createProfile:"Tạo hồ sơ",noProfileMatch:'Không có hồ sơ nào khớp với "{{query}}"',profileCount:"{{count}} hồ sơ",profileCount_other:"{{count}} hồ sơ",configuredCount:"{{count}} đã cấu hình",deleteProfileTitle:"Xóa hồ sơ",deleteProfileDesc:'Bạn có chắc chắn muốn xóa "{{name}}" không? Thao tác này sẽ xóa tệp cài đặt và không thể hoàn tác.',delete:"Xóa",unsavedChangesTitle:"Những thay đổi chưa được lưu",unsavedChangesDesc:'Bạn có những thay đổi chưa được lưu trong "{{current}}". Hủy và chuyển sang "{{next}}"?',discardSwitch:"Loại bỏ và chuyển đổi"},accountsPage:{title:"Tài khoản",managePrefix:"Quản lý",manageSuffix:"tài khoản và nhóm đồng bộ từ một nơi.",mobileManageSuffix:"tính liên tục cho mỗi tài khoản.",primaryActions:"Hành động chính",createAccount:"Tạo tài khoản",authClaudeInPool:"Xác thực Claude trong Pool",openClaudePoolSettings:"Mở cài đặt Claude pool",openCliProxyClaudePool:"Mở CLIProxy Claude Pool",migrationFollowup:"Theo dõi sau di chuyển",legacyContextPending:"{{count}} tài khoản vẫn cần xác nhận chế độ lần đầu.",legacyContextPending_other:"{{count}} tài khoản vẫn cần xác nhận chế độ lần đầu.",legacyContinuityPending:"{{count}} tài khoản được chia sẻ vẫn ở mức độ liên tục kế thừa tiêu chuẩn.",legacyContinuityPending_other:"{{count}} tài khoản được chia sẻ vẫn ở mức độ liên tục kế thừa tiêu chuẩn.",confirmingLegacy:"Đang xác nhận chính sách kế thừa...",confirmLegacy:"Xác nhận chính sách kế thừa ({{count}})",noLegacyFollowup:"Không có hoạt động theo dõi kế thừa nào đang chờ xử lý.",continuityGuide:"Hướng dẫn liên tục",expandWhenNeeded:"Chỉ mở rộng khi cần thiết.",sharedStandard:"Tiêu chuẩn chung",sharedStandardDesc:"Chỉ đồng bộ hóa không gian làm việc của dự án. Mặc định tốt nhất cho hầu hết các đội.",sharedDeeper:"Chia sẻ sâu hơn",sharedDeeperPrefix:"Thêm",isolated:"Tách biệt",isolatedDesc:"Không có liên kết. Tốt nhất cho sự tách biệt nghiêm ngặt.",quickCommands:"Lệnh nhanh",quickCommandsDesc:"Sao chép và chạy trong terminal.",workspaceBadge:"Không gian làm việc `ccs auth`",historySyncBadge:"Kiểm soát đồng bộ hóa lịch sử",authAccounts:"Tài khoản xác thực",tableScopePrefix:"Bảng này được cố ý đặt trong phạm vi",tableScopeMiddle:"tài khoản. Sử dụng",tableScopeSuffix:"để thay đổi chế độ/nhóm/độ sâu.",accountMatrix:"Ma trận tài khoản",sharedTotalDesc:"Tổng số tài khoản chia sẻ: {{count}}. Bao gồm thao tác Sync và xác nhận kế thừa.",loadingAccounts:"Đang tải tài khoản..."},health:{justNow:"vừa xong",secondsAgo:"{{count}} giây trước",minutesAgo:"{{count}} phút trước",hoursAgo:"{{count}} giờ trước",systemHealth:"Tình trạng hệ thống",build:"bản dựng {{version}}",lastScan:"Lần quét cuối cùng:",autoRefresh:"Tự động làm mới:",refresh:"Làm mới",checks:"Kiểm tra",version:"Phiên bản",platform:"Nền tảng",liveMonitoring:"Giám sát trực tiếp đang hoạt động",copied:"Đã sao chép vào bảng nhớ tạm",refreshing:"Đang làm mới kiểm tra trạng thái...",fix:"Sửa chữa",applyFix:"Áp dụng bản sửa lỗi",healthLabel:"trạng thái"},updates:{actionRequired:"Hành động bắt buộc",done:"Xong",all:"Tất cả",inboxTitle:"Hộp thư cập nhật",inboxSubtitle:"Tập trung vào các hành động, sau đó đánh dấu các cập nhật đã hoàn tất hoặc bị loại bỏ.",needsAction:"Cần hành động",doneCount:"Xong",searchPlaceholder:"Tìm kiếm hành động hoặc lệnh",noNotices:"Không có thông báo nào khớp với chế độ xem này.",noUpdates:"Hiện không có bản cập nhật nào.",published:"Đã xuất bản {{date}}",markDone:"Đánh dấu hoàn tất",dismiss:"Ẩn",reopen:"Mở lại",doNext:"Làm tiếp theo",impactedIntegrations:"Tích hợp bị ảnh hưởng",impactedDesc:"Các khu vực liên quan dựa trên phạm vi cập nhật và định tuyến.",whyMatters:"Tại sao nó quan trọng",whyMattersDesc:"Chỉ ngữ cảnh ngắn, không có ghi chú phát hành trên tường văn bản.",open:"Mở",progressNeedsAction:"Cần hành động",progressInReview:"Đang xem xét",progressDone:"Xong",progressDismissed:"Bị loại bỏ",statusNew:"Mới",statusStable:"Ổn định",statusPlanned:"Đã lên kế hoạch",dashboard:"Trang tổng quan",cliUsage:"Cách sử dụng CLI"},cliproxyPage:{connected:"Đã kết nối",notConnected:"Chưa kết nối",variant:"Biến thể",parentNotConnected:"Profile gốc chưa kết nối",viaProvider:"qua {{provider}}",emptyTitle:"Trình quản lý hồ sơ CCS",emptyDesc:"Quản lý xác thực OAuth, tùy chọn tài khoản và chọn mô hình cho nhà cung cấp CLIProxy. Cấu hình cách CCS định tuyến yêu cầu đến các backend AI khác nhau.",emptyControlPanelPrefix:"Để biết số liệu thống kê sử dụng trực tiếp và theo dõi thời gian thực, hãy truy cập",controlPanel:"Bảng điều khiển",quickSetup:"Thiết lập nhanh",accountManagement:"Quản lý tài khoản cấp CCS",providers:"Nhà cung cấp",variants:"Biến thể",providerCount:"{{count}} nhà cung cấp",providerCount_other:"{{count}} nhà cung cấp",connectedCount:"{{count}} đã kết nối",variantDisplay:"{{name}} (biến thể {{provider}})"},copilotPage:{title:"Copilot",subtitle:"Proxy GitHub Copilot",setup:"Cài đặt",auth:"Xác thực",daemon:"Daemon",unofficialTitle:"API không chính thức - Bạn phải tự chịu rủi ro khi sử dụng",unofficialItem1:"API được thiết kế ngược - có thể bị hỏng bất cứ lúc nào",unofficialItem2:"Việc sử dụng quá mức có thể gây ra hạn chế tài khoản",unofficialItem3:"Không bảo hành, không chịu trách nhiệm từ CCS",yes:"Có",no:"Không",installed:"Đã cài đặt",missing:"Thiếu",integration:"Tích hợp",enabled:"Đã bật",disabled:"Đã tắt",github:"GitHub",connected:"Đã kết nối",notConnected:"Chưa kết nối",authenticate:"Xác thực",authenticating:"Đang xác thực...",status:"Trạng thái",running:"Đang chạy",stopped:"Đã dừng",port:"Cổng",stopping:"Đang dừng...",stop:"Dừng lại",starting:"Đang bắt đầu...",start:"Bắt đầu",installing:"Đang cài đặt...",installCopilotApi:"Cài đặt copilot-api",proxy:"Proxy",active:"Đang hoạt động",inactive:"Không hoạt động"},cursorPage:{title:"Cursor",beta:"Beta",subtitle:"Bảng điều khiển tích hợp Cursor",unofficialTitle:"API không chính thức - Bạn phải tự chịu rủi ro khi sử dụng",unofficialItem1:"Tích hợp thiết kế ngược có thể bị hỏng bất cứ lúc nào",unofficialItem2:"Lạm dụng hoặc sử dụng quá mức có thể có nguy cơ bị hạn chế tài khoản",unofficialItem3:"Không bảo hành, không chịu trách nhiệm từ CCS",integration:"Tích hợp",authentication:"Xác thực",daemon:"Daemon",enabled:"Đã bật",disabled:"Đã tắt",expired:"Hết hạn",connected:"Đã kết nối",notConnected:"Chưa kết nối",running:"Đang chạy",stopped:"Đã dừng",actions:"Hành động",disableIntegration:"Vô hiệu hóa tích hợp",enableIntegration:"Kích hoạt tích hợp",autoDetectAuth:"Tự động phát hiện xác thực",manualAuthImport:"Nhập xác thực thủ công",stopDaemon:"Dừng Daemon",startDaemon:"Khởi động Daemon",port:"Cổng",configuration:"Cấu hình Cursor",lastModified:"Sửa đổi lần cuối:",neverSaved:"Chưa bao giờ lưu",saving:"Đang lưu...",save:"Lưu",modelConfig:"Cấu hình mô hình",settings:"Cài đặt",info:"Thông tin",presets:"Cài đặt sẵn",presetsDesc:"Áp dụng ánh xạ mô hình được cấu hình sẵn",modelMapping:"Ánh xạ mô hình",modelMappingDesc:"Định cấu hình mô hình nào sẽ sử dụng cho từng tầng",defaultModel:"Mô hình mặc định",defaultModelDesc:"Dùng khi không chỉ định tier cụ thể.",opusModel:"Opus (Có khả năng nhất)",opusModelDesc:"Lý luận phức tạp và phản hồi chất lượng cao nhất.",sonnetModel:"Sonnet (Cân bằng)",sonnetModelDesc:"Khối lượng công việc mã hóa chung và trò chuyện hàng ngày.",haikuModel:"Haiku (Nhanh)",haikuModelDesc:"Đường dẫn yêu cầu nhẹ, độ trễ thấp.",runtimeSettings:"Cài đặt thời gian chạy",autoStartDaemon:"Daemon tự động khởi động",autoStartDesc:"Tự động khởi động daemon Cursor khi dùng tích hợp.",ghostMode:"Chế độ ma",ghostModeDesc:"Gửi x-ghost-mode để giảm telemetry.",provider:"Nhà cung cấp",filePath:"Đường dẫn tệp",availableModels:"Mô hình khả dụng",loadingModels:"Đang tải mô hình...",noModels:"Chưa có siêu dữ liệu mô hình nào. Bắt đầu daemon và làm mới.",default:"Mặc định",rawConfiguration:"Cấu hình thô (JSON)",manualImportTitle:"Nhập xác thực Cursor thủ công",manualImportDesc:"Cung cấp access token và machine ID của Cursor nếu không tự phát hiện được.",accessToken:"Access token",accessTokenPlaceholder:"Dán access token của Cursor",machineId:"ID máy",machineIdPlaceholder:"Hex 32 ký tự (UUID không có dấu gạch nối)",cancel:"Hủy bỏ",import:"Nhập",selectModel:"Chọn mô hình",useDefaultModel:"Sử dụng mô hình mặc định",availableModelCount:"Mô hình khả dụng ({{count}})",invalidPort:"Cổng phải là số nguyên từ 1 đến 65535",defaultModelRequired:"Mô hình mặc định là bắt buộc",savedConfig:"Đã lưu cấu hình Cursor và ánh xạ mô hình",failedSaveConfig:"Không lưu được cấu hình",modelsLoadingWait:"Mô hình vẫn đang tải. Vui lòng đợi trước khi áp dụng preset.",noModelsAvailable:"Chưa có mô hình nào. Hãy khởi động daemon rồi làm mới.",appliedCodexPreset:"Đã áp dụng preset Codex GPT-5.3",appliedClaudePreset:"Đã áp dụng preset Claude 4.6",appliedGeminiPreset:"Đã áp dụng preset Gemini 3",integrationEnabled:"Đã bật tích hợp Cursor",integrationDisabled:"Đã tắt tích hợp Cursor",failedUpdateIntegration:"Không cập nhật được trạng thái tích hợp",credentialsImported:"Đã nhập thông tin xác thực Cursor",autoDetectFailed:"Tự động phát hiện không thành công",manualRequired:"Cần token và machine ID",manualImportFailed:"Nhập thủ công không thành công",failedStartDaemon:"Không thể khởi động daemon",daemonStarted:"Đã khởi động daemon",daemonStartedWithPid:"Daemon đã khởi động (PID: {{pid}})",failedStopDaemon:"Không thể dừng daemon",daemonStopped:"Đã dừng daemon",rawLoading:"Cài đặt thô vẫn đang tải. Vui lòng đợi và thử lại.",invalidJson:"JSON không hợp lệ",rawSaved:"Đã lưu cài đặt thô",rawChanged:"Cài đặt thô đã thay đổi bên ngoài. Làm mới và thử lại.",failedSaveRaw:"Không lưu được cài đặt thô",savedAll:"Đã lưu cấu hình Cursor"},droidPage:{loadingDiagnostics:"Đang tải chẩn đoán Droid...",failedDiagnostics:"Không tải được chẩn đoán Droid.",overview:"Tổng quan",byok:"BYOK",docs:"Tài liệu",runtimeInstall:"Thời gian chạy và cài đặt",status:"Trạng thái",detected:"Đã phát hiện",notFound:"Không tìm thấy",detectionSource:"Nguồn phát hiện",binaryPath:"Đường dẫn nhị phân",installDirectory:"Thư mục cài đặt",version:"Phiên bản",overridePath:"Ghi đè (CCS_DROID_PATH)",configFiles:"Tệp cấu hình",path:"Đường dẫn",resolved:"Đã giải quyết",size:"Kích cỡ",lastModified:"Sửa đổi lần cuối",parseWarning:"Cảnh báo phân tích cú pháp: {{value}}",readWarning:"Đọc cảnh báo: {{value}}",warnings:"Cảnh báo",byokSummary:"Tóm tắt BYOK",activeModelSelector:"Bộ chọn mô hình hoạt động",customModels:"Mô hình tùy chỉnh",ccsManaged:"do CCS quản lý",userManaged:"Do người dùng quản lý",malformedEntries:"Mục nhập không đúng định dạng",providers:"Nhà cung cấp",none:"không có",customModelsTitle:"Mô hình tùy chỉnh",modelName:"Tên/model",provider:"Nhà cung cấp",baseUrl:"URL cơ sở",noCustomModels:"Không có mô hình tùy chỉnh",docsAlignedNotes:"Ghi chú được căn chỉnh trong Tài liệu",factoryDocs:"Tài liệu Factory",providerFactCheckDocs:"Tài liệu kiểm tra thực tế của nhà cung cấp",providerValues:"Giá trị của nhà cung cấp: {{value}}",settingsHierarchy:"Phân cấp cài đặt: {{value}}",settingsTitle:"Cài đặt BYOK của Droid",fixJsonBeforeQuickSettings:"Sửa cú pháp JSON trước khi sử dụng các điều khiển cài đặt nhanh.",fixJsonBeforeReasoning:"Sửa cú pháp JSON trước khi cập nhật cài đặt lý luận BYOK.",unableUpdateReasoning:"Không thể cập nhật cài đặt lý luận mô hình BYOK đã chọn.",fixJsonBeforeBudget:"Sửa cú pháp JSON trước khi cập nhật ngân sách tư duy.",anthropicOnlyBudget:"Ngân sách tư duy chỉ có sẵn cho các mô hình BYOK của Anthropic.",invalidJson:"JSON không hợp lệ: {{value}}",saved:"Đã lưu cài đặt Droid",changedExternally:"Cài đặt Droid đã thay đổi bên ngoài. Làm mới và thử lại.",failedSave:"Không lưu được cài đặt Droid"},sharedPage:{commands:"Lệnh",skills:"Kỹ năng",agents:"Agent",title:"Dữ liệu dùng chung",subtitle:"Các lệnh, kỹ năng và agent được chia sẻ giữa các phiên Claude",totalShared:"Tổng số mục dùng chung",visible:"Hiển thị",markdownDetail:"Chế độ xem chi tiết Markdown",filterPrefix:"Lọc:",configurationRequired:"Cần cấu hình",countsUnavailable:"Không có số liệu",retryCounts:"Số lần thử lại",filterPlaceholder:"Lọc {{tab}} theo tên, mô tả hoặc đường dẫn",showing:"Đang hiển thị {{visible}} trong số {{total}} {{tab}}",showingQuery:'cho "{{query}}"',refreshing:"(đang làm mới...)",loadingShared:"Đang tải {{tab}} dùng chung...",failedLoadShared:"Không tải được danh sách {{tab}} dùng chung",retry:"Thử lại",noSharedFound:"Không tìm thấy {{tab}} dùng chung. Chạy `ccs sync` hoặc thêm mục trong thư mục dùng chung của bạn.",noMatch:'Không có {{tab}} khớp với "{{query}}".',selectOne:"Chọn {{tab}} để xem toàn bộ nội dung.",pathLabel:"Đường dẫn",resolvedSource:"Nguồn đã giải quyết",loadingMarkdown:"Đang tải nội dung Markdown...",failedLoadContent:"Không tải được nội dung",retryContent:"Thử lại nội dung",noMarkdown:"Không có nội dung Markdown khả dụng."}}},ja:{translation:{locale:{en:"英語","zh-CN":"簡体字中国語",vi:"ベトナム語",ja:"日本語"},layout:{languageSwitcher:"言語"},nav:{general:"全般",home:"ホーム",analytics:"分析",identityAccess:"認証とアクセス",apiProfiles:"API プロファイル",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"概要",controlPanel:"コントロールパネル",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"アカウント",allAccounts:"すべてのアカウント",sharedData:"共有データ",compatibleClis:"互換",factoryDroid:"Factory Droid",system:"システム",health:"ヘルス",settings:"設定",openrouterTooltip:"注目: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"プロファイル",cliproxy:"CLIProxy",accounts:"アカウント",health:"ヘルス",configurationRequired:"設定が必要"},auth:{dashboardTitle:"CCS Dashboard",loginDescription:"ダッシュボードにアクセスするには認証情報を入力してください",username:"ユーザー名",password:"パスワード",usernamePlaceholder:"ユーザー名を入力",passwordPlaceholder:"パスワードを入力",signIn:"サインイン",signingIn:"サインイン中...",loginFailed:"ログインに失敗しました"},commonToast:{apiKeyRequired:"API キーは必須です",accountAddedPresetFailed:"アカウントは追加されましたが、デフォルトプリセットの適用に失敗しました",settingsCopied:"設定をクリップボードにコピーしました",enterPresetName:"保存するプリセット名を入力してください",codeCopied:"コードをクリップボードにコピーしました",copyCodeFailed:"コードのコピーに失敗しました",appliedModelAllTiers:"すべてのティアにモデルを適用しました",settingsSaved:"設定を保存しました",defaultTargetUpdated:"デフォルトターゲットを更新しました",failedUpdateDefaultTarget:"デフォルトターゲットを {{target}}{{suffix}} に更新できませんでした"},profileDialog:{editTitle:"プロファイルを編集",createTitle:"API プロファイルを作成",name:"名前",namePlaceholder:"my-api",baseUrl:"ベース URL",baseUrlPlaceholder:"https://api.example.com",apiKey:"API キー",defaultModel:"デフォルトモデル (ANTHROPIC_MODEL)",defaultModelHint:"空欄の場合は {{model}} を使用",modelMappingTitle:"モデルマッピング (Opus/Sonnet/Haiku)",modelMappingDesc:"各ティアに異なるモデル ID を設定します。異なるモデル種別を別バックエンドへ振り分ける API プロキシで便利です。",opusModel:"Opus モデル (ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Sonnet モデル (ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Haiku モデル (ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"キャンセル",saving:"保存中...",update:"更新",create:"作成"},modelTierMapping:{title:"モデルティアマッピング",advanced:"詳細",description:"Claude Code の opus/sonnet/haiku ティアごとに別のモデルを設定します。",autoSuggest:"{{provider}} に基づいて自動提案",opusPlaceholder:"例: anthropic/claude-opus-4",sonnetPlaceholder:"例: anthropic/claude-sonnet-4",haikuPlaceholder:"例: anthropic/claude-3.5-haiku",footer:"これにより ANTHROPIC_DEFAULT_OPUS_MODEL、ANTHROPIC_DEFAULT_SONNET_MODEL、ANTHROPIC_DEFAULT_HAIKU_MODEL を設定します。"},envEditor:{sensitive:"機密",none:"環境変数は設定されていません。",noneHint:"下の入力から追加するか、JSON を直接編集してください。",addVariable:"環境変数を追加",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"値"},setupVariant:{using:"使用中:",variantNameRequired:"バリアント名 *",variantNamePlaceholder:"例: my-gemini, g3, flash",invokeHintPrefix:"この名前で呼び出せます:",model:"モデル",modelPlaceholder:"例: gemini-2.5-pro, claude-opus-4-6-thinking",choosePresetInstead:"代わりにプリセットから選択",selectModel:"モデルを選択",customModelName:"カスタムモデル名...",enterAnyModel:"CLIProxy がサポートする任意のモデル名を入力",defaultModel:"デフォルト: {{model}}",providerDefault:"プロバイダーのデフォルト",back:"戻る",skip:"スキップ",creating:"作成中...",createVariant:"バリアントを作成",skipHint:"アカウント追加だけが目的なら、バリアント作成はスキップできます"},customPresetDialog:{title:"カスタムプリセット",presetNameOptional:"プリセット名 (任意)",presetNamePlaceholder:"例: My Custom Config",codexTipPrefix:"Codex のヒント: サフィックス",codexTipSuffix:"で推論強度を固定できます。サフィックスなしのモデルは思考設定を使います。",defaultModel:"デフォルトモデル",defaultModelDesc:"特定のティア指定がない場合に使用",opusModel:"Opus (最上位)",opusModelDesc:"複雑な推論タスク向け",sonnetModel:"Sonnet (バランス)",sonnetModelDesc:"速度と性能のバランス",haikuModel:"Haiku (高速)",haikuModelDesc:"単純なタスクにすばやく応答",cancel:"キャンセル",savePreset:"プリセットを保存",applyPreset:"プリセットを適用"},componentModelSelector:{selectModel:"モデルを選択",availableModelsCount:"利用可能なモデル ({{count}})",preview:"プレビュー"},searchableSelect:{searchModels:"モデルを検索...",noResults:"一致する結果がありません。"},copilotSettings:{enableCopilot:"Copilot を有効化",enableCopilotDesc:"GitHub Copilot サブスクリプションを利用できるようにします",basicSettings:"基本設定",accountType:"アカウント種別",accountTypeIndividual:"個人",accountTypeBusiness:"ビジネス",accountTypeEnterprise:"エンタープライズ",rateLimiting:"レート制限",rateLimitSeconds:"レート制限 (秒)",noLimit:"制限なし",waitOnRateLimit:"レート制限時に待機",waitOnRateLimitDesc:"制限到達時にエラーではなく待機します",daemonSettings:"デーモン設定",autoStartDaemon:"デーモンを自動起動",autoStartDaemonDesc:"プロファイル使用時に copilot-api を起動します"},providerModelSelector:{selectModel:"モデルを選択",noModelsForProvider:"このプロバイダーで利用可能なモデルはありません",broken:"問題あり",deprecated:"非推奨",paid:"有料",freeTier:"無料ティア",paidTier:"有料ティア",modelKnownIssues:"このモデルには既知の問題があります",viewIssueDetails:"問題の詳細を見る",modelDeprecated:"このモデルは非推奨です",recommended:"推奨",allModelsCount:"すべてのモデル ({{count}})",noModelsAvailable:"利用可能なモデルはありません"},createAuthProfileDialog:{title:"新しいアカウントを作成",description:"認証プロファイルには Claude CLI へのログインが必要です。以下のコマンドをターミナルで実行してください。同期モード、グループ、継続性の深さは後でアカウント一覧から編集できます。",profileName:"プロファイル名",profileNamePlaceholder:"例: work, personal, client",invalidProfileName:"名前は英字で始め、英数字、ハイフン、アンダースコアのみ使用できます。",enableSharedHistory:"他の ccs 認証アカウントとの共有履歴同期を有効にする",historySyncGroupOptional:"履歴同期グループ (任意)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"空欄の場合はデフォルトの共有グループを使用します。スペースはハイフンに正規化されます。",deeperContinuity:"詳細: より深い継続性モード",deeperContinuityHint:"session-env、file-history、shell-snapshots、todos の同期も追加します。認証情報は分離されたままです。",invalidContextGroup:"グループは英字で始め、英数字、ハイフン、アンダースコアのみ使用できます (最大 {{max}} 文字)。",command:"コマンド",commandFallback:"ccs auth create <name>",afterRunPrefix:"コマンド実行後:",afterRunStep1:"ブラウザで Claude のログインを完了します",afterRunStep2:"ここに戻って更新し、新しいアカウントを確認します",poolingHint:"Claude OAuth のプールルーティングを使う場合は、アカウントページのアクションボタンから CLIProxy Claude Pool を利用してください。",close:"閉じる",copied:"コピーしました!",copyCommand:"コマンドをコピー"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"その他"},cliproxyOverviewComponents:{availableModels:"利用可能なモデル",noModelsAvailable:"利用可能なモデルはありません",startSessionHint:"利用可能なモデルを取得するには CLIProxy セッションを開始してください",totalCount:"合計 {{count}}",availableThroughGroupedByProvider:"{{backendLabel}} 経由で利用可能なモデルをプロバイダー別に表示",moreCount:"+{{count}} 件"},categorizedModelSelector:{selectModel:"モデルを選択",noModelsAvailable:"利用可能なモデルはありません",modelPlaceholder:"モデル..."},openrouterQuickStart:{recommended:"推奨",title:"OpenRouter から始める",description:"OpenAI、Anthropic、Google、Meta などの {{modelCountLabel}} モデルを、1 つの API で利用できます。",featureOneApi:"1 つの API で全プロバイダー",featureTierMapping:"モデルティアマッピング",createOpenRouterProfile:"OpenRouter プロファイルを作成",getApiKeyAt:"API キー取得:",or:"または",createCustomProfile:"カスタム API プロファイルを作成"},alibabaCodingPlanQuickStart:{recommended:"推奨",title:"Alibaba Coding Plan を試す",description:"コーディング用途向けに、Anthropic 互換エンドポイント経由で Alibaba Cloud Coding Plan を利用します。",featureEndpoint:"Anthropic 互換エンドポイント",featureKeyFormat:"専用の sk-sp API キー",createAlibabaProfile:"Alibaba Coding Plan プロファイルを作成",readGuideAt:"セットアップガイド:"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Anthropic エンドポイント経由の Model Studio Coding Plan",add:"追加"},credentialHealth:{title:"認証情報の状態",ready:"準備完了",noCredentialsConfigured:"認証情報が未設定です。上のログインボタンから認証してください。",neverUsed:"未使用",justNow:"たった今",unknown:"不明",daysAgo:"{{count}}日前",hoursAgo:"{{count}}時間前",minutesAgo:"{{count}}分前"},proxyStatusWidget:{justNow:"たった今",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",syncReady:"同期準備完了",noConfig:"設定なし",remoteProxy:"リモートプロキシ",active:"稼働中",trafficAutoRouted:"トラフィックは自動でリモートサーバーにルーティングされます",tooltipSync:"CLIProxy にプロファイルを同期",tooltipRestart:"再起動",tooltipStop:"停止",tooltipClose:"閉じる",tooltipVersionSettings:"バージョン設定",versionManagement:"バージョン管理",selectVersionPlaceholder:"インストールするバージョンを選択...",stable:"(安定版)",install:"インストール",versionsAboveUnstable:"{{version}} より新しいバージョンには既知の問題があります",versionsKnownIssues:"バージョン {{version}} には既知の問題があります",lastChecked:"最終確認: {{time}}",notRunning:"停止中",start:"起動",port:"ポート {{port}}",sessionCount:"{{count}} セッション",sessionCount_other:"{{count}} セッション",installFaultyTitle:"既知の問題があるバージョンをインストールしますか?",installFaultyDesc:"既知の不具合範囲 <strong>{{range}}</strong> に含まれる <strong>v{{version}}</strong> をインストールしようとしています。",installFaultyWarning:"このバージョンには既知のバグがあり、失敗したりプロキシが不安定になる可能性があります。",installUnstableTitle:"不安定なバージョンをインストールしますか?",installUnstableDesc:"最大安定版 <strong>v{{maxStable}}</strong> を上回る <strong>v{{version}}</strong> をインストールしようとしています。",installUnstableWarning:"このバージョンには安定性の問題があり、予期しない動作を引き起こす可能性があります。",installUnstableConfirm:"このまま続行しますか?",cancel:"キャンセル",installAnyway:"このままインストール",clickToDowngrade:"クリックしてダウングレード",clickToUpdate:"クリックして更新"},syncStatusCard:{profileSync:"プロファイル同期",ready:"準備完了",noConfig:"設定なし",syncsProfilesDesc:"API プロファイルをローカルの CLIProxy 設定に同期します",runDoctorHint:"設定を生成するには <code>ccs doctor --fix</code> を実行してください。",details:"詳細",syncNow:"今すぐ同期"},syncDialog:{title:"プロファイルをローカル CLIProxy に同期",description:"CCS の API プロファイルをローカルの CLIProxy config.yaml に同期します。",noProfiles:"同期するプロファイルがありません。",createProfilesFirst:"先にプロファイルタブで API プロファイルを作成してください。",modelLabel:"モデル:",ready:"準備完了",profilesToSync_one:"{{count}} 件のプロファイルを同期",profilesToSync_other:"{{count}} 件のプロファイルを同期",cancel:"キャンセル",syncing:"同期中...",synced:"同期完了",syncNow:"今すぐ同期"},errorLogs:{title:"エラーログ",failedRequests_one:"{{count}} 件の失敗したリクエスト",failedRequests_other:"{{count}} 件の失敗したリクエスト",cliproxyDiagnostics:"CLIProxy 診断",showingCount:"{{total}} 件中 50 件のログを表示",selectLog:"詳細を表示するログを選択してください",failedLoadContent:"ログ内容の読み込みに失敗しました",copyAbsolutePath:"絶対パスをコピー",copyRawContent:"生のログ内容をコピー",tabOverview:"概要",tabHeaders:"ヘッダー",tabRequest:"リクエスト",tabResponse:"レスポンス",tabRaw:"生データ",modelLabel:"モデル:",quotaResetsIn:"クォータのリセットまで ",method:"メソッド",provider:"プロバイダー",version:"バージョン",endpoint:"エンドポイント",url:"URL",timestamp:"タイムスタンプ",na:"該当なし",noHeaders:"利用可能なヘッダーはありません",noRequestBody:"リクエストボディなし",noResponseBody:"レスポンスボディなし",rateLimitedMsg:"レート制限です。別のアカウントに切り替えるか、クォータのリセットを待ってください。モデル {{model}} のクォータは上限に達しています。",rateLimitedMsgNoModel:"レート制限です。別のアカウントに切り替えるか、クォータのリセットを待ってください。",authFailedMsg:"認証に失敗しました。CLIProxy 設定で再認証するか、API キーを確認してください。",notFoundMsg:"エンドポイントが見つかりません。このプロバイダーには存在しない可能性があります。",serverErrorMsg:"上流サーバーでエラーが発生しました。後でもう一度試すか、プロバイダーのステータスページを確認してください。",timeoutMsg:"リクエストがタイムアウトしました。ネットワーク接続を確認するか、タイムアウト設定を延長してください。",unknown:"不明"},editAccountContext:{title:"履歴同期の設定",description:'"{{name}}" が他の CCS auth アカウントと履歴や継続性を共有する方法を設定します。',syncMode:"同期モード",selectContextMode:"コンテキストモードを選択",isolatedOption:"分離(同期なし)",sharedOption:"共有(同期あり)",sharedModeHint:"共有モードでは、同じ履歴同期グループ内のアカウントでワークスペースコンテキストを再利用します。",isolatedModeHint:"分離モードでは、このアカウントを他の CCS auth アカウントから完全に切り離します。",historySyncGroup:"履歴同期グループ",groupPlaceholder:"default",groupHint:"小文字に正規化されます(スペースはダッシュに変換)。使用可能: 英字、数字、_、-(最大 {{max}} 文字)。",invalidGroup:"英字で始まる有効なグループ名を入力してください。",continuityDepth:"継続性レベル",selectContinuityDepth:"継続性レベルを選択",standardOption:"標準(プロジェクトのみ)",deeperOption:"拡張継続性(上級者向け)",deeperHint:"上級モードでは、session-env、file-history、shell-snapshots、todos も同期します。",standardHint:"標準モードでは、プロジェクトのワークスペースコンテキストのみ同期します。",credentialsIsolated:"どのモードでも、認証情報と .anthropic はアカウントごとに分離されます。",cancel:"キャンセル",save:"保存",saving:"保存中..."},historySyncLearningMap:{title:"履歴同期の仕組み",description:"分離 -> 共有 -> 拡張共有。変更は各行の「同期」から行います。",learningMap:"概要図",isolated:"分離",shared:"共有",deeper:"拡張共有",cliproxyManaged_one:"{{count}} 件の CLIProxy Claude Pool アカウントは、CLIProxy ページで管理します。",cliproxyManaged_other:"{{count}} 件の CLIProxy Claude Pool アカウントは、CLIProxy ページで管理します。",showDetails:"詳細を表示: グループ、切り替え、レガシーポリシー",modeSwitch:"モード切り替え",modeSwitchDesc:"「同期」ダイアログでは、分離/共有の切り替えと、より深い継続性の選択ができます。",historySyncGroup:"履歴同期グループ",historySyncGroupDesc:"同じグループのアカウントは、同じプロジェクトのコンテキストレーンを共有します。未設定時は default を使います。",legacyConfirmation_one:"{{count}} 件のレガシーアカウントで明示的な確認がまだ必要です。",legacyConfirmation_other:"{{count}} 件のレガシーアカウントで明示的な確認がまだ必要です。"},accountsTable:{name:"名前",type:"種別",defaultBadge:"既定",created:"作成日",lastUsed:"最終使用",historySync:"履歴同期",actions:"操作",syncTitle:"同期モード、グループ、継続性レベルを編集",confirmLegacyTitle:"このレガシーアカウントの現在のモードを明示的に確定する",sync:"同期",confirm:"確定",active:"有効",setDefault:"既定に設定",deleteAccount:"アカウントを削除",cannotDeleteDefault:"既定のアカウントは削除できません",noAccounts:"CCS auth アカウントが見つかりません。追加するには ccs auth create を使ってください。",resetToDefault:"CCS の既定値に戻す",deleteDialogTitle:"アカウントを削除",deleteDialogDesc:'アカウント "{{name}}" を削除しますか? この操作でプロファイルと関連するすべてのセッションデータが削除されます。この操作は元に戻せません。',cancel:"キャンセル",delete:"削除",sharedGroupStandard:"共有({{group}}、標準)",sharedGroupDeeper:"共有({{group}}、拡張)",sharedGroupLegacy:"共有({{group}}、標準・レガシー)",isolatedLegacy:"分離(旧既定値)",isolated:"分離"},addAccountDialog:{title:"{{displayName}} アカウントを追加",descKiro:"Kiro の認証方法を選び、ブラウザーで認証するか Kiro IDE からインポートしてください。",descDeviceCode:"認証をクリックすると、プロバイダーのサイトで入力する確認コードが表示されます。",descOauth:"認証をクリックすると OAuth URL を取得します。任意のブラウザーで開いてサインインしてください。",powerUserEnabled:"上級者モードが有効です",powerUserSkipped:"設定 > プロキシで AGY の責任確認チェックをスキップしています。OAuth / アカウントに関するリスクはすべて自己責任となります。",authMethod:"認証方法",selectKiroAuthMethod:"Kiro の認証方法を選択",nicknameRequired:"ニックネーム(必須)",nicknameOptional:"ニックネーム(任意)",nicknamePlaceholder:"例: work, personal",nicknameRequiredHint:"このプロバイダーでは必須です。重複しないわかりやすい名前を付けてください(例: work, personal)。",nicknameOptionalHint:"このアカウントを識別しやすい名前です。空欄ならメールアドレスから自動生成されます。",waitingForAuth:"認証を待機中...",deviceCodeHint:"確認コードのダイアログがまもなく表示されます。プロバイダーのサイトでコードを入力してください。",browserHint:"ブラウザーで認証を完了してください。このダイアログは自動で閉じます。",openUrlLabel:"サインインするには、この URL を任意のブラウザーで開いてください:",copied:"コピー済み",copy:"コピー",open:"開く",popupBlocked:"ポップアップがブロックされました。上の URL をコピーして、ブラウザーで手動で開いてください。",redirectPasteLabel:"リダイレクトが機能しない場合は、コールバック URL を貼り付けてください:",callbackPlaceholder:"リダイレクト URL をここに貼り付け...",submitCallback:"コールバックを送信",submitting:"送信中...",preparingUrl:"サインイン URL を準備中...",cancel:"キャンセル",importingToken:"Kiro IDE からトークンをインポート中...",authenticate:"認証",importFromIde:"IDE からインポート",importing:"インポート中..."},flowViz:{backToProviders:"プロバイダーに戻る",showDetails:"詳細を表示",hideDetails:"詳細を隠す",resetLayout:"レイアウトをリセット",provider:"プロバイダー",totalRequests:"総リクエスト数",accounts:"アカウント",connectionTimeline:"接続タイムライン",noRecentConnections:"最近の接続はありません"},quickStats:{totalRequests:"総リクエスト数",successRate:"成功率",totalTokens:"総トークン数",activeModels:"アクティブなモデル"},authMonitor:{accounts:"アカウント",accountsCount:"{{count}} アカウント",success:"成功",failed:"失敗",successRate:"成功率"},accountCard:{resumeAccount:"アカウントを再開",pauseAccount:"アカウントを一時停止",quotaLoading:"クォータ...",quota:"クォータ",quotaUnavailable:"クォータ上限を取得できません",reauthNeeded:"再認証が必要",failureLabelReauth:"再認証",failureLabelWorkspace:"ワークスペース",failureLabelNoAccess:"アクセス不可",failureLabelRetry:"再試行",failureLabelReconnect:"再接続",failureLabelTemporary:"一時的",failureLabelUnavailable:"利用不可",failureHintReauth:"このアカウントの認証フローをもう一度実行して更新してください。",failureHintWorkspace:"このアカウントをアクティブなワークスペースに戻してから、削除して再追加してください。",failureHintNoAccess:"このアカウントでは、プロバイダーのクォータエンドポイントにアクセスできません。",failureHintRetry:"しばらく待ってから、クォータリクエストを再試行してください。",failureHintReconnect:"古いアカウントを削除し、再度認証してください。",failureHintTemporary:"一時的な問題のようです。後でもう一度試してください。",removeAndReadd:"削除して再追加",autoRefreshFailed:"自動更新に失敗しました"},antigravityChecklist:{title:"Antigravity OAuth の責任確認",subtitle:"認証する前に 4 ステップすべて完了してください。",mandatory:"必須",completion:"完了状況",stepsCount:"{{current}}/4 ステップ"},accountSafetyWarning:{title:"OAuth アカウント安全性の警告",subtitle:"Issue #509 · Gemini + AGY OAuth リスク",firstLine:"Issue #509 では、CCS AGY と、CCS Gemini と CCS AGY 間での共有アカウント利用に関連する停止・BAN 報告がまとめられています。",secondLine:"OAuth とアカウントアクセスのリスクをすべて自己責任で負う場合のみ続行してください。",issueLabel:"Issue #509 を読む",proxySettingsLabel:"Gemini + AGY の設定: 設定 > プロキシ"},cliproxyDialog:{name:"名前",provider:"プロバイダー",account:"アカウント",accountOptional:"アカウント(任意)",model:"モデル",modelOptional:"モデル(任意)",defaultTarget:"デフォルトターゲット",defaultTier:"デフォルトティア",tierConfig:"ティア設定",selectProvider:"プロバイダーを選択...",useDefaultAccount:"デフォルトのアカウントを使用",defaultSuffix:"(デフォルト)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"キャンセル",create:"作成",creating:"作成中...",saveChanges:"変更を保存",saving:"保存中...",placeholderName:"my-gemini",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"複合バリアントを編集: {{name}}",editSingleTitle:"単一バリアントを編集: {{name}}"},profileEditor:{profileInfo:"プロファイル情報",profileName:"プロファイル名",filePath:"ファイルパス",lastModified:"最終更新",defaultTarget:"デフォルトターゲット",quickUsage:"クイック実行",runWithProfile:"このプロファイルで実行",runOnDroid:"Droid で実行",droidAliasExplicit:"Droid エイリアス(明示)",overrideToClaude:"Claude に切り替え",overrideToClaudeExplicit:"Claude に切り替え(明示)",setAsDefault:"デフォルトに設定",provider:"プロバイダー",custom:"カスタム",providerChooserHint:"まずプリセットを選び、その後で URL、API Key、モデルマッピングを調整できます。",featuredProviders:"注目のプロバイダー",scrollHint:"画面が狭い場合は横にスクロールできます",customEndpoint:"カスタムエンドポイント",morePresets:"その他のプリセット",customEndpointDescription:"空の Anthropic 互換 URL から始め、すべて手動で設定します。"},settings:{sectionLoadFailed:"セクションの読み込みに失敗しました",unknownError:"不明なエラーが発生しました",reloadPage:"ページを再読み込み",refresh:"更新",copy:"コピー",copied:"コピーしました",saved:"保存しました",loading:"読み込み中...",configFileNotFound:"設定ファイルが見つかりません"},settingsTabs:{web:"Web検索",env:"環境変数",think:"思考",proxy:"プロキシ",auth:"認証",backup:"バックアップ"},settingsAuth:{failedFetchTokens:"認証トークンの取得に失敗しました",failedSaveTokens:"トークンの保存に失敗しました",tokensUpdated:"トークンを更新しました。反映するには CLIProxy を再起動してください。",failedRegenerate:"シークレットの再生成に失敗しました",secretRegenerated:"新しい Management Secret を生成しました。反映するには CLIProxy を再起動してください。",failedReset:"トークンのリセットに失敗しました",tokensReset:"トークンをデフォルトに戻しました。反映するには CLIProxy を再起動してください。",description:"CLIProxy の認証トークンを設定します。変更を反映するには CLIProxy の再起動が必要です。",apiKey:"API Key",custom:"カスタム",apiKeyDesc:"Claude Code が CLIProxy への認証に使用します",apiKeyPlaceholder:"API key",managementSecret:"Management Secret",managementSecretDesc:"CCS ダッシュボードが CLIProxy の管理 API にアクセスするために使用します",managementSecretPlaceholder:"Management secret",generateSecret:"新しい安全なシークレットを生成",resetDefaults:"デフォルトに戻す",resetDesc:"API Key と Management Secret の両方をデフォルト値に戻します。",saving:"保存中...",save:"保存"},settingsGlobalEnv:{description:"Claude 以外のサブスクリプション型プロファイル(gemini、codex、agy、ghcp など)に注入する環境変数",enabled:"グローバル環境変数を有効化",disabled:"グローバル環境変数を無効化",enabledDesc:"環境変数をサードパーティープロファイルに注入します",disabledDesc:"環境変数は注入されません",envVars:"環境変数",noneConfigured:"環境変数は未設定です",addNew:"変数を追加",keyName:"KEY_NAME",value:"値",add:"追加",quickAdd:"よく使う変数を追加",allConfigured:"主要な変数はすべて設定済みです"},settingsBackups:{failedFetch:"バックアップの取得に失敗しました",failedRestore:"バックアップの復元に失敗しました",restoreSuccess:"バックアップを復元しました",title:"設定バックアップ",description:"settings.json の以前のバージョンを復元します。設定を変更するとバックアップが自動作成されます。",none:"利用できるバックアップはありません",noneHint:"設定を変更すると、ここにバックアップが表示されます",latest:"最新",restoring:"復元中...",restore:"復元",restoreConfirmTitle:"バックアップを復元しますか?",restoreConfirmPrefix:"現在の設定を次のバックアップで置き換えます:",restoreConfirmSuffix:"この操作は元に戻せません。",cancel:"キャンセル"},settingsWebsearch:{description:"サードパーティープロファイル(gemini、codex、agy など)向けの CLI ベース Web 検索",enabled:"WebSearch を有効化",disabled:"WebSearch を無効化",checking:"状態を確認中...",providers:"プロバイダー",noneConfigured:"プロバイダーが設定されていません",noneConfiguredHint:"Web 検索プロバイダーを有効にするには CLI ツールをインストールしてください",checkProviders:"プロバイダーを確認",installed:"インストール済み",notInstalled:"未インストール",model:"モデル:",howInstall:"{{name}} CLI のインストール方法",installGlobally:"グローバルにインストール",requiresKey:"(xAI API Key が必要)",freeTier:"(無料枠あり)",viewDocs:"ドキュメントを見る"},settingsProxy:{failedLoadAgyMode:"AGY パワーユーザーモードの読み込みに失敗しました",failedUpdateAgyMode:"AGY パワーユーザーモードの更新に失敗しました",failedVerifyAgyMode:"AGY パワーユーザーモードの永続化確認に失敗しました",notPersistedAgyMode:"AGY パワーユーザーモードが保存されませんでした。別のプロセスが設定を変更した可能性があります。",agyModeEnabled:"AGY パワーユーザーモードを有効にしました。",agyModeDisabled:"AGY パワーユーザーモードを無効にしました。",typePhraseToContinue:"続行するには「{{value}}」と入力してください。",description:"プロキシベースのプロファイル用に、ローカルまたはリモートの {{backend}} 接続を設定します",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"インスタンス状態",connectionMode:"接続モード",local:"ローカル",remote:"リモート",localDesc:"このマシンで {{backend}} バイナリを実行します",remoteDesc:"リモートの {{backend}} サーバーに接続します",backendBinary:"バックエンドバイナリ",stopProxyToSwitch:"バックエンドを切り替える前に、インスタンス状態から実行中のプロキシを停止してください。",default:"デフォルト",plusDesc:"Kiro と GitHub Copilot を含むすべてのプロバイダーをサポート",originalDesc:"元のバイナリ(Gemini、Codex、Antigravity のみ)",variantsIncompatible:"既存の Kiro/Copilot バリアントは CLIProxyAPI では動作しません。CLIProxyAPIPlus に切り替えるか、それらのバリアントを削除してください。",safety:"安全設定",agyModeTitle:"Antigravity パワーユーザーモード",agyModeDesc:"アカウント追加画面と `ccs agy` フローで、AGY の責任確認チェックをスキップします。",agyWarning:"OAuth の停止/BAN リスクパターン (#509) を十分理解している場合にのみ使用してください。CCS はアカウント喪失の責任を負いません。",finalConfirm:"最終確認",finalConfirmDesc:"有効にすると、ダッシュボードと CLI の両方で AGY の安全チェックをスキップします。続行する前に issue #509 を確認し、正確なフレーズを入力してください。",step1:"ステップ 1",readIssue:"Issue #509 を読む",step2:"ステップ 2",typePrefix:"有効にするには",typeSuffix:"と入力してください。",typePhraseAria:"Antigravity パワーユーザーモードを有効にするには I ACCEPT RISK と入力してください",exactPhrase:"完全一致で入力してください。",enableAgyMode:"パワーユーザーモードを有効にする",toggleAgyMode:"AGY パワーユーザーモードを切り替え",fallbackSettings:"フォールバック設定",enableFallback:"ローカルへのフォールバックを有効化",enableFallbackDesc:"リモートに接続できない場合はローカルプロキシを使用します",autoStartLocal:"ローカルプロキシを自動起動",autoStartLocalDesc:"フォールバック時にローカルプロキシを自動で起動します",advanced:"詳細設定",debugMode:"デバッグモード",debugModeDesc:"ブラウザコンソールで開発者向け診断を有効にします",debugModeEnabled:"デバッグモードを有効にしました。詳細ログはブラウザコンソールを確認してください。",localProxy:"ローカルプロキシ",port:"ポート",autoStart:"自動起動",localAutoStartDesc:"必要になったらローカルプロキシを自動起動します",remoteConfigTitle:"リモートサーバー設定",host:"ホスト",hostPlaceholder:"192.168.1.100 または proxy.example.com",defaultPort:"デフォルト: {{value}}",portPlaceholder:"{{value}} を使う場合は空欄",protocol:"プロトコル",http:"HTTP",https:"HTTPS",apiKeyOptional:"API Key(任意)",apiKeyPlaceholder:"/v1/* API エンドポイント用",apiKeyDesc:"/v1/chat/completions への API リクエストで使用します",managementKeyOptional:"Management Key(任意)",managementKeyPlaceholder:"/v0/management/* エンドポイント用",managementKeyDesc:"ダッシュボードの管理 API で使用します。未設定の場合は API Key を使用します。",testing:"テスト中...",testConnection:"接続をテスト",connectedLatency:"接続済み({{value}}ms)",connectionFailed:"接続に失敗しました",invalidPortOrEmpty:"ポートは 1〜65535 の整数で入力するか、デフォルトを使う場合は空欄にしてください",invalidLocalPort:"ローカルポートは 1〜65535 の整数で指定してください",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"対応モデルの高度な思考 / 推論設定を行います。",supportedProviders:"対応プロバイダー",modeTitle:"思考モード",modeAutoDesc:"モデルのティアに応じて思考レベルを自動設定します",modeOffDesc:"高度な思考を無効化します",modeManualDesc:"永続的な上書きレベルを設定するか、実行ごとに CLI フラグを使います",tierDefaults:"ティア別デフォルト",tierDefaultsDesc:"自動モード時に各モデルティアへ適用する既定の思考レベルです。",persistentOverride:"永続オーバーライド",persistentOverrideDesc:"すべてのセッションに適用されます。CLI フラグが優先されます。",enterCustomBudget:"カスタム予算を入力",apply:"適用",providerOverrides:"プロバイダー別オーバーライド({{count}})",providerOverridesDesc:"特定のプロバイダーに対してティア別デフォルトを上書きします。必要に応じてカスタムのプロバイダーキーを追加してください。",addProviderPlaceholder:"プロバイダーキーを追加(例: qwen)",showWarnings:"警告を表示",showWarningsDesc:"思考値が制限または調整された場合に警告を表示します",cliEnvOverride:"CLI / 環境変数の上書き",supportLine1Prefix:"思考予算:",supportLine1Suffix:"(トークンベース)",supportLine2Prefix:"推論強度:",supportLine2SuffixPrefix:"(サフィックス、または ",supportLine2SuffixPostfix:": medium/high/xhigh)",supportLine3Prefix:"Codex のサフィックスは推論強度を固定します(例: ",supportLine3Suffix:")。サフィックスなしのモデルは思考モードを使います。"},analytics:{title:"分析",subtitle:"利用状況とインサイトを確認",month:"月",allTime:"全期間",updated:"最終更新: {{value}}"},analyticsSummary:{totalTokens:"総トークン数",totalTokensSubtitle:"入力 {{input}} / 出力 {{output}}",totalCost:"総コスト",totalCostSubtitle:"1日平均 ${{value}}",cacheTokens:"キャッシュトークン",cacheTokensSubtitle:"${{cost}}(コストの{{percent}}%)",inputCost:"入力コスト",outputCost:"出力コスト",tokensSubtitle:"{{value}} トークン"},apiProfiles:{title:"API プロファイル",new:"新規",searchPlaceholder:"プロファイルを検索...",loadingProfiles:"プロファイルを読み込み中...",failedLoadTitle:"プロファイルを読み込めませんでした",failedLoadDesc:"API プロファイルを取得できませんでした。もう一度お試しください。",retry:"再試行",noProfilesYet:"API プロファイルがまだありません",noProfilesDesc:"最初のプロファイルを作成して、カスタム API エンドポイントに接続します",createProfile:"プロファイルを作成",noProfileMatch:'"{{query}}" に一致するプロファイルはありません',profileCount:"{{count}} 件のプロファイル",profileCount_other:"{{count}} 件のプロファイル",configuredCount:"{{count}} 件設定済み",deleteProfileTitle:"プロファイルを削除",deleteProfileDesc:'"{{name}}" を削除しますか?設定ファイルも削除され、この操作は元に戻せません。',delete:"削除",unsavedChangesTitle:"未保存の変更",unsavedChangesDesc:'"{{current}}" に未保存の変更があります。破棄して "{{next}}" に切り替えますか?',discardSwitch:"破棄して切り替え"},accountsPage:{title:"アカウント",managePrefix:"一つの画面で",manageSuffix:"のアカウント管理とプール導線をまとめて扱えます。",mobileManageSuffix:"の継続性設定をまとめて管理できます。",primaryActions:"主要アクション",createAccount:"アカウントを作成",authClaudeInPool:"Pool で Claude を認証",openClaudePoolSettings:"Claude Pool の設定を開く",openCliProxyClaudePool:"CLIProxy Claude Pool を開く",migrationFollowup:"移行フォローアップ",legacyContextPending:"{{count}} 件のアカウントで初回モード確認がまだ必要です。",legacyContextPending_other:"{{count}} 件のアカウントで初回モード確認がまだ必要です。",legacyContinuityPending:"{{count}} 件の共有アカウントが標準のレガシー継続深度のままです。",legacyContinuityPending_other:"{{count}} 件の共有アカウントが標準のレガシー継続深度のままです。",confirmingLegacy:"レガシーポリシーを確認中...",confirmLegacy:"レガシーポリシーを確認({{count}})",noLegacyFollowup:"保留中のレガシーフォローアップはありません。",continuityGuide:"継続性ガイド",expandWhenNeeded:"必要なときだけ展開。",sharedStandard:"共有標準",sharedStandardDesc:"プロジェクトワークスペースの同期のみ。ほとんどのチームに最適な既定値です。",sharedDeeper:"共有拡張",sharedDeeperPrefix:"追加で",isolated:"分離",isolatedDesc:"リンクなし。厳密な分離に最適です。",quickCommands:"クイックコマンド",quickCommandsDesc:"コピーしてターミナルで実行します。",workspaceBadge:"ccs auth ワークスペース",historySyncBadge:"履歴同期設定",authAccounts:"認証アカウント",tableScopePrefix:"この表では",tableScopeMiddle:"のアカウントのみを表示します。モード/グループ/継続性の変更は",tableScopeSuffix:"を使ってください。",accountMatrix:"アカウント一覧",sharedTotalDesc:"共有アカウント合計: {{count}}。ここから同期設定とレガシー確認を行えます。",loadingAccounts:"アカウントを読み込み中..."},health:{justNow:"たった今",secondsAgo:"{{count}}秒前",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",systemHealth:"システムヘルス",build:"ビルド {{version}}",lastScan:"最終スキャン:",autoRefresh:"自動更新:",refresh:"更新",checks:"チェック",version:"バージョン",platform:"プラットフォーム",liveMonitoring:"ライブ監視中",copied:"クリップボードにコピーしました",refreshing:"ヘルスチェックを更新中...",fix:"修正",applyFix:"修正を適用",healthLabel:"ヘルス"},updates:{actionRequired:"対応が必要",done:"完了",all:"すべて",inboxTitle:"更新インボックス",inboxSubtitle:"対応を優先し、その後で完了または非表示にします。",needsAction:"要対応",doneCount:"完了",searchPlaceholder:"対応内容またはコマンドを検索",noNotices:"このビューに一致する通知はありません。",noUpdates:"利用可能な更新はありません。",published:"{{date}} 公開",markDone:"完了にする",dismiss:"非表示",reopen:"再表示",doNext:"次にやる",impactedIntegrations:"影響を受ける連携",impactedDesc:"更新範囲とルーティングに基づく関連領域です。",whyMatters:"重要な理由",whyMattersDesc:"長文のリリースノートではなく、要点だけを表示します。",open:"開く",progressNeedsAction:"要対応",progressInReview:"確認中",progressDone:"完了",progressDismissed:"非表示",statusNew:"新着",statusStable:"安定",statusPlanned:"予定",dashboard:"ダッシュボード",cliUsage:"CLI利用状況"},cliproxyPage:{connected:"接続済み",notConnected:"未接続",variant:"バリアント",parentNotConnected:"親が未接続",viaProvider:"{{provider}} 経由",emptyTitle:"CCS プロファイルマネージャー",emptyDesc:"CLIProxy プロバイダー向けの OAuth 認証、アカウント設定、モデル選択を管理します。CCS が各 AI バックエンドへのリクエストをどうルーティングするかを設定できます。",emptyControlPanelPrefix:"ライブ利用統計とリアルタイム監視は",controlPanel:"コントロールパネルで確認できます",quickSetup:"クイックセットアップ",accountManagement:"CCSレベルのアカウント管理",providers:"プロバイダー",variants:"バリアント",providerCount:"{{count}} 件のプロバイダー",providerCount_other:"{{count}} 件のプロバイダー",connectedCount:"{{count}} 件接続済み",variantDisplay:"{{name}}({{provider}} バリアント)"},copilotPage:{title:"Copilot",subtitle:"GitHub Copilot プロキシ",setup:"セットアップ",auth:"認証",daemon:"デーモン",unofficialTitle:"非公式API: 自己責任で利用してください",unofficialItem1:"リバースエンジニアリングされたAPIのため、いつでも動かなくなる可能性があります",unofficialItem2:"過度な利用でアカウントに制限がかかる可能性があります",unofficialItem3:"CCSは保証も責任も負いません",yes:"はい",no:"いいえ",installed:"インストール済み",missing:"未インストール",integration:"連携",enabled:"有効",disabled:"無効",github:"GitHub",connected:"接続済み",notConnected:"未接続",authenticate:"認証する",authenticating:"認証中...",status:"ステータス",running:"稼働中",stopped:"停止",port:"ポート",stopping:"停止中...",stop:"停止",starting:"起動中...",start:"起動",installing:"インストール中...",installCopilotApi:"copilot-api をインストール",proxy:"プロキシ",active:"有効",inactive:"無効"},cursorPage:{title:"Cursor",beta:"ベータ",subtitle:"Cursor 専用の連携設定",unofficialTitle:"非公式API - 自己責任で利用",unofficialItem1:"リバースエンジニアリング連携のため、いつでも利用不能になる可能性があります",unofficialItem2:"不正利用や過度な利用により、アカウントが制限されるおそれがあります",unofficialItem3:"CCSは保証も責任も負いません",integration:"連携",authentication:"認証",daemon:"デーモン",enabled:"有効",disabled:"無効",expired:"期限切れ",connected:"接続済み",notConnected:"未接続",running:"稼働中",stopped:"停止中",actions:"操作",disableIntegration:"連携を無効化",enableIntegration:"連携を有効化",autoDetectAuth:"認証を自動検出",manualAuthImport:"認証情報を手動インポート",stopDaemon:"デーモンを停止",startDaemon:"デーモンを起動",port:"ポート",configuration:"Cursor設定",lastModified:"最終更新:",neverSaved:"未保存",saving:"保存中...",save:"保存",modelConfig:"モデル設定",settings:"設定",info:"情報",presets:"プリセット",presetsDesc:"事前設定済みのモデルマッピングを適用します",modelMapping:"モデルマッピング",modelMappingDesc:"各ティアで使うモデルを設定します",defaultModel:"デフォルトモデル",defaultModelDesc:"特定のティア指定がない場合に使われます。",opusModel:"Opus(最高性能)",opusModelDesc:"複雑な推論と最高品質の応答向け。",sonnetModel:"Sonnet(バランス)",sonnetModelDesc:"一般的なコーディングや日常的なチャット向け。",haikuModel:"Haiku(高速)",haikuModelDesc:"低レイテンシで軽量なリクエスト向け。",runtimeSettings:"ランタイム設定",autoStartDaemon:"デーモンを自動起動",autoStartDesc:"連携使用時にCursorデーモンを自動で起動します。",ghostMode:"ゴーストモード",ghostModeDesc:"テレメトリ削減のため x-ghost-mode を要求します。",provider:"プロバイダー",filePath:"ファイルパス",availableModels:"利用可能なモデル",loadingModels:"モデルを読み込み中...",noModels:"モデルメタデータはまだありません。デーモンを起動して更新してください。",default:"デフォルト",rawConfiguration:"生の設定(JSON)",manualImportTitle:"Cursor 認証情報の手動インポート",manualImportDesc:"自動検出できない場合は、CursorのアクセストークンとマシンIDを入力してください。",accessToken:"アクセストークン",accessTokenPlaceholder:"Cursorのアクセストークンを貼り付け",machineId:"マシンID",machineIdPlaceholder:"32文字の16進数(ハイフンなしUUID)",cancel:"キャンセル",import:"インポート",selectModel:"モデルを選択",useDefaultModel:"デフォルトモデルを使用",availableModelCount:"利用可能なモデル({{count}})",invalidPort:"ポートは1から65535の整数で指定してください",defaultModelRequired:"デフォルトモデルは必須です",savedConfig:"Cursor設定とモデルマッピングを保存しました",failedSaveConfig:"設定の保存に失敗しました",modelsLoadingWait:"モデルの読み込み中です。プリセットの適用前にしばらくお待ちください。",noModelsAvailable:"まだ利用可能なモデルがありません。先にデーモンを起動して更新してください。",appliedCodexPreset:"GPT-5.3 Codexプリセットを適用しました",appliedClaudePreset:"Claude 4.6プリセットを適用しました",appliedGeminiPreset:"Gemini 3プリセットを適用しました",integrationEnabled:"Cursor連携を有効化しました",integrationDisabled:"Cursor連携を無効化しました",failedUpdateIntegration:"連携状態の更新に失敗しました",credentialsImported:"Cursor認証情報をインポートしました",autoDetectFailed:"自動検出に失敗しました",manualRequired:"トークンとマシンIDは必須です",manualImportFailed:"手動インポートに失敗しました",failedStartDaemon:"デーモンの起動に失敗しました",daemonStarted:"デーモンを起動しました",daemonStartedWithPid:"デーモンを起動しました(PID: {{pid}})",failedStopDaemon:"デーモンの停止に失敗しました",daemonStopped:"デーモンを停止しました",rawLoading:"生の設定をまだ読み込み中です。しばらく待ってから再試行してください。",invalidJson:"JSONが不正です",rawSaved:"生の設定を保存しました",rawChanged:"生の設定が外部で変更されました。更新して再試行してください。",failedSaveRaw:"生の設定の保存に失敗しました",savedAll:"Cursor設定を保存しました"},droidPage:{loadingDiagnostics:"Droid診断を読み込み中...",failedDiagnostics:"Droid診断の読み込みに失敗しました。",overview:"概要",byok:"BYOK",docs:"ドキュメント",runtimeInstall:"ランタイムとインストール",status:"状態",detected:"検出済み",notFound:"未検出",detectionSource:"検出元",binaryPath:"バイナリパス",installDirectory:"インストール先",version:"バージョン",overridePath:"オーバーライド(CCS_DROID_PATH)",configFiles:"設定ファイル",path:"パス",resolved:"解決先",size:"サイズ",lastModified:"最終更新",parseWarning:"解析警告: {{value}}",readWarning:"読み取り警告: {{value}}",warnings:"警告",byokSummary:"BYOK概要",activeModelSelector:"現在のモデルセレクター",customModels:"カスタムモデル",ccsManaged:"CCS管理",userManaged:"ユーザー管理",malformedEntries:"不正なエントリ",providers:"プロバイダー",none:"なし",customModelsTitle:"カスタムモデル",modelName:"名前 / モデル",provider:"プロバイダー",baseUrl:"ベース URL",noCustomModels:"カスタムモデルはありません",docsAlignedNotes:"ドキュメント整合メモ",factoryDocs:"Factory Docs",providerFactCheckDocs:"プロバイダー検証ドキュメント",providerValues:"プロバイダー値: {{value}}",settingsHierarchy:"設定階層: {{value}}",settingsTitle:"Droid BYOK 設定",fixJsonBeforeQuickSettings:"クイック設定を使う前に JSON 構文を修正してください。",fixJsonBeforeReasoning:"BYOK 推論設定を更新する前に JSON 構文を修正してください。",unableUpdateReasoning:"選択した BYOK モデルの推論設定を更新できません。",fixJsonBeforeBudget:"思考予算を更新する前に JSON 構文を修正してください。",anthropicOnlyBudget:"思考予算は Anthropic の BYOK モデルでのみ利用できます。",invalidJson:"JSON が不正です: {{value}}",saved:"Droid 設定を保存しました",changedExternally:"Droid 設定が外部で変更されました。更新して再試行してください。",failedSave:"Droid 設定の保存に失敗しました"},sharedPage:{commands:"コマンド",skills:"スキル",agents:"エージェント",title:"共有データ",subtitle:"Claudeインスタンス間で共有されるコマンド、スキル、エージェント",totalShared:"共有数",visible:"表示中",markdownDetail:"Markdown詳細ビュー",filterPrefix:"フィルター:",configurationRequired:"設定が必要です",countsUnavailable:"件数を取得できません",retryCounts:"件数を再取得",filterPlaceholder:"{{tab}}を名前、説明、パスで絞り込み",showing:"{{visible}} / {{total}} 件の{{tab}}を表示",showingQuery:"(「{{query}}」で絞り込み)",refreshing:"(更新中...)",loadingShared:"共有{{tab}}を読み込み中...",failedLoadShared:"共有{{tab}}の読み込みに失敗しました",retry:"再試行",noSharedFound:"共有{{tab}}が見つかりません。`ccs sync` を実行するか、共有ディレクトリに項目を追加してください。",noMatch:"{{tab}}で「{{query}}」に一致するものはありません。",selectOne:"内容を表示する{{tab}}を選択してください。",pathLabel:"パス",resolvedSource:"解決後ソース",loadingMarkdown:"Markdownコンテンツを読み込み中...",failedLoadContent:"コンテンツの読み込みに失敗しました",retryContent:"再読み込み",noMarkdown:"Markdownコンテンツはありません。"}}}};He.isInitialized||He.use(Rw).init({resources:Fw,lng:Gw(),fallbackLng:"en",interpolation:{escapeValue:!1}});const Vw={theme:"system",setTheme:()=>null,isDark:!1},cx=S.createContext(Vw);function Qw({children:n,defaultTheme:a="system",storageKey:s="vite-ui-theme"}){const[l,c]=S.useState(()=>localStorage.getItem(s)||a),[f,h]=S.useState(()=>typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1);S.useEffect(()=>{const y=window.matchMedia("(prefers-color-scheme: dark)"),C=x=>{h(x.matches)};return y.addEventListener("change",C),()=>y.removeEventListener("change",C)},[]);const p=l==="dark"||l==="system"&&f;S.useEffect(()=>{const y=window.document.documentElement;y.classList.remove("light","dark"),y.classList.add(p?"dark":"light")},[p]);const m={theme:l,setTheme:y=>{localStorage.setItem(s,y),c(y)},isDark:p};return r.jsx(cx.Provider,{value:m,children:n})}const ux=S.createContext(null),Ug="ccs-privacy-mode";function Ww({children:n}){const[a,s]=S.useState(()=>typeof window<"u"?localStorage.getItem(Ug)==="true":!1);S.useEffect(()=>{localStorage.setItem(Ug,String(a))},[a]);const l=S.useCallback(()=>s(f=>!f),[]),c=S.useMemo(()=>({privacyMode:a,togglePrivacyMode:l}),[a,l]);return r.jsx(ux.Provider,{value:c,children:n})}function _d(){const n=S.useContext(ux);if(!n)throw new Error("usePrivacy must be used within a PrivacyProvider");return n}const dx="blur-[4px] select-none hover:blur-none transition-all duration-200",$w="/api/auth";async function zd(n,a){const s=await fetch(`${$w}${n}`,{headers:{"Content-Type":"application/json"},credentials:"include",...a});if(!s.ok){const l=await s.json().catch(()=>({error:"Unknown error"}));throw new Error(l.error||s.statusText)}return s.json()}function Xw(){return zd("/check")}function Zw(n,a){return zd("/login",{method:"POST",body:JSON.stringify({username:n,password:a})})}function Jw(){return zd("/logout",{method:"POST"})}const fx=S.createContext(null);function eN({children:n}){const[a,s]=S.useState(!1),[l,c]=S.useState(!1),[f,h]=S.useState(null),[p,m]=S.useState(!0);S.useEffect(()=>{Xw().then(v=>{s(v.authRequired),c(v.authenticated),h(v.username)}).catch(()=>{s(!1),c(!0)}).finally(()=>m(!1))},[]);const y=S.useCallback(async(v,N)=>{const w=await Zw(v,N);c(!0),h(w.username)},[]),C=S.useCallback(async()=>{await Jw(),c(!1),h(null)},[]),x=S.useMemo(()=>({authRequired:a,isAuthenticated:l,username:f,loading:p,login:y,logout:C}),[a,l,f,p,y,C]);return r.jsx(fx.Provider,{value:x,children:n})}function Id(){const n=S.useContext(fx);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n}function tN(){const{authRequired:n,isAuthenticated:a,loading:s}=Id(),l=yr();return s?r.jsx("div",{className:"flex h-screen items-center justify-center",children:r.jsx(jn,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):n?a?r.jsx(md,{}):r.jsx(xS,{to:"/login",state:{from:l},replace:!0}):r.jsx(md,{})}const td=768;function nN(){const[n,a]=S.useState(void 0);return S.useEffect(()=>{const s=window.matchMedia(`(max-width: ${td-1}px)`),l=()=>{a(window.innerWidth<td)};return s.addEventListener("change",l),a(window.innerWidth<td),()=>s.removeEventListener("change",l)},[]),!!n}const hx=S.createContext(null);function Dr(){const n=S.useContext(hx);if(!n)throw new Error("useSidebar must be used within a SidebarProvider.");return n}function B(...n){return lC(rC(n))}function px(n){if(!Number.isFinite(n))return"0";const a=Math.max(0,Math.min(100,n));return`${Math.round(a)}`}const Hg=["#f94144","#f3722c","#f8961e","#f9844a","#f9c74f","#90be6d","#43aa8b","#4d908e","#577590","#277da1"],Vt={success:"#15803d",degraded:"#b45309",failed:"#b91c1c"};function uj(n){let a=2166136261;for(let s=0;s<n.length;s++)a^=n.charCodeAt(s),a=Math.imul(a,16777619);return Hg[(a>>>0)%Hg.length]}function Sd(n){if(!n)return null;try{const a=new Date(n),s=new Date,l=a.getTime()-s.getTime();if(l<=0)return"soon";const c=Math.floor(l/(1e3*60*60));if(c>=24)return a.toLocaleDateString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});const f=Math.floor(l%(1e3*60*60)/(1e3*60));return c>0?`in ${c}h ${f}m`:`in ${f}m`}catch{return null}}function Ud(n){return n.filter(a=>{const s=(a.displayName||a.name||"").toLowerCase();return s.includes("claude")||s.includes("gpt")})}function aN(n){if(n.length===0)return null;const a=Ud(n);if(a.length===0)return 0;const s=a.map(l=>l.percentage).filter(l=>typeof l=="number"&&isFinite(l));return s.length===0?0:Math.min(...s)}function iN(n){if(n.length===0)return null;const a=Ud(n);return a.length===0?null:a.reduce((s,l)=>l.resetTime?s?new Date(l.resetTime)<new Date(s)?l.resetTime:s:l.resetTime:s,null)}const oN=/claude-(?:opus|sonnet)-4(?:[.-])5(?:-thinking)?(?=(?:$|[^a-z0-9]))/i;function dj(n){return oN.test((n||"").trim())}const sN=[{name:"claude-opus-4-6-thinking",displayName:"Claude Opus 4.6 (Thinking)"},{name:"claude-sonnet-4-6",displayName:"Claude Sonnet 4.6"},{name:"gpt-oss-120b",displayName:"GPT-OSS 120B (Medium)"}];function lN(n){const a=n.toLowerCase();return a.includes("claude")||a.includes("gpt")?"primary":a.includes("gemini 3")||a.includes("gemini-3")?"gemini-3":a.includes("gemini 2")||a.includes("gemini-2")?"gemini-2":"other"}function rN(n){if(n.length===0)return[];const a=Ud(n),s=[];if(a.length===0)for(const c of sN)s.push({name:c.name,displayName:c.displayName,percentage:0,tier:"primary",exhausted:!0});for(const c of n){const f=c.displayName||c.name,h=lN(f);s.push({name:c.name,displayName:f,percentage:c.percentage,tier:h,exhausted:h==="primary"&&c.percentage===0})}const l=["primary","gemini-3","gemini-2","other"];return s.sort((c,f)=>{const h=l.indexOf(c.tier)-l.indexOf(f.tier);return h!==0?h:c.displayName.localeCompare(f.displayName)})}function cN(n){const a=new Map;for(const s of n){const l=a.get(s.tier)||[];l.push(s),a.set(s.tier,l)}return a}function Ms(n){const a=(n||"").toLowerCase(),s=a.includes("code review")||a.includes("code_review"),l=a.includes("primary"),c=a.includes("secondary");return s?l?"code-review-5h":c?"code-review-weekly":"code-review":l?"usage-5h":c?"usage-weekly":"unknown"}function uN(n,a){if(Ms(n.label)==="code-review-weekly")return"weekly";const l=n.resetAfterSeconds;if(typeof l!="number"||!isFinite(l)||l<=0)return null;const c=a.find(m=>Ms(m.label)==="usage-5h"&&typeof m.resetAfterSeconds=="number"&&isFinite(m.resetAfterSeconds)&&m.resetAfterSeconds>0),f=a.find(m=>Ms(m.label)==="usage-weekly"&&typeof m.resetAfterSeconds=="number"&&isFinite(m.resetAfterSeconds)&&m.resetAfterSeconds>0);if(!c||!f)return null;const h=Math.abs(l-c.resetAfterSeconds);return Math.abs(l-f.resetAfterSeconds)<=h?"weekly":"5h"}function dN(n,a=[]){const s=typeof n=="string"?n:n.label,l=typeof n=="string"?{label:s,resetAfterSeconds:null}:{label:s,resetAfterSeconds:n.resetAfterSeconds},c=a.length>0?a:[l];switch(Ms(s)){case"usage-5h":return"5h usage limit";case"usage-weekly":return"Weekly usage limit";case"code-review-5h":case"code-review-weekly":case"code-review":{const f=uN(l,c);return f==="5h"?"Code review (5h)":f==="weekly"?"Code review (weekly)":"Code review"}case"unknown":return s}}function Tr(n){if(!n||n.length===0)return{fiveHourWindow:null,weeklyWindow:null,codeReviewWindows:[],unknownWindows:[]};let a=null,s=null;const l=[],c=[],f=[];for(const h of n)switch(Ms(h.label)){case"usage-5h":a||(a=h),f.push(h);break;case"usage-weekly":s||(s=h),f.push(h);break;case"code-review-5h":case"code-review-weekly":case"code-review":l.push(h);break;case"unknown":c.push(h),f.push(h);break}if((!a||!s)&&f.length>0){const h=f.filter(p=>typeof p.resetAfterSeconds=="number"&&p.resetAfterSeconds>=0).sort((p,m)=>(p.resetAfterSeconds||0)-(m.resetAfterSeconds||0));a||(a=h[0]||f[0]||null),s||(s=h.length>1?h[h.length-1]:f.find(p=>p!==a)||null)}return{fiveHourWindow:a,weeklyWindow:s,codeReviewWindows:l,unknownWindows:c}}function fN(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:s}=Tr(n),l=[a,s].filter((h,p,m)=>!!h&&m.indexOf(h)===p),f=(l.length>0?l:n).map(h=>h.remainingPercent);return Math.min(...f)}function hN(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:s}=Tr(n),l=[a,s].filter((h,p,m)=>!!h&&m.indexOf(h)===p),f=(l.length>0?l:n).map(h=>h.resetAt).filter(h=>h!==null);return f.length===0?null:f.sort()[0]}function pN(n){if(!n.success)return null;const a=[n.coreUsage?.fiveHour,n.coreUsage?.weekly].filter(l=>!!l);if(a.length>0)return Math.min(...a.map(l=>l.remainingPercent));const s=n.windows.filter(l=>l.rateLimitType!=="overage");return s.length>0?Math.min(...s.map(l=>l.remainingPercent)):null}function mN(n){if(!n.success)return null;const a=[n.coreUsage?.fiveHour?.resetAt,n.coreUsage?.weekly?.resetAt].filter(l=>!!l);if(a.length>0)return a.sort()[0];const s=n.windows.filter(l=>l.rateLimitType!=="overage").map(l=>l.resetAt).filter(l=>l!==null);return s.length===0?null:s.sort()[0]}function gN(n){if(!n||n.length===0)return null;const a=n.map(s=>s.remainingPercent);return Math.min(...a)}function yN(n){if(!n||n.length===0)return null;const a=n.map(s=>s.resetTime).filter(s=>s!==null);return a.length===0?null:a.sort()[0]}function xN(n){if(!n)return null;const a=[n.premiumInteractions.percentRemaining,n.chat.percentRemaining,n.completions.percentRemaining].filter(s=>typeof s=="number"&&isFinite(s));return a.length===0?null:Math.min(...a)}function Kn(n){return typeof n=="object"&&n!==null}function Ai(n){return typeof n=="number"&&Number.isFinite(n)}function Hd(n){if(!Kn(n))return!1;const a=n.models;return typeof n.success=="boolean"&&Array.isArray(a)}function Mr(n){if(!Kn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.windows)||!("planType"in a)?!1:a.windows.every(s=>Kn(s)&&typeof s.label=="string"&&Ai(s.usedPercent)&&Ai(s.remainingPercent))}function jr(n){if(!Kn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.windows)||"planType"in a?!1:a.windows.every(s=>Kn(s)&&typeof s.rateLimitType=="string"&&Ai(s.remainingPercent)&&typeof s.status=="string")}function Bd(n){if(!Kn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.buckets)?!1:a.buckets.every(s=>Kn(s)&&typeof s.id=="string"&&Ai(s.remainingFraction)&&Ai(s.remainingPercent)&&Array.isArray(s.modelIds))}function Kd(n){if(!Kn(n))return!1;const a=n,s=a.snapshots;return typeof a.success!="boolean"||!Kn(s)?!1:["premiumInteractions","chat","completions"].every(c=>{const f=s[c];return Kn(f)&&Ai(f.percentRemaining)&&Ai(f.percentUsed)})}function bN(n){const a=[];return typeof n.httpStatus=="number"&&a.push(`HTTP ${n.httpStatus}`),typeof n.errorCode=="string"&&n.errorCode.trim()&&a.push(n.errorCode.trim()),a.length>0?a.join(" | "):null}function vN(n,a,s){const l=n.errorDetail?.trim()||null;if(!l)return null;const c=l.toLowerCase();return c===a.toLowerCase()||s&&c===s.toLowerCase()?null:l}function mx(n){if(!n||n.success)return null;const a=n.error?.trim()||"Quota information unavailable",s=n.actionHint?.trim()||null,l=n.errorCode?.trim().toLowerCase()||"",c=bN(n),f=vN(n,a,c),h=a.toLowerCase();return n.needsReauth||l==="token_expired"||l==="reauth_required"||h.includes("token expired")||h.includes("re-authenticate")||h.includes("reauth")||h.includes("expired or invalid")?{label:He.t("accountCard.failureLabelReauth"),summary:a,actionHint:s||He.t("accountCard.failureHintReauth"),technicalDetail:c,rawDetail:f,tone:"warning"}:l==="deactivated_workspace"||n.httpStatus===402||h.includes("workspace deactivated")||h.includes("payment or workspace access required")?{label:He.t("accountCard.failureLabelWorkspace"),summary:a,actionHint:s||He.t("accountCard.failureHintWorkspace"),technicalDetail:c,rawDetail:f,tone:"warning"}:n.isForbidden||n.httpStatus===403||l==="quota_api_forbidden"||h.includes("forbidden")?{label:He.t("accountCard.failureLabelNoAccess"),summary:a,actionHint:s||He.t("accountCard.failureHintNoAccess"),technicalDetail:c,rawDetail:f,tone:"muted"}:n.httpStatus===429||l==="rate_limited"||h.includes("rate limited")?{label:He.t("accountCard.failureLabelRetry"),summary:a,actionHint:s||He.t("accountCard.failureHintRetry"),technicalDetail:c,rawDetail:f,tone:"warning"}:l==="auth_file_missing"||l==="missing_account_id"||h.includes("auth file not found")||h.includes("missing chatgpt-account-id")?{label:He.t("accountCard.failureLabelReconnect"),summary:a,actionHint:s||He.t("accountCard.failureHintReconnect"),technicalDetail:c,rawDetail:f,tone:"muted"}:n.retryable||l==="network_timeout"||l==="network_error"||l==="provider_unavailable"||h.includes("timeout")||h.includes("network")||h.includes("fetch failed")||h.includes("service unavailable")?{label:He.t("accountCard.failureLabelTemporary"),summary:a,actionHint:s||He.t("accountCard.failureHintTemporary"),technicalDetail:c,rawDetail:f,tone:"warning"}:{label:He.t("accountCard.failureLabelUnavailable"),summary:a,actionHint:s,technicalDetail:c,rawDetail:f,tone:"muted"}}function SN(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return Hd(a)?aN(a.models):null;case"codex":return Mr(a)?fN(a.windows):null;case"claude":case"anthropic":return jr(a)?pN(a):null;case"gemini":return Bd(a)?gN(a.buckets):null;case"ghcp":case"github-copilot":return Kd(a)?xN(a.snapshots):null;default:return null}}function CN(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return Hd(a)?iN(a.models):null;case"codex":return Mr(a)?hN(a.windows):null;case"claude":case"anthropic":return jr(a)?mN(a):null;case"gemini":return Bd(a)?yN(a.buckets):null;case"ghcp":case"github-copilot":return Kd(a)?a.quotaResetDate:null;default:return null}}const ir=Ar("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-1 focus-visible:ring-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ct({className:n,variant:a,size:s,asChild:l=!1,...c}){const f=l?gr:"button";return r.jsx(f,{"data-slot":"button",className:B(ir({variant:a,size:s,className:n})),...c})}function In({className:n,type:a,...s}){return r.jsx("input",{type:a,"data-slot":"input",className:B("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...s})}function wN({...n}){return r.jsx(ky,{"data-slot":"sheet",...n})}function NN({...n}){return r.jsx(Ey,{"data-slot":"sheet-portal",...n})}function AN({className:n,...a}){return r.jsx(Oy,{"data-slot":"sheet-overlay",className:B("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),...a})}function kN({className:n,children:a,side:s="right",...l}){return r.jsxs(NN,{children:[r.jsx(AN,{}),r.jsxs(Dy,{"data-slot":"sheet-content",className:B("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",n),...l,children:[a,r.jsxs(Ty,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[r.jsx(vo,{className:"size-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function DN({className:n,...a}){return r.jsx("div",{"data-slot":"sheet-header",className:B("flex flex-col gap-1.5 p-4",n),...a})}function TN({className:n,...a}){return r.jsx(My,{"data-slot":"sheet-title",className:B("text-foreground font-semibold",n),...a})}function MN({className:n,...a}){return r.jsx(jy,{"data-slot":"sheet-description",className:B("text-muted-foreground text-sm",n),...a})}function Ge({className:n,...a}){return r.jsx("div",{"data-slot":"skeleton",className:B("relative overflow-hidden bg-muted/50 before:absolute before:inset-0 before:-translate-x-full","before:bg-gradient-to-r before:from-transparent before:via-muted/30 before:to-transparent","before:animate-[shimmer_2s_infinite_ease-out] rounded-md",n),...a})}function Ci({delayDuration:n=0,...a}){return r.jsx(B0,{"data-slot":"tooltip-provider",delayDuration:n,...a})}function $a({...n}){return r.jsx(Ci,{children:r.jsx(K0,{"data-slot":"tooltip",...n})})}function Xa({...n}){return r.jsx(q0,{"data-slot":"tooltip-trigger",...n})}function Za({className:n,sideOffset:a=0,children:s,...l}){return r.jsx(G0,{children:r.jsxs(Y0,{"data-slot":"tooltip-content",sideOffset:a,className:B("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",n),...l,children:[s,r.jsx(F0,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const jN="sidebar_state",EN=3600*24*7,ON="16rem",PN="18rem",RN="3rem",LN="b";function _N({defaultOpen:n=!0,open:a,onOpenChange:s,className:l,style:c,children:f,...h}){const p=nN(),[m,y]=S.useState(!1),[C,x]=S.useState(n),v=a??C,N=S.useCallback(M=>{const U=typeof M=="function"?M(v):M;s?s(U):x(U),document.cookie=`${jN}=${U}; path=/; max-age=${EN}`},[s,v]),w=S.useCallback(()=>p?y(M=>!M):N(M=>!M),[p,N,y]);S.useEffect(()=>{const M=U=>{U.key===LN&&(U.metaKey||U.ctrlKey)&&(U.preventDefault(),w())};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[w]);const T=v?"expanded":"collapsed",O=S.useMemo(()=>({state:T,open:v,setOpen:N,isMobile:p,openMobile:m,setOpenMobile:y,toggleSidebar:w}),[T,v,N,p,m,y,w]);return r.jsx(hx.Provider,{value:O,children:r.jsx(Ci,{delayDuration:0,children:r.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":ON,"--sidebar-width-icon":RN,...c},className:B("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh min-h-0 w-full overflow-hidden",l),...h,children:f})})})}function zN({side:n="left",variant:a="sidebar",collapsible:s="offcanvas",className:l,children:c,...f}){const{isMobile:h,state:p,openMobile:m,setOpenMobile:y}=Dr();return s==="none"?r.jsx("div",{"data-slot":"sidebar",className:B("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",l),...f,children:c}):h?r.jsx(wN,{open:m,onOpenChange:y,...f,children:r.jsxs(kN,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":PN},side:n,children:[r.jsxs(DN,{className:"sr-only",children:[r.jsx(TN,{children:"Sidebar"}),r.jsx(MN,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:c})]})}):r.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":p,"data-collapsible":p==="collapsed"?s:"","data-variant":a,"data-side":n,"data-slot":"sidebar",children:[r.jsx("div",{"data-slot":"sidebar-gap",className:B("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),r.jsx("div",{"data-slot":"sidebar-container",className:B("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",n==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",l),...f,children:r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:c})})]})}function IN({className:n,onClick:a,...s}){const{toggleSidebar:l}=Dr();return r.jsxs(ct,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:B("size-7",n),onClick:c=>{a?.(c),l()},...s,children:[r.jsx(DS,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function UN({className:n,...a}){return r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:B("flex flex-col gap-2 p-2",n),...a})}function HN({className:n,...a}){return r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:B("flex flex-col gap-2 p-2",n),...a})}function BN({className:n,...a}){return r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:B("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),...a})}function KN({className:n,...a}){return r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:B("relative flex w-full min-w-0 flex-col p-2",n),...a})}function qN({className:n,asChild:a=!1,...s}){const l=a?gr:"div";return r.jsx(l,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:B("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",n),...s})}function GN({className:n,...a}){return r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:B("w-full text-sm",n),...a})}function YN({className:n,...a}){return r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:B("flex w-full min-w-0 flex-col gap-1 group-data-[collapsible=icon]:items-center",n),...a})}function FN({className:n,...a}){return r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:B("group/menu-item relative",n),...a})}const VN=Ar("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:justify-center",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Bg({asChild:n=!1,isActive:a=!1,variant:s="default",size:l="default",tooltip:c,className:f,...h}){const p=n?gr:"button",{isMobile:m,state:y}=Dr(),C=r.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":l,"data-active":a,className:B(VN({variant:s,size:l}),f),...h});return c?(typeof c=="string"&&(c={children:c}),r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:C}),r.jsx(Za,{side:"right",align:"center",hidden:y!=="collapsed"||m,...c})]})):C}function QN({className:n,...a}){return r.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:B("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",n),...a})}function WN({className:n,...a}){return r.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:B("group/menu-sub-item relative",n),...a})}function $N({asChild:n=!1,size:a="md",isActive:s=!1,className:l,...c}){const f=n?gr:"a";return r.jsx(f,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":s,className:B("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",l),...c})}const XN={sm:24,md:32,lg:48};function gx({size:n="md",className:a,showText:s=!0}){const l=XN[n];return r.jsxs("div",{className:B("flex items-center gap-2",a),children:[r.jsx("img",{src:"/logo/ccs-logo-256.png",alt:"CCS Logo",width:l,height:l,className:"rounded"}),s&&r.jsx("span",{className:"font-bold text-lg",children:"CCS Config"})]})}const er="/api",yx="CONFLICT";class fj extends Error{code=yx;constructor(a="Resource modified externally"){super(a),this.name="ApiConflictError"}}function hj(n){return n instanceof Error&&"code"in n&&n.code===yx}function ws(n){return n?/^https?:\/\//i.test(n)||n===er||n.startsWith(`${er}/`)?n:`${er}${n.startsWith("/")?n:`/${n}`}`:er}async function ZN(n){const a=`Request failed (${n.status}${n.statusText?` ${n.statusText}`:""})`,s=await n.text();if(!s)return a;try{const l=JSON.parse(s);return l.error?.trim()?l.error:l.message?.trim()?l.message:a}catch{return s.trim()||a}}async function fe(n,a){const s=await fetch(ws(n),{headers:{"Content-Type":"application/json"},...a});if(!s.ok)throw new Error(await ZN(s));if(s.status===204)return;if((s.headers.get("content-type")?.toLowerCase()??"").includes("application/json"))return await s.json();const c=await s.text();if(c)try{return JSON.parse(c)}catch{return c}}const Be={profiles:{list:()=>fe("/profiles"),create:n=>fe("/profiles",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>fe(`/profiles/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>fe(`/profiles/${n}`,{method:"DELETE"}),discoverOrphans:()=>fe("/profiles/orphans"),registerOrphans:n=>fe("/profiles/orphans/register",{method:"POST",body:JSON.stringify(n)}),copy:(n,a)=>fe(`/profiles/${n}/copy`,{method:"POST",body:JSON.stringify(a)}),export:(n,a=!1)=>fe(`/profiles/${n}/export`,{method:"POST",body:JSON.stringify({includeSecrets:a})}),import:n=>fe("/profiles/import",{method:"POST",body:JSON.stringify(n)})},cliproxy:{list:()=>fe("/cliproxy"),getAuthStatus:()=>fe("/cliproxy/auth"),create:n=>fe("/cliproxy",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>fe(`/cliproxy/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>fe(`/cliproxy/${n}`,{method:"DELETE"}),proxyStatus:()=>fe("/cliproxy/proxy-status"),proxyStart:()=>fe("/cliproxy/proxy-start",{method:"POST"}),proxyStop:()=>fe("/cliproxy/proxy-stop",{method:"POST"}),updateCheck:()=>fe("/cliproxy/update-check"),versions:()=>fe("/cliproxy/versions"),install:(n,a)=>fe("/cliproxy/install",{method:"POST",body:JSON.stringify({version:n,force:a})}),restart:()=>fe("/cliproxy/restart",{method:"POST"}),stats:()=>fe("/cliproxy/usage"),models:()=>fe("/cliproxy/models"),updateModel:(n,a)=>fe(`/cliproxy/models/${n}`,{method:"PUT",body:JSON.stringify({model:a})}),getConfigYaml:async()=>{const n=await fetch(ws("/cliproxy/config.yaml"));if(!n.ok)throw new Error("Failed to load config");return n.text()},saveConfigYaml:async n=>{const a=await fetch(ws("/cliproxy/config.yaml"),{method:"PUT",headers:{"Content-Type":"application/yaml"},body:n});if(!a.ok){const s=await a.json().catch(()=>({error:"Failed to save config"}));throw new Error(s.error||"Failed to save config")}},getAuthFiles:()=>fe("/cliproxy/auth-files"),getAuthFile:async n=>{const a=await fetch(ws(`/cliproxy/auth-files/download?name=${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load auth file");return a.text()},accounts:{list:()=>fe("/cliproxy/auth/accounts"),listByProvider:n=>fe(`/cliproxy/auth/accounts/${n}`),setDefault:(n,a)=>fe(`/cliproxy/auth/accounts/${n}/default`,{method:"POST",body:JSON.stringify({accountId:a})}),remove:(n,a)=>fe(`/cliproxy/auth/accounts/${n}/${a}`,{method:"DELETE"}),pause:(n,a)=>fe(`/cliproxy/auth/accounts/${n}/${a}/pause`,{method:"POST"}),resume:(n,a)=>fe(`/cliproxy/auth/accounts/${n}/${a}/resume`,{method:"POST"}),solo:(n,a)=>fe("/accounts/solo",{method:"POST",body:JSON.stringify({provider:n,accountId:a})}),bulkPause:(n,a)=>fe("/accounts/bulk-pause",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})}),bulkResume:(n,a)=>fe("/accounts/bulk-resume",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})})},auth:{start:(n,a)=>fe(`/cliproxy/auth/${n}/start`,{method:"POST",body:JSON.stringify({nickname:a})}),cancel:n=>fe(`/cliproxy/auth/${n}/cancel`,{method:"POST"}),kiroImport:()=>fe("/cliproxy/auth/kiro/import",{method:"POST"})},errorLogs:{list:()=>fe("/cliproxy/error-logs"),getContent:async n=>{const a=await fetch(ws(`/cliproxy/error-logs/${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load error log");return a.text()}}},accounts:{list:()=>fe("/accounts"),setDefault:n=>fe("/accounts/default",{method:"POST",body:JSON.stringify({name:n})}),resetDefault:()=>fe("/accounts/reset-default",{method:"DELETE"}),delete:n=>fe(`/accounts/${n}`,{method:"DELETE"}),updateContext:(n,a)=>fe(`/accounts/${encodeURIComponent(n)}/context`,{method:"PUT",body:JSON.stringify(a)})},config:{format:()=>fe("/config/format"),get:()=>fe("/config"),update:n=>fe("/config",{method:"PUT",body:JSON.stringify(n)}),migrate:(n=!1)=>fe(`/config/migrate?dryRun=${n}`,{method:"POST"}),rollback:n=>fe("/config/rollback",{method:"POST",body:JSON.stringify({backupPath:n})})},presets:{list:n=>fe(`/settings/${n}/presets`),create:(n,a)=>fe(`/settings/${n}/presets`,{method:"POST",body:JSON.stringify(a)}),delete:(n,a)=>fe(`/settings/${n}/presets/${encodeURIComponent(a)}`,{method:"DELETE"})},cliproxyServer:{get:()=>fe("/cliproxy-server"),update:n=>fe("/cliproxy-server",{method:"PUT",body:JSON.stringify(n)}),getBackend:()=>fe("/cliproxy-server/backend"),updateBackend:(n,a=!1)=>fe("/cliproxy-server/backend",{method:"PUT",body:JSON.stringify({backend:n,force:a})}),test:n=>fe("/cliproxy-server/test",{method:"POST",body:JSON.stringify(n)})},quota:{get:(n,a)=>fe(`/cliproxy/quota/${n}/${encodeURIComponent(a)}`),getCodex:n=>fe(`/cliproxy/quota/codex/${encodeURIComponent(n)}`),getClaude:n=>fe(`/cliproxy/quota/claude/${encodeURIComponent(n)}`),getGemini:n=>fe(`/cliproxy/quota/gemini/${encodeURIComponent(n)}`)}};function pj(){return Dt({queryKey:["cliproxy"],queryFn:()=>Be.cliproxy.list()})}function JN(){return Dt({queryKey:["cliproxy-auth"],queryFn:()=>Be.cliproxy.getAuthStatus()})}function mj(){const n=it();return et({mutationFn:a=>Be.cliproxy.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success("Variant created successfully")},onError:a=>{le.error(a.message)}})}function gj(){const n=it();return et({mutationFn:a=>Be.cliproxy.delete(a),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success("Variant deleted successfully")},onError:a=>{le.error(a.message)}})}function yj(){const n=it();return et({mutationFn:({provider:a,accountId:s})=>Be.cliproxy.accounts.setDefault(a,s),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),le.success("Default account updated")},onError:a=>{le.error(a.message)}})}function xj(){const n=it();return et({mutationFn:({provider:a,accountId:s})=>Be.cliproxy.accounts.remove(a,s),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),le.success("Account removed")},onError:a=>{le.error(a.message)}})}function eA(){const n=it();return et({mutationFn:({provider:a,accountId:s})=>Be.cliproxy.accounts.pause(a,s),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Account paused")},onError:a=>{le.error(a.message)}})}function tA(){const n=it();return et({mutationFn:({provider:a,accountId:s})=>Be.cliproxy.accounts.resume(a,s),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Account resumed")},onError:a=>{le.error(a.message)}})}function bj(){const n=it();return et({mutationFn:({provider:a,accountId:s})=>Be.cliproxy.accounts.solo(a,s),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]});const s=a.paused.length;le.success(`Solo mode: paused ${s} other account${s!==1?"s":""}`)},onError:a=>{le.error(a.message)}})}function vj(){const n=it();return et({mutationFn:({provider:a,accountIds:s})=>Be.cliproxy.accounts.bulkPause(a,s),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(`Paused ${a.succeeded.length} account${a.succeeded.length!==1?"s":""}`),a.failed.length>0&&le.warning(`${a.failed.length} account${a.failed.length!==1?"s":""} failed to pause`)},onError:a=>{le.error(a.message)}})}function Sj(){const n=it();return et({mutationFn:({provider:a,accountIds:s})=>Be.cliproxy.accounts.bulkResume(a,s),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(`Resumed ${a.succeeded.length} account${a.succeeded.length!==1?"s":""}`),a.failed.length>0&&le.warning(`${a.failed.length} account${a.failed.length!==1?"s":""} failed to resume`)},onError:a=>{le.error(a.message)}})}function Cj(){const n=it();return et({mutationFn:({provider:a,nickname:s})=>Be.cliproxy.auth.start(a,s),onSuccess:(a,s)=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),le.success(`Account added for ${s.provider}`)},onError:a=>{le.error(a.message)}})}function wj(){return et({mutationFn:n=>Be.cliproxy.auth.cancel(n),onError:n=>{le.error(n.message)}})}function Nj(){const n=it();return et({mutationFn:()=>Be.cliproxy.auth.kiroImport(),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),a.account?le.success(`Imported Kiro account: ${a.account.email||a.account.id}`):le.success("Kiro token imported")},onError:a=>{le.error(a.message)}})}function Aj(){return Dt({queryKey:["cliproxy-models"],queryFn:()=>Be.cliproxy.models()})}function kj(n){return Dt({queryKey:["presets",n],queryFn:()=>Be.presets.list(n),enabled:!!n})}function Dj(){const n=it();return et({mutationFn:({profile:a,data:s})=>Be.presets.create(a,s),onSuccess:(a,s)=>{n.invalidateQueries({queryKey:["presets",s.profile]}),le.success(`Preset "${s.data.name}" saved`)},onError:a=>{le.error(a.message)}})}function Tj(){const n=it();return et({mutationFn:({profile:a,name:s})=>Be.presets.delete(a,s),onSuccess:(a,s)=>{n.invalidateQueries({queryKey:["presets",s.profile]}),le.success("Preset deleted")},onError:a=>{le.error(a.message)}})}function Mj(){return Dt({queryKey:["proxy-status"],queryFn:()=>Be.cliproxy.proxyStatus(),refetchInterval:3e4})}function jj(){const n=it();return et({mutationFn:()=>Be.cliproxy.proxyStart(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.alreadyRunning?le.info("CLIProxy was already running"):a.started?le.success("CLIProxy started successfully"):le.error(a.error||"Failed to start CLIProxy")},onError:a=>{le.error(a.message)}})}function Ej(){const n=it();return et({mutationFn:()=>Be.cliproxy.proxyStop(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.stopped?le.success(`CLIProxy stopped${a.sessionCount?` (${a.sessionCount} session(s) disconnected)`:""}`):le.error(a.error||"Failed to stop CLIProxy")},onError:a=>{le.error(a.message)}})}function nA(){return Dt({queryKey:["cliproxy-update-check"],queryFn:()=>Be.cliproxy.updateCheck(),staleTime:300*1e3,refetchInterval:300*1e3,refetchOnWindowFocus:!0})}function Oj(){const n=it();return et({mutationKey:["update-backend"],mutationFn:({backend:a,force:s=!1})=>Be.cliproxyServer.updateBackend(a,s),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-update-check"],refetchType:"all"}),n.invalidateQueries({queryKey:["cliproxy-versions"],refetchType:"all"}),n.invalidateQueries({queryKey:["cliproxy-server-config"],refetchType:"all"}),n.invalidateQueries({queryKey:["proxy-status"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Backend updated")},onError:a=>{a.message.includes("Proxy is running")?le.error("Stop the proxy first to change backend"):le.error(a.message)}})}function Pj(){return Dt({queryKey:["cliproxy-versions"],queryFn:()=>Be.cliproxy.versions(),staleTime:300*1e3,refetchOnWindowFocus:!0})}function Rj(){const n=it();return et({mutationFn:({version:a,force:s})=>Be.cliproxy.install(a,s),onSuccess:a=>{a.requiresConfirmation||(n.invalidateQueries({queryKey:["cliproxy-versions"]}),n.invalidateQueries({queryKey:["cliproxy-update-check"]}),n.invalidateQueries({queryKey:["proxy-status"]}),a.success?le.success(a.message||`Installed v${a.version}`):le.error(a.error||"Installation failed"))},onError:a=>{le.error(a.message)}})}function Lj(){const n=it();return et({mutationFn:()=>Be.cliproxy.restart(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.success?le.success(`Proxy restarted on port ${a.port}`):le.error(a.error||"Restart failed")},onError:a=>{le.error(a.message)}})}const aA=V0,iA=Q0,oA=W0;function sA(n){return[{title:n("nav.general"),items:[{path:"/",icon:TS,label:n("nav.home")},{path:"/analytics",icon:MS,label:n("nav.analytics")}]},{title:n("nav.identityAccess"),items:[{path:"/providers",icon:Fy,label:n("nav.apiProfiles"),badge:{icons:["/icons/openrouter.svg","/assets/providers/alibabacloud-color.svg","/icons/ollama.svg"]}},{path:"/cliproxy",icon:Vy,label:n("nav.cliproxyPlus"),isCollapsible:!0,children:[{path:"/cliproxy",label:n("nav.cliproxyOverview")},{path:"/cliproxy/control-panel",icon:jS,label:n("nav.controlPanel")}]},{path:"/copilot",icon:Qy,label:n("nav.githubCopilot")},{path:"/cursor",iconSrc:"/assets/sidebar/cursor.svg",label:n("nav.cursorIde")},{path:"/accounts",icon:$y,label:n("nav.accounts"),isCollapsible:!0,children:[{path:"/accounts",label:n("nav.allAccounts")},{path:"/shared",icon:Wy,label:n("nav.sharedData")}]}]},{title:n("nav.compatibleClis"),items:[{path:"/claude-extension",icon:ES,label:n("nav.claudeExtension")},{path:"/droid",icon:OS,label:n("nav.factoryDroid")}]},{title:n("nav.system"),items:[{path:"/health",icon:js,label:n("nav.health")},{path:"/settings",icon:PS,label:n("nav.settings")}]}]}function lA(){const{t:n}=Lt(),a=yr(),s=jd(),{state:l}=Dr(),{data:c}=nA(),f=sA(n),h=c?.backendLabel??"CLIProxy",p=v=>v.path==="/cliproxy"?h:v.label,m=v=>a.pathname===v,y=v=>v.some(N=>m(N.path)||a.pathname.startsWith(N.path+"/")),C=v=>v.path==="/accounts"?"/shared":v.path,x=v=>{if(v.iconSrc)return r.jsx("img",{src:v.iconSrc,alt:"",className:"w-4 h-4 object-contain"});if(v.icon){const N=v.icon;return r.jsx(N,{className:"w-4 h-4"})}return null};return r.jsxs(zN,{collapsible:"icon",children:[r.jsx(UN,{className:"h-12 flex items-center justify-center",children:r.jsx(gx,{size:"sm",showText:l==="expanded"})}),r.jsx(BN,{children:f.map((v,N)=>r.jsxs(KN,{children:[v.title&&r.jsx(qN,{children:v.title}),r.jsx(GN,{children:r.jsx(YN,{children:v.items.map(w=>r.jsx(FN,{children:w.isCollapsible&&w.children?r.jsxs(aA,{defaultOpen:y(w.children)||m(w.path),className:"group/collapsible",children:[r.jsx(iA,{asChild:!0,children:r.jsxs(Bg,{tooltip:p(w),isActive:y(w.children),onClick:()=>s(C(w)),children:[x(w),r.jsx("span",{className:"group-data-[collapsible=icon]:hidden",children:p(w)}),r.jsx(xr,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 group-data-[collapsible=icon]:hidden"})]})}),r.jsx(oA,{children:r.jsx(QN,{children:w.children.map(T=>r.jsx(WN,{children:r.jsx($N,{asChild:!0,isActive:m(T.path),children:r.jsx(gd,{to:T.path,children:r.jsx("span",{children:T.label})})})},T.path))})})]}):r.jsx(Bg,{asChild:!0,isActive:m(w.path),tooltip:p(w),children:r.jsxs(gd,{to:w.path,children:[x(w),r.jsx("span",{className:"group-data-[collapsible=icon]:hidden flex-1",children:p(w)}),w.badge&&r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:r.jsxs("span",{className:B("group-data-[collapsible=icon]:hidden ml-auto flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded transition-colors",m(w.path)?"bg-white/92 border border-white/65 shadow-sm":"bg-accent/15 text-accent border border-accent/30 group-hover/menu-item:bg-sidebar-accent-foreground/20 group-hover/menu-item:text-sidebar-accent-foreground group-hover/menu-item:border-sidebar-accent-foreground/30"),children:[(w.badge.icons&&w.badge.icons.length>0?w.badge.icons:w.badge.icon?[w.badge.icon]:[]).map(T=>r.jsx("span",{className:B("inline-flex h-4 w-4 items-center justify-center rounded-[3px] border",m(w.path)?"bg-white border-black/10":"bg-background/80 border-border/40 group-hover/menu-item:bg-white/90"),children:r.jsx("img",{src:T,alt:"",className:"h-3 w-3 object-contain"})},T)),w.badge.text&&r.jsx("span",{className:"hidden sm:inline",children:w.badge.text})]})}),r.jsx(Za,{side:"right",children:r.jsx("p",{children:n("nav.openrouterTooltip")})})]})]})})},w.path))})})]},v.title||N))}),r.jsx(HN,{className:"p-4 border-t flex items-center justify-center",children:r.jsx(IN,{})})]})}const xx=()=>{const n=S.useContext(cx);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n};function rA(){const{theme:n,setTheme:a}=xx();return r.jsxs(ct,{variant:"ghost",size:"icon",onClick:()=>a(n==="dark"?"light":"dark"),children:[r.jsx(RS,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),r.jsx(LS,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),r.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function cA(){const{privacyMode:n,togglePrivacyMode:a}=_d();return r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:r.jsx(ct,{variant:"ghost",size:"icon",onClick:a,className:B("h-8 w-8 transition-colors",n&&"text-amber-600 hover:text-amber-700 dark:text-amber-400"),children:n?r.jsx(br,{className:"h-4 w-4"}):r.jsx(vr,{className:"h-4 w-4"})})}),r.jsx(Za,{children:r.jsx("p",{children:n?"Privacy mode ON - Click to show data":"Privacy mode OFF - Click to hide data"})})]})}const uA="https://github.com/kaitranntt/ccs/issues";function dA(){return r.jsx(ct,{variant:"ghost",size:"icon",asChild:!0,title:"Report an issue on GitHub",children:r.jsx("a",{href:uA,target:"_blank",rel:"noopener noreferrer",children:r.jsx(Qy,{className:"w-4 h-4"})})})}const fA="https://docs.ccs.kaitran.ca";function hA(){return r.jsx(ct,{variant:"ghost",size:"icon",asChild:!0,title:"View documentation",children:r.jsx("a",{href:fA,target:"_blank",rel:"noopener noreferrer",children:r.jsx(_S,{className:"w-4 h-4"})})})}function pA(){const[n,a]=S.useState("disconnected"),[s,l]=S.useState(!1),c=S.useRef(null),f=it(),h=S.useRef(0),p=5,m=S.useRef(null),y=S.useRef(()=>{}),C=S.useCallback(N=>{switch(N.type){case"connected":console.log("[WS] Server acknowledged connection");break;case"config-changed":f.invalidateQueries({queryKey:["profiles"]}),f.invalidateQueries({queryKey:["cliproxy"]}),le.info("Configuration updated externally");break;case"settings-changed":f.invalidateQueries({queryKey:["profiles"]}),le.info("Settings file updated");break;case"profiles-changed":f.invalidateQueries({queryKey:["accounts"]}),le.info("Accounts updated");break;case"proxy-status-changed":f.invalidateQueries({queryKey:["proxy-status"]});break;case"pong":break;default:console.log(`[WS] Unknown message: ${N.type}`)}},[f]),x=S.useCallback(()=>{if(c.current?.readyState===WebSocket.OPEN)return;a("connecting");const N=window.location.protocol==="https:"?"wss:":"ws:",w=new WebSocket(`${N}//${window.location.host}`);c.current=w,w.onopen=()=>{a("connected"),l(!1),h.current=0,console.log("[WS] Connected")},w.onmessage=T=>{try{const O=JSON.parse(T.data);C(O),window.dispatchEvent(new CustomEvent("ws-message",{detail:O}))}catch{console.log("[WS] Invalid message")}},w.onclose=()=>{if(a("disconnected"),c.current=null,h.current<p){l(!0);const T=Math.min(1e3*Math.pow(2,h.current),3e4);h.current++,console.log(`[WS] Reconnecting in ${T}ms (attempt ${h.current})`),m.current=setTimeout(()=>{y.current()},T)}else l(!1)},w.onerror=()=>{console.log("[WS] Connection error")}},[C]);y.current=x;const v=S.useCallback(()=>{h.current=p,l(!1),m.current&&(clearTimeout(m.current),m.current=null),c.current?.close()},[]);return S.useEffect(()=>(y.current(),()=>v()),[]),S.useEffect(()=>{const N=setInterval(()=>{c.current?.readyState===WebSocket.OPEN&&c.current.send(JSON.stringify({type:"ping"}))},3e4);return()=>clearInterval(N)},[]),S.useMemo(()=>({status:n,isReconnecting:s,connect:x,disconnect:v}),[n,s,x,v])}function mA(){const{status:n,isReconnecting:a}=pA(),l={connected:{icon:IS,color:"text-green-600",label:"Connected",animate:!1},connecting:{icon:Es,color:"text-yellow-500",label:"Connecting...",animate:!0},disconnected:{icon:a?Es:zS,color:a?"text-amber-500":"text-red-500",label:a?"Reconnecting...":"Disconnected",animate:a}}[n],c=l.icon;return r.jsxs("div",{className:`flex items-center gap-1 text-sm ${l.color}`,children:[r.jsx(c,{className:`w-4 h-4 ${l.animate?"animate-spin":""}`}),r.jsx("span",{className:"hidden sm:inline",children:l.label})]})}function gA(){const[n,a]=S.useState(!1);return n?null:r.jsx("div",{className:"w-full bg-yellow-50 dark:bg-yellow-900/20 border-t border-yellow-200 dark:border-yellow-800 px-4 py-2 transition-colors duration-200",children:r.jsxs("div",{className:"flex items-center justify-center gap-4",children:[r.jsxs("div",{className:"flex items-center gap-2 text-sm text-yellow-800 dark:text-yellow-200",children:[r.jsx(US,{className:"w-4 h-4 flex-shrink-0"}),r.jsx("span",{className:"hidden sm:inline",children:"This dashboard runs locally. All data stays on your machine."}),r.jsx("span",{className:"sm:hidden",children:"Local dashboard - data stays on your device."})]}),r.jsx("button",{onClick:()=>a(!0),className:"text-yellow-600 hover:text-yellow-800 dark:text-yellow-400 flex-shrink-0 p-1 rounded hover:bg-yellow-100 dark:hover:bg-yellow-800/30 transition-colors","aria-label":"Dismiss disclaimer",children:r.jsx(vo,{className:"w-4 h-4"})})]})})}const yA="https://claudekit.cc?ref=HMNKXOHN";function xA(){return r.jsxs("a",{href:yA,target:"_blank",rel:"noopener noreferrer",className:B("group inline-flex items-center gap-2 px-3 py-1.5 rounded-lg","bg-accent/10 border-2 border-accent/40","hover:bg-accent hover:border-accent","transition-all duration-200 shadow-sm hover:shadow-md"),title:"Powered by ClaudeKit Framework",children:[r.jsx("img",{src:"/logos/claudekit-logo.png",alt:"ClaudeKit",className:"w-5 h-5"}),r.jsxs("span",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[r.jsx("span",{className:B("text-[10px] font-medium uppercase tracking-wide","text-muted-foreground group-hover:text-accent-foreground/80","transition-colors"),children:"Powered by"}),r.jsx("span",{className:B("text-xs font-bold text-foreground","group-hover:text-accent-foreground","transition-colors"),children:"ClaudeKit"})]})]})}const bA="https://github.com/sponsors/kaitranntt";function vA(){return r.jsxs("a",{href:bA,target:"_blank",rel:"noopener noreferrer",className:B("group inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg","bg-pink-500/10 border-2 border-pink-500/40","hover:bg-pink-400 hover:border-pink-400","transition-all duration-200 shadow-sm hover:shadow-md"),title:"Sponsor this project on GitHub",children:[r.jsx(HS,{className:B("w-4 h-4 text-pink-500","group-hover:text-white group-hover:fill-white","group-hover:animate-pulse","transition-colors")}),r.jsx("span",{className:B("text-xs font-bold text-pink-600 dark:text-pink-300","group-hover:text-white dark:group-hover:text-white","transition-colors"),children:"Sponsor"})]})}function qd({...n}){return r.jsx(ky,{"data-slot":"dialog",...n})}function SA({...n}){return r.jsx(Ey,{"data-slot":"dialog-portal",...n})}function CA({className:n,...a}){return r.jsx(Oy,{"data-slot":"dialog-overlay",className:B("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),...a})}function Gd({className:n,children:a,showCloseButton:s=!0,...l}){return r.jsxs(SA,{"data-slot":"dialog-portal",children:[r.jsx(CA,{}),r.jsxs(Dy,{"data-slot":"dialog-content",className:B("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n),...l,children:[a,s&&r.jsxs(Ty,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[r.jsx(vo,{}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Yd({className:n,...a}){return r.jsx("div",{"data-slot":"dialog-header",className:B("flex flex-col gap-2 text-center sm:text-left",n),...a})}function wA({className:n,...a}){return r.jsx("div",{"data-slot":"dialog-footer",className:B("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...a})}function Fd({className:n,...a}){return r.jsx(My,{"data-slot":"dialog-title",className:B("text-lg leading-none font-semibold",n),...a})}function Vd({className:n,...a}){return r.jsx(jy,{"data-slot":"dialog-description",className:B("text-muted-foreground text-sm",n),...a})}function NA({open:n,onClose:a,sessionId:s,provider:l,projects:c,defaultProjectId:f,supportsAll:h,onSelect:p,timeoutSeconds:m=30}){const[y,C]=S.useState(f),[x,v]=S.useState(!1),[N,w]=S.useState(m);S.useEffect(()=>{if(!n){w(m);return}const M=setInterval(()=>{w(U=>U<=1?(clearInterval(M),T(!0),0):U-1)},1e3);return()=>clearInterval(M)},[n,m]),S.useEffect(()=>{n&&(C(f),v(!1),w(m))},[n,f,m]);const T=async(M=!1)=>{if(!x){v(!0);try{await p(M?"":y),a()}catch(U){console.error("Failed to submit project selection:",U);try{await p("")}catch{}a()}}},O=l.charAt(0).toUpperCase()+l.slice(1);return r.jsx(qd,{open:n,onOpenChange:M=>!M&&!x&&a(),children:r.jsxs(Gd,{className:"sm:max-w-lg",children:[r.jsxs(Yd,{children:[r.jsxs(Fd,{className:"flex items-center gap-2",children:[r.jsx(Wy,{className:"w-5 h-5"}),"Select Google Cloud Project"]}),r.jsxs(Vd,{children:["Choose which project to use for ",O," authentication.",N>0&&r.jsxs("span",{className:"text-muted-foreground ml-1",children:["(Auto-selecting default in ",N,"s)"]})]})]}),r.jsxs("div",{className:"space-y-4 py-4",children:[r.jsxs("div",{className:"space-y-2",children:[c.map(M=>r.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${y===M.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!x&&C(M.id),children:[y===M.id?r.jsx(cg,{className:"w-5 h-5 text-primary"}):r.jsx(ug,{className:"w-5 h-5 text-muted-foreground"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"font-medium",children:M.name}),r.jsx("div",{className:"text-sm text-muted-foreground font-mono",children:M.id})]}),M.id===f&&r.jsx("span",{className:"text-xs px-2 py-1 bg-secondary rounded",children:"Default"})]},M.id)),h&&r.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${y==="ALL"?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!x&&C("ALL"),children:[y==="ALL"?r.jsx(cg,{className:"w-5 h-5 text-primary"}):r.jsx(ug,{className:"w-5 h-5 text-muted-foreground"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"font-medium",children:"All Projects"}),r.jsxs("div",{className:"text-sm text-muted-foreground",children:["Onboard all ",c.length," listed projects"]})]})]})]}),r.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[r.jsx(ct,{variant:"ghost",onClick:()=>T(!0),disabled:x,children:"Use Default"}),r.jsx(ct,{onClick:()=>T(!1),disabled:x,children:x?r.jsxs(r.Fragment,{children:[r.jsx(jn,{className:"w-4 h-4 mr-2 animate-spin"}),"Selecting..."]}):r.jsxs(r.Fragment,{children:[r.jsx(xo,{className:"w-4 h-4 mr-2"}),"Confirm Selection"]})})]})]})]})})}const bo={gemini:{displayName:"Google Gemini",description:"Gemini Pro/Flash models",oauthFlow:"authorization_code",callbackPort:8085,callbackProviderName:"gemini",authUrlProviderName:"gemini-cli",refreshOwnership:"ccs",authFilePrefixes:["gemini-","google-"],tokenTypeValues:["gemini"],aliases:["gemini-cli"]},codex:{displayName:"OpenAI Codex",description:"GPT-4 and codex models",oauthFlow:"authorization_code",callbackPort:1455,callbackProviderName:"codex",authUrlProviderName:"codex",refreshOwnership:"cliproxy",authFilePrefixes:["codex-","openai-"],tokenTypeValues:["codex"],aliases:[]},agy:{displayName:"Antigravity",description:"Antigravity AI models",oauthFlow:"authorization_code",callbackPort:51121,callbackProviderName:"antigravity",authUrlProviderName:"antigravity",refreshOwnership:"cliproxy",authFilePrefixes:["antigravity-","agy-"],tokenTypeValues:["antigravity"],aliases:["antigravity"]},qwen:{displayName:"Alibaba Qwen",description:"Qwen Code models",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"qwen",authUrlProviderName:"qwen",refreshOwnership:"cliproxy",authFilePrefixes:["qwen-"],tokenTypeValues:["qwen"],aliases:[]},iflow:{displayName:"iFlow",description:"iFlow AI models",oauthFlow:"authorization_code",callbackPort:11451,callbackProviderName:"iflow",authUrlProviderName:"iflow",refreshOwnership:"cliproxy",authFilePrefixes:["iflow-"],tokenTypeValues:["iflow"],aliases:[]},kiro:{displayName:"Kiro (AWS)",description:"AWS CodeWhisperer models",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"kiro",authUrlProviderName:"kiro",refreshOwnership:"cliproxy",authFilePrefixes:["kiro-","aws-","codewhisperer-"],tokenTypeValues:["kiro","codewhisperer"],aliases:["codewhisperer"]},ghcp:{displayName:"GitHub Copilot (OAuth)",description:"GitHub Copilot via OAuth",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"copilot",authUrlProviderName:"github",refreshOwnership:"cliproxy",authFilePrefixes:["github-copilot-","copilot-","gh-"],tokenTypeValues:["github-copilot","copilot"],aliases:["github-copilot","copilot"]},claude:{displayName:"Claude (Anthropic)",description:"Claude Opus/Sonnet models",oauthFlow:"authorization_code",callbackPort:54545,callbackProviderName:"anthropic",authUrlProviderName:"anthropic",refreshOwnership:"unsupported",authFilePrefixes:["claude-","anthropic-"],tokenTypeValues:["claude","anthropic"],aliases:["anthropic"]},kimi:{displayName:"Kimi (Moonshot)",description:"Moonshot AI K2/K2.5 models",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"kimi",authUrlProviderName:"kimi",refreshOwnership:"cliproxy",authFilePrefixes:["kimi-"],tokenTypeValues:["kimi"],aliases:["moonshot"]}},Qd=Object.freeze(Object.keys(bo)),Cd=Object.freeze(["agy","codex","claude","gemini","ghcp"]);new Set(Cd);const AA=Object.freeze([...Cd,...Cd.flatMap(n=>bo[n].aliases),"all"].filter((n,a,s)=>s.indexOf(n)===a));AA.join(", ");new Set(Qd);function kA(n=bo){const a=new Map,s=Object.keys(n),l=(c,f)=>{const h=c.trim().toLowerCase();if(!h)return;const p=a.get(h);if(p&&p!==f)throw new Error(`Provider alias collision for "${h}": ${p} and ${f}`);a.set(h,f)};for(const c of s){l(c,c);for(const f of n[c].aliases)l(f,c)}return a}kA();function DA(n){return Qd.filter(a=>bo[a].oauthFlow===n)}const Wd=Qd;function Ja(n){return Wd.includes(n)}function va(n){return typeof n=="string"?n.trim().toLowerCase():""}const bx=Object.freeze(Object.fromEntries(Wd.map(n=>[n,{displayName:bo[n].displayName,description:bo[n].description}]))),TA={gemini:"/assets/providers/gemini-color.svg",agy:"/assets/providers/agy.png",codex:"/assets/providers/openai.svg",qwen:"/assets/providers/qwen-color.svg",iflow:"/assets/providers/iflow.png",kiro:"/assets/providers/kiro.png",ghcp:"/assets/providers/copilot.svg",claude:"/assets/providers/claude.svg",kimi:"/assets/providers/kimi.svg"},Kg={textClass:"text-gray-600",letter:"?"},MA={gemini:{textClass:"text-blue-600",letter:"G"},claude:{textClass:"text-orange-600",letter:"C"},codex:{textClass:"text-emerald-600",letter:"X"},agy:{textClass:"text-violet-600",letter:"A"},qwen:{textClass:"text-cyan-600",letter:"Q"},iflow:{textClass:"text-indigo-600",letter:"i"},kiro:{textClass:"text-teal-600",letter:"K"},ghcp:{textClass:"text-green-600",letter:"C"},kimi:{textClass:"text-orange-500",letter:"K"}},jA=new Set(["kimi"]);function vx(n){const a=va(n);if(Ja(a))return TA[a]}function EA(n){const a=va(n);return Ja(a)?MA[a]:{...Kg,letter:a[0]?.toUpperCase()||Kg.letter}}function OA(n){const a=va(n);return Ja(a)&&jA.has(a)}const $d={gemini:"#4285F4",agy:"#f3722c",codex:"#10a37f",vertex:"#4285F4",iflow:"#f94144",qwen:"#6236FF",kiro:"#4d908e",ghcp:"#43aa8b",claude:"#D97757",kimi:"#FF6B35"},PA={...Object.fromEntries(Wd.map(n=>[n,bx[n].displayName])),vertex:"Vertex AI"};function Xd(n){const a=va(n);return a?PA[a]||String(n):"Unknown provider"}function RA(n){const a=va(n);return Ja(a)?bx[a].description:""}const LA=[...DA("device_code")],_A=Object.freeze({ghcp:"GitHub Copilot",kiro:"Kiro (AWS)",qwen:"Qwen Code"}),zA=Object.freeze({ghcp:"Sign in with your GitHub account that has Copilot access.",qwen:"Sign in with your Qwen account to authorize access.",kiro:"Sign in with your selected Kiro auth provider to continue.",kimi:"Sign in with your Kimi account and finish the device authorization."});function _j(n){const a=va(n);return Ja(a)&&LA.includes(a)}function or(n){const a=va(n);return a?Ja(a)?_A[a]||Xd(a):String(n):"Unknown provider"}function IA(n){const a=va(n);return Ja(a)&&zA[a]||"Complete the authorization in your browser."}const UA=["ghcp","kiro"];function zj(n){const a=va(n);return Ja(a)&&UA.includes(a)}const Ij="aws",qg=[{id:"aws",label:"AWS Builder ID (Recommended)",description:"Device code flow for AWS organizations and Builder ID accounts.",flowType:"device_code",startEndpoint:"start"},{id:"aws-authcode",label:"AWS Builder ID (Auth Code)",description:"Authorization code flow via CLI binary.",flowType:"authorization_code",startEndpoint:"start"},{id:"google",label:"Google OAuth",description:"Social OAuth flow with callback URL support.",flowType:"authorization_code",startEndpoint:"start-url"},{id:"github",label:"GitHub OAuth",description:"Social OAuth flow via management API callback.",flowType:"authorization_code",startEndpoint:"start-url"}];function Uj(n){return qg.find(s=>s.id===n)||qg[0]}function HA({open:n,onClose:a,sessionId:s,provider:l,userCode:c,verificationUrl:f,expiresAt:h}){const[p,m]=S.useState(!1),[y,C]=S.useState(null);S.useEffect(()=>{if(!n)return;let U=null;const K=()=>{const I=Math.max(0,Math.floor((h-Date.now())/1e3));C(I),I===0&&U&&(clearInterval(U),U=null)};return K(),U=setInterval(K,1e3),()=>{U&&clearInterval(U)}},[n,h]);const x=S.useCallback(async()=>{try{await navigator.clipboard.writeText(c),m(!0),le.success(He.t("commonToast.codeCopied")),setTimeout(()=>m(!1),2e3)}catch{le.error(He.t("commonToast.copyCodeFailed"))}},[c]),v=S.useCallback(()=>{window.open(f,"_blank","noopener,noreferrer")},[f]),N=or(l),w=IA(l),T=N==="Unknown provider"?"Open verification page":`Open ${N.split(" ")[0]}`,O=U=>{const K=Math.floor(U/60),I=U%60;return`${K}:${I.toString().padStart(2,"0")}`},M=y===0;return r.jsx(qd,{open:n,onOpenChange:U=>!U&&a(),children:r.jsxs(Gd,{className:"sm:max-w-md","data-session-id":s,children:[r.jsxs(Yd,{children:[r.jsxs(Fd,{className:"flex items-center gap-2",children:[r.jsx(Ed,{className:"w-5 h-5"}),"Authorize ",N]}),r.jsxs(Vd,{children:["Enter the code below at the authorization page.",y!==null&&y>0&&r.jsxs("span",{className:"text-muted-foreground ml-1",children:["(Expires in ",O(y),")"]}),M&&r.jsx("span",{className:"text-destructive ml-1 font-medium",children:"(Code expired)"})]})]}),r.jsxs("div",{className:"space-y-6 py-4",children:[r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:"bg-muted rounded-lg p-6 text-center",children:r.jsx("div",{className:"text-4xl font-mono font-bold tracking-[0.3em] text-foreground select-all",children:c})}),r.jsx(ct,{variant:"outline",size:"icon",className:"absolute top-2 right-2",onClick:x,"aria-label":p?"Code copied":"Copy verification code",children:p?r.jsx(xo,{className:"h-4 w-4 text-green-500"}):r.jsx(rr,{className:"h-4 w-4"})})]}),r.jsx("div",{className:"text-sm text-muted-foreground text-center",children:r.jsx("p",{children:w})}),r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsxs(ct,{onClick:v,className:"w-full",children:[r.jsx(Xy,{className:"w-4 h-4 mr-2"}),T]}),r.jsx(ct,{variant:"outline",onClick:x,className:"w-full",children:p?r.jsxs(r.Fragment,{children:[r.jsx(xo,{className:"w-4 h-4 mr-2 text-green-500"}),"Copied!"]}):r.jsxs(r.Fragment,{children:[r.jsx(rr,{className:"w-4 h-4 mr-2"}),"Copy Code"]})})]}),r.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[r.jsx(jn,{className:"h-4 w-4 animate-spin"}),r.jsx("span",{children:"Waiting for authorization..."})]})]})]})})}function BA({...n}){return r.jsx($0,{"data-slot":"dropdown-menu",...n})}function KA({...n}){return r.jsx(X0,{"data-slot":"dropdown-menu-trigger",...n})}function qA({className:n,sideOffset:a=4,...s}){return r.jsx(Z0,{children:r.jsx(J0,{"data-slot":"dropdown-menu-content",sideOffset:a,className:B("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md bg-white dark:bg-zinc-950",n),...s})})}function GA({className:n,inset:a,variant:s="default",...l}){return r.jsx(eS,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":s,className:B("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground focus:[&_svg:not([class*='text-'])]:text-current relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...l})}function YA(){const{authRequired:n,isAuthenticated:a,username:s,logout:l}=Id();if(!n||!a)return null;const c=async()=>{await l()};return r.jsxs(BA,{children:[r.jsx(KA,{asChild:!0,children:r.jsxs(ct,{variant:"ghost",size:"sm",className:"gap-2",children:[r.jsx(BS,{className:"h-4 w-4"}),r.jsx("span",{className:"hidden sm:inline",children:s})]})}),r.jsx(qA,{align:"end",children:r.jsxs(GA,{onClick:c,className:"gap-2 text-destructive",children:[r.jsx(KS,{className:"h-4 w-4"}),"Sign Out"]})})]})}const Sx=sS,Cx=lS,Zd=S.forwardRef(({className:n,children:a,...s},l)=>r.jsxs(Py,{ref:l,className:B("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...s,children:[a,r.jsx(tS,{asChild:!0,children:r.jsx(zs,{className:"h-4 w-4 opacity-50"})})]}));Zd.displayName=Py.displayName;const wx=S.forwardRef(({className:n,...a},s)=>r.jsx(Ry,{ref:s,className:B("flex cursor-default items-center justify-center py-1",n),...a,children:r.jsx(Od,{className:"h-4 w-4"})}));wx.displayName=Ry.displayName;const Nx=S.forwardRef(({className:n,...a},s)=>r.jsx(Ly,{ref:s,className:B("flex cursor-default items-center justify-center py-1",n),...a,children:r.jsx(zs,{className:"h-4 w-4"})}));Nx.displayName=Ly.displayName;const Jd=S.forwardRef(({className:n,children:a,position:s="popper",...l},c)=>r.jsx(nS,{children:r.jsxs(_y,{ref:c,className:B("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:s,...l,children:[r.jsx(wx,{}),r.jsx(aS,{className:B("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),r.jsx(Nx,{})]})}));Jd.displayName=_y.displayName;const FA=S.forwardRef(({className:n,...a},s)=>r.jsx(zy,{ref:s,className:B("px-2 py-1.5 text-sm font-semibold",n),...a}));FA.displayName=zy.displayName;const fr=S.forwardRef(({className:n,children:a,...s},l)=>r.jsxs(Iy,{ref:l,className:B("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(iS,{children:r.jsx(xo,{className:"h-4 w-4"})})}),r.jsx(oS,{children:a})]}));fr.displayName=Iy.displayName;const VA=S.forwardRef(({className:n,...a},s)=>r.jsx(Uy,{ref:s,className:B("-mx-1 my-1 h-px bg-muted",n),...a}));VA.displayName=Uy.displayName;function QA(){const{t:n,i18n:a}=Lt(),s=Is(a.resolvedLanguage??a.language??"en"),l=c=>{const f=Yw(c);a.changeLanguage(f)};return r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Zy,{className:"h-4 w-4 text-muted-foreground"}),r.jsxs(Sx,{value:s,onValueChange:l,children:[r.jsx(Zd,{className:"h-8 w-[150px]",children:r.jsx(Cx,{placeholder:n("layout.languageSwitcher")})}),r.jsx(Jd,{children:qw.map(c=>r.jsx(fr,{value:c,children:n(`locale.${c}`)},c))})]})]})}function WA(){const[n,a]=S.useState({isOpen:!1,prompt:null});S.useEffect(()=>{const c=f=>{const h=f.detail;h.type==="projectSelectionRequired"?(console.log("[ProjectSelection] Received prompt:",h.sessionId),a({isOpen:!0,prompt:{sessionId:h.sessionId,provider:h.provider,projects:h.projects,defaultProjectId:h.defaultProjectId,supportsAll:h.supportsAll}})):h.type==="projectSelectionTimeout"?(console.log("[ProjectSelection] Timeout:",h.sessionId),a(p=>p.prompt?.sessionId===h.sessionId?{isOpen:!1,prompt:null}:p)):h.type==="projectSelectionSubmitted"&&(console.log("[ProjectSelection] Submitted:",h.sessionId),a(p=>p.prompt?.sessionId===h.sessionId?{isOpen:!1,prompt:null}:p))};return window.addEventListener("ws-message",c),()=>{window.removeEventListener("ws-message",c)}},[]);const s=S.useCallback(async c=>{if(!n.prompt)return;if(!(await fetch(`/api/cliproxy/auth/project-selection/${n.prompt.sessionId}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selectedId:c})})).ok)throw new Error("Failed to submit project selection")},[n.prompt]),l=S.useCallback(()=>{a({isOpen:!1,prompt:null})},[]);return S.useMemo(()=>({isOpen:n.isOpen,prompt:n.prompt,onSelect:s,onClose:l}),[n.isOpen,n.prompt,s,l])}function $A(n){return typeof n!="string"?"unknown":n.trim().toLowerCase()||"unknown"}function XA(){const[n,a]=S.useState({isOpen:!1,prompt:null,error:null});S.useEffect(()=>{const f=h=>{const p=h.detail;if(p.type==="deviceCodeReceived"){console.log("[DeviceCode] Received prompt:",p.sessionId);const m=$A(p.provider),y=or(m);le.info(`${y} authorization required`),a({isOpen:!0,prompt:{sessionId:p.sessionId,provider:m,userCode:p.userCode,verificationUrl:p.verificationUrl,expiresAt:p.expiresAt},error:null})}else p.type==="deviceCodeCompleted"?(console.log("[DeviceCode] Auth completed:",p.sessionId),a(m=>{if(m.prompt&&m.prompt.sessionId===p.sessionId){const y=or(m.prompt.provider);return le.success(`${y} authentication successful!`),{isOpen:!1,prompt:null,error:null}}return m})):p.type==="deviceCodeFailed"?(console.log("[DeviceCode] Auth failed:",p.sessionId,p.error),a(m=>{if(m.prompt&&m.prompt.sessionId===p.sessionId){const y=or(m.prompt.provider);return le.error(`${y} authentication failed`),{isOpen:!1,prompt:null,error:p.error}}return m})):p.type==="deviceCodeExpired"&&(console.log("[DeviceCode] Code expired:",p.sessionId),a(m=>m.prompt?.sessionId===p.sessionId?(le.error("Device code expired. Please try again."),{isOpen:!1,prompt:null,error:"Device code expired"}):m))};return window.addEventListener("ws-message",f),()=>{window.removeEventListener("ws-message",f)}},[]);const s=S.useCallback(()=>{a({isOpen:!1,prompt:null,error:null})},[]),l=S.useCallback(()=>{n.prompt?.verificationUrl&&window.open(n.prompt.verificationUrl,"_blank","noopener,noreferrer")},[n.prompt]),c=S.useCallback(async()=>{if(n.prompt?.userCode)try{await navigator.clipboard.writeText(n.prompt.userCode),le.success("Code copied to clipboard")}catch{le.error("Failed to copy code")}},[n.prompt]);return S.useMemo(()=>({isOpen:n.isOpen,prompt:n.prompt,error:n.error,onClose:s,onOpenUrl:l,onCopyCode:c}),[n.isOpen,n.prompt,n.error,s,l,c])}const ZA="ccs-dashboard:last-route";function JA(n,a="",s=""){try{localStorage.setItem(ZA,`${n}${a}${s}`)}catch{}}function e1(){return r.jsxs("div",{className:"p-6 space-y-4",children:[r.jsx(Ge,{className:"h-8 w-48"}),r.jsx(Ge,{className:"h-64 w-full"})]})}function t1(){const n=yr(),{isOpen:a,prompt:s,onSelect:l,onClose:c}=WA(),f=XA();return S.useEffect(()=>{JA(n.pathname,n.search,n.hash)},[n.pathname,n.search,n.hash]),r.jsxs(_N,{children:[r.jsx(lA,{}),r.jsxs("main",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-background",children:[r.jsxs("header",{className:"flex h-14 items-center justify-between px-6 border-b shrink-0 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(xA,{}),r.jsx(vA,{})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(mA,{}),r.jsx(QA,{}),r.jsx(hA,{}),r.jsx(dA,{}),r.jsx(cA,{}),r.jsx(rA,{}),r.jsx(YA,{})]})]}),r.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:r.jsx(S.Suspense,{fallback:r.jsx(e1,{}),children:r.jsx(md,{})})}),r.jsx(gA,{})]}),s&&r.jsx(NA,{open:a,onClose:c,sessionId:s.sessionId,provider:s.provider,projects:s.projects,defaultProjectId:s.defaultProjectId,supportsAll:s.supportsAll,onSelect:l}),f.prompt&&r.jsx(HA,{open:f.isOpen,onClose:f.onClose,sessionId:f.prompt.sessionId,provider:f.prompt.provider,userCode:f.prompt.userCode,verificationUrl:f.prompt.verificationUrl,expiresAt:f.prompt.expiresAt})]})}const n1=Ar("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ga({className:n,variant:a,...s}){return r.jsx("div",{className:B(n1({variant:a}),n),...s})}function a1({version:n="5.0.0"}){return r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(gx,{size:"lg",showText:!1}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("h1",{className:"text-2xl font-bold",children:"CCS Config"}),r.jsxs(ga,{variant:"outline",className:"font-mono text-xs",children:["v",n]})]}),r.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Claude Code Switch Dashboard"})]})]})}const i1=100,Gg=["#3b3c36","#568203","#8d4557","#da9100","#3c6c82","#c96907"];function o1(n){return Gg[n%Gg.length]}function Ax(n){return n.replace(/@(gmail|yahoo|hotmail|outlook|icloud)\.com$/i,"")}function s1(n){const s=new Date().getTime()-n.getTime(),l=Math.floor(s/6e4);if(l<1)return"now";if(l<60)return`${l}m`;const c=Math.floor(l/60);return c<24?`${c}h`:`${Math.floor(c/24)}d`}function l1(n){const a=[];return n.forEach(s=>{const l=s.lastUsedAt?new Date(s.lastUsedAt):new Date,c=(f,h)=>{for(let p=0;p<f;p++){const m=Math.floor(Math.random()*24*60*60*1e3*(p/(f||1))),y=new Date(l.getTime()-m),C=Math.floor((Math.random()-.5)*10*60*1e3);y.setTime(y.getTime()+C);const x=new Date;y>x&&y.setTime(x.getTime()),a.push({id:`${s.id}-${h}-${p}`,timestamp:y,accountEmail:s.email,status:h,latencyMs:h==="success"?50+Math.floor(Math.random()*150):200+Math.floor(Math.random()*4800)})}};c(s.successCount,"success"),c(s.failureCount,"failed")}),a.sort((s,l)=>l.timestamp.getTime()-s.timestamp.getTime())}function r1({containerRef:n,svgRef:a,accounts:s}){if(!n.current||!a.current)return[];const l=n.current,f=a.current.getBoundingClientRect(),h=l.querySelector("[data-provider-node]");if(!h)return[];const p=h.getBoundingClientRect(),m=[];return s.forEach((y,C)=>{const x=l.querySelector(`[data-account-index="${C}"]`);if(!x)return;const v=x.getBoundingClientRect(),N=x.getAttribute("data-zone")||"left";let w,T,O,M;switch(N){case"right":w=v.left-f.left,T=v.top+v.height/2-f.top,O=p.right-f.left,M=p.top+p.height/2-f.top;break;case"top":w=v.left+v.width/2-f.left,T=v.bottom-f.top,O=p.left+p.width/2-f.left,M=p.top-f.top;break;case"bottom":w=v.left+v.width/2-f.left,T=v.top-f.top,O=p.left+p.width/2-f.left,M=p.bottom-f.top;break;default:w=v.right-f.left,T=v.top+v.height/2-f.top,O=p.left-f.left,M=p.top+p.height/2-f.top}let U,K,I,E;N==="top"||N==="bottom"?(U=w,K=T+(M-T)*.5,I=O,E=M-(M-T)*.5):(U=w+(O-w)*.5,K=T,I=O-(O-w)*.5,E=M),m.push(`M ${w} ${T} C ${U} ${K}, ${I} ${E}, ${O} ${M}`)}),m}function c1(n){const a=n.length;if(a<=2)return{leftAccounts:n,rightAccounts:[],topAccounts:[],bottomAccounts:[]};if(a<=4){const l=Math.ceil(a/2);return{leftAccounts:n.slice(0,l),rightAccounts:n.slice(l),topAccounts:[],bottomAccounts:[]}}if(a<=8){const l=Math.ceil(a/3);return{leftAccounts:n.slice(0,l),rightAccounts:n.slice(l,l*2),topAccounts:n.slice(l*2),bottomAccounts:[]}}const s=Math.ceil(a/4);return{leftAccounts:n.slice(0,s),rightAccounts:n.slice(s,s*2),topAccounts:n.slice(s*2,s*3),bottomAccounts:n.slice(s*3)}}function u1(n){return n>=9?"w-64":n>=5?"w-60":n>=3?"w-56":"w-52"}function d1({storageKey:n,onDrag:a}){const[s,l]=S.useState(null),c=S.useRef(null),f=S.useRef(!1),h=S.useCallback(()=>{try{const w=localStorage.getItem(n);if(w)return JSON.parse(w)}catch{}return{}},[n]),[p,m]=S.useState(()=>h());S.useEffect(()=>{Object.keys(p).length>0&&localStorage.setItem(n,JSON.stringify(p))},[p,n]);const y=S.useCallback(()=>{m({}),localStorage.removeItem(n)},[n]),C=S.useCallback((w,T)=>{T.preventDefault(),T.stopPropagation(),T.target.setPointerCapture(T.pointerId);const O=p[w]||{x:0,y:0};c.current={x:T.clientX,y:T.clientY,offsetX:O.x,offsetY:O.y},f.current=!1,l(w)},[p]),x=S.useCallback(w=>{if(!s||!c.current)return;const T=c.current,O=w.clientX-T.x,M=w.clientY-T.y;(Math.abs(O)>3||Math.abs(M)>3)&&(f.current=!0),m(U=>({...U,[s]:{x:T.offsetX+O,y:T.offsetY+M}})),a&&requestAnimationFrame(a)},[s,a]),v=S.useCallback(()=>{l(null),c.current=null},[]);return{dragOffsets:p,draggingId:s,didDragRef:f,handlePointerDown:C,handlePointerMove:x,handlePointerUp:v,getOffset:w=>p[w]||{x:0,y:0},resetPositions:y,hasCustomPositions:Object.keys(p).length>0}}function f1(n){let a=0,s=0;return Object.values(n).forEach(l=>{a=Math.min(a,l.y),s=Math.max(s,l.y)}),{paddingTop:Math.max(0,-a),paddingBottom:Math.max(0,s),extraHeight:Math.max(0,Math.abs(a),Math.abs(s))*2}}function h1(n){const[a,s]=S.useState(new Set),l=S.useRef({});return S.useEffect(()=>{const c=new Set,f={};if(n.forEach(h=>{const p=h.successCount+h.failureCount;f[h.id]=p;const m=l.current[h.id];m!==void 0&&p>m&&c.add(h.id)}),l.current=f,c.size>0){s(c);const h=setTimeout(()=>s(new Set),2e3);return()=>clearTimeout(h)}},[n]),a}function p1({events:n,privacyMode:a}){const{t:s}=Lt();return n.length===0?r.jsx("div",{className:"h-full flex items-center justify-center rounded-xl bg-muted/20 dark:bg-zinc-900/40 border border-border/30 dark:border-white/[0.05]",children:r.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:s("flowViz.noRecentConnections")})}):r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-3 px-2",children:[r.jsx(js,{className:"w-3.5 h-3.5 text-muted-foreground"}),r.jsx("span",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:s("flowViz.connectionTimeline")})]}),r.jsx("div",{className:B("flex-1 rounded-xl p-4 overflow-y-auto","bg-muted/20 dark:bg-zinc-900/40 backdrop-blur-sm","border border-border/30 dark:border-white/[0.05]"),children:r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:"absolute left-[7px] top-2 bottom-2 w-px bg-border/50 dark:bg-white/[0.08]"}),r.jsx("div",{className:"space-y-3",children:n.map(l=>{const c=l.status==="success"?Vt.success:l.status==="failed"?Vt.failed:Vt.degraded;return r.jsxs("div",{className:"relative flex items-start gap-3 pl-1",children:[r.jsx("div",{className:B("relative z-10 w-3.5 h-3.5 rounded-full flex-shrink-0 mt-0.5","ring-2 ring-background dark:ring-zinc-950"),style:{backgroundColor:c}}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("span",{className:B("text-[10px] font-mono text-foreground truncate",a&&dx),children:Ax(l.accountEmail)}),r.jsx("span",{className:"text-[9px] text-muted-foreground font-mono flex-shrink-0",children:s1(l.timestamp)})]}),r.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[r.jsx("span",{className:"text-[9px] font-medium uppercase",style:{color:c},children:l.status}),l.latencyMs&&r.jsxs("span",{className:"text-[9px] text-muted-foreground font-mono",children:[l.latencyMs,"ms"]})]})]})]},l.id)})})]})})]})}async function m1(){const n=await fetch("/api/cliproxy/stats");if(!n.ok){const a=await n.json();throw new Error(a.message||"Failed to fetch stats")}return n.json()}async function g1(){const n=await fetch("/api/cliproxy/status");if(!n.ok)throw new Error("Failed to fetch status");return n.json()}function y1(){return Dt({queryKey:["cliproxy-status"],queryFn:g1,refetchInterval:1e4,retry:1})}function x1(n=!0){return Dt({queryKey:["cliproxy-stats"],queryFn:m1,enabled:n,refetchInterval:5e3,retry:1,staleTime:3e3})}async function b1(){const n=await fetch("/api/cliproxy/error-logs");if(!n.ok){const s=await n.json();throw new Error(s.message||"Failed to fetch error logs")}return(await n.json()).files??[]}async function v1(n){const a=await fetch(`/api/cliproxy/error-logs/${encodeURIComponent(n)}`);if(!a.ok)throw new Error("Failed to fetch error log content");return a.text()}function S1(n=!0){return Dt({queryKey:["cliproxy-error-logs"],queryFn:b1,enabled:n,refetchInterval:3e4,retry:1,staleTime:1e4})}function C1(n){return Dt({queryKey:["cliproxy-error-log-content",n],queryFn:()=>n?v1(n):Promise.resolve(""),enabled:!!n,staleTime:6e4})}const kx=["agy","codex","claude","gemini","ghcp"],w1={antigravity:"agy",anthropic:"claude","gemini-cli":"gemini",copilot:"ghcp","github-copilot":"ghcp"};function Dx(n){const a=n.trim().toLowerCase();return a?kx.includes(a)?a:w1[a]??null:null}async function Yg(n,a){const s=await fetch(`/api/cliproxy/quota/${n}/${encodeURIComponent(a)}`);if(!s.ok){let l="Failed to fetch quota";try{l=(await s.json()).message||l}catch{}throw new Error(l)}return s.json()}async function N1(n){const a=await fetch(`/api/cliproxy/quota/codex/${encodeURIComponent(n)}`);if(!a.ok){let s="Failed to fetch Codex quota";try{s=(await a.json()).message||s}catch{}throw new Error(s)}return a.json()}async function A1(n){const a=await fetch(`/api/cliproxy/quota/claude/${encodeURIComponent(n)}`);if(!a.ok){let s="Failed to fetch Claude quota";try{s=(await a.json()).message||s}catch{}throw new Error(s)}return a.json()}async function k1(n){const a=await fetch(`/api/cliproxy/quota/gemini/${encodeURIComponent(n)}`);if(!a.ok){let s="Failed to fetch Gemini quota";try{s=(await a.json()).message||s}catch{}throw new Error(s)}return a.json()}async function D1(n){const a=await fetch(`/api/cliproxy/quota/ghcp/${encodeURIComponent(n)}`);if(!a.ok){let s="Failed to fetch GitHub Copilot quota";try{s=(await a.json()).message||s}catch{}throw new Error(s)}return a.json()}async function T1(n,a){const s=Dx(n);if(!s)return Yg(n,a);switch(s){case"codex":return N1(a);case"claude":return A1(a);case"gemini":return k1(a);case"ghcp":return D1(a);default:return Yg(n,a)}}function M1(n,a,s=!0){const l=Dx(n);return Dt({queryKey:["account-quota",l??n,a],queryFn:()=>T1(l??n,a),enabled:s&&!!l&&!!a,staleTime:6e4,refetchInterval:6e4,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:1})}function j1(n){if(!n)return null;const a=n.split(/[\s_-]+/g).map(s=>s.trim()).filter(s=>s.length>0).map(s=>s.charAt(0).toUpperCase()+s.slice(1));return a.length>0?a.join(" "):n}function E1(n,a){switch(n){case"five_hour":return"5h usage limit";case"seven_day":return"Weekly usage limit";case"seven_day_opus":return"Weekly usage (Opus)";case"seven_day_sonnet":return"Weekly usage (Sonnet)";case"seven_day_oauth_apps":return"Weekly usage (OAuth apps)";case"seven_day_cowork":return"Weekly usage (Cowork)";case"overage":return"Extra usage";default:return a}}function O1({quota:n,resetTime:a}){if(!n)return r.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading quota..."});if(!n.success){const s=mx(n);return r.jsxs("div",{className:"text-xs space-y-1",children:[r.jsx("p",{className:"font-medium text-destructive",children:s?.label||n.error||"Failed to load quota"}),r.jsx("p",{className:"text-destructive/90",children:s?.summary||n.error}),s?.actionHint&&r.jsx("p",{className:"text-muted-foreground",children:s.actionHint}),s?.technicalDetail&&r.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:s.technicalDetail}),s?.rawDetail&&r.jsx("pre",{className:"whitespace-pre-wrap break-all rounded bg-muted/40 px-2 py-1 font-mono text-[10px] text-muted-foreground",children:s.rawDetail})]})}if(Hd(n)){const s=rN(n.models||[]),l=cN(s),c=["primary","gemini-3","gemini-2","other"];return r.jsxs("div",{className:"text-xs space-y-1",children:[r.jsx("p",{className:"font-medium",children:"Model Quotas:"}),c.map((f,h)=>{const p=l.get(f);if(!p||p.length===0)return null;const m=c.slice(0,h).every(y=>!l.get(y)?.length);return r.jsxs("div",{children:[!m&&r.jsx("div",{className:"border-t border-border/40 my-1"}),p.map(y=>r.jsxs("div",{className:"flex justify-between gap-4",children:[r.jsx("span",{className:B("truncate",y.exhausted&&"text-red-500"),children:y.displayName}),r.jsxs("span",{className:B("font-mono",y.exhausted&&"text-red-500"),children:[y.percentage,"%"]})]},y.name))]},f)}),r.jsx(sr,{resetTime:a})]})}if(Mr(n)){const{fiveHourWindow:s,weeklyWindow:l,codeReviewWindows:c,unknownWindows:f}=Tr(n.windows),h=n.coreUsage?.fiveHour?.resetAt??s?.resetAt??null,p=n.coreUsage?.weekly?.resetAt??l?.resetAt??null,m=[s,l,...c,...f].filter(y=>!!y).filter((y,C,x)=>x.findIndex(v=>v.label===y.label&&v.resetAt===y.resetAt)===C);return r.jsxs("div",{className:"text-xs space-y-1",children:[r.jsx("p",{className:"font-medium",children:"Rate Limits:"}),n.planType&&r.jsxs("p",{className:"text-muted-foreground",children:["Plan: ",n.planType]}),m.map((y,C)=>r.jsxs("div",{className:"flex justify-between gap-4",children:[r.jsx("span",{className:B(y.remainingPercent<20&&"text-red-500"),children:dN(y,m)}),r.jsxs("span",{className:"font-mono",children:[y.remainingPercent,"%"]})]},`${y.label}-${y.resetAt??"no-reset"}-${C}`)),r.jsx(Fg,{fiveHourResetTime:h,weeklyResetTime:p,fallbackResetTime:a})]})}if(jr(n)){const s=[n.coreUsage?.fiveHour,n.coreUsage?.weekly].filter(p=>!!p).map(p=>({rateLimitType:p.rateLimitType,label:p.label,remainingPercent:p.remainingPercent,resetAt:p.resetAt,status:p.status})),l=n.windows.map(p=>({rateLimitType:p.rateLimitType,label:p.label,remainingPercent:p.remainingPercent,resetAt:p.resetAt,status:p.status})),c=[...s,...l].filter((p,m,y)=>y.findIndex(C=>C.rateLimitType===p.rateLimitType&&C.resetAt===p.resetAt&&C.status===p.status)===m),f=n.coreUsage?.fiveHour?.resetAt??n.windows.find(p=>p.rateLimitType==="five_hour")?.resetAt??null,h=n.coreUsage?.weekly?.resetAt??n.windows.find(p=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(p.rateLimitType))?.resetAt??null;return r.jsxs("div",{className:"text-xs space-y-1",children:[r.jsx("p",{className:"font-medium",children:"Rate Limits:"}),c.map((p,m)=>r.jsxs("div",{className:"flex justify-between gap-4",children:[r.jsx("span",{className:B(p.remainingPercent<20&&"text-red-500"),children:E1(p.rateLimitType,p.label)}),r.jsxs("span",{className:"font-mono",children:[p.remainingPercent,"%"]})]},`${p.rateLimitType}-${p.resetAt??"no-reset"}-${p.status}-${m}`)),r.jsx(Fg,{fiveHourResetTime:f,weeklyResetTime:h,fallbackResetTime:a})]})}if(Bd(n))return r.jsxs("div",{className:"text-xs space-y-1",children:[r.jsx("p",{className:"font-medium",children:"Buckets:"}),n.buckets.map(s=>r.jsxs("div",{className:"flex justify-between gap-4",children:[r.jsxs("span",{className:B(s.remainingPercent<20&&"text-red-500"),children:[s.label,s.tokenType?` (${s.tokenType})`:""]}),r.jsxs("span",{className:"font-mono",children:[s.remainingPercent,"%"]})]},s.id)),r.jsx(sr,{resetTime:a})]});if(Kd(n)){const s=[{label:"Premium Interactions",snapshot:n.snapshots.premiumInteractions},{label:"Chat",snapshot:n.snapshots.chat},{label:"Completions",snapshot:n.snapshots.completions}],l=n.quotaResetDate??a,c=j1(n.planType);return r.jsxs("div",{className:"text-xs space-y-1",children:[r.jsx("p",{className:"font-medium",children:"Quota Snapshots:"}),c&&r.jsxs("p",{className:"text-muted-foreground",children:["Plan: ",c]}),s.map(({label:f,snapshot:h})=>{const p=h.percentRemaining<20;return r.jsxs("div",{className:"space-y-0.5",children:[r.jsxs("div",{className:"flex justify-between gap-4",children:[r.jsx("span",{className:B(p&&"text-red-500"),children:f}),r.jsx("span",{className:B("font-mono",p&&"text-red-500"),children:h.unlimited?"Unlimited":`${px(h.percentRemaining)}%`})]}),!h.unlimited&&r.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[h.remaining,"/",h.entitlement," remaining"]})]},f)}),r.jsx(sr,{resetTime:l})]})}return null}function sr({resetTime:n}){return n?r.jsxs("div",{className:"flex items-center gap-1.5 pt-1 border-t border-border/50",children:[r.jsx(Os,{className:"w-3 h-3 text-blue-400"}),r.jsxs("span",{className:"text-blue-400 font-medium",children:["Resets ",Sd(n)]})]}):null}function Fg({fiveHourResetTime:n,weeklyResetTime:a,fallbackResetTime:s}){const l=!!n||!!a;return!l&&!s?null:r.jsxs("div",{className:"pt-1 border-t border-border/50 space-y-1",children:[n&&r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Os,{className:"w-3 h-3 text-blue-400"}),r.jsxs("span",{className:"text-blue-400 font-medium",children:["5h resets ",Sd(n)]})]}),a&&r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Os,{className:"w-3 h-3 text-indigo-400"}),r.jsxs("span",{className:"text-indigo-400 font-medium",children:["Weekly resets ",Sd(a)]})]}),!l&&s&&r.jsx(sr,{resetTime:s})]})}function P1({success:n,failure:a,showDetails:s}){const l=n+a,c=l>0?n/l*100:100;return r.jsxs("div",{className:"mt-2 space-y-2",children:[r.jsxs("div",{className:"flex items-end justify-between px-0.5",children:[r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:"Success Rate"}),r.jsxs("span",{className:B("text-sm font-mono font-bold leading-none mt-0.5",c===100?"text-emerald-600 dark:text-emerald-400":c>=90?"text-amber-500":"text-red-500"),children:[Math.round(c),"%"]})]}),r.jsxs("div",{className:"flex flex-col items-end",children:[r.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:"Volume"}),r.jsx("span",{className:"text-xs font-mono font-medium text-foreground/80 leading-none mt-0.5",children:l.toLocaleString()})]})]}),r.jsxs("div",{className:B("grid grid-cols-2 gap-2 overflow-hidden transition-all duration-300 ease-in-out",s?"max-h-20 opacity-100 mt-2":"max-h-0 opacity-0 mt-0"),children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 rounded-md bg-emerald-500/5 dark:bg-emerald-500/10 border border-emerald-500/10",children:[r.jsx(Sr,{className:"w-2.5 h-2.5 text-emerald-600 dark:text-emerald-400"}),r.jsx("span",{className:"text-[10px] font-mono font-bold text-emerald-600 dark:text-emerald-400",children:n})]}),r.jsxs("div",{className:B("flex items-center gap-1.5 px-1.5 py-1 rounded-md border",a>0?"bg-red-500/5 dark:bg-red-500/10 border-red-500/20":"bg-muted/10 border-transparent opacity-40"),children:[r.jsx(Pd,{className:B("w-2.5 h-2.5",a>0?"text-red-500":"text-muted-foreground")}),r.jsx("span",{className:B("text-[10px] font-mono font-bold",a>0?"text-red-500":"text-muted-foreground"),children:a})]})]})]})}const R1=["antigravity","anthropic","gemini-cli","copilot","github-copilot"],L1={left:"border-l-2",right:"border-r-2",top:"border-t-2",bottom:"border-b-2"},_1={left:"top-1/2 -right-1.5 -translate-y-1/2",right:"top-1/2 -left-1.5 -translate-y-1/2",top:"left-1/2 -bottom-1.5 -translate-x-1/2",bottom:"left-1/2 -top-1.5 -translate-x-1/2"};function z1(n,a){switch(n){case"left":return{borderLeftColor:a};case"right":return{borderRightColor:a};case"top":return{borderTopColor:a};case"bottom":return{borderBottomColor:a}}}function I1({account:n,zone:a,originalIndex:s,isHovered:l,isDragging:c,offset:f,showDetails:h,privacyMode:p,onMouseEnter:m,onMouseLeave:y,onPointerDown:C,onPointerMove:x,onPointerUp:v,onPauseToggle:N,isPausingAccount:w}){const{t:T}=Lt(),O=L1[a],M=z1(a,n.color),U=_1[a],K=n.provider.toLowerCase(),I=kx.includes(K)||R1.includes(K),E=K==="codex",k=K==="claude"||K==="anthropic",{data:z,isLoading:Q}=M1(K,n.id,I),W=SN(n.provider,z),ee=CN(n.provider,z),ne=E&&z&&Mr(z)?Tr(z.windows):null,J=[{label:"5h",value:ne?.fiveHourWindow?.remainingPercent??null},{label:"Wk",value:ne?.weeklyWindow?.remainingPercent??null}].filter(ie=>ie.value!==null),ge=k&&z&&jr(z)?[{label:"5h",value:z.coreUsage?.fiveHour?.remainingPercent??z.windows.find(ie=>ie.rateLimitType==="five_hour")?.remainingPercent??null},{label:"Wk",value:z.coreUsage?.weekly?.remainingPercent??z.windows.find(ie=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(ie.rateLimitType))?.remainingPercent??null}].filter(ie=>ie.value!==null):[],ue=E?J:k?ge:[],Ce=W!==null?px(W):null,P=Ce!==null?Number(Ce):null,V=mx(z),ae=V?.label==="Reauth"?Ed:V?.tone==="warning"?qn:Cr,pe=V?.tone==="warning"?"text-amber-600 dark:text-amber-400":V?.tone==="destructive"?"text-destructive":"text-muted-foreground/70",xe=n.provider==="agy"&&n.tier&&n.tier!=="unknown"&&n.tier!=="free";return r.jsxs("div",{"data-account-index":s,"data-zone":a,onMouseEnter:m,onMouseLeave:y,onPointerDown:C,onPointerMove:x,onPointerUp:v,onPointerCancel:v,className:B("group/card relative rounded-lg p-3 w-44 cursor-grab transition-shadow duration-200","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border border-border/50 dark:border-white/[0.08]",O,"select-none touch-none",l&&"bg-muted/50 dark:bg-zinc-800/60",c&&"cursor-grabbing shadow-xl scale-105 z-50",n.paused&&"opacity-60"),style:{...M,transform:`translate(${f.x}px, ${f.y}px)${c?" scale(1.05)":""}`},children:[r.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 flex-1 min-w-0",children:[r.jsx("span",{className:B("text-xs font-semibold text-foreground tracking-tight truncate",p&&dx),children:Ax(n.email)}),xe&&r.jsx("span",{className:B("text-[7px] font-bold uppercase tracking-wide px-1 py-px rounded shrink-0",n.tier==="ultra"?"bg-violet-500/15 text-violet-600 dark:bg-violet-500/25 dark:text-violet-300":"bg-yellow-500/15 text-yellow-700 dark:bg-yellow-500/20 dark:text-yellow-400"),children:n.tier})]}),N&&r.jsx(Ci,{children:r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:r.jsx(ct,{variant:"ghost",size:"icon",className:B("h-4 w-4 shrink-0","transition-all rounded-full",n.paused?"bg-amber-500/20 hover:bg-amber-500/30":"hover:bg-muted"),onClick:ie=>{ie.stopPropagation(),N(n.id,!n.paused)},disabled:w,children:w?r.jsx(jn,{className:"w-2.5 h-2.5 animate-spin"}):n.paused?r.jsx(qS,{className:"w-2.5 h-2.5 text-amber-600 dark:text-amber-400"}):r.jsx(GS,{className:"w-2.5 h-2.5 text-muted-foreground/50 hover:text-foreground"})})}),r.jsx(Za,{side:"top",className:"text-xs",children:n.paused?T("accountCard.resumeAccount"):T("accountCard.pauseAccount")})]})}),r.jsx(wr,{className:"w-4 h-4 text-muted-foreground/40 shrink-0"})]}),r.jsx(P1,{success:n.successCount,failure:n.failureCount,showDetails:h}),I&&r.jsx("div",{className:"mt-2 px-0.5",children:Q?r.jsxs("div",{className:"flex items-center gap-1 text-[8px] text-muted-foreground",children:[r.jsx(jn,{className:"w-2.5 h-2.5 animate-spin"}),r.jsx("span",{children:T("accountCard.quotaLoading")})]}):P!==null?r.jsx(Ci,{children:r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:r.jsxs("div",{className:"space-y-0.5 cursor-help",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:T("accountCard.quota")}),r.jsxs("span",{className:B("text-[10px] font-mono font-bold",P>50?"text-emerald-600 dark:text-emerald-400":P>20?"text-amber-500":"text-red-500"),children:[Ce,"%"]})]}),ue.length>0&&r.jsx("div",{className:"flex items-center justify-between text-[7px] text-muted-foreground/70",children:ue.map(ie=>r.jsxs("span",{children:[ie.label," ",ie.value,"%"]},ie.label))}),r.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:r.jsx("div",{className:B("h-full rounded-full transition-all",P>50?"bg-emerald-500":P>20?"bg-amber-500":"bg-red-500"),style:{width:`${P}%`}})})]})}),r.jsx(Za,{side:"top",className:"max-w-xs",children:r.jsx(O1,{quota:z,resetTime:ee})})]})}):z?.success?r.jsx("div",{className:"text-[8px] text-muted-foreground/60",children:T("accountCard.quotaUnavailable")}):V?r.jsx(Ci,{children:r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:r.jsxs("div",{className:B("flex items-center gap-1 text-[8px]",pe),children:[r.jsx(ae,{className:"w-2.5 h-2.5"}),r.jsx("span",{children:V.label})]})}),r.jsx(Za,{side:"top",className:"max-w-[220px]",children:r.jsxs("div",{className:"space-y-1 text-xs",children:[r.jsx("p",{children:V.summary}),V.actionHint&&r.jsx("p",{className:"text-muted-foreground",children:V.actionHint}),V.technicalDetail&&r.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:V.technicalDetail}),V.rawDetail&&r.jsx("pre",{className:"whitespace-pre-wrap break-all rounded bg-muted/40 px-2 py-1 font-mono text-[10px] text-muted-foreground",children:V.rawDetail})]})})]})}):null}),r.jsx("div",{className:B("absolute w-3 h-3 rounded-full transform z-20 transition-colors border","bg-muted dark:bg-zinc-800 border-border dark:border-zinc-600",U,l&&"bg-foreground dark:bg-white border-transparent")})]})}function ef({provider:n,className:a,size:s=18,withBackground:l=!1}){const c=n.toLowerCase(),f=vx(n),h=$d[c]||"#6b7280",p=l?Math.floor(s*.65):s,m=f?r.jsx("img",{src:f,alt:`${n} icon`,width:p,height:p,className:"shrink-0 object-contain"}):r.jsx("span",{className:"font-bold",style:{color:h,fontSize:p*.6},children:n.charAt(0).toUpperCase()});if(l)return r.jsx("div",{className:B("shrink-0 rounded-full bg-white border border-border flex items-center justify-center shadow-sm",a),style:{width:s,height:s},children:m});if(f)return r.jsx("img",{src:f,alt:`${n} icon`,width:s,height:s,className:B("shrink-0 rounded-sm object-contain",a)});const y=h;return r.jsx("div",{className:B("shrink-0 rounded-full flex items-center justify-center text-white font-bold",a),style:{width:s,height:s,backgroundColor:y,fontSize:s*.5},children:n.charAt(0).toUpperCase()})}function U1({providerData:n,providerColor:a,totalRequests:s,maxRequests:l,isDragging:c,offset:f,hoveredAccount:h,hasRightAccounts:p,hasTopAccounts:m,hasBottomAccounts:y,onPointerDown:C,onPointerMove:x,onPointerUp:v}){const{t:N}=Lt(),{accounts:w}=n;return r.jsxs("div",{"data-provider-node":!0,onPointerDown:C,onPointerMove:x,onPointerUp:v,onPointerCancel:v,className:B("group relative w-full rounded-xl p-4 cursor-grab transition-shadow duration-200","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border-2 border-border/50 dark:border-white/[0.08]",!c&&"animate-subtle-float animate-border-glow","select-none touch-none",h!==null&&"scale-[1.02]",c&&"cursor-grabbing shadow-2xl scale-105 z-50"),style:{"--glow-color":`${a}60`,borderColor:h!==null?`${a}80`:void 0,transform:`translate(${f.x}px, ${f.y}px)${c?" scale(1.05)":""}`},children:[r.jsx(wr,{className:"absolute top-2 right-2 w-4 h-4 text-muted-foreground/40"}),r.jsx("div",{className:"absolute inset-0 rounded-xl animate-glow-pulse pointer-events-none",style:{"--glow-color":`${a}30`}}),r.jsx("div",{className:"absolute top-1/2 -left-1.5 w-3 h-3 rounded-full transform -translate-y-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),p&&r.jsx("div",{className:"absolute top-1/2 -right-1.5 w-3 h-3 rounded-full transform -translate-y-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),m&&r.jsx("div",{className:"absolute left-1/2 -top-1.5 w-3 h-3 rounded-full transform -translate-x-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),y&&r.jsx("div",{className:"absolute left-1/2 -bottom-1.5 w-3 h-3 rounded-full transform -translate-x-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),r.jsxs("div",{className:"flex items-center gap-3 mb-4 relative z-10",children:[r.jsx("div",{className:"animate-icon-breathe",children:r.jsx(ef,{provider:n.provider,size:36,withBackground:!0})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-semibold text-foreground tracking-tight",children:n.displayName}),r.jsx("p",{className:"text-[10px] text-muted-foreground font-medium uppercase",children:N("flowViz.provider")})]})]}),r.jsxs("div",{className:"space-y-2 relative z-10",children:[r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"text-muted-foreground",children:N("flowViz.totalRequests")}),r.jsx("span",{className:"text-foreground font-mono",children:s.toLocaleString()})]}),r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"text-muted-foreground",children:N("flowViz.accounts")}),r.jsx("span",{className:"text-foreground font-mono",children:w.length})]}),r.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full mt-2 overflow-hidden",children:r.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${Math.min(100,s/(l*w.length)*100)}%`,backgroundColor:a}})})]})]})}function H1({paths:n,accounts:a,maxRequests:s,hoveredAccount:l,pulsingAccounts:c}){return r.jsxs(r.Fragment,{children:[r.jsx("defs",{children:r.jsxs("filter",{id:"flow-glow",x:"-20%",y:"-20%",width:"140%",height:"140%",filterUnits:"userSpaceOnUse",children:[r.jsx("feGaussianBlur",{stdDeviation:"3",result:"blur"}),r.jsx("feComposite",{in:"SourceGraphic",in2:"blur",operator:"over"})]})}),n.map((f,h)=>{const p=a[h];if(!p)return null;const m=p.successCount+p.failureCount,y=Math.max(2,m/s*10),C=l===h,x=l!==null&&l!==h,v=c.has(p.id),N=o1(h);return r.jsxs("g",{children:[r.jsx("path",{d:f,fill:"none",stroke:N,strokeWidth:y,strokeOpacity:C?.8:x?.15:.4,strokeLinecap:"round",filter:C?"url(#flow-glow)":void 0,className:"transition-all duration-300"}),v&&r.jsxs(r.Fragment,{children:[r.jsx("path",{d:f,fill:"none",stroke:p.color,strokeWidth:y*2,strokeLinecap:"round",filter:"url(#flow-glow)",className:"animate-request-pulse"}),r.jsx("circle",{r:6,fill:p.color,filter:"url(#flow-glow)",style:{offsetPath:`path('${f}')`,offsetDistance:"0%",animation:"travel-dot 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards"}})]})]},h)})]})}function B1({onBack:n,showDetails:a,onToggleDetails:s,hasCustomPositions:l,onResetPositions:c}){const{t:f}=Lt();return r.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",children:[n?r.jsxs("button",{onClick:n,className:"group flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-all duration-200 px-3 py-1.5 rounded-md hover:bg-muted/50 border border-transparent hover:border-border/50",children:[r.jsx(xr,{className:"w-3.5 h-3.5 rotate-180 transition-transform group-hover:-translate-x-0.5"}),r.jsx("span",{children:f("flowViz.backToProviders")})]}):r.jsx("div",{}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:s,className:B("flex items-center gap-1.5 text-xs font-medium transition-all duration-200 px-3 py-1.5 rounded-md border shadow-sm",a?"bg-primary text-primary-foreground border-primary hover:bg-primary/90":"bg-background text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-muted/50"),children:[a?r.jsx(br,{className:"w-3.5 h-3.5"}):r.jsx(vr,{className:"w-3.5 h-3.5"}),r.jsx("span",{children:f(a?"flowViz.hideDetails":"flowViz.showDetails")})]}),l&&r.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-all duration-200 px-3 py-1.5 rounded-md border border-border/60 hover:border-border bg-background hover:bg-muted/50 shadow-sm",children:[r.jsx(YS,{className:"w-3.5 h-3.5"}),r.jsx("span",{children:f("flowViz.resetLayout")})]})]})]})}function K1({providerData:n,onBack:a,onPauseToggle:s,isPausingAccount:l}){const c=S.useRef(null),f=S.useRef(null),[h,p]=S.useState(null),[m,y]=S.useState(!1),[C,x]=S.useState([]),{privacyMode:v}=_d(),{accounts:N}=n,w=Math.max(...N.map($=>$.successCount+$.failureCount),1),T=N.reduce(($,re)=>$+re.successCount+re.failureCount,0),O=S.useCallback(()=>{const $=r1({containerRef:c,svgRef:f,accounts:N});$.length>0&&x($)},[N]),M=`ccs-flow-positions-${n.provider}`,{dragOffsets:U,draggingId:K,handlePointerDown:I,handlePointerMove:E,handlePointerUp:k,getOffset:z,resetPositions:Q,hasCustomPositions:W}=d1({storageKey:M,onDrag:O}),ee=f1(U),ne=h1(N),J=S.useMemo(()=>l1(N).slice(0,i1),[N]);S.useEffect(()=>{const $=setTimeout(O,50);return window.addEventListener("resize",O),()=>{clearTimeout($),window.removeEventListener("resize",O)}},[O]),S.useEffect(()=>{const $=setTimeout(O,10);return()=>clearTimeout($)},[U,O]),S.useEffect(()=>{const $=Date.now(),re=350,te=()=>{O(),Date.now()-$<re&&requestAnimationFrame(te)};requestAnimationFrame(te)},[m,O]);const ge=$d[n.provider.toLowerCase()]||"#6b7280",ue=S.useMemo(()=>c1(N),[N]),{leftAccounts:Ce,rightAccounts:P,topAccounts:V,bottomAccounts:ae}=ue,pe=P.length>0,xe=V.length>0,ie=ae.length>0,Z=S.useMemo(()=>u1(N.length),[N.length]),G=($,re)=>$.map(te=>{const se=N.findIndex(be=>be.id===te.id);return r.jsx(I1,{account:te,zone:re,originalIndex:se,isHovered:h===se,isDragging:K===te.id,offset:z(te.id),showDetails:m,privacyMode:v,onMouseEnter:()=>p(se),onMouseLeave:()=>p(null),onPointerDown:be=>I(te.id,be),onPointerMove:E,onPointerUp:k,onPauseToggle:s,isPausingAccount:l},te.id)});return r.jsxs("div",{className:"flex flex-col",ref:c,children:[r.jsx(B1,{onBack:a,showDetails:m,onToggleDetails:()=>y(!m),hasCustomPositions:W,onResetPositions:Q}),r.jsxs("div",{className:"min-h-[320px] flex gap-4 px-4 py-6 self-stretch items-stretch transition-all duration-200",children:[r.jsxs("div",{className:"relative flex-1 flex flex-col items-stretch justify-center px-4",style:{paddingTop:`${24+ee.paddingTop}px`,paddingBottom:`${24+ee.paddingBottom}px`,minHeight:`${320+ee.extraHeight}px`},children:[r.jsx("svg",{ref:f,className:"absolute inset-0 w-full h-full pointer-events-none z-0 overflow-visible",children:r.jsx(H1,{paths:C,accounts:N,maxRequests:w,hoveredAccount:h,pulsingAccounts:ne})}),xe&&r.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mb-8",children:G(V,"top")}),r.jsxs("div",{className:"flex items-center justify-between gap-8 flex-1",children:[r.jsx("div",{className:"flex flex-col gap-3 z-10 w-48 justify-center flex-shrink-0",children:G(Ce,"left")}),r.jsx("div",{className:B("z-10 flex items-center flex-shrink-0",Z),children:r.jsx(U1,{providerData:n,providerColor:ge,totalRequests:T,maxRequests:w,isDragging:K==="provider",offset:z("provider"),hoveredAccount:h,hasRightAccounts:pe,hasTopAccounts:xe,hasBottomAccounts:ie,onPointerDown:$=>I("provider",$),onPointerMove:E,onPointerUp:k})}),pe&&r.jsx("div",{className:"flex flex-col gap-3 z-10 w-48 justify-center flex-shrink-0",children:G(P,"right")})]}),ie&&r.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mt-8",children:G(ae,"bottom")})]}),r.jsx("div",{className:"w-56 flex-shrink-0 self-stretch relative",children:r.jsx("div",{className:"absolute inset-0",children:r.jsx(p1,{events:J,privacyMode:v})})})]})]})}function q1(n,a){const s=n+a;return s===0?100:Math.round(n/s*100)}function G1(n){return n.replace(/@(gmail|yahoo|hotmail|outlook|icloud)\.com$/i,"")}const Vg=["#1e6091","#2d8a6e","#d4a012","#c92a2d","#c45a1a","#6b9c4d","#3d5a73","#cc7614","#3a7371","#7c5fc4"];function Y1(){const{data:n,isLoading:a,error:s}=JN(),{data:l,isLoading:c,dataUpdatedAt:f}=x1(),[h,p]=S.useState("");S.useEffect(()=>{if(!f)return;const T=()=>{const M=Math.floor((Date.now()-f)/1e3);M<60?p(`${M}s ago`):p(`${Math.floor(M/60)}m ago`)};T();const O=setInterval(T,1e3);return()=>clearInterval(O)},[f]);const m=S.useMemo(()=>l?.accountStats?new Map(Object.entries(l.accountStats)):new Map,[l?.accountStats]),{accounts:y,totalSuccess:C,totalFailure:x,totalRequests:v,providerStats:N}=S.useMemo(()=>{if(!n?.authStatus)return{accounts:[],totalSuccess:0,totalFailure:0,totalRequests:0,providerStats:[]};const T=[],O=new Map;let M=0,U=0,K=0;n.authStatus.forEach(E=>{const k=E.provider;O.has(k)||O.set(k,{success:0,failure:0,accounts:[]});const z=O.get(k);z&&E.accounts?.forEach(Q=>{const W=Q.email||Q.id,ee=m.get(W),ne=ee?.successCount??0,J=ee?.failureCount??0;M+=ne,U+=J,z.success+=ne,z.failure+=J;const ge={id:Q.id,email:Q.email||Q.id,provider:E.provider,displayName:E.displayName,isDefault:Q.isDefault,successCount:ne,failureCount:J,lastUsedAt:ee?.lastUsedAt??Q.lastUsedAt,color:Vg[K%Vg.length],projectId:Q.projectId,paused:Q.paused,tier:Q.tier};T.push(ge),z.accounts.push(ge),K++})});const I=[];return O.forEach((E,k)=>{E.accounts.length!==0&&I.push({provider:k,displayName:Xd(k),totalRequests:E.success+E.failure,successCount:E.success,failureCount:E.failure,accountCount:E.accounts.length,accounts:E.accounts})}),I.sort((E,k)=>k.totalRequests-E.totalRequests),{accounts:T,totalSuccess:M,totalFailure:U,totalRequests:M+U,providerStats:I}},[n?.authStatus,m]),w=v>0?Math.round(C/v*100):100;return{accounts:y,totalSuccess:C,totalFailure:x,totalRequests:v,providerStats:N,overallSuccessRate:w,isLoading:a||c,error:s??null,timeSinceUpdate:h}}function F1(){return r.jsxs("div",{className:"relative flex items-center justify-center w-5 h-5",children:[r.jsx("div",{className:"absolute w-4 h-4 rounded-full animate-ping opacity-20",style:{backgroundColor:Vt.success}}),r.jsx("div",{className:"absolute w-3 h-3 rounded-full animate-pulse opacity-40",style:{backgroundColor:Vt.success}}),r.jsx("div",{className:"relative w-2 h-2 rounded-full z-10",style:{backgroundColor:Vt.success}})]})}function V1({success:n,failure:a}){return n===0&&a===0?r.jsx("span",{className:"text-[9px] text-muted-foreground/50 font-mono",children:"no activity"}):r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("div",{className:"flex items-center gap-0.5",children:[r.jsx(Sr,{className:"w-3 h-3 text-emerald-700 dark:text-emerald-500"}),r.jsx("span",{className:"text-[10px] font-mono font-medium text-emerald-700 dark:text-emerald-500",children:n.toLocaleString()})]}),a>0&&r.jsxs("div",{className:"flex items-center gap-0.5",children:[r.jsx(Pd,{className:"w-3 h-3 text-red-700 dark:text-red-500"}),r.jsx("span",{className:"text-[10px] font-mono font-medium text-red-700 dark:text-red-500",children:a.toLocaleString()})]})]})}function Q1({stats:n,isHovered:a,privacyMode:s,onSelect:l,onMouseEnter:c,onMouseLeave:f}){const h=q1(n.successCount,n.failureCount),p=$d[n.provider.toLowerCase()]||"#6b7280";return r.jsxs("button",{onClick:l,onMouseEnter:c,onMouseLeave:f,className:B("group relative rounded-xl p-4 text-left transition-all duration-300","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border border-border/50 dark:border-white/[0.08]","hover:border-opacity-50 hover:scale-[1.02] hover:shadow-lg",a&&"ring-1"),style:{borderColor:a?p:void 0,"--ring-color":p},children:[r.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[r.jsx(ef,{provider:n.provider,size:36,withBackground:!0}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-semibold text-foreground tracking-tight",children:n.displayName}),r.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[n.accountCount," account",n.accountCount!==1?"s":""]})]}),r.jsx(xr,{className:B("w-4 h-4 ml-auto text-muted-foreground transition-all",a?"opacity-100 translate-x-0":"opacity-0 -translate-x-2")})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"text-muted-foreground",children:"Stats"}),r.jsx(V1,{success:n.successCount,failure:n.failureCount})]}),r.jsxs("div",{className:"flex justify-between text-xs",children:[r.jsx("span",{className:"text-muted-foreground",children:"Success Rate"}),r.jsxs("span",{className:"font-mono font-semibold",style:{color:h===100?Vt.success:h>=95?Vt.degraded:Vt.failed},children:[h,"%"]})]}),r.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${h}%`,backgroundColor:p}})})]}),r.jsxs("div",{className:"flex gap-1 mt-3 items-center",children:[n.accounts.slice(0,5).map(m=>{const y=n.provider==="agy"&&!m.projectId;return r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:B("w-2 h-2 rounded-full",m.paused&&"opacity-50"),style:{backgroundColor:m.color},title:s?"••••••":G1(m.email)}),y&&r.jsx(Ci,{children:r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:r.jsx(qn,{className:"absolute -top-1 -right-1 w-2.5 h-2.5 text-amber-500","aria-label":"Missing Project ID"})}),r.jsx(Za,{side:"top",className:"text-xs",children:"Missing Project ID - re-add account to fix"})]})})]},m.id)}),n.accounts.length>5&&r.jsxs("span",{className:"text-[10px] text-muted-foreground ml-1",children:["+",n.accounts.length-5]})]})]})}function tr({icon:n,label:a,value:s,color:l}){return r.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-card/50 dark:bg-zinc-900/50 border border-border/50 dark:border-white/[0.06]",children:[r.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center",style:{backgroundColor:l?`${l}15`:"var(--muted)",color:l||"var(--muted-foreground)"},children:n}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:a}),r.jsx("div",{className:"text-lg font-semibold font-mono leading-tight",style:{color:l||"var(--foreground)"},children:s})]})]})}const nd="auth-monitor-selected-provider";function W1(){const{t:n}=Lt(),{accounts:a,totalSuccess:s,totalFailure:l,totalRequests:c,providerStats:f,overallSuccessRate:h,isLoading:p,error:m,timeSinceUpdate:y}=Y1(),{privacyMode:C}=_d(),[x,v]=S.useState(()=>typeof window<"u"?localStorage.getItem(nd):null),N=E=>{v(E),E?localStorage.setItem(nd,E):localStorage.removeItem(nd)},w=S.useMemo(()=>x&&f.some(E=>E.provider===x)?x:null,[x,f]),[T,O]=S.useState(null),M=eA(),U=tA(),K=w?f.find(E=>E.provider===w):null,I=(E,k)=>{!w||M.isPending||U.isPending||(k?M.mutate({provider:w,accountId:E}):U.mutate({provider:w,accountId:E}))};return p?r.jsxs("div",{className:"rounded-xl border border-border overflow-hidden font-mono text-[13px] bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm",children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[r.jsx(Ge,{className:"h-4 w-32"}),r.jsx(Ge,{className:"h-4 w-20"})]}),r.jsxs("div",{className:"p-4 space-y-4",children:[r.jsx("div",{className:"flex gap-3",children:[1,2,3,4].map(E=>r.jsx(Ge,{className:"h-16 flex-1 rounded-lg"},E))}),r.jsx(Ge,{className:"h-48 w-full rounded-lg"})]})]}):m||a.length===0?null:r.jsxs("div",{className:"rounded-xl border border-border overflow-hidden font-mono text-[13px] text-foreground bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm",children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-border bg-gradient-to-r from-emerald-500/5 via-transparent to-transparent dark:from-emerald-500/10",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(F1,{}),r.jsx("span",{className:"text-xs font-semibold tracking-tight text-foreground",children:"LIVE"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Account Monitor"})]}),r.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-muted-foreground",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(FS,{className:"w-3 h-3 animate-pulse"}),r.jsxs("span",{children:["Updated ",y||"now"]})]}),r.jsx("span",{className:"text-muted-foreground/50",children:"|"}),r.jsx("span",{children:n("authMonitor.accountsCount",{count:a.length})}),r.jsxs("span",{className:"font-mono",children:[c.toLocaleString()," req"]})]})]}),r.jsxs("div",{className:"grid grid-cols-4 gap-3 p-4 border-b border-border bg-muted/20 dark:bg-zinc-900/30",children:[r.jsx(tr,{icon:r.jsx(js,{className:"w-4 h-4"}),label:n("authMonitor.accounts"),value:a.length,color:"var(--accent)"}),r.jsx(tr,{icon:r.jsx(Sr,{className:"w-4 h-4"}),label:n("authMonitor.success"),value:s.toLocaleString(),color:Vt.success}),r.jsx(tr,{icon:r.jsx(Pd,{className:"w-4 h-4"}),label:n("authMonitor.failed"),value:l.toLocaleString(),color:l>0?Vt.failed:void 0}),r.jsx(tr,{icon:r.jsx(js,{className:"w-4 h-4"}),label:n("authMonitor.successRate"),value:`${h}%`,color:h===100?Vt.success:h>=95?Vt.degraded:Vt.failed})]}),r.jsx("div",{className:"relative overflow-hidden",children:K?r.jsx(K1,{providerData:K,onBack:()=>N(null),onPauseToggle:I,isPausingAccount:M.isPending||U.isPending}):r.jsxs("div",{className:"p-6",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-widest mb-4",children:"Request Distribution by Provider"}),r.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-4",children:f.map(E=>r.jsx(Q1,{stats:E,isHovered:T===E.provider,privacyMode:C,onSelect:()=>N(E.provider),onMouseEnter:()=>O(E.provider),onMouseLeave:()=>O(null)},E.provider))})]})})]})}const Er=S.createContext(null);Er.displayName="PanelGroupContext";const ft={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},tf=10,wi=S.useLayoutEffect,Qg=bS.useId,$1=typeof Qg=="function"?Qg:()=>null;let X1=0;function nf(n=null){const a=$1(),s=S.useRef(n||a||null);return s.current===null&&(s.current=""+X1++),n??s.current}function Tx({children:n,className:a="",collapsedSize:s,collapsible:l,defaultSize:c,forwardedRef:f,id:h,maxSize:p,minSize:m,onCollapse:y,onExpand:C,onResize:x,order:v,style:N,tagName:w="div",...T}){const O=S.useContext(Er);if(O===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:M,expandPanel:U,getPanelSize:K,getPanelStyle:I,groupId:E,isPanelCollapsed:k,reevaluatePanelConstraints:z,registerPanel:Q,resizePanel:W,unregisterPanel:ee}=O,ne=nf(h),J=S.useRef({callbacks:{onCollapse:y,onExpand:C,onResize:x},constraints:{collapsedSize:s,collapsible:l,defaultSize:c,maxSize:p,minSize:m},id:ne,idIsFromProps:h!==void 0,order:v});S.useRef({didLogMissingDefaultSizeWarning:!1}),wi(()=>{const{callbacks:ue,constraints:Ce}=J.current,P={...Ce};J.current.id=ne,J.current.idIsFromProps=h!==void 0,J.current.order=v,ue.onCollapse=y,ue.onExpand=C,ue.onResize=x,Ce.collapsedSize=s,Ce.collapsible=l,Ce.defaultSize=c,Ce.maxSize=p,Ce.minSize=m,(P.collapsedSize!==Ce.collapsedSize||P.collapsible!==Ce.collapsible||P.maxSize!==Ce.maxSize||P.minSize!==Ce.minSize)&&z(J.current,P)}),wi(()=>{const ue=J.current;return Q(ue),()=>{ee(ue)}},[v,ne,Q,ee]),S.useImperativeHandle(f,()=>({collapse:()=>{M(J.current)},expand:ue=>{U(J.current,ue)},getId(){return ne},getSize(){return K(J.current)},isCollapsed(){return k(J.current)},isExpanded(){return!k(J.current)},resize:ue=>{W(J.current,ue)}}),[M,U,K,k,ne,W]);const ge=I(J.current,c);return S.createElement(w,{...T,children:n,className:a,id:ne,style:{...ge,...N},[ft.groupId]:E,[ft.panel]:"",[ft.panelCollapsible]:l||void 0,[ft.panelId]:ne,[ft.panelSize]:parseFloat(""+ge.flexGrow).toFixed(1)})}const Rs=S.forwardRef((n,a)=>S.createElement(Tx,{...n,forwardedRef:a}));Tx.displayName="Panel";Rs.displayName="forwardRef(Panel)";let wd=null,lr=-1,Qa=null;function Z1(n,a,s){const l=(a&Px)!==0,c=(a&Rx)!==0,f=(a&Lx)!==0,h=(a&_x)!==0;if(a){if(l)return f?"se-resize":h?"ne-resize":"e-resize";if(c)return f?"sw-resize":h?"nw-resize":"w-resize";if(f)return"s-resize";if(h)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function J1(){Qa!==null&&(document.head.removeChild(Qa),wd=null,Qa=null,lr=-1)}function ad(n,a,s){var l,c;const f=Z1(n,a);if(wd!==f){if(wd=f,Qa===null&&(Qa=document.createElement("style"),document.head.appendChild(Qa)),lr>=0){var h;(h=Qa.sheet)===null||h===void 0||h.removeRule(lr)}lr=(l=(c=Qa.sheet)===null||c===void 0?void 0:c.insertRule(`*{cursor: ${f} !important;}`))!==null&&l!==void 0?l:-1}}function Mx(n){return n.type==="keydown"}function jx(n){return n.type.startsWith("pointer")}function Ex(n){return n.type.startsWith("mouse")}function Or(n){if(jx(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Ex(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function ek(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function tk(n,a,s){return n.x<a.x+a.width&&n.x+n.width>a.x&&n.y<a.y+a.height&&n.y+n.height>a.y}function nk(n,a){if(n===a)throw new Error("Cannot compare node with itself");const s={a:Xg(n),b:Xg(a)};let l;for(;s.a.at(-1)===s.b.at(-1);)n=s.a.pop(),a=s.b.pop(),l=n;Pe(l,"Stacking order can only be calculated for elements with a common ancestor");const c={a:$g(Wg(s.a)),b:$g(Wg(s.b))};if(c.a===c.b){const f=l.childNodes,h={a:s.a.at(-1),b:s.b.at(-1)};let p=f.length;for(;p--;){const m=f[p];if(m===h.a)return 1;if(m===h.b)return-1}}return Math.sign(c.a-c.b)}const ak=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ik(n){var a;const s=getComputedStyle((a=Ox(n))!==null&&a!==void 0?a:n).display;return s==="flex"||s==="inline-flex"}function ok(n){const a=getComputedStyle(n);return!!(a.position==="fixed"||a.zIndex!=="auto"&&(a.position!=="static"||ik(n))||+a.opacity<1||"transform"in a&&a.transform!=="none"||"webkitTransform"in a&&a.webkitTransform!=="none"||"mixBlendMode"in a&&a.mixBlendMode!=="normal"||"filter"in a&&a.filter!=="none"||"webkitFilter"in a&&a.webkitFilter!=="none"||"isolation"in a&&a.isolation==="isolate"||ak.test(a.willChange)||a.webkitOverflowScrolling==="touch")}function Wg(n){let a=n.length;for(;a--;){const s=n[a];if(Pe(s,"Missing node"),ok(s))return s}return null}function $g(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Xg(n){const a=[];for(;n;)a.push(n),n=Ox(n);return a}function Ox(n){const{parentNode:a}=n;return a&&a instanceof ShadowRoot?a.host:a}const Px=1,Rx=2,Lx=4,_x=8,sk=ek()==="coarse";let Mn=[],yo=!1,Wa=new Map,Pr=new Map;const Ls=new Set;function lk(n,a,s,l,c){var f;const{ownerDocument:h}=a,p={direction:s,element:a,hitAreaMargins:l,setResizeHandlerState:c},m=(f=Wa.get(h))!==null&&f!==void 0?f:0;return Wa.set(h,m+1),Ls.add(p),hr(),function(){var C;Pr.delete(n),Ls.delete(p);const x=(C=Wa.get(h))!==null&&C!==void 0?C:1;if(Wa.set(h,x-1),hr(),x===1&&Wa.delete(h),Mn.includes(p)){const v=Mn.indexOf(p);v>=0&&Mn.splice(v,1),Rr(),c("up",!0,null)}}}function rk(n){const{target:a}=n,{x:s,y:l}=Or(n);yo=!0,af({target:a,x:s,y:l}),hr(),Mn.length>0&&(pr("down",n),Rr(),n.preventDefault(),zx(a)||n.stopImmediatePropagation())}function id(n){const{x:a,y:s}=Or(n);if(yo&&n.type!=="pointerleave"&&n.buttons===0&&(yo=!1,pr("up",n)),!yo){const{target:l}=n;af({target:l,x:a,y:s})}pr("move",n),Rr(),Mn.length>0&&n.preventDefault()}function od(n){const{target:a}=n,{x:s,y:l}=Or(n);Pr.clear(),yo=!1,Mn.length>0&&(n.preventDefault(),zx(a)||n.stopImmediatePropagation()),pr("up",n),af({target:a,x:s,y:l}),Rr(),hr()}function zx(n){let a=n;for(;a;){if(a.hasAttribute(ft.resizeHandle))return!0;a=a.parentElement}return!1}function af({target:n,x:a,y:s}){Mn.splice(0);let l=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(l=n),Ls.forEach(c=>{const{element:f,hitAreaMargins:h}=c,p=f.getBoundingClientRect(),{bottom:m,left:y,right:C,top:x}=p,v=sk?h.coarse:h.fine;if(a>=y-v&&a<=C+v&&s>=x-v&&s<=m+v){if(l!==null&&document.contains(l)&&f!==l&&!f.contains(l)&&!l.contains(f)&&nk(l,f)>0){let w=l,T=!1;for(;w&&!w.contains(f);){if(tk(w.getBoundingClientRect(),p)){T=!0;break}w=w.parentElement}if(T)return}Mn.push(c)}})}function sd(n,a){Pr.set(n,a)}function Rr(){let n=!1,a=!1;Mn.forEach(l=>{const{direction:c}=l;c==="horizontal"?n=!0:a=!0});let s=0;Pr.forEach(l=>{s|=l}),n&&a?ad("intersection",s):n?ad("horizontal",s):a?ad("vertical",s):J1()}let ld;function hr(){var n;(n=ld)===null||n===void 0||n.abort(),ld=new AbortController;const a={capture:!0,signal:ld.signal};Ls.size&&(yo?(Mn.length>0&&Wa.forEach((s,l)=>{const{body:c}=l;s>0&&(c.addEventListener("contextmenu",od,a),c.addEventListener("pointerleave",id,a),c.addEventListener("pointermove",id,a))}),Wa.forEach((s,l)=>{const{body:c}=l;c.addEventListener("pointerup",od,a),c.addEventListener("pointercancel",od,a)})):Wa.forEach((s,l)=>{const{body:c}=l;s>0&&(c.addEventListener("pointerdown",rk,a),c.addEventListener("pointermove",id,a))}))}function pr(n,a){Ls.forEach(s=>{const{setResizeHandlerState:l}=s,c=Mn.includes(s);l(n,c,a)})}function ck(){const[n,a]=S.useState(0);return S.useCallback(()=>a(s=>s+1),[])}function Pe(n,a){if(!n)throw console.error(a),Error(a)}function ki(n,a,s=tf){return n.toFixed(s)===a.toFixed(s)?0:n>a?1:-1}function ma(n,a,s=tf){return ki(n,a,s)===0}function cn(n,a,s){return ki(n,a,s)===0}function uk(n,a,s){if(n.length!==a.length)return!1;for(let l=0;l<n.length;l++){const c=n[l],f=a[l];if(!cn(c,f,s))return!1}return!0}function go({panelConstraints:n,panelIndex:a,size:s}){const l=n[a];Pe(l!=null,`Panel constraints not found for index ${a}`);let{collapsedSize:c=0,collapsible:f,maxSize:h=100,minSize:p=0}=l;if(ki(s,p)<0)if(f){const m=(c+p)/2;ki(s,m)<0?s=c:s=p}else s=p;return s=Math.min(h,s),s=parseFloat(s.toFixed(tf)),s}function Ns({delta:n,initialLayout:a,panelConstraints:s,pivotIndices:l,prevLayout:c,trigger:f}){if(cn(n,0))return a;const h=[...a],[p,m]=l;Pe(p!=null,"Invalid first pivot index"),Pe(m!=null,"Invalid second pivot index");let y=0;if(f==="keyboard"){{const x=n<0?m:p,v=s[x];Pe(v,`Panel constraints not found for index ${x}`);const{collapsedSize:N=0,collapsible:w,minSize:T=0}=v;if(w){const O=a[x];if(Pe(O!=null,`Previous layout not found for panel index ${x}`),cn(O,N)){const M=T-O;ki(M,Math.abs(n))>0&&(n=n<0?0-M:M)}}}{const x=n<0?p:m,v=s[x];Pe(v,`No panel constraints found for index ${x}`);const{collapsedSize:N=0,collapsible:w,minSize:T=0}=v;if(w){const O=a[x];if(Pe(O!=null,`Previous layout not found for panel index ${x}`),cn(O,T)){const M=O-N;ki(M,Math.abs(n))>0&&(n=n<0?0-M:M)}}}}{const x=n<0?1:-1;let v=n<0?m:p,N=0;for(;;){const T=a[v];Pe(T!=null,`Previous layout not found for panel index ${v}`);const M=go({panelConstraints:s,panelIndex:v,size:100})-T;if(N+=M,v+=x,v<0||v>=s.length)break}const w=Math.min(Math.abs(n),Math.abs(N));n=n<0?0-w:w}{let v=n<0?p:m;for(;v>=0&&v<s.length;){const N=Math.abs(n)-Math.abs(y),w=a[v];Pe(w!=null,`Previous layout not found for panel index ${v}`);const T=w-N,O=go({panelConstraints:s,panelIndex:v,size:T});if(!cn(w,O)&&(y+=w-O,h[v]=O,y.toFixed(3).localeCompare(Math.abs(n).toFixed(3),void 0,{numeric:!0})>=0))break;n<0?v--:v++}}if(uk(c,h))return c;{const x=n<0?m:p,v=a[x];Pe(v!=null,`Previous layout not found for panel index ${x}`);const N=v+y,w=go({panelConstraints:s,panelIndex:x,size:N});if(h[x]=w,!cn(w,N)){let T=N-w,M=n<0?m:p;for(;M>=0&&M<s.length;){const U=h[M];Pe(U!=null,`Previous layout not found for panel index ${M}`);const K=U+T,I=go({panelConstraints:s,panelIndex:M,size:K});if(cn(U,I)||(T-=I-U,h[M]=I),cn(T,0))break;n>0?M--:M++}}}const C=h.reduce((x,v)=>v+x,0);return cn(C,100)?h:c}function dk({layout:n,panelsArray:a,pivotIndices:s}){let l=0,c=100,f=0,h=0;const p=s[0];Pe(p!=null,"No pivot index found"),a.forEach((x,v)=>{const{constraints:N}=x,{maxSize:w=100,minSize:T=0}=N;v===p?(l=T,c=w):(f+=T,h+=w)});const m=Math.min(c,100-f),y=Math.max(l,100-h),C=n[p];return{valueMax:m,valueMin:y,valueNow:C}}function _s(n,a=document){return Array.from(a.querySelectorAll(`[${ft.resizeHandleId}][data-panel-group-id="${n}"]`))}function Ix(n,a,s=document){const c=_s(n,s).findIndex(f=>f.getAttribute(ft.resizeHandleId)===a);return c??null}function Ux(n,a,s){const l=Ix(n,a,s);return l!=null?[l,l+1]:[-1,-1]}function fk(n){return n instanceof HTMLElement?!0:typeof n=="object"&&n!==null&&"tagName"in n&&"getAttribute"in n}function Hx(n,a=document){if(fk(a)&&a.dataset.panelGroupId==n)return a;const s=a.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Lr(n,a=document){const s=a.querySelector(`[${ft.resizeHandleId}="${n}"]`);return s||null}function hk(n,a,s,l=document){var c,f,h,p;const m=Lr(a,l),y=_s(n,l),C=m?y.indexOf(m):-1,x=(c=(f=s[C])===null||f===void 0?void 0:f.id)!==null&&c!==void 0?c:null,v=(h=(p=s[C+1])===null||p===void 0?void 0:p.id)!==null&&h!==void 0?h:null;return[x,v]}function pk({committedValuesRef:n,eagerValuesRef:a,groupId:s,layout:l,panelDataArray:c,panelGroupElement:f,setLayout:h}){S.useRef({didWarnAboutMissingResizeHandle:!1}),wi(()=>{if(!f)return;const p=_s(s,f);for(let m=0;m<c.length-1;m++){const{valueMax:y,valueMin:C,valueNow:x}=dk({layout:l,panelsArray:c,pivotIndices:[m,m+1]}),v=p[m];if(v!=null){const N=c[m];Pe(N,`No panel data found for index "${m}"`),v.setAttribute("aria-controls",N.id),v.setAttribute("aria-valuemax",""+Math.round(y)),v.setAttribute("aria-valuemin",""+Math.round(C)),v.setAttribute("aria-valuenow",x!=null?""+Math.round(x):"")}}return()=>{p.forEach((m,y)=>{m.removeAttribute("aria-controls"),m.removeAttribute("aria-valuemax"),m.removeAttribute("aria-valuemin"),m.removeAttribute("aria-valuenow")})}},[s,l,c,f]),S.useEffect(()=>{if(!f)return;const p=a.current;Pe(p,"Eager values not found");const{panelDataArray:m}=p,y=Hx(s,f);Pe(y!=null,`No group found for id "${s}"`);const C=_s(s,f);Pe(C,`No resize handles found for group id "${s}"`);const x=C.map(v=>{const N=v.getAttribute(ft.resizeHandleId);Pe(N,"Resize handle element has no handle id attribute");const[w,T]=hk(s,N,m,f);if(w==null||T==null)return()=>{};const O=M=>{if(!M.defaultPrevented)switch(M.key){case"Enter":{M.preventDefault();const U=m.findIndex(K=>K.id===w);if(U>=0){const K=m[U];Pe(K,`No panel data found for index ${U}`);const I=l[U],{collapsedSize:E=0,collapsible:k,minSize:z=0}=K.constraints;if(I!=null&&k){const Q=Ns({delta:cn(I,E)?z-E:E-I,initialLayout:l,panelConstraints:m.map(W=>W.constraints),pivotIndices:Ux(s,N,f),prevLayout:l,trigger:"keyboard"});l!==Q&&h(Q)}}break}}};return v.addEventListener("keydown",O),()=>{v.removeEventListener("keydown",O)}});return()=>{x.forEach(v=>v())}},[f,n,a,s,l,c,h])}function Zg(n,a){if(n.length!==a.length)return!1;for(let s=0;s<n.length;s++)if(n[s]!==a[s])return!1;return!0}function Bx(n,a){const s=n==="horizontal",{x:l,y:c}=Or(a);return s?l:c}function mk(n,a,s,l,c){const f=s==="horizontal",h=Lr(a,c);Pe(h,`No resize handle element found for id "${a}"`);const p=h.getAttribute(ft.groupId);Pe(p,"Resize handle element has no group id attribute");let{initialCursorPosition:m}=l;const y=Bx(s,n),C=Hx(p,c);Pe(C,`No group element found for id "${p}"`);const x=C.getBoundingClientRect(),v=f?x.width:x.height;return(y-m)/v*100}function gk(n,a,s,l,c,f){if(Mx(n)){const h=s==="horizontal";let p=0;n.shiftKey?p=100:c!=null?p=c:p=10;let m=0;switch(n.key){case"ArrowDown":m=h?0:p;break;case"ArrowLeft":m=h?-p:0;break;case"ArrowRight":m=h?p:0;break;case"ArrowUp":m=h?0:-p;break;case"End":m=100;break;case"Home":m=-100;break}return m}else return l==null?0:mk(n,a,s,l,f)}function yk({panelDataArray:n}){const a=Array(n.length),s=n.map(f=>f.constraints);let l=0,c=100;for(let f=0;f<n.length;f++){const h=s[f];Pe(h,`Panel constraints not found for index ${f}`);const{defaultSize:p}=h;p!=null&&(l++,a[f]=p,c-=p)}for(let f=0;f<n.length;f++){const h=s[f];Pe(h,`Panel constraints not found for index ${f}`);const{defaultSize:p}=h;if(p!=null)continue;const m=n.length-l,y=c/m;l++,a[f]=y,c-=y}return a}function po(n,a,s){a.forEach((l,c)=>{const f=n[c];Pe(f,`Panel data not found for index ${c}`);const{callbacks:h,constraints:p,id:m}=f,{collapsedSize:y=0,collapsible:C}=p,x=s[m];if(x==null||l!==x){s[m]=l;const{onCollapse:v,onExpand:N,onResize:w}=h;w&&w(l,x),C&&(v||N)&&(N&&(x==null||ma(x,y))&&!ma(l,y)&&N(),v&&(x==null||!ma(x,y))&&ma(l,y)&&v())}})}function nr(n,a){if(n.length!==a.length)return!1;for(let s=0;s<n.length;s++)if(n[s]!=a[s])return!1;return!0}function xk({defaultSize:n,dragState:a,layout:s,panelData:l,panelIndex:c,precision:f=3}){const h=s[c];let p;return h==null?p=n!=null?n.toFixed(f):"1":l.length===1?p="1":p=h.toFixed(f),{flexBasis:0,flexGrow:p,flexShrink:1,overflow:"hidden",pointerEvents:a!==null?"none":void 0}}function bk(n,a=10){let s=null;return(...c)=>{s!==null&&clearTimeout(s),s=setTimeout(()=>{n(...c)},a)}}function Jg(n){try{if(typeof localStorage<"u")n.getItem=a=>localStorage.getItem(a),n.setItem=(a,s)=>{localStorage.setItem(a,s)};else throw new Error("localStorage not supported in this environment")}catch(a){console.error(a),n.getItem=()=>null,n.setItem=()=>{}}}function Kx(n){return`react-resizable-panels:${n}`}function qx(n){return n.map(a=>{const{constraints:s,id:l,idIsFromProps:c,order:f}=a;return c?l:f?`${f}:${JSON.stringify(s)}`:JSON.stringify(s)}).sort((a,s)=>a.localeCompare(s)).join(",")}function Gx(n,a){try{const s=Kx(n),l=a.getItem(s);if(l){const c=JSON.parse(l);if(typeof c=="object"&&c!=null)return c}}catch{}return null}function vk(n,a,s){var l,c;const f=(l=Gx(n,s))!==null&&l!==void 0?l:{},h=qx(a);return(c=f[h])!==null&&c!==void 0?c:null}function Sk(n,a,s,l,c){var f;const h=Kx(n),p=qx(a),m=(f=Gx(n,c))!==null&&f!==void 0?f:{};m[p]={expandToSizes:Object.fromEntries(s.entries()),layout:l};try{c.setItem(h,JSON.stringify(m))}catch(y){console.error(y)}}function ey({layout:n,panelConstraints:a}){const s=[...n],l=s.reduce((f,h)=>f+h,0);if(s.length!==a.length)throw Error(`Invalid ${a.length} panel layout: ${s.map(f=>`${f}%`).join(", ")}`);if(!cn(l,100)&&s.length>0)for(let f=0;f<a.length;f++){const h=s[f];Pe(h!=null,`No layout data found for index ${f}`);const p=100/l*h;s[f]=p}let c=0;for(let f=0;f<a.length;f++){const h=s[f];Pe(h!=null,`No layout data found for index ${f}`);const p=go({panelConstraints:a,panelIndex:f,size:h});h!=p&&(c+=h-p,s[f]=p)}if(!cn(c,0))for(let f=0;f<a.length;f++){const h=s[f];Pe(h!=null,`No layout data found for index ${f}`);const p=h+c,m=go({panelConstraints:a,panelIndex:f,size:p});if(h!==m&&(c-=m-h,s[f]=m,cn(c,0)))break}return s}const Ck=100,As={getItem:n=>(Jg(As),As.getItem(n)),setItem:(n,a)=>{Jg(As),As.setItem(n,a)}},ty={};function Yx({autoSaveId:n=null,children:a,className:s="",direction:l,forwardedRef:c,id:f=null,onLayout:h=null,keyboardResizeBy:p=null,storage:m=As,style:y,tagName:C="div",...x}){const v=nf(f),N=S.useRef(null),[w,T]=S.useState(null),[O,M]=S.useState([]),U=ck(),K=S.useRef({}),I=S.useRef(new Map),E=S.useRef(0),k=S.useRef({autoSaveId:n,direction:l,dragState:w,id:v,keyboardResizeBy:p,onLayout:h,storage:m}),z=S.useRef({layout:O,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(c,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:G}=z.current;return G},setLayout:G=>{const{onLayout:$}=k.current,{layout:re,panelDataArray:te}=z.current,se=ey({layout:G,panelConstraints:te.map(be=>be.constraints)});Zg(re,se)||(M(se),z.current.layout=se,$&&$(se),po(te,se,K.current))}}),[]),wi(()=>{k.current.autoSaveId=n,k.current.direction=l,k.current.dragState=w,k.current.id=v,k.current.onLayout=h,k.current.storage=m}),pk({committedValuesRef:k,eagerValuesRef:z,groupId:v,layout:O,panelDataArray:z.current.panelDataArray,setLayout:M,panelGroupElement:N.current}),S.useEffect(()=>{const{panelDataArray:G}=z.current;if(n){if(O.length===0||O.length!==G.length)return;let $=ty[n];$==null&&($=bk(Sk,Ck),ty[n]=$);const re=[...G],te=new Map(I.current);$(n,re,te,O,m)}},[n,O,m]),S.useEffect(()=>{});const Q=S.useCallback(G=>{const{onLayout:$}=k.current,{layout:re,panelDataArray:te}=z.current;if(G.constraints.collapsible){const se=te.map(St=>St.constraints),{collapsedSize:be=0,panelSize:Re,pivotIndices:Ye}=vi(te,G,re);if(Pe(Re!=null,`Panel size not found for panel "${G.id}"`),!ma(Re,be)){I.current.set(G.id,Re);const Ct=mo(te,G)===te.length-1?Re-be:be-Re,Ve=Ns({delta:Ct,initialLayout:re,panelConstraints:se,pivotIndices:Ye,prevLayout:re,trigger:"imperative-api"});nr(re,Ve)||(M(Ve),z.current.layout=Ve,$&&$(Ve),po(te,Ve,K.current))}}},[]),W=S.useCallback((G,$)=>{const{onLayout:re}=k.current,{layout:te,panelDataArray:se}=z.current;if(G.constraints.collapsible){const be=se.map(ot=>ot.constraints),{collapsedSize:Re=0,panelSize:Ye=0,minSize:St=0,pivotIndices:Ct}=vi(se,G,te),Ve=$??St;if(ma(Ye,Re)){const ot=I.current.get(G.id),It=ot!=null&&ot>=Ve?ot:Ve,Yn=mo(se,G)===se.length-1?Ye-It:It-Ye,De=Ns({delta:Yn,initialLayout:te,panelConstraints:be,pivotIndices:Ct,prevLayout:te,trigger:"imperative-api"});nr(te,De)||(M(De),z.current.layout=De,re&&re(De),po(se,De,K.current))}}},[]),ee=S.useCallback(G=>{const{layout:$,panelDataArray:re}=z.current,{panelSize:te}=vi(re,G,$);return Pe(te!=null,`Panel size not found for panel "${G.id}"`),te},[]),ne=S.useCallback((G,$)=>{const{panelDataArray:re}=z.current,te=mo(re,G);return xk({defaultSize:$,dragState:w,layout:O,panelData:re,panelIndex:te})},[w,O]),J=S.useCallback(G=>{const{layout:$,panelDataArray:re}=z.current,{collapsedSize:te=0,collapsible:se,panelSize:be}=vi(re,G,$);return Pe(be!=null,`Panel size not found for panel "${G.id}"`),se===!0&&ma(be,te)},[]),ge=S.useCallback(G=>{const{layout:$,panelDataArray:re}=z.current,{collapsedSize:te=0,collapsible:se,panelSize:be}=vi(re,G,$);return Pe(be!=null,`Panel size not found for panel "${G.id}"`),!se||ki(be,te)>0},[]),ue=S.useCallback(G=>{const{panelDataArray:$}=z.current;$.push(G),$.sort((re,te)=>{const se=re.order,be=te.order;return se==null&&be==null?0:se==null?-1:be==null?1:se-be}),z.current.panelDataArrayChanged=!0,U()},[U]);wi(()=>{if(z.current.panelDataArrayChanged){z.current.panelDataArrayChanged=!1;const{autoSaveId:G,onLayout:$,storage:re}=k.current,{layout:te,panelDataArray:se}=z.current;let be=null;if(G){const Ye=vk(G,se,re);Ye&&(I.current=new Map(Object.entries(Ye.expandToSizes)),be=Ye.layout)}be==null&&(be=yk({panelDataArray:se}));const Re=ey({layout:be,panelConstraints:se.map(Ye=>Ye.constraints)});Zg(te,Re)||(M(Re),z.current.layout=Re,$&&$(Re),po(se,Re,K.current))}}),wi(()=>{const G=z.current;return()=>{G.layout=[]}},[]);const Ce=S.useCallback(G=>{let $=!1;const re=N.current;return re&&window.getComputedStyle(re,null).getPropertyValue("direction")==="rtl"&&($=!0),function(se){se.preventDefault();const be=N.current;if(!be)return()=>null;const{direction:Re,dragState:Ye,id:St,keyboardResizeBy:Ct,onLayout:Ve}=k.current,{layout:ot,panelDataArray:It}=z.current,{initialLayout:Qt}=Ye??{},Yn=Ux(St,G,be);let De=gk(se,G,Re,Ye,Ct,be);const Wt=Re==="horizontal";Wt&&$&&(De=-De);const En=It.map(Fn=>Fn.constraints),$t=Ns({delta:De,initialLayout:Qt??ot,panelConstraints:En,pivotIndices:Yn,prevLayout:ot,trigger:Mx(se)?"keyboard":"mouse-or-touch"}),Sa=!nr(ot,$t);(jx(se)||Ex(se))&&E.current!=De&&(E.current=De,!Sa&&De!==0?Wt?sd(G,De<0?Px:Rx):sd(G,De<0?Lx:_x):sd(G,0)),Sa&&(M($t),z.current.layout=$t,Ve&&Ve($t),po(It,$t,K.current))}},[]),P=S.useCallback((G,$)=>{const{onLayout:re}=k.current,{layout:te,panelDataArray:se}=z.current,be=se.map(ot=>ot.constraints),{panelSize:Re,pivotIndices:Ye}=vi(se,G,te);Pe(Re!=null,`Panel size not found for panel "${G.id}"`);const Ct=mo(se,G)===se.length-1?Re-$:$-Re,Ve=Ns({delta:Ct,initialLayout:te,panelConstraints:be,pivotIndices:Ye,prevLayout:te,trigger:"imperative-api"});nr(te,Ve)||(M(Ve),z.current.layout=Ve,re&&re(Ve),po(se,Ve,K.current))},[]),V=S.useCallback((G,$)=>{const{layout:re,panelDataArray:te}=z.current,{collapsedSize:se=0,collapsible:be}=$,{collapsedSize:Re=0,collapsible:Ye,maxSize:St=100,minSize:Ct=0}=G.constraints,{panelSize:Ve}=vi(te,G,re);Ve!=null&&(be&&Ye&&ma(Ve,se)?ma(se,Re)||P(G,Re):Ve<Ct?P(G,Ct):Ve>St&&P(G,St))},[P]),ae=S.useCallback((G,$)=>{const{direction:re}=k.current,{layout:te}=z.current;if(!N.current)return;const se=Lr(G,N.current);Pe(se,`Drag handle element not found for id "${G}"`);const be=Bx(re,$);T({dragHandleId:G,dragHandleRect:se.getBoundingClientRect(),initialCursorPosition:be,initialLayout:te})},[]),pe=S.useCallback(()=>{T(null)},[]),xe=S.useCallback(G=>{const{panelDataArray:$}=z.current,re=mo($,G);re>=0&&($.splice(re,1),delete K.current[G.id],z.current.panelDataArrayChanged=!0,U())},[U]),ie=S.useMemo(()=>({collapsePanel:Q,direction:l,dragState:w,expandPanel:W,getPanelSize:ee,getPanelStyle:ne,groupId:v,isPanelCollapsed:J,isPanelExpanded:ge,reevaluatePanelConstraints:V,registerPanel:ue,registerResizeHandle:Ce,resizePanel:P,startDragging:ae,stopDragging:pe,unregisterPanel:xe,panelGroupElement:N.current}),[Q,w,l,W,ee,ne,v,J,ge,V,ue,Ce,P,ae,pe,xe]),Z={display:"flex",flexDirection:l==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(Er.Provider,{value:ie},S.createElement(C,{...x,children:a,className:s,id:f,ref:N,style:{...Z,...y},[ft.group]:"",[ft.groupDirection]:l,[ft.groupId]:v}))}const of=S.forwardRef((n,a)=>S.createElement(Yx,{...n,forwardedRef:a}));Yx.displayName="PanelGroup";of.displayName="forwardRef(PanelGroup)";function mo(n,a){return n.findIndex(s=>s===a||s.id===a.id)}function vi(n,a,s){const l=mo(n,a),f=l===n.length-1?[l-1,l]:[l,l+1],h=s[l];return{...a.constraints,panelSize:h,pivotIndices:f}}function wk({disabled:n,handleId:a,resizeHandler:s,panelGroupElement:l}){S.useEffect(()=>{if(n||s==null||l==null)return;const c=Lr(a,l);if(c==null)return;const f=h=>{if(!h.defaultPrevented)switch(h.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{h.preventDefault(),s(h);break}case"F6":{h.preventDefault();const p=c.getAttribute(ft.groupId);Pe(p,`No group element found for id "${p}"`);const m=_s(p,l),y=Ix(p,a,l);Pe(y!==null,`No resize element found for id "${a}"`);const C=h.shiftKey?y>0?y-1:m.length-1:y+1<m.length?y+1:0;m[C].focus();break}}};return c.addEventListener("keydown",f),()=>{c.removeEventListener("keydown",f)}},[l,n,a,s])}function sf({children:n=null,className:a="",disabled:s=!1,hitAreaMargins:l,id:c,onBlur:f,onClick:h,onDragging:p,onFocus:m,onPointerDown:y,onPointerUp:C,style:x={},tabIndex:v=0,tagName:N="div",...w}){var T,O;const M=S.useRef(null),U=S.useRef({onClick:h,onDragging:p,onPointerDown:y,onPointerUp:C});S.useEffect(()=>{U.current.onClick=h,U.current.onDragging=p,U.current.onPointerDown=y,U.current.onPointerUp=C});const K=S.useContext(Er);if(K===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:I,groupId:E,registerResizeHandle:k,startDragging:z,stopDragging:Q,panelGroupElement:W}=K,ee=nf(c),[ne,J]=S.useState("inactive"),[ge,ue]=S.useState(!1),[Ce,P]=S.useState(null),V=S.useRef({state:ne});wi(()=>{V.current.state=ne}),S.useEffect(()=>{if(s)P(null);else{const ie=k(ee);P(()=>ie)}},[s,ee,k]);const ae=(T=l?.coarse)!==null&&T!==void 0?T:15,pe=(O=l?.fine)!==null&&O!==void 0?O:5;S.useEffect(()=>{if(s||Ce==null)return;const ie=M.current;Pe(ie,"Element ref not attached");let Z=!1;return lk(ee,ie,I,{coarse:ae,fine:pe},($,re,te)=>{if(!re){J("inactive");return}switch($){case"down":{J("drag"),Z=!1,Pe(te,'Expected event to be defined for "down" action'),z(ee,te);const{onDragging:se,onPointerDown:be}=U.current;se?.(!0),be?.();break}case"move":{const{state:se}=V.current;Z=!0,se!=="drag"&&J("hover"),Pe(te,'Expected event to be defined for "move" action'),Ce(te);break}case"up":{J("hover"),Q();const{onClick:se,onDragging:be,onPointerUp:Re}=U.current;be?.(!1),Re?.(),Z||se?.();break}}})},[ae,I,s,pe,k,ee,Ce,z,Q]),wk({disabled:s,handleId:ee,resizeHandler:Ce,panelGroupElement:W});const xe={touchAction:"none",userSelect:"none"};return S.createElement(N,{...w,children:n,className:a,id:c,onBlur:()=>{ue(!1),f?.()},onFocus:()=>{ue(!0),m?.()},ref:M,role:"separator",style:{...xe,...x},tabIndex:v,[ft.groupDirection]:I,[ft.groupId]:E,[ft.resizeHandle]:"",[ft.resizeHandleActive]:ne==="drag"?"pointer":ge?"keyboard":void 0,[ft.resizeHandleEnabled]:!s,[ft.resizeHandleId]:ee,[ft.resizeHandleState]:ne})}sf.displayName="PanelResizeHandle";const So=S.forwardRef(({className:n,children:a,...s},l)=>r.jsxs(Hy,{ref:l,className:B("relative overflow-hidden",n),...s,children:[r.jsx(rS,{className:"h-full w-full rounded-[inherit]",children:a}),r.jsx(Fx,{}),r.jsx(cS,{})]}));So.displayName=Hy.displayName;const Fx=S.forwardRef(({className:n,orientation:a="vertical",...s},l)=>r.jsx(By,{ref:l,orientation:a,className:B("flex touch-none select-none transition-colors",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...s,children:r.jsx(uS,{className:"relative flex-1 rounded-full bg-border"})}));Fx.displayName=By.displayName;function Nk(n){const a={provider:"unknown",endpoint:"unknown",timestamp:new Date,raw:n},s=n.match(/error-api-provider-([^-]+)-/);s&&(a.provider=s[1]);const l=n.match(/error-api-provider-[^-]+-(.+?)-\d{4}-\d{2}-\d{2}T/);l&&(a.endpoint=l[1].replace(/-/g,"/"));const c=n.match(/(\d{4}-\d{2}-\d{2}T\d{6})/);if(c){const f=c[1],h=`${f.slice(0,10)}T${f.slice(11,13)}:${f.slice(13,15)}:${f.slice(15,17)}`;a.timestamp=new Date(h)}return a}function Ak(n){const a={version:"",url:"",method:"",timestamp:"",statusCode:0,statusText:"",requestHeaders:{},requestBody:"",responseHeaders:{},responseBody:"",provider:"",endpoint:"",isClientError:!1,isServerError:!1,errorType:"unknown",model:null,quotaResetDelay:null,quotaResetTimestamp:null},s=n.split(/^===\s*(.+?)\s*===$/m);let l="";for(let c=0;c<s.length;c++){const f=s[c].trim();if(f==="REQUEST INFO"){l="request_info";continue}else if(f==="HEADERS"){l="headers";continue}else if(f==="REQUEST BODY"){l="request_body";continue}else if(f==="API RESPONSE"){l="";continue}else if(f==="RESPONSE"){l="response";continue}switch(l){case"request_info":kk(f,a);break;case"headers":a.requestHeaders=Dk(f);break;case"request_body":a.requestBody=f;break;case"response":Tk(f,a);break}}return Mk(a),a}function kk(n,a){const s=n.split(`
11
+ `);for(const l of s){const[c,...f]=l.split(":"),h=f.join(":").trim();switch(c?.trim()?.toLowerCase()){case"version":a.version=h;break;case"url":a.url=h;break;case"method":a.method=h;break;case"timestamp":a.timestamp=h;break}}}function Dk(n){const a={},s=n.split(`
12
+ `);for(const l of s){const c=l.indexOf(":");if(c>0){const f=l.slice(0,c).trim(),h=l.slice(c+1).trim();f&&(a[f]=h)}}return a}function Tk(n,a){const s=n.split(`
13
+ `);let l=!1;const c=[];for(const f of s){if(f.startsWith("Status:")){const p=f.replace("Status:","").trim().split(/\s+/);a.statusCode=parseInt(p[0],10)||0,a.statusText=p.slice(1).join(" ")||Ok(a.statusCode);continue}if(f.trim()===""&&!l){l=!0;continue}if(l)c.push(f);else{const h=f.indexOf(":");if(h>0){const p=f.slice(0,h).trim(),m=f.slice(h+1).trim();p&&(a.responseHeaders[p]=m)}}}a.responseBody=c.join(`
14
+ `).trim()}function Mk(n){const a=n.url.match(/\/api\/provider\/([^/]+)/);a&&(n.provider=a[1]);const s=n.url.match(/\/api\/provider\/[^/]+\/(.+?)(?:\?|$)/);s&&(n.endpoint=s[1]),n.isClientError=n.statusCode>=400&&n.statusCode<500,n.isServerError=n.statusCode>=500,n.statusCode===429?n.errorType="rate_limit":n.statusCode===401||n.statusCode===403?n.errorType="auth":n.statusCode===404?n.errorType="not_found":n.statusCode>=500?n.errorType="server":(n.statusCode===408||n.statusCode===504)&&(n.errorType="timeout"),jk(n),n.statusCode===429&&Ek(n)}function jk(n){if(n.requestBody)try{const a=JSON.parse(n.requestBody);typeof a.model=="string"&&(n.model=a.model)}catch{}}function Ek(n){if(n.responseBody)try{const a=JSON.parse(n.responseBody),s=Nd(a);s!==null&&(n.quotaResetDelay=s);const l=Ad(a);l&&(n.quotaResetTimestamp=l)}catch{}}function Nd(n){if(typeof n!="object"||n===null)return null;const a=n;if("quotaResetDelay"in a){const s=a.quotaResetDelay;if(typeof s=="number")return s;if(typeof s=="string"){const l=s.match(/^(\d+)s?$/);if(l)return parseInt(l[1],10)}}if("error"in a&&typeof a.error=="object"){const s=Nd(a.error);if(s!==null)return s}if("details"in a&&Array.isArray(a.details))for(const s of a.details){const l=Nd(s);if(l!==null)return l}return null}function Ad(n){if(typeof n!="object"||n===null)return null;const a=n;for(const s of["quotaResetTimeStamp","quotaResetTimestamp","resetTime","reset_time"])if(s in a&&typeof a[s]=="string")return a[s];if("error"in a&&typeof a.error=="object"){const s=Ad(a.error);if(s)return s}if("details"in a&&Array.isArray(a.details))for(const s of a.details){const l=Ad(s);if(l)return l}return null}function Ok(n){return{400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",408:"Request Timeout",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[n]||""}function Pk(n,a){const s=Ld(),l=s==="zh-CN",c=s==="vi",f=Date.now(),h=n*1e3,p=f-h,m=Math.floor(p/1e3),y=Math.floor(m/60),C=Math.floor(y/60),x=Math.floor(C/24);return m<60?l?"刚刚":c?"vừa xong":"just now":y<60?l?`${y} 分钟前`:c?`${y} phút trước`:`${y}m ago`:C<24?l?`${C} 小时前`:c?`${C} giờ trước`:`${C}h ago`:x<7?l?`${x} 天前`:c?`${x} ngày trước`:`${x}d ago`:new Date(h).toLocaleDateString(s,{month:"short",day:"numeric"})}function Rk(n){return n>=500?"text-red-500":n===429?"text-orange-500":n>=400?"text-yellow-500":"text-gray-500"}function Lk(n,a){const s=Ld();return s==="zh-CN"?{rate_limit:"限流",auth:"认证错误",not_found:"未找到",server:"服务错误",timeout:"超时",unknown:"错误"}[n]||"错误":s==="vi"?{rate_limit:"Quá giới hạn",auth:"Lỗi xác thực",not_found:"Không tìm thấy",server:"Lỗi máy chủ",timeout:"Hết thời gian chờ",unknown:"Lỗi"}[n]||"Lỗi":{rate_limit:"Rate Limited",auth:"Auth Error",not_found:"Not Found",server:"Server Error",timeout:"Timeout",unknown:"Error"}[n]||"Error"}function _k(n){if(n===null||n<=0)return null;if(n<60)return`${n}s`;if(n<3600)return`${Math.floor(n/60)}m`;const a=Math.floor(n/3600),s=Math.floor(n%3600/60);return s>0?`${a}h ${s}m`:`${a}h`}function zk(n,a){if(!n)return null;const s=Ld(),l=s==="zh-CN",c=s==="vi";try{const f=new Date(n),h=new Date,p=f.getTime()-h.getTime();if(p<=0)return l?"现在":c?"bây giờ":"now";const m=Math.floor(p/1e3);if(m<60)return l?`${m}秒`:c?`${m} giây`:`${m}s`;if(m<3600){const x=Math.floor(m/60);return l?`${x}分钟`:c?`${x} phút`:`${x}m`}const y=Math.floor(m/3600),C=Math.floor(m%3600/60);return l?C>0?`${y}小时 ${C}分钟`:`${y}小时`:c?C>0?`${y} giờ ${C} phút`:`${y} giờ`:C>0?`${y}h ${C}m`:`${y}h`}catch{return null}}function Ik(n){return n?n===429?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":n>=500?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":n>=400?"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400":"bg-gray-100 text-gray-600":"bg-gray-100 text-gray-600"}function Uk(n){return n||""}function Hk({name:n,size:a,modified:s,isSelected:l,onClick:c,statusCode:f,model:h}){const p=S.useMemo(()=>Nk(n),[n]),m=S.useMemo(()=>Uk(h),[h]);return r.jsxs("button",{onClick:c,className:B("w-full px-2.5 py-2 flex items-center gap-2 text-left transition-colors","hover:bg-muted/40 border-l-[3px]",l?"bg-muted/50 border-l-red-500":"border-l-transparent"),children:[r.jsx("span",{className:B("shrink-0 text-[10px] font-bold px-1.5 py-0.5 rounded min-w-[32px] text-center",Ik(f)),children:f||"???"}),r.jsx(ef,{provider:p.provider,size:18,withBackground:!0,className:"shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[r.jsx("span",{className:"text-[11px] font-medium text-foreground truncate",children:p.endpoint||"unknown"}),m&&r.jsx("span",{className:"text-[10px] text-muted-foreground truncate",title:m,children:m}),r.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-muted-foreground/60",children:[r.jsx(Os,{className:"w-2.5 h-2.5"}),r.jsx("span",{children:Pk(s)})]})]})]})}function ny({value:n,className:a,variant:s="outline",size:l="icon",label:c="Copy to clipboard"}){const[f,h]=S.useState(!1),p=()=>{navigator.clipboard.writeText(n),h(!0),setTimeout(()=>h(!1),2e3)};return r.jsx(Ci,{children:r.jsxs($a,{children:[r.jsx(Xa,{asChild:!0,children:r.jsxs(ct,{size:l,variant:s,className:B("relative z-10 text-muted-foreground hover:text-foreground",a),onClick:m=>{m.stopPropagation(),p()},children:[f?r.jsx(xo,{className:"h-3.5 w-3.5 text-green-500"}):r.jsx(rr,{className:"h-3.5 w-3.5"}),r.jsx("span",{className:"sr-only",children:c})]})}),r.jsx(Za,{children:r.jsx("p",{children:f?"Copied!":c})})]})})}function Ss({active:n,onClick:a,children:s,icon:l}){return r.jsxs("button",{onClick:a,className:B("px-2.5 py-1.5 text-xs font-medium rounded transition-colors flex items-center gap-1.5",n?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[l&&r.jsx(l,{className:"w-3.5 h-3.5"}),s]})}function Vx({code:n}){const a=Rk(n);return r.jsx("span",{className:B("inline-flex items-center justify-center min-w-[36px] px-2 py-0.5 rounded text-xs font-bold","bg-current/10 border border-current/20",a),children:n})}function Bk({parsed:n}){const{t:a}=Lt(),s=_k(n.quotaResetDelay)||zk(n.quotaResetTimestamp),l=a("errorLogs.na");return r.jsx(So,{className:"h-full",children:r.jsxs("div",{className:"p-4 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Vx,{code:n.statusCode}),r.jsx("span",{className:"text-sm font-medium",children:n.statusText}),r.jsx("span",{className:"text-xs text-muted-foreground px-2 py-0.5 rounded bg-muted/50",children:Lk(n.errorType)})]}),n.model&&r.jsxs("div",{className:"flex items-center gap-2.5 p-3 rounded-lg bg-violet-500/10 border border-violet-500/20",children:[r.jsx(VS,{className:"w-4 h-4 text-violet-500 shrink-0"}),r.jsxs("div",{className:"text-sm",children:[r.jsx("span",{className:"text-muted-foreground",children:a("errorLogs.modelLabel")}),r.jsx("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:n.model})]})]}),n.errorType==="rate_limit"&&s&&r.jsxs("div",{className:"flex items-center gap-2.5 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:[r.jsx(Os,{className:"w-4 h-4 text-amber-500 shrink-0"}),r.jsxs("div",{className:"text-sm",children:[r.jsx("span",{className:"text-muted-foreground",children:a("errorLogs.quotaResetsIn")}),r.jsx("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:s})]})]}),r.jsxs("div",{className:"grid grid-cols-4 gap-3 text-xs",children:[r.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[r.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.method")}),r.jsx("div",{className:"font-medium",children:n.method||l})]}),r.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[r.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.provider")}),r.jsx("div",{className:"font-medium",children:n.provider||l})]}),r.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[r.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.version")}),r.jsx("div",{className:"font-medium",children:n.version||l})]}),r.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[r.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.endpoint")}),r.jsx("div",{className:"font-medium truncate",title:n.endpoint,children:n.endpoint||l})]})]}),r.jsxs("div",{className:"text-xs",children:[r.jsx("div",{className:"text-muted-foreground mb-1.5",children:a("errorLogs.url")}),r.jsx("div",{className:"font-mono p-2.5 rounded bg-muted/30 border border-border/50 break-all leading-relaxed",children:n.url||l})]}),r.jsxs("div",{className:"text-xs",children:[r.jsx("div",{className:"text-muted-foreground mb-1.5",children:a("errorLogs.timestamp")}),r.jsx("div",{className:"font-mono",children:n.timestamp||l})]}),n.errorType!=="unknown"&&r.jsxs("div",{className:B("flex items-start gap-3 p-3 rounded text-xs",n.errorType==="rate_limit"?"bg-amber-500/10 border border-amber-500/20":n.errorType==="auth"?"bg-red-500/10 border border-red-500/20":"bg-blue-500/10 border border-blue-500/20"),children:[n.errorType==="rate_limit"?r.jsx(qn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}):n.errorType==="auth"?r.jsx(qn,{className:"w-4 h-4 mt-0.5 text-red-500 shrink-0"}):r.jsx(Nr,{className:"w-4 h-4 mt-0.5 text-blue-500 shrink-0"}),r.jsxs("div",{className:B("leading-relaxed",n.errorType==="rate_limit"?"text-amber-600 dark:text-amber-400":n.errorType==="auth"?"text-red-600 dark:text-red-400":"text-blue-600 dark:text-blue-400"),children:[n.errorType==="rate_limit"&&(n.model?a("errorLogs.rateLimitedMsg",{model:n.model}):a("errorLogs.rateLimitedMsgNoModel")),n.errorType==="auth"&&a("errorLogs.authFailedMsg"),n.errorType==="not_found"&&a("errorLogs.notFoundMsg"),n.errorType==="server"&&a("errorLogs.serverErrorMsg"),n.errorType==="timeout"&&a("errorLogs.timeoutMsg")]})]})]})})}function Kk({headers:n}){const a=Object.entries(n);return a.length===0?r.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:"No headers available"}):r.jsx(So,{className:"h-full",children:r.jsx("div",{className:"p-4 space-y-1",children:a.map(([s,l])=>r.jsxs("div",{className:"flex gap-3 text-xs font-mono py-1.5 border-b border-border/30 last:border-0",children:[r.jsxs("span",{className:"text-muted-foreground shrink-0 min-w-[140px]",children:[s,":"]}),r.jsx("span",{className:"break-all",children:l})]},s))})})}function ay({content:n,label:a}){const{t:s}=Lt();if(!n||n.trim()===""){const f=a==="Request"?"errorLogs.noRequestBody":"errorLogs.noResponseBody";return r.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:s(f)})}let l=n,c=!1;try{const f=JSON.parse(n);l=JSON.stringify(f,null,2),c=!0}catch{}return r.jsx(So,{className:"h-full",children:r.jsx("pre",{className:B("p-4 text-xs font-mono whitespace-pre-wrap break-all leading-relaxed",c?"text-emerald-700 dark:text-green-400":"text-zinc-700 dark:text-muted-foreground"),children:l})})}function qk({content:n}){return r.jsx(So,{className:"h-full",children:r.jsx("pre",{className:"p-4 text-xs font-mono text-zinc-700 dark:text-muted-foreground whitespace-pre-wrap break-all leading-relaxed",children:n})})}function Gk({name:n,absolutePath:a}){const{t:s}=Lt(),[l,c]=S.useState("overview"),{data:f,isLoading:h,error:p}=C1(n),m=S.useMemo(()=>f?Ak(f):null,[f]);return n?h?r.jsxs("div",{className:"flex-1 p-6 space-y-3",children:[r.jsx(Ge,{className:"h-5 w-full"}),r.jsx(Ge,{className:"h-5 w-3/4"}),r.jsx(Ge,{className:"h-5 w-5/6"}),r.jsx(Ge,{className:"h-5 w-2/3"})]}):p||!f||!m?r.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:r.jsx("p",{className:"text-sm",children:s("errorLogs.failedLoadContent")})}):r.jsxs("div",{className:"flex-1 flex flex-col min-w-0 h-full",children:[r.jsxs("div",{className:"px-4 py-3 border-b border-border bg-muted/30 flex items-center justify-between gap-3 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[r.jsx(Vx,{code:m.statusCode}),r.jsxs("span",{className:"text-xs font-semibold truncate text-foreground",children:[m.provider,"/",m.endpoint||"unknown"]}),n&&r.jsx(ny,{value:a||n,label:s("errorLogs.copyAbsolutePath"),size:"icon-sm",className:"ml-1 text-muted-foreground hover:text-foreground opacity-50 hover:opacity-100 transition-opacity"})]}),r.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[f&&r.jsx(ny,{value:f,label:s("errorLogs.copyRawContent"),variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-foreground"}),r.jsx("span",{className:"text-[10px] text-muted-foreground font-mono bg-muted px-1.5 py-0.5 rounded border border-border/50",children:m.method})]})]}),r.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center gap-1 bg-muted/10 shrink-0 overflow-x-auto",children:[r.jsx(Ss,{active:l==="overview",onClick:()=>c("overview"),icon:Nr,children:s("errorLogs.tabOverview")}),r.jsx(Ss,{active:l==="headers",onClick:()=>c("headers"),icon:WS,children:s("errorLogs.tabHeaders")}),r.jsx(Ss,{active:l==="request",onClick:()=>c("request"),icon:$S,children:s("errorLogs.tabRequest")}),r.jsx(Ss,{active:l==="response",onClick:()=>c("response"),icon:XS,children:s("errorLogs.tabResponse")}),r.jsx(Ss,{active:l==="raw",onClick:()=>c("raw"),icon:ZS,children:s("errorLogs.tabRaw")})]}),r.jsxs("div",{className:"flex-1 overflow-hidden bg-card/30",children:[l==="overview"&&r.jsx(Bk,{parsed:m}),l==="headers"&&r.jsx(Kk,{headers:m.requestHeaders}),l==="request"&&r.jsx(ay,{content:m.requestBody,label:"Request"}),l==="response"&&r.jsx(ay,{content:m.responseBody,label:"Response"}),l==="raw"&&r.jsx(qk,{content:f})]})]}):r.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:r.jsxs("div",{className:"text-center space-y-3",children:[r.jsx(QS,{className:"w-10 h-10 mx-auto opacity-40"}),r.jsx("p",{className:"text-sm",children:s("errorLogs.selectLog")})]})})}function Yk(){const{t:n}=Lt(),{data:a,isLoading:s}=y1(),{data:l,isLoading:c,error:f}=S1(a?.running??!1),[h,p]=S.useState(500),[m,y]=S.useState(!1),C=S.useRef(null),x=S.useRef(null),v=()=>{x.current&&(clearInterval(x.current),x.current=null)};S.useEffect(()=>{if(!m)return;const I=k=>{const z=C.current;if(!z)return;const W=z.getBoundingClientRect().top+window.scrollY,ee=k.pageY-W;p(Math.max(300,ee));const J=window.innerHeight-k.clientY,ge=15;v(),J<50?x.current=setInterval(()=>{window.scrollBy(0,ge)},16):k.clientY<50&&(x.current=setInterval(()=>{window.scrollBy(0,-ge)},16))},E=()=>{y(!1),v(),document.body.style.cursor="default",document.body.style.userSelect="auto"};return document.addEventListener("mousemove",I),document.addEventListener("mouseup",E),document.body.style.cursor="row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",E),document.body.style.cursor="default",document.body.style.userSelect="auto",v()}},[m]);const N=I=>{I.preventDefault(),y(!0)},w=S.useMemo(()=>l?.[0]?.name??null,[l]),[T,O]=S.useState(null),M=T??w,U=S.useMemo(()=>!M||!l?void 0:l.find(E=>E.name===M)?.absolutePath,[M,l]);if(s||!a?.running)return null;if(c)return r.jsxs("div",{className:"rounded-xl border border-border overflow-hidden font-mono text-sm bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm h-[500px]",children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[r.jsx(Ge,{className:"h-4 w-32"}),r.jsx(Ge,{className:"h-4 w-20"})]}),r.jsx("div",{className:"p-4 space-y-3",children:[1,2,3].map(I=>r.jsx(Ge,{className:"h-12 w-full rounded-lg"},I))})]});if(!l||l.length===0)return null;const K=l.length;return r.jsxs("div",{ref:C,className:"rounded-xl border border-border overflow-hidden font-mono text-sm text-foreground bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm flex flex-col shadow-sm transition-[height] duration-0 ease-linear relative group/container",style:{height:h},children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-gradient-to-r from-amber-500/10 via-transparent to-transparent dark:from-amber-500/15 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(qn,{className:"w-4 h-4 text-amber-500"}),r.jsx("span",{className:"text-sm font-semibold tracking-tight",children:n("errorLogs.title")}),r.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:n("errorLogs.failedRequests",{count:K})})]}),r.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[r.jsx(JS,{className:"w-3.5 h-3.5"}),r.jsx("span",{children:n("errorLogs.cliproxyDiagnostics")})]})]}),r.jsx("div",{className:"flex-1 min-h-0",children:r.jsxs(of,{direction:"horizontal",children:[r.jsx(Rs,{defaultSize:30,minSize:20,maxSize:50,className:"flex flex-col min-w-0",children:r.jsxs(So,{className:"h-full",children:[r.jsx("div",{className:"divide-y divide-border/50",children:l.slice(0,50).map(I=>r.jsx(Hk,{name:I.name,size:I.size,modified:I.modified,isSelected:M===I.name,onClick:()=>O(I.name),statusCode:I.statusCode,model:I.model},I.name))}),l.length>50&&r.jsx("div",{className:"px-3 py-3 text-center text-[10px] text-muted-foreground border-t border-border/50",children:n("errorLogs.showingCount",{total:l.length})})]})}),r.jsxs(sf,{className:"w-[1px] bg-border hover:bg-primary/50 transition-colors flex items-center justify-center group relative z-10 w-2 -ml-1 flex items-center justify-center outline-none",children:[r.jsx("div",{className:"w-[1px] h-full bg-border group-hover:bg-primary/50 transition-colors"}),r.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-4 h-8 rounded-sm flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-muted border border-border",children:r.jsx(wr,{className:"h-4 w-4 text-muted-foreground"})})]}),r.jsx(Rs,{className:"flex flex-col min-w-0 bg-background/50",children:r.jsx(Gk,{name:M,absolutePath:U})})]})}),f?r.jsx("div",{className:"px-4 py-2 border-t border-border text-xs text-destructive bg-destructive/5 shrink-0",children:f.message}):r.jsx("div",{className:"h-2 bg-border/10 border-t border-border/30 hover:bg-primary/10 transition-colors cursor-row-resize flex items-center justify-center group/handle shrink-0",onMouseDown:N,children:r.jsx(eC,{className:"w-8 h-3 text-border group-hover:text-primary/50 transition-colors"})})]})}const Fk=Ar("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",warning:"border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-900/50 dark:bg-yellow-900/20 dark:text-yellow-200 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-500",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-200 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-500",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-200 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"}},defaultVariants:{variant:"default"}}),lf=S.forwardRef(({className:n,variant:a,...s},l)=>r.jsx("div",{ref:l,role:"alert",className:B(Fk({variant:a}),n),...s}));lf.displayName="Alert";const Qx=S.forwardRef(({className:n,...a},s)=>r.jsx("h5",{ref:s,className:B("mb-1 font-medium leading-none tracking-tight",n),...a}));Qx.displayName="AlertTitle";const rf=S.forwardRef(({className:n,...a},s)=>r.jsx("div",{ref:s,className:B("text-sm [&_p]:leading-relaxed",n),...a}));rf.displayName="AlertDescription";function Vk(){return Dt({queryKey:["overview"],queryFn:async()=>(await fetch("/api/overview")).json()})}function Wx(n,a){return typeof n=="object"&&n!==null&&"error"in n&&typeof n.error=="string"?n.error:a}function $x(n){const a=n.trim();if(!a)return null;try{return JSON.parse(a)}catch{return null}}function Qk(n){const a=n.trim().toLowerCase();return a.startsWith("<!doctype html")||a.startsWith("<html")}function Wk(n){if(!n||typeof n!="object")return!1;const a=n;return!(typeof a.content!="string"||"contentPath"in a&&typeof a.contentPath!="string")}async function Xx(n,a){const s=await n.text(),l=$x(s);if(!n.ok){const c=Wx(l,a);throw new Error(c)}if(l===null)throw new Error(a);return l}function $k(){return Dt({queryKey:["shared","summary"],queryFn:async()=>{const n=await fetch("/api/shared/summary");return Xx(n,"Failed to fetch shared summary")}})}function Hj(n){return Dt({queryKey:["shared",n],queryFn:async()=>{const a=await fetch(`/api/shared/${n}`);return Xx(a,`Failed to fetch shared ${n}`)}})}function Bj(n,a){return Dt({queryKey:["shared",n,"content",a],enabled:typeof a=="string"&&a.length>0,queryFn:async()=>{if(!a)throw new Error("Missing shared item path");const s=new URLSearchParams({type:n,path:a}),l=await fetch(`/api/shared/content?${s.toString()}`),c=await l.text(),f=$x(c);if(!l.ok)throw new Error(Wx(f,`Failed to fetch shared ${n} content`));if(Wk(f))return{content:f.content,contentPath:typeof f.contentPath=="string"&&f.contentPath.length>0?f.contentPath:a};if(c.trim().length>0){if(Qk(c))throw new Error("Shared content endpoint unavailable. Restart `ccs config` and try again.");return{content:c,contentPath:a}}throw new Error(`Failed to fetch shared ${n} content`)}})}const Xk={ok:"success",warning:"warning",error:"error"},Zk={default:{iconBg:"bg-muted",iconColor:"text-muted-foreground"},success:{iconBg:"bg-green-600/15",iconColor:"text-green-700 dark:text-green-500"},warning:{iconBg:"bg-amber-500/15",iconColor:"text-amber-700 dark:text-amber-400"},error:{iconBg:"bg-red-600/15",iconColor:"text-red-700 dark:text-red-500"},accent:{iconBg:"bg-accent/15",iconColor:"text-accent"}};function ar({title:n,value:a,icon:s,variant:l="default",onClick:c}){const f=Zk[l];return r.jsxs("button",{onClick:c,className:B("flex items-center gap-3 px-4 py-2.5 rounded-lg border bg-card/50","transition-all hover:bg-card hover:shadow-sm hover:-translate-y-0.5","active:scale-[0.98]"),children:[r.jsx("div",{className:B("flex items-center justify-center w-9 h-9 rounded-md",f.iconBg),children:r.jsx(s,{className:B("w-4 h-4",f.iconColor)})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:n}),r.jsx("p",{className:B("text-lg font-bold font-mono leading-tight",f.iconColor),children:a})]})]})}function Jk(){const{t:n}=Lt(),a=jd(),{data:s,isLoading:l}=Vk(),{data:c,isLoading:f}=$k();if(l||f)return r.jsxs("div",{className:"p-6 space-y-6",children:[r.jsxs("div",{className:"rounded-xl border p-6 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(Ge,{className:"h-12 w-12 rounded-lg"}),r.jsxs("div",{children:[r.jsx(Ge,{className:"h-7 w-[180px] mb-2"}),r.jsx(Ge,{className:"h-4 w-[220px]"})]})]}),r.jsx("div",{className:"flex items-center gap-3",children:[1,2,3,4].map(p=>r.jsx(Ge,{className:"h-14 w-28 rounded-lg"},p))})]}),r.jsxs("div",{className:"border rounded-xl overflow-hidden",children:[r.jsxs("div",{className:"px-4 py-2.5 border-b flex items-center justify-between",children:[r.jsx(Ge,{className:"h-4 w-32"}),r.jsx(Ge,{className:"h-4 w-20"})]}),r.jsx("div",{className:"px-4 py-3 border-b",children:r.jsx(Ge,{className:"h-2 w-full rounded-full"})}),[1,2,3].map(p=>r.jsxs("div",{className:"px-4 py-2.5 flex items-center gap-3 border-b last:border-b-0",children:[r.jsx(Ge,{className:"w-2.5 h-2.5 rounded-full"}),r.jsx(Ge,{className:"h-4 flex-1"}),r.jsx(Ge,{className:"h-1.5 w-24 rounded-full"}),r.jsx(Ge,{className:"h-4 w-16"})]},p))]})]});const h=s?.health?Xk[s.health.status]:void 0;return r.jsxs("div",{className:"p-6 space-y-6",children:[r.jsxs("div",{className:"relative overflow-hidden rounded-xl border bg-gradient-to-br from-background via-background to-muted/30",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",children:r.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)",backgroundSize:"24px 24px"}})}),r.jsxs("div",{className:"relative p-6 flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[r.jsx(a1,{version:s?.version}),r.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[r.jsx(ar,{title:n("home.profiles"),value:s?.profiles??0,icon:Fy,variant:"accent",onClick:()=>a("/providers")}),r.jsx(ar,{title:n("home.cliproxy"),value:s?.cliproxy??0,icon:Vy,variant:"accent",onClick:()=>a("/cliproxy")}),r.jsx(ar,{title:n("home.accounts"),value:s?.accounts??0,icon:$y,variant:"default",onClick:()=>a("/accounts")}),r.jsx(ar,{title:n("home.health"),value:s?.health?`${s.health.passed}/${s.health.total}`:"-",icon:js,variant:h,onClick:()=>a("/health")})]})]})]}),c?.symlinkStatus&&!c.symlinkStatus.valid&&r.jsxs(lf,{variant:"warning",children:[r.jsx(qn,{className:"h-4 w-4"}),r.jsx(Qx,{children:n("home.configurationRequired")}),r.jsx(rf,{children:c.symlinkStatus.message})]}),r.jsx(W1,{}),r.jsx(Yk,{})]})}const Zx=dS,cf=S.forwardRef(({className:n,...a},s)=>r.jsx(Ky,{ref:s,className:B("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",n),...a}));cf.displayName=Ky.displayName;const mr=S.forwardRef(({className:n,...a},s)=>r.jsx(qy,{ref:s,className:B("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",n),...a}));mr.displayName=qy.displayName;const kd=S.forwardRef(({className:n,...a},s)=>r.jsx(Gy,{ref:s,className:B("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...a}));kd.displayName=Gy.displayName;function rn({className:n,...a}){return r.jsx(fS,{"data-slot":"label",className:B("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),...a})}const uf="ccs:openrouter-models",eD=1440*60*1e3,Jx="1";function Dd(n){const a=parseFloat(n);return isNaN(a)||a===0?0:a*1e6}function iy(n){const a=Dd(n);return a===0?"Free":a<.01?"<$0.01":a<1?`$${a.toFixed(2)}`:`$${a.toFixed(a<10?2:0)}`}function tD(n){const a=iy(n.prompt),s=iy(n.completion);return a==="Free"&&s==="Free"?"Free":`${a}/${s}`}function nD(n){const a=n.id.toLowerCase();return a.startsWith("anthropic/")?"anthropic":a.startsWith("openai/")?"openai":a.startsWith("google/")?"google":a.startsWith("meta-llama/")||a.startsWith("meta/")?"meta":a.startsWith("mistralai/")?"mistral":a.includes(":free")||a.includes("qwen")||a.includes("deepseek")?"opensource":"other"}function aD(n){return{...n,category:nD(n),pricePerMillionPrompt:Dd(n.pricing.prompt),pricePerMillionCompletion:Dd(n.pricing.completion),isFree:n.pricing.prompt==="0"&&n.pricing.completion==="0",isExacto:n.id.includes(":exacto")}}function iD(n,a,s){const l=a.toLowerCase().trim();return n.filter(c=>s?.category&&c.category!==s.category||s?.freeOnly&&!c.isFree||s?.minContext&&c.context_length<s.minContext?!1:l?c.id.toLowerCase().includes(l)||c.name.toLowerCase().includes(l)||c.description?.toLowerCase().includes(l):!0)}function Kj(n){return[...n].sort((a,s)=>{if(a.isFree&&!s.isFree)return-1;if(!a.isFree&&s.isFree)return 1;if(!a.isFree&&!s.isFree){if(a.isExacto&&!s.isExacto)return-1;if(!a.isExacto&&s.isExacto)return 1}return a.name.localeCompare(s.name)})}function oD(){try{const n=localStorage.getItem(uf);if(!n)return null;const a=JSON.parse(n);return a.version!==Jx||Date.now()-a.fetchedAt>eD?null:a.models}catch{return null}}function sD(n){try{localStorage.setItem(uf,JSON.stringify({models:n,fetchedAt:Date.now(),version:Jx}))}catch{}}function lD(){localStorage.removeItem(uf)}function qj(n,a){const[s]=n.split("/");if(!s)return{};const l=a.filter(h=>h.id.startsWith(`${s}/`));if(l.length===0)return{};const c=[...l].sort((h,p)=>p.pricePerMillionPrompt-h.pricePerMillionPrompt),f=Math.ceil(c.length/3);return{opus:c[0]?.id,sonnet:c[Math.min(f,c.length-1)]?.id,haiku:c[c.length-1]?.id}}function rD(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${Math.round(n/1e3)}K`:String(n)}const Gj={anthropic:"Anthropic (Claude)",openai:"OpenAI (GPT)",google:"Google (Gemini)",meta:"Meta (Llama)",mistral:"Mistral",opensource:"Open Source",other:"Other"},cD={anthropic:["anthropic/"],openai:["openai/"],google:["google/"],meta:["meta-llama/","meta/"],mistral:["mistralai/"],opensource:["deepseek/","qwen/","cohere/"],other:[]};function uD(n,a=2){const s=[],l=["anthropic","openai","google","meta","mistral","opensource"];for(const c of l){const f=cD[c];if(f.length===0)continue;const p=[...n.filter(m=>f.some(y=>m.id.toLowerCase().startsWith(y)))].sort((m,y)=>(y.created??0)-(m.created??0));s.push(...p.slice(0,a))}return s.sort((c,f)=>(f.created??0)-(c.created??0))}function dD(n){const s=Date.now()/1e3-n;return s<86400?"Today":s<172800?"Yesterday":s<604800?`${Math.floor(s/86400)}d ago`:s<2592e3?`${Math.floor(s/604800)}w ago`:s<31536e3?`${Math.floor(s/2592e3)}mo ago`:`${Math.floor(s/31536e3)}y ago`}const fD="https://openrouter.ai/api/v1/models",eb=["openrouter-models"],oy=1440*60*1e3;async function hD(){const n=await fetch(fD);if(!n.ok)throw new Error(`Failed to fetch OpenRouter models: ${n.status}`);const s=(await n.json()).data;return sD(s),s}function tb(){return Dt({queryKey:eb,queryFn:hD,staleTime:oy,gcTime:oy,initialData:()=>oD()??void 0,refetchOnWindowFocus:!1})}function pD(){const n=tb(),a=(n.data??[]).map(aD);return{...n,models:a}}function Yj(){const n=it();return()=>(lD(),n.invalidateQueries({queryKey:eb}))}function Fj(){const{data:n,isLoading:a,isError:s}=tb();return{isReady:!!n&&n.length>0,isLoading:a,isError:s,modelCount:n?.length??0}}function df({profileEnv:n={}}){const[a,s]=S.useState(null),[l,c]=S.useState(!0),[f,h]=S.useState(!1);S.useEffect(()=>{p()},[]);const p=async()=>{try{c(!0);const v=await fetch("/api/global-env");if(!v.ok)throw new Error("Failed to load");const N=await v.json();s(N)}catch{s(null)}finally{c(!1)}};if(l||!a?.enabled)return null;const m=a.env||{},y=Object.keys(m);if(y.length===0)return null;const C=y.filter(v=>!(v in n)),x=y.filter(v=>v in n);return r.jsxs("div",{className:"border-t bg-muted/20",children:[r.jsxs("button",{onClick:()=>h(!f),className:"w-full px-4 py-2 flex items-center gap-2 hover:bg-muted/30 transition-colors",children:[r.jsx(Nr,{className:"w-4 h-4 text-blue-500"}),r.jsxs("span",{className:"text-xs text-muted-foreground flex-1 text-left",children:[r.jsx("span",{className:"font-medium text-foreground",children:C.length})," global env var",C.length!==1?"s":""," will be injected at runtime",x.length>0&&r.jsxs("span",{className:"text-amber-600 dark:text-amber-400 ml-1",children:["(",x.length," overridden by profile)"]})]}),f?r.jsx(Od,{className:"w-4 h-4 text-muted-foreground"}):r.jsx(zs,{className:"w-4 h-4 text-muted-foreground"})]}),f&&r.jsxs("div",{className:"px-4 pb-3 space-y-2",children:[C.length>0&&r.jsx("div",{className:"space-y-1",children:C.map(v=>r.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono bg-green-500/10 text-green-700 dark:text-green-400 px-2 py-1 rounded",children:[r.jsx("span",{className:"text-green-500",children:"+"}),r.jsxs("span",{className:"truncate",children:[v,"=",m[v]]})]},v))}),x.length>0&&r.jsxs("div",{className:"space-y-1",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Skipped (profile already defines):"}),x.map(v=>r.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono bg-amber-500/10 text-amber-700 dark:text-amber-400 px-2 py-1 rounded",children:[r.jsx("span",{className:"text-amber-500",children:"~"}),r.jsx("span",{className:"truncate",children:v})]},v))]}),r.jsx("div",{className:"pt-2 border-t border-border/50",children:r.jsx(ct,{variant:"ghost",size:"sm",asChild:!0,className:"h-7 text-xs gap-1.5 -ml-2",children:r.jsxs(gd,{to:"/settings?tab=globalenv",children:[r.jsx(Rd,{className:"w-3.5 h-3.5"}),"Configure in Settings",r.jsx(Xy,{className:"w-3 h-3 opacity-50"})]})})})]})]})}const mD=S.lazy(()=>ht(()=>Promise.resolve().then(()=>hf),void 0).then(n=>({default:n.CodeEditor})));function Vj({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:s,settings:l,onChange:c,missingRequiredFields:f=[]}){const h=f.length>0;return r.jsx(S.Suspense,{fallback:r.jsxs("div",{className:"flex items-center justify-center h-full",children:[r.jsx(jn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),r.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),children:r.jsxs("div",{className:"h-full flex flex-col",children:[!a&&s!==null&&r.jsxs("div",{className:"mb-2 px-3 py-2 bg-destructive/10 text-destructive text-sm rounded-md flex items-center gap-2 mx-6 mt-4 shrink-0",children:[r.jsx(vo,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&h&&r.jsxs("div",{className:"mb-2 px-3 py-2 bg-warning/10 text-warning-foreground text-sm rounded-md flex items-start gap-2 mx-6 mt-4 shrink-0 border border-warning/20",children:[r.jsx(qn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:f.join(", ")}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"These fields will use default values at runtime."})]})]}),r.jsx("div",{className:"flex-1 overflow-hidden px-6 pb-4 pt-4",children:r.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:r.jsx(mD,{value:n,onChange:c,language:"json",minHeight:"100%"})})}),r.jsx("div",{className:"mx-6 mb-4",children:r.jsx("div",{className:"border rounded-md overflow-hidden",children:r.jsx(df,{profileEnv:l?.env})})})]})})}function sy(n,a){try{var s=n()}catch(l){return a(l)}return s&&s.then?s.then(void 0,a):s}function gD(n,a){for(var s={};n.length;){var l=n[0],c=l.code,f=l.message,h=l.path.join(".");if(!s[h])if("unionErrors"in l){var p=l.unionErrors[0].errors[0];s[h]={message:p.message,type:p.code}}else s[h]={message:f,type:c};if("unionErrors"in l&&l.unionErrors.forEach(function(C){return C.errors.forEach(function(x){return n.push(x)})}),a){var m=s[h].types,y=m&&m[l.code];s[h]=Jy(h,a,s,c,y?[].concat(y,l.message):l.message)}n.shift()}return s}function yD(n,a){for(var s={};n.length;){var l=n[0],c=l.code,f=l.message,h=l.path.join(".");if(!s[h])if(l.code==="invalid_union"&&l.errors.length>0){var p=l.errors[0][0];s[h]={message:p.message,type:p.code}}else s[h]={message:f,type:c};if(l.code==="invalid_union"&&l.errors.forEach(function(C){return C.forEach(function(x){return n.push(x)})}),a){var m=s[h].types,y=m&&m[l.code];s[h]=Jy(h,a,s,c,y?[].concat(y,l.message):l.message)}n.shift()}return s}function xD(n,a,s){if(s===void 0&&(s={}),(function(l){return"_def"in l&&typeof l._def=="object"&&"typeName"in l._def})(n))return function(l,c,f){try{return Promise.resolve(sy(function(){return Promise.resolve(n[s.mode==="sync"?"parse":"parseAsync"](l,a)).then(function(h){return f.shouldUseNativeValidation&&hg({},f),{errors:{},values:s.raw?Object.assign({},l):h}})},function(h){if((function(p){return Array.isArray(p?.issues)})(h))return{values:{},errors:pg(gD(h.errors,!f.shouldUseNativeValidation&&f.criteriaMode==="all"),f)};throw h}))}catch(h){return Promise.reject(h)}};if((function(l){return"_zod"in l&&typeof l._zod=="object"})(n))return function(l,c,f){try{return Promise.resolve(sy(function(){return Promise.resolve((s.mode==="sync"?HC:BC)(n,l,a)).then(function(h){return f.shouldUseNativeValidation&&hg({},f),{errors:{},values:s.raw?Object.assign({},l):h}})},function(h){if((function(p){return p instanceof KC})(h))return{values:{},errors:pg(yD(h.issues,!f.shouldUseNativeValidation&&f.criteriaMode==="all"),f)};throw h}))}catch(h){return Promise.reject(h)}};throw new Error("Invalid input: not a Zod schema")}const bD={sm:{container:"w-6 h-6",icon:"w-4 h-4",text:"text-xs"},md:{container:"w-8 h-8",icon:"w-5 h-5",text:"text-sm"},lg:{container:"w-12 h-12",icon:"w-8 h-8",text:"text-lg"}};function vD({provider:n,className:a,size:s="md"}){const l=EA(n),c=bD[s],f=vx(n);return r.jsx("div",{className:B("flex items-center justify-center rounded-md",f&&(OA(n)?"bg-gray-900 p-1":"bg-white p-1"),c.container,a),children:f?r.jsx("img",{src:f,alt:`${n} logo`,className:B(c.icon,"object-contain")}):r.jsx("span",{className:B("font-semibold",l.textClass,c.text),children:l.letter})})}function Qj(){return Dt({queryKey:["profiles"],queryFn:()=>Be.profiles.list()})}function SD(){const n=it();return et({mutationFn:a=>Be.profiles.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile created successfully")},onError:a=>{le.error(a.message)}})}function Wj(){const n=it();return et({mutationFn:a=>Be.profiles.delete(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile deleted successfully")},onError:a=>{le.error(a.message)}})}function $j(){return et({mutationFn:()=>Be.profiles.discoverOrphans()})}function Xj(){const n=it();return et({mutationFn:a=>Be.profiles.registerOrphans(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Orphan profiles registration complete")}})}function Zj(){const n=it();return et({mutationFn:({name:a,data:s})=>Be.profiles.copy(a,s),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile copied successfully")}})}function Jj(){return et({mutationFn:({name:n,includeSecrets:a})=>Be.profiles.export(n,a??!1)})}function eE(){const n=it();return et({mutationFn:a=>Be.profiles.import(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile imported successfully")}})}const CD="https://openrouter.ai/api",nb=Object.freeze({glmt:"glm",kimi:"km",alibaba:"alibaba-coding-plan",acp:"alibaba-coding-plan"}),ab=[{id:"openrouter",name:"OpenRouter",description:"349+ models from OpenAI, Anthropic, Google, Meta",baseUrl:CD,defaultProfileName:"openrouter",defaultModel:"anthropic/claude-opus-4.5",apiKeyPlaceholder:"sk-or-...",apiKeyHint:"Get your API key at openrouter.ai/keys",category:"recommended",requiresApiKey:!0,badge:"349+ models",featured:!0,icon:"/icons/openrouter.svg"},{id:"alibaba-coding-plan",name:"Alibaba Coding Plan",description:"Alibaba Cloud Coding Plan via Anthropic-compatible endpoint",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/apps/anthropic",defaultProfileName:"albb",defaultModel:"qwen3-coder-plus",apiKeyPlaceholder:"sk-sp-...",apiKeyHint:"Get your Coding Plan key from Alibaba Cloud Model Studio",category:"recommended",requiresApiKey:!0,badge:"Coding Plan",featured:!0,icon:"/assets/providers/alibabacloud-color.svg"},{id:"ollama",name:"Ollama (Local)",description:"Local open-source models via Ollama (32K+ context)",baseUrl:"http://localhost:11434",defaultProfileName:"ollama",defaultModel:"qwen3-coder",apiKeyPlaceholder:"ollama",apiKeyHint:"Install Ollama from ollama.com - no API key needed for local",category:"recommended",requiresApiKey:!1,badge:"Local",featured:!0,icon:"/icons/ollama.svg"},{id:"llamacpp",name:"llama.cpp (Local)",description:"Local inference via llama.cpp (LLaMA models)",baseUrl:"http://127.0.0.1:8080",defaultProfileName:"llamacpp",defaultModel:"llama3-8b",apiKeyPlaceholder:"llamacpp",apiKeyHint:"Run llama.cpp server: ./server --host 0.0.0.0 --port 8080 -m model.gguf",category:"recommended",requiresApiKey:!1,badge:"Local",featured:!0,icon:"/assets/providers/llama-cpp.svg"},{id:"anthropic",name:"Anthropic (Direct API)",description:"Use your own Anthropic API key (sk-ant-...)",baseUrl:"",defaultProfileName:"anthropic",defaultModel:"claude-sonnet-4-5-20250929",apiKeyPlaceholder:"sk-ant-api03-...",apiKeyHint:"Get key at console.anthropic.com/settings/keys",category:"recommended",requiresApiKey:!0,badge:"Direct",featured:!0,icon:"/assets/providers/claude.svg"},{id:"glm",name:"GLM",description:"Direct Z.AI Anthropic-compatible API profile",baseUrl:"https://api.z.ai/api/anthropic",defaultProfileName:"glm",defaultModel:"glm-5",apiKeyPlaceholder:"ghp_...",apiKeyHint:"Get your API key from Z.AI",category:"alternative",requiresApiKey:!0,badge:"Z.AI",icon:"/icons/zai.svg"},{id:"km",name:"Kimi",description:"Moonshot AI - Fast reasoning model",baseUrl:"https://api.kimi.com/coding/",defaultProfileName:"km",defaultModel:"kimi-k2-thinking-turbo",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key from Moonshot AI",category:"alternative",requiresApiKey:!0,alwaysThinkingEnabled:!0,badge:"Reasoning",icon:"/icons/kimi.svg"},{id:"foundry",name:"Azure Foundry",description:"Claude via Microsoft Azure AI Foundry",baseUrl:"https://<your-resource>.services.ai.azure.com/api/anthropic",defaultProfileName:"foundry",defaultModel:"claude-sonnet-4-5",apiKeyPlaceholder:"YOUR_AZURE_API_KEY",apiKeyHint:"Create resource at ai.azure.com, get API key from Keys tab",category:"alternative",requiresApiKey:!0,badge:"Azure",icon:"/icons/azure.svg"},{id:"mm",name:"Minimax",description:"M2.1/M2.1-lightning/M2 - multilang coding (1M context)",baseUrl:"https://api.minimax.io/anthropic",defaultProfileName:"mm",defaultModel:"MiniMax-M2.1",apiKeyPlaceholder:"YOUR_MINIMAX_API_KEY_HERE",apiKeyHint:"Get your API key at platform.minimax.io",category:"alternative",requiresApiKey:!0,badge:"1M context",icon:"/icons/minimax.svg"},{id:"deepseek",name:"DeepSeek",description:"V3.2 and R1 reasoning model (128K context)",baseUrl:"https://api.deepseek.com/anthropic",defaultProfileName:"deepseek",defaultModel:"deepseek-chat",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key at platform.deepseek.com",category:"alternative",requiresApiKey:!0,badge:"Reasoning",icon:"/icons/deepseek.svg"},{id:"qwen",name:"Qwen",description:"Alibaba Cloud - Qwen3 models (256K-1M context, thinking support)",baseUrl:"https://dashscope-intl.aliyuncs.com/apps/anthropic",defaultProfileName:"qwen-api",defaultModel:"qwen3-coder-plus",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key from Alibaba Cloud Model Studio",category:"alternative",requiresApiKey:!0,badge:"Alibaba",icon:"/assets/providers/qwen-color.svg"},{id:"ollama-cloud",name:"Ollama Cloud",description:"Ollama cloud models via direct API (glm-5:cloud, minimax-m2.1:cloud)",baseUrl:"https://ollama.com",defaultProfileName:"ollama-cloud",defaultModel:"glm-5:cloud",apiKeyPlaceholder:"YOUR_OLLAMA_CLOUD_API_KEY",apiKeyHint:"Get your API key at ollama.com",category:"alternative",requiresApiKey:!0,badge:"Cloud",icon:"/icons/ollama.svg"},{id:"novita",name:"Novita AI",description:"Anthropic-compatible API for Claude Code and CCS profiles",baseUrl:"https://api.novita.ai/anthropic",defaultProfileName:"novita",defaultModel:"deepseek/deepseek-v3.2",apiKeyPlaceholder:"YOUR_NOVITA_API_KEY",apiKeyHint:"Get your API key at novita.ai",category:"alternative",requiresApiKey:!0,badge:"Anthropic-compatible",icon:"/icons/novita.svg"}];function ib(n){return{...n,extraEnv:n.extraEnv?{...n.extraEnv}:void 0}}function wD(n){const a=ib(n);return a.extraEnv&&Object.freeze(a.extraEnv),Object.freeze(a)}function ND(n,a){const s=new Set;for(const c of n){const f=c.id.trim().toLowerCase();if(c.id!==f)throw new Error(`Preset ID must be normalized: "${c.id}"`);if(s.has(c.id))throw new Error(`Duplicate preset ID detected: "${c.id}"`);s.add(c.id)}const l=new Set;for(const[c,f]of Object.entries(a)){const h=c.trim().toLowerCase();if(!h)throw new Error("Preset alias keys cannot be empty");if(c!==h)throw new Error(`Preset alias must be normalized: "${c}"`);if(l.has(h))throw new Error(`Duplicate normalized preset alias detected: "${c}"`);if(l.add(h),!s.has(f))throw new Error(`Preset alias "${c}" points to unknown target "${f}"`);if(s.has(h))throw new Error(`Preset alias "${c}" collides with canonical preset ID "${h}"`)}}ND(ab,nb);const AD=Object.freeze(ab.map(wD));function kD(){return AD.map(ib)}function DD(n){const a=n.trim().toLowerCase();return nb[a]||a}const TD=kD(),ff=Object.freeze(TD.map(n=>({...n})));function MD(n,a){return a||(n?.requiresApiKey===!1?n.apiKeyPlaceholder||n.id:"")}function jD(n){return ff.filter(a=>a.category===n)}function rd(n){const a=DD(n);return ff.find(s=>s.id===a)}const ED=Va().refine(n=>n.trim().length===0||Va().url().safeParse(n).success,{message:"Invalid URL format"}),OD=qC({name:Va().min(1,"Name is required").regex(/^[a-zA-Z][a-zA-Z0-9._-]*$/,"Must start with letter, only letters/numbers/.-_"),baseUrl:ED,apiKey:Va(),model:Va().optional(),opusModel:Va().optional(),sonnetModel:Va().optional(),haikuModel:Va().optional(),target:GC(["claude","droid"])}),PD=["/chat/completions","/v1/messages","/messages","/completions"],Fa="custom",cd="openrouter",ud={name:"",baseUrl:"",apiKey:"",model:"",opusModel:"",sonnetModel:"",haikuModel:"",target:"claude"},RD=jD("recommended"),ob=ff.filter(n=>n.category!=="recommended"),ly=new Set(ob.map(n=>n.id));function tE({open:n,onOpenChange:a,onSuccess:s,initialMode:l="openrouter"}){const{t:c}=Lt(),f=SD(),[h,p]=S.useState("basic"),[m,y]=S.useState(null),[C,x]=S.useState(!1),[v,N]=S.useState(cd),[w,T]=S.useState(!1),[O,M]=S.useState(""),{models:U}=pD(),{register:K,handleSubmit:I,formState:{errors:E},control:k,reset:z,setValue:Q}=YC({resolver:xD(OD),defaultValues:ud}),W=mg({control:k,name:"baseUrl"}),ee=mg({control:k,name:"target"}),ne=S.useCallback(Z=>{if(!Z){z(ud);return}z({...ud,name:Z.defaultProfileName,baseUrl:Z.baseUrl,model:Z.defaultModel,opusModel:Z.defaultModel,sonnetModel:Z.defaultModel,haikuModel:Z.defaultModel})},[z]),J=S.useMemo(()=>v===Fa?null:rd(v)??null,[v]),ge=S.useMemo(()=>O.trim()?[...iD(U,O)].sort((G,$)=>($.created??0)-(G.created??0)).slice(0,20):uD(U,2),[U,O]);S.useEffect(()=>{if(n)if(p("basic"),y(null),x(!1),T(!1),M(""),l==="normal")N(Fa),ne(null);else{const G=rd(l==="openrouter"?cd:l);if(G){N(G.id),ne(G);return}N(Fa),ne(null)}},[n,l,ne]);const ue=Z=>{const G=rd(Z);if(G){N(G.id),T(ly.has(G.id)),ne(G);return}N(Fa),T(!1),ne(null)},Ce=Z=>{Q("model",Z.id),Q("opusModel",Z.id),Q("sonnetModel",Z.id),Q("haikuModel",Z.id),M(Z.name),le.success(`Applied "${Z.name}" to all model tiers`,{duration:2e3})};S.useEffect(()=>{if(W&&v===Fa){const G=W.toLowerCase();for(const $ of PD)if(G.endsWith($)){const re=W.replace(new RegExp($+"$","i"),"");y(`URL ends with "${$}" - Claude appends this automatically. You likely want: ${re}`);return}}y(null)},[W,v]);const P=async Z=>{if(J?.requiresApiKey!==!1&&!Z.apiKey){le.error(He.t("commonToast.apiKeyRequired"));return}const G={...Z,apiKey:MD(J,Z.apiKey)};try{await f.mutateAsync(G),le.success(`Profile "${G.name}" created`),s(G.name),a(!1)}catch($){le.error($.message||"Failed to create profile")}},V=!!E.name||!!E.baseUrl||!!E.apiKey,ae=!!E.model||!!E.opusModel||!!E.sonnetModel||!!E.haikuModel,pe=v!==Fa&&ly.has(v),xe=J?.id===cd,ie=w||pe;return r.jsx(qd,{open:n,onOpenChange:a,children:r.jsxs(Gd,{className:"sm:max-w-[700px] p-0 gap-0 overflow-hidden max-h-[90vh] !flex !flex-col",children:[r.jsxs(Yd,{className:"p-6 pb-4 border-b",children:[r.jsxs(Fd,{className:"flex items-center gap-2",children:[r.jsx(dg,{className:"w-5 h-5 text-primary"}),"Create API Profile"]}),r.jsx(Vd,{children:"Choose a provider or configure a custom API endpoint."})]}),r.jsxs("form",{onSubmit:I(P),className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[r.jsx("div",{className:"border-b bg-muted/10 px-6 py-3",children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx(rn,{className:"text-xs text-muted-foreground",children:c("profileEditor.provider")}),r.jsx("p",{className:"text-xs text-muted-foreground",children:c("profileEditor.providerChooserHint")})]}),r.jsx("span",{className:"pt-0.5 text-[11px] text-muted-foreground",children:c("profileEditor.scrollHint")})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(rn,{className:"text-xs font-medium uppercase tracking-[0.12em] text-foreground/70",children:c("profileEditor.featuredProviders")}),r.jsx("div",{className:"-mx-1 overflow-x-auto pb-1",children:r.jsxs("div",{className:"flex min-w-max items-stretch gap-2 px-1",children:[RD.map(Z=>r.jsx(ry,{preset:Z,isSelected:v===Z.id,onClick:()=>ue(Z.id),density:"featured"},Z.id)),r.jsx("div",{className:"mx-1 hidden w-px rounded-full bg-border/70 sm:block"}),r.jsx(LD,{isSelected:v===Fa,onClick:()=>ue(Fa)})]})})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs(ct,{type:"button",variant:"ghost",size:"sm",onClick:()=>T(Z=>!Z),"aria-expanded":ie,className:"h-8 px-2 text-xs font-medium text-muted-foreground hover:text-foreground",children:[r.jsx(zs,{className:B("mr-1 h-3.5 w-3.5 transition-transform",ie?"rotate-0":"-rotate-90")}),c("profileEditor.morePresets")]}),ie&&r.jsx("div",{className:"-mx-1 overflow-x-auto pb-1",children:r.jsx("div",{className:"flex min-w-max items-stretch gap-2 px-1",children:ob.map(Z=>r.jsx(ry,{preset:Z,isSelected:v===Z.id,onClick:()=>ue(Z.id),density:"compact"},Z.id))})})]})]})}),r.jsxs(Zx,{value:h,onValueChange:p,className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[r.jsx("div",{className:"px-6 pt-4",children:r.jsxs(cf,{className:"grid w-full grid-cols-2",children:[r.jsxs(mr,{value:"basic",className:"relative",children:["Basic Information",V&&r.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-destructive animate-pulse"})]}),r.jsxs(mr,{value:"models",className:"relative",children:["Model Configuration",ae&&r.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-destructive animate-pulse"})]})]})}),r.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[r.jsxs(kd,{value:"basic",className:"p-6 space-y-4 mt-0",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs(rn,{htmlFor:"name",children:["Profile Name ",r.jsx("span",{className:"text-destructive",children:"*"})]}),r.jsx(In,{id:"name",...K("name"),placeholder:"my-api",className:"font-mono"}),E.name?r.jsx("p",{className:"text-xs text-destructive",children:E.name.message}):r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Used in CLI:"," ",r.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:'ccs my-api "prompt"'})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(rn,{htmlFor:"baseUrl",children:"API Base URL"}),r.jsx(In,{id:"baseUrl",...K("baseUrl"),placeholder:"https://api.example.com/v1"}),E.baseUrl?r.jsx("p",{className:"text-xs text-destructive",children:E.baseUrl.message}):m?r.jsxs("div",{className:"flex items-start gap-2 text-xs text-yellow-600 bg-yellow-50 dark:bg-yellow-900/20 p-2 rounded",children:[r.jsx(qn,{className:"w-4 h-4 shrink-0 mt-0.5"}),r.jsx("span",{children:m})]}):J?r.jsx("p",{className:"text-xs text-muted-foreground",children:J.baseUrl?`Pre-filled from ${J.name}. You can customize if needed.`:`Optional for ${J.name}. Leave blank to use native Anthropic auth.`}):r.jsx("p",{className:"text-xs text-muted-foreground",children:"The endpoint that accepts OpenAI-compatible and Anthropic requests"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs(rn,{htmlFor:"apiKey",children:["API Key"," ",J?.requiresApiKey!==!1&&r.jsx("span",{className:"text-destructive",children:"*"}),J?.requiresApiKey===!1&&r.jsx("span",{className:"text-muted-foreground text-xs font-normal",children:"(optional)"})]}),r.jsxs("div",{className:"relative",children:[r.jsx(In,{id:"apiKey",type:C?"text":"password",...K("apiKey"),placeholder:J?.requiresApiKey===!1?"Optional - only if auth is enabled":J?.apiKeyPlaceholder??"sk-...",className:"pr-10"}),r.jsx(ct,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-9 w-9 text-muted-foreground hover:text-foreground",onClick:()=>x(!C),tabIndex:-1,children:C?r.jsx(br,{className:"h-4 w-4"}):r.jsx(vr,{className:"h-4 w-4"})})]}),E.apiKey?r.jsx("p",{className:"text-xs text-destructive",children:E.apiKey.message}):J?.requiresApiKey===!1?r.jsx("p",{className:"text-xs text-muted-foreground",children:"Only needed if your local endpoint has authentication enabled"}):J?.apiKeyHint&&r.jsx("p",{className:"text-xs text-muted-foreground",children:J.apiKeyHint})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(rn,{htmlFor:"target",children:"Default Target CLI"}),r.jsxs(Sx,{value:ee,onValueChange:Z=>Q("target",Z),children:[r.jsx(Zd,{id:"target",children:r.jsx(Cx,{})}),r.jsxs(Jd,{children:[r.jsx(fr,{value:"claude",children:"Claude Code (default)"}),r.jsx(fr,{value:"droid",children:"Factory Droid"})]})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Run with"," ",r.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:ee==="droid"?"ccsd":"ccs"})," ","by default. You can still override each run with"," ",r.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"--target"}),"."]})]})]}),r.jsxs(kd,{value:"models",className:"p-6 mt-0 space-y-4",children:[r.jsxs("div",{className:"flex items-start gap-3 p-3 bg-blue-50 dark:bg-blue-950/20 text-blue-800 dark:text-blue-300 rounded-md text-sm border border-blue-100 dark:border-blue-900/30",children:[r.jsx(Nr,{className:"w-5 h-5 shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium mb-1",children:"Model Mapping"}),r.jsx("p",{className:"text-xs opacity-90",children:"Map Claude Code tiers (Opus/Sonnet/Haiku) to models supported by your provider."})]})]}),xe&&r.jsxs("div",{className:"space-y-2",children:[r.jsx(rn,{children:"Search Models"}),r.jsx(In,{value:O,onChange:Z=>M(Z.target.value),placeholder:"Type to search (e.g., opus, sonnet, gpt-4o)...",onKeyDown:Z=>{Z.key==="Enter"&&ge.length>0&&(Z.preventDefault(),Ce(ge[0]))}}),r.jsx("div",{className:"border rounded-md max-h-48 overflow-y-auto",children:ge.length===0?r.jsx("p",{className:"text-sm text-muted-foreground p-3 text-center",children:O?`No models found for "${O}"`:"Loading models..."}):r.jsxs("div",{className:"p-1",children:[!O&&r.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground",children:[r.jsx(tC,{className:"w-3 h-3 text-accent"}),r.jsx("span",{children:"Newest Models"})]}),ge.map(Z=>r.jsx(_D,{model:Z,onClick:()=>Ce(Z),showAge:!O},Z.id))]})})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs(rn,{htmlFor:"model",children:["Default Model",r.jsx(ga,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"ANTHROPIC_MODEL"})]}),r.jsx(In,{id:"model",...K("model"),placeholder:J?.defaultModel??"claude-sonnet-4",className:"font-mono text-sm"})]}),r.jsxs("div",{className:"grid gap-3 pt-2 border-t",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs(rn,{htmlFor:"sonnetModel",className:"text-sm",children:["Sonnet Mapping",r.jsx(ga,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_SONNET"})]}),r.jsx(In,{id:"sonnetModel",...K("sonnetModel"),placeholder:"e.g. gpt-4o, claude-sonnet-4",className:"font-mono text-sm h-9"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs(rn,{htmlFor:"opusModel",className:"text-sm",children:["Opus Mapping",r.jsx(ga,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_OPUS"})]}),r.jsx(In,{id:"opusModel",...K("opusModel"),placeholder:"e.g. o1, claude-opus-4.5",className:"font-mono text-sm h-9"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs(rn,{htmlFor:"haikuModel",className:"text-sm",children:["Haiku Mapping",r.jsx(ga,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_HAIKU"})]}),r.jsx(In,{id:"haikuModel",...K("haikuModel"),placeholder:"e.g. gpt-4o-mini, claude-3.5-haiku",className:"font-mono text-sm h-9"})]})]})]})]})]}),r.jsxs(wA,{className:"p-6 pt-4 border-t bg-muted/10",children:[r.jsx(ct,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),r.jsx(ct,{type:"submit",disabled:f.isPending,className:B(f.isPending&&"opacity-80"),children:f.isPending?r.jsxs(r.Fragment,{children:[r.jsx(jn,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating..."]}):r.jsxs(r.Fragment,{children:[r.jsx(dg,{className:"w-4 h-4 mr-2"}),"Create Profile"]})})]})]})]})]})})}function ry({preset:n,isSelected:a,onClick:s,density:l="compact"}){const c=n.id==="anthropic",f=l==="featured";return r.jsxs("button",{type:"button",onClick:s,className:B("flex flex-none items-center gap-3 rounded-xl border px-3 py-2.5 text-left transition-all",f?"h-[68px] w-[236px]":"h-[64px] w-[168px]",a?"border-primary bg-primary/8 shadow-sm ring-1 ring-primary/10":"border-border/60 bg-background hover:border-primary/40 hover:bg-accent/20"),children:[r.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border/60 bg-background",children:c?r.jsx(vD,{provider:"claude",size:"md",className:"rounded-lg"}):n.icon?r.jsx("img",{src:n.icon,alt:"",className:"h-5 w-5 object-contain"}):r.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-muted/70 text-xs font-semibold text-foreground/70",children:n.name.charAt(0)})}),r.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"truncate text-[13px] font-semibold leading-tight tracking-[-0.01em]",children:n.name}),n.badge&&f&&r.jsx(ga,{variant:"secondary",className:"inline-flex bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:n.badge})]}),n.badge&&!f&&r.jsx(ga,{variant:"secondary",className:"inline-flex w-fit bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:n.badge})]})]})}function LD({isSelected:n,onClick:a}){const{t:s}=Lt();return r.jsxs("button",{type:"button",onClick:a,className:B("flex h-[68px] w-[236px] flex-none items-center gap-3 rounded-xl border border-dashed px-3 py-2.5 text-left transition-all",n?"border-primary bg-primary/8 shadow-sm ring-1 ring-primary/10":"border-muted-foreground/30 bg-background hover:border-primary/40 hover:bg-accent/20"),children:[r.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-dashed border-current/30 bg-muted/70",children:r.jsx(Rd,{className:"h-4 w-4 text-muted-foreground"})}),r.jsx("div",{className:"min-w-0 flex-1",children:r.jsx("div",{className:"text-sm font-semibold leading-tight",children:s("profileEditor.customEndpoint")})})]})}function _D({model:n,onClick:a,showAge:s}){return r.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",children:[r.jsx("span",{className:"flex-1 truncate",children:n.name}),r.jsxs("span",{className:"text-muted-foreground group-hover:text-accent-foreground/80 ml-2 flex items-center gap-2 text-xs",children:[s&&n.created&&r.jsx(ga,{variant:"outline",className:"text-[10px] text-accent group-hover:text-accent-foreground/80 group-hover:border-accent-foreground/30",children:dD(n.created)}),n.isFree?r.jsx(ga,{variant:"secondary",className:"text-xs group-hover:bg-accent-foreground/20 group-hover:text-accent-foreground",children:"Free"}):r.jsx("span",{children:tD(n.pricing)}),r.jsx("span",{children:rD(n.context_length)})]})]})}function zD({className:n,...a}){return r.jsx("div",{"data-slot":"card",className:B("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function ID({className:n,...a}){return r.jsx("div",{"data-slot":"card-header",className:B("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",n),...a})}function UD({className:n,...a}){return r.jsx("div",{"data-slot":"card-title",className:B("leading-none font-semibold",n),...a})}function HD({className:n,...a}){return r.jsx("div",{"data-slot":"card-description",className:B("text-muted-foreground text-sm",n),...a})}function BD({className:n,...a}){return r.jsx("div",{"data-slot":"card-content",className:B("px-6",n),...a})}const KD=["agy","claude","gemini","codex","qwen","kimi","iflow","kiro","ghcp"],nE=KD.map(n=>({id:n,name:Xd(n),description:RA(n)})),qD=["provider","auth","variant","success"];function aE(n){return n==="account"?1:qD.indexOf(n)}const GD=S.forwardRef(({className:n,value:a=0,max:s=100,indicatorClassName:l,...c},f)=>{const h=Math.min(Math.max(a/s*100,0),100);return r.jsx("div",{ref:f,role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":a,className:B("relative h-2 w-full overflow-hidden rounded-full bg-secondary",n),...c,children:r.jsx("div",{className:B("h-full transition-all",l||"bg-primary"),style:{width:`${h}%`}})})});GD.displayName="Progress";const iE=pS,oE=gS,sE=mS,YD=S.forwardRef(({className:n,align:a="center",sideOffset:s=4,...l},c)=>r.jsx(hS,{children:r.jsx(Yy,{ref:c,align:a,sideOffset:s,className:B("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...l})}));YD.displayName=Yy.displayName;const FD=S.lazy(()=>ht(()=>Promise.resolve().then(()=>hf),void 0).then(n=>({default:n.CodeEditor})));function lE({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:s,onRawJsonChange:l,profileEnv:c,missingRequiredFields:f=[]}){const h=f.length>0;return r.jsx(S.Suspense,{fallback:r.jsxs("div",{className:"flex items-center justify-center h-full",children:[r.jsx(jn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),r.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),children:r.jsxs("div",{className:"h-full flex flex-col",children:[!a&&s!==null&&r.jsxs("div",{className:"mb-2 px-3 py-2 bg-destructive/10 text-destructive text-sm rounded-md flex items-center gap-2 mx-6 mt-4 shrink-0",children:[r.jsx(vo,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&h&&r.jsxs("div",{className:"mb-2 px-3 py-2 bg-warning/10 text-warning-foreground text-sm rounded-md flex items-start gap-2 mx-6 mt-4 shrink-0 border border-warning/20",children:[r.jsx(qn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:f.join(", ")}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Apply a preset from Model Config tab or add these fields manually. Without them, Claude Code will fail with 404 errors."})]})]}),r.jsx("div",{className:"flex-1 overflow-hidden px-6 pb-4 pt-4",children:r.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:r.jsx(FD,{value:n,onChange:l,language:"json",minHeight:"100%"})})}),r.jsx("div",{className:"mx-6 mb-4",children:r.jsx("div",{className:"border rounded-md overflow-hidden",children:r.jsx(df,{profileEnv:c})})})]})})}var Ft={},cy;function VD(){if(cy)return Ft;cy=1;var n=Ft&&Ft.__assign||function(){return n=Object.assign||function(E){for(var k,z=1,Q=arguments.length;z<Q;z++){k=arguments[z];for(var W in k)Object.prototype.hasOwnProperty.call(k,W)&&(E[W]=k[W])}return E},n.apply(this,arguments)},a=Ft&&Ft.__createBinding||(Object.create?(function(E,k,z,Q){Q===void 0&&(Q=z);var W=Object.getOwnPropertyDescriptor(k,z);(!W||("get"in W?!k.__esModule:W.writable||W.configurable))&&(W={enumerable:!0,get:function(){return k[z]}}),Object.defineProperty(E,Q,W)}):(function(E,k,z,Q){Q===void 0&&(Q=z),E[Q]=k[z]})),s=Ft&&Ft.__setModuleDefault||(Object.create?(function(E,k){Object.defineProperty(E,"default",{enumerable:!0,value:k})}):function(E,k){E.default=k}),l=Ft&&Ft.__importStar||function(E){if(E&&E.__esModule)return E;var k={};if(E!=null)for(var z in E)z!=="default"&&Object.prototype.hasOwnProperty.call(E,z)&&a(k,E,z);return s(k,E),k},c=Ft&&Ft.__rest||function(E,k){var z={};for(var Q in E)Object.prototype.hasOwnProperty.call(E,Q)&&k.indexOf(Q)<0&&(z[Q]=E[Q]);if(E!=null&&typeof Object.getOwnPropertySymbols=="function")for(var W=0,Q=Object.getOwnPropertySymbols(E);W<Q.length;W++)k.indexOf(Q[W])<0&&Object.prototype.propertyIsEnumerable.call(E,Q[W])&&(z[Q[W]]=E[Q[W]]);return z};Object.defineProperty(Ft,"__esModule",{value:!0});var f=l(Md()),h=89,p=90,m=77,y=57,C=219,x=222,v=192,N=100,w=3e3,T=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),O=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),M="npm__react-simple-code-editor__textarea",U=`
15
+ /**
16
+ * Reset the text fill color so that placeholder is visible
17
+ */
18
+ .`.concat(M,`:empty {
19
+ -webkit-text-fill-color: inherit !important;
20
+ }
21
+
22
+ /**
23
+ * Hack to apply on some CSS on IE10 and IE11
24
+ */
25
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
26
+ /**
27
+ * IE doesn't support '-webkit-text-fill-color'
28
+ * So we use 'color: transparent' to make the text transparent on IE
29
+ * Unlike other browsers, it doesn't affect caret color in IE
30
+ */
31
+ .`).concat(M,` {
32
+ color: transparent !important;
33
+ }
34
+
35
+ .`).concat(M,`::selection {
36
+ background-color: #accef7 !important;
37
+ color: transparent !important;
38
+ }
39
+ }
40
+ `),K=f.forwardRef(function(k,z){var Q=k.autoFocus,W=k.disabled,ee=k.form,ne=k.highlight,J=k.ignoreTabKey,ge=J===void 0?!1:J,ue=k.insertSpaces,Ce=ue===void 0?!0:ue,P=k.maxLength,V=k.minLength,ae=k.name,pe=k.onBlur,xe=k.onClick,ie=k.onFocus,Z=k.onKeyDown,G=k.onKeyUp,$=k.onValueChange,re=k.padding,te=re===void 0?0:re,se=k.placeholder,be=k.preClassName,Re=k.readOnly,Ye=k.required,St=k.style,Ct=k.tabSize,Ve=Ct===void 0?2:Ct,ot=k.textareaClassName,It=k.textareaId,Qt=k.value,Yn=c(k,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),De=f.useRef({stack:[],offset:-1}),Wt=f.useRef(null),En=f.useState(!0),$t=En[0],Sa=En[1],Fn={paddingTop:typeof te=="object"?te.top:te,paddingRight:typeof te=="object"?te.right:te,paddingBottom:typeof te=="object"?te.bottom:te,paddingLeft:typeof te=="object"?te.left:te},pt=ne(Qt),Xt=function(X,je){return X.substring(0,je).split(`
41
+ `)},Vn=f.useCallback(function(X,je){var ve,Ee,st;je===void 0&&(je=!1);var he=De.current,ke=he.stack,Se=he.offset;if(ke.length&&Se>-1){De.current.stack=ke.slice(0,Se+1);var Oe=De.current.stack.length;if(Oe>N){var tt=Oe-N;De.current.stack=ke.slice(tt,Oe),De.current.offset=Math.max(De.current.offset-tt,0)}}var Ne=Date.now();if(je){var _t=De.current.stack[De.current.offset];if(_t&&Ne-_t.timestamp<w){var Wn=/[^a-z0-9]([a-z0-9]+)$/i,Nt=(ve=Xt(_t.value,_t.selectionStart).pop())===null||ve===void 0?void 0:ve.match(Wn),Zt=(Ee=Xt(X.value,X.selectionStart).pop())===null||Ee===void 0?void 0:Ee.match(Wn);if(Nt?.[1]&&(!((st=Zt?.[1])===null||st===void 0)&&st.startsWith(Nt[1]))){De.current.stack[De.current.offset]=n(n({},X),{timestamp:Ne});return}}}De.current.stack.push(n(n({},X),{timestamp:Ne})),De.current.offset++},[]),ei=f.useCallback(function(){var X=Wt.current;if(X){var je=X.value,ve=X.selectionStart,Ee=X.selectionEnd;Vn({value:je,selectionStart:ve,selectionEnd:Ee})}},[Vn]),On=function(X){var je=Wt.current;je&&(je.value=X.value,je.selectionStart=X.selectionStart,je.selectionEnd=X.selectionEnd,$?.(X.value))},Pn=function(X){var je=Wt.current,ve=De.current.stack[De.current.offset];ve&&je&&(De.current.stack[De.current.offset]=n(n({},ve),{selectionStart:je.selectionStart,selectionEnd:je.selectionEnd})),Vn(X),On(X)},Di=function(){var X=De.current,je=X.stack,ve=X.offset,Ee=je[ve-1];Ee&&(On(Ee),De.current.offset=Math.max(ve-1,0))},wo=function(){var X=De.current,je=X.stack,ve=X.offset,Ee=je[ve+1];Ee&&(On(Ee),De.current.offset=Math.min(ve+1,je.length-1))},No=function(X){if(!(Z&&(Z(X),X.defaultPrevented))){X.key==="Escape"&&X.currentTarget.blur();var je=X.currentTarget,ve=je.value,Ee=je.selectionStart,st=je.selectionEnd,he=(Ce?" ":" ").repeat(Ve);if(X.key==="Tab"&&!ge&&$t)if(X.preventDefault(),X.shiftKey){var ke=Xt(ve,Ee),Se=ke.length-1,Oe=Xt(ve,st).length-1,tt=ve.split(`
42
+ `).map(function($n,Ti){return Ti>=Se&&Ti<=Oe&&$n.startsWith(he)?$n.substring(he.length):$n}).join(`
43
+ `);if(ve!==tt){var Ne=ke[Se];Pn({value:tt,selectionStart:Ne?.startsWith(he)?Ee-he.length:Ee,selectionEnd:st-(ve.length-tt.length)})}}else if(Ee!==st){var ke=Xt(ve,Ee),_t=ke.length-1,Wn=Xt(ve,st).length-1,Ne=ke[_t];Pn({value:ve.split(`
44
+ `).map(function(Do,To){return To>=_t&&To<=Wn?he+Do:Do}).join(`
45
+ `),selectionStart:Ne&&/\S/.test(Ne)?Ee+he.length:Ee,selectionEnd:st+he.length*(Wn-_t+1)})}else{var Nt=Ee+he.length;Pn({value:ve.substring(0,Ee)+he+ve.substring(st),selectionStart:Nt,selectionEnd:Nt})}else if(X.key==="Backspace"){var Zt=Ee!==st,wn=ve.substring(0,Ee);if(wn.endsWith(he)&&!Zt){X.preventDefault();var Nt=Ee-he.length;Pn({value:ve.substring(0,Ee-he.length)+ve.substring(st),selectionStart:Nt,selectionEnd:Nt})}}else if(X.key==="Enter"){if(Ee===st){var Ao=Xt(ve,Ee).pop(),ti=Ao?.match(/^\s+/);if(ti?.[0]){X.preventDefault();var ko=`
46
+ `+ti[0],Nt=Ee+ko.length;Pn({value:ve.substring(0,Ee)+ko+ve.substring(st),selectionStart:Nt,selectionEnd:Nt})}}}else if(X.keyCode===y||X.keyCode===C||X.keyCode===x||X.keyCode===v){var fn=void 0;X.keyCode===y&&X.shiftKey?fn=["(",")"]:X.keyCode===C?X.shiftKey?fn=["{","}"]:fn=["[","]"]:X.keyCode===x?X.shiftKey?fn=['"','"']:fn=["'","'"]:X.keyCode===v&&!X.shiftKey&&(fn=["`","`"]),Ee!==st&&fn&&(X.preventDefault(),Pn({value:ve.substring(0,Ee)+fn[0]+ve.substring(Ee,st)+fn[1]+ve.substring(st),selectionStart:Ee,selectionEnd:st+2}))}else(O?X.metaKey&&X.keyCode===p:X.ctrlKey&&X.keyCode===p)&&!X.shiftKey&&!X.altKey?(X.preventDefault(),Di()):(O?X.metaKey&&X.keyCode===p&&X.shiftKey:T?X.ctrlKey&&X.keyCode===h:X.ctrlKey&&X.keyCode===p&&X.shiftKey)&&!X.altKey?(X.preventDefault(),wo()):X.keyCode===m&&X.ctrlKey&&(!O||X.shiftKey)&&(X.preventDefault(),Sa(function($n){return!$n}))}},Qn=function(X){var je=X.currentTarget,ve=je.value,Ee=je.selectionStart,st=je.selectionEnd;Vn({value:ve,selectionStart:Ee,selectionEnd:st},!0),$(ve)};return f.useEffect(function(){ei()},[ei]),f.useImperativeHandle(z,function(){return{get session(){return{history:De.current}},set session(X){De.current=X.history}}},[]),f.createElement("div",n({},Yn,{style:n(n({},I.container),St)}),f.createElement("pre",n({className:be,"aria-hidden":"true",style:n(n(n({},I.editor),I.highlight),Fn)},typeof pt=="string"?{dangerouslySetInnerHTML:{__html:pt+"<br />"}}:{children:pt})),f.createElement("textarea",{ref:function(X){return Wt.current=X},style:n(n(n({},I.editor),I.textarea),Fn),className:M+(ot?" ".concat(ot):""),id:It,value:Qt,onChange:Qn,onKeyDown:No,onClick:xe,onKeyUp:G,onFocus:ie,onBlur:pe,disabled:W,form:ee,maxLength:P,minLength:V,name:ae,placeholder:se,readOnly:Re,required:Ye,autoFocus:Q,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),f.createElement("style",{dangerouslySetInnerHTML:{__html:U}}))}),I={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};return Ft.default=K,Ft}var QD=VD();const WD=vS(QD),$D=[/^ANTHROPIC_AUTH_TOKEN$/,/_API_KEY$/,/_AUTH_TOKEN$/,/_SECRET$/,/_SECRET_KEY$/,/^API_KEY$/,/^AUTH_TOKEN$/,/^SECRET$/,/_PASSWORD$/,/^PASSWORD$/,/_CREDENTIAL$/,/_PRIVATE_KEY$/];function XD(n){return $D.some(a=>a.test(n))}function ZD(n){if(!n.trim())return{valid:!0};try{return JSON.parse(n),{valid:!0}}catch(a){const l=a.message,c=l.match(/position (\d+)/);if(c){const f=parseInt(c[1],10),h=n.substring(0,f).split(`
47
+ `);return{valid:!1,error:l,line:h.length}}return{valid:!1,error:l}}}function sb({value:n,onChange:a,language:s="json",readonly:l=!1,className:c,minHeight:f="300px"}){const{isDark:h}=xx(),[p,m]=S.useState(!1),[y,C]=S.useState(!0),x=S.useMemo(()=>s==="json"?ZD(n):{valid:!0},[n,s]),v=S.useCallback(N=>r.jsx(FC,{theme:h?gg.nightOwl:gg.github,code:N,language:s,children:({tokens:w,getLineProps:T,getTokenProps:O})=>{let M=!1;return r.jsx(r.Fragment,{children:w.map((U,K)=>r.jsx("div",{...T({line:U}),className:B(x.line===K+1&&"bg-destructive/20"),children:U.map((I,E)=>{let k=!1;if(I.types.includes("property")){const Q=I.content.replace(/['"]/g,"");XD(Q)?M=!0:M=!1}else(I.types.includes("string")||I.types.includes("number")||I.types.includes("boolean"))&&M?(k=!0,M=!1):I.types.includes("punctuation")&&I.content!==":"&&I.content!=="["&&I.content!=="{"&&(M=!1);const z=O({token:I});return k&&y&&(z.className=B(z.className,"blur-[3px] select-none opacity-70 transition-all duration-200")),r.jsx("span",{...z},E)})},K))})}}),[h,s,x.line,y]);return r.jsxs("div",{className:B("flex flex-col",c),children:[r.jsxs("div",{className:B("relative rounded-md border overflow-hidden","bg-muted/30",p&&"ring-2 ring-ring ring-offset-2 ring-offset-background",l&&"opacity-70 cursor-not-allowed",!x.valid&&"border-destructive"),style:{minHeight:f},children:[r.jsx(WD,{value:n,onValueChange:l?()=>{}:a,highlight:v,padding:12,disabled:l,onFocus:()=>m(!0),onBlur:()=>m(!1),textareaClassName:B("focus:outline-none font-mono text-sm",l&&"cursor-not-allowed"),preClassName:"font-mono text-sm",style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.875rem",minHeight:f}},h?"dark-editor":"light-editor"),r.jsx("div",{className:"absolute top-2 right-2 z-10 opacity-50 hover:opacity-100 transition-opacity",children:r.jsx(ct,{variant:"ghost",size:"icon",className:"h-6 w-6 bg-background/50 hover:bg-background border shadow-sm rounded-full",onClick:()=>C(!y),title:y?"Reveal sensitive values":"Mask sensitive values",children:y?r.jsx(vr,{className:"h-3 w-3"}):r.jsx(br,{className:"h-3 w-3"})})})]}),r.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs",children:[x.valid?r.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Sr,{className:"w-3 h-3 text-green-500"}),"Valid ",s.toUpperCase()]}):r.jsxs("span",{className:"flex items-center gap-1 text-destructive",children:[r.jsx(Cr,{className:"w-3 h-3"}),x.error,x.line&&` (line ${x.line})`]}),l&&r.jsx("span",{className:"ml-auto text-muted-foreground",children:"(Read-only)"})]})]})}const hf=Object.freeze(Object.defineProperty({__proto__:null,CodeEditor:sb},Symbol.toStringTag,{value:"Module"})),JD={webSearchConfig:null,webSearchStatus:null,webSearchLoading:!0,webSearchStatusLoading:!0,webSearchSaving:!1,webSearchError:null,webSearchSuccess:!1,globalEnvConfig:null,globalEnvLoading:!0,globalEnvSaving:!1,globalEnvError:null,globalEnvSuccess:!1,proxyConfig:null,proxyLoading:!0,proxySaving:!1,proxyError:null,proxySuccess:!1,proxyTestResult:null,proxyTesting:!1,rawConfig:null,rawConfigLoading:!1};function eT(n,a){switch(a.type){case"SET_WEBSEARCH_CONFIG":return{...n,webSearchConfig:a.payload};case"SET_WEBSEARCH_STATUS":return{...n,webSearchStatus:a.payload};case"SET_WEBSEARCH_LOADING":return{...n,webSearchLoading:a.payload};case"SET_WEBSEARCH_STATUS_LOADING":return{...n,webSearchStatusLoading:a.payload};case"SET_WEBSEARCH_SAVING":return{...n,webSearchSaving:a.payload};case"SET_WEBSEARCH_ERROR":return{...n,webSearchError:a.payload};case"SET_WEBSEARCH_SUCCESS":return{...n,webSearchSuccess:a.payload};case"SET_GLOBALENV_CONFIG":return{...n,globalEnvConfig:a.payload};case"SET_GLOBALENV_LOADING":return{...n,globalEnvLoading:a.payload};case"SET_GLOBALENV_SAVING":return{...n,globalEnvSaving:a.payload};case"SET_GLOBALENV_ERROR":return{...n,globalEnvError:a.payload};case"SET_GLOBALENV_SUCCESS":return{...n,globalEnvSuccess:a.payload};case"SET_PROXY_CONFIG":return{...n,proxyConfig:a.payload};case"SET_PROXY_LOADING":return{...n,proxyLoading:a.payload};case"SET_PROXY_SAVING":return{...n,proxySaving:a.payload};case"SET_PROXY_ERROR":return{...n,proxyError:a.payload};case"SET_PROXY_SUCCESS":return{...n,proxySuccess:a.payload};case"SET_PROXY_TEST_RESULT":return{...n,proxyTestResult:a.payload};case"SET_PROXY_TESTING":return{...n,proxyTesting:a.payload};case"SET_RAW_CONFIG":return{...n,rawConfig:a.payload};case"SET_RAW_CONFIG_LOADING":return{...n,rawConfigLoading:a.payload};default:return n}}const lb=S.createContext(null);function tT({children:n}){const[a,s]=S.useReducer(eT,JD);return r.jsx(lb.Provider,{value:{state:a,dispatch:s},children:n})}function rb(){const n=S.useContext(lb);if(!n)throw new Error("useSettingsContext must be used within a SettingsProvider");return n}function nT(){const{dispatch:n}=rb(),a=S.useCallback(k=>n({type:"SET_WEBSEARCH_CONFIG",payload:k}),[n]),s=S.useCallback(k=>n({type:"SET_WEBSEARCH_STATUS",payload:k}),[n]),l=S.useCallback(k=>n({type:"SET_WEBSEARCH_LOADING",payload:k}),[n]),c=S.useCallback(k=>n({type:"SET_WEBSEARCH_STATUS_LOADING",payload:k}),[n]),f=S.useCallback(k=>n({type:"SET_WEBSEARCH_SAVING",payload:k}),[n]),h=S.useCallback(k=>n({type:"SET_WEBSEARCH_ERROR",payload:k}),[n]),p=S.useCallback(k=>n({type:"SET_WEBSEARCH_SUCCESS",payload:k}),[n]),m=S.useCallback(k=>n({type:"SET_GLOBALENV_CONFIG",payload:k}),[n]),y=S.useCallback(k=>n({type:"SET_GLOBALENV_LOADING",payload:k}),[n]),C=S.useCallback(k=>n({type:"SET_GLOBALENV_SAVING",payload:k}),[n]),x=S.useCallback(k=>n({type:"SET_GLOBALENV_ERROR",payload:k}),[n]),v=S.useCallback(k=>n({type:"SET_GLOBALENV_SUCCESS",payload:k}),[n]),N=S.useCallback(k=>n({type:"SET_PROXY_CONFIG",payload:k}),[n]),w=S.useCallback(k=>n({type:"SET_PROXY_LOADING",payload:k}),[n]),T=S.useCallback(k=>n({type:"SET_PROXY_SAVING",payload:k}),[n]),O=S.useCallback(k=>n({type:"SET_PROXY_ERROR",payload:k}),[n]),M=S.useCallback(k=>n({type:"SET_PROXY_SUCCESS",payload:k}),[n]),U=S.useCallback(k=>n({type:"SET_PROXY_TEST_RESULT",payload:k}),[n]),K=S.useCallback(k=>n({type:"SET_PROXY_TESTING",payload:k}),[n]),I=S.useCallback(k=>n({type:"SET_RAW_CONFIG",payload:k}),[n]),E=S.useCallback(k=>n({type:"SET_RAW_CONFIG_LOADING",payload:k}),[n]);return S.useMemo(()=>({setWebSearchConfig:a,setWebSearchStatus:s,setWebSearchLoading:l,setWebSearchStatusLoading:c,setWebSearchSaving:f,setWebSearchError:h,setWebSearchSuccess:p,setGlobalEnvConfig:m,setGlobalEnvLoading:y,setGlobalEnvSaving:C,setGlobalEnvError:x,setGlobalEnvSuccess:v,setProxyConfig:N,setProxyLoading:w,setProxySaving:T,setProxyError:O,setProxySuccess:M,setProxyTestResult:U,setProxyTesting:K,setRawConfig:I,setRawConfigLoading:E}),[a,s,l,c,f,h,p,m,y,C,x,v,N,w,T,O,M,U,K,I,E])}function aT(){const[n,a]=SS(),s=n.get("tab")?.toLowerCase(),l=s==="globalenv"?"globalenv":s==="proxy"?"proxy":s==="auth"?"auth":s==="thinking"?"thinking":s==="backups"?"backups":"websearch",c=S.useCallback(f=>{a({tab:f},{replace:!0})},[a]);return{activeTab:l,setActiveTab:c}}function iT(){const{state:n}=rb(),a=nT(),[s,l]=S.useState(!1),c=S.useCallback(async()=>{try{a.setRawConfigLoading(!0);const h=await fetch("/api/config/raw");if(!h.ok){a.setRawConfig(null);return}const p=await h.text();a.setRawConfig(p)}catch{a.setRawConfig(null)}finally{a.setRawConfigLoading(!1)}},[a]),f=S.useCallback(async()=>{if(n.rawConfig)try{await navigator.clipboard.writeText(n.rawConfig),l(!0),setTimeout(()=>l(!1),2e3)}catch{}},[n.rawConfig]);return{rawConfig:n.rawConfig,loading:n.rawConfigLoading,copied:s,fetchRawConfig:c,copyToClipboard:f}}function uy({activeTab:n,onTabChange:a}){const{t:s}=Lt(),l=[{value:"websearch",label:s("settingsTabs.web"),icon:Zy},{value:"globalenv",label:s("settingsTabs.env"),icon:Rd},{value:"thinking",label:s("settingsTabs.think"),icon:nC},{value:"proxy",label:s("settingsTabs.proxy"),icon:aC},{value:"auth",label:s("settingsTabs.auth"),icon:Ed},{value:"backups",label:s("settingsTabs.backup"),icon:iC}];return r.jsx(Zx,{value:n,onValueChange:c=>a(c),children:r.jsx(cf,{className:"grid w-full grid-cols-6",children:l.map(({value:c,label:f,icon:h})=>r.jsxs(mr,{value:c,className:"gap-1.5 px-1 text-xs",children:[r.jsx(h,{className:"h-3.5 w-3.5 shrink-0"}),r.jsx("span",{className:"truncate",children:f})]},c))})})}function dy(){return r.jsxs("div",{className:"flex-1 p-5 space-y-6",children:[r.jsx(Ge,{className:"h-4 w-2/3"}),r.jsx("div",{className:"p-4 rounded-lg border",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(Ge,{className:"h-5 w-32"}),r.jsx(Ge,{className:"h-4 w-48"})]}),r.jsx(Ge,{className:"h-6 w-10 rounded-full"})]})}),r.jsxs("div",{className:"space-y-3",children:[r.jsx(Ge,{className:"h-5 w-24"}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(Ge,{className:"h-20 w-full rounded-lg"}),r.jsx(Ge,{className:"h-20 w-full rounded-lg"}),r.jsx(Ge,{className:"h-20 w-full rounded-lg"})]})]})]})}function cb(n,a=3,s=1e3){return n().catch(l=>{if(a<=0)throw l;return new Promise(c=>setTimeout(c,s)).then(()=>cb(n,a-1,s*2))})}function Co(n){return S.lazy(()=>cb(n))}const fy=Co(()=>ht(()=>import("./index-DimlYMhI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),hy=Co(()=>ht(()=>import("./globalenv-section-BM9oGUk_.js"),__vite__mapDeps([10,1,2,3,4,5,6,7,8,9]))),py=Co(()=>ht(()=>import("./index-DykKl5b0.js"),__vite__mapDeps([11,1,2,3,4,5,6,7,8,9]))),my=Co(()=>ht(()=>import("./index-D9tmeP-H.js"),__vite__mapDeps([12,1,2,3,13,4,14,15,5,6,7,8,9]))),gy=Co(()=>ht(()=>import("./auth-section-DtxR8sof.js"),__vite__mapDeps([16,1,2,4,5,6,7,8,9]))),yy=Co(()=>ht(()=>import("./backups-section-DAPwVCGp.js"),__vite__mapDeps([17,1,2,15,4,5,6,7,8,9])));class xy extends S.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}render(){return this.state.hasError?r.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:r.jsxs("div",{className:"text-center p-6 max-w-md",children:[r.jsx(Cr,{className:"w-12 h-12 mx-auto mb-4 text-destructive"}),r.jsx("p",{className:"font-medium text-foreground mb-2",children:He.t("settings.sectionLoadFailed")}),r.jsx("p",{className:"text-sm mb-4",children:this.state.error?.message||He.t("settings.unknownError")}),r.jsxs(ct,{variant:"outline",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2",children:[r.jsx(Es,{className:"w-4 h-4"}),He.t("settings.reloadPage")]})]})}):this.props.children}}function oT(){const{t:n}=Lt(),{activeTab:a,setActiveTab:s}=aT(),{rawConfig:l,loading:c,copied:f,fetchRawConfig:h,copyToClipboard:p}=iT();S.useEffect(()=>{h()},[h]);const m=y=>{S.startTransition(()=>{s(y)})};return r.jsxs("div",{className:"h-[calc(100vh-100px)]",children:[r.jsxs("div",{className:"md:hidden h-full flex flex-col",children:[r.jsx("div",{className:"border-b bg-background p-4",children:r.jsx(uy,{activeTab:a,onTabChange:m})}),r.jsx(xy,{children:r.jsxs(S.Suspense,{fallback:r.jsx(dy,{}),children:[a==="websearch"&&r.jsx(fy,{}),a==="globalenv"&&r.jsx(hy,{}),a==="thinking"&&r.jsx(py,{}),a==="proxy"&&r.jsx(my,{}),a==="auth"&&r.jsx(gy,{}),a==="backups"&&r.jsx(yy,{})]})})]}),r.jsxs(of,{direction:"horizontal",className:"h-full hidden md:flex",children:[r.jsx(Rs,{defaultSize:40,minSize:30,maxSize:55,children:r.jsxs("div",{className:"h-full border-r flex flex-col bg-muted/30 relative",children:[r.jsx("div",{className:"p-5 border-b bg-background",children:r.jsx(uy,{activeTab:a,onTabChange:m})}),r.jsx(xy,{children:r.jsxs(S.Suspense,{fallback:r.jsx(dy,{}),children:[a==="websearch"&&r.jsx(fy,{}),a==="globalenv"&&r.jsx(hy,{}),a==="thinking"&&r.jsx(py,{}),a==="proxy"&&r.jsx(my,{}),a==="auth"&&r.jsx(gy,{}),a==="backups"&&r.jsx(yy,{})]})})]})}),r.jsx(sf,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:r.jsx(wr,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),r.jsx(Rs,{defaultSize:60,minSize:35,children:r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsxs("div",{className:"p-4 border-b bg-background flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(fg,{className:"w-5 h-5 text-primary"}),r.jsxs("div",{children:[r.jsx("h2",{className:"font-semibold",children:"config.yaml"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"~/.ccs/config.yaml"})]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(ct,{variant:"outline",size:"sm",onClick:p,disabled:!l,children:f?r.jsxs(r.Fragment,{children:[r.jsx(xo,{className:"w-4 h-4 mr-1"}),n("settings.copied")]}):r.jsxs(r.Fragment,{children:[r.jsx(rr,{className:"w-4 h-4 mr-1"}),n("settings.copy")]})}),r.jsx(ct,{variant:"outline",size:"sm",onClick:h,disabled:c,children:r.jsx(Es,{className:`w-4 h-4 ${c?"animate-spin":""}`})})]})]}),r.jsx("div",{className:"flex-1 overflow-auto",children:c?r.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[r.jsx(Es,{className:"w-5 h-5 animate-spin mr-2"}),n("settings.loading")]}):l?r.jsx(sb,{value:l,onChange:()=>{},language:"yaml",readonly:!0,minHeight:"auto",className:"min-h-full"}):r.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:r.jsxs("div",{className:"text-center",children:[r.jsx(fg,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),r.jsx("p",{children:n("settings.configFileNotFound")}),r.jsx("code",{className:"text-sm bg-muted px-2 py-1 rounded mt-2 inline-block",children:"ccs migrate"})]})})})]})})]})]})}function sT(){return r.jsx(tT,{children:r.jsx(oT,{})})}const lT=Object.freeze(Object.defineProperty({__proto__:null,SettingsPage:sT},Symbol.toStringTag,{value:"Module"}));function rT(n,a,s="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:n,timeZoneName:s}).format(a).split(/\s/g).slice(2).join(" ")}const cT={},ks={};function Si(n,a){try{const l=(cT[n]||=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).format)(a).split("GMT")[1];return l in ks?ks[l]:by(l,l.split(":"))}catch{if(n in ks)return ks[n];const s=n?.match(uT);return s?by(n,s.slice(1)):NaN}}const uT=/([+-]\d\d):?(\d\d)?/;function by(n,a){const s=+(a[0]||0),l=+(a[1]||0),c=+(a[2]||0)/60;return ks[n]=s*60+l>0?s*60+l+c:s*60-l-c}class Bn extends Date{constructor(...a){super(),a.length>1&&typeof a[a.length-1]=="string"&&(this.timeZone=a.pop()),this.internal=new Date,isNaN(Si(this.timeZone,this))?this.setTime(NaN):a.length?typeof a[0]=="number"&&(a.length===1||a.length===2&&typeof a[1]!="number")?this.setTime(a[0]):typeof a[0]=="string"?this.setTime(+new Date(a[0])):a[0]instanceof Date?this.setTime(+a[0]):(this.setTime(+new Date(...a)),ub(this),Td(this)):this.setTime(Date.now())}static tz(a,...s){return s.length?new Bn(...s,a):new Bn(Date.now(),a)}withTimeZone(a){return new Bn(+this,a)}getTimezoneOffset(){const a=-Si(this.timeZone,this);return a>0?Math.floor(a):Math.ceil(a)}setTime(a){return Date.prototype.setTime.apply(this,arguments),Td(this),+this}[Symbol.for("constructDateFrom")](a){return new Bn(+new Date(a),this.timeZone)}}const vy=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!vy.test(n))return;const a=n.replace(vy,"$1UTC");Bn.prototype[a]&&(n.startsWith("get")?Bn.prototype[n]=function(){return this.internal[a]()}:(Bn.prototype[n]=function(){return Date.prototype[a].apply(this.internal,arguments),dT(this),+this},Bn.prototype[a]=function(){return Date.prototype[a].apply(this,arguments),Td(this),+this}))});function Td(n){n.internal.setTime(+n),n.internal.setUTCSeconds(n.internal.getUTCSeconds()-Math.round(-Si(n.timeZone,n)*60))}function dT(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),ub(n)}function ub(n){const a=Si(n.timeZone,n),s=a>0?Math.floor(a):Math.ceil(a),l=new Date(+n);l.setUTCHours(l.getUTCHours()-1);const c=-new Date(+n).getTimezoneOffset(),f=-new Date(+l).getTimezoneOffset(),h=c-f,p=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();h&&p&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+h);const m=c-s;m&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+m);const y=new Date(+n);y.setUTCSeconds(0);const C=c>0?y.getSeconds():(y.getSeconds()-60)%60,x=Math.round(-(Si(n.timeZone,n)*60))%60;(x||C)&&(n.internal.setUTCSeconds(n.internal.getUTCSeconds()+x),Date.prototype.setUTCSeconds.call(n,Date.prototype.getUTCSeconds.call(n)+x+C));const v=Si(n.timeZone,n),N=v>0?Math.floor(v):Math.ceil(v),T=-new Date(+n).getTimezoneOffset()-N,O=N!==s,M=T-m;if(O&&M){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+M);const U=Si(n.timeZone,n),K=U>0?Math.floor(U):Math.ceil(U),I=N-K;I&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+I),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+I))}}class ya extends Bn{static tz(a,...s){return s.length?new ya(...s,a):new ya(Date.now(),a)}toISOString(){const[a,s,l]=this.tzComponents(),c=`${a}${s}:${l}`;return this.internal.toISOString().slice(0,-1)+c}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[a,s,l,c]=this.internal.toUTCString().split(" ");return`${a?.slice(0,-1)} ${l} ${s} ${c}`}toTimeString(){const a=this.internal.toUTCString().split(" ")[4],[s,l,c]=this.tzComponents();return`${a} GMT${s}${l}${c} (${rT(this.timeZone,this)})`}toLocaleString(a,s){return Date.prototype.toLocaleString.call(this,a,{...s,timeZone:s?.timeZone||this.timeZone})}toLocaleDateString(a,s){return Date.prototype.toLocaleDateString.call(this,a,{...s,timeZone:s?.timeZone||this.timeZone})}toLocaleTimeString(a,s){return Date.prototype.toLocaleTimeString.call(this,a,{...s,timeZone:s?.timeZone||this.timeZone})}tzComponents(){const a=this.getTimezoneOffset(),s=a>0?"-":"+",l=String(Math.floor(Math.abs(a)/60)).padStart(2,"0"),c=String(Math.abs(a)%60).padStart(2,"0");return[s,l,c]}withTimeZone(a){return new ya(+this,a)}[Symbol.for("constructDateFrom")](a){return new ya(+new Date(a),this.timeZone)}}const Sy=5,fT=4;function hT(n,a){const s=a.startOfMonth(n),l=s.getDay()>0?s.getDay():7,c=a.addDays(n,-l+1),f=a.addDays(c,Sy*7-1);return a.getMonth(n)===a.getMonth(f)?Sy:fT}function db(n,a){const s=a.startOfMonth(n),l=s.getDay();return l===1?s:l===0?a.addDays(s,-6):a.addDays(s,-1*(l-1))}function pT(n,a){const s=db(n,a),l=hT(n,a);return a.addDays(s,l*7-1)}const fb={...xs,labels:{labelDayButton:(n,a,s,l)=>{let c;l&&typeof l.format=="function"?c=l.format.bind(l):c=(h,p)=>Cs(h,p,{locale:xs,...s});let f=c(n,"PPPP");return a.today&&(f=`Today, ${f}`),a.selected&&(f=`${f}, selected`),f},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:n=>`Week ${n}`,labelYearDropdown:"Choose the Year",labelGrid:(n,a,s)=>{let l;return s&&typeof s.format=="function"?l=s.format.bind(s):l=(c,f)=>Cs(c,f,{locale:xs,...a}),l(n,"LLLL yyyy")},labelGridcell:(n,a,s,l)=>{let c;l&&typeof l.format=="function"?c=l.format.bind(l):c=(h,p)=>Cs(h,p,{locale:xs,...s});let f=c(n,"PPPP");return a?.today&&(f=`Today, ${f}`),f},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(n,a,s)=>{let l;return s&&typeof s.format=="function"?l=s.format.bind(s):l=(c,f)=>Cs(c,f,{locale:xs,...a}),l(n,"cccc")}}};class dn{constructor(a,s){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?ya.tz(this.options.timeZone):new this.Date,this.newDate=(l,c,f)=>this.overrides?.newDate?this.overrides.newDate(l,c,f):this.options.timeZone?new ya(l,c,f,this.options.timeZone):new Date(l,c,f),this.addDays=(l,c)=>this.overrides?.addDays?this.overrides.addDays(l,c):cC(l,c),this.addMonths=(l,c)=>this.overrides?.addMonths?this.overrides.addMonths(l,c):uC(l,c),this.addWeeks=(l,c)=>this.overrides?.addWeeks?this.overrides.addWeeks(l,c):dC(l,c),this.addYears=(l,c)=>this.overrides?.addYears?this.overrides.addYears(l,c):fC(l,c),this.differenceInCalendarDays=(l,c)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(l,c):hC(l,c),this.differenceInCalendarMonths=(l,c)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(l,c):pC(l,c),this.eachMonthOfInterval=l=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(l):mC(l),this.eachYearOfInterval=l=>{const c=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(l):gC(l),f=new Set(c.map(p=>this.getYear(p)));if(f.size===c.length)return c;const h=[];return f.forEach(p=>{h.push(new Date(p,0,1))}),h},this.endOfBroadcastWeek=l=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(l):pT(l,this),this.endOfISOWeek=l=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(l):yC(l),this.endOfMonth=l=>this.overrides?.endOfMonth?this.overrides.endOfMonth(l):xC(l),this.endOfWeek=(l,c)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(l,c):bC(l,this.options),this.endOfYear=l=>this.overrides?.endOfYear?this.overrides.endOfYear(l):vC(l),this.format=(l,c,f)=>{const h=this.overrides?.format?this.overrides.format(l,c,this.options):Cs(l,c,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(h):h},this.getISOWeek=l=>this.overrides?.getISOWeek?this.overrides.getISOWeek(l):SC(l),this.getMonth=(l,c)=>this.overrides?.getMonth?this.overrides.getMonth(l,this.options):CC(l,this.options),this.getYear=(l,c)=>this.overrides?.getYear?this.overrides.getYear(l,this.options):wC(l,this.options),this.getWeek=(l,c)=>this.overrides?.getWeek?this.overrides.getWeek(l,this.options):NC(l,this.options),this.isAfter=(l,c)=>this.overrides?.isAfter?this.overrides.isAfter(l,c):AC(l,c),this.isBefore=(l,c)=>this.overrides?.isBefore?this.overrides.isBefore(l,c):kC(l,c),this.isDate=l=>this.overrides?.isDate?this.overrides.isDate(l):DC(l),this.isSameDay=(l,c)=>this.overrides?.isSameDay?this.overrides.isSameDay(l,c):TC(l,c),this.isSameMonth=(l,c)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(l,c):MC(l,c),this.isSameYear=(l,c)=>this.overrides?.isSameYear?this.overrides.isSameYear(l,c):jC(l,c),this.max=l=>this.overrides?.max?this.overrides.max(l):EC(l),this.min=l=>this.overrides?.min?this.overrides.min(l):OC(l),this.setMonth=(l,c)=>this.overrides?.setMonth?this.overrides.setMonth(l,c):PC(l,c),this.setYear=(l,c)=>this.overrides?.setYear?this.overrides.setYear(l,c):RC(l,c),this.startOfBroadcastWeek=(l,c)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(l,this):db(l,this),this.startOfDay=l=>this.overrides?.startOfDay?this.overrides.startOfDay(l):LC(l),this.startOfISOWeek=l=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(l):_C(l),this.startOfMonth=l=>this.overrides?.startOfMonth?this.overrides.startOfMonth(l):zC(l),this.startOfWeek=(l,c)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(l,this.options):IC(l,this.options),this.startOfYear=l=>this.overrides?.startOfYear?this.overrides.startOfYear(l):UC(l),this.options={locale:fb,...a},this.overrides=s}getDigitMap(){const{numerals:a="latn"}=this.options,s=new Intl.NumberFormat("en-US",{numberingSystem:a}),l={};for(let c=0;c<10;c++)l[c.toString()]=s.format(c);return l}replaceDigits(a){const s=this.getDigitMap();return a.replace(/\d/g,l=>s[l]||l)}formatNumber(a){return this.replaceDigits(a.toString())}getMonthYearOrder(){const a=this.options.locale?.code;return a&&dn.yearFirstLocales.has(a)?"year-first":"month-first"}formatMonthYear(a){const{locale:s,timeZone:l,numerals:c}=this.options,f=s?.code;if(f&&dn.yearFirstLocales.has(f))try{return new Intl.DateTimeFormat(f,{month:"long",year:"numeric",timeZone:l,numberingSystem:c}).format(a)}catch{}const h=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(a,h)}}dn.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Gn=new dn;class hb{constructor(a,s,l=Gn){this.date=a,this.displayMonth=s,this.outside=!!(s&&!l.isSameMonth(a,s)),this.dateLib=l,this.isoDate=l.format(a,"yyyy-MM-dd"),this.displayMonthId=l.format(s,"yyyy-MM"),this.dateMonthId=l.format(a,"yyyy-MM")}isEqualTo(a){return this.dateLib.isSameDay(a.date,this.date)&&this.dateLib.isSameMonth(a.displayMonth,this.displayMonth)}}class mT{constructor(a,s){this.date=a,this.weeks=s}}class gT{constructor(a,s){this.days=s,this.weekNumber=a}}function yT(n){return oe.createElement("button",{...n})}function xT(n){return oe.createElement("span",{...n})}function bT(n){const{size:a=24,orientation:s="left",className:l}=n;return oe.createElement("svg",{className:l,width:a,height:a,viewBox:"0 0 24 24"},s==="up"&&oe.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),s==="down"&&oe.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),s==="left"&&oe.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),s==="right"&&oe.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function vT(n){const{day:a,modifiers:s,...l}=n;return oe.createElement("td",{...l})}function ST(n){const{day:a,modifiers:s,...l}=n,c=oe.useRef(null);return oe.useEffect(()=>{s.focused&&c.current?.focus()},[s.focused]),oe.createElement("button",{ref:c,...l})}var me;(function(n){n.Root="root",n.Chevron="chevron",n.Day="day",n.DayButton="day_button",n.CaptionLabel="caption_label",n.Dropdowns="dropdowns",n.Dropdown="dropdown",n.DropdownRoot="dropdown_root",n.Footer="footer",n.MonthGrid="month_grid",n.MonthCaption="month_caption",n.MonthsDropdown="months_dropdown",n.Month="month",n.Months="months",n.Nav="nav",n.NextMonthButton="button_next",n.PreviousMonthButton="button_previous",n.Week="week",n.Weeks="weeks",n.Weekday="weekday",n.Weekdays="weekdays",n.WeekNumber="week_number",n.WeekNumberHeader="week_number_header",n.YearsDropdown="years_dropdown"})(me||(me={}));var rt;(function(n){n.disabled="disabled",n.hidden="hidden",n.outside="outside",n.focused="focused",n.today="today"})(rt||(rt={}));var Tn;(function(n){n.range_end="range_end",n.range_middle="range_middle",n.range_start="range_start",n.selected="selected"})(Tn||(Tn={}));var un;(function(n){n.weeks_before_enter="weeks_before_enter",n.weeks_before_exit="weeks_before_exit",n.weeks_after_enter="weeks_after_enter",n.weeks_after_exit="weeks_after_exit",n.caption_after_enter="caption_after_enter",n.caption_after_exit="caption_after_exit",n.caption_before_enter="caption_before_enter",n.caption_before_exit="caption_before_exit"})(un||(un={}));function CT(n){const{options:a,className:s,components:l,classNames:c,...f}=n,h=[c[me.Dropdown],s].join(" "),p=a?.find(({value:m})=>m===f.value);return oe.createElement("span",{"data-disabled":f.disabled,className:c[me.DropdownRoot]},oe.createElement(l.Select,{className:h,...f},a?.map(({value:m,label:y,disabled:C})=>oe.createElement(l.Option,{key:m,value:m,disabled:C},y))),oe.createElement("span",{className:c[me.CaptionLabel],"aria-hidden":!0},p?.label,oe.createElement(l.Chevron,{orientation:"down",size:18,className:c[me.Chevron]})))}function wT(n){return oe.createElement("div",{...n})}function NT(n){return oe.createElement("div",{...n})}function AT(n){const{calendarMonth:a,displayIndex:s,...l}=n;return oe.createElement("div",{...l},n.children)}function kT(n){const{calendarMonth:a,displayIndex:s,...l}=n;return oe.createElement("div",{...l})}function DT(n){return oe.createElement("table",{...n})}function TT(n){return oe.createElement("div",{...n})}const pb=S.createContext(void 0);function Us(){const n=S.useContext(pb);if(n===void 0)throw new Error("useDayPicker() must be used within a custom component.");return n}function MT(n){const{components:a}=Us();return oe.createElement(a.Dropdown,{...n})}function jT(n){const{onPreviousClick:a,onNextClick:s,previousMonth:l,nextMonth:c,...f}=n,{components:h,classNames:p,labels:{labelPrevious:m,labelNext:y}}=Us(),C=S.useCallback(v=>{c&&s?.(v)},[c,s]),x=S.useCallback(v=>{l&&a?.(v)},[l,a]);return oe.createElement("nav",{...f},oe.createElement(h.PreviousMonthButton,{type:"button",className:p[me.PreviousMonthButton],tabIndex:l?void 0:-1,"aria-disabled":l?void 0:!0,"aria-label":m(l),onClick:x},oe.createElement(h.Chevron,{disabled:l?void 0:!0,className:p[me.Chevron],orientation:"left"})),oe.createElement(h.NextMonthButton,{type:"button",className:p[me.NextMonthButton],tabIndex:c?void 0:-1,"aria-disabled":c?void 0:!0,"aria-label":y(c),onClick:C},oe.createElement(h.Chevron,{disabled:c?void 0:!0,orientation:"right",className:p[me.Chevron]})))}function ET(n){const{components:a}=Us();return oe.createElement(a.Button,{...n})}function OT(n){return oe.createElement("option",{...n})}function PT(n){const{components:a}=Us();return oe.createElement(a.Button,{...n})}function RT(n){const{rootRef:a,...s}=n;return oe.createElement("div",{...s,ref:a})}function LT(n){return oe.createElement("select",{...n})}function _T(n){const{week:a,...s}=n;return oe.createElement("tr",{...s})}function zT(n){return oe.createElement("th",{...n})}function IT(n){return oe.createElement("thead",{"aria-hidden":!0},oe.createElement("tr",{...n}))}function UT(n){const{week:a,...s}=n;return oe.createElement("th",{...s})}function HT(n){return oe.createElement("th",{...n})}function BT(n){return oe.createElement("tbody",{...n})}function KT(n){const{components:a}=Us();return oe.createElement(a.Dropdown,{...n})}const qT=Object.freeze(Object.defineProperty({__proto__:null,Button:yT,CaptionLabel:xT,Chevron:bT,Day:vT,DayButton:ST,Dropdown:CT,DropdownNav:wT,Footer:NT,Month:AT,MonthCaption:kT,MonthGrid:DT,Months:TT,MonthsDropdown:MT,Nav:jT,NextMonthButton:ET,Option:OT,PreviousMonthButton:PT,Root:RT,Select:LT,Week:_T,WeekNumber:UT,WeekNumberHeader:HT,Weekday:zT,Weekdays:IT,Weeks:BT,YearsDropdown:KT},Symbol.toStringTag,{value:"Module"}));function xa(n,a,s=!1,l=Gn){let{from:c,to:f}=n;const{differenceInCalendarDays:h,isSameDay:p}=l;return c&&f?(h(f,c)<0&&([c,f]=[f,c]),h(a,c)>=(s?1:0)&&h(f,a)>=(s?1:0)):!s&&f?p(f,a):!s&&c?p(c,a):!1}function pf(n){return!!(n&&typeof n=="object"&&"before"in n&&"after"in n)}function _r(n){return!!(n&&typeof n=="object"&&"from"in n)}function mf(n){return!!(n&&typeof n=="object"&&"after"in n)}function gf(n){return!!(n&&typeof n=="object"&&"before"in n)}function mb(n){return!!(n&&typeof n=="object"&&"dayOfWeek"in n)}function gb(n,a){return Array.isArray(n)&&n.every(a.isDate)}function ba(n,a,s=Gn){const l=Array.isArray(a)?a:[a],{isSameDay:c,differenceInCalendarDays:f,isAfter:h}=s;return l.some(p=>{if(typeof p=="boolean")return p;if(s.isDate(p))return c(n,p);if(gb(p,s))return p.some(m=>c(n,m));if(_r(p))return xa(p,n,!1,s);if(mb(p))return Array.isArray(p.dayOfWeek)?p.dayOfWeek.includes(n.getDay()):p.dayOfWeek===n.getDay();if(pf(p)){const m=f(p.before,n),y=f(p.after,n),C=m>0,x=y<0;return h(p.before,p.after)?x&&C:C||x}return mf(p)?f(n,p.after)>0:gf(p)?f(p.before,n)>0:typeof p=="function"?p(n):!1})}function GT(n,a,s,l,c){const{disabled:f,hidden:h,modifiers:p,showOutsideDays:m,broadcastCalendar:y,today:C=c.today()}=a,{isSameDay:x,isSameMonth:v,startOfMonth:N,isBefore:w,endOfMonth:T,isAfter:O}=c,M=s&&N(s),U=l&&T(l),K={[rt.focused]:[],[rt.outside]:[],[rt.disabled]:[],[rt.hidden]:[],[rt.today]:[]},I={};for(const E of n){const{date:k,displayMonth:z}=E,Q=!!(z&&!v(k,z)),W=!!(M&&w(k,M)),ee=!!(U&&O(k,U)),ne=!!(f&&ba(k,f,c)),J=!!(h&&ba(k,h,c))||W||ee||!y&&!m&&Q||y&&m===!1&&Q,ge=x(k,C);Q&&K.outside.push(E),ne&&K.disabled.push(E),J&&K.hidden.push(E),ge&&K.today.push(E),p&&Object.keys(p).forEach(ue=>{const Ce=p?.[ue];Ce&&ba(k,Ce,c)&&(I[ue]?I[ue].push(E):I[ue]=[E])})}return E=>{const k={[rt.focused]:!1,[rt.disabled]:!1,[rt.hidden]:!1,[rt.outside]:!1,[rt.today]:!1},z={};for(const Q in K){const W=K[Q];k[Q]=W.some(ee=>ee===E)}for(const Q in I)z[Q]=I[Q].some(W=>W===E);return{...k,...z}}}function YT(n,a,s={}){return Object.entries(n).filter(([,c])=>c===!0).reduce((c,[f])=>(s[f]?c.push(s[f]):a[rt[f]]?c.push(a[rt[f]]):a[Tn[f]]&&c.push(a[Tn[f]]),c),[a[me.Day]])}function FT(n){return{...qT,...n}}function VT(n){const a={"data-mode":n.mode??void 0,"data-required":"required"in n?n.required:void 0,"data-multiple-months":n.numberOfMonths&&n.numberOfMonths>1||void 0,"data-week-numbers":n.showWeekNumber||void 0,"data-broadcast-calendar":n.broadcastCalendar||void 0,"data-nav-layout":n.navLayout||void 0};return Object.entries(n).forEach(([s,l])=>{s.startsWith("data-")&&(a[s]=l)}),a}function QT(){const n={};for(const a in me)n[me[a]]=`rdp-${me[a]}`;for(const a in rt)n[rt[a]]=`rdp-${rt[a]}`;for(const a in Tn)n[Tn[a]]=`rdp-${Tn[a]}`;for(const a in un)n[un[a]]=`rdp-${un[a]}`;return n}function yb(n,a,s){return(s??new dn(a)).formatMonthYear(n)}const WT=yb;function $T(n,a,s){return(s??new dn(a)).format(n,"d")}function XT(n,a=Gn){return a.format(n,"LLLL")}function ZT(n,a,s){return(s??new dn(a)).format(n,"cccccc")}function JT(n,a=Gn){return n<10?a.formatNumber(`0${n.toLocaleString()}`):a.formatNumber(`${n.toLocaleString()}`)}function eM(){return""}function xb(n,a=Gn){return a.format(n,"yyyy")}const tM=xb,nM=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:yb,formatDay:$T,formatMonthCaption:WT,formatMonthDropdown:XT,formatWeekNumber:JT,formatWeekNumberHeader:eM,formatWeekdayName:ZT,formatYearCaption:tM,formatYearDropdown:xb},Symbol.toStringTag,{value:"Module"}));function aM(n){return n?.formatMonthCaption&&!n.formatCaption&&(n.formatCaption=n.formatMonthCaption),n?.formatYearCaption&&!n.formatYearDropdown&&(n.formatYearDropdown=n.formatYearCaption),{...nM,...n}}function yf(n,a,s,l){let c=(l??new dn(s)).format(n,"PPPP");return a.today&&(c=`Today, ${c}`),a.selected&&(c=`${c}, selected`),c}const iM=yf;function xf(n,a,s){return(s??new dn(a)).formatMonthYear(n)}const oM=xf;function bb(n,a,s,l){let c=(l??new dn(s)).format(n,"PPPP");return a?.today&&(c=`Today, ${c}`),c}function vb(n){return"Choose the Month"}function Sb(){return""}const sM="Go to the Next Month";function Cb(n,a){return sM}function wb(n){return"Go to the Previous Month"}function Nb(n,a,s){return(s??new dn(a)).format(n,"cccc")}function Ab(n,a){return`Week ${n}`}function kb(n){return"Week Number"}function Db(n){return"Choose the Year"}const lM=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:oM,labelDay:iM,labelDayButton:yf,labelGrid:xf,labelGridcell:bb,labelMonthDropdown:vb,labelNav:Sb,labelNext:Cb,labelPrevious:wb,labelWeekNumber:Ab,labelWeekNumberHeader:kb,labelWeekday:Nb,labelYearDropdown:Db},Symbol.toStringTag,{value:"Module"})),Dn=(n,a,s)=>a||(s?typeof s=="function"?s:(...l)=>s:n);function rM(n,a){const s=a.locale?.labels??{};return{...lM,...n??{},labelDayButton:Dn(yf,n?.labelDayButton,s.labelDayButton),labelMonthDropdown:Dn(vb,n?.labelMonthDropdown,s.labelMonthDropdown),labelNext:Dn(Cb,n?.labelNext,s.labelNext),labelPrevious:Dn(wb,n?.labelPrevious,s.labelPrevious),labelWeekNumber:Dn(Ab,n?.labelWeekNumber,s.labelWeekNumber),labelYearDropdown:Dn(Db,n?.labelYearDropdown,s.labelYearDropdown),labelGrid:Dn(xf,n?.labelGrid,s.labelGrid),labelGridcell:Dn(bb,n?.labelGridcell,s.labelGridcell),labelNav:Dn(Sb,n?.labelNav,s.labelNav),labelWeekNumberHeader:Dn(kb,n?.labelWeekNumberHeader,s.labelWeekNumberHeader),labelWeekday:Dn(Nb,n?.labelWeekday,s.labelWeekday)}}function cM(n,a,s,l,c){const{startOfMonth:f,startOfYear:h,endOfYear:p,eachMonthOfInterval:m,getMonth:y}=c;return m({start:h(n),end:p(n)}).map(v=>{const N=l.formatMonthDropdown(v,c),w=y(v),T=a&&v<f(a)||s&&v>f(s)||!1;return{value:w,label:N,disabled:T}})}function uM(n,a={},s={}){let l={...a?.[me.Day]};return Object.entries(n).filter(([,c])=>c===!0).forEach(([c])=>{l={...l,...s?.[c]}}),l}function dM(n,a,s,l){const c=l??n.today(),f=s?n.startOfBroadcastWeek(c,n):a?n.startOfISOWeek(c):n.startOfWeek(c),h=[];for(let p=0;p<7;p++){const m=n.addDays(f,p);h.push(m)}return h}function fM(n,a,s,l,c=!1){if(!n||!a)return;const{startOfYear:f,endOfYear:h,eachYearOfInterval:p,getYear:m}=l,y=f(n),C=h(a),x=p({start:y,end:C});return c&&x.reverse(),x.map(v=>{const N=s.formatYearDropdown(v,l);return{value:m(v),label:N,disabled:!1}})}const Hs=n=>n instanceof HTMLElement?n:null,dd=n=>[...n.querySelectorAll("[data-animated-month]")??[]],hM=n=>Hs(n.querySelector("[data-animated-month]")),fd=n=>Hs(n.querySelector("[data-animated-caption]")),hd=n=>Hs(n.querySelector("[data-animated-weeks]")),pM=n=>Hs(n.querySelector("[data-animated-nav]")),mM=n=>Hs(n.querySelector("[data-animated-weekdays]"));function gM(n,a,{classNames:s,months:l,focused:c,dateLib:f}){const h=S.useRef(null),p=S.useRef(l),m=S.useRef(!1);S.useLayoutEffect(()=>{const y=p.current;if(p.current=l,!a||!n.current||!(n.current instanceof HTMLElement)||l.length===0||y.length===0||l.length!==y.length)return;const C=f.isSameMonth(l[0].date,y[0].date),x=f.isAfter(l[0].date,y[0].date),v=x?s[un.caption_after_enter]:s[un.caption_before_enter],N=x?s[un.weeks_after_enter]:s[un.weeks_before_enter],w=h.current,T=n.current.cloneNode(!0);if(T instanceof HTMLElement?(dd(T).forEach(K=>{if(!(K instanceof HTMLElement))return;const I=hM(K);I&&K.contains(I)&&K.removeChild(I);const E=fd(K);E&&E.classList.remove(v);const k=hd(K);k&&k.classList.remove(N)}),h.current=T):h.current=null,m.current||C||c)return;const O=w instanceof HTMLElement?dd(w):[],M=dd(n.current);if(M?.every(U=>U instanceof HTMLElement)&&O&&O.every(U=>U instanceof HTMLElement)){m.current=!0,n.current.style.isolation="isolate";const U=pM(n.current);U&&(U.style.zIndex="1"),M.forEach((K,I)=>{const E=O[I];if(!E)return;K.style.position="relative",K.style.overflow="hidden";const k=fd(K);k&&k.classList.add(v);const z=hd(K);z&&z.classList.add(N);const Q=()=>{m.current=!1,n.current&&(n.current.style.isolation=""),U&&(U.style.zIndex=""),k&&k.classList.remove(v),z&&z.classList.remove(N),K.style.position="",K.style.overflow="",K.contains(E)&&K.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const W=mM(E);W&&(W.style.opacity="0");const ee=fd(E);ee&&(ee.classList.add(x?s[un.caption_before_exit]:s[un.caption_after_exit]),ee.addEventListener("animationend",Q));const ne=hd(E);ne&&ne.classList.add(x?s[un.weeks_before_exit]:s[un.weeks_after_exit]),K.insertBefore(E,K.firstChild)})}})}function yM(n,a,s,l){const c=n[0],f=n[n.length-1],{ISOWeek:h,fixedWeeks:p,broadcastCalendar:m}=s??{},{addDays:y,differenceInCalendarDays:C,differenceInCalendarMonths:x,endOfBroadcastWeek:v,endOfISOWeek:N,endOfMonth:w,endOfWeek:T,isAfter:O,startOfBroadcastWeek:M,startOfISOWeek:U,startOfWeek:K}=l,I=m?M(c,l):h?U(c):K(c),E=m?v(f):h?N(w(f)):T(w(f)),k=a&&(m?v(a):h?N(a):T(a)),z=k&&O(E,k)?k:E,Q=C(z,I),W=x(f,c)+1,ee=[];for(let ge=0;ge<=Q;ge++){const ue=y(I,ge);ee.push(ue)}const J=(m?35:42)*W;if(p&&ee.length<J){const ge=J-ee.length;for(let ue=0;ue<ge;ue++){const Ce=y(ee[ee.length-1],1);ee.push(Ce)}}return ee}function xM(n){const a=[];return n.reduce((s,l)=>{const c=l.weeks.reduce((f,h)=>f.concat(h.days.slice()),a.slice());return s.concat(c.slice())},a.slice())}function bM(n,a,s,l){const{numberOfMonths:c=1}=s,f=[];for(let h=0;h<c;h++){const p=l.addMonths(n,h);if(a&&p>a)break;f.push(p)}return f}function Cy(n,a,s,l){const{month:c,defaultMonth:f,today:h=l.today(),numberOfMonths:p=1}=n;let m=c||f||h;const{differenceInCalendarMonths:y,addMonths:C,startOfMonth:x}=l;if(s&&y(s,m)<p-1){const v=-1*(p-1);m=C(s,v)}return a&&y(m,a)<0&&(m=a),x(m)}function vM(n,a,s,l){const{addDays:c,endOfBroadcastWeek:f,endOfISOWeek:h,endOfMonth:p,endOfWeek:m,getISOWeek:y,getWeek:C,startOfBroadcastWeek:x,startOfISOWeek:v,startOfWeek:N}=l,w=n.reduce((T,O)=>{const M=s.broadcastCalendar?x(O,l):s.ISOWeek?v(O):N(O),U=s.broadcastCalendar?f(O):s.ISOWeek?h(p(O)):m(p(O)),K=a.filter(z=>z>=M&&z<=U),I=s.broadcastCalendar?35:42;if(s.fixedWeeks&&K.length<I){const z=a.filter(Q=>{const W=I-K.length;return Q>U&&Q<=c(U,W)});K.push(...z)}const E=K.reduce((z,Q)=>{const W=s.ISOWeek?y(Q):C(Q),ee=z.find(J=>J.weekNumber===W),ne=new hb(Q,O,l);return ee?ee.days.push(ne):z.push(new gT(W,[ne])),z},[]),k=new mT(O,E);return T.push(k),T},[]);return s.reverseMonths?w.reverse():w}function SM(n,a){let{startMonth:s,endMonth:l}=n;const{startOfYear:c,startOfDay:f,startOfMonth:h,endOfMonth:p,addYears:m,endOfYear:y,newDate:C,today:x}=a,{fromYear:v,toYear:N,fromMonth:w,toMonth:T}=n;!s&&w&&(s=w),!s&&v&&(s=a.newDate(v,0,1)),!l&&T&&(l=T),!l&&N&&(l=C(N,11,31));const O=n.captionLayout==="dropdown"||n.captionLayout==="dropdown-years";return s?s=h(s):v?s=C(v,0,1):!s&&O&&(s=c(m(n.today??x(),-100))),l?l=p(l):N?l=C(N,11,31):!l&&O&&(l=y(n.today??x())),[s&&f(s),l&&f(l)]}function CM(n,a,s,l){if(s.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:f=1}=s,{startOfMonth:h,addMonths:p,differenceInCalendarMonths:m}=l,y=c?f:1,C=h(n);if(!a)return p(C,y);if(!(m(a,n)<f))return p(C,y)}function wM(n,a,s,l){if(s.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:f}=s,{startOfMonth:h,addMonths:p,differenceInCalendarMonths:m}=l,y=c?f??1:1,C=h(n);if(!a)return p(C,-y);if(!(m(C,a)<=0))return p(C,-y)}function NM(n){const a=[];return n.reduce((s,l)=>s.concat(l.weeks.slice()),a.slice())}function zr(n,a){const[s,l]=S.useState(n);return[a===void 0?s:a,l]}function AM(n,a){const[s,l]=SM(n,a),{startOfMonth:c,endOfMonth:f}=a,h=Cy(n,s,l,a),[p,m]=zr(h,n.month?h:void 0);S.useEffect(()=>{const I=Cy(n,s,l,a);m(I)},[n.timeZone]);const{months:y,weeks:C,days:x,previousMonth:v,nextMonth:N}=S.useMemo(()=>{const I=bM(p,l,{numberOfMonths:n.numberOfMonths},a),E=yM(I,n.endMonth?f(n.endMonth):void 0,{ISOWeek:n.ISOWeek,fixedWeeks:n.fixedWeeks,broadcastCalendar:n.broadcastCalendar},a),k=vM(I,E,{broadcastCalendar:n.broadcastCalendar,fixedWeeks:n.fixedWeeks,ISOWeek:n.ISOWeek,reverseMonths:n.reverseMonths},a),z=NM(k),Q=xM(k),W=wM(p,s,n,a),ee=CM(p,l,n,a);return{months:k,weeks:z,days:Q,previousMonth:W,nextMonth:ee}},[a,p.getTime(),l?.getTime(),s?.getTime(),n.disableNavigation,n.broadcastCalendar,n.endMonth?.getTime(),n.fixedWeeks,n.ISOWeek,n.numberOfMonths,n.pagedNavigation,n.reverseMonths]),{disableNavigation:w,onMonthChange:T}=n,O=I=>C.some(E=>E.days.some(k=>k.isEqualTo(I))),M=I=>{if(w)return;let E=c(I);s&&E<c(s)&&(E=c(s)),l&&E>c(l)&&(E=c(l)),m(E),T?.(E)};return{months:y,weeks:C,days:x,navStart:s,navEnd:l,previousMonth:v,nextMonth:N,goToMonth:M,goToDay:I=>{O(I)||M(I.date)}}}var Un;(function(n){n[n.Today=0]="Today",n[n.Selected=1]="Selected",n[n.LastFocused=2]="LastFocused",n[n.FocusedModifier=3]="FocusedModifier"})(Un||(Un={}));function wy(n){return!n[rt.disabled]&&!n[rt.hidden]&&!n[rt.outside]}function kM(n,a,s,l){let c,f=-1;for(const h of n){const p=a(h);wy(p)&&(p[rt.focused]&&f<Un.FocusedModifier?(c=h,f=Un.FocusedModifier):l?.isEqualTo(h)&&f<Un.LastFocused?(c=h,f=Un.LastFocused):s(h.date)&&f<Un.Selected?(c=h,f=Un.Selected):p[rt.today]&&f<Un.Today&&(c=h,f=Un.Today))}return c||(c=n.find(h=>wy(a(h)))),c}function DM(n,a,s,l,c,f,h){const{ISOWeek:p,broadcastCalendar:m}=f,{addDays:y,addMonths:C,addWeeks:x,addYears:v,endOfBroadcastWeek:N,endOfISOWeek:w,endOfWeek:T,max:O,min:M,startOfBroadcastWeek:U,startOfISOWeek:K,startOfWeek:I}=h;let k={day:y,week:x,month:C,year:v,startOfWeek:z=>m?U(z,h):p?K(z):I(z),endOfWeek:z=>m?N(z):p?w(z):T(z)}[n](s,a==="after"?1:-1);return a==="before"&&l?k=O([l,k]):a==="after"&&c&&(k=M([c,k])),k}function Tb(n,a,s,l,c,f,h,p=0){if(p>365)return;const m=DM(n,a,s.date,l,c,f,h),y=!!(f.disabled&&ba(m,f.disabled,h)),C=!!(f.hidden&&ba(m,f.hidden,h)),x=m,v=new hb(m,x,h);return!y&&!C?v:Tb(n,a,v,l,c,f,h,p+1)}function TM(n,a,s,l,c){const{autoFocus:f}=n,[h,p]=S.useState(),m=kM(a.days,s,l||(()=>!1),h),[y,C]=S.useState(f?m:void 0);return{isFocusTarget:T=>!!m?.isEqualTo(T),setFocused:C,focused:y,blur:()=>{p(y),C(void 0)},moveFocus:(T,O)=>{if(!y)return;const M=Tb(T,O,y,a.navStart,a.navEnd,n,c);M&&(n.disableNavigation&&!a.days.some(K=>K.isEqualTo(M))||(a.goToDay(M),C(M)))}}}function MM(n,a){const{selected:s,required:l,onSelect:c}=n,[f,h]=zr(s,c?s:void 0),p=c?s:f,{isSameDay:m}=a,y=N=>p?.some(w=>m(w,N))??!1,{min:C,max:x}=n;return{selected:p,select:(N,w,T)=>{let O=[...p??[]];if(y(N)){if(p?.length===C||l&&p?.length===1)return;O=p?.filter(M=>!m(M,N))}else p?.length===x?O=[N]:O=[...O,N];return c||h(O),c?.(O,N,w,T),O},isSelected:y}}function jM(n,a,s=0,l=0,c=!1,f=Gn){const{from:h,to:p}=a||{},{isSameDay:m,isAfter:y,isBefore:C}=f;let x;if(!h&&!p)x={from:n,to:s>0?void 0:n};else if(h&&!p)m(h,n)?s===0?x={from:h,to:n}:c?x={from:h,to:void 0}:x=void 0:C(n,h)?x={from:n,to:h}:x={from:h,to:n};else if(h&&p)if(m(h,n)&&m(p,n))c?x={from:h,to:p}:x=void 0;else if(m(h,n))x={from:h,to:s>0?void 0:n};else if(m(p,n))x={from:n,to:s>0?void 0:n};else if(C(n,h))x={from:n,to:p};else if(y(n,h))x={from:h,to:n};else if(y(n,p))x={from:h,to:n};else throw new Error("Invalid range");if(x?.from&&x?.to){const v=f.differenceInCalendarDays(x.to,x.from);l>0&&v>l?x={from:n,to:void 0}:s>1&&v<s&&(x={from:n,to:void 0})}return x}function EM(n,a,s=Gn){const l=Array.isArray(a)?a:[a];let c=n.from;const f=s.differenceInCalendarDays(n.to,n.from),h=Math.min(f,6);for(let p=0;p<=h;p++){if(l.includes(c.getDay()))return!0;c=s.addDays(c,1)}return!1}function Ny(n,a,s=Gn){return xa(n,a.from,!1,s)||xa(n,a.to,!1,s)||xa(a,n.from,!1,s)||xa(a,n.to,!1,s)}function OM(n,a,s=Gn){const l=Array.isArray(a)?a:[a];if(l.filter(p=>typeof p!="function").some(p=>typeof p=="boolean"?p:s.isDate(p)?xa(n,p,!1,s):gb(p,s)?p.some(m=>xa(n,m,!1,s)):_r(p)?p.from&&p.to?Ny(n,{from:p.from,to:p.to},s):!1:mb(p)?EM(n,p.dayOfWeek,s):pf(p)?s.isAfter(p.before,p.after)?Ny(n,{from:s.addDays(p.after,1),to:s.addDays(p.before,-1)},s):ba(n.from,p,s)||ba(n.to,p,s):mf(p)||gf(p)?ba(n.from,p,s)||ba(n.to,p,s):!1))return!0;const h=l.filter(p=>typeof p=="function");if(h.length){let p=n.from;const m=s.differenceInCalendarDays(n.to,n.from);for(let y=0;y<=m;y++){if(h.some(C=>C(p)))return!0;p=s.addDays(p,1)}}return!1}function PM(n,a){const{disabled:s,excludeDisabled:l,selected:c,required:f,onSelect:h}=n,[p,m]=zr(c,h?c:void 0),y=h?c:p;return{selected:y,select:(v,N,w)=>{const{min:T,max:O}=n,M=v?jM(v,y,T,O,f,a):void 0;return l&&s&&M?.from&&M.to&&OM({from:M.from,to:M.to},s,a)&&(M.from=v,M.to=void 0),h||m(M),h?.(M,v,N,w),M},isSelected:v=>y&&xa(y,v,!1,a)}}function RM(n,a){const{selected:s,required:l,onSelect:c}=n,[f,h]=zr(s,c?s:void 0),p=c?s:f,{isSameDay:m}=a;return{selected:p,select:(x,v,N)=>{let w=x;return!l&&p&&p&&m(x,p)&&(w=void 0),c||h(w),c?.(w,x,v,N),w},isSelected:x=>p?m(p,x):!1}}function LM(n,a){const s=RM(n,a),l=MM(n,a),c=PM(n,a);switch(n.mode){case"single":return s;case"multiple":return l;case"range":return c;default:return}}function Rt(n,a){return n instanceof ya&&n.timeZone===a?n:new ya(n,a)}function Ay(n,a){return typeof n=="boolean"||typeof n=="function"?n:n instanceof Date?Rt(n,a):Array.isArray(n)?n.map(s=>s instanceof Date?Rt(s,a):s):_r(n)?{...n,from:n.from?Rt(n.from,a):n.from,to:n.to?Rt(n.to,a):n.to}:pf(n)?{before:Rt(n.before,a),after:Rt(n.after,a)}:mf(n)?{after:Rt(n.after,a)}:gf(n)?{before:Rt(n.before,a)}:n}function pd(n,a){return n&&(Array.isArray(n)?n.map(s=>Ay(s,a)):Ay(n,a))}function _M(n){let a=n;const s=a.timeZone;if(s&&(a={...n,timeZone:s},a.today&&(a.today=Rt(a.today,s)),a.month&&(a.month=Rt(a.month,s)),a.defaultMonth&&(a.defaultMonth=Rt(a.defaultMonth,s)),a.startMonth&&(a.startMonth=Rt(a.startMonth,s)),a.endMonth&&(a.endMonth=Rt(a.endMonth,s)),a.mode==="single"&&a.selected?a.selected=Rt(a.selected,s):a.mode==="multiple"&&a.selected?a.selected=a.selected?.map(he=>Rt(he,s)):a.mode==="range"&&a.selected&&(a.selected={from:a.selected.from?Rt(a.selected.from,s):a.selected.from,to:a.selected.to?Rt(a.selected.to,s):a.selected.to}),a.disabled!==void 0&&(a.disabled=pd(a.disabled,s)),a.hidden!==void 0&&(a.hidden=pd(a.hidden,s)),a.modifiers)){const he={};Object.keys(a.modifiers).forEach(ke=>{he[ke]=pd(a.modifiers?.[ke],s)}),a.modifiers=he}const{components:l,formatters:c,labels:f,dateLib:h,locale:p,classNames:m}=S.useMemo(()=>{const he={...fb,...a.locale},ke=new dn({locale:he,weekStartsOn:a.broadcastCalendar?1:a.weekStartsOn,firstWeekContainsDate:a.firstWeekContainsDate,useAdditionalWeekYearTokens:a.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:a.useAdditionalDayOfYearTokens,timeZone:a.timeZone,numerals:a.numerals},a.dateLib);return{dateLib:ke,components:FT(a.components),formatters:aM(a.formatters),labels:rM(a.labels,ke.options),locale:he,classNames:{...QT(),...a.classNames}}},[a.locale,a.broadcastCalendar,a.weekStartsOn,a.firstWeekContainsDate,a.useAdditionalWeekYearTokens,a.useAdditionalDayOfYearTokens,a.timeZone,a.numerals,a.dateLib,a.components,a.formatters,a.labels,a.classNames]);a.today||(a={...a,today:h.today()});const{captionLayout:y,mode:C,navLayout:x,numberOfMonths:v=1,onDayBlur:N,onDayClick:w,onDayFocus:T,onDayKeyDown:O,onDayMouseEnter:M,onDayMouseLeave:U,onNextClick:K,onPrevClick:I,showWeekNumber:E,styles:k}=a,{formatCaption:z,formatDay:Q,formatMonthDropdown:W,formatWeekNumber:ee,formatWeekNumberHeader:ne,formatWeekdayName:J,formatYearDropdown:ge}=c,ue=AM(a,h),{days:Ce,months:P,navStart:V,navEnd:ae,previousMonth:pe,nextMonth:xe,goToMonth:ie}=ue,Z=GT(Ce,a,V,ae,h),{isSelected:G,select:$,selected:re}=LM(a,h)??{},{blur:te,focused:se,isFocusTarget:be,moveFocus:Re,setFocused:Ye}=TM(a,ue,Z,G??(()=>!1),h),{labelDayButton:St,labelGridcell:Ct,labelGrid:Ve,labelMonthDropdown:ot,labelNav:It,labelPrevious:Qt,labelNext:Yn,labelWeekday:De,labelWeekNumber:Wt,labelWeekNumberHeader:En,labelYearDropdown:$t}=f,Sa=S.useMemo(()=>dM(h,a.ISOWeek,a.broadcastCalendar,a.today),[h,a.ISOWeek,a.broadcastCalendar,a.today]),Fn=C!==void 0||w!==void 0,pt=S.useCallback(()=>{pe&&(ie(pe),I?.(pe))},[pe,ie,I]),Xt=S.useCallback(()=>{xe&&(ie(xe),K?.(xe))},[ie,xe,K]),Vn=S.useCallback((he,ke)=>Se=>{Se.preventDefault(),Se.stopPropagation(),Ye(he),!ke.disabled&&($?.(he.date,ke,Se),w?.(he.date,ke,Se))},[$,w,Ye]),ei=S.useCallback((he,ke)=>Se=>{Ye(he),T?.(he.date,ke,Se)},[T,Ye]),On=S.useCallback((he,ke)=>Se=>{te(),N?.(he.date,ke,Se)},[te,N]),Pn=S.useCallback((he,ke)=>Se=>{const Oe={ArrowLeft:[Se.shiftKey?"month":"day",a.dir==="rtl"?"after":"before"],ArrowRight:[Se.shiftKey?"month":"day",a.dir==="rtl"?"before":"after"],ArrowDown:[Se.shiftKey?"year":"week","after"],ArrowUp:[Se.shiftKey?"year":"week","before"],PageUp:[Se.shiftKey?"year":"month","before"],PageDown:[Se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Oe[Se.key]){Se.preventDefault(),Se.stopPropagation();const[tt,Ne]=Oe[Se.key];Re(tt,Ne)}O?.(he.date,ke,Se)},[Re,O,a.dir]),Di=S.useCallback((he,ke)=>Se=>{M?.(he.date,ke,Se)},[M]),wo=S.useCallback((he,ke)=>Se=>{U?.(he.date,ke,Se)},[U]),No=S.useCallback(he=>ke=>{const Se=Number(ke.target.value),Oe=h.setMonth(h.startOfMonth(he),Se);ie(Oe)},[h,ie]),Qn=S.useCallback(he=>ke=>{const Se=Number(ke.target.value),Oe=h.setYear(h.startOfMonth(he),Se);ie(Oe)},[h,ie]),{className:X,style:je}=S.useMemo(()=>({className:[m[me.Root],a.className].filter(Boolean).join(" "),style:{...k?.[me.Root],...a.style}}),[m,a.className,a.style,k]),ve=VT(a),Ee=S.useRef(null);gM(Ee,!!a.animate,{classNames:m,months:P,focused:se,dateLib:h});const st={dayPickerProps:a,selected:re,select:$,isSelected:G,months:P,nextMonth:xe,previousMonth:pe,goToMonth:ie,getModifiers:Z,components:l,classNames:m,styles:k,labels:f,formatters:c};return oe.createElement(pb.Provider,{value:st},oe.createElement(l.Root,{rootRef:a.animate?Ee:void 0,className:X,style:je,dir:a.dir,id:a.id,lang:a.lang,nonce:a.nonce,title:a.title,role:a.role,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],...ve},oe.createElement(l.Months,{className:m[me.Months],style:k?.[me.Months]},!a.hideNavigation&&!x&&oe.createElement(l.Nav,{"data-animated-nav":a.animate?"true":void 0,className:m[me.Nav],style:k?.[me.Nav],"aria-label":It(),onPreviousClick:pt,onNextClick:Xt,previousMonth:pe,nextMonth:xe}),P.map((he,ke)=>oe.createElement(l.Month,{"data-animated-month":a.animate?"true":void 0,className:m[me.Month],style:k?.[me.Month],key:ke,displayIndex:ke,calendarMonth:he},x==="around"&&!a.hideNavigation&&ke===0&&oe.createElement(l.PreviousMonthButton,{type:"button",className:m[me.PreviousMonthButton],tabIndex:pe?void 0:-1,"aria-disabled":pe?void 0:!0,"aria-label":Qt(pe),onClick:pt,"data-animated-button":a.animate?"true":void 0},oe.createElement(l.Chevron,{disabled:pe?void 0:!0,className:m[me.Chevron],orientation:a.dir==="rtl"?"right":"left"})),oe.createElement(l.MonthCaption,{"data-animated-caption":a.animate?"true":void 0,className:m[me.MonthCaption],style:k?.[me.MonthCaption],calendarMonth:he,displayIndex:ke},y?.startsWith("dropdown")?oe.createElement(l.DropdownNav,{className:m[me.Dropdowns],style:k?.[me.Dropdowns]},(()=>{const Se=y==="dropdown"||y==="dropdown-months"?oe.createElement(l.MonthsDropdown,{key:"month",className:m[me.MonthsDropdown],"aria-label":ot(),classNames:m,components:l,disabled:!!a.disableNavigation,onChange:No(he.date),options:cM(he.date,V,ae,c,h),style:k?.[me.Dropdown],value:h.getMonth(he.date)}):oe.createElement("span",{key:"month"},W(he.date,h)),Oe=y==="dropdown"||y==="dropdown-years"?oe.createElement(l.YearsDropdown,{key:"year",className:m[me.YearsDropdown],"aria-label":$t(h.options),classNames:m,components:l,disabled:!!a.disableNavigation,onChange:Qn(he.date),options:fM(V,ae,c,h,!!a.reverseYears),style:k?.[me.Dropdown],value:h.getYear(he.date)}):oe.createElement("span",{key:"year"},ge(he.date,h));return h.getMonthYearOrder()==="year-first"?[Oe,Se]:[Se,Oe]})(),oe.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},z(he.date,h.options,h))):oe.createElement(l.CaptionLabel,{className:m[me.CaptionLabel],role:"status","aria-live":"polite"},z(he.date,h.options,h))),x==="around"&&!a.hideNavigation&&ke===v-1&&oe.createElement(l.NextMonthButton,{type:"button",className:m[me.NextMonthButton],tabIndex:xe?void 0:-1,"aria-disabled":xe?void 0:!0,"aria-label":Yn(xe),onClick:Xt,"data-animated-button":a.animate?"true":void 0},oe.createElement(l.Chevron,{disabled:xe?void 0:!0,className:m[me.Chevron],orientation:a.dir==="rtl"?"left":"right"})),ke===v-1&&x==="after"&&!a.hideNavigation&&oe.createElement(l.Nav,{"data-animated-nav":a.animate?"true":void 0,className:m[me.Nav],style:k?.[me.Nav],"aria-label":It(),onPreviousClick:pt,onNextClick:Xt,previousMonth:pe,nextMonth:xe}),oe.createElement(l.MonthGrid,{role:"grid","aria-multiselectable":C==="multiple"||C==="range","aria-label":Ve(he.date,h.options,h)||void 0,className:m[me.MonthGrid],style:k?.[me.MonthGrid]},!a.hideWeekdays&&oe.createElement(l.Weekdays,{"data-animated-weekdays":a.animate?"true":void 0,className:m[me.Weekdays],style:k?.[me.Weekdays]},E&&oe.createElement(l.WeekNumberHeader,{"aria-label":En(h.options),className:m[me.WeekNumberHeader],style:k?.[me.WeekNumberHeader],scope:"col"},ne()),Sa.map(Se=>oe.createElement(l.Weekday,{"aria-label":De(Se,h.options,h),className:m[me.Weekday],key:String(Se),style:k?.[me.Weekday],scope:"col"},J(Se,h.options,h)))),oe.createElement(l.Weeks,{"data-animated-weeks":a.animate?"true":void 0,className:m[me.Weeks],style:k?.[me.Weeks]},he.weeks.map(Se=>oe.createElement(l.Week,{className:m[me.Week],key:Se.weekNumber,style:k?.[me.Week],week:Se},E&&oe.createElement(l.WeekNumber,{week:Se,style:k?.[me.WeekNumber],"aria-label":Wt(Se.weekNumber,{locale:p}),className:m[me.WeekNumber],scope:"row",role:"rowheader"},ee(Se.weekNumber,h)),Se.days.map(Oe=>{const{date:tt}=Oe,Ne=Z(Oe);if(Ne[rt.focused]=!Ne.hidden&&!!se?.isEqualTo(Oe),Ne[Tn.selected]=G?.(tt)||Ne.selected,_r(re)){const{from:Zt,to:wn}=re;Ne[Tn.range_start]=!!(Zt&&wn&&h.isSameDay(tt,Zt)),Ne[Tn.range_end]=!!(Zt&&wn&&h.isSameDay(tt,wn)),Ne[Tn.range_middle]=xa(re,tt,!0,h)}const _t=uM(Ne,k,a.modifiersStyles),Wn=YT(Ne,m,a.modifiersClassNames),Nt=!Fn&&!Ne.hidden?Ct(tt,Ne,h.options,h):void 0;return oe.createElement(l.Day,{key:`${Oe.isoDate}_${Oe.displayMonthId}`,day:Oe,modifiers:Ne,className:Wn.join(" "),style:_t,role:"gridcell","aria-selected":Ne.selected||void 0,"aria-label":Nt,"data-day":Oe.isoDate,"data-month":Oe.outside?Oe.dateMonthId:void 0,"data-selected":Ne.selected||void 0,"data-disabled":Ne.disabled||void 0,"data-hidden":Ne.hidden||void 0,"data-outside":Oe.outside||void 0,"data-focused":Ne.focused||void 0,"data-today":Ne.today||void 0},!Ne.hidden&&Fn?oe.createElement(l.DayButton,{className:m[me.DayButton],style:k?.[me.DayButton],type:"button",day:Oe,modifiers:Ne,disabled:!Ne.focused&&Ne.disabled||void 0,"aria-disabled":Ne.focused&&Ne.disabled||void 0,tabIndex:be(Oe)?0:-1,"aria-label":St(tt,Ne,h.options,h),onClick:Vn(Oe,Ne),onBlur:On(Oe,Ne),onFocus:ei(Oe,Ne),onKeyDown:Pn(Oe,Ne),onMouseEnter:Di(Oe,Ne),onMouseLeave:wo(Oe,Ne)},Q(tt,h.options,h)):!Ne.hidden&&Q(Oe.date,h.options,h))})))))))),a.footer&&oe.createElement(l.Footer,{className:m[me.Footer],style:k?.[me.Footer],role:"status","aria-live":"polite"},a.footer)))}function zM({className:n,classNames:a,showOutsideDays:s=!0,...l}){return r.jsx(_M,{showOutsideDays:s,className:B("p-2",n),classNames:{root:"relative",months:"flex flex-col sm:flex-row gap-2 sm:gap-4",month:"flex flex-col gap-2",month_caption:"flex justify-center pt-1 relative items-center h-8",caption_label:"text-sm font-medium",nav:"absolute inset-x-0 top-2 flex items-center justify-between px-1 z-10",button_previous:B(ir({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-70 hover:opacity-100 hover:bg-accent rounded-md"),button_next:B(ir({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-70 hover:opacity-100 hover:bg-accent rounded-md"),month_grid:"w-full border-collapse",weekdays:"flex w-full",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",weeks:"flex flex-col",week:"flex w-full",day:B("relative h-8 w-8 p-0 text-center text-xs font-normal focus-within:relative focus-within:z-20","hover:bg-accent hover:text-accent-foreground rounded-full select-none"),day_button:B(ir({variant:"ghost"}),"h-8 w-8 p-0 font-normal rounded-full text-xs","aria-selected:opacity-100"),range_start:B("aria-selected:bg-primary aria-selected:text-primary-foreground","aria-selected:rounded-l-full aria-selected:rounded-r-none","aria-selected:hover:bg-primary aria-selected:hover:text-primary-foreground"),range_end:B("aria-selected:bg-primary aria-selected:text-primary-foreground","aria-selected:rounded-r-full aria-selected:rounded-l-none","aria-selected:hover:bg-primary aria-selected:hover:text-primary-foreground"),range_middle:B("aria-selected:bg-accent aria-selected:text-accent-foreground","aria-selected:rounded-none"),selected:B("bg-primary text-primary-foreground rounded-full","hover:bg-primary hover:text-primary-foreground","focus:bg-primary focus:text-primary-foreground"),today:"bg-accent text-accent-foreground rounded-full",outside:"text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",disabled:"text-muted-foreground opacity-50",hidden:"invisible",...a},components:{Chevron:({orientation:c,className:f,...h})=>{const p=c==="left"?oC:c==="right"?xr:c==="up"?Od:zs;return r.jsx(p,{className:B("h-4 w-4",f),...h})}},...l})}zM.displayName="Calendar";const IM=S.lazy(()=>ht(()=>Promise.resolve().then(()=>hf),void 0).then(n=>({default:n.CodeEditor})));function rE({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:s,rawSettingsEnv:l,onChange:c,missingRequiredFields:f=[]}){const h=f.length>0;return r.jsx(S.Suspense,{fallback:r.jsxs("div",{className:"flex items-center justify-center h-full",children:[r.jsx(jn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),r.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),children:r.jsxs("div",{className:"h-full flex flex-col",children:[!a&&s!==null&&r.jsxs("div",{className:"mb-2 px-3 py-2 bg-destructive/10 text-destructive text-sm rounded-md flex items-center gap-2 mx-6 mt-4 shrink-0",children:[r.jsx(vo,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&h&&r.jsxs("div",{className:"mb-2 px-3 py-2 bg-warning/10 text-warning-foreground text-sm rounded-md flex items-start gap-2 mx-6 mt-4 shrink-0 border border-warning/20",children:[r.jsx(qn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:f.join(", ")}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"These fields will use default values at runtime."})]})]}),r.jsx("div",{className:"flex-1 overflow-hidden px-6 pb-4 pt-4",children:r.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:r.jsx(IM,{value:n,onChange:c,language:"json",minHeight:"100%"})})}),r.jsx("div",{className:"mx-6 mb-4",children:r.jsx("div",{className:"border rounded-md overflow-hidden",children:r.jsx(df,{profileEnv:l})})})]})})}const cE={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},uE=[{id:"droid-target-support",title:"Factory Droid support is live",summary:"API Profiles and CLIProxy variants now support Droid as a first-class execution target.",primaryAction:"Set Droid as your default execution target for non-Claude workflows.",publishedAt:"2026-02-25",status:"new",scopes:["target","api-profiles","cliproxy"],entryIds:["droid-target","custom-api-profiles","codex-cliproxy","agy-cliproxy"],highlights:["Set default target to Droid when creating or editing API Profiles.","Set default target to Droid for CLIProxy variants, including Codex and Antigravity flows.","Use ccsd alias or --target droid for one-off target overrides."],actions:[{id:"open-api-profiles",label:"Set default target in API Profiles",description:"Open API Profiles and set Default Target to Droid for profiles you run often.",type:"route",path:"/providers"},{id:"open-cliproxy",label:"Set default target in CLIProxy variants",description:"Open CLIProxy variants and set target to Droid for Codex/Antigravity or custom variants.",type:"route",path:"/cliproxy"},{id:"copy-ccsd-command",label:"Run once with Droid alias",description:"Use ccsd to force Droid target with your current profile.",type:"command",command:"ccsd glm"},{id:"copy-target-override",label:"Run once with --target override",description:"Keep your default profile but force Droid for a single command.",type:"command",command:'ccs codex --target droid "your prompt"'}],routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccsd glm",'ccs codex --target droid "your prompt"',"ccs cliproxy create mycodex --provider codex --target droid"]},{id:"updates-center-launch",title:"Updates inbox is available for rollout tasks",summary:"A focused updates inbox exists for setup tasks and rollout guidance when you need it.",primaryAction:"Use this page only when needed for rollout tasks, then return to your normal workflow.",publishedAt:"2026-02-25",status:"new",scopes:["target","cliproxy","api-profiles","websearch"],entryIds:["droid-target","codex-cliproxy","custom-api-profiles","opencode-websearch"],highlights:["Single data source powers update content and integration mapping.","Notices can be tracked as new, seen, done, or dismissed.","Catalog covers target CLI, CLIProxy providers, and WebSearch integrations."],actions:[{id:"open-updates-page",label:"Open updates inbox when needed",description:"Review rollout tasks only when you want guided setup changes.",type:"route",path:"/updates"},{id:"copy-open-dashboard",label:"Open dashboard from terminal",description:"Re-open config dashboard anytime from CLI.",type:"command",command:"ccs config"}],routes:[{label:"Updates Inbox",path:"/updates"}],commands:["ccs config"]}],UM=[{id:"claude-target",name:"Claude Code",scope:"target",status:"stable",summary:"Default runtime target for all CCS profile types.",pillars:{baseUrl:"From profile settings (ANTHROPIC_BASE_URL)",auth:"From profile settings (ANTHROPIC_AUTH_TOKEN)",model:"From profile settings (ANTHROPIC_MODEL)"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs",'ccs glm "your prompt"']},{id:"droid-target",name:"Factory Droid",scope:"target",status:"new",summary:"First-class target for API Profiles and CLIProxy variants.",pillars:{baseUrl:"From profile or variant settings",auth:"From profile or variant settings",model:"From profile or variant settings"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccsd glm","ccs km --target droid","ccs codex --target droid"],notes:"Use ccsd alias for automatic Droid target selection."},{id:"codex-cliproxy",name:"Codex via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed provider with configurable variant model and target.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs codex","ccs cliproxy create mycodex --provider codex"]},{id:"gemini-cliproxy",name:"Gemini via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Gemini provider with multi-account management.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs gemini","ccs cliproxy create mygem --provider gemini"]},{id:"agy-cliproxy",name:"Antigravity via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Antigravity provider with variant target controls.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs agy","ccs cliproxy create myagy --provider agy --target droid"]},{id:"custom-api-profiles",name:"Custom API Profiles",scope:"api-profiles",status:"stable",summary:"Any Anthropic-compatible endpoint with per-profile target and model mapping.",pillars:{baseUrl:"User-defined endpoint",auth:"User-defined token/key",model:"User-defined model identifier"},routes:[{label:"API Profiles",path:"/providers"}],commands:["ccs api create myprofile",'ccs myprofile "your prompt"']},{id:"opencode-websearch",name:"OpenCode WebSearch",scope:"websearch",status:"stable",summary:"WebSearch provider surfaced in Settings for third-party profile workflows.",pillars:{baseUrl:"Managed by OpenCode CLI integration",auth:"Provider-specific (managed externally)",model:"Configurable in WebSearch settings"},routes:[{label:"Settings",path:"/settings"}],commands:["ccs config",'ccs codex "your prompt"'],notes:"Enable OpenCode in Settings > WebSearch to activate fallback search."}],HM=new Map(UM.map(n=>[n.id,n]));function dE(n){return n.entryIds.map(a=>HM.get(a)).filter(a=>!!a)}function fE(n){const a=new Date(`${n}T00:00:00Z`);return Number.isNaN(a.getTime())?n:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}).format(a)}function BM(){const{t:n}=Lt(),[a,s]=S.useState(""),[l,c]=S.useState(""),[f,h]=S.useState(null),[p,m]=S.useState(!1),{login:y,authRequired:C,isAuthenticated:x}=Id(),v=jd(),w=yr().state?.from?.pathname||"/";if(S.useEffect(()=>{(x||!C)&&v(w,{replace:!0})},[x,C,v,w]),x||!C)return null;const T=async O=>{O.preventDefault(),h(null),m(!0);try{await y(a,l),v(w,{replace:!0})}catch(M){h(M instanceof Error?M.message:n("auth.loginFailed"))}finally{m(!1)}};return r.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:r.jsxs(zD,{className:"w-full max-w-sm",children:[r.jsxs(ID,{className:"space-y-1 text-center",children:[r.jsx("div",{className:"mx-auto mb-2 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:r.jsx(sC,{className:"h-6 w-6 text-primary"})}),r.jsx(UD,{className:"text-2xl",children:n("auth.dashboardTitle")}),r.jsx(HD,{children:n("auth.loginDescription")})]}),r.jsx(BD,{children:r.jsxs("form",{onSubmit:T,className:"space-y-4",children:[f&&r.jsxs(lf,{variant:"destructive",children:[r.jsx(Cr,{className:"h-4 w-4"}),r.jsx(rf,{children:f})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(rn,{htmlFor:"username",children:n("auth.username")}),r.jsx(In,{id:"username",type:"text",value:a,onChange:O=>s(O.target.value),placeholder:n("auth.usernamePlaceholder"),autoComplete:"username",disabled:p,required:!0})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(rn,{htmlFor:"password",children:n("auth.password")}),r.jsx(In,{id:"password",type:"password",value:l,onChange:O=>c(O.target.value),placeholder:n("auth.passwordPlaceholder"),autoComplete:"current-password",disabled:p,required:!0})]}),r.jsx(ct,{type:"submit",className:"w-full",disabled:p,children:p?r.jsxs(r.Fragment,{children:[r.jsx(jn,{className:"mr-2 h-4 w-4 animate-spin"}),n("auth.signingIn")]}):n("auth.signIn")})]})})]})})}const KM=S.lazy(()=>ht(()=>import("./index-DGQhzUIq.js"),__vite__mapDeps([18,1,2,4,5,7,19,6,8,9])).then(n=>({default:n.AnalyticsPage}))),qM=S.lazy(()=>ht(()=>import("./api-D_GvXEjg.js"),__vite__mapDeps([20,1,2,5,21,15,6,4,22,7,8,9])).then(n=>({default:n.ApiPage}))),GM=S.lazy(()=>ht(()=>import("./cliproxy-DGsWe0cf.js"),__vite__mapDeps([23,1,2,5,13,6,4,14,15,24,21,22,25,3,7,8,9])).then(n=>({default:n.CliproxyPage}))),YM=S.lazy(()=>ht(()=>import("./cliproxy-control-panel-BoKpt64d.js"),__vite__mapDeps([26,1,2,5,13,4,6,7,8,9])).then(n=>({default:n.CliproxyControlPanelPage}))),FM=S.lazy(()=>ht(()=>import("./copilot-DCkXk9mK.js"),__vite__mapDeps([27,1,2,5,21,15,4,22,25,3,6,7,8,9])).then(n=>({default:n.CopilotPage}))),VM=S.lazy(()=>ht(()=>import("./cursor-9aQfYlGU.js"),__vite__mapDeps([28,1,2,6,5,13,3,22,25,4,7,8,9])).then(n=>({default:n.CursorPage}))),QM=S.lazy(()=>ht(()=>import("./claude-extension-vRIHOe5q.js"),__vite__mapDeps([29,1,2,5,6,4,7,8,9])).then(n=>({default:n.ClaudeExtensionPage}))),WM=S.lazy(()=>ht(()=>import("./droid-Bzp6uHqU.js"),__vite__mapDeps([30,1,2,6,5,4,22,7,8,9])).then(n=>({default:n.DroidPage}))),$M=S.lazy(()=>ht(()=>import("./accounts-CxIwtPW5.js"),__vite__mapDeps([31,1,2,5,15,6,4,24,7,8,9])).then(n=>({default:n.AccountsPage}))),XM=S.lazy(()=>ht(()=>Promise.resolve().then(()=>lT),void 0).then(n=>({default:n.SettingsPage}))),ZM=S.lazy(()=>ht(()=>import("./health-DLIgkfxF.js"),__vite__mapDeps([32,1,2,5,6,4,7,8,9])).then(n=>({default:n.HealthPage}))),JM=S.lazy(()=>ht(()=>import("./shared-qRzQxB-N.js"),__vite__mapDeps([33,1,2,4,5,6,7,8,9])).then(n=>({default:n.SharedPage}))),ej=S.lazy(()=>ht(()=>import("./updates-BQvHbU9s.js"),__vite__mapDeps([34,1,2,4,5,6,7,8,9])).then(n=>({default:n.UpdatesPage})));function ln(){return r.jsx("div",{className:"flex h-64 items-center justify-center",children:r.jsx(jn,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}function tj(){return r.jsx(AS,{client:ew,children:r.jsx(Qw,{defaultTheme:"system",storageKey:"vite-ui-theme",children:r.jsx(Ww,{children:r.jsx(eN,{children:r.jsxs(CS,{children:[r.jsxs(wS,{children:[r.jsx(Pt,{path:"/login",element:r.jsx(BM,{})}),r.jsx(Pt,{element:r.jsx(tN,{}),children:r.jsxs(Pt,{element:r.jsx(t1,{}),children:[r.jsx(Pt,{path:"/",element:r.jsx(Jk,{})}),r.jsx(Pt,{path:"/analytics",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(KM,{})})}),r.jsx(Pt,{path:"/updates",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(ej,{})})}),r.jsx(Pt,{path:"/providers",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(qM,{})})}),r.jsx(Pt,{path:"/cliproxy",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(GM,{})})}),r.jsx(Pt,{path:"/cliproxy/control-panel",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(YM,{})})}),r.jsx(Pt,{path:"/copilot",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(FM,{})})}),r.jsx(Pt,{path:"/cursor",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(VM,{})})}),r.jsx(Pt,{path:"/claude-extension",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(QM,{})})}),r.jsx(Pt,{path:"/droid",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(WM,{})})}),r.jsx(Pt,{path:"/accounts",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx($M,{})})}),r.jsx(Pt,{path:"/settings",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(XM,{})})}),r.jsx(Pt,{path:"/health",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(ZM,{})})}),r.jsx(Pt,{path:"/shared",element:r.jsx(S.Suspense,{fallback:r.jsx(ln,{}),children:r.jsx(JM,{})})})]})})]}),r.jsx(kS,{position:"top-right"})]})})})})})}const Mb=document.getElementById("root");if(!Mb)throw new Error("Root element not found. Failed to mount React application.");XC.createRoot(Mb).render(r.jsx(S.StrictMode,{children:r.jsx(tj,{})}));export{Qj as $,iD as A,ga as B,zD as C,uD as D,Kj as E,Gj as F,tD as G,rD as H,In as I,dD as J,qj as K,rn as L,aA as M,iA as N,oA as O,dx as P,Zx as Q,cf as R,Ge as S,$a as T,mr as U,kd as V,He as W,Vj as X,Be as Y,Fj as Z,HD as _,Lt as a,fj as a$,Wj as a0,$j as a1,Xj as a2,Zj as a3,Jj as a4,eE as a5,tb as a6,tE as a7,dj as a8,JN as a9,jr as aA,mx as aB,Ci as aC,BA as aD,KA as aE,qA as aF,GA as aG,px as aH,O1 as aI,kx as aJ,Aj as aK,kj as aL,Dj as aM,Tj as aN,lE as aO,pj as aP,nA as aQ,yj as aR,xj as aS,eA as aT,tA as aU,bj as aV,vj as aW,Sj as aX,gj as aY,Xd as aZ,ws as a_,mj as aa,Cj as ab,wj as ac,qd as ad,Gd as ae,Yd as af,Fd as ag,Vd as ah,nE as ai,qD as aj,aE as ak,Ja as al,_j as am,GD as an,Ij as ao,Nj as ap,zj as aq,Uj as ar,qg as as,wA as at,vD as au,M1 as av,SN as aw,CN as ax,Mr as ay,Tr as az,BD as b,hj as b0,lf as b1,Qx as b2,rf as b3,rE as b4,sb as b5,of as b6,Rs as b7,sf as b8,$k as b9,Hj as ba,Bj as bb,fE as bc,cE as bd,uE as be,dE as bf,rb as bg,nT as bh,iT as bi,Oj as bj,Mj as bk,ix as bl,Pw as bm,Ew as bn,xd as bo,Ni as bp,ww as bq,Aw as br,Mw as bs,Lw as bt,Pj as bu,jj as bv,Ej as bw,Lj as bx,Rj as by,ir as bz,B as c,ct as d,iE as e,oE as f,YD as g,zM as h,uj as i,ID as j,UD as k,y1 as l,x1 as m,So as n,sE as o,Xa as p,Za as q,Sx as r,Zd as s,Cx as t,_d as u,Jd as v,fr as w,ny as x,pD as y,Yj as z};