@kaitranntt/ccs 7.69.1-dev.1 → 7.69.1-dev.3

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 (53) hide show
  1. package/dist/ui/assets/accounts-DN0lP-yj.js +1 -0
  2. package/dist/ui/assets/{alert-dialog-QyEXocpn.js → alert-dialog-BA39vaYL.js} +1 -1
  3. package/dist/ui/assets/api-D2cjf1H4.js +4 -0
  4. package/dist/ui/assets/{auth-section-BszF77uT.js → auth-section-BNX8_9MJ.js} +1 -1
  5. package/dist/ui/assets/{backups-section-D6RgaOx1.js → backups-section-Bt0FA5zl.js} +1 -1
  6. package/dist/ui/assets/channels-FaDUjf3Y.js +1 -0
  7. package/dist/ui/assets/{checkbox-Dzwkj_Pg.js → checkbox-DHF-UBrH.js} +1 -1
  8. package/dist/ui/assets/claude-extension-D-skBToQ.js +1 -0
  9. package/dist/ui/assets/cliproxy-CD7z-_q8.js +3 -0
  10. package/dist/ui/assets/cliproxy-ai-providers-QSOOqh8F.js +15 -0
  11. package/dist/ui/assets/cliproxy-control-panel-D9dLU28p.js +1 -0
  12. package/dist/ui/assets/codex-CHO5_hku.js +27 -0
  13. package/dist/ui/assets/confirm-dialog-BICDz_zm.js +1 -0
  14. package/dist/ui/assets/copilot-BnQrRCuJ.js +3 -0
  15. package/dist/ui/assets/{cursor-BrcDgu6X.js → cursor-CXopLKfC.js} +1 -1
  16. package/dist/ui/assets/droid-CLFg9ELE.js +2 -0
  17. package/dist/ui/assets/{globalenv-section-DoX37DqB.js → globalenv-section-NPjCcYBN.js} +1 -1
  18. package/dist/ui/assets/{health-D_gdcxnc.js → health-B_3JpCrY.js} +1 -1
  19. package/dist/ui/assets/index-B5Egq7qY.js +1 -0
  20. package/dist/ui/assets/index-BY2j-o67.js +1 -0
  21. package/dist/ui/assets/{index-CTGpqIx6.js → index-BcUkpsGj.js} +1 -1
  22. package/dist/ui/assets/{index-DoVPk3vW.js → index-BgGHTjTd.js} +1 -1
  23. package/dist/ui/assets/index-DNmWbKbN.js +72 -0
  24. package/dist/ui/assets/index-DZddoGfE.js +1 -0
  25. package/dist/ui/assets/logs-Bb1OVYeK.js +1 -0
  26. package/dist/ui/assets/{masked-input-C2H-Ax0Z.js → masked-input-b4-lEKNq.js} +1 -1
  27. package/dist/ui/assets/proxy-status-widget-s89zaj3X.js +1 -0
  28. package/dist/ui/assets/{raw-json-settings-editor-panel-WxTn7-hS.js → raw-json-settings-editor-panel-Dr_BNQwQ.js} +1 -1
  29. package/dist/ui/assets/{searchable-select-1zOULoec.js → searchable-select-FJPe_YWv.js} +1 -1
  30. package/dist/ui/assets/{separator-BCfZ54mZ.js → separator-DJ0ku_ak.js} +1 -1
  31. package/dist/ui/assets/{shared-DlTbnc9n.js → shared-DyQlJnbj.js} +1 -1
  32. package/dist/ui/assets/{table-Bx2cnkWN.js → table-6Yg65ZZH.js} +1 -1
  33. package/dist/ui/assets/{updates-SiZKOnUD.js → updates-DSCXb6Au.js} +1 -1
  34. package/dist/ui/index.html +1 -1
  35. package/lib/mcp/ccs-browser-server.cjs +119 -27
  36. package/package.json +1 -1
  37. package/dist/ui/assets/accounts-D9eEaNx9.js +0 -1
  38. package/dist/ui/assets/api-7vQe0xOg.js +0 -4
  39. package/dist/ui/assets/channels-B1vgnNJX.js +0 -1
  40. package/dist/ui/assets/claude-extension-CKO4bJ22.js +0 -1
  41. package/dist/ui/assets/cliproxy-ai-providers-CmbFYVoR.js +0 -15
  42. package/dist/ui/assets/cliproxy-control-panel-M8ZfUq3C.js +0 -1
  43. package/dist/ui/assets/cliproxy-kHd-oC5W.js +0 -3
  44. package/dist/ui/assets/codex-BJ0RdMuh.js +0 -27
  45. package/dist/ui/assets/confirm-dialog-BlSaX2gK.js +0 -1
  46. package/dist/ui/assets/copilot-NJKZQXQ_.js +0 -3
  47. package/dist/ui/assets/droid-B9u9ZB-a.js +0 -2
  48. package/dist/ui/assets/index-BNU4Hhe_.js +0 -1
  49. package/dist/ui/assets/index-DFEMq3KP.js +0 -1
  50. package/dist/ui/assets/index-DOn6k1jF.js +0 -72
  51. package/dist/ui/assets/index-h08p9xL5.js +0 -1
  52. package/dist/ui/assets/logs-DtH4YMt4.js +0 -1
  53. package/dist/ui/assets/proxy-status-widget-BOrsn86w.js +0 -1
@@ -0,0 +1,72 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B5Egq7qY.js","assets/radix-ui-Zb8sVEtn.js","assets/react-vendor-CNOkPC89.js","assets/masked-input-b4-lEKNq.js","assets/icons-KVCk4_U8.js","assets/tanstack-CrmUhA7Z.js","assets/notifications-B2HqRBj7.js","assets/utils-CzKF5WmX.js","assets/form-utils-Bcoyqxpq.js","assets/code-highlight-BRUf_pqB.js","assets/index-DZddoGfE.js","assets/channels-FaDUjf3Y.js","assets/globalenv-section-NPjCcYBN.js","assets/index-BcUkpsGj.js","assets/index-BgGHTjTd.js","assets/default-ports-1QQSffYX.js","assets/proxy-status-widget-s89zaj3X.js","assets/alert-dialog-BA39vaYL.js","assets/antigravity-responsibility-constants-Bvh4Ybz0.js","assets/auth-section-BNX8_9MJ.js","assets/backups-section-Bt0FA5zl.js","assets/index-BY2j-o67.js","assets/charts-BBPXh0Ar.js","assets/api-D2cjf1H4.js","assets/confirm-dialog-BICDz_zm.js","assets/cliproxy-CD7z-_q8.js","assets/checkbox-DHF-UBrH.js","assets/separator-DJ0ku_ak.js","assets/searchable-select-FJPe_YWv.js","assets/cliproxy-ai-providers-QSOOqh8F.js","assets/cliproxy-control-panel-D9dLU28p.js","assets/copilot-BnQrRCuJ.js","assets/cursor-CXopLKfC.js","assets/claude-extension-D-skBToQ.js","assets/codex-CHO5_hku.js","assets/table-6Yg65ZZH.js","assets/raw-json-settings-editor-panel-Dr_BNQwQ.js","assets/droid-CLFg9ELE.js","assets/logs-Bb1OVYeK.js","assets/accounts-DN0lP-yj.js","assets/health-B_3JpCrY.js","assets/shared-DyQlJnbj.js","assets/updates-DSCXb6Au.js"])))=>i.map(i=>d[i]);
2
+ import{j as l,S as Ml,R as fb,C as pb,a as mb,T as gb,D as yb,P as bb,O as xb,b as H0,c as B0,d as F0,e as q0,f as K0,A as G0,g as V0,h as Y0,i as W0,k as Q0,l as $0,m as X0,n as Z0,I as J0,o as vb,p as eS,q as Cb,r as Sb,s as tS,t as wb,V as nS,L as kb,u as Ab,v as aS,w as iS,x as Nb,y as oS,z as rS,B as Db,E as sS,F as lS,G as Tb,H as cS,J as Pb,K as Mb,M as jb,N as uS,Q as dS,U as hS,W as fS,X as pS,Y as Eb,Z as mS,_ as gS,$ as yS}from"./radix-ui-Zb8sVEtn.js";import{e as Zd,f as bS,r as S,u as jl,O as Ed,N as xS,h as Jd,L as Cl,R as vS,g as Lb,d as Ig,i as CS,c as ce,B as SS,j as wS,k as At}from"./react-vendor-CNOkPC89.js";import{Q as kS,u as Nt,a as lt,b as st,c as AS,d as NS}from"./tanstack-CrmUhA7Z.js";import{t as le,T as DS}from"./notifications-B2HqRBj7.js";import{L as An,X as No,P as TS,C as El,H as PS,a as MS,K as Ld,G as jS,Z as Rb,b as Ob,F as Ib,U as _b,c as ES,S as LS,A as zr,d as Ub,e as RS,f as zb,M as Hb,E as Vr,g as Yr,B as OS,R as Hr,W as IS,h as _S,i as US,j as zS,k as _g,l as Ug,m as wo,n as eh,o as Sl,p as Bb,q as Fb,r as HS,s as Ll,t as th,u as qb,v as ko,T as Gn,w as Br,x as Wr,y as zg,z as BS,D as Kb,I as nh,J as FS,N as Rl,O as qS,Q as KS,V as GS,Y as VS,_ as Ol,$ as YS,a0 as WS,a1 as Gb,a2 as QS,a3 as $S,a4 as XS,a5 as ZS,a6 as JS,a7 as ah,a8 as Vb,a9 as Hg,aa as ew,ab as tw,ac as nw,ad as aw,ae as iw,af as Bg,ag as ow,ah as dl,ai as Fg,aj as qg,ak as rw}from"./icons-KVCk4_U8.js";import{t as sw,c as lw,a as Il,e as wr,f as Dr,b as cw,d as uw,g as dw,h as hw,i as fw,j as pw,k as mw,l as gw,m as yw,n as bw,o as xw,p as vw,q as Cw,r as Sw,s as ww,u as kw,v as Aw,w as Nw,x as Dw,y as Tw,z as Pw,A as Mw,B as jw,C as Ew,D as Lw,E as Rw,F as Ow,G as Iw,H as _w,I as Uw,J as zw}from"./utils-CzKF5WmX.js";import{o as Kg,s as Gg,p as Hw,a as Bw,$ as Fw,b as Yb,c as Za,d as qw,_ as Kw,u as Gw,e as Vg}from"./form-utils-Bcoyqxpq.js";import{H as Vw,t as Yg}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"]'))r(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function o(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(c){if(c.ep)return;c.ep=!0;const d=o(c);fetch(c.href,d)}})();var ld={exports:{}},kr={},cd={exports:{}},ud={};var Wg;function Yw(){return Wg||(Wg=1,(function(n){function a(U,Z){var ne=U.length;U.push(Z);e:for(;0<ne;){var W=ne-1>>>1,oe=U[W];if(0<c(oe,Z))U[W]=Z,U[ne]=oe,ne=W;else break e}}function o(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var Z=U[0],ne=U.pop();if(ne!==Z){U[0]=ne;e:for(var W=0,oe=U.length,ue=oe>>>1;W<ue;){var pe=2*(W+1)-1,X=U[pe],ae=pe+1,de=U[ae];if(0>c(X,ne))ae<oe&&0>c(de,X)?(U[W]=de,U[ae]=ne,W=ae):(U[W]=X,U[pe]=ne,W=pe);else if(ae<oe&&0>c(de,ne))U[W]=de,U[ae]=ne,W=ae;else break e}}return Z}function c(U,Z){var ne=U.sortIndex-Z.sortIndex;return ne!==0?ne:U.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var m=[],g=[],v=1,b=null,C=3,T=!1,k=!1,M=!1,L=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function A(U){for(var Z=o(g);Z!==null;){if(Z.callback===null)r(g);else if(Z.startTime<=U)r(g),Z.sortIndex=Z.expirationTime,a(m,Z);else break;Z=o(g)}}function P(U){if(M=!1,A(U),!k)if(o(m)!==null)k=!0,w||(w=!0,$());else{var Z=o(g);Z!==null&&Se(P,Z.startTime-U)}}var w=!1,O=-1,B=5,_=-1;function K(){return L?!0:!(n.unstable_now()-_<B)}function J(){if(L=!1,w){var U=n.unstable_now();_=U;var Z=!0;try{e:{k=!1,M&&(M=!1,N(O),O=-1),T=!0;var ne=C;try{t:{for(A(U),b=o(m);b!==null&&!(b.expirationTime>U&&K());){var W=b.callback;if(typeof W=="function"){b.callback=null,C=b.priorityLevel;var oe=W(b.expirationTime<=U);if(U=n.unstable_now(),typeof oe=="function"){b.callback=oe,A(U),Z=!0;break t}b===o(m)&&r(m),A(U)}else r(m);b=o(m)}if(b!==null)Z=!0;else{var ue=o(g);ue!==null&&Se(P,ue.startTime-U),Z=!1}}break e}finally{b=null,C=ne,T=!1}Z=void 0}}finally{Z?$():w=!1}}}var $;if(typeof D=="function")$=function(){D(J)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,te=be.port2;be.port1.onmessage=J,$=function(){te.postMessage(null)}}else $=function(){E(J,0)};function Se(U,Z){O=E(function(){U(n.unstable_now())},Z)}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(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(U){switch(C){case 1:case 2:case 3:var Z=3;break;default:Z=C}var ne=C;C=Z;try{return U()}finally{C=ne}},n.unstable_requestPaint=function(){L=!0},n.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ne=C;C=U;try{return Z()}finally{C=ne}},n.unstable_scheduleCallback=function(U,Z,ne){var W=n.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?W+ne:W):ne=W,U){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=ne+oe,U={id:v++,callback:Z,priorityLevel:U,startTime:ne,expirationTime:oe,sortIndex:-1},ne>W?(U.sortIndex=ne,a(g,U),o(m)===null&&U===o(g)&&(M?(N(O),O=-1):M=!0,Se(P,ne-W))):(U.sortIndex=oe,a(m,U),k||T||(k=!0,w||(w=!0,$()))),U},n.unstable_shouldYield=K,n.unstable_wrapCallback=function(U){var Z=C;return function(){var ne=C;C=Z;try{return U.apply(this,arguments)}finally{C=ne}}}})(ud)),ud}var Qg;function Ww(){return Qg||(Qg=1,cd.exports=Yw()),cd.exports}var $g;function Qw(){if($g)return kr;$g=1;var n=Ww(),a=Zd(),o=bS();function r(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 d(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(d(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var i=e,s=t;;){var u=i.return;if(u===null)break;var f=u.alternate;if(f===null){if(s=u.return,s!==null){i=s;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===i)return m(u),e;if(f===s)return m(u),t;f=f.sibling}throw Error(r(188))}if(i.return!==s.return)i=u,s=f;else{for(var y=!1,x=u.child;x;){if(x===i){y=!0,i=u,s=f;break}if(x===s){y=!0,s=u,i=f;break}x=x.sibling}if(!y){for(x=f.child;x;){if(x===i){y=!0,i=f,s=u;break}if(x===s){y=!0,s=f,i=u;break}x=x.sibling}if(!y)throw Error(r(189))}}if(i.alternate!==s)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,C=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),D=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var be=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===be?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case E:return"Profiler";case L:return"StrictMode";case P:return"Suspense";case w:return"SuspenseList";case _:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case D:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case O:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case B:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var Se=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},W=[],oe=-1;function ue(e){return{current:e}}function pe(e){0>oe||(e.current=W[oe],W[oe]=null,oe--)}function X(e,t){oe++,W[oe]=e.current,e.current=t}var ae=ue(null),de=ue(null),ie=ue(null),se=ue(null);function xe(e,t){switch(X(ie,t),X(de,e),X(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?og(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=og(t),e=rg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}pe(ae),X(ae,e)}function Pe(){pe(ae),pe(de),pe(ie)}function ze(e){e.memoizedState!==null&&X(se,e);var t=ae.current,i=rg(t,e.type);t!==i&&(X(de,e),X(ae,i))}function Ze(e){de.current===e&&(pe(ae),pe(de)),se.current===e&&(pe(se),xr._currentValue=ne)}var we,Re;function Ve(e){if(we===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||"",Re=-1<i.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+we+e+Re}var Tt=!1;function Et(e,t){if(!e||Tt)return"";Tt=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(G){var q=G}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(G){q=G}e.call(Q.prototype)}}else{try{throw Error()}catch(G){q=G}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(G){if(G&&q&&typeof G.stack=="string")return[G.stack,q.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),y=f[0],x=f[1];if(y&&x){var j=y.split(`
5
+ `),H=x.split(`
6
+ `);for(u=s=0;s<j.length&&!j[s].includes("DetermineComponentFrameRoot");)s++;for(;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;if(s===j.length||u===H.length)for(s=j.length-1,u=H.length-1;1<=s&&0<=u&&j[s]!==H[u];)u--;for(;1<=s&&0<=u;s--,u--)if(j[s]!==H[u]){if(s!==1||u!==1)do if(s--,u--,0>u||j[s]!==H[u]){var V=`
7
+ `+j[s].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=s&&0<=u);break}}}finally{Tt=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ve(i):""}function Yn(e,t){switch(e.tag){case 26:case 27:case 5:return Ve(e.type);case 16:return Ve("Lazy");case 13:return e.child!==t&&t!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return Et(e.type,!1);case 11:return Et(e.type.render,!1);case 1:return Et(e.type,!0);case 31:return Ve("Activity");default:return""}}function je(e){try{var t="",i=null;do t+=Yn(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
8
+ Error generating stack: `+s.message+`
9
+ `+s.stack}}var Jt=Object.prototype.hasOwnProperty,Ln=n.unstable_scheduleCallback,en=n.unstable_cancelCallback,Da=n.unstable_shouldYield,Wn=n.unstable_requestPaint,bt=n.unstable_now,tn=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,ni=n.unstable_UserBlockingPriority,Rn=n.unstable_NormalPriority,On=n.unstable_LowPriority,ji=n.unstable_IdlePriority,To=n.log,Po=n.unstable_setDisableYieldValue,$n=null,ee=null;function Oe(e){if(typeof To=="function"&&Po(e),ee&&typeof ee.setStrictMode=="function")try{ee.setStrictMode($n,e)}catch{}}var ke=Math.clz32?Math.clz32:ye,Ie=Math.log,ht=Math.LN2;function ye(e){return e>>>=0,e===0?32:31-(Ie(e)/ht|0)|0}var Me=256,Ae=262144,_e=4194304;function ct(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 De(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var u=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var x=s&134217727;return x!==0?(s=x&~f,s!==0?u=ct(s):(y&=x,y!==0?u=ct(y):i||(i=x&~e,i!==0&&(u=ct(i))))):(x=s&~f,x!==0?u=ct(x):y!==0?u=ct(y):i||(i=s&~e,i!==0&&(u=ct(i)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,i=t&-t,f>=i||f===32&&(i&4194048)!==0)?t:u}function Ht(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xn(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 Pt(){var e=_e;return _e<<=1,(_e&62914560)===0&&(_e=4194304),e}function nn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Nn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Mo(e,t,i,s,u,f){var y=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 x=e.entanglements,j=e.expirationTimes,H=e.hiddenUpdates;for(i=y&~i;0<i;){var V=31-ke(i),Q=1<<V;x[V]=0,j[V]=-1;var q=H[V];if(q!==null)for(H[V]=null,V=0;V<q.length;V++){var G=q[V];G!==null&&(G.lane&=-536870913)}i&=~Q}s!==0&&ai(e,s,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~t))}function ai(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ke(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function jo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ke(i),u=1<<s;u&t|e[s]&t&&(e[s]|=t),i&=~u}}function pn(e,t){var i=t&-t;return i=(i&42)!==0?1:Zn(i),(i&(e.suspendedLanes|t))!==0?0:i}function Zn(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 Ei(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Eo(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Pg(e.type))}function Lo(e,t){var i=Z.p;try{return Z.p=e,t()}finally{Z.p=i}}var Ta=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Ta,Kt="__reactProps$"+Ta,Li="__reactContainer$"+Ta,Jl="__reactEvents$"+Ta,Pv="__reactListeners$"+Ta,Mv="__reactHandles$"+Ta,Gh="__reactResources$"+Ta,Ro="__reactMarker$"+Ta;function ec(e){delete e[Lt],delete e[Kt],delete e[Jl],delete e[Pv],delete e[Mv]}function Ri(e){var t=e[Lt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Li]||i[Lt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=fg(e);e!==null;){if(i=e[Lt])return i;e=fg(e)}return t}e=i,i=e.parentNode}return null}function Oi(e){if(e=e[Lt]||e[Li]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oo(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Ii(e){var t=e[Gh];return t||(t=e[Gh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Mt(e){e[Ro]=!0}var Vh=new Set,Yh={};function ii(e,t){_i(e,t),_i(e+"Capture",t)}function _i(e,t){for(Yh[e]=t,e=0;e<t.length;e++)Vh.add(t[e])}var jv=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]*$"),Wh={},Qh={};function Ev(e){return Jt.call(Qh,e)?!0:Jt.call(Wh,e)?!1:jv.test(e)?Qh[e]=!0:(Wh[e]=!0,!1)}function Jr(e,t,i){if(Ev(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function es(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 Jn(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $h(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lv(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){i=""+y,f.call(this,y)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tc(e){if(!e._valueTracker){var t=$h(e)?"checked":"value";e._valueTracker=Lv(e,t,""+e[t])}}function Xh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=$h(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function ts(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 Rv=/[\n"\\]/g;function gn(e){return e.replace(Rv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nc(e,t,i,s,u,f,y,x){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?ac(e,y,mn(t)):i!=null?ac(e,y,mn(i)):s!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+mn(x):e.removeAttribute("name")}function Zh(e,t,i,s,u,f,y,x){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){tc(e);return}i=i!=null?""+mn(i):"",t=t!=null?""+mn(t):i,x||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=x?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),tc(e)}function ac(e,t,i){t==="number"&&ts(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ui(e,t,i,s){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&&s&&(e[i].defaultSelected=!0)}else{for(i=""+mn(i),t=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Jh(e,t,i){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+mn(i):""}function ef(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(r(92));if(Se(s)){if(1<s.length)throw Error(r(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=mn(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),tc(e)}function zi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Ov=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 tf(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||Ov.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function nf(e,t,i){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var u in t)s=t[u],t.hasOwnProperty(u)&&i[u]!==s&&tf(e,u,s)}else for(var f in t)t.hasOwnProperty(f)&&tf(e,f,t[f])}function ic(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 Iv=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"]]),_v=/^[\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 ns(e){return _v.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var oc=null;function rc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hi=null,Bi=null;function af(e){var t=Oi(e);if(t&&(e=t.stateNode)){var i=e[Kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nc(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="'+gn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var u=s[Kt]||null;if(!u)throw Error(r(90));nc(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Xh(s)}break e;case"textarea":Jh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ui(e,!!i.multiple,t,!1)}}}var sc=!1;function of(e,t,i){if(sc)return e(t,i);sc=!0;try{var s=e(t);return s}finally{if(sc=!1,(Hi!==null||Bi!==null)&&(qs(),Hi&&(t=Hi,e=Bi,Bi=Hi=null,af(t),e)))for(t=0;t<e.length;t++)af(e[t])}}function Io(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Kt]||null;if(s===null)return null;i=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,t,typeof i));return i}var ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lc=!1;if(ta)try{var _o={};Object.defineProperty(_o,"passive",{get:function(){lc=!0}}),window.addEventListener("test",_o,_o),window.removeEventListener("test",_o,_o)}catch{lc=!1}var Pa=null,cc=null,as=null;function rf(){if(as)return as;var e,t=cc,i=t.length,s,u="value"in Pa?Pa.value:Pa.textContent,f=u.length;for(e=0;e<i&&t[e]===u[e];e++);var y=i-e;for(s=1;s<=y&&t[i-s]===u[f-s];s++);return as=u.slice(e,1<s?1-s:void 0)}function is(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 os(){return!0}function sf(){return!1}function Gt(e){function t(i,s,u,f,y){this._reactName=i,this._targetInst=u,this.type=s,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(i=e[x],this[x]=i?i(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?os:sf,this.isPropagationStopped=sf,this}return b(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=os)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=os)},persist:function(){},isPersistent:os}),t}var oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=Gt(oi),Uo=b({},oi,{view:0,detail:0}),Uv=Gt(Uo),uc,dc,zo,ss=b({},Uo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fc,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!==zo&&(zo&&e.type==="mousemove"?(uc=e.screenX-zo.screenX,dc=e.screenY-zo.screenY):dc=uc=0,zo=e),uc)},movementY:function(e){return"movementY"in e?e.movementY:dc}}),lf=Gt(ss),zv=b({},ss,{dataTransfer:0}),Hv=Gt(zv),Bv=b({},Uo,{relatedTarget:0}),hc=Gt(Bv),Fv=b({},oi,{animationName:0,elapsedTime:0,pseudoElement:0}),qv=Gt(Fv),Kv=b({},oi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gv=Gt(Kv),Vv=b({},oi,{data:0}),cf=Gt(Vv),Yv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wv={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"},Qv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $v(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qv[e])?!!t[e]:!1}function fc(){return $v}var Xv=b({},Uo,{key:function(e){if(e.key){var t=Yv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fc,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zv=Gt(Xv),Jv=b({},ss,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uf=Gt(Jv),eC=b({},Uo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fc}),tC=Gt(eC),nC=b({},oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),aC=Gt(nC),iC=b({},ss,{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}),oC=Gt(iC),rC=b({},oi,{newState:0,oldState:0}),sC=Gt(rC),lC=[9,13,27,32],pc=ta&&"CompositionEvent"in window,Ho=null;ta&&"documentMode"in document&&(Ho=document.documentMode);var cC=ta&&"TextEvent"in window&&!Ho,df=ta&&(!pc||Ho&&8<Ho&&11>=Ho),hf=" ",ff=!1;function pf(e,t){switch(e){case"keyup":return lC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fi=!1;function uC(e,t){switch(e){case"compositionend":return mf(t);case"keypress":return t.which!==32?null:(ff=!0,hf);case"textInput":return e=t.data,e===hf&&ff?null:e;default:return null}}function dC(e,t){if(Fi)return e==="compositionend"||!pc&&pf(e,t)?(e=rf(),as=cc=Pa=null,Fi=!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 df&&t.locale!=="ko"?null:t.data;default:return null}}var hC={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 gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hC[e.type]:t==="textarea"}function yf(e,t,i,s){Hi?Bi?Bi.push(s):Bi=[s]:Hi=s,t=$s(t,"onChange"),0<t.length&&(i=new rs("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Bo=null,Fo=null;function fC(e){Jm(e,0)}function ls(e){var t=Oo(e);if(Xh(t))return e}function bf(e,t){if(e==="change")return t}var xf=!1;if(ta){var mc;if(ta){var gc="oninput"in document;if(!gc){var vf=document.createElement("div");vf.setAttribute("oninput","return;"),gc=typeof vf.oninput=="function"}mc=gc}else mc=!1;xf=mc&&(!document.documentMode||9<document.documentMode)}function Cf(){Bo&&(Bo.detachEvent("onpropertychange",Sf),Fo=Bo=null)}function Sf(e){if(e.propertyName==="value"&&ls(Fo)){var t=[];yf(t,Fo,e,rc(e)),of(fC,t)}}function pC(e,t,i){e==="focusin"?(Cf(),Bo=t,Fo=i,Bo.attachEvent("onpropertychange",Sf)):e==="focusout"&&Cf()}function mC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ls(Fo)}function gC(e,t){if(e==="click")return ls(t)}function yC(e,t){if(e==="input"||e==="change")return ls(t)}function bC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:bC;function qo(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var u=i[s];if(!Jt.call(t,u)||!an(e[u],t[u]))return!1}return!0}function wf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kf(e,t){var i=wf(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=wf(i)}}function Af(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Af(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ts(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=ts(e.document)}return t}function yc(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 xC=ta&&"documentMode"in document&&11>=document.documentMode,qi=null,bc=null,Ko=null,xc=!1;function Df(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;xc||qi==null||qi!==ts(s)||(s=qi,"selectionStart"in s&&yc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ko&&qo(Ko,s)||(Ko=s,s=$s(bc,"onSelect"),0<s.length&&(t=new rs("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=qi)))}function ri(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ki={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionrun:ri("Transition","TransitionRun"),transitionstart:ri("Transition","TransitionStart"),transitioncancel:ri("Transition","TransitionCancel"),transitionend:ri("Transition","TransitionEnd")},vc={},Tf={};ta&&(Tf=document.createElement("div").style,"AnimationEvent"in window||(delete Ki.animationend.animation,delete Ki.animationiteration.animation,delete Ki.animationstart.animation),"TransitionEvent"in window||delete Ki.transitionend.transition);function si(e){if(vc[e])return vc[e];if(!Ki[e])return e;var t=Ki[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Tf)return vc[e]=t[i];return e}var Pf=si("animationend"),Mf=si("animationiteration"),jf=si("animationstart"),vC=si("transitionrun"),CC=si("transitionstart"),SC=si("transitioncancel"),Ef=si("transitionend"),Lf=new Map,Cc="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(" ");Cc.push("scrollEnd");function Dn(e,t){Lf.set(e,t),ii(t,[e])}var cs=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)},yn=[],Gi=0,Sc=0;function us(){for(var e=Gi,t=Sc=Gi=0;t<e;){var i=yn[t];yn[t++]=null;var s=yn[t];yn[t++]=null;var u=yn[t];yn[t++]=null;var f=yn[t];if(yn[t++]=null,s!==null&&u!==null){var y=s.pending;y===null?u.next=u:(u.next=y.next,y.next=u),s.pending=u}f!==0&&Rf(i,u,f)}}function ds(e,t,i,s){yn[Gi++]=e,yn[Gi++]=t,yn[Gi++]=i,yn[Gi++]=s,Sc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function wc(e,t,i,s){return ds(e,t,i,s),hs(e)}function li(e,t){return ds(e,null,null,t),hs(e)}function Rf(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var u=!1,f=e.return;f!==null;)f.childLanes|=i,s=f.alternate,s!==null&&(s.childLanes|=i),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&t!==null&&(u=31-ke(i),e=f.hiddenUpdates,s=e[u],s===null?e[u]=[t]:s.push(t),t.lane=i|536870912),f):null}function hs(e){if(50<hr)throw hr=0,Eu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Vi={};function wC(e,t,i,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,i,s){return new wC(e,t,i,s)}function kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var i=e.alternate;return i===null?(i=on(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 Of(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 fs(e,t,i,s,u,f){var y=0;if(s=e,typeof e=="function")kc(e)&&(y=1);else if(typeof e=="string")y=T0(e,i,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case _:return e=on(31,i,t,u),e.elementType=_,e.lanes=f,e;case M:return ci(i.children,u,f,t);case L:y=8,u|=24;break;case E:return e=on(12,i,t,u|2),e.elementType=E,e.lanes=f,e;case P:return e=on(13,i,t,u),e.elementType=P,e.lanes=f,e;case w:return e=on(19,i,t,u),e.elementType=w,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:y=10;break e;case N:y=9;break e;case A:y=11;break e;case O:y=14;break e;case B:y=16,s=null;break e}y=29,i=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=on(y,i,t,u),t.elementType=e,t.type=s,t.lanes=f,t}function ci(e,t,i,s){return e=on(7,e,s,t),e.lanes=i,e}function Ac(e,t,i){return e=on(6,e,null,t),e.lanes=i,e}function If(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Nc(e,t,i){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _f=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var i=_f.get(e);return i!==void 0?i:(t={value:e,source:t,stack:je(t)},_f.set(e,t),t)}return{value:e,source:t,stack:je(t)}}var Yi=[],Wi=0,ps=null,Go=0,xn=[],vn=0,Ma=null,In=1,_n="";function aa(e,t){Yi[Wi++]=Go,Yi[Wi++]=ps,ps=e,Go=t}function Uf(e,t,i){xn[vn++]=In,xn[vn++]=_n,xn[vn++]=Ma,Ma=e;var s=In;e=_n;var u=32-ke(s)-1;s&=~(1<<u),i+=1;var f=32-ke(t)+u;if(30<f){var y=u-u%5;f=(s&(1<<y)-1).toString(32),s>>=y,u-=y,In=1<<32-ke(t)+u|i<<u|s,_n=f+e}else In=1<<f|i<<u|s,_n=e}function Dc(e){e.return!==null&&(aa(e,1),Uf(e,1,0))}function Tc(e){for(;e===ps;)ps=Yi[--Wi],Yi[Wi]=null,Go=Yi[--Wi],Yi[Wi]=null;for(;e===Ma;)Ma=xn[--vn],xn[vn]=null,_n=xn[--vn],xn[vn]=null,In=xn[--vn],xn[vn]=null}function zf(e,t){xn[vn++]=In,xn[vn++]=_n,xn[vn++]=Ma,In=t.id,_n=t.overflow,Ma=e}var Rt=null,ut=null,Ge=!1,ja=null,Cn=!1,Pc=Error(r(519));function Ea(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vo(bn(t,e)),Pc}function Hf(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[Lt]=e,t[Kt]=s,i){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(i=0;i<pr.length;i++)Be(pr[i],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),Zh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),ef(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||ag(t.textContent,i)?(s.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),s.onScroll!=null&&Be("scroll",t),s.onScrollEnd!=null&&Be("scrollend",t),s.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||Ea(e,!0)}function Bf(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Rt=Rt.return}}function Qi(e){if(e!==Rt)return!1;if(!Ge)return Bf(e),Ge=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Yu(e.type,e.memoizedProps)),i=!i),i&&ut&&Ea(e),Bf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ut=hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ut=hg(e)}else t===27?(t=ut,Va(e.type)?(e=Zu,Zu=null,ut=e):ut=t):ut=Rt?wn(e.stateNode.nextSibling):null;return!0}function ui(){ut=Rt=null,Ge=!1}function Mc(){var e=ja;return e!==null&&(Qt===null?Qt=e:Qt.push.apply(Qt,e),ja=null),e}function Vo(e){ja===null?ja=[e]:ja.push(e)}var jc=ue(null),di=null,ia=null;function La(e,t,i){X(jc,t._currentValue),t._currentValue=i}function oa(e){e._currentValue=jc.current,pe(jc)}function Ec(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Lc(e,t,i,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var y=u.child;f=f.firstContext;e:for(;f!==null;){var x=f;f=u;for(var j=0;j<t.length;j++)if(x.context===t[j]){f.lanes|=i,x=f.alternate,x!==null&&(x.lanes|=i),Ec(f.return,i,e),s||(y=null);break e}f=x.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=i,f=y.alternate,f!==null&&(f.lanes|=i),Ec(y,i,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function $i(e,t,i,s){e=null;for(var u=t,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var x=u.type;an(u.pendingProps.value,y.value)||(e!==null?e.push(x):e=[x])}}else if(u===se.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(xr):e=[xr])}u=u.return}e!==null&&Lc(t,e,i,s),t.flags|=262144}function ms(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hi(e){di=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return Ff(di,e)}function gs(e,t){return di===null&&hi(e),Ff(e,t)}function Ff(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ia===null){if(e===null)throw Error(r(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return i}var kC=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},AC=n.unstable_scheduleCallback,NC=n.unstable_NormalPriority,Ct={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rc(){return{controller:new kC,data:new Map,refCount:0}}function Yo(e){e.refCount--,e.refCount===0&&AC(NC,function(){e.controller.abort()})}var Wo=null,Oc=0,Xi=0,Zi=null;function DC(e,t){if(Wo===null){var i=Wo=[];Oc=0,Xi=Uu(),Zi={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Oc++,t.then(qf,qf),t}function qf(){if(--Oc===0&&Wo!==null){Zi!==null&&(Zi.status="fulfilled");var e=Wo;Wo=null,Xi=0,Zi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function TC(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var u=0;u<i.length;u++)(0,i[u])(t)},function(u){for(s.status="rejected",s.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),s}var Kf=U.S;U.S=function(e,t){Dm=bt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&DC(e,t),Kf!==null&&Kf(e,t)};var fi=ue(null);function Ic(){var e=fi.current;return e!==null?e:ot.pooledCache}function ys(e,t){t===null?X(fi,fi.current):X(fi,t.pool)}function Gf(){var e=Ic();return e===null?null:{parent:Ct._currentValue,pool:e}}var Ji=Error(r(460)),_c=Error(r(474)),bs=Error(r(542)),xs={then:function(){}};function Vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ea,ea),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qf(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=s}},function(s){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qf(e),e}throw mi=t,Ji}}function pi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(mi=i,Ji):i}}var mi=null;function Wf(){if(mi===null)throw Error(r(459));var e=mi;return mi=null,e}function Qf(e){if(e===Ji||e===bs)throw Error(r(483))}var eo=null,Qo=0;function vs(e){var t=Qo;return Qo+=1,eo===null&&(eo=[]),Yf(eo,e,t)}function $o(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cs(e,t){throw t.$$typeof===C?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $f(e){function t(I,R){if(e){var z=I.deletions;z===null?(I.deletions=[R],I.flags|=16):z.push(R)}}function i(I,R){if(!e)return null;for(;R!==null;)t(I,R),R=R.sibling;return null}function s(I){for(var R=new Map;I!==null;)I.key!==null?R.set(I.key,I):R.set(I.index,I),I=I.sibling;return R}function u(I,R){return I=na(I,R),I.index=0,I.sibling=null,I}function f(I,R,z){return I.index=z,e?(z=I.alternate,z!==null?(z=z.index,z<R?(I.flags|=67108866,R):z):(I.flags|=67108866,R)):(I.flags|=1048576,R)}function y(I){return e&&I.alternate===null&&(I.flags|=67108866),I}function x(I,R,z,Y){return R===null||R.tag!==6?(R=Ac(z,I.mode,Y),R.return=I,R):(R=u(R,z),R.return=I,R)}function j(I,R,z,Y){var Ce=z.type;return Ce===M?V(I,R,z.props.children,Y,z.key):R!==null&&(R.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===B&&pi(Ce)===R.type)?(R=u(R,z.props),$o(R,z),R.return=I,R):(R=fs(z.type,z.key,z.props,null,I.mode,Y),$o(R,z),R.return=I,R)}function H(I,R,z,Y){return R===null||R.tag!==4||R.stateNode.containerInfo!==z.containerInfo||R.stateNode.implementation!==z.implementation?(R=Nc(z,I.mode,Y),R.return=I,R):(R=u(R,z.children||[]),R.return=I,R)}function V(I,R,z,Y,Ce){return R===null||R.tag!==7?(R=ci(z,I.mode,Y,Ce),R.return=I,R):(R=u(R,z),R.return=I,R)}function Q(I,R,z){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Ac(""+R,I.mode,z),R.return=I,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case T:return z=fs(R.type,R.key,R.props,null,I.mode,z),$o(z,R),z.return=I,z;case k:return R=Nc(R,I.mode,z),R.return=I,R;case B:return R=pi(R),Q(I,R,z)}if(Se(R)||$(R))return R=ci(R,I.mode,z,null),R.return=I,R;if(typeof R.then=="function")return Q(I,vs(R),z);if(R.$$typeof===D)return Q(I,gs(I,R),z);Cs(I,R)}return null}function q(I,R,z,Y){var Ce=R!==null?R.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return Ce!==null?null:x(I,R,""+z,Y);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case T:return z.key===Ce?j(I,R,z,Y):null;case k:return z.key===Ce?H(I,R,z,Y):null;case B:return z=pi(z),q(I,R,z,Y)}if(Se(z)||$(z))return Ce!==null?null:V(I,R,z,Y,null);if(typeof z.then=="function")return q(I,R,vs(z),Y);if(z.$$typeof===D)return q(I,R,gs(I,z),Y);Cs(I,z)}return null}function G(I,R,z,Y,Ce){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return I=I.get(z)||null,x(R,I,""+Y,Ce);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case T:return I=I.get(Y.key===null?z:Y.key)||null,j(R,I,Y,Ce);case k:return I=I.get(Y.key===null?z:Y.key)||null,H(R,I,Y,Ce);case B:return Y=pi(Y),G(I,R,z,Y,Ce)}if(Se(Y)||$(Y))return I=I.get(z)||null,V(R,I,Y,Ce,null);if(typeof Y.then=="function")return G(I,R,z,vs(Y),Ce);if(Y.$$typeof===D)return G(I,R,z,gs(R,Y),Ce);Cs(R,Y)}return null}function he(I,R,z,Y){for(var Ce=null,We=null,ge=R,Le=R=0,Ke=null;ge!==null&&Le<z.length;Le++){ge.index>Le?(Ke=ge,ge=null):Ke=ge.sibling;var Qe=q(I,ge,z[Le],Y);if(Qe===null){ge===null&&(ge=Ke);break}e&&ge&&Qe.alternate===null&&t(I,ge),R=f(Qe,R,Le),We===null?Ce=Qe:We.sibling=Qe,We=Qe,ge=Ke}if(Le===z.length)return i(I,ge),Ge&&aa(I,Le),Ce;if(ge===null){for(;Le<z.length;Le++)ge=Q(I,z[Le],Y),ge!==null&&(R=f(ge,R,Le),We===null?Ce=ge:We.sibling=ge,We=ge);return Ge&&aa(I,Le),Ce}for(ge=s(ge);Le<z.length;Le++)Ke=G(ge,I,Le,z[Le],Y),Ke!==null&&(e&&Ke.alternate!==null&&ge.delete(Ke.key===null?Le:Ke.key),R=f(Ke,R,Le),We===null?Ce=Ke:We.sibling=Ke,We=Ke);return e&&ge.forEach(function(Xa){return t(I,Xa)}),Ge&&aa(I,Le),Ce}function Ne(I,R,z,Y){if(z==null)throw Error(r(151));for(var Ce=null,We=null,ge=R,Le=R=0,Ke=null,Qe=z.next();ge!==null&&!Qe.done;Le++,Qe=z.next()){ge.index>Le?(Ke=ge,ge=null):Ke=ge.sibling;var Xa=q(I,ge,Qe.value,Y);if(Xa===null){ge===null&&(ge=Ke);break}e&&ge&&Xa.alternate===null&&t(I,ge),R=f(Xa,R,Le),We===null?Ce=Xa:We.sibling=Xa,We=Xa,ge=Ke}if(Qe.done)return i(I,ge),Ge&&aa(I,Le),Ce;if(ge===null){for(;!Qe.done;Le++,Qe=z.next())Qe=Q(I,Qe.value,Y),Qe!==null&&(R=f(Qe,R,Le),We===null?Ce=Qe:We.sibling=Qe,We=Qe);return Ge&&aa(I,Le),Ce}for(ge=s(ge);!Qe.done;Le++,Qe=z.next())Qe=G(ge,I,Le,Qe.value,Y),Qe!==null&&(e&&Qe.alternate!==null&&ge.delete(Qe.key===null?Le:Qe.key),R=f(Qe,R,Le),We===null?Ce=Qe:We.sibling=Qe,We=Qe);return e&&ge.forEach(function(z0){return t(I,z0)}),Ge&&aa(I,Le),Ce}function at(I,R,z,Y){if(typeof z=="object"&&z!==null&&z.type===M&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case T:e:{for(var Ce=z.key;R!==null;){if(R.key===Ce){if(Ce=z.type,Ce===M){if(R.tag===7){i(I,R.sibling),Y=u(R,z.props.children),Y.return=I,I=Y;break e}}else if(R.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===B&&pi(Ce)===R.type){i(I,R.sibling),Y=u(R,z.props),$o(Y,z),Y.return=I,I=Y;break e}i(I,R);break}else t(I,R);R=R.sibling}z.type===M?(Y=ci(z.props.children,I.mode,Y,z.key),Y.return=I,I=Y):(Y=fs(z.type,z.key,z.props,null,I.mode,Y),$o(Y,z),Y.return=I,I=Y)}return y(I);case k:e:{for(Ce=z.key;R!==null;){if(R.key===Ce)if(R.tag===4&&R.stateNode.containerInfo===z.containerInfo&&R.stateNode.implementation===z.implementation){i(I,R.sibling),Y=u(R,z.children||[]),Y.return=I,I=Y;break e}else{i(I,R);break}else t(I,R);R=R.sibling}Y=Nc(z,I.mode,Y),Y.return=I,I=Y}return y(I);case B:return z=pi(z),at(I,R,z,Y)}if(Se(z))return he(I,R,z,Y);if($(z)){if(Ce=$(z),typeof Ce!="function")throw Error(r(150));return z=Ce.call(z),Ne(I,R,z,Y)}if(typeof z.then=="function")return at(I,R,vs(z),Y);if(z.$$typeof===D)return at(I,R,gs(I,z),Y);Cs(I,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,R!==null&&R.tag===6?(i(I,R.sibling),Y=u(R,z),Y.return=I,I=Y):(i(I,R),Y=Ac(z,I.mode,Y),Y.return=I,I=Y),y(I)):i(I,R)}return function(I,R,z,Y){try{Qo=0;var Ce=at(I,R,z,Y);return eo=null,Ce}catch(ge){if(ge===Ji||ge===bs)throw ge;var We=on(29,ge,null,I.mode);return We.lanes=Y,We.return=I,We}finally{}}}var gi=$f(!0),Xf=$f(!1),Ra=!1;function Uc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zc(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 Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Xe&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=hs(e),Rf(e,null,i),t}return ds(e,s,t,i),hs(e)}function Xo(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,jo(e,i)}}function Hc(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var u=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var y={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?u=f=y:f=f.next=y,i=i.next}while(i!==null);f===null?u=f=t:f=f.next=t}else u=f=t;i={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Bc=!1;function Zo(){if(Bc){var e=Zi;if(e!==null)throw e}}function Jo(e,t,i,s){Bc=!1;var u=e.updateQueue;Ra=!1;var f=u.firstBaseUpdate,y=u.lastBaseUpdate,x=u.shared.pending;if(x!==null){u.shared.pending=null;var j=x,H=j.next;j.next=null,y===null?f=H:y.next=H,y=j;var V=e.alternate;V!==null&&(V=V.updateQueue,x=V.lastBaseUpdate,x!==y&&(x===null?V.firstBaseUpdate=H:x.next=H,V.lastBaseUpdate=j))}if(f!==null){var Q=u.baseState;y=0,V=H=j=null,x=f;do{var q=x.lane&-536870913,G=q!==x.lane;if(G?(qe&q)===q:(s&q)===q){q!==0&&q===Xi&&(Bc=!0),V!==null&&(V=V.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var he=e,Ne=x;q=t;var at=i;switch(Ne.tag){case 1:if(he=Ne.payload,typeof he=="function"){Q=he.call(at,Q,q);break e}Q=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=Ne.payload,q=typeof he=="function"?he.call(at,Q,q):he,q==null)break e;Q=b({},Q,q);break e;case 2:Ra=!0}}q=x.callback,q!==null&&(e.flags|=64,G&&(e.flags|=8192),G=u.callbacks,G===null?u.callbacks=[q]:G.push(q))}else G={lane:q,tag:x.tag,payload:x.payload,callback:x.callback,next:null},V===null?(H=V=G,j=Q):V=V.next=G,y|=q;if(x=x.next,x===null){if(x=u.shared.pending,x===null)break;G=x,x=G.next,G.next=null,u.lastBaseUpdate=G,u.shared.pending=null}}while(!0);V===null&&(j=Q),u.baseState=j,u.firstBaseUpdate=H,u.lastBaseUpdate=V,f===null&&(u.shared.lanes=0),Ba|=y,e.lanes=y,e.memoizedState=Q}}function Zf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Jf(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Zf(i[e],t)}var to=ue(null),Ss=ue(0);function ep(e,t){e=pa,X(Ss,e),X(to,t),pa=e|t.baseLanes}function Fc(){X(Ss,pa),X(to,to.current)}function qc(){pa=Ss.current,pe(to),pe(Ss)}var rn=ue(null),Sn=null;function _a(e){var t=e.alternate;X(xt,xt.current&1),X(rn,e),Sn===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(Sn=e)}function Kc(e){X(xt,xt.current),X(rn,e),Sn===null&&(Sn=e)}function tp(e){e.tag===22?(X(xt,xt.current),X(rn,e),Sn===null&&(Sn=e)):Ua()}function Ua(){X(xt,xt.current),X(rn,rn.current)}function sn(e){pe(rn),Sn===e&&(Sn=null),pe(xt)}var xt=ue(0);function ws(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||$u(i)||Xu(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 ra=0,Ee=null,tt=null,St=null,ks=!1,no=!1,yi=!1,As=0,er=0,ao=null,PC=0;function mt(){throw Error(r(321))}function Gc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!an(e[i],t[i]))return!1;return!0}function Vc(e,t,i,s,u,f){return ra=f,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Up:su,yi=!1,f=i(s,u),yi=!1,no&&(f=ap(t,i,s,u)),np(e),f}function np(e){U.H=ar;var t=tt!==null&&tt.next!==null;if(ra=0,St=tt=Ee=null,ks=!1,er=0,ao=null,t)throw Error(r(300));e===null||wt||(e=e.dependencies,e!==null&&ms(e)&&(wt=!0))}function ap(e,t,i,s){Ee=e;var u=0;do{if(no&&(ao=null),er=0,no=!1,25<=u)throw Error(r(301));if(u+=1,St=tt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=zp,f=t(i,s)}while(no);return f}function MC(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?tr(t):t,e=e.useState()[0],(tt!==null?tt.memoizedState:null)!==e&&(Ee.flags|=1024),t}function Yc(){var e=As!==0;return As=0,e}function Wc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Qc(e){if(ks){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ks=!1}ra=0,St=tt=Ee=null,no=!1,er=As=0,ao=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Ee.memoizedState=St=e:St=St.next=e,St}function vt(){if(tt===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=St===null?Ee.memoizedState:St.next;if(t!==null)St=t,tt=e;else{if(e===null)throw Ee.alternate===null?Error(r(467)):Error(r(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},St===null?Ee.memoizedState=St=e:St=St.next=e}return St}function Ns(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function tr(e){var t=er;return er+=1,ao===null&&(ao=[]),e=Yf(ao,e,t),t=Ee,(St===null?t.memoizedState:St.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Up:su),e}function Ds(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return tr(e);if(e.$$typeof===D)return Ot(e)}throw Error(r(438,String(e)))}function $c(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Ns(),Ee.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=K;return t.index++,i}function sa(e,t){return typeof t=="function"?t(e):t}function Ts(e){var t=vt();return Xc(t,tt,e)}function Xc(e,t,i){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=i;var u=e.baseQueue,f=s.pending;if(f!==null){if(u!==null){var y=u.next;u.next=f.next,f.next=y}t.baseQueue=u=f,s.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{t=u.next;var x=y=null,j=null,H=t,V=!1;do{var Q=H.lane&-536870913;if(Q!==H.lane?(qe&Q)===Q:(ra&Q)===Q){var q=H.revertLane;if(q===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),Q===Xi&&(V=!0);else if((ra&q)===q){H=H.next,q===Xi&&(V=!0);continue}else Q={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},j===null?(x=j=Q,y=f):j=j.next=Q,Ee.lanes|=q,Ba|=q;Q=H.action,yi&&i(f,Q),f=H.hasEagerState?H.eagerState:i(f,Q)}else q={lane:Q,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},j===null?(x=j=q,y=f):j=j.next=q,Ee.lanes|=Q,Ba|=Q;H=H.next}while(H!==null&&H!==t);if(j===null?y=f:j.next=x,!an(f,e.memoizedState)&&(wt=!0,V&&(i=Zi,i!==null)))throw i;e.memoizedState=f,e.baseState=y,e.baseQueue=j,s.lastRenderedState=f}return u===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Zc(e){var t=vt(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var s=i.dispatch,u=i.pending,f=t.memoizedState;if(u!==null){i.pending=null;var y=u=u.next;do f=e(f,y.action),y=y.next;while(y!==u);an(f,t.memoizedState)||(wt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),i.lastRenderedState=f}return[f,s]}function ip(e,t,i){var s=Ee,u=vt(),f=Ge;if(f){if(i===void 0)throw Error(r(407));i=i()}else i=t();var y=!an((tt||u).memoizedState,i);if(y&&(u.memoizedState=i,wt=!0),u=u.queue,tu(sp.bind(null,s,u,e),[e]),u.getSnapshot!==t||y||St!==null&&St.memoizedState.tag&1){if(s.flags|=2048,io(9,{destroy:void 0},rp.bind(null,s,u,i,t),null),ot===null)throw Error(r(349));f||(ra&127)!==0||op(s,t,i)}return i}function op(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=Ns(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function rp(e,t,i,s){t.value=i,t.getSnapshot=s,lp(t)&&cp(e)}function sp(e,t,i){return i(function(){lp(t)&&cp(e)})}function lp(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!an(e,i)}catch{return!0}}function cp(e){var t=li(e,2);t!==null&&$t(t,e,2)}function Jc(e){var t=Ft();if(typeof e=="function"){var i=e;if(e=i(),yi){Oe(!0);try{i()}finally{Oe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},t}function up(e,t,i,s){return e.baseState=i,Xc(e,tt,typeof s=="function"?s:sa)}function jC(e,t,i,s,u){if(js(e))throw Error(r(485));if(e=t.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};U.T!==null?i(!0):f.isTransition=!1,s(f),i=t.pending,i===null?(f.next=t.pending=f,dp(t,f)):(f.next=i.next,t.pending=i.next=f)}}function dp(e,t){var i=t.action,s=t.payload,u=e.state;if(t.isTransition){var f=U.T,y={};U.T=y;try{var x=i(u,s),j=U.S;j!==null&&j(y,x),hp(e,t,x)}catch(H){eu(e,t,H)}finally{f!==null&&y.types!==null&&(f.types=y.types),U.T=f}}else try{f=i(u,s),hp(e,t,f)}catch(H){eu(e,t,H)}}function hp(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){fp(e,t,s)},function(s){return eu(e,t,s)}):fp(e,t,i)}function fp(e,t,i){t.status="fulfilled",t.value=i,pp(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,dp(e,i)))}function eu(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,pp(t),t=t.next;while(t!==s)}e.action=null}function pp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mp(e,t){return t}function gp(e,t){if(Ge){var i=ot.formState;if(i!==null){e:{var s=Ee;if(Ge){if(ut){t:{for(var u=ut,f=Cn;u.nodeType!==8;){if(!f){u=null;break t}if(u=wn(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){ut=wn(u.nextSibling),s=u.data==="F!";break e}}Ea(s)}s=!1}s&&(t=i[0])}}return i=Ft(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mp,lastRenderedState:t},i.queue=s,i=Op.bind(null,Ee,s),s.dispatch=i,s=Jc(!1),f=ru.bind(null,Ee,!1,s.queue),s=Ft(),u={state:t,dispatch:null,action:e,pending:null},s.queue=u,i=jC.bind(null,Ee,u,f,i),u.dispatch=i,s.memoizedState=e,[t,i,!1]}function yp(e){var t=vt();return bp(t,tt,e)}function bp(e,t,i){if(t=Xc(e,t,mp)[0],e=Ts(sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=tr(t)}catch(y){throw y===Ji?bs:y}else s=t;t=vt();var u=t.queue,f=u.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,io(9,{destroy:void 0},EC.bind(null,u,i),null)),[s,f,e]}function EC(e,t){e.action=t}function xp(e){var t=vt(),i=tt;if(i!==null)return bp(t,i,e);vt(),t=t.memoizedState,i=vt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function io(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Ns(),Ee.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function vp(){return vt().memoizedState}function Ps(e,t,i,s){var u=Ft();Ee.flags|=e,u.memoizedState=io(1|t,{destroy:void 0},i,s===void 0?null:s)}function Ms(e,t,i,s){var u=vt();s=s===void 0?null:s;var f=u.memoizedState.inst;tt!==null&&s!==null&&Gc(s,tt.memoizedState.deps)?u.memoizedState=io(t,f,i,s):(Ee.flags|=e,u.memoizedState=io(1|t,f,i,s))}function Cp(e,t){Ps(8390656,8,e,t)}function tu(e,t){Ms(2048,8,e,t)}function LC(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Ns(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Sp(e){var t=vt().memoizedState;return LC({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function wp(e,t){return Ms(4,2,e,t)}function kp(e,t){return Ms(4,4,e,t)}function Ap(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 Np(e,t,i){i=i!=null?i.concat([e]):null,Ms(4,4,Ap.bind(null,t,e),i)}function nu(){}function Dp(e,t){var i=vt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Gc(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Tp(e,t){var i=vt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Gc(t,s[1]))return s[0];if(s=e(),yi){Oe(!0);try{e()}finally{Oe(!1)}}return i.memoizedState=[s,t],s}function au(e,t,i){return i===void 0||(ra&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Pm(),Ee.lanes|=e,Ba|=e,i)}function Pp(e,t,i,s){return an(i,t)?i:to.current!==null?(e=au(e,i,s),an(e,t)||(wt=!0),e):(ra&42)===0||(ra&1073741824)!==0&&(qe&261930)===0?(wt=!0,e.memoizedState=i):(e=Pm(),Ee.lanes|=e,Ba|=e,t)}function Mp(e,t,i,s,u){var f=Z.p;Z.p=f!==0&&8>f?f:8;var y=U.T,x={};U.T=x,ru(e,!1,t,i);try{var j=u(),H=U.S;if(H!==null&&H(x,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var V=TC(j,s);nr(e,t,V,un(e))}else nr(e,t,s,un(e))}catch(Q){nr(e,t,{then:function(){},status:"rejected",reason:Q},un())}finally{Z.p=f,y!==null&&x.types!==null&&(y.types=x.types),U.T=y}}function RC(){}function iu(e,t,i,s){if(e.tag!==5)throw Error(r(476));var u=jp(e).queue;Mp(e,u,t,ne,i===null?RC:function(){return Ep(e),i(s)})}function jp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:ne},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ep(e){var t=jp(e);t.next===null&&(t=e.alternate.memoizedState),nr(e,t.next.queue,{},un())}function ou(){return Ot(xr)}function Lp(){return vt().memoizedState}function Rp(){return vt().memoizedState}function OC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=un();e=Oa(i);var s=Ia(t,e,i);s!==null&&($t(s,t,i),Xo(s,t,i)),t={cache:Rc()},e.payload=t;return}t=t.return}}function IC(e,t,i){var s=un();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},js(e)?Ip(t,i):(i=wc(e,t,i,s),i!==null&&($t(i,e,s),_p(i,t,s)))}function Op(e,t,i){var s=un();nr(e,t,i,s)}function nr(e,t,i,s){var u={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ip(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var y=t.lastRenderedState,x=f(y,i);if(u.hasEagerState=!0,u.eagerState=x,an(x,y))return ds(e,t,u,0),ot===null&&us(),!1}catch{}finally{}if(i=wc(e,t,u,s),i!==null)return $t(i,e,s),_p(i,t,s),!0}return!1}function ru(e,t,i,s){if(s={lane:2,revertLane:Uu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(r(479))}else t=wc(e,i,s,2),t!==null&&$t(t,e,2)}function js(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Ip(e,t){no=ks=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function _p(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,jo(e,i)}}var ar={readContext:Ot,use:Ds,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};ar.useEffectEvent=mt;var Up={readContext:Ot,use:Ds,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Cp,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Ps(4194308,4,Ap.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){Ps(4,2,e,t)},useMemo:function(e,t){var i=Ft();t=t===void 0?null:t;var s=e();if(yi){Oe(!0);try{e()}finally{Oe(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Ft();if(i!==void 0){var u=i(t);if(yi){Oe(!0);try{i(t)}finally{Oe(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=IC.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Jc(e);var t=e.queue,i=Op.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:nu,useDeferredValue:function(e,t){var i=Ft();return au(i,e,t)},useTransition:function(){var e=Jc(!1);return e=Mp.bind(null,Ee,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,u=Ft();if(Ge){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),ot===null)throw Error(r(349));(qe&127)!==0||op(s,t,i)}u.memoizedState=i;var f={value:i,getSnapshot:t};return u.queue=f,Cp(sp.bind(null,s,f,e),[e]),s.flags|=2048,io(9,{destroy:void 0},rp.bind(null,s,f,i,t),null),i},useId:function(){var e=Ft(),t=ot.identifierPrefix;if(Ge){var i=_n,s=In;i=(s&~(1<<32-ke(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=As++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=PC++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ou,useFormState:gp,useActionState:gp,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ru.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:$c,useCacheRefresh:function(){return Ft().memoizedState=OC.bind(null,Ee)},useEffectEvent:function(e){var t=Ft(),i={impl:e};return t.memoizedState=i,function(){if((Xe&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},su={readContext:Ot,use:Ds,useCallback:Dp,useContext:Ot,useEffect:tu,useImperativeHandle:Np,useInsertionEffect:wp,useLayoutEffect:kp,useMemo:Tp,useReducer:Ts,useRef:vp,useState:function(){return Ts(sa)},useDebugValue:nu,useDeferredValue:function(e,t){var i=vt();return Pp(i,tt.memoizedState,e,t)},useTransition:function(){var e=Ts(sa)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:tr(e),t]},useSyncExternalStore:ip,useId:Lp,useHostTransitionStatus:ou,useFormState:yp,useActionState:yp,useOptimistic:function(e,t){var i=vt();return up(i,tt,e,t)},useMemoCache:$c,useCacheRefresh:Rp};su.useEffectEvent=Sp;var zp={readContext:Ot,use:Ds,useCallback:Dp,useContext:Ot,useEffect:tu,useImperativeHandle:Np,useInsertionEffect:wp,useLayoutEffect:kp,useMemo:Tp,useReducer:Zc,useRef:vp,useState:function(){return Zc(sa)},useDebugValue:nu,useDeferredValue:function(e,t){var i=vt();return tt===null?au(i,e,t):Pp(i,tt.memoizedState,e,t)},useTransition:function(){var e=Zc(sa)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:tr(e),t]},useSyncExternalStore:ip,useId:Lp,useHostTransitionStatus:ou,useFormState:xp,useActionState:xp,useOptimistic:function(e,t){var i=vt();return tt!==null?up(i,tt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:$c,useCacheRefresh:Rp};zp.useEffectEvent=Sp;function lu(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:b({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var cu={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=un(),u=Oa(s);u.payload=t,i!=null&&(u.callback=i),t=Ia(e,u,s),t!==null&&($t(t,e,s),Xo(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=un(),u=Oa(s);u.tag=1,u.payload=t,i!=null&&(u.callback=i),t=Ia(e,u,s),t!==null&&($t(t,e,s),Xo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=un(),s=Oa(i);s.tag=2,t!=null&&(s.callback=t),t=Ia(e,s,i),t!==null&&($t(t,e,i),Xo(t,e,i))}};function Hp(e,t,i,s,u,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,y):t.prototype&&t.prototype.isPureReactComponent?!qo(i,s)||!qo(u,f):!0}function Bp(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&cu.enqueueReplaceState(t,t.state,null)}function bi(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=b({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function Fp(e){cs(e)}function qp(e){console.error(e)}function Kp(e){cs(e)}function Es(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Gp(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function uu(e,t,i){return i=Oa(i),i.tag=3,i.payload={element:null},i.callback=function(){Es(e,t)},i}function Vp(e){return e=Oa(e),e.tag=3,e}function Yp(e,t,i,s){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var f=s.value;e.payload=function(){return u(f)},e.callback=function(){Gp(t,i,s)}}var y=i.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Gp(t,i,s),typeof u!="function"&&(Fa===null?Fa=new Set([this]):Fa.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})})}function _C(e,t,i,s,u){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&$i(t,i,u,!0),i=rn.current,i!==null){switch(i.tag){case 31:case 13:return Sn===null?Ks():i.alternate===null&&gt===0&&(gt=3),i.flags&=-257,i.flags|=65536,i.lanes=u,s===xs?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Ou(e,s,u)),!1;case 22:return i.flags|=65536,s===xs?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Ou(e,s,u)),!1}throw Error(r(435,i.tag))}return Ou(e,s,u),Ks(),!1}if(Ge)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,s!==Pc&&(e=Error(r(422),{cause:s}),Vo(bn(e,i)))):(s!==Pc&&(t=Error(r(423),{cause:s}),Vo(bn(t,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,s=bn(s,i),u=uu(e.stateNode,s,u),Hc(e,u),gt!==4&&(gt=2)),!1;var f=Error(r(520),{cause:s});if(f=bn(f,i),dr===null?dr=[f]:dr.push(f),gt!==4&&(gt=2),t===null)return!0;s=bn(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=uu(i.stateNode,s,e),Hc(i,e),!1;case 1:if(t=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Fa===null||!Fa.has(f))))return i.flags|=65536,u&=-u,i.lanes|=u,u=Vp(u),Yp(u,e,i,s),Hc(i,u),!1}i=i.return}while(i!==null);return!1}var du=Error(r(461)),wt=!1;function It(e,t,i,s){t.child=e===null?Xf(t,null,i,s):gi(t,e.child,i,s)}function Wp(e,t,i,s,u){i=i.render;var f=t.ref;if("ref"in s){var y={};for(var x in s)x!=="ref"&&(y[x]=s[x])}else y=s;return hi(t),s=Vc(e,t,i,y,f,u),x=Yc(),e!==null&&!wt?(Wc(e,t,u),la(e,t,u)):(Ge&&x&&Dc(t),t.flags|=1,It(e,t,s,u),t.child)}function Qp(e,t,i,s,u){if(e===null){var f=i.type;return typeof f=="function"&&!kc(f)&&f.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=f,$p(e,t,f,s,u)):(e=fs(i.type,null,s,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!xu(e,u)){var y=f.memoizedProps;if(i=i.compare,i=i!==null?i:qo,i(y,s)&&e.ref===t.ref)return la(e,t,u)}return t.flags|=1,e=na(f,s),e.ref=t.ref,e.return=t,t.child=e}function $p(e,t,i,s,u){if(e!==null){var f=e.memoizedProps;if(qo(f,s)&&e.ref===t.ref)if(wt=!1,t.pendingProps=s=f,xu(e,u))(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,la(e,t,u)}return hu(e,t,i,s,u)}function Xp(e,t,i,s){var u=s.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,e!==null){for(s=t.child=e.child,u=0;s!==null;)u=u|s.lanes|s.childLanes,s=s.sibling;s=u&~f}else s=0,t.child=null;return Zp(e,t,f,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ys(t,f!==null?f.cachePool:null),f!==null?ep(t,f):Fc(),tp(t);else return s=t.lanes=536870912,Zp(e,t,f!==null?f.baseLanes|i:i,i,s)}else f!==null?(ys(t,f.cachePool),ep(t,f),Ua(),t.memoizedState=null):(e!==null&&ys(t,null),Fc(),Ua());return It(e,t,u,i),t.child}function ir(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zp(e,t,i,s,u){var f=Ic();return f=f===null?null:{parent:Ct._currentValue,pool:f},t.memoizedState={baseLanes:i,cachePool:f},e!==null&&ys(t,null),Fc(),tp(t),e!==null&&$i(e,t,s,!0),t.childLanes=u,null}function Ls(e,t){return t=Os({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jp(e,t,i){return gi(t,e.child,null,i),e=Ls(t,t.pendingProps),e.flags|=2,sn(t),t.memoizedState=null,e}function UC(e,t,i){var s=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(s.mode==="hidden")return e=Ls(t,s),t.lanes=536870912,ir(null,e);if(Kc(t),(e=ut)?(e=dg(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:In,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},i=If(e),i.return=t,t.child=i,Rt=t,ut=null)):e=null,e===null)throw Ea(t);return t.lanes=536870912,null}return Ls(t,s)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(Kc(t),u)if(t.flags&256)t.flags&=-257,t=Jp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(wt||$i(e,t,i,!1),u=(i&e.childLanes)!==0,wt||u){if(s=ot,s!==null&&(y=pn(s,i),y!==0&&y!==f.retryLane))throw f.retryLane=y,li(e,y),$t(s,e,y),du;Ks(),t=Jp(e,t,i)}else e=f.treeContext,ut=wn(y.nextSibling),Rt=t,Ge=!0,ja=null,Cn=!1,e!==null&&zf(t,e),t=Ls(t,s),t.flags|=4096;return t}return e=na(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Rs(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(r(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function hu(e,t,i,s,u){return hi(t),i=Vc(e,t,i,s,void 0,u),s=Yc(),e!==null&&!wt?(Wc(e,t,u),la(e,t,u)):(Ge&&s&&Dc(t),t.flags|=1,It(e,t,i,u),t.child)}function em(e,t,i,s,u,f){return hi(t),t.updateQueue=null,i=ap(t,s,i,u),np(e),s=Yc(),e!==null&&!wt?(Wc(e,t,f),la(e,t,f)):(Ge&&s&&Dc(t),t.flags|=1,It(e,t,i,f),t.child)}function tm(e,t,i,s,u){if(hi(t),t.stateNode===null){var f=Vi,y=i.contextType;typeof y=="object"&&y!==null&&(f=Ot(y)),f=new i(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=cu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},Uc(t),y=i.contextType,f.context=typeof y=="object"&&y!==null?Ot(y):Vi,f.state=t.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(lu(t,i,y,s),f.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&cu.enqueueReplaceState(f,f.state,null),Jo(t,s,f,u),Zo(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,j=bi(i,x);f.props=j;var H=f.context,V=i.contextType;y=Vi,typeof V=="object"&&V!==null&&(y=Ot(V));var Q=i.getDerivedStateFromProps;V=typeof Q=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,V||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||H!==y)&&Bp(t,f,s,y),Ra=!1;var q=t.memoizedState;f.state=q,Jo(t,s,f,u),Zo(),H=t.memoizedState,x||q!==H||Ra?(typeof Q=="function"&&(lu(t,i,Q,s),H=t.memoizedState),(j=Ra||Hp(t,i,j,s,q,H,y))?(V||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=H),f.props=s,f.state=H,f.context=y,s=j):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,zc(e,t),y=t.memoizedProps,V=bi(i,y),f.props=V,Q=t.pendingProps,q=f.context,H=i.contextType,j=Vi,typeof H=="object"&&H!==null&&(j=Ot(H)),x=i.getDerivedStateFromProps,(H=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==Q||q!==j)&&Bp(t,f,s,j),Ra=!1,q=t.memoizedState,f.state=q,Jo(t,s,f,u),Zo();var G=t.memoizedState;y!==Q||q!==G||Ra||e!==null&&e.dependencies!==null&&ms(e.dependencies)?(typeof x=="function"&&(lu(t,i,x,s),G=t.memoizedState),(V=Ra||Hp(t,i,V,s,q,G,j)||e!==null&&e.dependencies!==null&&ms(e.dependencies))?(H||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,G,j),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,G,j)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=G),f.props=s,f.state=G,f.context=j,s=V):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,Rs(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=gi(t,e.child,null,u),t.child=gi(t,null,i,u)):It(e,t,i,u),t.memoizedState=f.state,e=t.child):e=la(e,t,u),e}function nm(e,t,i,s){return ui(),t.flags|=256,It(e,t,i,s),t.child}var fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pu(e){return{baseLanes:e,cachePool:Gf()}}function mu(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=cn),e}function am(e,t,i){var s=t.pendingProps,u=!1,f=(t.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(u?_a(t):Ua(),(e=ut)?(e=dg(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:In,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},i=If(e),i.return=t,t.child=i,Rt=t,ut=null)):e=null,e===null)throw Ea(t);return Xu(e)?t.lanes=32:t.lanes=536870912,null}var x=s.children;return s=s.fallback,u?(Ua(),u=t.mode,x=Os({mode:"hidden",children:x},u),s=ci(s,u,i,null),x.return=t,s.return=t,x.sibling=s,t.child=x,s=t.child,s.memoizedState=pu(i),s.childLanes=mu(e,y,i),t.memoizedState=fu,ir(null,s)):(_a(t),gu(t,x))}var j=e.memoizedState;if(j!==null&&(x=j.dehydrated,x!==null)){if(f)t.flags&256?(_a(t),t.flags&=-257,t=yu(e,t,i)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),x=s.fallback,u=t.mode,s=Os({mode:"visible",children:s.children},u),x=ci(x,u,i,null),x.flags|=2,s.return=t,x.return=t,s.sibling=x,t.child=s,gi(t,e.child,null,i),s=t.child,s.memoizedState=pu(i),s.childLanes=mu(e,y,i),t.memoizedState=fu,t=ir(null,s));else if(_a(t),Xu(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var H=y.dgst;y=H,s=Error(r(419)),s.stack="",s.digest=y,Vo({value:s,source:null,stack:null}),t=yu(e,t,i)}else if(wt||$i(e,t,i,!1),y=(i&e.childLanes)!==0,wt||y){if(y=ot,y!==null&&(s=pn(y,i),s!==0&&s!==j.retryLane))throw j.retryLane=s,li(e,s),$t(y,e,s),du;$u(x)||Ks(),t=yu(e,t,i)}else $u(x)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,ut=wn(x.nextSibling),Rt=t,Ge=!0,ja=null,Cn=!1,e!==null&&zf(t,e),t=gu(t,s.children),t.flags|=4096);return t}return u?(Ua(),x=s.fallback,u=t.mode,j=e.child,H=j.sibling,s=na(j,{mode:"hidden",children:s.children}),s.subtreeFlags=j.subtreeFlags&65011712,H!==null?x=na(H,x):(x=ci(x,u,i,null),x.flags|=2),x.return=t,s.return=t,s.sibling=x,t.child=s,ir(null,s),s=t.child,x=e.child.memoizedState,x===null?x=pu(i):(u=x.cachePool,u!==null?(j=Ct._currentValue,u=u.parent!==j?{parent:j,pool:j}:u):u=Gf(),x={baseLanes:x.baseLanes|i,cachePool:u}),s.memoizedState=x,s.childLanes=mu(e,y,i),t.memoizedState=fu,ir(e.child,s)):(_a(t),i=e.child,e=i.sibling,i=na(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=i,t.memoizedState=null,i)}function gu(e,t){return t=Os({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Os(e,t){return e=on(22,e,null,t),e.lanes=0,e}function yu(e,t,i){return gi(t,e.child,null,i),e=gu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function im(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ec(e.return,t,i)}function bu(e,t,i,s,u,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:u,treeForkCount:f}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=i,y.tailMode=u,y.treeForkCount=f)}function om(e,t,i){var s=t.pendingProps,u=s.revealOrder,f=s.tail;s=s.children;var y=xt.current,x=(y&2)!==0;if(x?(y=y&1|2,t.flags|=128):y&=1,X(xt,y),It(e,t,s,i),s=Ge?Go:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&im(e,i,t);else if(e.tag===19)im(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&&ws(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),bu(t,!1,u,i,f,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&ws(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}bu(t,!0,i,null,f,s);break;case"together":bu(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function la(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ba|=t.lanes,(i&t.childLanes)===0)if(e!==null){if($i(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,i=na(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=na(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function xu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ms(e)))}function zC(e,t,i){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),La(t,Ct,e.memoizedState.cache),ui();break;case 27:case 5:ze(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:La(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Kc(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(_a(t),t.flags|=128,null):(i&t.child.childLanes)!==0?am(e,t,i):(_a(t),e=la(e,t,i),e!==null?e.sibling:null);_a(t);break;case 19:var u=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||($i(e,t,i,!1),s=(i&t.childLanes)!==0),u){if(s)return om(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),X(xt,xt.current),s)break;return null;case 22:return t.lanes=0,Xp(e,t,i,t.pendingProps);case 24:La(t,Ct,e.memoizedState.cache)}return la(e,t,i)}function rm(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)wt=!0;else{if(!xu(e,i)&&(t.flags&128)===0)return wt=!1,zC(e,t,i);wt=(e.flags&131072)!==0}else wt=!1,Ge&&(t.flags&1048576)!==0&&Uf(t,Go,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=pi(t.elementType),t.type=e,typeof e=="function")kc(e)?(s=bi(e,s),t.tag=1,t=tm(null,t,e,s,i)):(t.tag=0,t=hu(null,t,e,s,i));else{if(e!=null){var u=e.$$typeof;if(u===A){t.tag=11,t=Wp(null,t,e,s,i);break e}else if(u===O){t.tag=14,t=Qp(null,t,e,s,i);break e}}throw t=te(e)||e,Error(r(306,t,""))}}return t;case 0:return hu(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,u=bi(s,t.pendingProps),tm(e,t,s,u,i);case 3:e:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var f=t.memoizedState;u=f.element,zc(e,t),Jo(t,s,null,i);var y=t.memoizedState;if(s=y.cache,La(t,Ct,s),s!==f.cache&&Lc(t,[Ct],i,!0),Zo(),s=y.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=nm(e,t,s,i);break e}else if(s!==u){u=bn(Error(r(424)),t),Vo(u),t=nm(e,t,s,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(ut=wn(e.firstChild),Rt=t,Ge=!0,ja=null,Cn=!0,i=Xf(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ui(),s===u){t=la(e,t,i);break e}It(e,t,s,i)}t=t.child}return t;case 26:return Rs(e,t),e===null?(i=yg(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ge||(i=t.type,e=t.pendingProps,s=Xs(ie.current).createElement(i),s[Lt]=t,s[Kt]=e,_t(s,i,e),Mt(s),t.stateNode=s):t.memoizedState=yg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ze(t),e===null&&Ge&&(s=t.stateNode=pg(t.type,t.pendingProps,ie.current),Rt=t,Cn=!0,u=ut,Va(t.type)?(Zu=u,ut=wn(s.firstChild)):ut=u),It(e,t,t.pendingProps.children,i),Rs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((u=s=ut)&&(s=m0(s,t.type,t.pendingProps,Cn),s!==null?(t.stateNode=s,Rt=t,ut=wn(s.firstChild),Cn=!1,u=!0):u=!1),u||Ea(t)),ze(t),u=t.type,f=t.pendingProps,y=e!==null?e.memoizedProps:null,s=f.children,Yu(u,f)?s=null:y!==null&&Yu(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Vc(e,t,MC,null,null,i),xr._currentValue=u),Rs(e,t),It(e,t,s,i),t.child;case 6:return e===null&&Ge&&((e=i=ut)&&(i=g0(i,t.pendingProps,Cn),i!==null?(t.stateNode=i,Rt=t,ut=null,e=!0):e=!1),e||Ea(t)),null;case 13:return am(e,t,i);case 4:return xe(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=gi(t,null,s,i):It(e,t,s,i),t.child;case 11:return Wp(e,t,t.type,t.pendingProps,i);case 7:return It(e,t,t.pendingProps,i),t.child;case 8:return It(e,t,t.pendingProps.children,i),t.child;case 12:return It(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,La(t,t.type,s.value),It(e,t,s.children,i),t.child;case 9:return u=t.type._context,s=t.pendingProps.children,hi(t),u=Ot(u),s=s(u),t.flags|=1,It(e,t,s,i),t.child;case 14:return Qp(e,t,t.type,t.pendingProps,i);case 15:return $p(e,t,t.type,t.pendingProps,i);case 19:return om(e,t,i);case 31:return UC(e,t,i);case 22:return Xp(e,t,i,t.pendingProps);case 24:return hi(t),s=Ot(Ct),e===null?(u=Ic(),u===null&&(u=ot,f=Rc(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=i),u=f),t.memoizedState={parent:s,cache:u},Uc(t),La(t,Ct,u)):((e.lanes&i)!==0&&(zc(e,t),Jo(t,null,null,i),Zo()),u=e.memoizedState,f=t.memoizedState,u.parent!==s?(u={parent:s,cache:s},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),La(t,Ct,s)):(s=f.cache,La(t,Ct,s),s!==u.cache&&Lc(t,[Ct],i,!0))),It(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function ca(e){e.flags|=4}function vu(e,t,i,s,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(Lm())e.flags|=8192;else throw mi=xs,_c}else e.flags&=-16777217}function sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sg(t))if(Lm())e.flags|=8192;else throw mi=xs,_c}function Is(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Pt():536870912,e.lanes|=t,lo|=t)}function or(e,t){if(!Ge)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 s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,s|=u.subtreeFlags&65011712,s|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,s|=u.subtreeFlags,s|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function HC(e,t,i){var s=t.pendingProps;switch(Tc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),oa(Ct),Pe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Qi(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mc())),dt(t),null;case 26:var u=t.type,f=t.memoizedState;return e===null?(ca(t),f!==null?(dt(t),sm(t,f)):(dt(t),vu(t,u,null,s,i))):f?f!==e.memoizedState?(ca(t),dt(t),sm(t,f)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ca(t),dt(t),vu(t,u,e,s,i)),null;case 27:if(Ze(t),i=ie.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ca(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return dt(t),null}e=ae.current,Qi(t)?Hf(t):(e=pg(u,s,i),t.stateNode=e,ca(t))}return dt(t),null;case 5:if(Ze(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ca(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return dt(t),null}if(f=ae.current,Qi(t))Hf(t);else{var y=Xs(ie.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?y.createElement(u,{is:s.is}):y.createElement(u)}}f[Lt]=t,f[Kt]=s;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=f;e:switch(_t(f,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ca(t)}}return dt(t),vu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ca(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=ie.current,Qi(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,u=Rt,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ag(e.nodeValue,i)),e||Ea(t,!0)}else e=Xs(e).createTextNode(s),e[Lt]=t,t.stateNode=e}return dt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Qi(t),i!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Lt]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else i=Mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(sn(t),t):(sn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return dt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Qi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Lt]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),u=!1}else u=Mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(sn(t),t):(sn(t),null)}return sn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==u&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Is(t,t.updateQueue),dt(t),null);case 4:return Pe(),e===null&&Fu(t.stateNode.containerInfo),dt(t),null;case 10:return oa(t.type),dt(t),null;case 19:if(pe(xt),s=t.memoizedState,s===null)return dt(t),null;if(u=(t.flags&128)!==0,f=s.rendering,f===null)if(u)or(s,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=ws(e),f!==null){for(t.flags|=128,or(s,!1),e=f.updateQueue,t.updateQueue=e,Is(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Of(i,e),i=i.sibling;return X(xt,xt.current&1|2),Ge&&aa(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&bt()>Bs&&(t.flags|=128,u=!0,or(s,!1),t.lanes=4194304)}else{if(!u)if(e=ws(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Is(t,e),or(s,!0),s.tail===null&&s.tailMode==="hidden"&&!f.alternate&&!Ge)return dt(t),null}else 2*bt()-s.renderingStartTime>Bs&&i!==536870912&&(t.flags|=128,u=!0,or(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=bt(),e.sibling=null,i=xt.current,X(xt,u?i&1|2:i&1),Ge&&aa(t,s.treeForkCount),e):(dt(t),null);case 22:case 23:return sn(t),qc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),i=t.updateQueue,i!==null&&Is(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&pe(fi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),oa(Ct),dt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function BC(e,t){switch(Tc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(Ct),Pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ze(t),null;case 31:if(t.memoizedState!==null){if(sn(t),t.alternate===null)throw Error(r(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(sn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(xt),null;case 4:return Pe(),null;case 10:return oa(t.type),null;case 22:case 23:return sn(t),qc(),e!==null&&pe(fi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(Ct),null;case 25:return null;default:return null}}function lm(e,t){switch(Tc(t),t.tag){case 3:oa(Ct),Pe();break;case 26:case 27:case 5:Ze(t);break;case 4:Pe();break;case 31:t.memoizedState!==null&&sn(t);break;case 13:sn(t);break;case 19:pe(xt);break;case 10:oa(t.type);break;case 22:case 23:sn(t),qc(),e!==null&&pe(fi);break;case 24:oa(Ct)}}function rr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var u=s.next;i=u;do{if((i.tag&e)===e){s=void 0;var f=i.create,y=i.inst;s=f(),y.destroy=s}i=i.next}while(i!==u)}}catch(x){et(t,t.return,x)}}function za(e,t,i){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var f=u.next;s=f;do{if((s.tag&e)===e){var y=s.inst,x=y.destroy;if(x!==void 0){y.destroy=void 0,u=t;var j=i,H=x;try{H()}catch(V){et(u,j,V)}}}s=s.next}while(s!==f)}}catch(V){et(t,t.return,V)}}function cm(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Jf(t,i)}catch(s){et(e,e.return,s)}}}function um(e,t,i){i.props=bi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){et(e,t,s)}}function sr(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(u){et(e,t,u)}}function Un(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(u){et(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){et(e,t,u)}else i.current=null}function dm(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(u){et(e,e.return,u)}}function Cu(e,t,i){try{var s=e.stateNode;c0(s,e.type,i,t),s[Kt]=t}catch(u){et(e,e.return,u)}}function hm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Va(e.type)||e.tag===4}function Su(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hm(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&&Va(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 wu(e,t,i){var s=e.tag;if(s===5||s===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=ea));else if(s!==4&&(s===27&&Va(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(wu(e,t,i),e=e.sibling;e!==null;)wu(e,t,i),e=e.sibling}function _s(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Va(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(_s(e,t,i),e=e.sibling;e!==null;)_s(e,t,i),e=e.sibling}function fm(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);_t(t,s,i),t[Lt]=e,t[Kt]=i}catch(f){et(e,e.return,f)}}var ua=!1,kt=!1,ku=!1,pm=typeof WeakSet=="function"?WeakSet:Set,jt=null;function FC(e,t){if(e=e.containerInfo,Gu=il,e=Nf(e),yc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var u=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var y=0,x=-1,j=-1,H=0,V=0,Q=e,q=null;t:for(;;){for(var G;Q!==i||u!==0&&Q.nodeType!==3||(x=y+u),Q!==f||s!==0&&Q.nodeType!==3||(j=y+s),Q.nodeType===3&&(y+=Q.nodeValue.length),(G=Q.firstChild)!==null;)q=Q,Q=G;for(;;){if(Q===e)break t;if(q===i&&++H===u&&(x=y),q===f&&++V===s&&(j=y),(G=Q.nextSibling)!==null)break;Q=q,q=Q.parentNode}Q=G}i=x===-1||j===-1?null:{start:x,end:j}}else i=null}i=i||{start:0,end:0}}else i=null;for(Vu={focusedElem:e,selectionRange:i},il=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,f=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&&f!==null){e=void 0,i=t,u=f.memoizedProps,f=f.memoizedState,s=i.stateNode;try{var he=bi(i.type,u);e=s.getSnapshotBeforeUpdate(he,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){et(i,i.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Qu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qu(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,jt=e;break}jt=t.return}}function mm(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ha(e,i),s&4&&rr(5,i);break;case 1:if(ha(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(y){et(i,i.return,y)}else{var u=bi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){et(i,i.return,y)}}s&64&&cm(i),s&512&&sr(i,i.return);break;case 3:if(ha(e,i),s&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{Jf(e,t)}catch(y){et(i,i.return,y)}}break;case 27:t===null&&s&4&&fm(i);case 26:case 5:ha(e,i),t===null&&s&4&&dm(i),s&512&&sr(i,i.return);break;case 12:ha(e,i);break;case 31:ha(e,i),s&4&&bm(e,i);break;case 13:ha(e,i),s&4&&xm(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=XC.bind(null,i),y0(e,i))));break;case 22:if(s=i.memoizedState!==null||ua,!s){t=t!==null&&t.memoizedState!==null||kt,u=ua;var f=kt;ua=s,(kt=t)&&!f?fa(e,i,(i.subtreeFlags&8772)!==0):ha(e,i),ua=u,kt=f}break;case 30:break;default:ha(e,i)}}function gm(e){var t=e.alternate;t!==null&&(e.alternate=null,gm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ec(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 ft=null,Vt=!1;function da(e,t,i){for(i=i.child;i!==null;)ym(e,t,i),i=i.sibling}function ym(e,t,i){if(ee&&typeof ee.onCommitFiberUnmount=="function")try{ee.onCommitFiberUnmount($n,i)}catch{}switch(i.tag){case 26:kt||Un(i,t),da(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:kt||Un(i,t);var s=ft,u=Vt;Va(i.type)&&(ft=i.stateNode,Vt=!1),da(e,t,i),gr(i.stateNode),ft=s,Vt=u;break;case 5:kt||Un(i,t);case 6:if(s=ft,u=Vt,ft=null,da(e,t,i),ft=s,Vt=u,ft!==null)if(Vt)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(i.stateNode)}catch(f){et(i,t,f)}else try{ft.removeChild(i.stateNode)}catch(f){et(i,t,f)}break;case 18:ft!==null&&(Vt?(e=ft,cg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),yo(e)):cg(ft,i.stateNode));break;case 4:s=ft,u=Vt,ft=i.stateNode.containerInfo,Vt=!0,da(e,t,i),ft=s,Vt=u;break;case 0:case 11:case 14:case 15:za(2,i,t),kt||za(4,i,t),da(e,t,i);break;case 1:kt||(Un(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&um(i,t,s)),da(e,t,i);break;case 21:da(e,t,i);break;case 22:kt=(s=kt)||i.memoizedState!==null,da(e,t,i),kt=s;break;default:da(e,t,i)}}function bm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yo(e)}catch(i){et(t,t.return,i)}}}function xm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yo(e)}catch(i){et(t,t.return,i)}}function qC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pm),t;default:throw Error(r(435,e.tag))}}function Us(e,t){var i=qC(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var u=ZC.bind(null,e,s);s.then(u,u)}})}function Yt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var u=i[s],f=e,y=t,x=y;e:for(;x!==null;){switch(x.tag){case 27:if(Va(x.type)){ft=x.stateNode,Vt=!1;break e}break;case 5:ft=x.stateNode,Vt=!1;break e;case 3:case 4:ft=x.stateNode.containerInfo,Vt=!0;break e}x=x.return}if(ft===null)throw Error(r(160));ym(f,y,u),ft=null,Vt=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vm(t,e),t=t.sibling}var Tn=null;function vm(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(t,e),Wt(e),s&4&&(za(3,e,e.return),rr(3,e),za(5,e,e.return));break;case 1:Yt(t,e),Wt(e),s&512&&(kt||i===null||Un(i,i.return)),s&64&&ua&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var u=Tn;if(Yt(t,e),Wt(e),s&512&&(kt||i===null||Un(i,i.return)),s&4){var f=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(s){case"title":f=u.getElementsByTagName("title")[0],(!f||f[Ro]||f[Lt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(s),u.head.insertBefore(f,u.querySelector("head > title"))),_t(f,s,i),f[Lt]=e,Mt(f),s=f;break e;case"link":var y=vg("link","href",u).get(s+(i.href||""));if(y){for(var x=0;x<y.length;x++)if(f=y[x],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){y.splice(x,1);break t}}f=u.createElement(s),_t(f,s,i),u.head.appendChild(f);break;case"meta":if(y=vg("meta","content",u).get(s+(i.content||""))){for(x=0;x<y.length;x++)if(f=y[x],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){y.splice(x,1);break t}}f=u.createElement(s),_t(f,s,i),u.head.appendChild(f);break;default:throw Error(r(468,s))}f[Lt]=e,Mt(f),s=f}e.stateNode=s}else Cg(u,e.type,e.stateNode);else e.stateNode=xg(u,s,e.memoizedProps);else f!==s?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,s===null?Cg(u,e.type,e.stateNode):xg(u,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Cu(e,e.memoizedProps,i.memoizedProps)}break;case 27:Yt(t,e),Wt(e),s&512&&(kt||i===null||Un(i,i.return)),i!==null&&s&4&&Cu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Yt(t,e),Wt(e),s&512&&(kt||i===null||Un(i,i.return)),e.flags&32){u=e.stateNode;try{zi(u,"")}catch(he){et(e,e.return,he)}}s&4&&e.stateNode!=null&&(u=e.memoizedProps,Cu(e,u,i!==null?i.memoizedProps:u)),s&1024&&(ku=!0);break;case 6:if(Yt(t,e),Wt(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(he){et(e,e.return,he)}}break;case 3:if(el=null,u=Tn,Tn=Zs(t.containerInfo),Yt(t,e),Tn=u,Wt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{yo(t.containerInfo)}catch(he){et(e,e.return,he)}ku&&(ku=!1,Cm(e));break;case 4:s=Tn,Tn=Zs(e.stateNode.containerInfo),Yt(t,e),Wt(e),Tn=s;break;case 12:Yt(t,e),Wt(e);break;case 31:Yt(t,e),Wt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Us(e,s)));break;case 13:Yt(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Hs=bt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Us(e,s)));break;case 22:u=e.memoizedState!==null;var j=i!==null&&i.memoizedState!==null,H=ua,V=kt;if(ua=H||u,kt=V||j,Yt(t,e),kt=V,ua=H,Wt(e),s&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(i===null||j||ua||kt||xi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){j=i=t;try{if(f=j.stateNode,u)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{x=j.stateNode;var Q=j.memoizedProps.style,q=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;x.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(he){et(j,j.return,he)}}}else if(t.tag===6){if(i===null){j=t;try{j.stateNode.nodeValue=u?"":j.memoizedProps}catch(he){et(j,j.return,he)}}}else if(t.tag===18){if(i===null){j=t;try{var G=j.stateNode;u?ug(G,!0):ug(j.stateNode,!1)}catch(he){et(j,j.return,he)}}}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}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Us(e,i))));break;case 19:Yt(t,e),Wt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Us(e,s)));break;case 30:break;case 21:break;default:Yt(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(hm(s)){i=s;break}s=s.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var u=i.stateNode,f=Su(e);_s(e,f,u);break;case 5:var y=i.stateNode;i.flags&32&&(zi(y,""),i.flags&=-33);var x=Su(e);_s(e,x,y);break;case 3:case 4:var j=i.stateNode.containerInfo,H=Su(e);wu(e,H,j);break;default:throw Error(r(161))}}catch(V){et(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ha(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mm(e,t.alternate,t),t=t.sibling}function xi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),xi(t);break;case 1:Un(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&um(t,t.return,i),xi(t);break;case 27:gr(t.stateNode);case 26:case 5:Un(t,t.return),xi(t);break;case 22:t.memoizedState===null&&xi(t);break;case 30:xi(t);break;default:xi(t)}e=e.sibling}}function fa(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,u=e,f=t,y=f.flags;switch(f.tag){case 0:case 11:case 15:fa(u,f,i),rr(4,f);break;case 1:if(fa(u,f,i),s=f,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(H){et(s,s.return,H)}if(s=f,u=s.updateQueue,u!==null){var x=s.stateNode;try{var j=u.shared.hiddenCallbacks;if(j!==null)for(u.shared.hiddenCallbacks=null,u=0;u<j.length;u++)Zf(j[u],x)}catch(H){et(s,s.return,H)}}i&&y&64&&cm(f),sr(f,f.return);break;case 27:fm(f);case 26:case 5:fa(u,f,i),i&&s===null&&y&4&&dm(f),sr(f,f.return);break;case 12:fa(u,f,i);break;case 31:fa(u,f,i),i&&y&4&&bm(u,f);break;case 13:fa(u,f,i),i&&y&4&&xm(u,f);break;case 22:f.memoizedState===null&&fa(u,f,i),sr(f,f.return);break;case 30:break;default:fa(u,f,i)}t=t.sibling}}function Au(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&&Yo(i))}function Nu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yo(e))}function Pn(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sm(e,t,i,s),t=t.sibling}function Sm(e,t,i,s){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Pn(e,t,i,s),u&2048&&rr(9,t);break;case 1:Pn(e,t,i,s);break;case 3:Pn(e,t,i,s),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yo(e)));break;case 12:if(u&2048){Pn(e,t,i,s),e=t.stateNode;try{var f=t.memoizedProps,y=f.id,x=f.onPostCommit;typeof x=="function"&&x(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){et(t,t.return,j)}}else Pn(e,t,i,s);break;case 31:Pn(e,t,i,s);break;case 13:Pn(e,t,i,s);break;case 23:break;case 22:f=t.stateNode,y=t.alternate,t.memoizedState!==null?f._visibility&2?Pn(e,t,i,s):lr(e,t):f._visibility&2?Pn(e,t,i,s):(f._visibility|=2,oo(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Au(y,t);break;case 24:Pn(e,t,i,s),u&2048&&Nu(t.alternate,t);break;default:Pn(e,t,i,s)}}function oo(e,t,i,s,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,y=t,x=i,j=s,H=y.flags;switch(y.tag){case 0:case 11:case 15:oo(f,y,x,j,u),rr(8,y);break;case 23:break;case 22:var V=y.stateNode;y.memoizedState!==null?V._visibility&2?oo(f,y,x,j,u):lr(f,y):(V._visibility|=2,oo(f,y,x,j,u)),u&&H&2048&&Au(y.alternate,y);break;case 24:oo(f,y,x,j,u),u&&H&2048&&Nu(y.alternate,y);break;default:oo(f,y,x,j,u)}t=t.sibling}}function lr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,u=s.flags;switch(s.tag){case 22:lr(i,s),u&2048&&Au(s.alternate,s);break;case 24:lr(i,s),u&2048&&Nu(s.alternate,s);break;default:lr(i,s)}t=t.sibling}}var cr=8192;function ro(e,t,i){if(e.subtreeFlags&cr)for(e=e.child;e!==null;)wm(e,t,i),e=e.sibling}function wm(e,t,i){switch(e.tag){case 26:ro(e,t,i),e.flags&cr&&e.memoizedState!==null&&P0(i,Tn,e.memoizedState,e.memoizedProps);break;case 5:ro(e,t,i);break;case 3:case 4:var s=Tn;Tn=Zs(e.stateNode.containerInfo),ro(e,t,i),Tn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=cr,cr=16777216,ro(e,t,i),cr=s):ro(e,t,i));break;default:ro(e,t,i)}}function km(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 ur(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];jt=s,Nm(s,e)}km(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Am(e),e=e.sibling}function Am(e){switch(e.tag){case 0:case 11:case 15:ur(e),e.flags&2048&&za(9,e,e.return);break;case 3:ur(e);break;case 12:ur(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zs(e)):ur(e);break;default:ur(e)}}function zs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];jt=s,Nm(s,e)}km(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),zs(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,zs(t));break;default:zs(t)}e=e.sibling}}function Nm(e,t){for(;jt!==null;){var i=jt;switch(i.tag){case 0:case 11:case 15:za(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Yo(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,jt=s;else e:for(i=e;jt!==null;){s=jt;var u=s.sibling,f=s.return;if(gm(s),s===i){jt=null;break e}if(u!==null){u.return=f,jt=u;break e}jt=f}}}var KC={getCacheForType:function(e){var t=Ot(Ct),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ot(Ct).controller.signal}},GC=typeof WeakMap=="function"?WeakMap:Map,Xe=0,ot=null,He=null,qe=0,Je=0,ln=null,Ha=!1,so=!1,Du=!1,pa=0,gt=0,Ba=0,vi=0,Tu=0,cn=0,lo=0,dr=null,Qt=null,Pu=!1,Hs=0,Dm=0,Bs=1/0,Fs=null,Fa=null,Dt=0,qa=null,co=null,ma=0,Mu=0,ju=null,Tm=null,hr=0,Eu=null;function un(){return(Xe&2)!==0&&qe!==0?qe&-qe:U.T!==null?Uu():Eo()}function Pm(){if(cn===0)if((qe&536870912)===0||Ge){var e=Ae;Ae<<=1,(Ae&3932160)===0&&(Ae=262144),cn=e}else cn=536870912;return e=rn.current,e!==null&&(e.flags|=32),cn}function $t(e,t,i){(e===ot&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(uo(e,0),Ka(e,qe,cn,!1)),Nn(e,i),((Xe&2)===0||e!==ot)&&(e===ot&&((Xe&2)===0&&(vi|=i),gt===4&&Ka(e,qe,cn,!1)),zn(e))}function Mm(e,t,i){if((Xe&6)!==0)throw Error(r(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ht(e,t),u=s?WC(e,t):Ru(e,t,!0),f=s;do{if(u===0){so&&!s&&Ka(e,t,0,!1);break}else{if(i=e.current.alternate,f&&!VC(i)){u=Ru(e,t,!1),f=!1;continue}if(u===2){if(f=t,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var x=e;u=dr;var j=x.current.memoizedState.isDehydrated;if(j&&(uo(x,y).flags|=256),y=Ru(x,y,!1),y!==2){if(Du&&!j){x.errorRecoveryDisabledLanes|=f,vi|=f,u=4;break e}f=Qt,Qt=u,f!==null&&(Qt===null?Qt=f:Qt.push.apply(Qt,f))}u=y}if(f=!1,u!==2)continue}}if(u===1){uo(e,0),Ka(e,t,0,!0);break}e:{switch(s=e,f=u,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ka(s,t,cn,!Ha);break e;case 2:Qt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Hs+300-bt(),10<u)){if(Ka(s,t,cn,!Ha),De(s,0,!0)!==0)break e;ma=t,s.timeoutHandle=sg(jm.bind(null,s,i,Qt,Fs,Pu,t,cn,vi,lo,Ha,f,"Throttled",-0,0),u);break e}jm(s,i,Qt,Fs,Pu,t,cn,vi,lo,Ha,f,null,-0,0)}}break}while(!0);zn(e)}function jm(e,t,i,s,u,f,y,x,j,H,V,Q,q,G){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},wm(t,f,Q);var he=(f&62914560)===f?Hs-bt():(f&4194048)===f?Dm-bt():0;if(he=M0(Q,he),he!==null){ma=f,e.cancelPendingCommit=he(zm.bind(null,e,t,f,i,s,u,y,x,j,V,Q,null,q,G)),Ka(e,f,y,!H);return}}zm(e,t,f,i,s,u,y,x,j)}function VC(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 s=0;s<i.length;s++){var u=i[s],f=u.getSnapshot;u=u.value;try{if(!an(f(),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 Ka(e,t,i,s){t&=~Tu,t&=~vi,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var u=t;0<u;){var f=31-ke(u),y=1<<f;s[f]=-1,u&=~y}i!==0&&ai(e,i,t)}function qs(){return(Xe&6)===0?(fr(0),!1):!0}function Lu(){if(He!==null){if(Je===0)var e=He.return;else e=He,ia=di=null,Qc(e),eo=null,Qo=0,e=He;for(;e!==null;)lm(e.alternate,e),e=e.return;He=null}}function uo(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,h0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ma=0,Lu(),ot=e,He=i=na(e.current,null),qe=t,Je=0,ln=null,Ha=!1,so=Ht(e,t),Du=!1,lo=cn=Tu=vi=Ba=gt=0,Qt=dr=null,Pu=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var u=31-ke(s),f=1<<u;t|=e[u],s&=~f}return pa=t,us(),i}function Em(e,t){Ee=null,U.H=ar,t===Ji||t===bs?(t=Wf(),Je=3):t===_c?(t=Wf(),Je=4):Je=t===du?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ln=t,He===null&&(gt=1,Es(e,bn(t,e.current)))}function Lm(){var e=rn.current;return e===null?!0:(qe&4194048)===qe?Sn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===Sn:!1}function Rm(){var e=U.H;return U.H=ar,e===null?ar:e}function Om(){var e=U.A;return U.A=KC,e}function Ks(){gt=4,Ha||(qe&4194048)!==qe&&rn.current!==null||(so=!0),(Ba&134217727)===0&&(vi&134217727)===0||ot===null||Ka(ot,qe,cn,!1)}function Ru(e,t,i){var s=Xe;Xe|=2;var u=Rm(),f=Om();(ot!==e||qe!==t)&&(Fs=null,uo(e,t)),t=!1;var y=gt;e:do try{if(Je!==0&&He!==null){var x=He,j=ln;switch(Je){case 8:Lu(),y=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var H=Je;if(Je=0,ln=null,ho(e,x,j,H),i&&so){y=0;break e}break;default:H=Je,Je=0,ln=null,ho(e,x,j,H)}}YC(),y=gt;break}catch(V){Em(e,V)}while(!0);return t&&e.shellSuspendCounter++,ia=di=null,Xe=s,U.H=u,U.A=f,He===null&&(ot=null,qe=0,us()),y}function YC(){for(;He!==null;)Im(He)}function WC(e,t){var i=Xe;Xe|=2;var s=Rm(),u=Om();ot!==e||qe!==t?(Fs=null,Bs=bt()+500,uo(e,t)):so=Ht(e,t);e:do try{if(Je!==0&&He!==null){t=He;var f=ln;t:switch(Je){case 1:Je=0,ln=null,ho(e,t,f,1);break;case 2:case 9:if(Vf(f)){Je=0,ln=null,_m(t);break}t=function(){Je!==2&&Je!==9||ot!==e||(Je=7),zn(e)},f.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Vf(f)?(Je=0,ln=null,_m(t)):(Je=0,ln=null,ho(e,t,f,7));break;case 5:var y=null;switch(He.tag){case 26:y=He.memoizedState;case 5:case 27:var x=He;if(y?Sg(y):x.stateNode.complete){Je=0,ln=null;var j=x.sibling;if(j!==null)He=j;else{var H=x.return;H!==null?(He=H,Gs(H)):He=null}break t}}Je=0,ln=null,ho(e,t,f,5);break;case 6:Je=0,ln=null,ho(e,t,f,6);break;case 8:Lu(),gt=6;break e;default:throw Error(r(462))}}QC();break}catch(V){Em(e,V)}while(!0);return ia=di=null,U.H=s,U.A=u,Xe=i,He!==null?0:(ot=null,qe=0,us(),gt)}function QC(){for(;He!==null&&!Da();)Im(He)}function Im(e){var t=rm(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?Gs(e):He=t}function _m(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=em(i,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=em(i,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:Qc(t);default:lm(i,t),t=He=Of(t,pa),t=rm(i,t,pa)}e.memoizedProps=e.pendingProps,t===null?Gs(e):He=t}function ho(e,t,i,s){ia=di=null,Qc(t),eo=null,Qo=0;var u=t.return;try{if(_C(e,u,t,i,qe)){gt=1,Es(e,bn(i,e.current)),He=null;return}}catch(f){if(u!==null)throw He=u,f;gt=1,Es(e,bn(i,e.current)),He=null;return}t.flags&32768?(Ge||s===1?e=!0:so||(qe&536870912)!==0?e=!1:(Ha=e=!0,(s===2||s===9||s===3||s===6)&&(s=rn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Um(t,e)):Gs(t)}function Gs(e){var t=e;do{if((t.flags&32768)!==0){Um(t,Ha);return}e=t.return;var i=HC(t.alternate,t,pa);if(i!==null){He=i;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);gt===0&&(gt=5)}function Um(e,t){do{var i=BC(e.alternate,e);if(i!==null){i.flags&=32767,He=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=i}while(e!==null);gt=6,He=null}function zm(e,t,i,s,u,f,y,x,j){e.cancelPendingCommit=null;do Vs();while(Dt!==0);if((Xe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=Sc,Mo(e,i,f,y,x,j),e===ot&&(He=ot=null,qe=0),co=t,qa=e,ma=i,Mu=f,ju=u,Tm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,JC(Rn,function(){return Km(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,u=Z.p,Z.p=2,y=Xe,Xe|=4;try{FC(e,t,i)}finally{Xe=y,Z.p=u,U.T=s}}Dt=1,Hm(),Bm(),Fm()}}function Hm(){if(Dt===1){Dt=0;var e=qa,t=co,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var s=Z.p;Z.p=2;var u=Xe;Xe|=4;try{vm(t,e);var f=Vu,y=Nf(e.containerInfo),x=f.focusedElem,j=f.selectionRange;if(y!==x&&x&&x.ownerDocument&&Af(x.ownerDocument.documentElement,x)){if(j!==null&&yc(x)){var H=j.start,V=j.end;if(V===void 0&&(V=H),"selectionStart"in x)x.selectionStart=H,x.selectionEnd=Math.min(V,x.value.length);else{var Q=x.ownerDocument||document,q=Q&&Q.defaultView||window;if(q.getSelection){var G=q.getSelection(),he=x.textContent.length,Ne=Math.min(j.start,he),at=j.end===void 0?Ne:Math.min(j.end,he);!G.extend&&Ne>at&&(y=at,at=Ne,Ne=y);var I=kf(x,Ne),R=kf(x,at);if(I&&R&&(G.rangeCount!==1||G.anchorNode!==I.node||G.anchorOffset!==I.offset||G.focusNode!==R.node||G.focusOffset!==R.offset)){var z=Q.createRange();z.setStart(I.node,I.offset),G.removeAllRanges(),Ne>at?(G.addRange(z),G.extend(R.node,R.offset)):(z.setEnd(R.node,R.offset),G.addRange(z))}}}}for(Q=[],G=x;G=G.parentNode;)G.nodeType===1&&Q.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Q.length;x++){var Y=Q[x];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}il=!!Gu,Vu=Gu=null}finally{Xe=u,Z.p=s,U.T=i}}e.current=t,Dt=2}}function Bm(){if(Dt===2){Dt=0;var e=qa,t=co,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var s=Z.p;Z.p=2;var u=Xe;Xe|=4;try{mm(e,t.alternate,t)}finally{Xe=u,Z.p=s,U.T=i}}Dt=3}}function Fm(){if(Dt===4||Dt===3){Dt=0,Wn();var e=qa,t=co,i=ma,s=Tm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Dt=5:(Dt=0,co=qa=null,qm(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Fa=null),Ei(i),t=t.stateNode,ee&&typeof ee.onCommitFiberRoot=="function")try{ee.onCommitFiberRoot($n,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=U.T,u=Z.p,Z.p=2,U.T=null;try{for(var f=e.onRecoverableError,y=0;y<s.length;y++){var x=s[y];f(x.value,{componentStack:x.stack})}}finally{U.T=t,Z.p=u}}(ma&3)!==0&&Vs(),zn(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===Eu?hr++:(hr=0,Eu=e):hr=0,fr(0)}}function qm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yo(t)))}function Vs(){return Hm(),Bm(),Fm(),Km()}function Km(){if(Dt!==5)return!1;var e=qa,t=Mu;Mu=0;var i=Ei(ma),s=U.T,u=Z.p;try{Z.p=32>i?32:i,U.T=null,i=ju,ju=null;var f=qa,y=ma;if(Dt=0,co=qa=null,ma=0,(Xe&6)!==0)throw Error(r(331));var x=Xe;if(Xe|=4,Am(f.current),Sm(f,f.current,y,i),Xe=x,fr(0,!1),ee&&typeof ee.onPostCommitFiberRoot=="function")try{ee.onPostCommitFiberRoot($n,f)}catch{}return!0}finally{Z.p=u,U.T=s,qm(e,t)}}function Gm(e,t,i){t=bn(i,t),t=uu(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Nn(e,2),zn(e))}function et(e,t,i){if(e.tag===3)Gm(e,e,i);else for(;t!==null;){if(t.tag===3){Gm(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Fa===null||!Fa.has(s))){e=bn(i,e),i=Vp(2),s=Ia(t,i,2),s!==null&&(Yp(i,s,t,e),Nn(s,2),zn(s));break}}t=t.return}}function Ou(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new GC;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(i)||(Du=!0,u.add(i),e=$C.bind(null,e,t,i),t.then(e,e))}function $C(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ot===e&&(qe&i)===i&&(gt===4||gt===3&&(qe&62914560)===qe&&300>bt()-Hs?(Xe&2)===0&&uo(e,0):Tu|=i,lo===qe&&(lo=0)),zn(e)}function Vm(e,t){t===0&&(t=Pt()),e=li(e,t),e!==null&&(Nn(e,t),zn(e))}function XC(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Vm(e,i)}function ZC(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),Vm(e,i)}function JC(e,t){return Ln(e,t)}var Ys=null,fo=null,Iu=!1,Ws=!1,_u=!1,Ga=0;function zn(e){e!==fo&&e.next===null&&(fo===null?Ys=fo=e:fo=fo.next=e),Ws=!0,Iu||(Iu=!0,t0())}function fr(e,t){if(!_u&&Ws){_u=!0;do for(var i=!1,s=Ys;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var f=0;else{var y=s.suspendedLanes,x=s.pingedLanes;f=(1<<31-ke(42|e)+1)-1,f&=u&~(y&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,$m(s,f))}else f=qe,f=De(s,s===ot?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||Ht(s,f)||(i=!0,$m(s,f));s=s.next}while(i);_u=!1}}function e0(){Ym()}function Ym(){Ws=Iu=!1;var e=0;Ga!==0&&d0()&&(e=Ga);for(var t=bt(),i=null,s=Ys;s!==null;){var u=s.next,f=Wm(s,t);f===0?(s.next=null,i===null?Ys=u:i.next=u,u===null&&(fo=i)):(i=s,(e!==0||(f&3)!==0)&&(Ws=!0)),s=u}Dt!==0&&Dt!==5||fr(e),Ga!==0&&(Ga=0)}function Wm(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-ke(f),x=1<<y,j=u[y];j===-1?((x&i)===0||(x&s)!==0)&&(u[y]=Xn(x,t)):j<=t&&(e.expiredLanes|=x),f&=~x}if(t=ot,i=qe,i=De(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&en(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ht(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&en(s),Ei(i)){case 2:case 8:i=ni;break;case 32:i=Rn;break;case 268435456:i=ji;break;default:i=Rn}return s=Qm.bind(null,e),i=Ln(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&en(s),e.callbackPriority=2,e.callbackNode=null,2}function Qm(e,t){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Vs()&&e.callbackNode!==i)return null;var s=qe;return s=De(e,e===ot?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Mm(e,s,t),Wm(e,bt()),e.callbackNode!=null&&e.callbackNode===i?Qm.bind(null,e):null)}function $m(e,t){if(Vs())return null;Mm(e,t,!0)}function t0(){f0(function(){(Xe&6)!==0?Ln(Qn,e0):Ym()})}function Uu(){if(Ga===0){var e=Xi;e===0&&(e=Me,Me<<=1,(Me&261888)===0&&(Me=256)),Ga=e}return Ga}function Xm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ns(""+e)}function Zm(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 n0(e,t,i,s,u){if(t==="submit"&&i&&i.stateNode===u){var f=Xm((u[Kt]||null).action),y=s.submitter;y&&(t=(t=y[Kt]||null)?Xm(t.formAction):y.getAttribute("formAction"),t!==null&&(f=t,y=null));var x=new rs("action","action",null,s,u);e.push({event:x,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ga!==0){var j=y?Zm(u,y):new FormData(u);iu(i,{pending:!0,data:j,method:u.method,action:f},null,j)}}else typeof f=="function"&&(x.preventDefault(),j=y?Zm(u,y):new FormData(u),iu(i,{pending:!0,data:j,method:u.method,action:f},f,j))},currentTarget:u}]})}}for(var zu=0;zu<Cc.length;zu++){var Hu=Cc[zu],a0=Hu.toLowerCase(),i0=Hu[0].toUpperCase()+Hu.slice(1);Dn(a0,"on"+i0)}Dn(Pf,"onAnimationEnd"),Dn(Mf,"onAnimationIteration"),Dn(jf,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(vC,"onTransitionRun"),Dn(CC,"onTransitionStart"),Dn(SC,"onTransitionCancel"),Dn(Ef,"onTransitionEnd"),_i("onMouseEnter",["mouseout","mouseover"]),_i("onMouseLeave",["mouseout","mouseover"]),_i("onPointerEnter",["pointerout","pointerover"]),_i("onPointerLeave",["pointerout","pointerover"]),ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ii("onBeforeInput",["compositionend","keypress","textInput","paste"]),ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pr="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(" "),o0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pr));function Jm(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],u=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var y=s.length-1;0<=y;y--){var x=s[y],j=x.instance,H=x.currentTarget;if(x=x.listener,j!==f&&u.isPropagationStopped())break e;f=x,u.currentTarget=H;try{f(u)}catch(V){cs(V)}u.currentTarget=null,f=j}else for(y=0;y<s.length;y++){if(x=s[y],j=x.instance,H=x.currentTarget,x=x.listener,j!==f&&u.isPropagationStopped())break e;f=x,u.currentTarget=H;try{f(u)}catch(V){cs(V)}u.currentTarget=null,f=j}}}}function Be(e,t){var i=t[Jl];i===void 0&&(i=t[Jl]=new Set);var s=e+"__bubble";i.has(s)||(eg(t,e,2,!1),i.add(s))}function Bu(e,t,i){var s=0;t&&(s|=4),eg(i,e,s,t)}var Qs="_reactListening"+Math.random().toString(36).slice(2);function Fu(e){if(!e[Qs]){e[Qs]=!0,Vh.forEach(function(i){i!=="selectionchange"&&(o0.has(i)||Bu(i,!1,e),Bu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qs]||(t[Qs]=!0,Bu("selectionchange",!1,t))}}function eg(e,t,i,s){switch(Pg(t)){case 2:var u=L0;break;case 8:u=R0;break;default:u=ad}i=u.bind(null,t,i,e),u=void 0,!lc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),s?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 qu(e,t,i,s,u){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var x=s.stateNode.containerInfo;if(x===u)break;if(y===4)for(y=s.return;y!==null;){var j=y.tag;if((j===3||j===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;x!==null;){if(y=Ri(x),y===null)return;if(j=y.tag,j===5||j===6||j===26||j===27){s=f=y;continue e}x=x.parentNode}}s=s.return}of(function(){var H=f,V=rc(i),Q=[];e:{var q=Lf.get(e);if(q!==void 0){var G=rs,he=e;switch(e){case"keypress":if(is(i)===0)break e;case"keydown":case"keyup":G=Zv;break;case"focusin":he="focus",G=hc;break;case"focusout":he="blur",G=hc;break;case"beforeblur":case"afterblur":G=hc;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":G=lf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=Hv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=tC;break;case Pf:case Mf:case jf:G=qv;break;case Ef:G=aC;break;case"scroll":case"scrollend":G=Uv;break;case"wheel":G=oC;break;case"copy":case"cut":case"paste":G=Gv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=uf;break;case"toggle":case"beforetoggle":G=sC}var Ne=(t&4)!==0,at=!Ne&&(e==="scroll"||e==="scrollend"),I=Ne?q!==null?q+"Capture":null:q;Ne=[];for(var R=H,z;R!==null;){var Y=R;if(z=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||z===null||I===null||(Y=Io(R,I),Y!=null&&Ne.push(mr(R,Y,z))),at)break;R=R.return}0<Ne.length&&(q=new G(q,he,null,i,V),Q.push({event:q,listeners:Ne}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",q&&i!==oc&&(he=i.relatedTarget||i.fromElement)&&(Ri(he)||he[Li]))break e;if((G||q)&&(q=V.window===V?V:(q=V.ownerDocument)?q.defaultView||q.parentWindow:window,G?(he=i.relatedTarget||i.toElement,G=H,he=he?Ri(he):null,he!==null&&(at=d(he),Ne=he.tag,he!==at||Ne!==5&&Ne!==27&&Ne!==6)&&(he=null)):(G=null,he=H),G!==he)){if(Ne=lf,Y="onMouseLeave",I="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=uf,Y="onPointerLeave",I="onPointerEnter",R="pointer"),at=G==null?q:Oo(G),z=he==null?q:Oo(he),q=new Ne(Y,R+"leave",G,i,V),q.target=at,q.relatedTarget=z,Y=null,Ri(V)===H&&(Ne=new Ne(I,R+"enter",he,i,V),Ne.target=z,Ne.relatedTarget=at,Y=Ne),at=Y,G&&he)t:{for(Ne=r0,I=G,R=he,z=0,Y=I;Y;Y=Ne(Y))z++;Y=0;for(var Ce=R;Ce;Ce=Ne(Ce))Y++;for(;0<z-Y;)I=Ne(I),z--;for(;0<Y-z;)R=Ne(R),Y--;for(;z--;){if(I===R||R!==null&&I===R.alternate){Ne=I;break t}I=Ne(I),R=Ne(R)}Ne=null}else Ne=null;G!==null&&tg(Q,q,G,Ne,!1),he!==null&&at!==null&&tg(Q,at,he,Ne,!0)}}e:{if(q=H?Oo(H):window,G=q.nodeName&&q.nodeName.toLowerCase(),G==="select"||G==="input"&&q.type==="file")var We=bf;else if(gf(q))if(xf)We=yC;else{We=mC;var ge=pC}else G=q.nodeName,!G||G.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?H&&ic(H.elementType)&&(We=bf):We=gC;if(We&&(We=We(e,H))){yf(Q,We,i,V);break e}ge&&ge(e,q,H),e==="focusout"&&H&&q.type==="number"&&H.memoizedProps.value!=null&&ac(q,"number",q.value)}switch(ge=H?Oo(H):window,e){case"focusin":(gf(ge)||ge.contentEditable==="true")&&(qi=ge,bc=H,Ko=null);break;case"focusout":Ko=bc=qi=null;break;case"mousedown":xc=!0;break;case"contextmenu":case"mouseup":case"dragend":xc=!1,Df(Q,i,V);break;case"selectionchange":if(xC)break;case"keydown":case"keyup":Df(Q,i,V)}var Le;if(pc)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Fi?pf(e,i)&&(Ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ke="onCompositionStart");Ke&&(df&&i.locale!=="ko"&&(Fi||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Fi&&(Le=rf()):(Pa=V,cc="value"in Pa?Pa.value:Pa.textContent,Fi=!0)),ge=$s(H,Ke),0<ge.length&&(Ke=new cf(Ke,e,null,i,V),Q.push({event:Ke,listeners:ge}),Le?Ke.data=Le:(Le=mf(i),Le!==null&&(Ke.data=Le)))),(Le=cC?uC(e,i):dC(e,i))&&(Ke=$s(H,"onBeforeInput"),0<Ke.length&&(ge=new cf("onBeforeInput","beforeinput",null,i,V),Q.push({event:ge,listeners:Ke}),ge.data=Le)),n0(Q,e,H,i,V)}Jm(Q,t)})}function mr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function $s(e,t){for(var i=t+"Capture",s=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=Io(e,i),u!=null&&s.unshift(mr(e,u,f)),u=Io(e,t),u!=null&&s.push(mr(e,u,f))),e.tag===3)return s;e=e.return}return[]}function r0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tg(e,t,i,s,u){for(var f=t._reactName,y=[];i!==null&&i!==s;){var x=i,j=x.alternate,H=x.stateNode;if(x=x.tag,j!==null&&j===s)break;x!==5&&x!==26&&x!==27||H===null||(j=H,u?(H=Io(i,f),H!=null&&y.unshift(mr(i,H,j))):u||(H=Io(i,f),H!=null&&y.push(mr(i,H,j)))),i=i.return}y.length!==0&&e.push({event:t,listeners:y})}var s0=/\r\n?/g,l0=/\u0000|\uFFFD/g;function ng(e){return(typeof e=="string"?e:""+e).replace(s0,`
10
+ `).replace(l0,"")}function ag(e,t){return t=ng(t),ng(e)===t}function nt(e,t,i,s,u,f){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||zi(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&zi(e,""+s);break;case"className":es(e,"class",s);break;case"tabIndex":es(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":es(e,i,s);break;case"style":nf(e,s,f);break;case"data":if(t!=="object"){es(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ns(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="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 f=="function"&&(i==="formAction"?(t!=="input"&&nt(e,t,"name",u.name,u,null),nt(e,t,"formEncType",u.formEncType,u,null),nt(e,t,"formMethod",u.formMethod,u,null),nt(e,t,"formTarget",u.formTarget,u,null)):(nt(e,t,"encType",u.encType,u,null),nt(e,t,"method",u.method,u,null),nt(e,t,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ns(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ea);break;case"onScroll":s!=null&&Be("scroll",e);break;case"onScrollEnd":s!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=ns(""+s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Be("beforetoggle",e),Be("toggle",e),Jr(e,"popover",s);break;case"xlinkActuate":Jn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Jn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Jn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Jn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Jn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Jn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Jr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Iv.get(i)||i,Jr(e,i,s))}}function Ku(e,t,i,s,u,f){switch(i){case"style":nf(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof s=="string"?zi(e,s):(typeof s=="number"||typeof s=="bigint")&&zi(e,""+s);break;case"onScroll":s!=null&&Be("scroll",e);break;case"onScrollEnd":s!=null&&Be("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),t=i.slice(2,u?i.length-7:void 0),f=e[Kt]||null,f=f!=null?f[i]:null,typeof f=="function"&&e.removeEventListener(t,f,u),typeof s=="function")){typeof f!="function"&&f!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,u);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Jr(e,i,s)}}}function _t(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var s=!1,u=!1,f;for(f in i)if(i.hasOwnProperty(f)){var y=i[f];if(y!=null)switch(f){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:nt(e,t,f,y,i,null)}}u&&nt(e,t,"srcSet",i.srcSet,i,null),s&&nt(e,t,"src",i.src,i,null);return;case"input":Be("invalid",e);var x=f=y=u=null,j=null,H=null;for(s in i)if(i.hasOwnProperty(s)){var V=i[s];if(V!=null)switch(s){case"name":u=V;break;case"type":y=V;break;case"checked":j=V;break;case"defaultChecked":H=V;break;case"value":f=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:nt(e,t,s,V,i,null)}}Zh(e,f,x,j,H,y,u,!1);return;case"select":Be("invalid",e),s=y=f=null;for(u in i)if(i.hasOwnProperty(u)&&(x=i[u],x!=null))switch(u){case"value":f=x;break;case"defaultValue":y=x;break;case"multiple":s=x;default:nt(e,t,u,x,i,null)}t=f,i=y,e.multiple=!!s,t!=null?Ui(e,!!s,t,!1):i!=null&&Ui(e,!!s,i,!0);return;case"textarea":Be("invalid",e),f=u=s=null;for(y in i)if(i.hasOwnProperty(y)&&(x=i[y],x!=null))switch(y){case"value":s=x;break;case"defaultValue":u=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:nt(e,t,y,x,i,null)}ef(e,s,u,f);return;case"option":for(j in i)if(i.hasOwnProperty(j)&&(s=i[j],s!=null))switch(j){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:nt(e,t,j,s,i,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(s=0;s<pr.length;s++)Be(pr[s],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(H in i)if(i.hasOwnProperty(H)&&(s=i[H],s!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:nt(e,t,H,s,i,null)}return;default:if(ic(t)){for(V in i)i.hasOwnProperty(V)&&(s=i[V],s!==void 0&&Ku(e,t,V,s,i,void 0));return}}for(x in i)i.hasOwnProperty(x)&&(s=i[x],s!=null&&nt(e,t,x,s,i,null))}function c0(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,y=null,x=null,j=null,H=null,V=null;for(G in i){var Q=i[G];if(i.hasOwnProperty(G)&&Q!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":j=Q;default:s.hasOwnProperty(G)||nt(e,t,G,null,s,Q)}}for(var q in s){var G=s[q];if(Q=i[q],s.hasOwnProperty(q)&&(G!=null||Q!=null))switch(q){case"type":f=G;break;case"name":u=G;break;case"checked":H=G;break;case"defaultChecked":V=G;break;case"value":y=G;break;case"defaultValue":x=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:G!==Q&&nt(e,t,q,G,s,Q)}}nc(e,y,x,j,H,V,f,u);return;case"select":G=y=x=q=null;for(f in i)if(j=i[f],i.hasOwnProperty(f)&&j!=null)switch(f){case"value":break;case"multiple":G=j;default:s.hasOwnProperty(f)||nt(e,t,f,null,s,j)}for(u in s)if(f=s[u],j=i[u],s.hasOwnProperty(u)&&(f!=null||j!=null))switch(u){case"value":q=f;break;case"defaultValue":x=f;break;case"multiple":y=f;default:f!==j&&nt(e,t,u,f,s,j)}t=x,i=y,s=G,q!=null?Ui(e,!!i,q,!1):!!s!=!!i&&(t!=null?Ui(e,!!i,t,!0):Ui(e,!!i,i?[]:"",!1));return;case"textarea":G=q=null;for(x in i)if(u=i[x],i.hasOwnProperty(x)&&u!=null&&!s.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:nt(e,t,x,null,s,u)}for(y in s)if(u=s[y],f=i[y],s.hasOwnProperty(y)&&(u!=null||f!=null))switch(y){case"value":q=u;break;case"defaultValue":G=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&nt(e,t,y,u,s,f)}Jh(e,q,G);return;case"option":for(var he in i)if(q=i[he],i.hasOwnProperty(he)&&q!=null&&!s.hasOwnProperty(he))switch(he){case"selected":e.selected=!1;break;default:nt(e,t,he,null,s,q)}for(j in s)if(q=s[j],G=i[j],s.hasOwnProperty(j)&&q!==G&&(q!=null||G!=null))switch(j){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:nt(e,t,j,q,s,G)}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 Ne in i)q=i[Ne],i.hasOwnProperty(Ne)&&q!=null&&!s.hasOwnProperty(Ne)&&nt(e,t,Ne,null,s,q);for(H in s)if(q=s[H],G=i[H],s.hasOwnProperty(H)&&q!==G&&(q!=null||G!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:nt(e,t,H,q,s,G)}return;default:if(ic(t)){for(var at in i)q=i[at],i.hasOwnProperty(at)&&q!==void 0&&!s.hasOwnProperty(at)&&Ku(e,t,at,void 0,s,q);for(V in s)q=s[V],G=i[V],!s.hasOwnProperty(V)||q===G||q===void 0&&G===void 0||Ku(e,t,V,q,s,G);return}}for(var I in i)q=i[I],i.hasOwnProperty(I)&&q!=null&&!s.hasOwnProperty(I)&&nt(e,t,I,null,s,q);for(Q in s)q=s[Q],G=i[Q],!s.hasOwnProperty(Q)||q===G||q==null&&G==null||nt(e,t,Q,q,s,G)}function ig(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function u0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var u=i[s],f=u.transferSize,y=u.initiatorType,x=u.duration;if(f&&x&&ig(y)){for(y=0,x=u.responseEnd,s+=1;s<i.length;s++){var j=i[s],H=j.startTime;if(H>x)break;var V=j.transferSize,Q=j.initiatorType;V&&ig(Q)&&(j=j.responseEnd,y+=V*(j<x?1:(x-H)/(j-H)))}if(--s,t+=8*(f+y)/(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 Gu=null,Vu=null;function Xs(e){return e.nodeType===9?e:e.ownerDocument}function og(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 rg(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 Yu(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 Wu=null;function d0(){var e=window.event;return e&&e.type==="popstate"?e===Wu?!1:(Wu=e,!0):(Wu=null,!1)}var sg=typeof setTimeout=="function"?setTimeout:void 0,h0=typeof clearTimeout=="function"?clearTimeout:void 0,lg=typeof Promise=="function"?Promise:void 0,f0=typeof queueMicrotask=="function"?queueMicrotask:typeof lg<"u"?function(e){return lg.resolve(null).then(e).catch(p0)}:sg;function p0(e){setTimeout(function(){throw e})}function Va(e){return e==="head"}function cg(e,t){var i=t,s=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(u),yo(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")gr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,gr(i);for(var f=i.firstChild;f;){var y=f.nextSibling,x=f.nodeName;f[Ro]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=y}}else i==="body"&&gr(e.ownerDocument.body);i=u}while(i);yo(t)}function ug(e,t){var i=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Qu(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":Qu(i),ec(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function m0(e,t,i,s){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Ro])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==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(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function g0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=wn(e.nextSibling),e===null))return null;return e}function dg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=wn(e.nextSibling),e===null))return null;return e}function $u(e){return e.data==="$?"||e.data==="$~"}function Xu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function y0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function wn(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 hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return wn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function fg(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 pg(e,t,i){switch(t=Xs(i),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function gr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ec(e)}var kn=new Map,mg=new Set;function Zs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=Z.d;Z.d={f:b0,r:x0,D:v0,C:C0,L:S0,m:w0,X:A0,S:k0,M:N0};function b0(){var e=ga.f(),t=qs();return e||t}function x0(e){var t=Oi(e);t!==null&&t.tag===5&&t.type==="form"?Ep(t):ga.r(e)}var po=typeof document>"u"?null:document;function gg(e,t,i){var s=po;if(s&&typeof t=="string"&&t){var u=gn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),mg.has(u)||(mg.add(u),e={rel:e,crossOrigin:i,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),_t(t,"link",e),Mt(t),s.head.appendChild(t)))}}function v0(e){ga.D(e),gg("dns-prefetch",e,null)}function C0(e,t){ga.C(e,t),gg("preconnect",e,t)}function S0(e,t,i){ga.L(e,t,i);var s=po;if(s&&e&&t){var u='link[rel="preload"][as="'+gn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+gn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+gn(i.imageSizes)+'"]')):u+='[href="'+gn(e)+'"]';var f=u;switch(t){case"style":f=mo(e);break;case"script":f=go(e)}kn.has(f)||(e=b({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),kn.set(f,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(yr(f))||t==="script"&&s.querySelector(br(f))||(t=s.createElement("link"),_t(t,"link",e),Mt(t),s.head.appendChild(t)))}}function w0(e,t){ga.m(e,t);var i=po;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+gn(s)+'"][href="'+gn(e)+'"]',f=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=go(e)}if(!kn.has(f)&&(e=b({rel:"modulepreload",href:e},t),kn.set(f,e),i.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(br(f)))return}s=i.createElement("link"),_t(s,"link",e),Mt(s),i.head.appendChild(s)}}}function k0(e,t,i){ga.S(e,t,i);var s=po;if(s&&e){var u=Ii(s).hoistableStyles,f=mo(e);t=t||"default";var y=u.get(f);if(!y){var x={loading:0,preload:null};if(y=s.querySelector(yr(f)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},i),(i=kn.get(f))&&Ju(e,i);var j=y=s.createElement("link");Mt(j),_t(j,"link",e),j._p=new Promise(function(H,V){j.onload=H,j.onerror=V}),j.addEventListener("load",function(){x.loading|=1}),j.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Js(y,t,s)}y={type:"stylesheet",instance:y,count:1,state:x},u.set(f,y)}}}function A0(e,t){ga.X(e,t);var i=po;if(i&&e){var s=Ii(i).hoistableScripts,u=go(e),f=s.get(u);f||(f=i.querySelector(br(u)),f||(e=b({src:e,async:!0},t),(t=kn.get(u))&&ed(e,t),f=i.createElement("script"),Mt(f),_t(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(u,f))}}function N0(e,t){ga.M(e,t);var i=po;if(i&&e){var s=Ii(i).hoistableScripts,u=go(e),f=s.get(u);f||(f=i.querySelector(br(u)),f||(e=b({src:e,async:!0,type:"module"},t),(t=kn.get(u))&&ed(e,t),f=i.createElement("script"),Mt(f),_t(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(u,f))}}function yg(e,t,i,s){var u=(u=ie.current)?Zs(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=mo(i.href),i=Ii(u).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=mo(i.href);var f=Ii(u).hoistableStyles,y=f.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=u.querySelector(yr(e)))&&!f._p&&(y.instance=f,y.state.loading=5),kn.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},kn.set(e,i),f||D0(u,e,i,y.state))),t&&s===null)throw Error(r(528,""));return y}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=go(i),i=Ii(u).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function mo(e){return'href="'+gn(e)+'"'}function yr(e){return'link[rel="stylesheet"]['+e+"]"}function bg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function D0(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),_t(t,"link",i),Mt(t),e.head.appendChild(t))}function go(e){return'[src="'+gn(e)+'"]'}function br(e){return"script[async]"+e}function xg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+gn(i.href)+'"]');if(s)return t.instance=s,Mt(s),s;var u=b({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Mt(s),_t(s,"style",u),Js(s,i.precedence,e),t.instance=s;case"stylesheet":u=mo(i.href);var f=e.querySelector(yr(u));if(f)return t.state.loading|=4,t.instance=f,Mt(f),f;s=bg(i),(u=kn.get(u))&&Ju(s,u),f=(e.ownerDocument||e).createElement("link"),Mt(f);var y=f;return y._p=new Promise(function(x,j){y.onload=x,y.onerror=j}),_t(f,"link",s),t.state.loading|=4,Js(f,i.precedence,e),t.instance=f;case"script":return f=go(i.src),(u=e.querySelector(br(f)))?(t.instance=u,Mt(u),u):(s=i,(u=kn.get(f))&&(s=b({},i),ed(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),Mt(u),_t(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Js(s,i.precedence,e));return t.instance}function Js(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,f=u,y=0;y<s.length;y++){var x=s[y];if(x.dataset.precedence===t)f=x;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ed(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var el=null;function vg(e,t,i){if(el===null){var s=new Map,u=el=new Map;u.set(i,s)}else u=el,s=u.get(i),s||(s=new Map,u.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var f=i[u];if(!(f[Ro]||f[Lt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(t)||"";y=e+y;var x=s.get(y);x?x.push(f):s.set(y,[f])}}return s}function Cg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function T0(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 Sg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function P0(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=mo(s.href),f=t.querySelector(yr(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=tl.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=f,Mt(f);return}f=t.ownerDocument||t,s=bg(s),(u=kn.get(u))&&Ju(s,u),f=f.createElement("link"),Mt(f);var y=f;y._p=new Promise(function(x,j){y.onload=x,y.onerror=j}),_t(f,"link",s),i.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=tl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var td=0;function M0(e,t){return e.stylesheets&&e.count===0&&al(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&al(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&td===0&&(td=62500*u0());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&al(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>td?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function tl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)al(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var nl=null;function al(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nl=new Map,t.forEach(j0,e),nl=null,tl.call(e))}function j0(e,t){if(!(t.state.loading&4)){var i=nl.get(e);if(i)var s=i.get(null);else{i=new Map,nl.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var y=u[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(i.set(y.dataset.precedence,y),s=y)}s&&i.set(null,s)}u=t.instance,y=u.getAttribute("data-precedence"),f=i.get(y)||s,f===s&&i.set(null,u),i.set(y,u),this.count++,s=tl.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var xr={$$typeof:D,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function E0(e,t,i,s,u,f,y,x,j){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=nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.hiddenUpdates=nn(null),this.identifierPrefix=s,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function wg(e,t,i,s,u,f,y,x,j,H,V,Q){return e=new E0(e,t,i,y,j,H,V,Q,x),t=1,f===!0&&(t|=24),f=on(3,null,null,t),e.current=f,f.stateNode=e,t=Rc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:i,cache:t},Uc(f),e}function kg(e){return e?(e=Vi,e):Vi}function Ag(e,t,i,s,u,f){u=kg(u),s.context===null?s.context=u:s.pendingContext=u,s=Oa(t),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=Ia(e,s,t),i!==null&&($t(i,e,t),Xo(i,e,t))}function Ng(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function nd(e,t){Ng(e,t),(e=e.alternate)&&Ng(e,t)}function Dg(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&$t(t,e,67108864),nd(e,67108864)}}function Tg(e){if(e.tag===13||e.tag===31){var t=un();t=Zn(t);var i=li(e,t);i!==null&&$t(i,e,t),nd(e,t)}}var il=!0;function L0(e,t,i,s){var u=U.T;U.T=null;var f=Z.p;try{Z.p=2,ad(e,t,i,s)}finally{Z.p=f,U.T=u}}function R0(e,t,i,s){var u=U.T;U.T=null;var f=Z.p;try{Z.p=8,ad(e,t,i,s)}finally{Z.p=f,U.T=u}}function ad(e,t,i,s){if(il){var u=id(s);if(u===null)qu(e,t,s,ol,i),Mg(e,s);else if(I0(u,e,t,i,s))s.stopPropagation();else if(Mg(e,s),t&4&&-1<O0.indexOf(e)){for(;u!==null;){var f=Oi(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=ct(f.pendingLanes);if(y!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var j=1<<31-ke(y);x.entanglements[1]|=j,y&=~j}zn(f),(Xe&6)===0&&(Bs=bt()+500,fr(0))}}break;case 31:case 13:x=li(f,2),x!==null&&$t(x,f,2),qs(),nd(f,2)}if(f=id(s),f===null&&qu(e,t,s,ol,i),f===u)break;u=f}u!==null&&s.stopPropagation()}else qu(e,t,s,null,i)}}function id(e){return e=rc(e),od(e)}var ol=null;function od(e){if(ol=null,e=Ri(e),e!==null){var t=d(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 ol=e,null}function Pg(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(tn()){case Qn:return 2;case ni:return 8;case Rn:case On:return 32;case ji:return 268435456;default:return 32}default:return 32}}var rd=!1,Ya=null,Wa=null,Qa=null,vr=new Map,Cr=new Map,$a=[],O0="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 Mg(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Wa=null;break;case"mouseover":case"mouseout":Qa=null;break;case"pointerover":case"pointerout":vr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cr.delete(t.pointerId)}}function Sr(e,t,i,s,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:f,targetContainers:[u]},t!==null&&(t=Oi(t),t!==null&&Dg(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function I0(e,t,i,s,u){switch(t){case"focusin":return Ya=Sr(Ya,e,t,i,s,u),!0;case"dragenter":return Wa=Sr(Wa,e,t,i,s,u),!0;case"mouseover":return Qa=Sr(Qa,e,t,i,s,u),!0;case"pointerover":var f=u.pointerId;return vr.set(f,Sr(vr.get(f)||null,e,t,i,s,u)),!0;case"gotpointercapture":return f=u.pointerId,Cr.set(f,Sr(Cr.get(f)||null,e,t,i,s,u)),!0}return!1}function jg(e){var t=Ri(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=h(i),t!==null){e.blockedOn=t,Lo(e.priority,function(){Tg(i)});return}}else if(t===31){if(t=p(i),t!==null){e.blockedOn=t,Lo(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 rl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=id(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);oc=s,i.target.dispatchEvent(s),oc=null}else return t=Oi(i),t!==null&&Dg(t),e.blockedOn=i,!1;t.shift()}return!0}function Eg(e,t,i){rl(e)&&i.delete(t)}function _0(){rd=!1,Ya!==null&&rl(Ya)&&(Ya=null),Wa!==null&&rl(Wa)&&(Wa=null),Qa!==null&&rl(Qa)&&(Qa=null),vr.forEach(Eg),Cr.forEach(Eg)}function sl(e,t){e.blockedOn===t&&(e.blockedOn=null,rd||(rd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,_0)))}var ll=null;function Lg(e){ll!==e&&(ll=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ll===e&&(ll=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],u=e[t+2];if(typeof s!="function"){if(od(s||i)===null)continue;break}var f=Oi(i);f!==null&&(e.splice(t,3),t-=3,iu(f,{pending:!0,data:u,method:i.method,action:s},s,u))}}))}function yo(e){function t(j){return sl(j,e)}Ya!==null&&sl(Ya,e),Wa!==null&&sl(Wa,e),Qa!==null&&sl(Qa,e),vr.forEach(t),Cr.forEach(t);for(var i=0;i<$a.length;i++){var s=$a[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<$a.length&&(i=$a[0],i.blockedOn===null);)jg(i),i.blockedOn===null&&$a.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var u=i[s],f=i[s+1],y=u[Kt]||null;if(typeof f=="function")y||Lg(i);else if(y){var x=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[Kt]||null)x=y.formAction;else if(od(u)!==null)continue}else x=y.action;typeof x=="function"?i[s+1]=x:(i.splice(s,3),s-=3),Lg(i)}}}function Rg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function sd(e){this._internalRoot=e}cl.prototype.render=sd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,s=un();Ag(i,s,e,t,null,null)},cl.prototype.unmount=sd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ag(e.current,2,null,e,null,null),qs(),t[Li]=null}};function cl(e){this._internalRoot=e}cl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Eo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<$a.length&&t!==0&&t<$a[i].priority;i++);$a.splice(i,0,e),i===0&&jg(e)}};var Og=a.version;if(Og!=="19.2.1")throw Error(r(527,Og,"19.2.1"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var U0={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ul.isDisabled&&ul.supportsFiber)try{$n=ul.inject(U0),ee=ul}catch{}}return kr.createRoot=function(e,t){if(!c(e))throw Error(r(299));var i=!1,s="",u=Fp,f=qp,y=Kp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=wg(e,1,!1,null,null,i,s,null,u,f,y,Rg),e[Li]=t.current,Fu(e),new sd(t)},kr.hydrateRoot=function(e,t,i){if(!c(e))throw Error(r(299));var s=!1,u="",f=Fp,y=qp,x=Kp,j=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError),i.formState!==void 0&&(j=i.formState)),t=wg(e,1,!0,t,i??null,s,u,j,f,y,x,Rg),t.context=kg(null),i=t.current,s=un(),s=Zn(s),u=Oa(s),u.callback=null,Ia(i,u,s),i=s,t.current.lanes=i,Nn(t,i),zn(t),e[Li]=t.current,Fu(e),new cl(t)},kr.version="19.2.1",kr}var Xg;function $w(){if(Xg)return ld.exports;Xg=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(),ld.exports=Qw(),ld.exports}var Xw=$w();const Zw="modulepreload",Jw=function(n){return"/"+n},Zg={},it=function(a,o,r){let c=Promise.resolve();if(o&&o.length>0){let m=function(g){return Promise.all(g.map(v=>Promise.resolve(v).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),p=h?.nonce||h?.getAttribute("nonce");c=m(o.map(g=>{if(g=Jw(g),g in Zg)return;Zg[g]=!0;const v=g.endsWith(".css"),b=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${b}`))return;const C=document.createElement("link");if(C.rel=v?"stylesheet":Zw,v||(C.as="script"),C.crossOrigin="",C.href=g,p&&C.setAttribute("nonce",p),document.head.appendChild(C),v)return new Promise((T,k)=>{C.addEventListener("load",T),C.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function d(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"&&d(p.reason);return a().catch(d)})},ek=new kS({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1,retry:1},mutations:{retry:!1}}}),Te=n=>typeof n=="string",Ar=()=>{let n,a;const o=new Promise((r,c)=>{n=r,a=c});return o.resolve=n,o.reject=a,o},Jg=n=>n==null?"":""+n,tk=(n,a,o)=>{n.forEach(r=>{a[r]&&(o[r]=a[r])})},nk=/###/g,ey=n=>n&&n.indexOf("###")>-1?n.replace(nk,"."):n,ty=n=>!n||Te(n),Lr=(n,a,o)=>{const r=Te(a)?a.split("."):a;let c=0;for(;c<r.length-1;){if(ty(n))return{};const d=ey(r[c]);!n[d]&&o&&(n[d]=new o),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++c}return ty(n)?{}:{obj:n,k:ey(r[c])}},ny=(n,a,o)=>{const{obj:r,k:c}=Lr(n,a,Object);if(r!==void 0||a.length===1){r[c]=o;return}let d=a[a.length-1],h=a.slice(0,a.length-1),p=Lr(n,h,Object);for(;p.obj===void 0&&h.length;)d=`${h[h.length-1]}.${d}`,h=h.slice(0,h.length-1),p=Lr(n,h,Object),p?.obj&&typeof p.obj[`${p.k}.${d}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${d}`]=o},ak=(n,a,o,r)=>{const{obj:c,k:d}=Lr(n,a,Object);c[d]=c[d]||[],c[d].push(o)},wl=(n,a)=>{const{obj:o,k:r}=Lr(n,a);if(o&&Object.prototype.hasOwnProperty.call(o,r))return o[r]},ik=(n,a,o)=>{const r=wl(n,o);return r!==void 0?r:wl(a,o)},Wb=(n,a,o)=>{for(const r in a)r!=="__proto__"&&r!=="constructor"&&(r in n?Te(n[r])||n[r]instanceof String||Te(a[r])||a[r]instanceof String?o&&(n[r]=a[r]):Wb(n[r],a[r],o):n[r]=a[r]);return n},Ci=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ok={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const rk=n=>Te(n)?n.replace(/[&<>"'\/]/g,a=>ok[a]):n;class sk{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const o=this.regExpMap.get(a);if(o!==void 0)return o;const r=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,r),this.regExpQueue.push(a),r}}const lk=[" ",",","?","!",";"],ck=new sk(20),uk=(n,a,o)=>{a=a||"",o=o||"";const r=lk.filter(h=>a.indexOf(h)<0&&o.indexOf(h)<0);if(r.length===0)return!0;const c=ck.getRegExp(`(${r.map(h=>h==="?"?"\\?":h).join("|")})`);let d=!c.test(n);if(!d){const h=n.indexOf(o);h>0&&!c.test(n.substring(0,h))&&(d=!0)}return d},Rd=(n,a,o=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const r=a.split(o);let c=n;for(let d=0;d<r.length;){if(!c||typeof c!="object")return;let h,p="";for(let m=d;m<r.length;++m)if(m!==d&&(p+=o),p+=r[m],h=c[p],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&m<r.length-1)continue;d+=m-d+1;break}c=h}return c},Fr=n=>n?.replace("_","-"),dk={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 kl{constructor(a,o={}){this.init(a,o)}init(a,o={}){this.prefix=o.prefix||"i18next:",this.logger=a||dk,this.options=o,this.debug=o.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,o,r,c){return c&&!this.debug?null:(Te(a[0])&&(a[0]=`${r}${this.prefix} ${a[0]}`),this.logger[o](a))}create(a){return new kl(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new kl(this.logger,a)}}var Fn=new kl;class _l{constructor(){this.observers={}}on(a,o){return a.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const c=this.observers[r].get(o)||0;this.observers[r].set(o,c+1)}),this}off(a,o){if(this.observers[a]){if(!o){delete this.observers[a];return}this.observers[a].delete(o)}}emit(a,...o){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([c,d])=>{for(let h=0;h<d;h++)c(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,d])=>{for(let h=0;h<d;h++)c.apply(c,[a,...o])})}}class ay extends _l{constructor(a,o={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=o,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 o=this.options.ns.indexOf(a);o>-1&&this.options.ns.splice(o,1)}getResource(a,o,r,c={}){const d=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,o],r&&(Array.isArray(r)?p.push(...r):Te(r)&&d?p.push(...r.split(d)):p.push(r)));const m=wl(this.data,p);return!m&&!o&&!r&&a.indexOf(".")>-1&&(a=p[0],o=p[1],r=p.slice(2).join(".")),m||!h||!Te(r)?m:Rd(this.data?.[a]?.[o],r,d)}addResource(a,o,r,c,d={silent:!1}){const h=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let p=[a,o];r&&(p=p.concat(h?r.split(h):r)),a.indexOf(".")>-1&&(p=a.split("."),c=o,o=p[1]),this.addNamespaces(o),ny(this.data,p,c),d.silent||this.emit("added",a,o,r,c)}addResources(a,o,r,c={silent:!1}){for(const d in r)(Te(r[d])||Array.isArray(r[d]))&&this.addResource(a,o,d,r[d],{silent:!0});c.silent||this.emit("added",a,o,r)}addResourceBundle(a,o,r,c,d,h={silent:!1,skipCopy:!1}){let p=[a,o];a.indexOf(".")>-1&&(p=a.split("."),c=r,r=o,o=p[1]),this.addNamespaces(o);let m=wl(this.data,p)||{};h.skipCopy||(r=JSON.parse(JSON.stringify(r))),c?Wb(m,r,d):m={...m,...r},ny(this.data,p,m),h.silent||this.emit("added",a,o,r)}removeResourceBundle(a,o){this.hasResourceBundle(a,o)&&delete this.data[a][o],this.removeNamespaces(o),this.emit("removed",a,o)}hasResourceBundle(a,o){return this.getResource(a,o)!==void 0}getResourceBundle(a,o){return o||(o=this.options.defaultNS),this.getResource(a,o)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const o=this.getDataByLanguage(a);return!!(o&&Object.keys(o)||[]).find(c=>o[c]&&Object.keys(o[c]).length>0)}toJSON(){return this.data}}var Qb={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,o,r,c){return n.forEach(d=>{a=this.processors[d]?.process(a,o,r,c)??a}),a}};const $b=Symbol("i18next/PATH_KEY");function hk(){const n=[],a=Object.create(null);let o;return a.get=(r,c)=>(o?.revoke?.(),c===$b?n:(n.push(c),o=Proxy.revocable(r,a),o.proxy)),Proxy.revocable(Object.create(null),a).proxy}function Od(n,a){const{[$b]:o}=n(hk());return o.join(a?.keySeparator??".")}const iy={},dd=n=>!Te(n)&&typeof n!="boolean"&&typeof n!="number";class Al extends _l{constructor(a,o={}){super(),tk(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Fn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,o={interpolation:{}}){const r={...o};if(a==null)return!1;const c=this.resolve(a,r);if(c?.res===void 0)return!1;const d=dd(c.res);return!(r.returnObjects===!1&&d)}extractFromKey(a,o){let r=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let d=o.ns||this.options.defaultNS||[];const h=r&&a.indexOf(r)>-1,p=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!uk(a,r,c);if(h&&!p){const m=a.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:a,namespaces:Te(d)?[d]:d};const g=a.split(r);(r!==c||r===c&&this.options.ns.indexOf(g[0])>-1)&&(d=g.shift()),a=g.join(c)}return{key:a,namespaces:Te(d)?[d]:d}}translate(a,o,r){let c=typeof o=="object"?{...o}:o;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=Od(a,{...this.options,...c})),Array.isArray(a)||(a=[String(a)]);const d=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),g=m[m.length-1];let v=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const b=c.lng||this.language,C=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b?.toLowerCase()==="cimode")return C?d?{res:`${g}${v}${p}`,usedKey:p,exactUsedKey:p,usedLng:b,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:`${g}${v}${p}`:d?{res:p,usedKey:p,exactUsedKey:p,usedLng:b,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:p;const T=this.resolve(a,c);let k=T?.res;const M=T?.usedKey||p,L=T?.exactUsedKey||p,E=["[object Number]","[object Function]","[object RegExp]"],N=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,A=c.count!==void 0&&!Te(c.count),P=Al.hasDefaultValue(c),w=A?this.pluralResolver.getSuffix(b,c.count,c):"",O=c.ordinal&&A?this.pluralResolver.getSuffix(b,c.count,{ordinal:!1}):"",B=A&&!c.ordinal&&c.count===0,_=B&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${w}`]||c[`defaultValue${O}`]||c.defaultValue;let K=k;D&&!k&&P&&(K=_);const J=dd(K),$=Object.prototype.toString.apply(K);if(D&&K&&J&&E.indexOf($)<0&&!(Te(N)&&Array.isArray(K))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const be=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,K,{...c,ns:m}):`key '${p} (${this.language})' returned an object instead of string.`;return d?(T.res=be,T.usedParams=this.getUsedParamsDetails(c),T):be}if(h){const be=Array.isArray(K),te=be?[]:{},Se=be?L:M;for(const U in K)if(Object.prototype.hasOwnProperty.call(K,U)){const Z=`${Se}${h}${U}`;P&&!k?te[U]=this.translate(Z,{...c,defaultValue:dd(_)?_[U]:void 0,joinArrays:!1,ns:m}):te[U]=this.translate(Z,{...c,joinArrays:!1,ns:m}),te[U]===Z&&(te[U]=K[U])}k=te}}else if(D&&Te(N)&&Array.isArray(k))k=k.join(N),k&&(k=this.extendTranslation(k,a,c,r));else{let be=!1,te=!1;!this.isValidLookup(k)&&P&&(be=!0,k=_),this.isValidLookup(k)||(te=!0,k=p);const U=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:k,Z=P&&_!==k&&this.options.updateMissing;if(te||be||Z){if(this.logger.log(Z?"updateKey":"missingKey",b,g,p,Z?_:k),h){const ue=this.resolve(p,{...c,keySeparator:!1});ue&&ue.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 ne=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let ue=0;ue<W.length;ue++)ne.push(W[ue]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(c.lng||this.language):ne.push(c.lng||this.language);const oe=(ue,pe,X)=>{const ae=P&&X!==k?X:U;this.options.missingKeyHandler?this.options.missingKeyHandler(ue,g,pe,ae,Z,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ue,g,pe,ae,Z,c),this.emit("missingKey",ue,g,pe,k)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?ne.forEach(ue=>{const pe=this.pluralResolver.getSuffixes(ue,c);B&&c[`defaultValue${this.options.pluralSeparator}zero`]&&pe.indexOf(`${this.options.pluralSeparator}zero`)<0&&pe.push(`${this.options.pluralSeparator}zero`),pe.forEach(X=>{oe([ue],p+X,c[`defaultValue${X}`]||_)})}):oe(ne,p,_))}k=this.extendTranslation(k,a,c,T,r),te&&k===p&&this.options.appendNamespaceToMissingKey&&(k=`${g}${v}${p}`),(te||be)&&this.options.parseMissingKeyHandler&&(k=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${v}${p}`:p,be?k:void 0,c))}return d?(T.res=k,T.usedParams=this.getUsedParamsDetails(c),T):k}extendTranslation(a,o,r,c,d){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const m=Te(a)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(m){const b=a.match(this.interpolator.nestingRegexp);g=b&&b.length}let v=r.replace&&!Te(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),a=this.interpolator.interpolate(a,v,r.lng||this.language||c.usedLng,r),m){const b=a.match(this.interpolator.nestingRegexp),C=b&&b.length;g<C&&(r.nest=!1)}!r.lng&&c&&c.res&&(r.lng=this.language||c.usedLng),r.nest!==!1&&(a=this.interpolator.nest(a,(...b)=>d?.[0]===b[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${o[0]}`),null):this.translate(...b,o),r)),r.interpolation&&this.interpolator.reset()}const h=r.postProcess||this.options.postProcess,p=Te(h)?[h]:h;return a!=null&&p?.length&&r.applyPostProcessor!==!1&&(a=Qb.handle(p,a,o,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),a}resolve(a,o={}){let r,c,d,h,p;return Te(a)&&(a=[a]),a.forEach(m=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(m,o),v=g.key;c=v;let b=g.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const C=o.count!==void 0&&!Te(o.count),T=C&&!o.ordinal&&o.count===0,k=o.context!==void 0&&(Te(o.context)||typeof o.context=="number")&&o.context!=="",M=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);b.forEach(L=>{this.isValidLookup(r)||(p=L,!iy[`${M[0]}-${L}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(iy[`${M[0]}-${L}`]=!0,this.logger.warn(`key "${c}" for languages "${M.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!!!")),M.forEach(E=>{if(this.isValidLookup(r))return;h=E;const N=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(N,v,E,L,o);else{let A;C&&(A=this.pluralResolver.getSuffix(E,o.count,o));const P=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(o.ordinal&&A.indexOf(w)===0&&N.push(v+A.replace(w,this.options.pluralSeparator)),N.push(v+A),T&&N.push(v+P)),k){const O=`${v}${this.options.contextSeparator||"_"}${o.context}`;N.push(O),C&&(o.ordinal&&A.indexOf(w)===0&&N.push(O+A.replace(w,this.options.pluralSeparator)),N.push(O+A),T&&N.push(O+P))}}let D;for(;D=N.pop();)this.isValidLookup(r)||(d=D,r=this.getResource(E,L,D,o))}))})}),{res:r,usedKey:c,exactUsedKey:d,usedLng:h,usedNS:p}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,o,r,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,o,r,c):this.resourceStore.getResource(a,o,r,c)}getUsedParamsDetails(a={}){const o=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=a.replace&&!Te(a.replace);let c=r?a.replace:a;if(r&&typeof a.count<"u"&&(c.count=a.count),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!r){c={...c};for(const d of o)delete c[d]}return c}static hasDefaultValue(a){const o="defaultValue";for(const r in a)if(Object.prototype.hasOwnProperty.call(a,r)&&o===r.substring(0,o.length)&&a[r]!==void 0)return!0;return!1}}class oy{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Fn.create("languageUtils")}getScriptPartFromCode(a){if(a=Fr(a),!a||a.indexOf("-")<0)return null;const o=a.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(a){if(a=Fr(a),!a||a.indexOf("-")<0)return a;const o=a.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(a){if(Te(a)&&a.indexOf("-")>-1){let o;try{o=Intl.getCanonicalLocales(a)[0]}catch{}return o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o||(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 o;return a.forEach(r=>{if(o)return;const c=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(c))&&(o=c)}),!o&&this.options.supportedLngs&&a.forEach(r=>{if(o)return;const c=this.getScriptPartFromCode(r);if(this.isSupportedCode(c))return o=c;const d=this.getLanguagePartFromCode(r);if(this.isSupportedCode(d))return o=d;o=this.options.supportedLngs.find(h=>{if(h===d)return h;if(!(h.indexOf("-")<0&&d.indexOf("-")<0)&&(h.indexOf("-")>0&&d.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===d||h.indexOf(d)===0&&d.length>1))return h})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(a,o){if(!a)return[];if(typeof a=="function"&&(a=a(o)),Te(a)&&(a=[a]),Array.isArray(a))return a;if(!o)return a.default||[];let r=a[o];return r||(r=a[this.getScriptPartFromCode(o)]),r||(r=a[this.formatLanguageCode(o)]),r||(r=a[this.getLanguagePartFromCode(o)]),r||(r=a.default),r||[]}toResolveHierarchy(a,o){const r=this.getFallbackCodes((o===!1?[]:o)||this.options.fallbackLng||[],a),c=[],d=h=>{h&&(this.isSupportedCode(h)?c.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return Te(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(a))):Te(a)&&d(this.formatLanguageCode(a)),r.forEach(h=>{c.indexOf(h)<0&&d(this.formatLanguageCode(h))}),c}}const ry={zero:0,one:1,two:2,few:3,many:4,other:5},sy={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class fk{constructor(a,o={}){this.languageUtils=a,this.options=o,this.logger=Fn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(a,o={}){const r=Fr(a==="dev"?"en":a),c=o.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:r,type:c});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];let h;try{h=new Intl.PluralRules(r,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),sy;if(!a.match(/-|_/))return sy;const m=this.languageUtils.getLanguagePartFromCode(a);h=this.getRule(m,o)}return this.pluralRulesCache[d]=h,h}needsPlural(a,o={}){let r=this.getRule(a,o);return r||(r=this.getRule("dev",o)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,o,r={}){return this.getSuffixes(a,r).map(c=>`${o}${c}`)}getSuffixes(a,o={}){let r=this.getRule(a,o);return r||(r=this.getRule("dev",o)),r?r.resolvedOptions().pluralCategories.sort((c,d)=>ry[c]-ry[d]).map(c=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${c}`):[]}getSuffix(a,o,r={}){const c=this.getRule(a,r);return c?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${c.select(o)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",o,r))}}const ly=(n,a,o,r=".",c=!0)=>{let d=ik(n,a,o);return!d&&c&&Te(o)&&(d=Rd(n,o,r),d===void 0&&(d=Rd(a,o,r))),d},hd=n=>n.replace(/\$/g,"$$$$");class cy{constructor(a={}){this.logger=Fn.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(o=>o),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:o,escapeValue:r,useRawValueToEscape:c,prefix:d,prefixEscaped:h,suffix:p,suffixEscaped:m,formatSeparator:g,unescapeSuffix:v,unescapePrefix:b,nestingPrefix:C,nestingPrefixEscaped:T,nestingSuffix:k,nestingSuffixEscaped:M,nestingOptionsSeparator:L,maxReplaces:E,alwaysFormat:N}=a.interpolation;this.escape=o!==void 0?o:rk,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=d?Ci(d):h||"{{",this.suffix=p?Ci(p):m||"}}",this.formatSeparator=g||",",this.unescapePrefix=v?"":b||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=C?Ci(C):T||Ci("$t("),this.nestingSuffix=k?Ci(k):M||Ci(")"),this.nestingOptionsSeparator=L||",",this.maxReplaces=E||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(o,r)=>o?.source===r?(o.lastIndex=0,o):new RegExp(r,"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,o,r,c){let d,h,p;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=T=>{if(T.indexOf(this.formatSeparator)<0){const E=ly(o,m,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,r,{...c,...o,interpolationkey:T}):E}const k=T.split(this.formatSeparator),M=k.shift().trim(),L=k.join(this.formatSeparator).trim();return this.format(ly(o,m,M,this.options.keySeparator,this.options.ignoreJSONStructure),L,r,{...c,...o,interpolationkey:M})};this.resetRegExp();const v=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,b=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>hd(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?hd(this.escape(T)):hd(T)}].forEach(T=>{for(p=0;d=T.regex.exec(a);){const k=d[1].trim();if(h=g(k),h===void 0)if(typeof v=="function"){const L=v(a,d,c);h=Te(L)?L:""}else if(c&&Object.prototype.hasOwnProperty.call(c,k))h="";else if(b){h=d[0];continue}else this.logger.warn(`missed to pass in variable ${k} for interpolating ${a}`),h="";else!Te(h)&&!this.useRawValueToEscape&&(h=Jg(h));const M=T.safeValue(h);if(a=a.replace(d[0],M),b?(T.regex.lastIndex+=h.length,T.regex.lastIndex-=d[0].length):T.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),a}nest(a,o,r={}){let c,d,h;const p=(m,g)=>{const v=this.nestingOptionsSeparator;if(m.indexOf(v)<0)return m;const b=m.split(new RegExp(`${Ci(v)}[ ]*{`));let C=`{${b[1]}`;m=b[0],C=this.interpolate(C,h);const T=C.match(/'/g),k=C.match(/"/g);((T?.length??0)%2===0&&!k||(k?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{h=JSON.parse(C),g&&(h={...g,...h})}catch(M){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,M),`${m}${v}${C}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,m};for(;c=this.nestingRegexp.exec(a);){let m=[];h={...r},h=h.replace&&!Te(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;const g=/{.*}/.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(g!==-1&&(m=c[1].slice(g).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),c[1]=c[1].slice(0,g)),d=o(p.call(this,c[1].trim(),h),h),d&&c[0]===a&&!Te(d))return d;Te(d)||(d=Jg(d)),d||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${a}`),d=""),m.length&&(d=m.reduce((v,b)=>this.format(v,b,r.lng,{...r,interpolationkey:c[1].trim()}),d.trim())),a=a.replace(c[0],d),this.regexp.lastIndex=0}return a}}const pk=n=>{let a=n.toLowerCase().trim();const o={};if(n.indexOf("(")>-1){const r=n.split("(");a=r[0].toLowerCase().trim();const c=r[1].substring(0,r[1].length-1);a==="currency"&&c.indexOf(":")<0?o.currency||(o.currency=c.trim()):a==="relativetime"&&c.indexOf(":")<0?o.range||(o.range=c.trim()):c.split(";").forEach(h=>{if(h){const[p,...m]=h.split(":"),g=m.join(":").trim().replace(/^'+|'+$/g,""),v=p.trim();o[v]||(o[v]=g),g==="false"&&(o[v]=!1),g==="true"&&(o[v]=!0),isNaN(g)||(o[v]=parseInt(g,10))}})}return{formatName:a,formatOptions:o}},uy=n=>{const a={};return(o,r,c)=>{let d=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(d={...d,[c.interpolationkey]:void 0});const h=r+JSON.stringify(d);let p=a[h];return p||(p=n(Fr(r),c),a[h]=p),p(o)}},mk=n=>(a,o,r)=>n(Fr(o),r)(a);class gk{constructor(a={}){this.logger=Fn.create("formatter"),this.options=a,this.init(a)}init(a,o={interpolation:{}}){this.formatSeparator=o.interpolation.formatSeparator||",";const r=o.cacheInBuiltFormats?uy:mk;this.formats={number:r((c,d)=>{const h=new Intl.NumberFormat(c,{...d});return p=>h.format(p)}),currency:r((c,d)=>{const h=new Intl.NumberFormat(c,{...d,style:"currency"});return p=>h.format(p)}),datetime:r((c,d)=>{const h=new Intl.DateTimeFormat(c,{...d});return p=>h.format(p)}),relativetime:r((c,d)=>{const h=new Intl.RelativeTimeFormat(c,{...d});return p=>h.format(p,d.range||"day")}),list:r((c,d)=>{const h=new Intl.ListFormat(c,{...d});return p=>h.format(p)})}}add(a,o){this.formats[a.toLowerCase().trim()]=o}addCached(a,o){this.formats[a.toLowerCase().trim()]=uy(o)}format(a,o,r,c={}){const d=o.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(p=>p.indexOf(")")>-1)){const p=d.findIndex(m=>m.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,p)].join(this.formatSeparator)}return d.reduce((p,m)=>{const{formatName:g,formatOptions:v}=pk(m);if(this.formats[g]){let b=p;try{const C=c?.formatParams?.[c.interpolationkey]||{},T=C.locale||C.lng||c.locale||c.lng||r;b=this.formats[g](p,T,{...v,...c,...C})}catch(C){this.logger.warn(C)}return b}else this.logger.warn(`there was no format function for ${g}`);return p},a)}}const yk=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class bk extends _l{constructor(a,o,r,c={}){super(),this.backend=a,this.store=o,this.services=r,this.languageUtils=r.languageUtils,this.options=c,this.logger=Fn.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?.(r,c.backend,c)}queueLoad(a,o,r,c){const d={},h={},p={},m={};return a.forEach(g=>{let v=!0;o.forEach(b=>{const C=`${g}|${b}`;!r.reload&&this.store.hasResourceBundle(g,b)?this.state[C]=2:this.state[C]<0||(this.state[C]===1?h[C]===void 0&&(h[C]=!0):(this.state[C]=1,v=!1,h[C]===void 0&&(h[C]=!0),d[C]===void 0&&(d[C]=!0),m[b]===void 0&&(m[b]=!0)))}),v||(p[g]=!0)}),(Object.keys(d).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(d),pending:Object.keys(h),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(m)}}loaded(a,o,r){const c=a.split("|"),d=c[0],h=c[1];o&&this.emit("failedLoading",d,h,o),!o&&r&&this.store.addResourceBundle(d,h,r,void 0,void 0,{skipCopy:!0}),this.state[a]=o?-1:2,o&&r&&(this.state[a]=0);const p={};this.queue.forEach(m=>{ak(m.loaded,[d],h),yk(m,a),o&&m.errors.push(o),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(g=>{p[g]||(p[g]={});const v=m.loaded[g];v.length&&v.forEach(b=>{p[g][b]===void 0&&(p[g][b]=!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,o,r,c=0,d=this.retryTimeout,h){if(!a.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:o,fcName:r,tried:c,wait:d,callback:h});return}this.readingCalls++;const p=(g,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(g&&v&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,a,o,r,c+1,d*2,h)},d);return}h(g,v)},m=this.backend[r].bind(this.backend);if(m.length===2){try{const g=m(a,o);g&&typeof g.then=="function"?g.then(v=>p(null,v)).catch(p):p(null,g)}catch(g){p(g)}return}return m(a,o,p)}prepareLoading(a,o,r={},c){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),c&&c();Te(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Te(o)&&(o=[o]);const d=this.queueLoad(a,o,r,c);if(!d.toLoad.length)return d.pending.length||c(),null;d.toLoad.forEach(h=>{this.loadOne(h)})}load(a,o,r){this.prepareLoading(a,o,{},r)}reload(a,o,r){this.prepareLoading(a,o,{reload:!0},r)}loadOne(a,o=""){const r=a.split("|"),c=r[0],d=r[1];this.read(c,d,"read",void 0,void 0,(h,p)=>{h&&this.logger.warn(`${o}loading namespace ${d} for language ${c} failed`,h),!h&&p&&this.logger.log(`${o}loaded namespace ${d} for language ${c}`,p),this.loaded(a,h,p)})}saveMissing(a,o,r,c,d,h={},p=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${r}" as the namespace "${o}" 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(!(r==null||r==="")){if(this.backend?.create){const m={...h,isUpdate:d},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(a,o,r,c,m):v=g(a,o,r,c),v&&typeof v.then=="function"?v.then(b=>p(null,b)).catch(p):p(null,v)}catch(v){p(v)}else g(a,o,r,c,p,m)}!a||!a[0]||this.store.addResource(a[0],o,r,c)}}}const fd=()=>({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]),Te(n[1])&&(a.defaultValue=n[1]),Te(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const o=n[3]||n[2];Object.keys(o).forEach(r=>{a[r]=o[r]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),dy=n=>(Te(n.ns)&&(n.ns=[n.ns]),Te(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Te(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),hl=()=>{},xk=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(o=>{typeof n[o]=="function"&&(n[o]=n[o].bind(n))})},Xb="__i18next_supportNoticeShown",vk=()=>typeof globalThis<"u"&&!!globalThis[Xb],Ck=()=>{typeof globalThis<"u"&&(globalThis[Xb]=!0)},Sk=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 Rr extends _l{constructor(a={},o){if(super(),this.options=dy(a),this.services={},this.logger=Fn,this.modules={external:[]},xk(this),o&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,o),this;setTimeout(()=>{this.init(a,o)},0)}}init(a={},o){this.isInitializing=!0,typeof a=="function"&&(o=a,a={}),a.defaultNS==null&&a.ns&&(Te(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const r=fd();this.options={...r,...this.options,...dy(a)},this.options.interpolation={...r.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=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Sk(this)&&!vk()&&(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 💙"),Ck());const c=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?Fn.init(c(this.modules.logger),this.options):Fn.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=gk;const v=new oy(this.options);this.store=new ay(this.options.resources,this.options);const b=this.services;b.logger=Fn,b.resourceStore=this.store,b.languageUtils=v,b.pluralResolver=new fk(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.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"),g&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(b.formatter=c(g),b.formatter.init&&b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new cy(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new bk(c(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",(T,...k)=>{this.emit(T,...k)}),this.modules.languageDetector&&(b.languageDetector=c(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=c(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new Al(this.services,this.options),this.translator.on("*",(T,...k)=>{this.emit(T,...k)}),this.modules.external.forEach(T=>{T.init&&T.init(this)})}if(this.format=this.options.interpolation.format,o||(o=hl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[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(g=>{this[g]=(...v)=>this.store[g](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...v)=>(this.store[g](...v),this)});const p=Ar(),m=()=>{const g=(v,b)=>{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(b),o(v,b)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),p}loadResources(a,o=hl){let r=o;const c=Te(a)?a:this.language;if(typeof a=="function"&&(r=a),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const d=[],h=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(g=>{g!=="cimode"&&d.indexOf(g)<0&&d.push(g)})};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(d,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(p)})}else r(null)}reloadResources(a,o,r){const c=Ar();return typeof a=="function"&&(r=a,a=void 0),typeof o=="function"&&(r=o,o=void 0),a||(a=this.languages),o||(o=this.options.ns),r||(r=hl),this.services.backendConnector.reload(a,o,d=>{c.resolve(),r(d)}),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"&&Qb.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 o=0;o<this.languages.length;o++){const r=this.languages[o];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,o){this.isLanguageChangingTo=a;const r=Ar();this.emit("languageChanging",a);const c=p=>{this.language=p,this.languages=this.services.languageUtils.toResolveHierarchy(p),this.resolvedLanguage=void 0,this.setResolvedLanguage(p)},d=(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,r.resolve((...g)=>this.t(...g)),o&&o(p,(...g)=>this.t(...g))},h=p=>{!a&&!p&&this.services.languageDetector&&(p=[]);const m=Te(p)?p:p&&p[0],g=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(Te(p)?[p]:p);g&&(this.language||c(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,v=>{d(v,g)})};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),r}getFixedT(a,o,r){const c=(d,h,...p)=>{let m;typeof h!="object"?m=this.options.overloadTranslationOptionHandler([d,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||r||c.keyPrefix);const g=this.options.keySeparator||".";let v;return m.keyPrefix&&Array.isArray(d)?v=d.map(b=>(typeof b=="function"&&(b=Od(b,{...this.options,...h})),`${m.keyPrefix}${g}${b}`)):(typeof d=="function"&&(d=Od(d,{...this.options,...h})),v=m.keyPrefix?`${m.keyPrefix}${g}${d}`:d),this.t(v,m)};return Te(a)?c.lng=a:c.lngs=a,c.ns=o,c.keyPrefix=r,c}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,o={}){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 r=o.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const h=(p,m)=>{const g=this.services.backendConnector.state[`${p}|${m}`];return g===-1||g===0||g===2};if(o.precheck){const p=o.precheck(this,h);if(p!==void 0)return p}return!!(this.hasResourceBundle(r,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(r,a)&&(!c||h(d,a)))}loadNamespaces(a,o){const r=Ar();return this.options.ns?(Te(a)&&(a=[a]),a.forEach(c=>{this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}),this.loadResources(c=>{r.resolve(),o&&o(c)}),r):(o&&o(),Promise.resolve())}loadLanguages(a,o){const r=Ar();Te(a)&&(a=[a]);const c=this.options.preload||[],d=a.filter(h=>c.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return d.length?(this.options.preload=c.concat(d),this.loadResources(h=>{r.resolve(),o&&o(h)}),r):(o&&o(),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 d=c.getTextInfo();if(d&&d.direction)return d.direction}}catch{}const o=["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"],r=this.services?.languageUtils||new oy(fd());return a.toLowerCase().indexOf("-latn")>1?"ltr":o.indexOf(r.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},o){const r=new Rr(a,o);return r.createInstance=Rr.createInstance,r}cloneInstance(a={},o=hl){const r=a.forkResourceStore;r&&delete a.forkResourceStore;const c={...this.options,...a,isClone:!0},d=new Rr(c);if((a.debug!==void 0||a.prefix!==void 0)&&(d.logger=d.logger.clone(a)),["store","services","language"].forEach(p=>{d[p]=this[p]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},r){const p=Object.keys(this.store.data).reduce((m,g)=>(m[g]={...this.store.data[g]},m[g]=Object.keys(m[g]).reduce((v,b)=>(v[b]={...m[g][b]},v),m[g]),m),{});d.store=new ay(p,c),d.services.resourceStore=d.store}if(a.interpolation){const m={...fd().interpolation,...this.options.interpolation,...a.interpolation},g={...c,interpolation:m};d.services.interpolator=new cy(g)}return d.translator=new Al(d.services,c),d.translator.on("*",(p,...m)=>{d.emit(p,...m)}),d.init(c,o),d.translator.options=c,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const me=Rr.createInstance();me.createInstance;me.dir;me.init;me.loadResources;me.reloadResources;me.use;me.changeLanguage;me.getFixedT;me.t;me.exists;me.setDefaultNamespace;me.hasLoadedNamespace;me.loadNamespaces;me.loadLanguages;const wk=(n,a,o,r)=>{const c=[o,{code:a,...r||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(c,"warn","react-i18next::",!0);Di(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},hy={},Zb=(n,a,o,r)=>{Di(o)&&hy[o]||(Di(o)&&(hy[o]=new Date),wk(n,a,o,r))},Jb=(n,a)=>()=>{if(n.isInitialized)a();else{const o=()=>{setTimeout(()=>{n.off("initialized",o)},0),a()};n.on("initialized",o)}},Id=(n,a,o)=>{n.loadNamespaces(a,Jb(n,o))},fy=(n,a,o,r)=>{if(Di(o)&&(o=[o]),n.options.preload&&n.options.preload.indexOf(a)>-1)return Id(n,o,r);o.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(a,Jb(n,r))},kk=(n,a,o={})=>!a.languages||!a.languages.length?(Zb(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:o.lng,precheck:(r,c)=>{if(o.bindI18n&&o.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!c(r.isLanguageChangingTo,n))return!1}}),Di=n=>typeof n=="string",Ak=n=>typeof n=="object"&&n!==null,Nk=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Dk={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Tk=n=>Dk[n],Pk=n=>n.replace(Nk,Tk);let _d={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Pk,transDefaultProps:void 0};const Mk=(n={})=>{_d={..._d,...n}},jk=()=>_d;let ex;const Ek=n=>{ex=n},Lk=()=>ex,Rk={type:"3rdParty",init(n){Mk(n.options.react),Ek(n)}},Ok=S.createContext();class Ik{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(o=>{this.usedNamespaces[o]||(this.usedNamespaces[o]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var pd={exports:{}},md={};var py;function _k(){if(py)return md;py=1;var n=Zd();function a(b,C){return b===C&&(b!==0||1/b===1/C)||b!==b&&C!==C}var o=typeof Object.is=="function"?Object.is:a,r=n.useState,c=n.useEffect,d=n.useLayoutEffect,h=n.useDebugValue;function p(b,C){var T=C(),k=r({inst:{value:T,getSnapshot:C}}),M=k[0].inst,L=k[1];return d(function(){M.value=T,M.getSnapshot=C,m(M)&&L({inst:M})},[b,T,C]),c(function(){return m(M)&&L({inst:M}),b(function(){m(M)&&L({inst:M})})},[b]),h(T),T}function m(b){var C=b.getSnapshot;b=b.value;try{var T=C();return!o(b,T)}catch{return!0}}function g(b,C){return C()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:p;return md.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,md}var my;function Uk(){return my||(my=1,pd.exports=_k()),pd.exports}var zk=Uk();const Hk=(n,a)=>Di(a)?a:Ak(a)&&Di(a.defaultValue)?a.defaultValue:Array.isArray(n)?n[n.length-1]:n,Bk={t:Hk,ready:!1},Fk=()=>()=>{},fe=(n,a={})=>{const{i18n:o}=a,{i18n:r,defaultNS:c}=S.useContext(Ok)||{},d=o||r||Lk();d&&!d.reportNamespaces&&(d.reportNamespaces=new Ik),d||Zb(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=S.useMemo(()=>({...jk(),...d?.options?.react,...a}),[d,a]),{useSuspense:p,keyPrefix:m}=h,g=c||d?.options?.defaultNS,v=Di(g)?[g]:g||["translation"],b=S.useMemo(()=>v,v);d?.reportNamespaces?.addUsedNamespaces?.(b);const C=S.useRef(0),T=S.useCallback(_=>{if(!d)return Fk;const{bindI18n:K,bindI18nStore:J}=h,$=()=>{C.current+=1,_()};return K&&d.on(K,$),J&&d.store.on(J,$),()=>{K&&K.split(" ").forEach(be=>d.off(be,$)),J&&J.split(" ").forEach(be=>d.store.off(be,$))}},[d,h]),k=S.useRef(),M=S.useCallback(()=>{if(!d)return Bk;const _=!!(d.isInitialized||d.initializedStoreOnce)&&b.every(Se=>kk(Se,d,h)),K=a.lng||d.language,J=C.current,$=k.current;if($&&$.ready===_&&$.lng===K&&$.keyPrefix===m&&$.revision===J)return $;const te={t:d.getFixedT(K,h.nsMode==="fallback"?b:b[0],m),ready:_,lng:K,keyPrefix:m,revision:J};return k.current=te,te},[d,b,m,h,a.lng]),[L,E]=S.useState(0),{t:N,ready:D}=zk.useSyncExternalStore(T,M,M);S.useEffect(()=>{if(d&&!D&&!p){const _=()=>E(K=>K+1);a.lng?fy(d,a.lng,b,_):Id(d,b,_)}},[d,a.lng,b,D,p,L]);const A=d||{},P=S.useRef(null),w=S.useRef(),O=_=>{const K=Object.getOwnPropertyDescriptors(_);K.__original&&delete K.__original;const J=Object.create(Object.getPrototypeOf(_),K);if(!Object.prototype.hasOwnProperty.call(J,"__original"))try{Object.defineProperty(J,"__original",{value:_,writable:!1,enumerable:!1,configurable:!1})}catch{}return J},B=S.useMemo(()=>{const _=A,K=_?.language;let J=_;_&&(P.current&&P.current.__original===_?w.current!==K?(J=O(_),P.current=J,w.current=K):J=P.current:(J=O(_),P.current=J,w.current=K));const $=[N,J,D];return $.t=N,$.i18n=J,$.ready=D,$},[N,A,D,A.resolvedLanguage,A.language,A.languages]);if(d&&p&&!D)throw new Promise(_=>{const K=()=>_();a.lng?fy(d,a.lng,b,K):Id(d,b,K)});return B},tx="ccs-ui-locale",qk=["en","zh-CN","vi","ja"];function Qr(n){return n?n.toLowerCase().startsWith("ja")?"ja":n.toLowerCase().startsWith("zh")?"zh-CN":n.toLowerCase().startsWith("vi")?"vi":"en":"en"}function nx(){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(tx);return n?Qr(n):null}catch{return null}}function Kk(){const n=nx();return n||(typeof navigator<"u"?Qr(navigator.language):"en")}function ih(n){const a=nx();return a||(typeof navigator<"u"?Qr(navigator.language):"en")}function Gk(n){const a=Qr(n);if(typeof window<"u")try{window.localStorage.setItem(tx,a)}catch{}return a}const Vk={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:"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",logs:"Logs",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",protectedAccessLabel:"Protected access",remoteGuardLabel:"Remote access guard",loading:"Checking dashboard access…",loginDescription:"Use the username and password configured on the host to access the dashboard.",username:"Username",password:"Password",usernamePlaceholder:"Enter username",passwordPlaceholder:"Enter password",signIn:"Sign In",signingIn:"Signing in...",loginFailed:"Login failed",lightMode:"Light",darkMode:"Dark",noDefaultCredentials:"No default credentials ship with CCS.",credentialsHint:"Credentials are created on the host with `ccs config auth setup`, then used here.",remoteSetupTitle:"Remote access needs host setup",remoteSetupDescription:"This dashboard was opened from a non-local address, but dashboard auth is not enabled on the host yet.",incompleteSetupDescription:"Dashboard auth is turned on, but the host setup is incomplete. Finish the host configuration before signing in.",safetyNoteRemote:"Remote management stays locked until the host owner enables dashboard auth.",safetyNoteLocal:"If you are on the same machine, the localhost URL remains the simplest path in.",safetyNoteSession:"Successful sign-ins create an HTTP-only session that stays scoped to this host.",hostStepTitle:"On the host machine",hostStepDescription:"Create or re-enable dashboard credentials, then reopen this page from the remote device.",localStepTitle:"If this is your machine",localStepDescription:"Open the localhost URL printed by `ccs config` instead of the LAN or Tailscale address.",showPassword:"Show password",hidePassword:"Hide password"},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",deletePreset:"Delete 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",shadowed:"Shadowed",prefixOnly:"Prefix only",current:"Current",currentValue:"Current value",preferredPinnedModel:"Preferred pinned model:",pinnedRouteStatus:"Pinned route status:",pinnedModelNotAdvertised:"Pinned model is not currently advertised by the proxy: {{model}}"},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",profileSummaryCount:"{{count}} profile",profileSummaryCount_other:"{{count}} profiles",profileSummaryEmpty:"Premium quality + local control",summaryBadgeDefaultQuality:"Best quality by default",summaryBadgeLocalLane:"Local lane when task fit wins",summaryExistingTitle:"Choose a profile or add another lane",summaryEmptyTitle:"Choose your first profile lane",summaryExistingDescription:"You already have {{count}} profile in this workspace. Keep premium-quality providers for serious coding and add local runtimes when privacy, cost, or offline work matters.",summaryExistingDescription_other:"You already have {{count}} profiles in this workspace. Keep premium-quality providers for serious coding and add local runtimes when privacy, cost, or offline work matters.",summaryEmptyDescription:"Pick the lane that matches the work. Premium providers stay the default for reliable coding. Local runtimes are best for privacy, cheaper transforms, and experimentation.",qualityLanesTitle:"Best quality lanes",qualityLaneHighlightDefaultQuality:"Best default lane for high-stakes coding quality",alibabaLaneDescription:"Strong direct coding profile when you want a dedicated premium lane outside the OpenRouter catalog.",alibabaLaneHighlightQuality:"Good when you want premium quality with a dedicated endpoint",localRuntimesTitle:"Local runtimes",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"Best for private prompts, local cleanup, and cheap batch transforms",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"Best for custom GGUF setups and advanced self-hosted local workflows",localDetectedModels:"{{count}} local model detected",localDetectedModels_other:"{{count}} local models detected",localNoModelsDetected:"No local models detected yet",localWaitingServer:"Waiting for a local server and model list",localRuntimeCheckingBadge:"Checking",localRuntimeReadyBadge:"Ready",localRuntimeNeedsModelBadge:"Needs model",localRuntimeOfflineBadge:"Offline",localRuntimeCheckingDescription:"Checking the local runtime status before showing setup guidance.",localRuntimeReadyDescription:"Best for private prompts, offline workflows, and cheaper batch transforms.",localRuntimeNeedsModelDescription:"The runtime is up, but the recommended local model still needs to be pulled or loaded.",localRuntimeOfflineDescription:"Use this lane for privacy-sensitive work, cheap local transforms, and offline sessions.",localRuntimeCheckingFooter:"Checking the local runtime...",localRuntimeReadyFooter:"Endpoint ready at {{endpoint}}",localRuntimeMissingModelFooter:"Run `{{command}}` to finish local setup.",localRuntimeOfflineFooter:"Run `{{command}}` to bring the local endpoint online.",localRuntimeSetupAction:"Set up {{label}}",localRuntimeUseAction:"Use {{label}}",localRuntimeFinishAction:"Finish {{label}} setup",runtimeProviderBadge:"Runtime provider setup",runtimeProviderTitle:"Open AI Providers",runtimeProviderManagedDescription:"Use this when you need CLIProxy-managed connectors, provider secrets, and advanced routing controls.",runtimeProviderFeatureConnectors:"Gemini, Codex, Claude, Vertex, and OpenAI-compatible connectors",runtimeProviderFeatureSecrets:"Shared secrets stay outside individual API profiles",runtimeProviderFooter:"Best when multiple profiles should share one provider configuration.",createOpenRouterProfile:"Create OpenRouter Profile",getApiKeyAt:"Get your API key at",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",sharedOption:"Shared",sharedModeHint:"Reuses workspace context across accounts in the same history group.",isolatedModeHint:"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",deeperOption:"Deeper",deeperHint:"Syncs comprehensive 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.",implicationTitle:"What this means after save",isolatedImplication:"This account stays separate. Other accounts will not be able to resume its continuity state.",sameGroupRule:'Accounts must use the same group "{{group}}" before they can share continuity with each other.',noSameGroupPeer:"No other account currently shares this group.",sameGroupPeerCount_one:"{{count}} other account already shares this group.",sameGroupPeerCount_other:"{{count}} other accounts already share this group.",deeperReady_one:"{{count}} same-group account already uses deeper continuity. This is the strongest available handoff setup.",deeperReady_other:"{{count}} same-group accounts already use deeper continuity. This is the strongest available handoff setup.",deeperNeedsPeers:"Deeper continuity is enabled here, but another account in this group still needs deeper continuity for stronger cross-account resume expectations.",standardWarning:"Standard shared mode is good for project context only. Cross-account resume expectations are stronger when both accounts use deeper continuity.",resumeOriginalWarning:"If the old conversation matters, resume it from the original account before you change the setup.",cancel:"Cancel",save:"Save",saving:"Saving..."},historySyncLearningMap:{title:"How History Sync Works",description:"Isolated -> Shared -> Deeper. Cross-account resume needs the same group on both accounts.",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:"Use Sync on each account to move between isolated/shared and choose deeper continuity.",historySyncGroup:"History Sync Group",historySyncGroupDesc:"Same group is required before accounts can share continuity. Default fallback is default.",sameGroupRule:"Right now, accounts only share continuity when both are shared in the same group.",deeperRecommendation:'Group "{{group}}" is shared, but deeper continuity is still the safer choice if users expect cross-account resume.',partialGroup:'Group "{{group}}" is in good shape, but other accounts or groups still need the same-group or deeper setup.',readyGroup:'Group "{{group}}" already has deeper continuity on multiple accounts. This is the strongest available handoff setup.',legacyConfirmation_one:"{{count}} legacy account still needs explicit confirmation.",legacyConfirmation_other:"{{count}} legacy accounts still need explicit confirmation."},continuityReadiness:{title:"Cross-Account Resume Check",description:"Use this card to see what is missing before users switch accounts.",state:{single:"single account",isolated:"resume off","shared-alone":"shared but incomplete","shared-standard":"projects only",partial:"partially ready",ready:"stronger handoff ready"},metrics:{isolated:"Isolated",sharedPeers:"Shared With Peer",deeperReady:"Deeper Ready"},messages:{single:{title:"Only one auth account is configured.",description:"Cross-account handoff does not apply yet. Add another auth account before configuring shared continuity."},isolated:{title:"Cross-account resume is off right now.",description:"All visible accounts are isolated, so a session created in one account will stay with that account."},"shared-alone":{title:"Shared mode exists, but no group has a peer yet.",description_one:"{{count}} shared account is still waiting for another account in the same group.",description_other:"{{count}} shared accounts are still waiting for another account in the same group."},"shared-standard":{title:'Group "{{group}}" shares project context, but deeper continuity is not paired yet.',description:"Users may still expect more than project sharing. Enable deeper continuity on both accounts in this group for stronger handoff expectations."},partial:{title:"One group is ready, but the overall setup is still mixed.",description:"At least one group already uses deeper continuity, but other accounts are still isolated, alone in a shared group, or missing deeper continuity."},ready:{title:'Group "{{group}}" has the strongest available continuity setup.',description:"Multiple accounts in this group already use deeper continuity. Resume behavior still depends on what Claude stores upstream."}},stepsTitle:"What users should do next",steps:{syncBoth:"Open Sync on both accounts, not just the one you are switching into.",sameGroup:'Use the same History Sync Group on both accounts. "{{group}}" is the current recommended group.',enableDeeper:"If users expect cross-account resume instead of project-only sharing, turn on deeper continuity on both accounts.",resumeOriginal:"If the original conversation is important, resume it from the original account before changing continuity settings."},singleSteps:{addAccount:"Create a second ccs auth account before planning any cross-account handoff.",sameGroupLater:"When that second account exists, put both accounts in the same History Sync Group.",enableDeeperLater:"If users will expect cross-account resume instead of project-only sharing, enable deeper continuity on both accounts.",resumeOriginal:"If the original conversation is important, keep resuming it from the original account until the second account is ready."}},continuityOverview:{plainLaneTitle:"Plain ccs is using a different resume lane",plainLaneDescription:"Plain ccs currently resumes from {{lane}}, not this account lane. Recover the original lane first before changing sync settings.",setDefaultHint:"Use the Set Default action on the account you want plain ccs to follow in future sessions.",recommendBadge:"Recommend {{group}}",partialBadge:"Partial sync {{group}}",lane:{native:"native Claude (~/.claude)",accountDefault:"account {{name}}",accountInherited:"account {{name}} via continuity inheritance",profileDefault:"default profile {{name}} via native Claude lane"}},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}}, projects only)",sharedGroupDeeper:"shared ({{group}}, deeper continuity)",sharedGroupLegacy:"shared ({{group}}, projects only, legacy)",isolatedLegacy:"isolated (legacy default)",isolated:"isolated",noSameGroupPeer:"No same-group peer yet",sameGroupPeerCount_one:"{{count}} same-group peer",sameGroupPeerCount_other:"{{count}} same-group peers",legacyReview:"Review and confirm this inferred default.",noHandoff:"Cross-account resume stays in the original account.",badges:{shared:"Shared",deeper:"Deeper",legacy:"Legacy",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:"Settings > Proxy power user mode is skipping the AGY responsibility checklist and Gemini dashboard risk phrase. You accept full responsibility for OAuth/account risk.",powerUserLoadFailed:"Failed to load power user mode settings. Check Settings > Proxy and try again.",powerUserLoading:"Loading power user safety settings. Please wait a moment and retry.",powerUserUnavailableRetry:"Power user mode is unavailable. Complete the required provider safety step and retry.",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. Leave blank to use a safe generated identifier.",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",showPausedAccounts:"Show Paused ({{count}})",hidePausedAccounts:"Hide Paused ({{count}})",visibleTotalRequests:"Visible Requests",visibleAccounts:"Visible Accounts",excludingPausedAccounts:"Excluding {{count}} paused",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",runOnDroidWithFlag:"Run on Droid (--target)",droidAliasExplicit:"Droid alias (explicit)",overrideToClaude:"Override to Claude",overrideToClaudeExplicit:"Override to Claude (explicit)",targetHintPreferredAlias:"Preferred explicit alias:",targetHintClaudeDefault:"Default command:",targetHintLegacyAlias:"Legacy shortcut still works:",targetHintOverride:"You can still override each run with",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",image:"Image",channels:"Channels",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 power user mode",failedUpdateAgyMode:"Failed to update power user mode",failedVerifyAgyMode:"Failed to verify power user mode persistence",notPersistedAgyMode:"Power user mode was not persisted. Config may have been modified by another process.",agyModeEnabled:"Power user mode enabled.",agyModeDisabled:"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 + Gemini Power User Mode",agyModeDesc:"Skip the AGY responsibility checklist and the Gemini dashboard typed acknowledgement.",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 and the Gemini dashboard risk phrase gate. 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 + Gemini power user mode",exactPhrase:"Exact phrase required.",enableAgyMode:"Enable Antigravity + Gemini Power User Mode",toggleAgyMode:"Toggle Antigravity + Gemini 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:": minimal/low/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:"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:"Shared workspace only. Put both accounts in the same group before expecting any handoff.",sharedDeeper:"Shared Deeper",sharedDeeperPrefix:"Adds",sharedDeeperDesc:"Adds session-env, file-history, shell-snapshots, and todos. Recommended when users expect cross-account resume.",isolated:"Isolated",isolatedDesc:"No link. Conversations stay with the original account.",quickCommands:"Quick Commands",quickCommandsDesc:"Copy and run in terminal.",workspaceBadge:"ccs auth Workspace",historySyncBadge:"History & Resume 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 Center",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",liveProbe:"Live Probe",runLiveProbe:"Run Live Probe",rerunLiveProbe:"Re-run Live Probe",probing:"Running probe...",probeNotRun:"Probe not run yet",probeLocalReadinessHint:"Local readiness checks can pass while live runtime access still fails. Use the live probe to verify the full Cursor path.",probeStage:"Stage",probeHttpStatus:"HTTP Status",probeDuration:"Duration",probeModel:"Model",probeMessage:"Message",probeSucceeded:"Probe succeeded",probeFailed:"Probe failed",probeSaveFirst:"Save or discard Cursor changes before running the live probe",refreshStatus:"Refresh Cursor status",refreshConfiguration:"Refresh Cursor configuration"},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."},heroSection:{title:"CCS Config",subtitle:"Claude Code Switch Dashboard"},hubFooter:{logs:"Logs",settings:"Settings",github:"GitHub",copyright:"© {{year}} kaitranntt"},themeToggle:{srLabel:"Toggle theme"},ccsLogo:{alt:"CCS Logo",text:"CCS Config"},claudekitBadge:{title:"Powered by ClaudeKit Framework",alt:"ClaudeKit",poweredBy:"Powered by",claudekit:"ClaudeKit"},codeEditor:{revealSensitive:"Reveal sensitive values",maskSensitive:"Mask sensitive values",valid:"Valid {{language}}",readOnly:"(Read-only)"},commandBuilder:{title:"Command Builder",searchPlaceholder:"Type or select a command...",copy:"Copy",run:"Run",cmdConfig:"Open configuration interface",cmdCreateProfile:"Create a new profile",cmdSwitchProfile:"Switch to a profile",cmdDoctor:"Check system health",cmdListProviders:"List available CLIProxy providers",cmdAddProvider:"Add CLIProxy provider"},confirmDialog:{confirm:"Confirm",cancel:"Cancel"},connectionIndicator:{connected:"Connected",connecting:"Connecting...",disconnected:"Disconnected",reconnecting:"Reconnecting..."},docsLink:{title:"View documentation"},githubLink:{title:"Report an issue on GitHub"},globalEnvIndicator:{injectedCount_one:"{{count}} global env var will be injected at runtime",injectedCount_other:"{{count}} global env vars will be injected at runtime",overriddenCount:"({{count}} overridden by profile)",skippedLabel:"Skipped (profile already defines):",configureInSettings:"Configure in Settings"},localhostDisclaimer:{remoteReadonlyAuthDisabledLong:"Remote dashboard access is read-only because dashboard auth is currently disabled on the host. Re-enable dashboard auth on the host to unlock remote changes.",remoteReadonlyAuthDisabledShort:"Remote dashboard is read-only until dashboard auth is re-enabled on the host.",remoteReadonlySetupLong:"Remote dashboard access is read-only until you run ccs config auth setup on the host.",remoteReadonlySetupShort:"Remote dashboard is read-only until host auth is configured.",localLong:"This dashboard runs locally. All data stays on your machine.",localShort:"Local dashboard - data stays on your device.",dismiss:"Dismiss disclaimer"},privacyToggle:{modeOn:"Privacy mode ON - Click to show data",modeOff:"Privacy mode OFF - Click to hide data"},projectSelectionDialog:{title:"Select Google Cloud Project",description:"Choose which project to use for {{provider}} authentication.",autoSelectCountdown:"(Auto-selecting default in {{count}}s)",default:"Default",allProjects:"All Projects",allProjectsDescription:"Onboard all {{count}} listed projects",useDefault:"Use Default",selecting:"Selecting...",confirmSelection:"Confirm Selection",codeCopied:"Code copied",copyVerificationCode:"Copy verification code"},quickCommands:{title:"Quick Commands",startDefault:"Start Default",startDefaultDesc:"Launch Claude with default profile",glmProfile:"GLM Profile",glmProfileDesc:"Switch to GLM model",healthCheck:"Health Check",healthCheckDesc:"Run system diagnostics",delegateTask:"Delegate Task",delegateTaskDesc:"Delegate to GLM profile"},quotaTooltip:{loadingQuota:"Loading quota...",failedLoadQuota:"Failed to load quota",modelQuotas:"Model Quotas:",rateLimits:"Rate Limits:",plan:"Plan: {{plan}}",quotaSnapshots:"Quota Snapshots:",unlimited:"Unlimited",remaining:"{{remaining}}/{{entitlement}} remaining",tier:"Tier",tierId:"Tier ID",state:"State",credits:"Credits",modelQuotasLower:"Model quotas:",allBucketsReport:"All buckets report {{tokenType}}",requestsRemaining:"{{count}} requests remaining",inputTokensRemaining:"{{count}} input tokens remaining",outputTokensRemaining:"{{count}} output tokens remaining",amountRemaining:"{{count}} remaining",fiveHourLimit:"5h usage limit",weeklyLimit:"Weekly usage limit",weeklyOpus:"Weekly usage (Opus)",weeklySonnet:"Weekly usage (Sonnet)",weeklyOAuthApps:"Weekly usage (OAuth apps)",weeklyCowork:"Weekly usage (Cowork)",extraUsage:"Extra usage",premiumInteractions:"Premium Interactions",chat:"Chat",completions:"Completions",resets:"Resets {{time}}",fiveHourResets:"5h resets {{time}}",weeklyResets:"Weekly resets {{time}}"},sponsorButton:{title:"Sponsor this project on GitHub",sponsor:"Sponsor"},valueMetrics:{apiCostSaved:"API Cost Saved",tokensSaved:"Tokens Saved",queriesFaster:"Queries Faster",errorsReduced:"Errors Reduced",vsLastMonth:"vs last month",throughCaching:"through caching",averageSpeedup:"average speedup",withRetryLogic:"with retry logic",performanceMetrics:"Performance Metrics",monthlySummary:"Monthly Summary",totalSaved:"Total Saved",tokensProcessed:"Tokens Processed",queriesHandled:"Queries Handled",uptime:"Uptime"},updatesSpotlight:{openUpdatesCenter:"Open Updates Center"},deviceCodeDialog:{authorize:"Authorize {{provider}}",enterCodeAtPage:"Enter the code below at the authorization page.",expiresIn:"(Expires in {{time}})",codeExpired:"(Code expired)",copied:"Copied!",copyCode:"Copy Code",waitingForAuth:"Waiting for authorization...",openVerificationPage:"Open verification page",openProviderPage:"Open {{provider}}",copyCodeAria:"Copy verification code",codeCopiedAria:"Code copied"},settingsDialog:{editProfile:"Edit Profile: {{name}}",description:"Configure environment variables and settings for this profile.",loadingSettings:"Loading settings...",envTab:"Environment",rawJsonTab:"Raw JSON",generalTab:"General",noEnvVars:"No environment variables configured.",noEnvVarsHint:"Add variables in your settings.json file.",loadingEditor:"Loading editor...",profileInfo:"Profile Information",profileInfoDesc:"Details about this configuration file.",path:"Path",lastModified:"Last Modified",cancel:"Cancel",saving:"Saving...",saveChanges:"Save Changes",conflictTitle:"File Modified Externally",conflictDesc:"This settings file was modified by another process. Overwrite with your changes or discard?",overwrite:"Overwrite"},setupWizard:{title:"Quick Setup Wizard",stepProviderDesc:"Select a provider to get started",stepAuthDesc:"Authenticate with your provider",stepAccountDesc:"Select which account to use",stepVariantDesc:"Create your custom variant",stepSuccessDesc:"Setup complete!",authStep:{authenticateWith:"Authenticate with {{provider}} to add an account",authenticating:"Authenticating...",authenticateInBrowser:"Authenticate in Browser",completeOAuth:"Complete the OAuth flow in your browser...",orUseTerminal:"Or use terminal",runCommandHint:"Run this command in your terminal:",back:"Back",checking:"Checking...",refreshStatus:"Refresh Status"},accountStep:{selectAccount:"Select an account ({{count}})",defaultAccount:"Default account",or:"Or",addNewAccount:"Add new account",addNewAccountDesc:"Authenticate with a different account",back:"Back"},variantStep:{back:"Back",skip:"Skip"},successStep:{title:"Variant Created!",subtitle:"Your custom variant is ready to use",usage:"Usage:",done:"Done"}},accountSurfaceCard:{business:"Biz",personal:"Pers",variant:"Variant"},accountCardStats:{notUsedYet:"Not used yet"},accountQuotaPanel:{weekly:"Weekly",loadingQuota:"Loading quota..."},userMenu:{signedInAs:"Signed in as {{username}}"},authMonitorLive:{live:"LIVE",accountMonitor:"Account Monitor",updated:"Updated {{time}}",updatedNow:"Updated now",requestsLabel:"req",stats:"Stats",successRate:"Success Rate",missingProjectId:"Missing Project ID",noActivity:"no activity"},providerCard:{missingProjectIdAria:"Missing Project ID"},loginPage:{showPassword:"Show password",hidePassword:"Hide password"},cliproxyStatsOverview:{sessionStatistics:"Session Statistics",realTimeMetrics:"Real-time usage metrics from {{backend}}",offline:"Offline",running:"Running",noActiveSession:"No Active Session",noActiveSessionHint:"Start a CLIProxy session using ccs gemini, ccs codex, or ccs agy to view real-time statistics.",failedLoadStats:"Failed to Load Statistics",totalRequests:"Total Requests",successCount:"{{count}} success",successRate:"Success Rate",totalTokens:"Total Tokens",estimatedCost:"~${{cost}} estimated",modelsUsed:"Models Used",modelUsageDistribution:"Model Usage Distribution",requestCount:"{{count}} requests"},cliproxyTable:{name:"Name",provider:"Provider",model:"Model",account:"Account",status:"Status",default:"Default",actions:"Actions"},cliproxyTabs:{overview:"Overview",variants:"Variants",aiProviders:"AI Providers",controlPanel:"Control Panel"},cliproxyHeader:{ccsLevelAccountManagement:"CCS-level account management",cliproxyNotAvailable:"CLIProxy Not Available",cliproxyControlPanel:"CLIProxy Control Panel",noVariants:"No CLIProxy variants found.",addAccountToStart:"Add an account to get started"},routingGuidance:{roundRobin:"Round robin spreads usage.",fillFirst:"Fill first keeps backup accounts cold until they are needed.",routingStrategy:"Routing strategy",optionalRouting:"Optional routing"},extendedContext:{extendedContext:"Extended Context"},cliproxyConfig:{unsavedChanges:"Unsaved changes",original:"Original",modified:"Modified",reviewChanges:"Review Changes",loadingEditor:"Loading editor..."},providerEditor:{provider:"Provider",filePath:"File Path",lastModified:"Last Modified",defaultTarget:"Default Target",quickUsage:"Quick Usage",modelMapping:"Model Mapping",status:"Status",loadingSettings:"Loading settings...",loadingEditor:"Loading editor...",noAccountsConnected:"No accounts connected",addAccountToStart:"Add an account to get started",gcpProjectIdReadonly:"GCP Project ID (read-only)",projectIdNA:"Project ID: N/A",missingProjectId:"Missing Project ID",missingProjectIdHint:"This may cause errors. Remove the account and re-add it to fetch the project ID.",useIncognito:"Use incognito",aliases:"Aliases",current:"Current",currentValue:"Current value",composite:"composite",defaultLabel:"default",requiredSetup:"Required setup",connectorName:"Connector Name",proxyUrl:"Proxy URL",proxyUrlSet:"Proxy URL set",excludedModels:"Excluded Models",headers:"Headers",secret:"Secret",prefix:"Prefix",modelMappings:"Model Mappings",baseUri:"Base URL",apiKeys:"API Keys",presets:"Apply pre-configured model mappings",createVariant:"Create CLIProxy Variant",agyDenylist:"Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated."},providerEditorAccountItem:{modelsUsed:"Models Used"},bulkActionBar:{applyPreset:"Apply preset"},modelConfigSection:{defaultModel:"Default Model"},rawEditorSection:{rawConfig:"Raw Configuration"},providerEditorHeader:{connectorName:"Connector Name"},aiProvidersFamilyRail:{current:"Current"},aiProvidersEntryCard:{apiKeys:"API Keys"},aiProvidersEntryDialog:{connectorName:"Connector Name",baseUri:"Base URL",proxyUrl:"Proxy URL",secret:"Secret",prefix:"Prefix",excludedModels:"Excluded Models",headers:"Headers",modelMappings:"Model Mappings",requiredSetup:"Required setup",optionalRouting:"Optional routing"},codex:{controlCenter:"Control Center",overview:"Overview",docs:"Docs",nativeCodexRuntime:"Native Codex Runtime",ccsCodexProvider:"CCS Codex provider / bridge",codexDocs:"Codex docs",supportedFlows:"Supported flows",twoSupportedPaths:"Two supported paths:",nativeLabel:"Native:",nativeDesc:"Codex is a first-class, runtime-only target in CCS v1.",ccsBridge:"CCS Bridge",apiProfilesDefault:"API profiles continue to default to Claude or Droid.",recommendedSetupFlow:"Recommended setup flow",fastestPath:"Fastest path",officialChannels:"Official Channels",codexCli:"Codex CLI",openNativeCodex:"Open native Codex",runBuiltInCodex:"Run built-in Codex on Codex",runBuiltInCodexExplicit:"Run built-in Codex on Codex (explicit)",openCodexDashboard:"Open Codex dashboard",status:"Status",profiles:"Profiles",createNewProfile:"Create new profile",createNewProvider:"Create new provider",createNewMcpServer:"Create new MCP server",defaultProvider:"Default provider",useDefault:"Use default",useGlobalProvider:"Use global provider",useProviderDefault:"Use provider default",quickFillWarning:"Quick-fill only. Review before saving.",thisFileUpstreamOwned:"This file is upstream-owned by Codex CLI.",notes:"Notes",approvalPolicy:"Approval policy",sandboxMode:"Sandbox mode",reasoningEffort:"Reasoning effort",useGlobalEffort:"Use global effort",reasoningEffortCapitalized:"Reasoning Effort",thinkingBudgetTokens:"Thinking Budget Tokens",modelContextWindow:"Model context window",autoCompactTokenLimit:"Auto-compact token limit",toolOutputTokenLimit:"Tool output token limit",webSearch:"Web search",personality:"Personality",model:"Model",rawOnly:"Raw only",trusted:"trusted",untrusted:"untrusted",noProjectTrustEntries:"No explicit project trust entries saved.",codexNativeRecipe:"Saved native Codex recipe",gptContextCap:"GPT-5.4 context cap",usageLimitCost:"Usage-limit cost above 272K",longContextOverride:"Long context override",counts2x:"Counts 2x",normalUsageWindow:"Normal usage window",useCodexDefault:"Use Codex default",stdio:"stdio",streamableHttp:"streamable-http",responses:"responses",defaultTargetCli:"Default Target CLI",executionChain:"Execution chain",targetPath:"Current target path",userConfig:"User config",configYaml:"config.yaml",flow:"Flow",docsTab:"Docs"},droidSettings:{quickControls:"Quick Controls",reasoningControls:"Reasoning Controls",thinkingBudget:"Thinking Budget",anthropicOnly:"Anthropic models only",byokCustomModels:"BYOK Custom Models"},rawJsonSettingsEditor:{title:"Raw Settings Editor"},copilotConfigForm:{copilotConfiguration:"Copilot Configuration",deprecatedModels:"Deprecated Copilot models detected",failedLoadStatus:"Failed to load status",useWithClaudeCode:"Use your GitHub Copilot subscription with Claude Code",githubCopilotControls:"GitHub Copilot controls prompt/context limits upstream.",provider:"Provider",filePath:"File Path",status:"Status",enabled:"Enabled",disabled:"Disabled",loadingEditor:"Loading editor...",modelMapping:"Model Mapping",quickUsage:"Quick Usage",noPremiumUsage:"No premium usage count"},copilotPresets:{gpt5Codex:"GPT-5.3 Codex",claude46:"Claude 4.6",gemini3:"Gemini 3"},healthCard:{allSystemsNominal:"All Systems Nominal",machineChecks:"Machine checks"},analyticsCards:{cacheCost:"Cache Cost",hitRate:"Hit Rate",inputOutputRatio:"Input/Output Ratio",noCacheData:"No cache data available",noModelData:"No model data available",noSessionData:"No session data available",noTokenData:"No token data available",totalCost:"Total Cost",totalTokens:"Total Tokens",usageInsights:"Usage Insights"},dateRangeFilter:{pickADate:"Pick a date"},logsConfig:{level:"Lvl",message:"Message",source:"Source",time:"Time",proc:"Proc",open:"Open",run:"Run",refreshEntries:"Refresh Entries"},logsDetailPanel:{details:"Details"},logsFilters:{filters:"Filters"},logsOverviewCards:{overview:"Overview"},logsPageSkeleton:{loadingLogs:"Loading logs..."},monitoringErrorLogs:{logContent:"Log Content"},analyticsPages:{chartsGrid:"Charts",costByModel:"Cost by Model"},toasts:{profileCreated:"Profile created successfully",profileUpdated:"Profile updated successfully",profileDeleted:"Profile deleted successfully",orphanProfilesComplete:"Orphan profiles registration complete",profileCopied:"Profile copied successfully",profileImported:"Profile imported successfully",authRequired:"{{provider}} authorization required",authSuccess:"{{provider}} authentication successful!",authFailed:"{{provider}} authentication failed",deviceCodeExpired:"Device code expired. Please try again.",codeCopied:"Code copied to clipboard",failedCopy:"Failed to copy code",configSaved:"Configuration saved successfully",configSaveFailed:"Failed to save: {{error}}",invalidYaml:"Cannot save invalid YAML",configUpdatedExternally:"Configuration updated externally",settingsFileUpdated:"Settings file updated",accountsUpdated:"Accounts updated",noProfilesToSync:"No profiles to sync",syncFailed:"Sync failed: {{error}}",providerAuthSuccess:"{{provider}} authentication successful",providerDeviceCodeInCallback:"Provider returned Device Code flow in callback mode",loggingConfigSaved:"Logging configuration saved.",loggingConfigSaveFailed:"Failed to save logging configuration.",unifiedConfigUpdated:"Configuration updated successfully",migrationPreviewComplete:"Migration preview completed",migrationComplete:"Migration completed successfully",migrationFailed:"Migration failed",rollbackComplete:"Rollback completed successfully",rollbackFailed:"Rollback failed",defaultAccountSet:'Default account set to "{{name}}"',defaultAccountReset:"Default account reset to CCS",accountDeleted:'Account "{{name}}" deleted',contextUpdated:'Updated "{{name}}" context to {{summary}}',legacyConfirmError:'Account "{{name}}" needs explicit confirmation. Use Edit History Sync on this account.',legacyConfirmFailed:'Legacy account "{{name}}" failed confirmation: {{error}}',legacyConfirmSuccess_one:"{{count}} legacy account confirmed",legacyConfirmSuccess_other:"{{count}} legacy accounts confirmed",noLegacyAccounts:"No legacy accounts need confirmation",routingStrategySet:"Routing strategy set to {{strategy}}",variantCreated:"Variant created successfully",variantUpdated:"Variant updated successfully",variantDeleted:"Variant deleted successfully",defaultAccountUpdated:"Default account updated",accountRemoved:"Account removed",accountPaused:"Account paused",accountResumed:"Account resumed",accountAdded:"Account added for {{provider}}",kiroImported:"Imported Kiro account: {{name}}",kiroTokenImported:"Kiro token imported",modelUpdated:"Model updated",presetSaved:'Preset "{{name}}" saved',presetDeleted:"Preset deleted",cliproxyAlreadyRunning:"CLIProxy was already running",cliproxyStarted:"CLIProxy started successfully",cliproxyStartFailed:"Failed to start CLIProxy",cliproxyStopped:"CLIProxy stopped",cliproxyStopFailed:"Failed to stop CLIProxy",presetApplied:'Applied "{{name}}" preset',presetAppliedCustom:"Applied custom preset",settingsSavedWithAdjustments:"Settings saved with model adjustments",settingsSaved:"Settings saved",failedSaveSettings:"Failed to save settings",codexRefreshFailed:"Failed to refresh Codex snapshot. Raw edits were kept.",codexRefreshError:"Failed to refresh Codex snapshot.",codexFixToml:"Fix TOML before saving.",codexSaved:"Saved Codex config.toml.",codexChangedExternally:"config.toml changed externally. Refresh and retry.",codexSaveFailed:"Failed to save Codex config.toml.",codexUpdateFailed:"Failed to update Codex config.",noOrphanProfiles:"No orphan profile settings found",profilesRegistered:"Registered {{count}} profile(s){{skipped}}",destinationEmpty:"Destination profile name cannot be empty",profileExportDownloaded:"Profile export downloaded",profileImportFailed:"Failed to import profile bundle"},profileEditorSections:{imageAnalysis:"Image Analysis",loadingImageSettings:"Loading image settings...",skipPermissionPrompts:"Skip permission prompts on launch",useNativeImageReading:"Use native image reading",skipTransformer:"Skip transformer",friendlyUi:"Friendly UI",info:"Info"},imageAnalysisStatus:{sectionTitle:"Image",openSettings:"Open Settings",useNativeImageReading:"Use native image reading",refreshingPreview:"Refreshing preview",savedStatus:"Saved status",livePreview:"Live preview",disabledGlobally:"Disabled globally",targetBypassesHook:"{{target}} bypasses the hook",nativeImageReading:"Native image reading",setupNeeded:"Setup needed",needsAuth:"Needs auth",needsProxy:"Needs proxy",nativeFallback:"Native fallback",transformerReady:"Transformer ready",badgeDisabled:"Disabled",badgeBypassed:"Bypassed",badgeNative:"Native",badgeSetup:"Setup",badgeAuth:"Auth",badgeProxy:"Proxy",badgeReady:"Ready",capabilityVerified:"Verified",capabilityUnknown:"Unknown",toggleSummaryNativeCapable:"{{model}} looks image-ready. CCS will bypass the transformer here.",toggleSummaryNativeModel:"CCS will prefer native reading for {{model}}.",toggleSummaryNativeDefault:"CCS will prefer native image reading for this profile.",toggleSummaryNativeFileAccess:"This profile currently stays on native file access.",toggleSummaryInactiveTarget:"Saved Claude-side image routing is inactive while {{target}} is selected.",toggleSummaryTransformerRoute:"Transformer route: {{backend}}{{modelSuffix}}.",noteDisabledGlobally:"Image is disabled globally in CCS settings.",noteTargetBypassesHook:"Current target {{target}} bypasses the Claude Read hook.",notePersistHook:"Persist the profile hook before transformer routing can run here.",targetLabel:{claude:"Claude Code",droid:"Factory Droid",codex:"Codex CLI"}},openrouterBadge:{new:"NEW",integration:"OpenRouter Integration"},openrouterBanner:{accessModels:"Access {{count}}+ models via OpenRouter",add:"Add"},openrouterModelPicker:{searchModels:"Search Models",newestModels:"Newest Models"},openrouterPromoCard:{title:"OpenRouter",description:"Access hundreds of models from one API endpoint."},profileCard:{profile:"Profile",openRouter:"OpenRouter profile",claudeCode:"Claude Code",claudeCodeDefault:"Claude Code (default)",factoryDroid:"Factory Droid",codexCli:"Codex CLI",ccsProfile:"CCS profile"},profileDeck:{profiles:"Profiles",failedToLoad:"Failed to load profiles: {{message}}",noProfiles:"No profiles configured. Create your first profile to get started."},profilesTable:{name:"Name",provider:"Provider",model:"Model",target:"Target",lastModified:"Last Modified",actions:"Actions",edit:"Edit"},profileCreateDialog:{createProfile:"Create Profile",appliedModelToTiers:'Applied "{{model}}" to all model tiers',profileCreated:'Profile "{{name}}" created',failedCreate:"Failed to create profile",chooseProviderHint:"Choose a provider preset or configure a custom API endpoint.",basicInformation:"Basic Information",modelConfiguration:"Model Configuration",usedInCli:"Used in CLI:",apiBaseUrl:"API Base URL",baseUrlPlaceholder:"https://api.example.com/v1",prefilledFromPreset:"Pre-filled from {{name}}. You can customize if needed.",optionalForPreset:"Optional for {{name}}. Leave blank to use native Anthropic auth.",endpointHint:"The endpoint that accepts OpenAI-compatible and Anthropic requests",optional:"(optional)",apiKeyOptionalPlaceholder:"Optional - only if auth is enabled",apiKeyPlaceholder:"sk-...",apiKeyOptionalHint:"Only needed if your local endpoint has authentication enabled",defaultTargetCli:"Default Target CLI",modelMapping:"Model Mapping",modelMappingDesc:"Map Claude Code tiers (Opus/Sonnet/Haiku) to models supported by your provider.",searchModelsPlaceholder:"Type to search (e.g., opus, sonnet, gpt-4o)...",noModelsFound:'No models found for "{{query}}"',loadingModels:"Loading models...",defaultModel:"Default Model",sonnetMapping:"Sonnet Mapping",opusMapping:"Opus Mapping",haikuMapping:"Haiku Mapping",sonnetMappingPlaceholder:"e.g. gpt-4o, claude-sonnet-4",opusMappingPlaceholder:"e.g. o1, claude-opus-4.5",haikuMappingPlaceholder:"e.g. gpt-4o-mini, claude-3.5-haiku",free:"Free"},profileDialogLegacy:{editProfile:"Edit Profile"},supportEntryCard:{actionRequired:"Action Required"},settingsPage:{title:"Settings",loading:"Loading...",failedLoad:"Failed to load settings.",tabs:{web:"Web",env:"Env",think:"Think",proxy:"Proxy",auth:"Auth",backup:"Backup",channels:"Channels",imageAnalysis:"Image"},websearchSection:{title:"Web Search",description:"CLI-based web search configuration."},thinkingSection:{title:"Thinking",description:"Configure extended thinking/reasoning for supported models.",directOverride:"Direct override",youType:"You type:",ccsAdds:"CCS adds:",executionChain:"Execution chain",primaryBackends:"Primary backends",legacyCliFallbacks:"Legacy CLI fallbacks",managedPayload:"Managed payload",sharedTargetMetadata:"Shared target metadata",ideTargetMetadata:"IDE target metadata",ideSettingsPath:"IDE settings path",ideHost:"IDE host",resolvedBinding:"Resolved binding",bindingName:"Binding name",inSync:"In sync",currentTargetPath:"Current target path",warnings:"Warnings",notes:"Notes",workspacePresets:"Workspace presets",draft:"Draft",advanced:"Advanced",recommended:"Recommended setup flow",configureModelFirst:"Configure a model first"},proxySection:{title:"Proxy",loadingImageSettings:"Loading image settings..."},channelsSection:{title:"Official Channels",description:"View and manage official release channels."},imageAnalysisSection:{title:"Image Analysis",description:"Configure image analysis settings.",loading:"Loading image settings..."}},codexPage:{title:"Codex",controlCenter:"Control Center",overview:"Overview",docs:"Docs",nativeRuntime:"Native Runtime",ccsProvider:"CCS Provider",setup:"Setup"},apiPage:{title:"API Profiles",subtitle:"Manage your API profiles and endpoints."},claudeExtensionPage:{title:"Claude Extension",subtitle:"Claude Extension integration settings.",claudeAuth:"Claude auth",status:"Status",targetMetadata:"IDE target metadata"},sharedPageV2:{title:"Shared",subtitle:"Shared data management."},homePageV2:{title:"Home",logsMoved:"Logs moved to a dedicated workspace",profiles:"Profiles",cliproxy:"CLIProxy",accounts:"Accounts",health:"Health"},analyticsPageV2:{title:"Analytics",subtitle:"Usage analytics and insights."},logsPageV2:{title:"Logs",subtitle:"View and manage system logs."},healthPageV2:{title:"Health",subtitle:"System health monitoring."},aiProvidersPage:{title:"AI Providers",subtitle:"Manage AI provider configurations.",unableToLoad:"Unable to load AI Providers"}}},"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:"健康",logs:"日志",settings:"设置",openrouterTooltip:"精选:OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"配置",cliproxy:"CLIProxy",accounts:"账号",health:"健康",configurationRequired:"需要配置"},auth:{dashboardTitle:"CCS 控制台",protectedAccessLabel:"受保护访问",remoteGuardLabel:"远程访问保护",loading:"正在检查控制台访问状态…",loginDescription:"使用主机上配置的用户名和密码访问控制台。",username:"用户名",password:"密码",usernamePlaceholder:"请输入用户名",passwordPlaceholder:"请输入密码",signIn:"登录",signingIn:"登录中...",loginFailed:"登录失败",lightMode:"浅色",darkMode:"深色",noDefaultCredentials:"CCS 不提供默认用户名或密码。",credentialsHint:"凭据需要在主机上通过 `ccs config auth setup` 创建,然后在这里使用。",remoteSetupTitle:"远程访问需要在主机上完成设置",remoteSetupDescription:"当前通过非本机地址打开控制台,但主机尚未启用控制台认证。",incompleteSetupDescription:"控制台认证已开启,但主机上的设置尚未完成。请先完成主机配置再登录。",safetyNoteRemote:"在主机所有者启用控制台认证前,远程管理会保持锁定。",safetyNoteLocal:"如果你就在这台机器上,使用 localhost 地址始终是最直接的方式。",safetyNoteSession:"登录成功后会创建仅限此主机的 HTTP-only 会话。",hostStepTitle:"在主机上操作",hostStepDescription:"创建或重新启用控制台凭据,然后再从远程设备重新打开此页面。",localStepTitle:"如果这就是你的机器",localStepDescription:"请使用 `ccs config` 输出的 localhost 地址,而不是局域网或 Tailscale 地址。",showPassword:"显示密码",hidePassword:"隐藏密码"},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:"应用预设",deletePreset:"删除预设"},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:"暂无可用模型",shadowed:"已遮蔽",prefixOnly:"仅前缀",current:"当前",currentValue:"当前值",preferredPinnedModel:"偏好的固定模型:",pinnedRouteStatus:"固定路由状态:",pinnedModelNotAdvertised:"固定模型当前未被代理广播:{{model}}"},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,接入全部提供商",profileSummaryCount:"{{count}} 个配置",profileSummaryCount_other:"{{count}} 个配置",profileSummaryEmpty:"高级质量 + 本地控制",summaryBadgeDefaultQuality:"默认最佳质量",summaryBadgeLocalLane:"任务合适时使用本地通道",summaryExistingTitle:"选择一个配置,或添加新的通道",summaryEmptyTitle:"选择你的第一条配置通道",summaryExistingDescription:"此工作区中已存在 {{count}} 个配置。对于严肃编码工作请优先使用高质量提供商,而在隐私、成本或离线场景下再增加本地运行时。",summaryExistingDescription_other:"此工作区中已存在 {{count}} 个配置。对于严肃编码工作请优先使用高质量提供商,而在隐私、成本或离线场景下再增加本地运行时。",summaryEmptyDescription:"根据任务选择通道。高级提供商仍是可靠编码的默认选择;本地运行时更适合隐私、低成本转换和实验。",qualityLanesTitle:"高质量通道",qualityLaneHighlightDefaultQuality:"高风险编码任务的默认最佳通道",alibabaLaneDescription:"当你想要一个独立于 OpenRouter 目录之外的高级编码通道时,这是一个强力的直连配置。",alibabaLaneHighlightQuality:"适合需要独立端点的高级质量场景",localRuntimesTitle:"本地运行时",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"最适合隐私敏感提示、本地清理和低成本批处理转换",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"最适合自定义 GGUF 部署和高级自托管本地工作流",localDetectedModels:"已检测到 {{count}} 个本地模型",localDetectedModels_other:"已检测到 {{count}} 个本地模型",localNoModelsDetected:"尚未检测到本地模型",localWaitingServer:"正在等待本地服务和模型列表",localRuntimeCheckingBadge:"检测中",localRuntimeReadyBadge:"就绪",localRuntimeNeedsModelBadge:"缺少模型",localRuntimeOfflineBadge:"离线",localRuntimeCheckingDescription:"正在检查本地运行时状态,然后再显示设置引导。",localRuntimeReadyDescription:"最适合私有提示、离线工作流和更便宜的批量转换。",localRuntimeNeedsModelDescription:"运行时已启动,但推荐的本地模型仍需要拉取或加载。",localRuntimeOfflineDescription:"这个通道适合隐私敏感工作、低成本本地转换和离线会话。",localRuntimeCheckingFooter:"正在检查本地运行时...",localRuntimeReadyFooter:"端点已就绪:{{endpoint}}",localRuntimeMissingModelFooter:"运行 `{{command}}` 完成本地设置。",localRuntimeOfflineFooter:"运行 `{{command}}` 启动本地端点。",localRuntimeSetupAction:"设置 {{label}}",localRuntimeUseAction:"使用 {{label}}",localRuntimeFinishAction:"完成 {{label}} 设置",runtimeProviderBadge:"运行时提供商设置",runtimeProviderTitle:"打开 AI Providers",runtimeProviderManagedDescription:"当你需要 CLIProxy 管理的连接器、提供商密钥和高级路由控制时使用这里。",runtimeProviderFeatureConnectors:"Gemini、Codex、Claude、Vertex 以及 OpenAI 兼容连接器",runtimeProviderFeatureSecrets:"共享密钥与单个 API 配置分离存放",runtimeProviderFooter:"当多个配置需要共享同一提供商设置时最适合使用。",createOpenRouterProfile:"创建 OpenRouter 配置",getApiKeyAt:"在此获取 API Key:",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 在所有模式下均按账号隔离。",implicationTitle:"保存后会发生什么",isolatedImplication:"该账号会继续保持隔离,其他账号无法续接它的连续性状态。",sameGroupRule:"只有账号都使用同一个分组“{{group}}”时,才会彼此共享连续性。",noSameGroupPeer:"当前没有其他账号使用这个分组。",sameGroupPeerCount_one:"已有 {{count}} 个其他账号使用这个分组。",sameGroupPeerCount_other:"已有 {{count}} 个其他账号使用这个分组。",deeperReady_one:"已有 {{count}} 个同组账号启用更深连续性。这是当前最强的交接设置。",deeperReady_other:"已有 {{count}} 个同组账号启用更深连续性。这是当前最强的交接设置。",deeperNeedsPeers:"此账号已启用更深连续性,但同组中的其他账号也需要启用更深连续性,才能更好满足跨账号续接的预期。",standardWarning:"标准共享更适合项目上下文。如果用户期望跨账号续接,两个账号都应启用更深连续性。",resumeOriginalWarning:"如果旧会话很重要,请先在原账号中恢复它,再调整设置。",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。",sameGroupRule:"只有两个账号都设为共享且使用同一分组时,才会共享连续性。",deeperRecommendation:"分组“{{group}}”已开启共享,但如果用户期望跨账号续接,更推荐同时启用更深连续性。",partialGroup:"分组“{{group}}”已经配置得不错,但其他账号或分组仍需要补齐同组或更深连续性设置。",readyGroup:"分组“{{group}}”已有多个账号启用更深连续性。这是当前最强的交接设置。",legacyConfirmation_one:"{{count}} 个旧账号仍需要显式确认。",legacyConfirmation_other:"{{count}} 个旧账号仍需要显式确认。"},continuityReadiness:{title:"跨账号续接检查",description:"在切换账号前,用这张卡快速确认还缺什么。",state:{single:"单账号",isolated:"续接关闭","shared-alone":"已共享但未完成","shared-standard":"仅项目共享",partial:"部分就绪",ready:"强交接已就绪"},metrics:{isolated:"隔离账号",sharedPeers:"有同组伙伴",deeperReady:"更深已就绪"},messages:{single:{title:"目前只配置了一个 auth 账号。",description:"现在还不涉及跨账号交接。请先再添加一个 auth 账号,再配置共享连续性。"},isolated:{title:"当前还没有开启跨账号续接。",description:"当前可见账号都处于隔离模式,因此在一个账号中创建的会话仍会留在原账号。"},"shared-alone":{title:"已经开启共享,但还没有任何分组拥有同组伙伴。",description_one:"{{count}} 个共享账号仍在等待另一个账号加入同一分组。",description_other:"{{count}} 个共享账号仍在等待另一个账号加入同一分组。"},"shared-standard":{title:"分组“{{group}}”已共享项目上下文,但尚未形成更深连续性的配对。",description:"用户可能期望的不只是项目共享。如果希望更稳妥地支持跨账号续接,请让这个分组中的两个账号都启用更深连续性。"},partial:{title:"已有一个分组准备就绪,但整体配置仍是混合状态。",description:"至少有一个分组已经启用更深连续性,但其他账号仍可能处于隔离、单独共享分组,或尚未启用更深连续性。"},ready:{title:"分组“{{group}}”已经具备当前最强的连续性设置。",description:"这个分组中已有多个账号启用更深连续性。是否能够恢复仍取决于 Claude 上游实际保存了什么。"}},stepsTitle:"下一步建议",steps:{syncBoth:"请在两个账号上都打开“同步”,而不是只调整要切换进去的那个账号。",sameGroup:"两个账号都使用同一个历史同步分组。“{{group}}”是当前推荐的分组。",enableDeeper:"如果用户期望的是跨账号续接,而不是仅共享项目上下文,请在两个账号上都启用更深连续性。",resumeOriginal:"如果原来的会话很重要,请先在原账号中恢复它,再修改连续性设置。"},singleSteps:{addAccount:"先再创建一个 ccs auth 账号,然后再考虑跨账号交接。",sameGroupLater:"当第二个账号准备好后,再把两个账号放到同一个历史同步分组。",enableDeeperLater:"如果未来会期望跨账号续接而不是仅共享项目上下文,请在两个账号上都启用更深连续性。",resumeOriginal:"在第二个账号配置完成之前,重要会话仍应从原账号继续恢复。"}},continuityOverview:{plainLaneTitle:"普通 ccs 正在使用不同的续接通道",plainLaneDescription:"普通 ccs 当前会从 {{lane}} 续接,而不是这个账号通道。请先恢复原通道中的会话,再修改同步设置。",setDefaultHint:"如果希望以后普通 ccs 跟随某个账号,请使用该账号行上的“设为默认”。",recommendBadge:"建议 {{group}}",partialBadge:"部分同步 {{group}}",lane:{native:"原生 Claude(~/.claude)",accountDefault:"账号 {{name}}",accountInherited:"通过连续性继承使用账号 {{name}}",profileDefault:"默认配置 {{name}}(仍走原生 Claude 通道)"}},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:"隔离",noSameGroupPeer:"同组中还没有其他账号",sameGroupPeerCount_one:"{{count}} 个同组账号",sameGroupPeerCount_other:"{{count}} 个同组账号",legacyReview:"请检查并确认这个推断出的默认状态。",noHandoff:"跨账号续接仍会回到原账号。",badges:{shared:"共享",deeper:"更深",legacy:"旧策略",isolated:"隔离"}},addAccountDialog:{title:"添加 {{displayName}} 账号",descKiro:"选择 Kiro 认证方式,然后通过浏览器或从 Kiro IDE 导入完成认证。",descDeviceCode:"点击认证后,验证码将显示,请在提供商网站输入。",descOauth:"点击认证获取 OAuth URL,在任意浏览器中打开即可登录。",powerUserEnabled:"已启用高级用户模式",powerUserSkipped:"设置 > 代理 中的高级用户模式会跳过 AGY 责任确认清单和 Gemini Dashboard 的风险短语。OAuth / 账号风险需自行承担。",powerUserLoadFailed:"加载高级用户模式设置失败。请检查“设置 > 代理”后重试。",powerUserLoading:"正在加载高级用户安全设置。请稍候后重试。",powerUserUnavailableRetry:"高级用户模式不可用。请完成当前提供商要求的安全步骤后重试。",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:"隐藏详情",showPausedAccounts:"显示已暂停 ({{count}})",hidePausedAccounts:"隐藏已暂停 ({{count}})",visibleTotalRequests:"可见请求数",visibleAccounts:"可见账号",excludingPausedAccounts:"已排除 {{count}} 个已暂停",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 上运行",runOnDroidWithFlag:"通过 --target 在 Droid 上运行",droidAliasExplicit:"Droid 别名(显式)",overrideToClaude:"切换为 Claude",overrideToClaudeExplicit:"切换为 Claude(显式)",targetHintPreferredAlias:"推荐显式别名:",targetHintClaudeDefault:"默认命令:",targetHintLegacyAlias:"旧快捷方式仍可用:",targetHintOverride:"你仍可在每次运行时用",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:"网页",image:"图片",channels:"频道",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:"加载高级模式失败",failedUpdateAgyMode:"更新高级模式失败",failedVerifyAgyMode:"校验高级模式持久化失败",notPersistedAgyMode:"高级模式未成功持久化,配置可能被其他进程修改。",agyModeEnabled:"高级模式已启用。",agyModeDisabled:"高级模式已关闭。",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 + Gemini 高级模式",agyModeDesc:"跳过 AGY 责任确认清单,以及 Gemini Dashboard 中输入风险短语的步骤。",agyWarning:"仅在你充分理解 OAuth 封禁风险模式(#509)后使用。CCS 不对账号损失承担责任。",finalConfirm:"需要最终确认",finalConfirmDesc:"启用后会跳过 Dashboard / CLI 中的 AGY 安全检查,以及 Gemini Dashboard 的风险短语确认。请先阅读 issue #509,并输入精确短语后继续。",step1:"步骤 1",readIssue:"阅读 issue #509",step2:"步骤 2",typePrefix:"输入",typeSuffix:"以启用。",typePhraseAria:"输入 I ACCEPT RISK 以启用 Antigravity + Gemini 高级模式",exactPhrase:"必须输入完全一致的短语。",enableAgyMode:"启用 Antigravity + Gemini 高级模式",toggleAgyMode:"切换 Antigravity + Gemini 高级模式",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:":minimal/low/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:"共享更深",sharedDeeperDesc:"会额外同步 session-env、file-history、shell-snapshots 和 todos。适合需要跨账号续接的场景。",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 配置已保存",liveProbe:"实时探测",runLiveProbe:"运行实时探测",rerunLiveProbe:"重新运行实时探测",probing:"正在运行探测...",probeNotRun:"尚未运行探测",probeLocalReadinessHint:"本地就绪检查可能通过,但实时运行链路仍可能失败。请使用实时探测验证完整的 Cursor 路径。",probeStage:"阶段",probeHttpStatus:"HTTP 状态",probeDuration:"耗时",probeModel:"模型",probeMessage:"消息",probeSucceeded:"探测成功",probeFailed:"探测失败",probeSaveFirst:"请先保存或放弃 Cursor 更改,再运行实时探测",refreshStatus:"刷新 Cursor 状态",refreshConfiguration:"刷新 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 内容。"},heroSection:{title:"CCS Config",subtitle:"Claude Code Switch Dashboard"},hubFooter:{logs:"日志",settings:"设置",github:"GitHub",copyright:"© {{year}} kaitranntt"},themeToggle:{srLabel:"切换主题"},ccsLogo:{alt:"CCS Logo",text:"CCS Config"},claudekitBadge:{title:"Powered by ClaudeKit Framework",alt:"ClaudeKit",poweredBy:"Powered by",claudekit:"ClaudeKit"},codeEditor:{revealSensitive:"显示敏感值",maskSensitive:"隐藏敏感值",valid:"有效的 {{language}}",readOnly:"(只读)"},commandBuilder:{title:"命令构建器",searchPlaceholder:"输入或选择命令...",copy:"复制",run:"运行",cmdConfig:"打开配置界面",cmdCreateProfile:"创建新配置",cmdSwitchProfile:"切换到指定配置",cmdDoctor:"检查系统健康",cmdListProviders:"列出可用 CLIProxy 提供商",cmdAddProvider:"添加 CLIProxy 提供商"},confirmDialog:{confirm:"确认",cancel:"取消"},connectionIndicator:{connected:"已连接",connecting:"连接中...",disconnected:"已断开",reconnecting:"重新连接中..."},docsLink:{title:"查看文档"},githubLink:{title:"在 GitHub 上报告问题"},globalEnvIndicator:{injectedCount_one:"{{count}} 个全局环境变量将在运行时注入",injectedCount_other:"{{count}} 个全局环境变量将在运行时注入",overriddenCount:"({{count}} 个已被配置覆盖)",skippedLabel:"已跳过(配置中已定义):",configureInSettings:"在设置中配置"},localhostDisclaimer:{remoteReadonlyAuthDisabledLong:"远程控制台当前为只读,因为主机未启用控制台认证。请在主机上重新启用控制台认证以解锁远程编辑。",remoteReadonlyAuthDisabledShort:"远程控制台为只读,直到主机重新启用控制台认证。",remoteReadonlySetupLong:"远程控制台为只读,直到在主机上运行 ccs config auth setup。",remoteReadonlySetupShort:"远程控制台为只读,直到完成主机认证配置。",localLong:"本控制台在本地运行,所有数据保留在本机。",localShort:"本地控制台 - 数据保留在本机。",dismiss:"关闭提示"},privacyToggle:{modeOn:"隐私模式已开启 - 点击显示数据",modeOff:"隐私模式已关闭 - 点击隐藏数据"},projectSelectionDialog:{title:"选择 Google Cloud 项目",description:"选择用于 {{provider}} 认证的项目。",autoSelectCountdown:"({{count}} 秒后自动选择默认值)",default:"默认",allProjects:"全部项目",allProjectsDescription:"接入全部 {{count}} 个已列出的项目",useDefault:"使用默认值",selecting:"选择中...",confirmSelection:"确认选择",codeCopied:"验证码已复制",copyVerificationCode:"复制验证码"},quickCommands:{title:"快捷命令",startDefault:"启动默认",startDefaultDesc:"使用默认配置启动 Claude",glmProfile:"GLM 配置",glmProfileDesc:"切换到 GLM 模型",healthCheck:"健康检查",healthCheckDesc:"运行系统诊断",delegateTask:"委托任务",delegateTaskDesc:"委托到 GLM 配置"},quotaTooltip:{loadingQuota:"加载配额中...",failedLoadQuota:"加载配额失败",modelQuotas:"模型配额:",rateLimits:"速率限制:",plan:"计划:{{plan}}",quotaSnapshots:"配额快照:",unlimited:"无限制",remaining:"剩余 {{remaining}}/{{entitlement}}",tier:"档位",tierId:"档位 ID",state:"状态",credits:"额度",modelQuotasLower:"模型配额:",allBucketsReport:"所有桶报告 {{tokenType}}",requestsRemaining:"剩余 {{count}} 次请求",inputTokensRemaining:"剩余 {{count}} 个输入 token",outputTokensRemaining:"剩余 {{count}} 个输出 token",amountRemaining:"剩余 {{count}}",fiveHourLimit:"5 小时用量限制",weeklyLimit:"每周用量限制",weeklyOpus:"每周用量(Opus)",weeklySonnet:"每周用量(Sonnet)",weeklyOAuthApps:"每周用量(OAuth 应用)",weeklyCowork:"每周用量(Cowork)",extraUsage:"额外用量",premiumInteractions:"高级交互次数",chat:"对话",completions:"补全",resets:"重置于 {{time}}",fiveHourResets:"5 小时重置于 {{time}}",weeklyResets:"每周重置于 {{time}}"},sponsorButton:{title:"在 GitHub 上赞助此项目",sponsor:"赞助"},valueMetrics:{apiCostSaved:"API 成本节省",tokensSaved:"Token 节省",queriesFaster:"查询加速",errorsReduced:"错误减少",vsLastMonth:"对比上月",throughCaching:"通过缓存",averageSpeedup:"平均加速",withRetryLogic:"通过重试逻辑",performanceMetrics:"性能指标",monthlySummary:"月度概览",totalSaved:"总节省",tokensProcessed:"处理 Token 数",queriesHandled:"处理请求数",uptime:"正常运行时间"},updatesSpotlight:{openUpdatesCenter:"打开更新中心"},deviceCodeDialog:{authorize:"授权 {{provider}}",enterCodeAtPage:"在授权页面输入下方验证码。",expiresIn:"({{time}} 后过期)",codeExpired:"(验证码已过期)",copied:"已复制!",copyCode:"复制验证码",waitingForAuth:"等待授权中...",openVerificationPage:"打开验证页面",openProviderPage:"打开 {{provider}}",copyCodeAria:"复制验证码",codeCopiedAria:"验证码已复制"},settingsDialog:{editProfile:"编辑配置:{{name}}",description:"为此配置设置环境变量和其他设置。",loadingSettings:"加载设置中...",envTab:"环境变量",rawJsonTab:"原始 JSON",generalTab:"常规",noEnvVars:"尚未配置环境变量。",noEnvVarsHint:"在 settings.json 文件中添加变量。",loadingEditor:"加载编辑器中...",profileInfo:"配置信息",profileInfoDesc:"此配置文件的详细信息。",path:"路径",lastModified:"最后修改",cancel:"取消",saving:"保存中...",saveChanges:"保存更改",conflictTitle:"文件被外部修改",conflictDesc:"此设置文件已被其他进程修改。用你的更改覆盖还是丢弃?",overwrite:"覆盖"},setupWizard:{title:"快速设置向导",stepProviderDesc:"选择一个提供商开始",stepAuthDesc:"完成提供商认证",stepAccountDesc:"选择要使用的账号",stepVariantDesc:"创建自定义变体",stepSuccessDesc:"设置完成!",authStep:{authenticateWith:"通过 {{provider}} 认证以添加账号",authenticating:"认证中...",authenticateInBrowser:"在浏览器中认证",completeOAuth:"在浏览器中完成 OAuth 流程...",orUseTerminal:"或使用终端",runCommandHint:"在终端中运行此命令:",back:"返回",checking:"检查中...",refreshStatus:"刷新状态"},accountStep:{selectAccount:"选择账号({{count}})",defaultAccount:"默认账号",or:"或",addNewAccount:"添加新账号",addNewAccountDesc:"使用其他账号认证",back:"返回"},variantStep:{back:"返回",skip:"跳过"},successStep:{title:"变体已创建!",subtitle:"你的自定义变体已准备就绪",usage:"用法:",done:"完成"}},accountSurfaceCard:{business:"企业",personal:"个人",variant:"变体"},accountCardStats:{notUsedYet:"尚未使用"},accountQuotaPanel:{weekly:"每周",loadingQuota:"加载配额中..."},userMenu:{signedInAs:"已登录为 {{username}}"},authMonitorLive:{live:"实时",accountMonitor:"账号监控",updated:"更新于 {{time}}",updatedNow:"刚刚更新",requestsLabel:"请求",stats:"统计",successRate:"成功率",missingProjectId:"缺少项目 ID",noActivity:"无活动"},providerCard:{missingProjectIdAria:"缺少项目 ID"},loginPage:{showPassword:"显示密码",hidePassword:"隐藏密码"},cliproxyStatsOverview:{sessionStatistics:"会话统计",realTimeMetrics:"来自 {{backend}} 的实时使用指标",offline:"离线",running:"运行中",noActiveSession:"无活跃会话",noActiveSessionHint:"使用 ccs gemini、ccs codex 或 ccs agy 启动 CLIProxy 会话后即可查看实时统计。",failedLoadStats:"加载统计数据失败",totalRequests:"总请求数",successCount:"{{count}} 次成功",successRate:"成功率",totalTokens:"总 Token 数",estimatedCost:"预估 ${{cost}}",modelsUsed:"使用模型数",modelUsageDistribution:"模型使用分布",requestCount:"{{count}} 次请求"},cliproxyTable:{name:"名称",provider:"提供商",model:"模型",account:"账号",status:"状态",default:"默认",actions:"操作"},cliproxyTabs:{overview:"概览",variants:"变体",aiProviders:"AI 提供商",controlPanel:"控制面板"},cliproxyHeader:{ccsLevelAccountManagement:"CCS 级账号管理",cliproxyNotAvailable:"CLIProxy 不可用",cliproxyControlPanel:"CLIProxy 控制面板",noVariants:"未找到 CLIProxy 变体。",addAccountToStart:"添加账号以开始"},routingGuidance:{roundRobin:"轮询模式均匀分配用量。",fillFirst:"优先填满模式让备用账号保持冷启动直到需要时。",routingStrategy:"路由策略",optionalRouting:"可选路由"},extendedContext:{extendedContext:"扩展上下文"},cliproxyConfig:{unsavedChanges:"未保存的更改",original:"原始值",modified:"已修改",reviewChanges:"查看更改",loadingEditor:"加载编辑器中..."},providerEditor:{provider:"提供商",filePath:"文件路径",lastModified:"最后修改",defaultTarget:"默认目标",quickUsage:"快速使用",modelMapping:"模型映射",status:"状态",loadingSettings:"加载设置中...",loadingEditor:"加载编辑器中...",noAccountsConnected:"未连接账号",addAccountToStart:"添加账号以开始",gcpProjectIdReadonly:"GCP 项目 ID(只读)",projectIdNA:"项目 ID:无",missingProjectId:"缺少项目 ID",missingProjectIdHint:"可能导致错误。请移除该账号并重新添加以获取项目 ID。",useIncognito:"使用隐身模式",aliases:"别名",current:"当前",currentValue:"当前值",composite:"复合",defaultLabel:"默认",requiredSetup:"必要设置",connectorName:"连接器名称",proxyUrl:"代理 URL",proxyUrlSet:"代理 URL 已设置",excludedModels:"排除模型",headers:"请求头",secret:"密钥",prefix:"前缀",modelMappings:"模型映射",baseUri:"Base URL",apiKeys:"API Key",presets:"应用预设模型映射",createVariant:"创建 CLIProxy 变体",agyDenylist:"Antigravity 禁用列表:Claude Opus 4.5 和 Claude Sonnet 4.5 已弃用。"},providerEditorAccountItem:{modelsUsed:"使用模型数"},bulkActionBar:{applyPreset:"应用预设"},modelConfigSection:{defaultModel:"默认模型"},rawEditorSection:{rawConfig:"原始配置"},providerEditorHeader:{connectorName:"连接器名称"},aiProvidersFamilyRail:{current:"当前"},aiProvidersEntryCard:{apiKeys:"API Key"},aiProvidersEntryDialog:{connectorName:"连接器名称",baseUri:"Base URL",proxyUrl:"代理 URL",secret:"密钥",prefix:"前缀",excludedModels:"排除模型",headers:"请求头",modelMappings:"模型映射",requiredSetup:"必要设置",optionalRouting:"可选路由"},codex:{controlCenter:"控制中心",overview:"概览",docs:"文档",nativeCodexRuntime:"原生 Codex 运行时",ccsCodexProvider:"CCS Codex 提供商 / 桥接",codexDocs:"Codex 文档",supportedFlows:"支持的工作流",twoSupportedPaths:"两种支持路径:",nativeLabel:"原生:",nativeDesc:"Codex 是 CCS v1 的一等公民运行时目标。",ccsBridge:"CCS 桥接",apiProfilesDefault:"API 配置默认仍使用 Claude 或 Droid。",recommendedSetupFlow:"推荐设置流程",fastestPath:"最快路径",officialChannels:"官方渠道",codexCli:"Codex CLI",openNativeCodex:"打开原生 Codex",runBuiltInCodex:"在 Codex 上运行内置命令",runBuiltInCodexExplicit:"在 Codex 上运行内置命令(显式)",openCodexDashboard:"打开 Codex Dashboard",status:"状态",profiles:"配置",createNewProfile:"创建新配置",createNewProvider:"创建新提供商",createNewMcpServer:"创建新 MCP 服务器",defaultProvider:"默认提供商",useDefault:"使用默认值",useGlobalProvider:"使用全局提供商",useProviderDefault:"使用提供商默认值",quickFillWarning:"快速填充内容仅供参考,保存前请仔细检查。",thisFileUpstreamOwned:"此文件由 Codex CLI 上游维护。",notes:"备注",approvalPolicy:"审批策略",sandboxMode:"沙盒模式",reasoningEffort:"推理强度",useGlobalEffort:"使用全局强度",reasoningEffortCapitalized:"推理强度",thinkingBudgetTokens:"思考预算 Token",modelContextWindow:"模型上下文窗口",autoCompactTokenLimit:"自动压缩 Token 上限",toolOutputTokenLimit:"工具输出 Token 上限",webSearch:"网页搜索",personality:"人格设定",model:"模型",rawOnly:"仅原始",trusted:"受信任",untrusted:"不受信任",noProjectTrustEntries:"没有已保存的项目信任条目。",codexNativeRecipe:"已保存原生 Codex 配方",gptContextCap:"GPT-5.4 上下文上限",usageLimitCost:"用量上限成本超过 272K",longContextOverride:"长上下文覆盖",counts2x:"计数 2 倍",normalUsageWindow:"常规使用窗口",useCodexDefault:"使用 Codex 默认值",stdio:"stdio",streamableHttp:"streamable-http",responses:"responses",defaultTargetCli:"默认目标 CLI",executionChain:"执行链",targetPath:"当前目标路径",userConfig:"用户配置",configYaml:"config.yaml",flow:"工作流",docsTab:"文档"},droidSettings:{quickControls:"快捷控制",reasoningControls:"推理控制",thinkingBudget:"思考预算",anthropicOnly:"仅 Anthropic 模型",byokCustomModels:"BYOK 自定义模型"},rawJsonSettingsEditor:{title:"原始设置编辑器"},copilotConfigForm:{copilotConfiguration:"Copilot 配置",deprecatedModels:"检测到已弃用的 Copilot 模型",failedLoadStatus:"加载状态失败",useWithClaudeCode:"通过 Claude Code 使用你的 GitHub Copilot 订阅",githubCopilotControls:"GitHub Copilot 在上游控制提示词/上下文限制。",provider:"提供商",filePath:"文件路径",status:"状态",enabled:"已启用",disabled:"已禁用",loadingEditor:"加载编辑器中...",modelMapping:"模型映射",quickUsage:"快速使用",noPremiumUsage:"无高级用量"},copilotPresets:{gpt5Codex:"GPT-5.3 Codex",claude46:"Claude 4.6",gemini3:"Gemini 3"},healthCard:{allSystemsNominal:"所有系统正常",machineChecks:"机器检查"},analyticsCards:{cacheCost:"缓存成本",hitRate:"命中率",inputOutputRatio:"输入/输出比",noCacheData:"暂无缓存数据",noModelData:"暂无模型数据",noSessionData:"暂无会话数据",noTokenData:"暂无 Token 数据",totalCost:"总成本",totalTokens:"总 Token 数",usageInsights:"使用洞察"},dateRangeFilter:{pickADate:"选择日期"},logsConfig:{level:"级别",message:"消息",source:"来源",time:"时间",proc:"进程",open:"打开",run:"运行",refreshEntries:"刷新条目"},logsDetailPanel:{details:"详情"},logsFilters:{filters:"筛选"},logsOverviewCards:{overview:"概览"},logsPageSkeleton:{loadingLogs:"加载日志中..."},monitoringErrorLogs:{logContent:"日志内容"},analyticsPages:{chartsGrid:"图表",costByModel:"按模型成本"},toasts:{profileCreated:"配置创建成功",profileUpdated:"配置更新成功",profileDeleted:"配置删除成功",orphanProfilesComplete:"孤立配置注册完成",profileCopied:"配置复制成功",profileImported:"配置导入成功",authRequired:"{{provider}} 授权需要认证",authSuccess:"{{provider}} 认证成功!",authFailed:"{{provider}} 认证失败",deviceCodeExpired:"验证码已过期,请重试。",codeCopied:"验证码已复制到剪贴板",failedCopy:"复制验证码失败",configSaved:"配置保存成功",configSaveFailed:"保存失败:{{error}}",invalidYaml:"YAML 无效,无法保存",configUpdatedExternally:"配置已被外部更新",settingsFileUpdated:"设置文件已更新",accountsUpdated:"账号已更新",noProfilesToSync:"没有可同步的配置",syncFailed:"同步失败:{{error}}",providerAuthSuccess:"{{provider}} 认证成功",providerDeviceCodeInCallback:"提供商在回调模式中返回了设备码流程",loggingConfigSaved:"日志配置已保存。",loggingConfigSaveFailed:"保存日志配置失败。",unifiedConfigUpdated:"配置更新成功",migrationPreviewComplete:"迁移预览完成",migrationComplete:"迁移成功",migrationFailed:"迁移失败",rollbackComplete:"回滚成功",rollbackFailed:"回滚失败",defaultAccountSet:"默认账号已设为「{{name}}」",defaultAccountReset:"默认账号已重置为 CCS",accountDeleted:"账号「{{name}}」已删除",contextUpdated:"已将「{{name}}」的上下文更新为 {{summary}}",legacyConfirmError:'账号「{{name}}」需要显式确认。请在该账号上使用"编辑历史同步"。',legacyConfirmFailed:"旧版账号「{{name}}」确认失败:{{error}}",legacyConfirmSuccess_one:"{{count}} 个旧版账号已确认",legacyConfirmSuccess_other:"{{count}} 个旧版账号已确认",noLegacyAccounts:"没有需要确认的旧版账号",routingStrategySet:"路由策略已设为 {{strategy}}",variantCreated:"变体创建成功",variantUpdated:"变体更新成功",variantDeleted:"变体删除成功",defaultAccountUpdated:"默认账号已更新",accountRemoved:"账号已移除",accountPaused:"账号已暂停",accountResumed:"账号已恢复",accountAdded:"已为 {{provider}} 添加账号",kiroImported:"已导入 Kiro 账号:{{name}}",kiroTokenImported:"Kiro token 已导入",modelUpdated:"模型已更新",presetSaved:"预设「{{name}}」已保存",presetDeleted:"预设已删除",cliproxyAlreadyRunning:"CLIProxy 已在运行",cliproxyStarted:"CLIProxy 启动成功",cliproxyStartFailed:"CLIProxy 启动失败",cliproxyStopped:"CLIProxy 已停止",cliproxyStopFailed:"CLIProxy 停止失败",presetApplied:"已应用「{{name}}」预设",presetAppliedCustom:"已应用自定义预设",settingsSavedWithAdjustments:"设置已保存(含模型调整)",settingsSaved:"设置已保存",failedSaveSettings:"保存设置失败",codexRefreshFailed:"刷新 Codex 快照失败。原始编辑已保留。",codexRefreshError:"刷新 Codex 快照失败。",codexFixToml:"请先修复 TOML 再保存。",codexSaved:"已保存 Codex config.toml。",codexChangedExternally:"config.toml 已被外部修改,请刷新后重试。",codexSaveFailed:"保存 Codex config.toml 失败。",codexUpdateFailed:"更新 Codex 配置失败。",noOrphanProfiles:"未发现孤立配置",profilesRegistered:"已注册 {{count}} 个配置{{skipped}}",destinationEmpty:"目标配置名称不能为空",profileExportDownloaded:"配置导出已下载",profileImportFailed:"导入配置包失败"},profileEditorSections:{imageAnalysis:"图片分析",loadingImageSettings:"加载图片设置中...",skipPermissionPrompts:"启动时跳过权限提示",useNativeImageReading:"使用原生图片读取",skipTransformer:"跳过转换器",friendlyUi:"友好界面",info:"信息"},imageAnalysisStatus:{sectionTitle:"图片",openSettings:"打开设置",useNativeImageReading:"使用原生图片读取",refreshingPreview:"刷新预览中",savedStatus:"已保存状态",livePreview:"实时预览",disabledGlobally:"全局已禁用",targetBypassesHook:"{{target}} 绕过了 hook",nativeImageReading:"原生图片读取",setupNeeded:"需要设置",needsAuth:"需要认证",needsProxy:"需要代理",nativeFallback:"原生回退",transformerReady:"转换器就绪",badgeDisabled:"已禁用",badgeBypassed:"已绕过",badgeNative:"原生",badgeSetup:"需设置",badgeAuth:"认证",badgeProxy:"代理",badgeReady:"就绪",capabilityVerified:"已验证",capabilityUnknown:"未知",toggleSummaryNativeCapable:"{{model}} 支持图片,CCS 将在此跳过转换器。",toggleSummaryNativeModel:"CCS 将对 {{model}} 优先使用原生读取。",toggleSummaryNativeDefault:"CCS 将对此配置优先使用原生图片读取。",toggleSummaryNativeFileAccess:"此配置当前仍使用原生文件访问。",toggleSummaryInactiveTarget:"当前选择 {{target}} 时,已保存的 Claude 端图片路由不生效。",toggleSummaryTransformerRoute:"转换器路由:{{backend}}{{modelSuffix}}。",noteDisabledGlobally:"图片功能在 CCS 设置中被全局禁用。",noteTargetBypassesHook:"当前目标 {{target}} 绕过了 Claude Read hook。",notePersistHook:"请先持久化配置 hook,然后才能在此使用转换器路由。",targetLabel:{claude:"Claude Code",droid:"Factory Droid",codex:"Codex CLI"}},openrouterBadge:{new:"新",integration:"OpenRouter 集成"},openrouterBanner:{accessModels:"通过 OpenRouter 访问 {{count}}+ 模型",add:"添加"},openrouterModelPicker:{searchModels:"搜索模型",newestModels:"最新模型"},openrouterPromoCard:{title:"OpenRouter",description:"通过一个 API 端点访问数百个模型。"},profileCard:{profile:"配置",openRouter:"OpenRouter 配置",claudeCode:"Claude Code",claudeCodeDefault:"Claude Code(默认)",factoryDroid:"Factory Droid",codexCli:"Codex CLI",ccsProfile:"CCS 配置"},profileDeck:{profiles:"配置",failedToLoad:"加载配置失败:{{message}}",noProfiles:"尚未配置。创建你的第一个配置以开始。"},profilesTable:{name:"名称",provider:"提供商",model:"模型",target:"目标",lastModified:"最后修改",actions:"操作",edit:"编辑"},profileCreateDialog:{createProfile:"创建配置",appliedModelToTiers:"已将「{{model}}」应用到所有模型档位",profileCreated:"配置「{{name}}」已创建",failedCreate:"创建配置失败",chooseProviderHint:"选择提供商预设,或配置自定义 API 端点。",basicInformation:"基本信息",modelConfiguration:"模型配置",usedInCli:"CLI 中使用:",apiBaseUrl:"API Base URL",baseUrlPlaceholder:"https://api.example.com/v1",prefilledFromPreset:"从 {{name}} 预填。可按需调整。",optionalForPreset:"{{name}} 的可选项。留空使用原生 Anthropic 认证。",endpointHint:"接受 OpenAI 兼容和 Anthropic 请求的端点",optional:"(可选)",apiKeyOptionalPlaceholder:"可选 - 仅在启用认证时需要",apiKeyPlaceholder:"sk-...",apiKeyOptionalHint:"仅在本地端点启用了认证时才需要",defaultTargetCli:"默认目标 CLI",modelMapping:"模型映射",modelMappingDesc:"将 Claude Code 档位(Opus/Sonnet/Haiku)映射到提供商支持的模型。",searchModelsPlaceholder:"输入搜索(例如:opus、sonnet、gpt-4o)...",noModelsFound:"未找到匹配「{{query}}」的模型",loadingModels:"加载模型中...",defaultModel:"默认模型",sonnetMapping:"Sonnet 映射",opusMapping:"Opus 映射",haikuMapping:"Haiku 映射",sonnetMappingPlaceholder:"例如:gpt-4o、claude-sonnet-4",opusMappingPlaceholder:"例如:o1、claude-opus-4.5",haikuMappingPlaceholder:"例如:gpt-4o-mini、claude-3.5-haiku",free:"免费"},profileDialogLegacy:{editProfile:"编辑配置"},supportEntryCard:{actionRequired:"待处理"},settingsPage:{title:"设置",loading:"加载中...",failedLoad:"加载设置失败。",tabs:{web:"网页",env:"环境",think:"思考",proxy:"代理",auth:"认证",backup:"备份",channels:"频道",imageAnalysis:"图片"},websearchSection:{title:"网页搜索",description:"CLI 网页搜索配置。"},thinkingSection:{title:"思考",description:"为支持的模型配置扩展思考/推理。",directOverride:"直接覆盖",youType:"你输入:",ccsAdds:"CCS 添加:",executionChain:"执行链",primaryBackends:"主要后端",legacyCliFallbacks:"旧版 CLI 回退",managedPayload:"托管载荷",sharedTargetMetadata:"共享目标元数据",ideTargetMetadata:"IDE 目标元数据",ideSettingsPath:"IDE 设置路径",ideHost:"IDE 主机",resolvedBinding:"已解析绑定",bindingName:"绑定名称",inSync:"已同步",currentTargetPath:"当前目标路径",warnings:"告警",notes:"备注",workspacePresets:"工作区预设",draft:"草稿",advanced:"高级",recommended:"推荐设置流程",configureModelFirst:"请先配置模型"},proxySection:{title:"代理",loadingImageSettings:"加载图片设置中..."},channelsSection:{title:"官方渠道",description:"查看和管理官方发布渠道。"},imageAnalysisSection:{title:"图片分析",description:"配置图片分析设置。",loading:"加载图片设置中..."}},codexPage:{title:"Codex",controlCenter:"控制中心",overview:"概览",docs:"文档",nativeRuntime:"原生运行时",ccsProvider:"CCS 提供商",setup:"安装"},apiPage:{title:"API 配置",subtitle:"管理你的 API 配置和端点。"},claudeExtensionPage:{title:"Claude Extension",subtitle:"Claude Extension 集成设置。",claudeAuth:"Claude 认证",status:"状态",targetMetadata:"IDE 目标元数据"},sharedPageV2:{title:"共享",subtitle:"共享数据管理。"},homePageV2:{title:"首页",logsMoved:"日志已移至专用工作区",profiles:"配置",cliproxy:"CLIProxy",accounts:"账号",health:"健康"},analyticsPageV2:{title:"分析",subtitle:"使用分析与洞察。"},logsPageV2:{title:"日志",subtitle:"查看和管理系统日志。"},healthPageV2:{title:"健康",subtitle:"系统健康监控。"},aiProvidersPage:{title:"AI 提供商",subtitle:"管理 AI 提供商配置。",unableToLoad:"无法加载 AI 提供商"}}},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",logs:"Nhật ký"},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",protectedAccessLabel:"Truy cập được bảo vệ",remoteGuardLabel:"Lớp bảo vệ truy cập từ xa",loading:"Đang kiểm tra quyền truy cập bảng điều khiển…",loginDescription:"Dùng tên người dùng và mật khẩu đã được cấu hình trên máy host để 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",lightMode:"Sáng",darkMode:"Tối",noDefaultCredentials:"CCS không có sẵn tài khoản hay mật khẩu mặc định.",credentialsHint:"Thông tin đăng nhập được tạo trên máy host bằng `ccs config auth setup`, rồi dùng tại đây.",remoteSetupTitle:"Truy cập từ xa cần được thiết lập trên máy host",remoteSetupDescription:"Bảng điều khiển này đang được mở từ một địa chỉ không phải localhost, nhưng máy host chưa bật dashboard auth.",incompleteSetupDescription:"Dashboard auth đã được bật nhưng cấu hình trên máy host vẫn chưa hoàn tất. Hãy hoàn thành cấu hình trước khi đăng nhập.",safetyNoteRemote:"Quản trị từ xa sẽ tiếp tục bị khóa cho tới khi chủ máy host bật dashboard auth.",safetyNoteLocal:"Nếu bạn đang ngồi ngay trên máy đó, đường localhost vẫn là cách đơn giản nhất để vào.",safetyNoteSession:"Sau khi đăng nhập thành công, phiên HTTP-only sẽ chỉ có hiệu lực trên đúng máy host này.",hostStepTitle:"Trên máy host",hostStepDescription:"Tạo hoặc bật lại thông tin đăng nhập cho dashboard, rồi mở lại trang này từ thiết bị từ xa.",localStepTitle:"Nếu đây là máy của bạn",localStepDescription:"Hãy mở URL localhost mà `ccs config` in ra, thay vì địa chỉ LAN hoặc Tailscale.",showPassword:"Hiện mật khẩu",hidePassword:"Ẩn mật khẩu"},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",deletePreset:"Xóa 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",shadowed:"Bị che khuất",prefixOnly:"Chỉ tiền tố",current:"Hiện tại",currentValue:"Giá trị hiện tại",preferredPinnedModel:"Mô hình ghim ưu tiên:",pinnedRouteStatus:"Trạng thái tuyến ghim:",pinnedModelNotAdvertised:"Mô hình ghim hiện không được proxy quảng bá: {{model}}"},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",profileSummaryCount:"{{count}} hồ sơ",profileSummaryCount_other:"{{count}} hồ sơ",profileSummaryEmpty:"Chất lượng cao + kiểm soát cục bộ",summaryBadgeDefaultQuality:"Mặc định chất lượng tốt nhất",summaryBadgeLocalLane:"Dùng local khi đúng bài toán",summaryExistingTitle:"Chọn hồ sơ hoặc thêm một lane mới",summaryEmptyTitle:"Chọn lane hồ sơ đầu tiên của bạn",summaryExistingDescription:"Bạn đã có {{count}} hồ sơ trong workspace này. Hãy giữ các nhà cung cấp chất lượng cao cho công việc code nghiêm túc, và chỉ thêm runtime local khi cần quyền riêng tư, chi phí thấp hoặc làm việc offline.",summaryExistingDescription_other:"Bạn đã có {{count}} hồ sơ trong workspace này. Hãy giữ các nhà cung cấp chất lượng cao cho công việc code nghiêm túc, và chỉ thêm runtime local khi cần quyền riêng tư, chi phí thấp hoặc làm việc offline.",summaryEmptyDescription:"Chọn lane phù hợp với công việc. Nhà cung cấp premium vẫn là mặc định cho độ tin cậy khi code; runtime local phù hợp hơn cho quyền riêng tư, batch rẻ và thử nghiệm.",qualityLanesTitle:"Lane chất lượng cao",qualityLaneHighlightDefaultQuality:"Lane mặc định tốt nhất cho các tác vụ code quan trọng",alibabaLaneDescription:"Hồ sơ coding trực tiếp mạnh mẽ khi bạn muốn một lane premium riêng ngoài catalog OpenRouter.",alibabaLaneHighlightQuality:"Phù hợp khi bạn cần chất lượng premium với endpoint riêng",localRuntimesTitle:"Runtime local",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"Tốt nhất cho prompt riêng tư, dọn dẹp local và batch transform chi phí thấp",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"Tốt nhất cho thiết lập GGUF tùy biến và workflow local tự host nâng cao",localDetectedModels:"Đã phát hiện {{count}} mô hình local",localDetectedModels_other:"Đã phát hiện {{count}} mô hình local",localNoModelsDetected:"Chưa phát hiện mô hình local nào",localWaitingServer:"Đang chờ máy chủ local và danh sách mô hình",localRuntimeCheckingBadge:"Đang kiểm tra",localRuntimeReadyBadge:"Sẵn sàng",localRuntimeNeedsModelBadge:"Thiếu mô hình",localRuntimeOfflineBadge:"Ngoại tuyến",localRuntimeCheckingDescription:"Đang kiểm tra trạng thái runtime local trước khi hiển thị hướng dẫn thiết lập.",localRuntimeReadyDescription:"Phù hợp nhất cho prompt riêng tư, workflow offline và batch transform rẻ hơn.",localRuntimeNeedsModelDescription:"Runtime đã chạy, nhưng mô hình local được khuyến nghị vẫn cần được tải hoặc nạp.",localRuntimeOfflineDescription:"Lane này phù hợp cho công việc nhạy cảm về riêng tư, transform local giá rẻ và phiên offline.",localRuntimeCheckingFooter:"Đang kiểm tra runtime local...",localRuntimeReadyFooter:"Endpoint sẵn sàng tại {{endpoint}}",localRuntimeMissingModelFooter:"Chạy `{{command}}` để hoàn tất thiết lập local.",localRuntimeOfflineFooter:"Chạy `{{command}}` để đưa endpoint local lên.",localRuntimeSetupAction:"Thiết lập {{label}}",localRuntimeUseAction:"Dùng {{label}}",localRuntimeFinishAction:"Hoàn tất thiết lập {{label}}",runtimeProviderBadge:"Thiết lập nhà cung cấp runtime",runtimeProviderTitle:"Mở AI Providers",runtimeProviderManagedDescription:"Dùng mục này khi bạn cần connector do CLIProxy quản lý, secret nhà cung cấp và điều khiển routing nâng cao.",runtimeProviderFeatureConnectors:"Gemini, Codex, Claude, Vertex và các connector tương thích OpenAI",runtimeProviderFeatureSecrets:"Khóa dùng chung tách biệt khỏi từng API Profile",runtimeProviderFooter:"Phù hợp nhất khi nhiều hồ sơ cần dùng chung một cấu hình nhà cung cấp.",createOpenRouterProfile:"Tạo hồ sơ OpenRouter",getApiKeyAt:"Nhận khóa API của bạn tại",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ế độ.",implicationTitle:"Sau khi lưu sẽ như thế nào",isolatedImplication:"Tài khoản này sẽ tiếp tục tách biệt. Tài khoản khác sẽ không thể resume trạng thái continuity của nó.",sameGroupRule:'Các tài khoản phải dùng cùng nhóm "{{group}}" thì mới chia sẻ continuity cho nhau.',noSameGroupPeer:"Hiện chưa có tài khoản nào khác dùng nhóm này.",sameGroupPeerCount_one:"{{count}} tài khoản khác đã dùng nhóm này.",sameGroupPeerCount_other:"{{count}} tài khoản khác đã dùng nhóm này.",deeperReady_one:"{{count}} tài khoản cùng nhóm đã bật deeper continuity. Đây là thiết lập handoff mạnh nhất hiện có.",deeperReady_other:"{{count}} tài khoản cùng nhóm đã bật deeper continuity. Đây là thiết lập handoff mạnh nhất hiện có.",deeperNeedsPeers:"Tài khoản này đã bật deeper continuity, nhưng tài khoản khác trong cùng nhóm vẫn cần bật deeper continuity để hỗ trợ resume xuyên tài khoản tốt hơn.",standardWarning:"Chế độ shared tiêu chuẩn chỉ phù hợp cho ngữ cảnh project. Nếu người dùng mong resume xuyên tài khoản, cả hai tài khoản nên bật deeper continuity.",resumeOriginalWarning:"Nếu cuộc trò chuyện cũ quan trọng, hãy resume nó từ tài khoản gốc trước khi đổi cấu hình.",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.",sameGroupRule:"Hiện tại, các tài khoản chỉ chia sẻ continuity khi cả hai đều ở chế độ shared và dùng cùng một nhóm.",deeperRecommendation:'Nhóm "{{group}}" đã được chia sẻ, nhưng deeper continuity vẫn là lựa chọn an toàn hơn nếu người dùng mong resume xuyên tài khoản.',partialGroup:'Nhóm "{{group}}" đã ổn, nhưng các tài khoản hoặc nhóm khác vẫn cần hoàn thiện cấu hình cùng nhóm hoặc deeper continuity.',readyGroup:'Nhóm "{{group}}" đã có nhiều tài khoản bật deeper continuity. Đây là thiết lập handoff mạnh nhất hiện có.',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."},continuityReadiness:{title:"Kiểm tra resume xuyên tài khoản",description:"Dùng thẻ này để biết còn thiếu gì trước khi người dùng chuyển tài khoản.",state:{single:"một tài khoản",isolated:"resume tắt","shared-alone":"đã shared nhưng chưa đủ","shared-standard":"chỉ project",partial:"mới sẵn sàng một phần",ready:"handoff mạnh đã sẵn sàng"},metrics:{isolated:"Tách biệt",sharedPeers:"Có bạn cùng nhóm",deeperReady:"Deeper sẵn sàng"},messages:{single:{title:"Hiện chỉ có một auth account.",description:"Cross-account handoff chưa áp dụng. Hãy thêm một auth account khác trước khi cấu hình shared continuity."},isolated:{title:"Hiện tại cross-account resume đang tắt.",description:"Tất cả tài khoản đang hiển thị đều ở chế độ isolated, nên phiên được tạo trong một tài khoản sẽ ở lại tài khoản đó."},"shared-alone":{title:"Đã có shared mode, nhưng chưa có nhóm nào có bạn cùng nhóm.",description_one:"{{count}} shared account vẫn đang chờ một tài khoản khác vào cùng nhóm.",description_other:"{{count}} shared accounts vẫn đang chờ một tài khoản khác vào cùng nhóm."},"shared-standard":{title:'Nhóm "{{group}}" đang chia sẻ ngữ cảnh project nhưng chưa ghép deeper continuity.',description:"Người dùng có thể mong nhiều hơn việc chia sẻ project. Hãy bật deeper continuity trên cả hai tài khoản trong nhóm này để có handoff mạnh hơn."},partial:{title:"Một nhóm đã sẵn sàng, nhưng cấu hình tổng thể vẫn còn lẫn lộn.",description:"Ít nhất một nhóm đã dùng deeper continuity, nhưng các tài khoản khác vẫn còn isolated, ở một mình trong nhóm shared, hoặc chưa bật deeper continuity."},ready:{title:'Nhóm "{{group}}" đã có thiết lập continuity mạnh nhất hiện có.',description:"Nhiều tài khoản trong nhóm này đã bật deeper continuity. Việc resume thực tế vẫn phụ thuộc vào dữ liệu mà Claude lưu ở upstream."}},stepsTitle:"Người dùng nên làm gì tiếp theo",steps:{syncBoth:"Mở Sync trên cả hai tài khoản, không chỉ tài khoản bạn sắp chuyển sang.",sameGroup:'Dùng cùng một History Sync Group trên cả hai tài khoản. "{{group}}" là nhóm được đề xuất hiện tại.',enableDeeper:"Nếu người dùng mong resume xuyên tài khoản thay vì chỉ chia sẻ project, hãy bật deeper continuity trên cả hai tài khoản.",resumeOriginal:"Nếu cuộc trò chuyện gốc quan trọng, hãy resume nó từ tài khoản gốc trước khi đổi cài đặt continuity."},singleSteps:{addAccount:"Hãy tạo thêm một ccs auth account thứ hai trước khi lên kế hoạch handoff xuyên tài khoản.",sameGroupLater:"Khi tài khoản thứ hai đã sẵn sàng, đặt cả hai vào cùng một History Sync Group.",enableDeeperLater:"Nếu sau này người dùng sẽ mong resume xuyên tài khoản, hãy bật deeper continuity trên cả hai tài khoản.",resumeOriginal:"Cho đến khi tài khoản thứ hai sẵn sàng, các cuộc trò chuyện quan trọng vẫn nên được resume từ tài khoản gốc."}},continuityOverview:{plainLaneTitle:"Plain ccs đang dùng một lane resume khác",plainLaneDescription:"Plain ccs hiện resume từ {{lane}}, không phải lane của tài khoản này. Hãy khôi phục lane gốc trước khi đổi cài đặt sync.",setDefaultHint:"Nếu muốn plain ccs theo một tài khoản trong các phiên sau, hãy dùng hành động Set Default trên dòng tài khoản đó.",recommendBadge:"Đề xuất {{group}}",partialBadge:"Đồng bộ một phần {{group}}",lane:{native:"Claude gốc (~/.claude)",accountDefault:"tài khoản {{name}}",accountInherited:"tài khoản {{name}} qua continuity inheritance",profileDefault:"profile mặc định {{name}} qua lane Claude gốc"}},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",noSameGroupPeer:"Chưa có tài khoản cùng nhóm",sameGroupPeerCount_one:"{{count}} tài khoản cùng nhóm",sameGroupPeerCount_other:"{{count}} tài khoản cùng nhóm",legacyReview:"Hãy xem lại và xác nhận trạng thái suy ra này.",noHandoff:"Resume xuyên tài khoản vẫn sẽ quay về tài khoản gốc.",badges:{shared:"Chia sẻ",deeper:"Sâu hơn",legacy:"Kế thừa",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:"Chế độ power user trong Cài đặt > Proxy đang bỏ qua danh sách kiểm tra trách nhiệm AGY và bước nhập cụm từ rủi ro của Gemini trên dashboard. Bạn tự chịu hoàn toàn rủi ro OAuth/tài khoản.",powerUserLoadFailed:"Không thể tải cài đặt chế độ power user. Hãy kiểm tra Cài đặt > Proxy rồi thử lại.",powerUserLoading:"Đang tải cài đặt an toàn cho chế độ power user. Vui lòng đợi một chút rồi thử lại.",powerUserUnavailableRetry:"Chế độ power user hiện không khả dụng. Hãy hoàn tất bước an toàn bắt buộc của nhà cung cấp rồi thử lại.",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:"Tên thân thiện để nhận biết tài khoản này. Để trống để dùng mã nhận dạng an toàn do hệ thống tạo.",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",showPausedAccounts:"Hiện tạm dừng ({{count}})",hidePausedAccounts:"Ẩn tạm dừng ({{count}})",visibleTotalRequests:"Yêu cầu hiển thị",visibleAccounts:"Tài khoản hiển thị",excludingPausedAccounts:"Đang loại trừ {{count}} tài khoản tạm dừng",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",runOnDroidWithFlag:"Chạy trên Droid (--target)",droidAliasExplicit:"Bí danh Droid (rõ ràng)",overrideToClaude:"Ghi đè lên Claude",overrideToClaudeExplicit:"Ghi đè lên Claude (rõ ràng)",targetHintPreferredAlias:"Bí danh rõ ràng nên dùng:",targetHintClaudeDefault:"Lệnh mặc định:",targetHintLegacyAlias:"Lối tắt cũ vẫn dùng được:",targetHintOverride:"Bạn vẫn có thể ghi đè mỗi lần chạy bằ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",image:"Hình ảnh",channels:"Kênh",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",failedUpdateAgyMode:"Không thể cập nhật chế độ power user",failedVerifyAgyMode:"Không thể xác minh trạng thái lưu của chế độ power user",notPersistedAgyMode:"Chế độ power user 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.",agyModeDisabled:"Đã tắt chế độ power user.",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 + Gemini",agyModeDesc:"Bỏ qua danh sách kiểm tra trách nhiệm AGY và bước nhập cụm từ xác nhận của Gemini trên dashboard.",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 và bước nhập cụm từ rủi ro của Gemini trên dashboard. 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 + Gemini",exactPhrase:"Phải nhập chính xác cụm từ.",enableAgyMode:"Bật chế độ power user Antigravity + Gemini",toggleAgyMode:"Chuyển đổi chế độ power user Antigravity + Gemini",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:": minimal/low/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",sharedDeeperDesc:"Đồng bộ thêm session-env, file-history, shell-snapshots và todos. Nên dùng khi người dùng mong resume xuyên tài khoả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:"Trung tâm 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",liveProbe:"Kiểm tra trực tiếp",runLiveProbe:"Chạy kiểm tra trực tiếp",rerunLiveProbe:"Chạy lại kiểm tra trực tiếp",probing:"Đang kiểm tra...",probeNotRun:"Chưa chạy kiểm tra",probeLocalReadinessHint:"Các kiểm tra sẵn sàng cục bộ có thể đạt, nhưng luồng chạy thực tế vẫn có thể lỗi. Hãy dùng kiểm tra trực tiếp để xác minh toàn bộ đường đi của Cursor.",probeStage:"Giai đoạn",probeHttpStatus:"Trạng thái HTTP",probeDuration:"Thời lượng",probeModel:"Mô hình",probeMessage:"Thông điệp",probeSucceeded:"Kiểm tra thành công",probeFailed:"Kiểm tra thất bại",probeSaveFirst:"Hãy lưu hoặc bỏ các thay đổi Cursor trước khi chạy kiểm tra trực tiếp",refreshStatus:"Làm mới trạng thái Cursor",refreshConfiguration:"Làm mới 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."},heroSection:{title:"CCS Config",subtitle:"Bảng điều khiển Claude Code Switch"},hubFooter:{logs:"Nhật ký",settings:"Cài đặt",github:"GitHub",copyright:"© {{year}} kaitranntt"},themeToggle:{srLabel:"Chuyển đổi giao diện"},ccsLogo:{alt:"Logo CCS",text:"CCS Config"},claudekitBadge:{title:"Được vận hành bởi ClaudeKit Framework",alt:"ClaudeKit",poweredBy:"Được vận hành bởi",claudekit:"ClaudeKit"},codeEditor:{revealSensitive:"Hiện giá trị nhạy cảm",maskSensitive:"Ẩn giá trị nhạy cảm",valid:"{{language}} hợp lệ",readOnly:"(Chỉ đọc)"},commandBuilder:{title:"Trình tạo lệnh",searchPlaceholder:"Gõ hoặc chọn lệnh...",copy:"Sao chép",run:"Chạy",cmdConfig:"Mở giao diện cấu hình",cmdCreateProfile:"Tạo hồ sơ mới",cmdSwitchProfile:"Chuyển sang hồ sơ",cmdDoctor:"Kiểm tra sức khỏe hệ thống",cmdListProviders:"Liệt kê nhà cung cấp CLIProxy",cmdAddProvider:"Thêm nhà cung cấp CLIProxy"},confirmDialog:{confirm:"Xác nhận",cancel:"Hủy"},connectionIndicator:{connected:"Đã kết nối",connecting:"Đang kết nối...",disconnected:"Đã ngắt kết nối",reconnecting:"Đang kết nối lại..."},docsLink:{title:"Xem tài liệu"},githubLink:{title:"Báo cáo vấn đề trên GitHub"},globalEnvIndicator:{injectedCount_one:"{{count}} biến env toàn cục sẽ được áp dụng khi chạy",injectedCount_other:"{{count}} biến env toàn cục sẽ được áp dụng khi chạy",overriddenCount:"({{count}} bị ghi đè bởi hồ sơ)",skippedLabel:"Đã bỏ qua (hồ sơ đã định nghĩa):",configureInSettings:"Cấu hình trong Cài đặt"},localhostDisclaimer:{remoteReadonlyAuthDisabledLong:"Dashboard từ xa ở chế độ chỉ đọc vì dashboard auth đang bị tắt trên máy host. Bật lại dashboard auth trên máy host để mở khóa thay đổi từ xa.",remoteReadonlyAuthDisabledShort:"Dashboard từ xa chỉ đọc cho đến khi dashboard auth được bật lại trên máy host.",remoteReadonlySetupLong:"Dashboard từ xa chỉ đọc cho đến khi bạn chạy ccs config auth setup trên máy host.",remoteReadonlySetupShort:"Dashboard từ xa chỉ đọc cho đến khi auth được cấu hình trên máy host.",localLong:"Dashboard này chạy cục bộ. Toàn bộ dữ liệu nằm trên máy của bạn.",localShort:"Dashboard cục bộ - dữ liệu nằm trên thiết bị của bạn.",dismiss:"Bỏ qua thông báo"},privacyToggle:{modeOn:"Chế độ riêng tư BẬT - Nhấp để hiện dữ liệu",modeOff:"Chế độ riêng tư TẮT - Nhấp để ẩn dữ liệu"},projectSelectionDialog:{title:"Chọn dự án Google Cloud",description:"Chọn dự án để dùng cho xác thực {{provider}}.",autoSelectCountdown:"(Tự động chọn mặc định sau {{count}}s)",default:"Mặc định",allProjects:"Tất cả dự án",allProjectsDescription:"Thêm tất cả {{count}} dự án đã liệt kê",useDefault:"Dùng mặc định",selecting:"Đang chọn...",confirmSelection:"Xác nhận lựa chọn",codeCopied:"Đã sao chép mã",copyVerificationCode:"Sao chép mã xác minh"},quickCommands:{title:"Lệnh nhanh",startDefault:"Khởi chạy mặc định",startDefaultDesc:"Chạy Claude với hồ sơ mặc định",glmProfile:"Hồ sơ GLM",glmProfileDesc:"Chuyển sang mô hình GLM",healthCheck:"Kiểm tra sức khỏe",healthCheckDesc:"Chạy chẩn đoán hệ thống",delegateTask:"Giao việc",delegateTaskDesc:"Giao việc cho hồ sơ GLM"},quotaTooltip:{loadingQuota:"Đang tải quota...",failedLoadQuota:"Không tải được quota",modelQuotas:"Hạn ngạch mô hình:",rateLimits:"Giới hạn tốc độ:",plan:"Gói: {{plan}}",quotaSnapshots:"Ảnh chụp hạn ngạch:",unlimited:"Không giới hạn",remaining:"Còn {{remaining}}/{{entitlement}}",tier:"Tier",tierId:"Tier ID",state:"Trạng thái",credits:"Credits",modelQuotasLower:"Hạn ngạch mô hình:",allBucketsReport:"Tất cả bucket báo cáo {{tokenType}}",requestsRemaining:"Còn {{count}} yêu cầu",inputTokensRemaining:"Còn {{count}} token đầu vào",outputTokensRemaining:"Còn {{count}} token đầu ra",amountRemaining:"Còn {{count}}",fiveHourLimit:"Giới hạn dùng 5 giờ",weeklyLimit:"Giới hạn dùng hàng tuần",weeklyOpus:"Dùng hàng tuần (Opus)",weeklySonnet:"Dùng hàng tuần (Sonnet)",weeklyOAuthApps:"Dùng hàng tuần (OAuth apps)",weeklyCowork:"Dùng hàng tuần (Cowork)",extraUsage:"Lượt dùng thêm",premiumInteractions:"Tương tác Premium",chat:"Chat",completions:"Hoàn thành",resets:"Reset lúc {{time}}",fiveHourResets:"Reset 5h lúc {{time}}",weeklyResets:"Reset hàng tuần lúc {{time}}"},sponsorButton:{title:"Tài trợ dự án này trên GitHub",sponsor:"Tài trợ"},valueMetrics:{apiCostSaved:"Chi phí API tiết kiệm",tokensSaved:"Token tiết kiệm",queriesFaster:"Truy vấn nhanh hơn",errorsReduced:"Lỗi giảm",vsLastMonth:"so với tháng trước",throughCaching:"thông qua cache",averageSpeedup:"tăng tốc trung bình",withRetryLogic:"với logic thử lại",performanceMetrics:"Chỉ số hiệu suất",monthlySummary:"Tổng kết hàng tháng",totalSaved:"Tổng tiết kiệm",tokensProcessed:"Token đã xử lý",queriesHandled:"Truy vấn đã xử lý",uptime:"Thời gian hoạt động"},updatesSpotlight:{openUpdatesCenter:"Mở Trung tâm cập nhật"},deviceCodeDialog:{authorize:"Xác thực {{provider}}",enterCodeAtPage:"Nhập mã bên dưới tại trang xác thực.",expiresIn:"(Hết hạn sau {{time}})",codeExpired:"(Mã đã hết hạn)",copied:"Đã sao chép!",copyCode:"Sao chép mã",waitingForAuth:"Đang chờ xác thực...",openVerificationPage:"Mở trang xác minh",openProviderPage:"Mở {{provider}}",copyCodeAria:"Sao chép mã xác minh",codeCopiedAria:"Đã sao chép mã"},settingsDialog:{editProfile:"Chỉnh sửa hồ sơ: {{name}}",description:"Cấu hình biến môi trường và cài đặt cho hồ sơ này.",loadingSettings:"Đang tải cài đặt...",envTab:"Môi trường",rawJsonTab:"JSON thô",generalTab:"Chung",noEnvVars:"Không có biến môi trường nào được cấu hình.",noEnvVarsHint:"Thêm biến trong tệp settings.json của bạn.",loadingEditor:"Đang tải trình soạn thảo...",profileInfo:"Thông tin hồ sơ",profileInfoDesc:"Chi tiết về tệp cấu hình này.",path:"Đường dẫn",lastModified:"Sửa đổi lần cuối",cancel:"Hủy",saving:"Đang lưu...",saveChanges:"Lưu thay đổi",conflictTitle:"Tệp đã bị thay đổi bên ngoài",conflictDesc:"Tệp cài đặt này đã bị thay đổi bởi một tiến trình khác. Ghi đè thay đổi của bạn hay hủy?",overwrite:"Ghi đè"},setupWizard:{title:"Trình thiết lập nhanh",stepProviderDesc:"Chọn nhà cung cấp để bắt đầu",stepAuthDesc:"Xác thực với nhà cung cấp",stepAccountDesc:"Chọn tài khoản để sử dụng",stepVariantDesc:"Tạo biến thể tùy chỉnh",stepSuccessDesc:"Thiết lập hoàn tất!",authStep:{authenticateWith:"Xác thực với {{provider}} để thêm tài khoản",authenticating:"Đang xác thực...",authenticateInBrowser:"Xác thực trong trình duyệt",completeOAuth:"Hoàn tất luồng OAuth trong trình duyệt...",orUseTerminal:"Hoặc dùng terminal",runCommandHint:"Chạy lệnh này trong terminal:",back:"Quay lại",checking:"Đang kiểm tra...",refreshStatus:"Làm mới trạng thái"},accountStep:{selectAccount:"Chọn tài khoản ({{count}})",defaultAccount:"Tài khoản mặc định",or:"Hoặc",addNewAccount:"Thêm tài khoản mới",addNewAccountDesc:"Xác thực với một tài khoản khác",back:"Quay lại"},variantStep:{back:"Quay lại",skip:"Bỏ qua"},successStep:{title:"Biến thể đã được tạo!",subtitle:"Biến thể tùy chỉnh đã sẵn sàng để sử dụng",usage:"Cách dùng:",done:"Xong"}},accountSurfaceCard:{business:"Biz",personal:"Cá nhân",variant:"Biến thể"},accountCardStats:{notUsedYet:"Chưa sử dụng"},accountQuotaPanel:{weekly:"Hàng tuần",loadingQuota:"Đang tải quota..."},userMenu:{signedInAs:"Đăng nhập sebagai {{username}}"},authMonitorLive:{live:"TRỰC TIẾP",accountMonitor:"Theo dõi tài khoản",updated:"Cập nhật lúc {{time}}",updatedNow:"Vừa cập nhật",requestsLabel:"req",stats:"Thống kê",successRate:"Tỷ lệ thành công",missingProjectId:"Thiếu Project ID",noActivity:"không hoạt động"},providerCard:{missingProjectIdAria:"Thiếu Project ID"},loginPage:{showPassword:"Hiện mật khẩu",hidePassword:"Ẩn mật khẩu"},cliproxyStatsOverview:{sessionStatistics:"Thống kê phiên",realTimeMetrics:"Chỉ số thời gian thực từ {{backend}}",offline:"Ngoại tuyến",running:"Đang chạy",noActiveSession:"Không có phiên hoạt động",noActiveSessionHint:"Bắt đầu phiên CLIProxy bằng ccs gemini, ccs codex hoặc ccs agy để xem thống kê thời gian thực.",failedLoadStats:"Không tải được thống kê",totalRequests:"Tổng yêu cầu",successCount:"{{count}} thành công",successRate:"Tỷ lệ thành công",totalTokens:"Tổng token",estimatedCost:"~${{cost}} ước tính",modelsUsed:"Mô hình đã dùng",modelUsageDistribution:"Phân bố sử dụng mô hình",requestCount:"{{count}} yêu cầu"},cliproxyTable:{name:"Tên",provider:"Nhà cung cấp",model:"Mô hình",account:"Tài khoản",status:"Trạng thái",default:"Mặc định",actions:"Hành động"},cliproxyTabs:{overview:"Tổng quan",variants:"Biến thể",aiProviders:"AI Providers",controlPanel:"Bảng điều khiển"},cliproxyHeader:{ccsLevelAccountManagement:"Quản lý tài khoản cấp CCS",cliproxyNotAvailable:"CLIProxy không khả dụng",cliproxyControlPanel:"Bảng điều khiển CLIProxy",noVariants:"Không tìm thấy biến thể CLIProxy nào.",addAccountToStart:"Thêm tài khoản để bắt đầu"},routingGuidance:{roundRobin:"Round-robin phân bổ đều lượt dùng.",fillFirst:"Fill-first giữ tài khoản dự phòng cho đến khi cần thiết.",routingStrategy:"Chiến lược định tuyến",optionalRouting:"Định tuyến tùy chọn"},extendedContext:{extendedContext:"Ngữ cảnh mở rộng"},cliproxyConfig:{unsavedChanges:"Thay đổi chưa lưu",original:"Gốc",modified:"Đã sửa đổi",reviewChanges:"Xem lại thay đổi",loadingEditor:"Đang tải trình soạn thảo..."},providerEditor:{provider:"Nhà cung cấp",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",modelMapping:"Ánh xạ mô hình",status:"Trạng thái",loadingSettings:"Đang tải cài đặt...",loadingEditor:"Đang tải trình soạn thảo...",noAccountsConnected:"Chưa kết nối tài khoản nào",addAccountToStart:"Thêm tài khoản để bắt đầu",gcpProjectIdReadonly:"GCP Project ID (chỉ đọc)",projectIdNA:"Project ID: N/A",missingProjectId:"Thiếu Project ID",missingProjectIdHint:"Điều này có thể gây lỗi. Xóa tài khoản và thêm lại để lấy Project ID.",useIncognito:"Dùng ẩn danh",aliases:"Bí danh",current:"Hiện tại",currentValue:"Giá trị hiện tại",composite:"tổng hợp",defaultLabel:"mặc định",requiredSetup:"Cài đặt cần thiết",connectorName:"Tên connector",proxyUrl:"URL proxy",proxyUrlSet:"Đã đặt URL proxy",excludedModels:"Mô hình loại trừ",headers:"Headers",secret:"Secret",prefix:"Tiền tố",modelMappings:"Ánh xạ mô hình",baseUri:"URL cơ sở",apiKeys:"Khóa API",presets:"Áp dụng ánh xạ mô hình đã cấu hình sẵn",createVariant:"Tạo biến thể CLIProxy",agyDenylist:"Danh sách loại trừ Antigravity: Claude Opus 4.5 và Claude Sonnet 4.5 đã bị loại bỏ."},providerEditorAccountItem:{modelsUsed:"Mô hình đã dùng"},bulkActionBar:{applyPreset:"Áp dụng preset"},modelConfigSection:{defaultModel:"Mô hình mặc định"},rawEditorSection:{rawConfig:"Cấu hình thô"},providerEditorHeader:{connectorName:"Tên connector"},aiProvidersFamilyRail:{current:"Hiện tại"},aiProvidersEntryCard:{apiKeys:"Khóa API"},aiProvidersEntryDialog:{connectorName:"Tên connector",baseUri:"URL cơ sở",proxyUrl:"URL proxy",secret:"Secret",prefix:"Tiền tố",excludedModels:"Mô hình loại trừ",headers:"Headers",modelMappings:"Ánh xạ mô hình",requiredSetup:"Cài đặt cần thiết",optionalRouting:"Định tuyến tùy chọn"},codex:{controlCenter:"Trung tâm điều khiển",overview:"Tổng quan",docs:"Tài liệu",nativeCodexRuntime:"Codex Runtime gốc",ccsCodexProvider:"CCS Codex provider / bridge",codexDocs:"Tài liệu Codex",supportedFlows:"Các luồng được hỗ trợ",twoSupportedPaths:"Hai đường dẫn được hỗ trợ:",nativeLabel:"Gốc:",nativeDesc:"Codex là target runtime hạng nhất trong CCS v1.",ccsBridge:"CCS Bridge",apiProfilesDefault:"API profiles mặc định dùng Claude hoặc Droid.",recommendedSetupFlow:"Luồng thiết lập khuyến nghị",fastestPath:"Đường dẫn nhanh nhất",officialChannels:"Kênh chính thức",codexCli:"Codex CLI",openNativeCodex:"Mở Codex gốc",runBuiltInCodex:"Chạy Codex tích hợp trên Codex",runBuiltInCodexExplicit:"Chạy Codex tích hợp trên Codex (rõ ràng)",openCodexDashboard:"Mở dashboard Codex",status:"Trạng thái",profiles:"Hồ sơ",createNewProfile:"Tạo hồ sơ mới",createNewProvider:"Tạo nhà cung cấp mới",createNewMcpServer:"Tạo MCP server mới",defaultProvider:"Nhà cung cấp mặc định",useDefault:"Dùng mặc định",useGlobalProvider:"Dùng nhà cung cấp toàn cục",useProviderDefault:"Dùng mặc định của nhà cung cấp",quickFillWarning:"Chỉ điền nhanh. Hãy xem lại trước khi lưu.",thisFileUpstreamOwned:"Tệp này thuộc sở hữu của Codex CLI upstream.",notes:"Ghi chú",approvalPolicy:"Chính sách phê duyệt",sandboxMode:"Chế độ sandbox",reasoningEffort:"Mức nỗ lực lý luận",useGlobalEffort:"Dùng mức toàn cục",reasoningEffortCapitalized:"Mức nỗ lực lý luận",thinkingBudgetTokens:"Token ngân sách tư duy",modelContextWindow:"Cửa sổ ngữ cảnh mô hình",autoCompactTokenLimit:"Giới hạn token tự động nén",toolOutputTokenLimit:"Giới hạn token đầu ra tool",webSearch:"Tìm kiếm web",personality:"Tính cách",model:"Mô hình",rawOnly:"Chỉ thô",trusted:"đã tin cậy",untrusted:"chưa tin cậy",noProjectTrustEntries:"Không có mục tin cậy dự án nào được lưu.",codexNativeRecipe:"Đã lưu công thức Codex gốc",gptContextCap:"Giới hạn ngữ cảnh GPT-5.4",usageLimitCost:"Chi phí vượt mức 272K",longContextOverride:"Ghi đè ngữ cảnh dài",counts2x:"Tính 2x",normalUsageWindow:"Cửa sổ sử dụng bình thường",useCodexDefault:"Dùng mặc định Codex",stdio:"stdio",streamableHttp:"streamable-http",responses:"phản hồi",defaultTargetCli:"CLI mục tiêu mặc định",executionChain:"Chuỗi thực thi",targetPath:"Đường dẫn mục tiêu hiện tại",userConfig:"Cấu hình người dùng",configYaml:"config.yaml",flow:"Luồng",docsTab:"Tài liệu"},droidSettings:{quickControls:"Điều khiển nhanh",reasoningControls:"Điều khiển lý luận",thinkingBudget:"Ngân sách tư duy",anthropicOnly:"Chỉ mô hình Anthropic",byokCustomModels:"Mô hình tùy chỉnh BYOK"},rawJsonSettingsEditor:{title:"Trình soạn thảo cài đặt thô"},copilotConfigForm:{copilotConfiguration:"Cấu hình Copilot",deprecatedModels:"Phát hiện mô hình Copilot đã lỗi thời",failedLoadStatus:"Không tải được trạng thái",useWithClaudeCode:"Dùng đăng ký GitHub Copilot với Claude Code",githubCopilotControls:"GitHub Copilot kiểm soát giới hạn prompt/ngữ cảnh ở upstream.",provider:"Nhà cung cấp",filePath:"Đường dẫn tệp",status:"Trạng thái",enabled:"Đã bật",disabled:"Đã tắt",loadingEditor:"Đang tải trình soạn thảo...",modelMapping:"Ánh xạ mô hình",quickUsage:"Sử dụng nhanh",noPremiumUsage:"Không có số liệu sử dụng premium"},copilotPresets:{gpt5Codex:"GPT-5.3 Codex",claude46:"Claude 4.6",gemini3:"Gemini 3"},healthCard:{allSystemsNominal:"Tất cả hệ thống hoạt động bình thường",machineChecks:"Kiểm tra máy"},analyticsCards:{cacheCost:"Chi phí cache",hitRate:"Tỷ lệ trúng",inputOutputRatio:"Tỷ lệ Đầu vào/Đầu ra",noCacheData:"Không có dữ liệu cache",noModelData:"Không có dữ liệu mô hình",noSessionData:"Không có dữ liệu phiên",noTokenData:"Không có dữ liệu token",totalCost:"Tổng chi phí",totalTokens:"Tổng token",usageInsights:"Phân tích sử dụng"},dateRangeFilter:{pickADate:"Chọn ngày"},logsConfig:{level:"Mức",message:"Thông điệp",source:"Nguồn",time:"Thời gian",proc:"Tiến trình",open:"Mở",run:"Chạy",refreshEntries:"Làm mới mục"},logsDetailPanel:{details:"Chi tiết"},logsFilters:{filters:"Bộ lọc"},logsOverviewCards:{overview:"Tổng quan"},logsPageSkeleton:{loadingLogs:"Đang tải nhật ký..."},monitoringErrorLogs:{logContent:"Nội dung nhật ký"},analyticsPages:{chartsGrid:"Biểu đồ",costByModel:"Chi phí theo mô hình"},toasts:{profileCreated:"Đã tạo hồ sơ thành công",profileUpdated:"Đã cập nhật hồ sơ thành công",profileDeleted:"Đã xóa hồ sơ thành công",orphanProfilesComplete:"Hoàn tất đăng ký hồ sơ mồ côi",profileCopied:"Đã sao chép hồ sơ thành công",profileImported:"Đã nhập hồ sơ thành công",authRequired:"Yêu cầu xác thực {{provider}}",authSuccess:"Xác thực {{provider}} thành công!",authFailed:"Xác thực {{provider}} thất bại",deviceCodeExpired:"Mã thiết bị đã hết hạn. Vui lòng thử lại.",codeCopied:"Đã sao chép mã vào bảng nhớ tạm",failedCopy:"Không sao chép được mã",configSaved:"Đã lưu cấu hình thành công",configSaveFailed:"Lưu thất bại: {{error}}",invalidYaml:"Không thể lưu YAML không hợp lệ",configUpdatedExternally:"Cấu hình đã được cập nhật bên ngoài",settingsFileUpdated:"Tệp cài đặt đã được cập nhật",accountsUpdated:"Tài khoản đã được cập nhật",noProfilesToSync:"Không có hồ sơ để đồng bộ",syncFailed:"Đồng bộ thất bại: {{error}}",providerAuthSuccess:"Xác thực {{provider}} thành công",providerDeviceCodeInCallback:"Nhà cung cấp trả về Device Code flow trong chế độ callback",loggingConfigSaved:"Đã lưu cấu hình ghi nhật ký.",loggingConfigSaveFailed:"Không lưu được cấu hình ghi nhật ký.",unifiedConfigUpdated:"Đã cập nhật cấu hình thành công",migrationPreviewComplete:"Xem trước di chuyển hoàn tất",migrationComplete:"Di chuyển hoàn tất thành công",migrationFailed:"Di chuyển thất bại",rollbackComplete:"Khôi phục hoàn tất thành công",rollbackFailed:"Khôi phục thất bại",defaultAccountSet:'Tài khoản mặc định đã đặt thành "{{name}}"',defaultAccountReset:"Tài khoản mặc định đã đặt lại về CCS",accountDeleted:'Đã xóa tài khoản "{{name}}"',contextUpdated:'Đã cập nhật ngữ cảnh "{{name}}" thành {{summary}}',legacyConfirmError:'Tài khoản "{{name}}" cần xác nhận rõ ràng. Dùng Chỉnh sửa Đồng bộ lịch sử trên tài khoản này.',legacyConfirmFailed:'Tài khoản cũ "{{name}}" xác nhận thất bại: {{error}}',legacyConfirmSuccess_one:"Đã xác nhận {{count}} tài khoản cũ",legacyConfirmSuccess_other:"Đã xác nhận {{count}} tài khoản cũ",noLegacyAccounts:"Không có tài khoản cũ nào cần xác nhận",routingStrategySet:"Chiến lược định tuyến đã đặt thành {{strategy}}",variantCreated:"Đã tạo biến thể thành công",variantUpdated:"Đã cập nhật biến thể thành công",variantDeleted:"Đã xóa biến thể thành công",defaultAccountUpdated:"Đã cập nhật tài khoản mặc định",accountRemoved:"Đã xóa tài khoản",accountPaused:"Đã tạm dừng tài khoản",accountResumed:"Đã tiếp tục tài khoản",accountAdded:"Đã thêm tài khoản cho {{provider}}",kiroImported:"Đã nhập tài khoản Kiro: {{name}}",kiroTokenImported:"Đã nhập token Kiro",modelUpdated:"Đã cập nhật mô hình",presetSaved:'Đã lưu preset "{{name}}"',presetDeleted:"Đã xóa preset",cliproxyAlreadyRunning:"CLIProxy đã đang chạy",cliproxyStarted:"CLIProxy đã khởi động thành công",cliproxyStartFailed:"Không khởi động được CLIProxy",cliproxyStopped:"Đã dừng CLIProxy",cliproxyStopFailed:"Không dừng được CLIProxy",presetApplied:'Đã áp dụng preset "{{name}}"',presetAppliedCustom:"Đã áp dụng preset tùy chỉnh",settingsSavedWithAdjustments:"Cài đặt đã lưu với điều chỉnh mô hình",settingsSaved:"Đã lưu cài đặt",failedSaveSettings:"Không lưu được cài đặt",codexRefreshFailed:"Không làm mới được snapshot Codex. Các chỉnh sửa thô đã được giữ.",codexRefreshError:"Không làm mới được snapshot Codex.",codexFixToml:"Sửa TOML trước khi lưu.",codexSaved:"Đã lưu Codex config.toml.",codexChangedExternally:"config.toml đã thay đổi bên ngoài. Làm mới và thử lại.",codexSaveFailed:"Không lưu được Codex config.toml.",codexUpdateFailed:"Không cập nhật được cấu hình Codex.",noOrphanProfiles:"Không tìm thấy cài đặt hồ sơ mồ côi",profilesRegistered:"Đã đăng ký {{count}} hồ sơ{{skipped}}",destinationEmpty:"Tên hồ sơ đích không được để trống",profileExportDownloaded:"Đã tải xuống xuất hồ sơ",profileImportFailed:"Không nhập được gói hồ sơ"},profileEditorSections:{imageAnalysis:"Phân tích hình ảnh",loadingImageSettings:"Đang tải cài đặt hình ảnh...",skipPermissionPrompts:"Bỏ qua nhắc quyền khi khởi chạy",useNativeImageReading:"Dùng đọc hình ảnh gốc",skipTransformer:"Bỏ qua transformer",friendlyUi:"Giao diện thân thiện",info:"Thông tin"},imageAnalysisStatus:{sectionTitle:"Hình ảnh",openSettings:"Mở Cài đặt",useNativeImageReading:"Dùng đọc hình ảnh gốc",refreshingPreview:"Đang làm mới xem trước",savedStatus:"Trạng thái đã lưu",livePreview:"Xem trước trực tiếp",disabledGlobally:"Đã tắt toàn cục",targetBypassesHook:"{{target}} bỏ qua hook",nativeImageReading:"Đọc hình ảnh gốc",setupNeeded:"Cần thiết lập",needsAuth:"Cần xác thực",needsProxy:"Cần proxy",nativeFallback:"Dự phòng gốc",transformerReady:"Transformer sẵn sàng",badgeDisabled:"Đã tắt",badgeBypassed:"Đã bỏ qua",badgeNative:"Gốc",badgeSetup:"Thiết lập",badgeAuth:"Xác thực",badgeProxy:"Proxy",badgeReady:"Sẵn sàng",capabilityVerified:"Đã xác minh",capabilityUnknown:"Không xác định",toggleSummaryNativeCapable:"{{model}} có vẻ hỗ trợ hình ảnh. CCS sẽ bỏ qua transformer ở đây.",toggleSummaryNativeModel:"CCS sẽ ưu tiên đọc gốc cho {{model}}.",toggleSummaryNativeDefault:"CCS sẽ ưu tiên đọc hình ảnh gốc cho hồ sơ này.",toggleSummaryNativeFileAccess:"Hồ sơ này hiện đang dùng truy cập tệp gốc.",toggleSummaryInactiveTarget:"Định tuyến hình ảnh phía Claude đã lưu không hoạt động khi {{target}} đang được chọn.",toggleSummaryTransformerRoute:"Tuyến transformer: {{backend}}{{modelSuffix}}.",noteDisabledGlobally:"Hình ảnh đã bị tắt toàn cục trong cài đặt CCS.",noteTargetBypassesHook:"Mục tiêu hiện tại {{target}} bỏ qua Claude Read hook.",notePersistHook:"Persist hook hồ sơ trước khi tuyến transformer có thể chạy ở đây.",targetLabel:{claude:"Claude Code",droid:"Factory Droid",codex:"Codex CLI"}},openrouterBadge:{new:"MỚI",integration:"Tích hợp OpenRouter"},openrouterBanner:{accessModels:"Truy cập {{count}}+ mô hình qua OpenRouter",add:"Thêm"},openrouterModelPicker:{searchModels:"Tìm kiếm mô hình",newestModels:"Mô hình mới nhất"},openrouterPromoCard:{title:"OpenRouter",description:"Truy cập hàng trăm mô hình qua một API endpoint."},profileCard:{profile:"Hồ sơ",openRouter:"Hồ sơ OpenRouter",claudeCode:"Claude Code",claudeCodeDefault:"Claude Code (mặc định)",factoryDroid:"Factory Droid",codexCli:"Codex CLI",ccsProfile:"Hồ sơ CCS"},profileDeck:{profiles:"Hồ sơ",failedToLoad:"Không tải được hồ sơ: {{message}}",noProfiles:"Chưa có hồ sơ nào. Tạo hồ sơ đầu tiên để bắt đầu."},profilesTable:{name:"Tên",provider:"Nhà cung cấp",model:"Mô hình",target:"Mục tiêu",lastModified:"Sửa đổi lần cuối",actions:"Hành động",edit:"Chỉnh sửa"},profileCreateDialog:{createProfile:"Tạo hồ sơ",appliedModelToTiers:'Đã áp dụng "{{model}}" cho tất cả tier mô hình',profileCreated:'Đã tạo hồ sơ "{{name}}"',failedCreate:"Không tạo được hồ sơ",chooseProviderHint:"Chọn preset nhà cung cấp hoặc cấu hình API endpoint tùy chỉnh.",basicInformation:"Thông tin cơ bản",modelConfiguration:"Cấu hình mô hình",usedInCli:"Dùng trong CLI:",apiBaseUrl:"URL cơ sở API",baseUrlPlaceholder:"https://api.example.com/v1",prefilledFromPreset:"Điền sẵn từ {{name}}. Bạn có thể tùy chỉnh nếu cần.",optionalForPreset:"Tùy chọn cho {{name}}. Để trống để dùng xác thực Anthropic gốc.",endpointHint:"Endpoint chấp nhận yêu cầu tương thích OpenAI và Anthropic",optional:"(tùy chọn)",apiKeyOptionalPlaceholder:"Tùy chọn - chỉ khi bật xác thực",apiKeyPlaceholder:"sk-...",apiKeyOptionalHint:"Chỉ cần khi endpoint cục bộ bật xác thực",defaultTargetCli:"CLI mục tiêu mặc định",modelMapping:"Ánh xạ mô hình",modelMappingDesc:"Ánh xạ các tier Claude Code (Opus/Sonnet/Haiku) sang mô hình được nhà cung cấp hỗ trợ.",searchModelsPlaceholder:"Gõ để tìm (vd: opus, sonnet, gpt-4o)...",noModelsFound:'Không tìm thấy mô hình cho "{{query}}"',loadingModels:"Đang tải mô hình...",defaultModel:"Mô hình mặc định",sonnetMapping:"Ánh xạ Sonnet",opusMapping:"Ánh xạ Opus",haikuMapping:"Ánh xạ Haiku",sonnetMappingPlaceholder:"vd: gpt-4o, claude-sonnet-4",opusMappingPlaceholder:"vd: o1, claude-opus-4.5",haikuMappingPlaceholder:"vd: gpt-4o-mini, claude-3.5-haiku",free:"Miễn phí"},profileDialogLegacy:{editProfile:"Chỉnh sửa hồ sơ"},supportEntryCard:{actionRequired:"Cần hành động"},settingsPage:{title:"Cài đặt",loading:"Đang tải...",failedLoad:"Không tải được cài đặt.",tabs:{web:"Web",env:"Env",think:"Tư duy",proxy:"Proxy",auth:"Xác thực",backup:"Sao lưu",channels:"Kênh",imageAnalysis:"Hình ảnh"},websearchSection:{title:"Tìm kiếm Web",description:"Cấu hình tìm kiếm web dựa trên CLI."},thinkingSection:{title:"Tư duy",description:"Cấu hình tư duy/lý luận mở rộng cho các mô hình được hỗ trợ.",directOverride:"Ghi đè trực tiếp",youType:"Bạn gõ:",ccsAdds:"CCS thêm:",executionChain:"Chuỗi thực thi",primaryBackends:"Backend chính",legacyCliFallbacks:"Fallback CLI cũ",managedPayload:"Payload được quản lý",sharedTargetMetadata:"Metadata mục tiêu dùng chung",ideTargetMetadata:"Metadata mục tiêu IDE",ideSettingsPath:"Đường dẫn cài đặt IDE",ideHost:"Host IDE",resolvedBinding:"Binding đã giải quyết",bindingName:"Tên binding",inSync:"Đồng bộ",currentTargetPath:"Đường dẫn mục tiêu hiện tại",warnings:"Cảnh báo",notes:"Ghi chú",workspacePresets:"Preset workspace",draft:"Bản nháp",advanced:"Nâng cao",recommended:"Luồng thiết lập khuyến nghị",configureModelFirst:"Cấu hình mô hình trước"},proxySection:{title:"Proxy",loadingImageSettings:"Đang tải cài đặt hình ảnh..."},channelsSection:{title:"Kênh chính thức",description:"Xem và quản lý các kênh phát hành chính thức."},imageAnalysisSection:{title:"Phân tích hình ảnh",description:"Cấu hình cài đặt phân tích hình ảnh.",loading:"Đang tải cài đặt hình ảnh..."}},codexPage:{title:"Codex",controlCenter:"Trung tâm điều khiển",overview:"Tổng quan",docs:"Tài liệu",nativeRuntime:"Runtime gốc",ccsProvider:"CCS Provider",setup:"Thiết lập"},apiPage:{title:"Hồ sơ API",subtitle:"Quản lý hồ sơ API và các endpoint."},claudeExtensionPage:{title:"Claude Extension",subtitle:"Cài đặt tích hợp Claude Extension.",claudeAuth:"Xác thực Claude",status:"Trạng thái",targetMetadata:"Metadata mục tiêu IDE"},sharedPageV2:{title:"Dùng chung",subtitle:"Quản lý dữ liệu dùng chung."},homePageV2:{title:"Trang chủ",logsMoved:"Nhật ký đã chuyển sang workspace riêng",profiles:"Hồ sơ",cliproxy:"CLIProxy",accounts:"Tài khoản",health:"Sức khỏe"},analyticsPageV2:{title:"Phân tích",subtitle:"Phân tích sử dụng và thông tin chi tiết."},logsPageV2:{title:"Nhật ký",subtitle:"Xem và quản lý nhật ký hệ thống."},healthPageV2:{title:"Sức khỏe",subtitle:"Giám sát sức khỏe hệ thống."},aiProvidersPage:{title:"AI Providers",subtitle:"Quản lý cấu hình AI providers.",unableToLoad:"Không thể tải AI Providers"}}},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:"ヘルス",logs:"ログ",settings:"設定",openrouterTooltip:"注目: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"プロファイル",cliproxy:"CLIProxy",accounts:"アカウント",health:"ヘルス",configurationRequired:"設定が必要"},auth:{dashboardTitle:"CCS Dashboard",protectedAccessLabel:"保護されたアクセス",remoteGuardLabel:"リモートアクセス保護",loading:"ダッシュボードのアクセス状態を確認しています…",loginDescription:"ホストで設定されたユーザー名とパスワードを使ってダッシュボードにアクセスしてください。",username:"ユーザー名",password:"パスワード",usernamePlaceholder:"ユーザー名を入力",passwordPlaceholder:"パスワードを入力",signIn:"サインイン",signingIn:"サインイン中...",loginFailed:"ログインに失敗しました",lightMode:"ライト",darkMode:"ダーク",noDefaultCredentials:"CCS にデフォルトの認証情報はありません。",credentialsHint:"認証情報はホスト側で `ccs config auth setup` を実行して作成し、ここで使用します。",remoteSetupTitle:"リモートアクセスにはホスト側の設定が必要です",remoteSetupDescription:"このダッシュボードはローカル以外のアドレスから開かれていますが、ホストでダッシュボード認証がまだ有効になっていません。",incompleteSetupDescription:"ダッシュボード認証は有効ですが、ホスト側の設定が未完了です。サインイン前に設定を完了してください。",safetyNoteRemote:"ホスト管理者がダッシュボード認証を有効にするまで、リモート管理はロックされたままです。",safetyNoteLocal:"同じマシン上にいる場合は、localhost の URL を使うのが最も簡単です。",safetyNoteSession:"サインインに成功すると、このホストに限定された HTTP-only セッションが作成されます。",hostStepTitle:"ホスト側で行うこと",hostStepDescription:"ダッシュボード認証情報を作成または再有効化してから、このページをリモート端末で開き直してください。",localStepTitle:"もしこのマシンを使っているなら",localStepDescription:"`ccs config` が表示する localhost の URL を使い、LAN や Tailscale のアドレスは避けてください。",showPassword:"パスワードを表示",hidePassword:"パスワードを隠す"},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:"プリセットを適用",deletePreset:"プリセットを削除"},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:"利用可能なモデルはありません",shadowed:"シャドウ済み",prefixOnly:"プレフィックスのみ",current:"現在",currentValue:"現在の値",preferredPinnedModel:"優先ピンモデル:",pinnedRouteStatus:"ピンルートの状態:",pinnedModelNotAdvertised:"ピンモデルは現在プロキシから通知されていません: {{model}}"},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 で全プロバイダー",profileSummaryCount:"{{count}} 件のプロファイル",profileSummaryCount_other:"{{count}} 件のプロファイル",profileSummaryEmpty:"高品質 + ローカル制御",summaryBadgeDefaultQuality:"既定で最高品質",summaryBadgeLocalLane:"タスクに合うときだけ local を使う",summaryExistingTitle:"プロファイルを選ぶか、新しいレーンを追加",summaryEmptyTitle:"最初のプロファイルレーンを選択",summaryExistingDescription:"このワークスペースには既に {{count}} 件のプロファイルがあります。重要なコーディング作業には高品質プロバイダーを使い、プライバシー・コスト・オフライン要件があるときだけローカルランタイムを追加してください。",summaryExistingDescription_other:"このワークスペースには既に {{count}} 件のプロファイルがあります。重要なコーディング作業には高品質プロバイダーを使い、プライバシー・コスト・オフライン要件があるときだけローカルランタイムを追加してください。",summaryEmptyDescription:"作業に合うレーンを選んでください。Premium プロバイダーは信頼性の高いコーディング向けの既定値で、ローカルランタイムはプライバシー、低コスト変換、実験向けです。",qualityLanesTitle:"高品質レーン",qualityLaneHighlightDefaultQuality:"重要なコーディング作業向けの既定ベストレーン",alibabaLaneDescription:"OpenRouter カタログの外で、専用の premium コーディングレーンが欲しいときに強い直接接続プロファイルです。",alibabaLaneHighlightQuality:"専用エンドポイントで premium 品質が必要なときに最適",localRuntimesTitle:"ローカルランタイム",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"プライベートなプロンプト、ローカル整理、低コストの一括変換に最適",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"カスタム GGUF 構成や高度なセルフホスト型ローカルワークフローに最適",localDetectedModels:"{{count}} 件のローカルモデルを検出",localDetectedModels_other:"{{count}} 件のローカルモデルを検出",localNoModelsDetected:"ローカルモデルはまだ検出されていません",localWaitingServer:"ローカルサーバーとモデル一覧を待機中",localRuntimeCheckingBadge:"確認中",localRuntimeReadyBadge:"準備完了",localRuntimeNeedsModelBadge:"モデルが必要",localRuntimeOfflineBadge:"オフライン",localRuntimeCheckingDescription:"セットアップ案内を表示する前に、ローカルランタイムの状態を確認しています。",localRuntimeReadyDescription:"プライベートなプロンプト、オフライン作業、より安価な一括変換に適しています。",localRuntimeNeedsModelDescription:"ランタイムは起動していますが、推奨ローカルモデルの取得または読み込みがまだ必要です。",localRuntimeOfflineDescription:"このレーンは、プライバシー重視の作業、安価なローカル変換、オフラインセッションに向いています。",localRuntimeCheckingFooter:"ローカルランタイムを確認しています...",localRuntimeReadyFooter:"{{endpoint}} でエンドポイント準備完了",localRuntimeMissingModelFooter:"ローカルセットアップを完了するには `{{command}}` を実行してください。",localRuntimeOfflineFooter:"ローカルエンドポイントを起動するには `{{command}}` を実行してください。",localRuntimeSetupAction:"{{label}} をセットアップ",localRuntimeUseAction:"{{label}} を使う",localRuntimeFinishAction:"{{label}} のセットアップを完了",runtimeProviderBadge:"ランタイムプロバイダー設定",runtimeProviderTitle:"AI Providers を開く",runtimeProviderManagedDescription:"CLIProxy 管理のコネクタ、プロバイダーシークレット、高度なルーティング制御が必要なときに使います。",runtimeProviderFeatureConnectors:"Gemini、Codex、Claude、Vertex、OpenAI 互換コネクタ",runtimeProviderFeatureSecrets:"共有シークレットを個別の API プロファイルから切り離して管理",runtimeProviderFooter:"複数のプロファイルで 1 つのプロバイダー設定を共有したい場合に最適です。",createOpenRouterProfile:"OpenRouter プロファイルを作成",getApiKeyAt:"API キー取得:",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 はアカウントごとに分離されます。",implicationTitle:"保存後の挙動",isolatedImplication:"このアカウントは分離されたままです。他のアカウントからこの継続状態を再開できません。",sameGroupRule:"アカウント同士で継続性を共有するには、両方が同じグループ「{{group}}」を使う必要があります。",noSameGroupPeer:"現在このグループを使っている他のアカウントはありません。",sameGroupPeerCount_one:"このグループを使う他のアカウントが {{count}} 件あります。",sameGroupPeerCount_other:"このグループを使う他のアカウントが {{count}} 件あります。",deeperReady_one:"同じグループの {{count}} 件のアカウントがすでに拡張継続性を使っています。これは現状で最も強い引き継ぎ設定です。",deeperReady_other:"同じグループの {{count}} 件のアカウントがすでに拡張継続性を使っています。これは現状で最も強い引き継ぎ設定です。",deeperNeedsPeers:"このアカウントでは拡張継続性が有効ですが、同じグループの他アカウントでも拡張継続性を有効にしないと、アカウント間再開の期待には十分ではありません。",standardWarning:"標準共有はプロジェクト文脈向けです。アカウント間再開を期待するなら、両方のアカウントで拡張継続性を有効にしてください。",resumeOriginalWarning:"古い会話が重要なら、設定を変える前に元のアカウントで再開してください。",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 を使います。",sameGroupRule:"現在、継続性を共有できるのは、両方のアカウントが共有モードかつ同じグループを使っている場合だけです。",deeperRecommendation:"グループ「{{group}}」は共有されていますが、アカウント間再開を期待するなら拡張継続性も有効にする方が安全です。",partialGroup:"グループ「{{group}}」は良い状態ですが、他のアカウントやグループでは同グループ設定や拡張継続性がまだ不足しています。",readyGroup:"グループ「{{group}}」では複数アカウントで拡張継続性が有効です。これは現状で最も強い引き継ぎ設定です。",legacyConfirmation_one:"{{count}} 件のレガシーアカウントで明示的な確認がまだ必要です。",legacyConfirmation_other:"{{count}} 件のレガシーアカウントで明示的な確認がまだ必要です。"},continuityReadiness:{title:"アカウント間再開チェック",description:"アカウントを切り替える前に、何が不足しているかをこのカードで確認できます。",state:{single:"単一アカウント",isolated:"再開オフ","shared-alone":"共有だが未完成","shared-standard":"プロジェクトのみ",partial:"一部のみ準備完了",ready:"強い引き継ぎ準備完了"},metrics:{isolated:"分離",sharedPeers:"同グループあり",deeperReady:"拡張準備完了"},messages:{single:{title:"現在は auth アカウントが 1 つだけです。",description:"アカウント間の引き継ぎはまだ関係ありません。共有継続性を設定する前に、もう 1 つ auth アカウントを追加してください。"},isolated:{title:"現在、アカウント間再開はオフです。",description:"表示中のアカウントはすべて分離モードのため、あるアカウントで作成したセッションはそのアカウントに残ります。"},"shared-alone":{title:"共有モードはありますが、どのグループにも相手がいません。",description_one:"{{count}} 件の共有アカウントが、同じグループに入る別アカウントを待っています。",description_other:"{{count}} 件の共有アカウントが、同じグループに入る別アカウントを待っています。"},"shared-standard":{title:"グループ「{{group}}」はプロジェクト文脈を共有していますが、拡張継続性のペアがまだありません。",description:"ユーザーはプロジェクト共有以上を期待する可能性があります。より強い引き継ぎのため、このグループ内の両アカウントで拡張継続性を有効にしてください。"},partial:{title:"1 つのグループは準備できていますが、全体の設定はまだ混在しています。",description:"少なくとも 1 つのグループでは拡張継続性が使われていますが、他のアカウントはまだ分離状態、共有グループ内で単独、または拡張継続性が未設定です。"},ready:{title:"グループ「{{group}}」は現状で最も強い継続性設定になっています。",description:"このグループでは複数アカウントがすでに拡張継続性を使っています。実際に再開できるかどうかは、Claude が上流で何を保存しているかにも依存します。"}},stepsTitle:"次にユーザーがやるべきこと",steps:{syncBoth:"切り替え先のアカウントだけでなく、両方のアカウントで「同期」を開いてください。",sameGroup:"両方のアカウントで同じ履歴同期グループを使ってください。現在の推奨グループは「{{group}}」です。",enableDeeper:"プロジェクト共有だけでなくアカウント間再開を期待するなら、両方のアカウントで拡張継続性を有効にしてください。",resumeOriginal:"元の会話が重要なら、継続性設定を変える前に元のアカウントで再開してください。"},singleSteps:{addAccount:"アカウント間引き継ぎを考える前に、まず 2 つ目の ccs auth アカウントを作成してください。",sameGroupLater:"2 つ目のアカウントができたら、両方を同じ履歴同期グループに入れてください。",enableDeeperLater:"将来アカウント間再開を期待するなら、両方のアカウントで拡張継続性を有効にしてください。",resumeOriginal:"2 つ目のアカウントが整うまでは、重要な会話は元のアカウントから再開し続けてください。"}},continuityOverview:{plainLaneTitle:"通常の ccs は別の再開レーンを使っています",plainLaneDescription:"通常の ccs は現在 {{lane}} から再開しており、このアカウントのレーンではありません。同期設定を変える前に元のレーンを先に復旧してください。",setDefaultHint:"今後の通常の ccs を特定のアカウントに合わせたい場合は、その行の「既定に設定」を使ってください。",recommendBadge:"推奨 {{group}}",partialBadge:"部分同期 {{group}}",lane:{native:"ネイティブ Claude(~/.claude)",accountDefault:"アカウント {{name}}",accountInherited:"継続性継承によるアカウント {{name}}",profileDefault:"既定プロファイル {{name}}(ネイティブ Claude レーン)"}},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:"分離",noSameGroupPeer:"同じグループの相手がまだいません",sameGroupPeerCount_one:"{{count}} 件の同グループアカウント",sameGroupPeerCount_other:"{{count}} 件の同グループアカウント",legacyReview:"この推定された既定状態を確認して明示的に確定してください。",noHandoff:"アカウント間再開は元のアカウントに残ります。",badges:{shared:"共有",deeper:"拡張",legacy:"レガシー",isolated:"分離"}},addAccountDialog:{title:"{{displayName}} アカウントを追加",descKiro:"Kiro の認証方法を選び、ブラウザーで認証するか Kiro IDE からインポートしてください。",descDeviceCode:"認証をクリックすると、プロバイダーのサイトで入力する確認コードが表示されます。",descOauth:"認証をクリックすると OAuth URL を取得します。任意のブラウザーで開いてサインインしてください。",powerUserEnabled:"上級者モードが有効です",powerUserSkipped:"設定 > プロキシのパワーユーザーモードにより、AGY の責任確認チェックと Gemini ダッシュボードのリスク文言入力をスキップしています。OAuth / アカウントに関するリスクはすべて自己責任です。",powerUserLoadFailed:"パワーユーザーモード設定を読み込めませんでした。設定 > プロキシを確認してから再試行してください。",powerUserLoading:"パワーユーザーモードの安全設定を読み込み中です。少し待ってから再試行してください。",powerUserUnavailableRetry:"パワーユーザーモードは利用できません。必要なプロバイダーの安全確認を完了してから再試行してください。",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:"詳細を隠す",showPausedAccounts:"一時停止を表示 ({{count}})",hidePausedAccounts:"一時停止を非表示 ({{count}})",visibleTotalRequests:"表示中のリクエスト",visibleAccounts:"表示中のアカウント",excludingPausedAccounts:"一時停止 {{count}} 件を除外中",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 で実行",runOnDroidWithFlag:"--target で Droid 実行",droidAliasExplicit:"Droid エイリアス(明示)",overrideToClaude:"Claude に切り替え",overrideToClaudeExplicit:"Claude に切り替え(明示)",targetHintPreferredAlias:"推奨の明示エイリアス:",targetHintClaudeDefault:"デフォルトコマンド:",targetHintLegacyAlias:"従来ショートカットも利用可能:",targetHintOverride:"実行ごとに次でも上書きできます",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検索",image:"画像",channels:"チャンネル",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:"パワーユーザーモードの読み込みに失敗しました",failedUpdateAgyMode:"パワーユーザーモードの更新に失敗しました",failedVerifyAgyMode:"パワーユーザーモードの永続化確認に失敗しました",notPersistedAgyMode:"パワーユーザーモードが保存されませんでした。別のプロセスが設定を変更した可能性があります。",agyModeEnabled:"パワーユーザーモードを有効にしました。",agyModeDisabled:"パワーユーザーモードを無効にしました。",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 + Gemini パワーユーザーモード",agyModeDesc:"アカウント追加画面の AGY 責任確認チェックと、Gemini ダッシュボードの入力確認をスキップします。",agyWarning:"OAuth の停止/BAN リスクパターン (#509) を十分理解している場合にのみ使用してください。CCS はアカウント喪失の責任を負いません。",finalConfirm:"最終確認",finalConfirmDesc:"有効にすると、ダッシュボード / CLI の AGY 安全チェックと Gemini ダッシュボードのリスク文言確認をスキップします。続行する前に issue #509 を確認し、正確なフレーズを入力してください。",step1:"ステップ 1",readIssue:"Issue #509 を読む",step2:"ステップ 2",typePrefix:"有効にするには",typeSuffix:"と入力してください。",typePhraseAria:"Antigravity + Gemini パワーユーザーモードを有効にするには I ACCEPT RISK と入力してください",exactPhrase:"完全一致で入力してください。",enableAgyMode:"Antigravity + Gemini パワーユーザーモードを有効にする",toggleAgyMode:"Antigravity + Gemini パワーユーザーモードを切り替え",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:": minimal/low/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:"共有拡張",sharedDeeperDesc:"session-env、file-history、shell-snapshots、todos も同期します。アカウント間再開を期待するなら推奨です。",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設定を保存しました",liveProbe:"ライブプローブ",runLiveProbe:"ライブプローブを実行",rerunLiveProbe:"ライブプローブを再実行",probing:"プローブを実行中...",probeNotRun:"まだプローブを実行していません",probeLocalReadinessHint:"ローカルの準備チェックが通っても、実際のランタイム経路は失敗する場合があります。ライブプローブで Cursor の完全な経路を確認してください。",probeStage:"段階",probeHttpStatus:"HTTP ステータス",probeDuration:"所要時間",probeModel:"モデル",probeMessage:"メッセージ",probeSucceeded:"プローブ成功",probeFailed:"プローブ失敗",probeSaveFirst:"ライブプローブを実行する前に Cursor の変更を保存するか破棄してください",refreshStatus:"Cursor の状態を更新",refreshConfiguration:"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コンテンツはありません。"},accountCardStats:{notUsedYet:"未使用"},accountQuotaPanel:{weekly:"週間",loadingQuota:"クォータを読み込み中..."},accountSurfaceCard:{business:"ビジネス",personal:"個人",variant:"バリアント"},aiProvidersEntryCard:{apiKeys:"API Keys"},aiProvidersEntryDialog:{connectorName:"コネクタ名",baseUri:"ベース URL",proxyUrl:"プロキシ URL",secret:"シークレット",prefix:"プレフィックス",excludedModels:"除外モデル",headers:"ヘッダー",modelMappings:"モデルマッピング",requiredSetup:"必要なセットアップ",optionalRouting:"オプションのルーティング"},aiProvidersFamilyRail:{current:"現在"},aiProvidersPage:{title:"AI プロバイダー",subtitle:"AI プロバイダーの設定を管理します。",unableToLoad:"AI プロバイダーを読み込めませんでした"},analyticsCards:{cacheCost:"キャッシュコスト",hitRate:"ヒット率",inputOutputRatio:"入力/出力比",noCacheData:"キャッシュデータがありません",noModelData:"モデルデータがありません",noSessionData:"セッションデータがありません",noTokenData:"トークンデータがありません",totalCost:"合計コスト",totalTokens:"合計トークン",usageInsights:"利用インサイト"},analyticsPageV2:{title:"分析",subtitle:"利用分析とインサイト。"},analyticsPages:{chartsGrid:"チャート",costByModel:"モデル別コスト"},apiPage:{title:"API プロファイル",subtitle:"API プロファイルとエンドポイントを管理します。"},authMonitorLive:{live:"ライブ",accountMonitor:"アカウントモニター",updated:"{{time}} に更新",updatedNow:"たった今更新",requestsLabel:"件",stats:"統計",successRate:"成功率",missingProjectId:"プロジェクト ID がありません",noActivity:"アクティビティなし"},bulkActionBar:{applyPreset:"プリセットを適用"},ccsLogo:{alt:"CCS ロゴ",text:"CCS Config"},claudeExtensionPage:{title:"Claude Extension",subtitle:"Claude Extension の連携設定。",claudeAuth:"Claude 認証",status:"ステータス",targetMetadata:"IDE ターゲットメタデータ"},claudekitBadge:{title:"Powered by ClaudeKit Framework",alt:"ClaudeKit",poweredBy:"Powered by",claudekit:"ClaudeKit"},cliproxyConfig:{unsavedChanges:"未保存の変更",original:"変更前",modified:"変更後",reviewChanges:"変更を確認",loadingEditor:"エディターを読み込み中..."},cliproxyHeader:{ccsLevelAccountManagement:"CCS レベルのアカウント管理",cliproxyNotAvailable:"CLIProxy は利用できません",cliproxyControlPanel:"CLIProxy コントロールパネル",noVariants:"CLIProxy バリアントが見つかりません。",addAccountToStart:"アカウントを追加して開始"},cliproxyStatsOverview:{sessionStatistics:"セッション統計",realTimeMetrics:"{{backend}} からのリアルタイム利用指標",offline:"オフライン",running:"稼働中",noActiveSession:"アクティブなセッションなし",noActiveSessionHint:"リアルタイム統計を表示するには、ccs gemini、ccs codex、または ccs agy で CLIProxy セッションを開始してください。",failedLoadStats:"統計の読み込みに失敗しました",totalRequests:"総リクエスト数",successCount:"{{count}} 件成功",successRate:"成功率",totalTokens:"総トークン数",estimatedCost:"推定約 ${{cost}}",modelsUsed:"使用モデル",modelUsageDistribution:"モデル別利用分布",requestCount:"{{count}} リクエスト"},cliproxyTable:{name:"名前",provider:"プロバイダー",model:"モデル",account:"アカウント",status:"ステータス",default:"デフォルト",actions:"操作"},cliproxyTabs:{overview:"概要",variants:"バリアント",aiProviders:"AI プロバイダー",controlPanel:"コントロールパネル"},codeEditor:{revealSensitive:"機密値を表示",maskSensitive:"機密値を隠す",valid:"有効な {{language}}",readOnly:"(読み取り専用)"},codex:{controlCenter:"コントロールセンター",overview:"概要",docs:"ドキュメント",nativeCodexRuntime:"ネイティブ Codex ランタイム",ccsCodexProvider:"CCS Codex プロバイダー / ブリッジ",codexDocs:"Codex ドキュメント",supportedFlows:"対応フロー",twoSupportedPaths:"2つのサポートパス:",nativeLabel:"ネイティブ:",nativeDesc:"Codex は CCS v1 でファーストクラスのランタイム専用ターゲットです。",ccsBridge:"CCS Bridge",apiProfilesDefault:"API プロファイルのデフォルトは引き続き Claude または Droid です。",recommendedSetupFlow:"推奨セットアップフロー",fastestPath:"最速パス",officialChannels:"公式チャンネル",codexCli:"Codex CLI",openNativeCodex:"ネイティブ Codex を開く",runBuiltInCodex:"内蔵 Codex で Codex を実行",runBuiltInCodexExplicit:"内蔵 Codex で Codex を実行(明示)",openCodexDashboard:"Codex ダッシュボードを開く",status:"ステータス",profiles:"プロファイル",createNewProfile:"新しいプロファイルを作成",createNewProvider:"新しいプロバイダーを作成",createNewMcpServer:"新しい MCP サーバーを作成",defaultProvider:"デフォルトプロバイダー",useDefault:"デフォルトを使用",useGlobalProvider:"グローバルプロバイダーを使用",useProviderDefault:"プロバイダーのデフォルトを使用",quickFillWarning:"クイック入力のみです。保存前に確認してください。",thisFileUpstreamOwned:"このファイルは Codex CLI の上流管理対象です。",notes:"メモ",approvalPolicy:"承認ポリシー",sandboxMode:"サンドボックスモード",reasoningEffort:"推論強度",useGlobalEffort:"グローバル設定を使用",reasoningEffortCapitalized:"推論強度",thinkingBudgetTokens:"思考予算トークン",modelContextWindow:"モデルコンテキストウィンドウ",autoCompactTokenLimit:"自動圧縮トークン上限",toolOutputTokenLimit:"ツール出力トークン上限",webSearch:"Web 検索",personality:"パーソナリティ",model:"モデル",rawOnly:"Raw のみ",trusted:"信頼済み",untrusted:"未信頼",noProjectTrustEntries:"明示的なプロジェクト信頼エントリはありません。",codexNativeRecipe:"ネイティブ Codex レシピを保存しました",gptContextCap:"GPT-5.4 コンテキスト上限",usageLimitCost:"272K 超過時の利用制限コスト",longContextOverride:"長文コンテキストオーバーライド",counts2x:"2倍カウント",normalUsageWindow:"通常利用ウィンドウ",useCodexDefault:"Codex のデフォルトを使用",stdio:"stdio",streamableHttp:"streamable-http",responses:"responses",defaultTargetCli:"デフォルトターゲット CLI",executionChain:"実行チェーン",targetPath:"現在のターゲットパス",userConfig:"ユーザー設定",configYaml:"config.yaml",flow:"フロー",docsTab:"ドキュメント"},codexPage:{title:"Codex",controlCenter:"コントロールセンター",overview:"概要",docs:"ドキュメント",nativeRuntime:"ネイティブランタイム",ccsProvider:"CCS プロバイダー",setup:"セットアップ"},commandBuilder:{title:"コマンドビルダー",searchPlaceholder:"コマンドを入力または選択...",copy:"コピー",run:"実行",cmdConfig:"設定画面を開く",cmdCreateProfile:"新しいプロファイルを作成",cmdSwitchProfile:"プロファイルを切り替え",cmdDoctor:"システムヘルスチェック",cmdListProviders:"利用可能な CLIProxy プロバイダーを一覧表示",cmdAddProvider:"CLIProxy プロバイダーを追加"},confirmDialog:{confirm:"確認",cancel:"キャンセル"},connectionIndicator:{connected:"接続済み",connecting:"接続中...",disconnected:"切断",reconnecting:"再接続中..."},copilotConfigForm:{copilotConfiguration:"Copilot 設定",deprecatedModels:"非推奨の Copilot モデルが検出されました",failedLoadStatus:"ステータスの読み込みに失敗しました",useWithClaudeCode:"GitHub Copilot サブスクリプションを Claude Code で利用する",githubCopilotControls:"GitHub Copilot はプロンプト/コンテキストの制限を上流で管理しています。",provider:"プロバイダー",filePath:"ファイルパス",status:"ステータス",enabled:"有効",disabled:"無効",loadingEditor:"エディターを読み込み中...",modelMapping:"モデルマッピング",quickUsage:"クイック実行",noPremiumUsage:"プレミアム利用回数なし"},copilotPresets:{gpt5Codex:"GPT-5.3 Codex",claude46:"Claude 4.6",gemini3:"Gemini 3"},dateRangeFilter:{pickADate:"日付を選択"},deviceCodeDialog:{authorize:"{{provider}} を認証",enterCodeAtPage:"認証ページで下のコードを入力してください。",expiresIn:"({{time}} 後に期限切れ)",codeExpired:"(コードの有効期限が切れました)",copied:"コピーしました!",copyCode:"コードをコピー",waitingForAuth:"認証を待機中...",openVerificationPage:"認証ページを開く",openProviderPage:"{{provider}} を開く",copyCodeAria:"確認コードをコピー",codeCopiedAria:"コードをコピーしました"},docsLink:{title:"ドキュメントを表示"},droidSettings:{quickControls:"クイックコントロール",reasoningControls:"推論コントロール",thinkingBudget:"思考予算",anthropicOnly:"Anthropic モデルのみ",byokCustomModels:"BYOK カスタムモデル"},extendedContext:{extendedContext:"拡張コンテキスト"},githubLink:{title:"GitHub で問題を報告"},globalEnvIndicator:{injectedCount_one:"{{count}} 件のグローバル環境変数が実行時に注入されます",injectedCount_other:"{{count}} 件のグローバル環境変数が実行時に注入されます",overriddenCount:"({{count}} 件はプロファイルで上書き)",skippedLabel:"スキップ(プロファイルで既に定義済み):",configureInSettings:"設定で構成"},healthCard:{allSystemsNominal:"すべてのシステムが正常です",machineChecks:"マシンチェック"},healthPageV2:{title:"ヘルス",subtitle:"システムヘルスの監視。"},heroSection:{title:"CCS Config",subtitle:"Claude Code Switch Dashboard"},homePageV2:{title:"ホーム",logsMoved:"ログは専用ワークスペースに移動しました",profiles:"プロファイル",cliproxy:"CLIProxy",accounts:"アカウント",health:"ヘルス"},hubFooter:{logs:"ログ",settings:"設定",github:"GitHub",copyright:"© {{year}} kaitranntt"},imageAnalysisStatus:{sectionTitle:"画像",openSettings:"設定を開く",useNativeImageReading:"ネイティブ画像読み取りを使用",refreshingPreview:"プレビューを更新中",savedStatus:"保存済みステータス",livePreview:"ライブプレビュー",disabledGlobally:"グローバルで無効",targetBypassesHook:"{{target}} はフックをバイパスします",nativeImageReading:"ネイティブ画像読み取り",setupNeeded:"セットアップが必要",needsAuth:"認証が必要",needsProxy:"プロキシが必要",nativeFallback:"ネイティブフォールバック",transformerReady:"トランスフォーマー準備完了",badgeDisabled:"無効",badgeBypassed:"バイパス中",badgeNative:"ネイティブ",badgeSetup:"セットアップ",badgeAuth:"認証",badgeProxy:"プロキシ",badgeReady:"準備完了",capabilityVerified:"検証済み",capabilityUnknown:"不明",toggleSummaryNativeCapable:"{{model}} は画像対応のようです。CCS はここではトランスフォーマーをバイパスします。",toggleSummaryNativeModel:"CCS は {{model}} でネイティブ読み取りを優先します。",toggleSummaryNativeDefault:"CCS はこのプロファイルでネイティブ画像読み取りを優先します。",toggleSummaryNativeFileAccess:"このプロファイルは現在ネイティブファイルアクセスのままです。",toggleSummaryInactiveTarget:"{{target}} が選択されている間は、保存済みの Claude 側画像ルーティングは無効です。",toggleSummaryTransformerRoute:"トランスフォーマールート: {{backend}}{{modelSuffix}}。",noteDisabledGlobally:"画像は CCS 設定でグローバルに無効になっています。",noteTargetBypassesHook:"現在のターゲット {{target}} は Claude Read フックをバイパスします。",notePersistHook:"トランスフォーマールーティングをここで有効にする前に、プロファイルフックを保存してください。",targetLabel:{claude:"Claude Code",droid:"Factory Droid",codex:"Codex CLI"}},localhostDisclaimer:{remoteReadonlyAuthDisabledLong:"ホストでダッシュボード認証が無効になっているため、リモートダッシュボードは読み取り専用です。リモートでの変更を有効にするには、ホスト側でダッシュボード認証を再度有効にしてください。",remoteReadonlyAuthDisabledShort:"ホストでダッシュボード認証が再有効化されるまで、リモートダッシュボードは読み取り専用です。",remoteReadonlySetupLong:"ホストで ccs config auth setup を実行するまで、リモートダッシュボードは読み取り専用です。",remoteReadonlySetupShort:"ホストの認証が設定されるまで、リモートダッシュボードは読み取り専用です。",localLong:"このダッシュボードはローカルで動作しています。データはすべてお使いのマシンに残ります。",localShort:"ローカルダッシュボード - データはお使いのデバイスに保存されます。",dismiss:"免責事項を閉じる"},loginPage:{showPassword:"パスワードを表示",hidePassword:"パスワードを隠す"},logsConfig:{level:"レベル",message:"メッセージ",source:"ソース",time:"時刻",proc:"プロセス",open:"開く",run:"実行",refreshEntries:"エントリを更新"},logsDetailPanel:{details:"詳細"},logsFilters:{filters:"フィルター"},logsOverviewCards:{overview:"概要"},logsPageSkeleton:{loadingLogs:"ログを読み込み中..."},logsPageV2:{title:"ログ",subtitle:"システムログの表示と管理。"},modelConfigSection:{defaultModel:"デフォルトモデル"},monitoringErrorLogs:{logContent:"ログ内容"},openrouterBadge:{new:"NEW",integration:"OpenRouter 連携"},openrouterBanner:{accessModels:"OpenRouter で {{count}}+ のモデルにアクセス",add:"追加"},openrouterModelPicker:{searchModels:"モデルを検索",newestModels:"最新モデル"},openrouterPromoCard:{title:"OpenRouter",description:"1つの API エンドポイントで数百のモデルにアクセス。"},privacyToggle:{modeOn:"プライバシーモード ON - クリックしてデータを表示",modeOff:"プライバシーモード OFF - クリックしてデータを隠す"},profileCard:{profile:"プロファイル",openRouter:"OpenRouter プロファイル",claudeCode:"Claude Code",claudeCodeDefault:"Claude Code(デフォルト)",factoryDroid:"Factory Droid",codexCli:"Codex CLI",ccsProfile:"CCS プロファイル"},profileCreateDialog:{createProfile:"プロファイルを作成",appliedModelToTiers:"すべてのモデルティアに「{{model}}」を適用しました",profileCreated:"プロファイル「{{name}}」を作成しました",failedCreate:"プロファイルの作成に失敗しました",chooseProviderHint:"プロバイダーのプリセットを選ぶか、カスタム API エンドポイントを設定してください。",basicInformation:"基本情報",modelConfiguration:"モデル設定",usedInCli:"CLI での使用:",apiBaseUrl:"API ベース URL",baseUrlPlaceholder:"https://api.example.com/v1",prefilledFromPreset:"{{name}} から自動入力されています。必要に応じて変更できます。",optionalForPreset:"{{name}} では任意です。空欄の場合はネイティブの Anthropic 認証を使用します。",endpointHint:"OpenAI 互換および Anthropic リクエストを受け付けるエンドポイント",optional:"(任意)",apiKeyOptionalPlaceholder:"任意 - 認証が有効な場合のみ",apiKeyPlaceholder:"sk-...",apiKeyOptionalHint:"ローカルエンドポイントで認証が有効な場合のみ必要です",defaultTargetCli:"デフォルトターゲット CLI",modelMapping:"モデルマッピング",modelMappingDesc:"Claude Code のティア(Opus/Sonnet/Haiku)をプロバイダー対応モデルにマッピングします。",searchModelsPlaceholder:"検索(例: opus, sonnet, gpt-4o)...",noModelsFound:"「{{query}}」に一致するモデルが見つかりません",loadingModels:"モデルを読み込み中...",defaultModel:"デフォルトモデル",sonnetMapping:"Sonnet マッピング",opusMapping:"Opus マッピング",haikuMapping:"Haiku マッピング",sonnetMappingPlaceholder:"例: gpt-4o, claude-sonnet-4",opusMappingPlaceholder:"例: o1, claude-opus-4.5",haikuMappingPlaceholder:"例: gpt-4o-mini, claude-3.5-haiku",free:"無料"},profileDeck:{profiles:"プロファイル",failedToLoad:"プロファイルの読み込みに失敗しました: {{message}}",noProfiles:"プロファイルが設定されていません。最初のプロファイルを作成して始めましょう。"},profileDialogLegacy:{editProfile:"プロファイルを編集"},profileEditorSections:{imageAnalysis:"画像分析",loadingImageSettings:"画像設定を読み込み中...",skipPermissionPrompts:"起動時に権限プロンプトをスキップ",useNativeImageReading:"ネイティブ画像読み取りを使用",skipTransformer:"トランスフォーマーをスキップ",friendlyUi:"フレンドリー UI",info:"情報"},profilesTable:{name:"名前",provider:"プロバイダー",model:"モデル",target:"ターゲット",lastModified:"最終更新",actions:"操作",edit:"編集"},projectSelectionDialog:{title:"Google Cloud プロジェクトを選択",description:"{{provider}} の認証に使用するプロジェクトを選択してください。",autoSelectCountdown:"({{count}}秒後にデフォルトを自動選択)",default:"デフォルト",allProjects:"全プロジェクト",allProjectsDescription:"リスト内の {{count}} プロジェクトをすべてオンボード",useDefault:"デフォルトを使用",selecting:"選択中...",confirmSelection:"選択を確認",codeCopied:"コードをコピーしました",copyVerificationCode:"確認コードをコピー"},providerCard:{missingProjectIdAria:"プロジェクト ID がありません"},providerEditor:{provider:"プロバイダー",filePath:"ファイルパス",lastModified:"最終更新",defaultTarget:"デフォルトターゲット",quickUsage:"クイック実行",modelMapping:"モデルマッピング",status:"ステータス",loadingSettings:"設定を読み込み中...",loadingEditor:"エディターを読み込み中...",noAccountsConnected:"接続されたアカウントなし",addAccountToStart:"アカウントを追加して開始",gcpProjectIdReadonly:"GCP プロジェクト ID(読み取り専用)",projectIdNA:"プロジェクト ID: N/A",missingProjectId:"プロジェクト ID がありません",missingProjectIdHint:"エラーの原因になる可能性があります。アカウントを削除して再追加し、プロジェクト ID を取得してください。",useIncognito:"シークレットモードを使用",aliases:"エイリアス",current:"現在",currentValue:"現在の値",composite:"複合",defaultLabel:"デフォルト",requiredSetup:"必要なセットアップ",connectorName:"コネクタ名",proxyUrl:"プロキシ URL",proxyUrlSet:"プロキシ URL 設定済み",excludedModels:"除外モデル",headers:"ヘッダー",secret:"シークレット",prefix:"プレフィックス",modelMappings:"モデルマッピング",baseUri:"ベース URL",apiKeys:"API Keys",presets:"事前設定済みのモデルマッピングを適用",createVariant:"CLIProxy バリアントを作成",agyDenylist:"Antigravity ブロックリスト: Claude Opus 4.5 と Claude Sonnet 4.5 は非推奨です。"},providerEditorAccountItem:{modelsUsed:"使用モデル"},providerEditorHeader:{connectorName:"コネクタ名"},quickCommands:{title:"クイックコマンド",startDefault:"デフォルトで起動",startDefaultDesc:"デフォルトプロファイルで Claude を起動",glmProfile:"GLM プロファイル",glmProfileDesc:"GLM モデルに切り替え",healthCheck:"ヘルスチェック",healthCheckDesc:"システム診断を実行",delegateTask:"タスクを委譲",delegateTaskDesc:"GLM プロファイルに委譲"},quotaTooltip:{loadingQuota:"クォータを読み込み中...",failedLoadQuota:"クォータの読み込みに失敗しました",modelQuotas:"モデルクォータ:",rateLimits:"レート制限:",plan:"プラン: {{plan}}",quotaSnapshots:"クォータスナップショット:",unlimited:"無制限",remaining:"残り {{remaining}}/{{entitlement}}",tier:"ティア",tierId:"ティア ID",state:"状態",credits:"クレジット",modelQuotasLower:"モデルクォータ:",allBucketsReport:"全バケットが {{tokenType}} を報告",requestsRemaining:"残り {{count}} リクエスト",inputTokensRemaining:"残り {{count}} 入力トークン",outputTokensRemaining:"残り {{count}} 出力トークン",amountRemaining:"残り {{count}}",fiveHourLimit:"5時間利用制限",weeklyLimit:"週間利用制限",weeklyOpus:"週間利用(Opus)",weeklySonnet:"週間利用(Sonnet)",weeklyOAuthApps:"週間利用(OAuth アプリ)",weeklyCowork:"週間利用(Cowork)",extraUsage:"追加利用",premiumInteractions:"プレミアムインタラクション",chat:"チャット",completions:"補完",resets:"{{time}} にリセット",fiveHourResets:"5時間リセット {{time}}",weeklyResets:"週間リセット {{time}}"},rawEditorSection:{rawConfig:"Raw 設定"},rawJsonSettingsEditor:{title:"Raw 設定エディター"},routingGuidance:{roundRobin:"ラウンドロビンで利用を分散します。",fillFirst:"Fill first は、バックアップアカウントが必要になるまで待機させます。",routingStrategy:"ルーティング戦略",optionalRouting:"オプションのルーティング"},settingsDialog:{editProfile:"プロファイルを編集: {{name}}",description:"このプロファイルの環境変数と設定を構成します。",loadingSettings:"設定を読み込み中...",envTab:"環境変数",rawJsonTab:"Raw JSON",generalTab:"全般",noEnvVars:"環境変数は設定されていません。",noEnvVarsHint:"settings.json ファイルで変数を追加してください。",loadingEditor:"エディターを読み込み中...",profileInfo:"プロファイル情報",profileInfoDesc:"この設定ファイルの詳細情報。",path:"パス",lastModified:"最終更新",cancel:"キャンセル",saving:"保存中...",saveChanges:"変更を保存",conflictTitle:"ファイルが外部で変更されました",conflictDesc:"この設定ファイルは別のプロセスで変更されました。変更で上書きしますか?それとも破棄しますか?",overwrite:"上書き"},settingsPage:{title:"設定",loading:"読み込み中...",failedLoad:"設定の読み込みに失敗しました。",tabs:{web:"Web",env:"環境変数",think:"思考",proxy:"プロキシ",auth:"認証",backup:"バックアップ",channels:"チャンネル",imageAnalysis:"画像"},websearchSection:{title:"Web 検索",description:"CLI ベースの Web 検索設定。"},thinkingSection:{title:"思考",description:"対応モデルの高度な思考 / 推論設定。",directOverride:"直接上書き",youType:"入力:",ccsAdds:"CCS が追加:",executionChain:"実行チェーン",primaryBackends:"プライマリバックエンド",legacyCliFallbacks:"レガシー CLI フォールバック",managedPayload:"管理対象ペイロード",sharedTargetMetadata:"共有ターゲットメタデータ",ideTargetMetadata:"IDE ターゲットメタデータ",ideSettingsPath:"IDE 設定パス",ideHost:"IDE ホスト",resolvedBinding:"解決済みバインディング",bindingName:"バインディング名",inSync:"同期済み",currentTargetPath:"現在のターゲットパス",warnings:"警告",notes:"メモ",workspacePresets:"ワークスペースプリセット",draft:"下書き",advanced:"詳細設定",recommended:"推奨セットアップフロー",configureModelFirst:"先にモデルを設定してください"},proxySection:{title:"プロキシ",loadingImageSettings:"画像設定を読み込み中..."},channelsSection:{title:"公式チャンネル",description:"公式リリースチャンネルを表示・管理。"},imageAnalysisSection:{title:"画像分析",description:"画像分析の設定。",loading:"画像設定を読み込み中..."}},setupWizard:{title:"クイックセットアップウィザード",stepProviderDesc:"プロバイダーを選択して開始",stepAuthDesc:"プロバイダーで認証",stepAccountDesc:"使用するアカウントを選択",stepVariantDesc:"カスタムバリアントを作成",stepSuccessDesc:"セットアップ完了!",authStep:{authenticateWith:"{{provider}} で認証してアカウントを追加",authenticating:"認証中...",authenticateInBrowser:"ブラウザーで認証",completeOAuth:"ブラウザーで OAuth フローを完了してください...",orUseTerminal:"またはターミナルを使用",runCommandHint:"ターミナルで次のコマンドを実行:",back:"戻る",checking:"確認中...",refreshStatus:"ステータスを更新"},accountStep:{selectAccount:"アカウントを選択({{count}})",defaultAccount:"デフォルトアカウント",or:"または",addNewAccount:"新しいアカウントを追加",addNewAccountDesc:"別のアカウントで認証",back:"戻る"},variantStep:{back:"戻る",skip:"スキップ"},successStep:{title:"バリアントを作成しました!",subtitle:"カスタムバリアントが使用可能です",usage:"使用方法:",done:"完了"}},sharedPageV2:{title:"共有",subtitle:"共有データ管理。"},sponsorButton:{title:"GitHub でこのプロジェクトをスポンサー",sponsor:"スポンサー"},supportEntryCard:{actionRequired:"対応が必要"},themeToggle:{srLabel:"テーマを切り替え"},toasts:{profileCreated:"プロファイルを作成しました",profileUpdated:"プロファイルを更新しました",profileDeleted:"プロファイルを削除しました",orphanProfilesComplete:"孤立プロファイルの登録が完了しました",profileCopied:"プロファイルをコピーしました",profileImported:"プロファイルをインポートしました",authRequired:"{{provider}} の認証が必要です",authSuccess:"{{provider}} の認証に成功しました!",authFailed:"{{provider}} の認証に失敗しました",deviceCodeExpired:"デバイスコードの有効期限が切れました。もう一度お試しください。",codeCopied:"コードをクリップボードにコピーしました",failedCopy:"コードのコピーに失敗しました",configSaved:"設定を保存しました",configSaveFailed:"保存に失敗しました: {{error}}",invalidYaml:"無効な YAML は保存できません",configUpdatedExternally:"設定が外部で更新されました",settingsFileUpdated:"設定ファイルが更新されました",accountsUpdated:"アカウントを更新しました",noProfilesToSync:"同期するプロファイルがありません",syncFailed:"同期に失敗しました: {{error}}",providerAuthSuccess:"{{provider}} の認証に成功しました",providerDeviceCodeInCallback:"コールバックモードでプロバイダーがデバイスコードフローを返しました",loggingConfigSaved:"ログ設定を保存しました。",loggingConfigSaveFailed:"ログ設定の保存に失敗しました。",unifiedConfigUpdated:"設定を更新しました",migrationPreviewComplete:"移行プレビューが完了しました",migrationComplete:"移行が完了しました",migrationFailed:"移行に失敗しました",rollbackComplete:"ロールバックが完了しました",rollbackFailed:"ロールバックに失敗しました",defaultAccountSet:"デフォルトアカウントを「{{name}}」に設定しました",defaultAccountReset:"デフォルトアカウントを CCS に戻しました",accountDeleted:"アカウント「{{name}}」を削除しました",contextUpdated:"「{{name}}」のコンテキストを {{summary}} に更新しました",legacyConfirmError:"アカウント「{{name}}」は明示的な確認が必要です。このアカウントの「履歴同期を編集」を使用してください。",legacyConfirmFailed:"レガシーアカウント「{{name}}」の確認に失敗しました: {{error}}",legacyConfirmSuccess_one:"{{count}} 件のレガシーアカウントを確認しました",legacyConfirmSuccess_other:"{{count}} 件のレガシーアカウントを確認しました",noLegacyAccounts:"確認が必要なレガシーアカウントはありません",routingStrategySet:"ルーティング戦略を {{strategy}} に設定しました",variantCreated:"バリアントを作成しました",variantUpdated:"バリアントを更新しました",variantDeleted:"バリアントを削除しました",defaultAccountUpdated:"デフォルトアカウントを更新しました",accountRemoved:"アカウントを削除しました",accountPaused:"アカウントを一時停止しました",accountResumed:"アカウントを再開しました",accountAdded:"{{provider}} のアカウントを追加しました",kiroImported:"Kiro アカウントをインポートしました: {{name}}",kiroTokenImported:"Kiro トークンをインポートしました",modelUpdated:"モデルを更新しました",presetSaved:"プリセット「{{name}}」を保存しました",presetDeleted:"プリセットを削除しました",cliproxyAlreadyRunning:"CLIProxy はすでに稼働していました",cliproxyStarted:"CLIProxy を起動しました",cliproxyStartFailed:"CLIProxy の起動に失敗しました",cliproxyStopped:"CLIProxy を停止しました",cliproxyStopFailed:"CLIProxy の停止に失敗しました",presetApplied:"プリセット「{{name}}」を適用しました",presetAppliedCustom:"カスタムプリセットを適用しました",settingsSavedWithAdjustments:"設定を保存しました(モデル調整あり)",settingsSaved:"設定を保存しました",failedSaveSettings:"設定の保存に失敗しました",codexRefreshFailed:"Codex スナップショットの更新に失敗しました。Raw 編集は保持されました。",codexRefreshError:"Codex スナップショットの更新に失敗しました。",codexFixToml:"保存する前に TOML を修正してください。",codexSaved:"Codex config.toml を保存しました。",codexChangedExternally:"config.toml が外部で変更されました。更新して再試行してください。",codexSaveFailed:"Codex config.toml の保存に失敗しました。",codexUpdateFailed:"Codex 設定の更新に失敗しました。",noOrphanProfiles:"孤立プロファイル設定は見つかりませんでした",profilesRegistered:"{{count}} 件のプロファイルを登録しました{{skipped}}",destinationEmpty:"送信先プロファイル名は空にできません",profileExportDownloaded:"プロファイルエクスポートをダウンロードしました",profileImportFailed:"プロファイルバンドルのインポートに失敗しました"},updatesSpotlight:{openUpdatesCenter:"更新センターを開く"},userMenu:{signedInAs:"{{username}} としてサインイン中"},valueMetrics:{apiCostSaved:"API コスト削減",tokensSaved:"節約トークン",queriesFaster:"高速化されたクエリ",errorsReduced:"削減されたエラー",vsLastMonth:"前月比",throughCaching:"キャッシュによる",averageSpeedup:"平均高速化",withRetryLogic:"リトライロジックによる",performanceMetrics:"パフォーマンス指標",monthlySummary:"月間サマリー",totalSaved:"合計節約額",tokensProcessed:"処理トークン数",queriesHandled:"処理クエリ数",uptime:"稼働時間"}}}};me.isInitialized||me.use(Rk).init({resources:Vk,lng:Kk(),fallbackLng:"en",interpolation:{escapeValue:!1}});const Yk={theme:"system",setTheme:()=>null,isDark:!1},ax=S.createContext(Yk);function Wk({children:n,defaultTheme:a="system",storageKey:o="vite-ui-theme"}){const[r,c]=S.useState(()=>localStorage.getItem(o)||a),[d,h]=S.useState(()=>typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1);S.useEffect(()=>{const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>{h(b.matches)};return g.addEventListener("change",v),()=>g.removeEventListener("change",v)},[]);const p=r==="dark"||r==="system"&&d;S.useEffect(()=>{const g=window.document.documentElement;g.classList.remove("light","dark"),g.classList.add(p?"dark":"light")},[p]);const m={theme:r,setTheme:g=>{localStorage.setItem(o,g),c(g)},isDark:p};return l.jsx(ax.Provider,{value:m,children:n})}const ix=S.createContext(null),gy="ccs-privacy-mode";function Qk({children:n}){const[a,o]=S.useState(()=>typeof window<"u"?localStorage.getItem(gy)==="true":!1);S.useEffect(()=>{localStorage.setItem(gy,String(a))},[a]);const r=S.useCallback(()=>o(d=>!d),[]),c=S.useMemo(()=>({privacyMode:a,togglePrivacyMode:r}),[a,r]);return l.jsx(ix.Provider,{value:c,children:n})}function oh(){const n=S.useContext(ix);if(!n)throw new Error("usePrivacy must be used within a PrivacyProvider");return n}const ox="blur-[4px] select-none hover:blur-none transition-all duration-200",$k="/api/auth";async function rh(n,a){const o=await fetch(`${$k}${n}`,{headers:{"Content-Type":"application/json"},credentials:"include",...a});if(!o.ok){const r=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||o.statusText)}return o.json()}function Xk(){return rh("/check")}function Zk(n,a){return rh("/login",{method:"POST",body:JSON.stringify({username:n,password:a})})}function Jk(){return rh("/logout",{method:"POST"})}const rx=S.createContext(null);function eA({children:n}){const[a,o]=S.useState(!1),[r,c]=S.useState(!1),[d,h]=S.useState(null),[p,m]=S.useState(!0),[g,v]=S.useState(!1),[b,C]=S.useState(!1),[T,k]=S.useState(!1),[M,L]=S.useState("login");S.useEffect(()=>{Xk().then(A=>{o(A.authRequired),c(A.authenticated),h(A.username),v(A.authEnabled),C(A.authConfigured),k(A.isLocalAccess),L(A.accessMode)}).catch(()=>{o(!0),c(!1),v(!0),C(!0),k(!1),L("login")}).finally(()=>m(!1))},[]);const E=S.useCallback(async(A,P)=>{const w=await Zk(A,P);c(!0),h(w.username)},[]),N=S.useCallback(async()=>{await Jk(),c(!1),h(null)},[]),D=S.useMemo(()=>({authRequired:a,isAuthenticated:r,username:d,loading:p,authEnabled:g,authConfigured:b,isLocalAccess:T,accessMode:M,login:E,logout:N}),[a,r,d,p,g,b,T,M,E,N]);return l.jsx(rx.Provider,{value:D,children:n})}function Ul(){const n=S.useContext(rx);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n}function tA(){const{authRequired:n,isAuthenticated:a,loading:o}=Ul(),r=jl();return o?l.jsx("div",{className:"flex h-screen items-center justify-center",children:l.jsx(An,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):n?a?l.jsx(Ed,{}):l.jsx(xS,{to:"/login",state:{from:r},replace:!0}):l.jsx(Ed,{})}const gd=768;function nA(){const[n,a]=S.useState(void 0);return S.useEffect(()=>{const o=window.matchMedia(`(max-width: ${gd-1}px)`),r=()=>{a(window.innerWidth<gd)};return o.addEventListener("change",r),a(window.innerWidth<gd),()=>o.removeEventListener("change",r)},[]),!!n}const sx=S.createContext(null);function zl(){const n=S.useContext(sx);if(!n)throw new Error("useSidebar must be used within a SidebarProvider.");return n}function F(...n){return sw(lw(n))}function sh(n){if(!Number.isFinite(n))return"0";const a=Math.max(0,Math.min(100,n));return`${Math.round(a)}`}const yy=["#f94144","#f3722c","#f8961e","#f9844a","#f9c74f","#90be6d","#43aa8b","#4d908e","#577590","#277da1"],Zt={success:"#15803d",degraded:"#b45309",failed:"#b91c1c"};function xE(n){let a=2166136261;for(let o=0;o<n.length;o++)a^=n.charCodeAt(o),a=Math.imul(a,16777619);return yy[(a>>>0)%yy.length]}function Ud(n){if(!n)return null;try{const a=new Date(n),o=new Date,r=a.getTime()-o.getTime();if(r<=0)return"soon";const c=Math.floor(r/(1e3*60*60));if(c>=24)return a.toLocaleDateString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});const d=Math.floor(r%(1e3*60*60)/(1e3*60));return c>0?`in ${c}h ${d}m`:`in ${d}m`}catch{return null}}function lh(n){return n.filter(a=>{const o=(a.displayName||a.name||"").toLowerCase();return o.includes("claude")||o.includes("gpt")})}function aA(n){if(n.length===0)return null;const a=lh(n);if(a.length===0)return 0;const o=a.map(r=>r.percentage).filter(r=>typeof r=="number"&&isFinite(r));return o.length===0?0:Math.min(...o)}function iA(n){if(n.length===0)return null;const a=lh(n);return a.length===0?null:a.reduce((o,r)=>r.resetTime?o?new Date(r.resetTime)<new Date(o)?r.resetTime:o:r.resetTime:o,null)}const oA=/claude-(?:opus|sonnet)-4(?:[.-])5(?:-thinking)?(?=(?:$|[^a-z0-9]))/i;function vE(n){return oA.test((n||"").trim())}const rA=[{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 sA(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 lA(n){if(n.length===0)return[];const a=lh(n),o=[];if(a.length===0)for(const c of rA)o.push({name:c.name,displayName:c.displayName,percentage:0,tier:"primary",exhausted:!0});for(const c of n){const d=c.displayName||c.name,h=sA(d);o.push({name:c.name,displayName:d,percentage:c.percentage,tier:h,exhausted:h==="primary"&&c.percentage===0})}const r=["primary","gemini-3","gemini-2","other"];return o.sort((c,d)=>{const h=r.indexOf(c.tier)-r.indexOf(d.tier);return h!==0?h:c.displayName.localeCompare(d.displayName)})}function cA(n){const a=new Map;for(const o of n){const r=a.get(o.tier)||[];r.push(o),a.set(o.tier,r)}return a}function Or(n){const a=(n||"").toLowerCase(),o=a.includes("code review")||a.includes("code_review"),r=a.includes("primary"),c=a.includes("secondary");return o?r?"code-review-5h":c?"code-review-weekly":"code-review":r?"usage-5h":c?"usage-weekly":"unknown"}function uA(n,a){if(Or(n.label)==="code-review-weekly")return"weekly";const r=n.resetAfterSeconds;if(typeof r!="number"||!isFinite(r)||r<=0)return null;const c=a.find(m=>Or(m.label)==="usage-5h"&&typeof m.resetAfterSeconds=="number"&&isFinite(m.resetAfterSeconds)&&m.resetAfterSeconds>0),d=a.find(m=>Or(m.label)==="usage-weekly"&&typeof m.resetAfterSeconds=="number"&&isFinite(m.resetAfterSeconds)&&m.resetAfterSeconds>0);if(!c||!d)return null;const h=Math.abs(r-c.resetAfterSeconds);return Math.abs(r-d.resetAfterSeconds)<=h?"weekly":"5h"}function dA(n,a=[]){const o=typeof n=="string"?n:n.label,r=typeof n=="string"?{label:o,resetAfterSeconds:null}:{label:o,resetAfterSeconds:n.resetAfterSeconds},c=a.length>0?a:[r];switch(Or(o)){case"usage-5h":return me.t("quotaTooltip.fiveHourLimit");case"usage-weekly":return me.t("quotaTooltip.weeklyLimit");case"code-review-5h":case"code-review-weekly":case"code-review":{const d=uA(r,c);return d==="5h"?me.t("utils.codeReview5h"):d==="weekly"?me.t("utils.codeReviewWeekly"):me.t("utils.codeReview")}case"unknown":return o}}function Hl(n){if(!n||n.length===0)return{fiveHourWindow:null,weeklyWindow:null,codeReviewWindows:[],unknownWindows:[]};let a=null,o=null;const r=[],c=[],d=[];for(const h of n)switch(Or(h.label)){case"usage-5h":a||(a=h),d.push(h);break;case"usage-weekly":o||(o=h),d.push(h);break;case"code-review-5h":case"code-review-weekly":case"code-review":r.push(h);break;case"unknown":c.push(h),d.push(h);break}if((!a||!o)&&d.length>0){const h=d.filter(p=>typeof p.resetAfterSeconds=="number"&&p.resetAfterSeconds>=0).sort((p,m)=>(p.resetAfterSeconds||0)-(m.resetAfterSeconds||0));a||(a=h[0]||d[0]||null),o||(o=h.length>1?h[h.length-1]:d.find(p=>p!==a)||null)}return{fiveHourWindow:a,weeklyWindow:o,codeReviewWindows:r,unknownWindows:c}}function hA(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:o}=Hl(n),r=[a,o].filter((h,p,m)=>!!h&&m.indexOf(h)===p),d=(r.length>0?r:n).map(h=>h.remainingPercent);return Math.min(...d)}function fA(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:o}=Hl(n),r=[a,o].filter((h,p,m)=>!!h&&m.indexOf(h)===p),d=(r.length>0?r:n).map(h=>h.resetAt).filter(h=>h!==null);return d.length===0?null:d.sort()[0]}function pA(n){if(!n.success)return null;const a=[n.coreUsage?.fiveHour,n.coreUsage?.weekly].filter(r=>!!r);if(a.length>0)return Math.min(...a.map(r=>r.remainingPercent));const o=n.windows.filter(r=>r.rateLimitType!=="overage");return o.length>0?Math.min(...o.map(r=>r.remainingPercent)):null}function mA(n){if(!n.success)return null;const a=[n.coreUsage?.fiveHour?.resetAt,n.coreUsage?.weekly?.resetAt].filter(r=>!!r);if(a.length>0)return a.sort()[0];const o=n.windows.filter(r=>r.rateLimitType!=="overage").map(r=>r.resetAt).filter(r=>r!==null);return o.length===0?null:o.sort()[0]}function gA(n){if(!n||n.length===0)return null;const a=n.map(o=>o.remainingPercent);return Math.min(...a)}function yA(n){if(!n||n.length===0)return null;const a=n.map(o=>o.resetTime).filter(o=>o!==null);return a.length===0?null:a.sort()[0]}function bA(n){if(!n)return null;const a=[n.premiumInteractions.percentRemaining,n.chat.percentRemaining,n.completions.percentRemaining].filter(o=>typeof o=="number"&&isFinite(o));return a.length===0?null:Math.min(...a)}function Kn(n){return typeof n=="object"&&n!==null}function Ti(n){return typeof n=="number"&&Number.isFinite(n)}function ch(n){if(!Kn(n))return!1;const a=n.models;return typeof n.success=="boolean"&&Array.isArray(a)}function Bl(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(o=>Kn(o)&&typeof o.label=="string"&&Ti(o.usedPercent)&&Ti(o.remainingPercent))}function Fl(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(o=>Kn(o)&&typeof o.rateLimitType=="string"&&Ti(o.remainingPercent)&&typeof o.status=="string")}function uh(n){if(!Kn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.buckets)?!1:a.buckets.every(o=>Kn(o)&&typeof o.id=="string"&&Ti(o.remainingFraction)&&Ti(o.remainingPercent)&&Array.isArray(o.modelIds))}function dh(n){if(!Kn(n))return!1;const a=n,o=a.snapshots;return typeof a.success!="boolean"||!Kn(o)?!1:["premiumInteractions","chat","completions"].every(c=>{const d=o[c];return Kn(d)&&Ti(d.percentRemaining)&&Ti(d.percentUsed)})}function xA(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 vA(n,a,o){const r=n.errorDetail?.trim()||null;if(!r)return null;const c=r.toLowerCase();return c===a.toLowerCase()||o&&c===o.toLowerCase()?null:r}function hh(n){if(!n||n.success)return null;const a=n.error?.trim()||"Quota information unavailable",o=n.actionHint?.trim()||null,r=n.errorCode?.trim().toLowerCase()||"",c=xA(n),d=vA(n,a,c),h=a.toLowerCase(),p="entitlement"in n?n.entitlement:void 0;return n.errorCode==="capacity_exhausted"||p?.capacityState==="capacity_exhausted"||h.includes("no capacity available")||h.includes("capacity exhausted")?{label:"Capacity",summary:a,actionHint:o||"Retry later or switch to another model. This is a temporary provider capacity issue.",technicalDetail:c,rawDetail:d,tone:"warning"}:n.needsReauth||r==="token_expired"||r==="reauth_required"||h.includes("token expired")||h.includes("re-authenticate")||h.includes("reauth")||h.includes("expired or invalid")?{label:me.t("accountCard.failureLabelReauth"),summary:a,actionHint:o||me.t("accountCard.failureHintReauth"),technicalDetail:c,rawDetail:d,tone:"warning"}:r==="deactivated_workspace"||n.httpStatus===402||h.includes("workspace deactivated")||h.includes("payment or workspace access required")?{label:me.t("accountCard.failureLabelWorkspace"),summary:a,actionHint:o||me.t("accountCard.failureHintWorkspace"),technicalDetail:c,rawDetail:d,tone:"warning"}:p?.accessState==="not_entitled"||n.isForbidden||n.httpStatus===403||r==="quota_api_forbidden"||h.includes("forbidden")?{label:me.t("accountCard.failureLabelNoAccess"),summary:a,actionHint:o||me.t("accountCard.failureHintNoAccess"),technicalDetail:c,rawDetail:d,tone:"muted"}:n.httpStatus===429||r==="rate_limited"||h.includes("rate limited")?{label:me.t("accountCard.failureLabelRetry"),summary:a,actionHint:o||me.t("accountCard.failureHintRetry"),technicalDetail:c,rawDetail:d,tone:"warning"}:r==="auth_file_missing"||r==="missing_account_id"||h.includes("auth file not found")||h.includes("missing chatgpt-account-id")?{label:me.t("accountCard.failureLabelReconnect"),summary:a,actionHint:o||me.t("accountCard.failureHintReconnect"),technicalDetail:c,rawDetail:d,tone:"muted"}:n.retryable||r==="network_timeout"||r==="network_error"||r==="provider_unavailable"||h.includes("timeout")||h.includes("network")||h.includes("fetch failed")||h.includes("service unavailable")?{label:me.t("accountCard.failureLabelTemporary"),summary:a,actionHint:o||me.t("accountCard.failureHintTemporary"),technicalDetail:c,rawDetail:d,tone:"warning"}:{label:me.t("accountCard.failureLabelUnavailable"),summary:a,actionHint:o,technicalDetail:c,rawDetail:d,tone:"muted"}}function lx(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return ch(a)?aA(a.models):null;case"codex":return Bl(a)?hA(a.windows):null;case"claude":case"anthropic":return Fl(a)?pA(a):null;case"gemini":return uh(a)?gA(a.buckets):null;case"ghcp":case"github-copilot":return dh(a)?bA(a.snapshots):null;default:return null}}function cx(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return ch(a)?iA(a.models):null;case"codex":return Bl(a)?fA(a.windows):null;case"claude":case"anthropic":return Fl(a)?mA(a):null;case"gemini":return uh(a)?yA(a.buckets):null;case"ghcp":case"github-copilot":return dh(a)?a.quotaResetDate:null;default:return null}}const yl=Il("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 rt({className:n,variant:a,size:o,asChild:r=!1,...c}){const d=r?Ml:"button";return l.jsx(d,{"data-slot":"button",className:F(yl({variant:a,size:o,className:n})),...c})}function Hn({className:n,type:a,...o}){return l.jsx("input",{type:a,"data-slot":"input",className:F("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),...o})}function CA({...n}){return l.jsx(fb,{"data-slot":"sheet",...n})}function SA({...n}){return l.jsx(bb,{"data-slot":"sheet-portal",...n})}function wA({className:n,...a}){return l.jsx(xb,{"data-slot":"sheet-overlay",className:F("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 kA({className:n,children:a,side:o="right",...r}){return l.jsxs(SA,{children:[l.jsx(wA,{}),l.jsxs(pb,{"data-slot":"sheet-content",className:F("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",o==="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",o==="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",o==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",o==="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),...r,children:[a,l.jsxs(mb,{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:[l.jsx(No,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function AA({className:n,...a}){return l.jsx("div",{"data-slot":"sheet-header",className:F("flex flex-col gap-1.5 p-4",n),...a})}function NA({className:n,...a}){return l.jsx(gb,{"data-slot":"sheet-title",className:F("text-foreground font-semibold",n),...a})}function DA({className:n,...a}){return l.jsx(yb,{"data-slot":"sheet-description",className:F("text-muted-foreground text-sm",n),...a})}function $e({className:n,...a}){return l.jsx("div",{"data-slot":"skeleton",className:F("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 Pi({delayDuration:n=0,...a}){return l.jsx(H0,{"data-slot":"tooltip-provider",delayDuration:n,...a})}function Sa({...n}){return l.jsx(Pi,{children:l.jsx(B0,{"data-slot":"tooltip",...n})})}function wa({...n}){return l.jsx(F0,{"data-slot":"tooltip-trigger",...n})}function ka({className:n,sideOffset:a=6,children:o,...r}){return l.jsx(q0,{children:l.jsxs(K0,{"data-slot":"tooltip-content",sideOffset:a,className:F("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 max-w-[calc(100vw-2rem)] origin-(--radix-tooltip-content-transform-origin) rounded-lg border border-border/70 bg-popover px-3 py-2 text-left text-xs leading-relaxed text-popover-foreground shadow-xl shadow-black/10",n),...r,children:[o,l.jsx(G0,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 fill-popover stroke-border stroke-[0.75px]"})]})})}const TA="sidebar_state",PA=3600*24*7,MA="16rem",jA="18rem",EA="3rem",LA="b";function RA({defaultOpen:n=!0,open:a,onOpenChange:o,className:r,style:c,children:d,...h}){const p=nA(),[m,g]=S.useState(!1),[v,b]=S.useState(n),C=a??v,T=S.useCallback(E=>{const N=typeof E=="function"?E(C):E;o?o(N):b(N),document.cookie=`${TA}=${N}; path=/; max-age=${PA}`},[o,C]),k=S.useCallback(()=>p?g(E=>!E):T(E=>!E),[p,T,g]);S.useEffect(()=>{const E=N=>{N.key===LA&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),k())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[k]);const M=C?"expanded":"collapsed",L=S.useMemo(()=>({state:M,open:C,setOpen:T,isMobile:p,openMobile:m,setOpenMobile:g,toggleSidebar:k}),[M,C,T,p,m,g,k]);return l.jsx(sx.Provider,{value:L,children:l.jsx(Pi,{delayDuration:0,children:l.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":MA,"--sidebar-width-icon":EA,...c},className:F("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh min-h-0 w-full overflow-hidden",r),...h,children:d})})})}function OA({side:n="left",variant:a="sidebar",collapsible:o="offcanvas",className:r,children:c,...d}){const{isMobile:h,state:p,openMobile:m,setOpenMobile:g}=zl();return o==="none"?l.jsx("div",{"data-slot":"sidebar",className:F("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...d,children:c}):h?l.jsx(CA,{open:m,onOpenChange:g,...d,children:l.jsxs(kA,{"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":jA},side:n,children:[l.jsxs(AA,{className:"sr-only",children:[l.jsx(NA,{children:"Sidebar"}),l.jsx(DA,{children:"Displays the mobile sidebar."})]}),l.jsx("div",{className:"flex h-full w-full flex-col",children:c})]})}):l.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":a,"data-side":n,"data-slot":"sidebar",children:[l.jsx("div",{"data-slot":"sidebar-gap",className:F("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)")}),l.jsx("div",{"data-slot":"sidebar-container",className:F("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",r),...d,children:l.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 IA({className:n,onClick:a,...o}){const{toggleSidebar:r}=zl();return l.jsxs(rt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:F("size-7",n),onClick:c=>{a?.(c),r()},...o,children:[l.jsx(TS,{}),l.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function _A({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:F("flex flex-col gap-2 p-2",n),...a})}function UA({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:F("flex flex-col gap-2 p-2",n),...a})}function zA({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:F("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),...a})}function HA({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:F("relative flex w-full min-w-0 flex-col p-2",n),...a})}function BA({className:n,asChild:a=!1,...o}){const r=a?Ml:"div";return l.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:F("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),...o})}function FA({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:F("w-full text-sm",n),...a})}function qA({className:n,...a}){return l.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:F("flex w-full min-w-0 flex-col gap-1 group-data-[collapsible=icon]:items-center",n),...a})}function KA({className:n,...a}){return l.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:F("group/menu-item relative",n),...a})}const GA=Il("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 by({asChild:n=!1,isActive:a=!1,variant:o="default",size:r="default",tooltip:c,className:d,...h}){const p=n?Ml:"button",{isMobile:m,state:g}=zl(),v=l.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:F(GA({variant:o,size:r}),d),...h});return c?(typeof c=="string"&&(c={children:c}),l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:v}),l.jsx(ka,{side:"right",align:"center",hidden:g!=="collapsed"||m,...c})]})):v}function VA({className:n,...a}){return l.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:F("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 YA({className:n,...a}){return l.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:F("group/menu-sub-item relative",n),...a})}function WA({asChild:n=!1,size:a="md",isActive:o=!1,className:r,...c}){const d=n?Ml:"a";return l.jsx(d,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":o,className:F("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",r),...c})}const QA={sm:24,md:32,lg:48};function ux({size:n="md",className:a,showText:o=!0}){const{t:r}=fe(),c=QA[n];return l.jsxs("div",{className:F("flex items-center gap-2",a),children:[l.jsx("img",{src:"/logo/ccs-logo-256.png",alt:r("ccsLogo.alt"),width:c,height:c,className:"rounded"}),o&&l.jsx("span",{className:"font-bold text-lg",children:r("ccsLogo.text")})]})}const fl="/api",dx="CONFLICT";class CE extends Error{code=dx;constructor(a="Resource modified externally"){super(a),this.name="ApiConflictError"}}function SE(n){return n instanceof Error&&"code"in n&&n.code===dx}function Tr(n){return n?/^https?:\/\//i.test(n)||n===fl||n.startsWith(`${fl}/`)?n:`${fl}${n.startsWith("/")?n:`/${n}`}`:fl}async function $A(n){const a=`Request failed (${n.status}${n.statusText?` ${n.statusText}`:""})`,o=await n.text();if(!o)return a;try{const r=JSON.parse(o);return r.error?.trim()?r.error:r.message?.trim()?r.message:a}catch{return o.trim()||a}}async function re(n,a){const o=await fetch(Tr(n),{headers:{"Content-Type":"application/json"},...a});if(!o.ok)throw new Error(await $A(o));if(o.status===204)return;if((o.headers.get("content-type")?.toLowerCase()??"").includes("application/json"))return await o.json();const c=await o.text();if(c)try{return JSON.parse(c)}catch{return c}}const Fe={profiles:{list:()=>re("/profiles"),getLocalRuntimeReadiness:()=>re("/profiles/local-runtime-readiness"),create:n=>re("/profiles",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>re(`/profiles/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>re(`/profiles/${n}`,{method:"DELETE"}),discoverOrphans:()=>re("/profiles/orphans"),registerOrphans:n=>re("/profiles/orphans/register",{method:"POST",body:JSON.stringify(n)}),copy:(n,a)=>re(`/profiles/${n}/copy`,{method:"POST",body:JSON.stringify(a)}),export:(n,a=!1)=>re(`/profiles/${n}/export`,{method:"POST",body:JSON.stringify({includeSecrets:a})}),import:n=>re("/profiles/import",{method:"POST",body:JSON.stringify(n)})},imageAnalysis:{get:()=>re("/image-analysis"),update:n=>re("/image-analysis",{method:"PUT",body:JSON.stringify(n)})},logs:{getConfig:()=>re("/logs/config"),updateConfig:n=>re("/logs/config",{method:"PUT",body:JSON.stringify(n)}),getSources:()=>re("/logs/sources"),getEntries:({source:n,level:a,search:o,limit:r}={})=>{const c=new URLSearchParams;n&&c.set("source",n),a&&c.set("level",a),o&&c.set("search",o),typeof r=="number"&&c.set("limit",String(r));const d=c.toString();return re(`/logs/entries${d?`?${d}`:""}`)}},cliproxy:{list:()=>re("/cliproxy"),getAuthStatus:()=>re("/cliproxy/auth"),create:n=>re("/cliproxy",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>re(`/cliproxy/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>re(`/cliproxy/${n}`,{method:"DELETE"}),proxyStatus:()=>re("/cliproxy/proxy-status"),proxyStart:()=>re("/cliproxy/proxy-start",{method:"POST"}),proxyStop:()=>re("/cliproxy/proxy-stop",{method:"POST"}),updateCheck:()=>re("/cliproxy/update-check"),versions:()=>re("/cliproxy/versions"),install:(n,a)=>re("/cliproxy/install",{method:"POST",body:JSON.stringify({version:n,force:a})}),restart:()=>re("/cliproxy/restart",{method:"POST"}),stats:()=>re("/cliproxy/usage"),catalog:()=>re("/cliproxy/catalog"),models:()=>re("/cliproxy/models"),updateModel:(n,a)=>re(`/cliproxy/models/${n}`,{method:"PUT",body:JSON.stringify({model:a})}),getRoutingStrategy:()=>re("/cliproxy/routing/strategy"),updateRoutingStrategy:n=>re("/cliproxy/routing/strategy",{method:"PUT",body:JSON.stringify({value:n})}),aiProviders:{list:()=>re("/cliproxy/ai-providers"),create:(n,a)=>re(`/cliproxy/ai-providers/${encodeURIComponent(n)}`,{method:"POST",body:JSON.stringify(a)}),update:(n,a,o)=>re(`/cliproxy/ai-providers/${encodeURIComponent(n)}/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(o)}),delete:(n,a)=>re(`/cliproxy/ai-providers/${encodeURIComponent(n)}/${encodeURIComponent(a)}`,{method:"DELETE"})},getConfigYaml:async()=>{const n=await fetch(Tr("/cliproxy/config.yaml"));if(!n.ok)throw new Error("Failed to load config");return n.text()},saveConfigYaml:async n=>{const a=await fetch(Tr("/cliproxy/config.yaml"),{method:"PUT",headers:{"Content-Type":"application/yaml"},body:n});if(!a.ok){const o=await a.json().catch(()=>({error:"Failed to save config"}));throw new Error(o.error||"Failed to save config")}},getAuthFiles:()=>re("/cliproxy/auth-files"),getAuthFile:async n=>{const a=await fetch(Tr(`/cliproxy/auth-files/download?name=${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load auth file");return a.text()},accounts:{list:()=>re("/cliproxy/auth/accounts"),listByProvider:n=>re(`/cliproxy/auth/accounts/${n}`),setDefault:(n,a)=>re(`/cliproxy/auth/accounts/${n}/default`,{method:"POST",body:JSON.stringify({accountId:a})}),remove:(n,a)=>re(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}`,{method:"DELETE"}),pause:(n,a)=>re(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}/pause`,{method:"POST"}),resume:(n,a)=>re(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}/resume`,{method:"POST"}),solo:(n,a)=>re("/accounts/solo",{method:"POST",body:JSON.stringify({provider:n,accountId:a})}),bulkPause:(n,a)=>re("/accounts/bulk-pause",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})}),bulkResume:(n,a)=>re("/accounts/bulk-resume",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})})},auth:{start:(n,a)=>re(`/cliproxy/auth/${n}/start`,{method:"POST",body:JSON.stringify({nickname:a})}),cancel:n=>re(`/cliproxy/auth/${n}/cancel`,{method:"POST"}),kiroImport:()=>re("/cliproxy/auth/kiro/import",{method:"POST"})},errorLogs:{list:()=>re("/cliproxy/error-logs"),getContent:async n=>{const a=await fetch(Tr(`/cliproxy/error-logs/${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load error log");return a.text()}}},accounts:{list:()=>re("/accounts"),setDefault:n=>re("/accounts/default",{method:"POST",body:JSON.stringify({name:n})}),resetDefault:()=>re("/accounts/reset-default",{method:"DELETE"}),delete:n=>re(`/accounts/${n}`,{method:"DELETE"}),updateContext:(n,a)=>re(`/accounts/${encodeURIComponent(n)}/context`,{method:"PUT",body:JSON.stringify(a)})},config:{format:()=>re("/config/format"),get:()=>re("/config"),update:n=>re("/config",{method:"PUT",body:JSON.stringify(n)}),migrate:(n=!1)=>re(`/config/migrate?dryRun=${n}`,{method:"POST"}),rollback:n=>re("/config/rollback",{method:"POST",body:JSON.stringify({backupPath:n})})},presets:{list:n=>re(`/settings/${n}/presets`),create:(n,a)=>re(`/settings/${n}/presets`,{method:"POST",body:JSON.stringify(a)}),delete:(n,a)=>re(`/settings/${n}/presets/${encodeURIComponent(a)}`,{method:"DELETE"})},cliproxyServer:{get:()=>re("/cliproxy-server"),update:n=>re("/cliproxy-server",{method:"PUT",body:JSON.stringify(n)}),getBackend:()=>re("/cliproxy-server/backend"),updateBackend:(n,a=!1)=>re("/cliproxy-server/backend",{method:"PUT",body:JSON.stringify({backend:n,force:a})}),test:n=>re("/cliproxy-server/test",{method:"POST",body:JSON.stringify(n)})},quota:{get:(n,a)=>re(`/cliproxy/quota/${n}/${encodeURIComponent(a)}`),getCodex:n=>re(`/cliproxy/quota/codex/${encodeURIComponent(n)}`),getClaude:n=>re(`/cliproxy/quota/claude/${encodeURIComponent(n)}`),getGemini:n=>re(`/cliproxy/quota/gemini/${encodeURIComponent(n)}`)}};function XA(n){n.invalidateQueries({queryKey:["cliproxy-catalog"]}),n.invalidateQueries({queryKey:["cliproxy-models"]})}function Aa(n){n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),XA(n)}function wE(){return Nt({queryKey:["cliproxy"],queryFn:()=>Fe.cliproxy.list()})}function ZA(){return Nt({queryKey:["cliproxy-auth"],queryFn:()=>Fe.cliproxy.getAuthStatus()})}function kE(){return Nt({queryKey:["cliproxy-catalog"],queryFn:()=>Fe.cliproxy.catalog(),staleTime:3e4,retry:1})}function AE(){return Nt({queryKey:["cliproxy-routing"],queryFn:()=>Fe.cliproxy.getRoutingStrategy()})}function NE(){const n=lt(),{t:a}=fe();return st({mutationFn:o=>Fe.cliproxy.updateRoutingStrategy(o),onSuccess:o=>{n.invalidateQueries({queryKey:["cliproxy-routing"]}),le.success(o.message||a("toasts.routingStrategySet",{strategy:o.strategy}))},onError:o=>{le.error(o.message)}})}function DE(){const n=lt(),{t:a}=fe();return st({mutationFn:o=>Fe.cliproxy.create(o),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success(a("toasts.variantCreated"))},onError:o=>{le.error(o.message)}})}function TE(){const n=lt(),{t:a}=fe();return st({mutationFn:o=>Fe.cliproxy.delete(o),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success(a("toasts.variantDeleted"))},onError:o=>{le.error(o.message)}})}function PE(){const n=lt(),{t:a}=fe();return st({mutationFn:({provider:o,accountId:r})=>Fe.cliproxy.accounts.setDefault(o,r),onSuccess:()=>{Aa(n),le.success(a("toasts.defaultAccountUpdated"))},onError:o=>{le.error(o.message)}})}function ME(){const n=lt(),{t:a}=fe();return st({mutationFn:({provider:o,accountId:r})=>Fe.cliproxy.accounts.remove(o,r),onSuccess:()=>{Aa(n),le.success(a("toasts.accountRemoved"))},onError:o=>{le.error(o.message)}})}function JA(){const n=lt(),{t:a}=fe();return st({mutationFn:({provider:o,accountId:r})=>Fe.cliproxy.accounts.pause(o,r),onSuccess:()=>{Aa(n),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(a("toasts.accountPaused"))},onError:o=>{le.error(o.message)}})}function eN(){const n=lt(),{t:a}=fe();return st({mutationFn:({provider:o,accountId:r})=>Fe.cliproxy.accounts.resume(o,r),onSuccess:()=>{Aa(n),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(a("toasts.accountResumed"))},onError:o=>{le.error(o.message)}})}function jE(){const n=lt();return st({mutationFn:({provider:a,accountId:o})=>Fe.cliproxy.accounts.solo(a,o),onSuccess:a=>{Aa(n),n.invalidateQueries({queryKey:["cliproxy-stats"]});const o=a.paused.length;le.success(`Solo mode: paused ${o} other account${o!==1?"s":""}`)},onError:a=>{le.error(a.message)}})}function tN(){const n=lt();return st({mutationFn:({provider:a,accountIds:o})=>Fe.cliproxy.accounts.bulkPause(a,o),onSuccess:a=>{Aa(n),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 nN(){const n=lt();return st({mutationFn:({provider:a,accountIds:o})=>Fe.cliproxy.accounts.bulkResume(a,o),onSuccess:a=>{Aa(n),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 EE(){const n=lt(),{t:a}=fe();return st({mutationFn:({provider:o,nickname:r})=>Fe.cliproxy.auth.start(o,r),onSuccess:(o,r)=>{Aa(n),le.success(a("toasts.accountAdded",{provider:r.provider}))},onError:o=>{le.error(o.message)}})}function LE(){return st({mutationFn:n=>Fe.cliproxy.auth.cancel(n),onError:n=>{le.error(n.message)}})}function RE(){const n=lt(),{t:a}=fe();return st({mutationFn:()=>Fe.cliproxy.auth.kiroImport(),onSuccess:o=>{Aa(n),o.account?le.success(a("toasts.kiroImported",{name:o.account.email||o.account.id})):le.success(a("toasts.kiroTokenImported"))},onError:o=>{le.error(o.message)}})}function OE(){return Nt({queryKey:["cliproxy-models"],queryFn:()=>Fe.cliproxy.models()})}function IE(n){return Nt({queryKey:["presets",n],queryFn:()=>Fe.presets.list(n),enabled:!!n})}function _E(){const n=lt(),{t:a}=fe();return st({mutationFn:({profile:o,data:r})=>Fe.presets.create(o,r),onSuccess:(o,r)=>{n.invalidateQueries({queryKey:["presets",r.profile]}),le.success(a("toasts.presetSaved",{name:r.data.name}))},onError:o=>{le.error(o.message)}})}function UE(){const n=lt(),{t:a}=fe();return st({mutationFn:({profile:o,name:r})=>Fe.presets.delete(o,r),onSuccess:(o,r)=>{n.invalidateQueries({queryKey:["presets",r.profile]}),le.success(a("toasts.presetDeleted"))},onError:o=>{le.error(o.message)}})}function zE(){return Nt({queryKey:["proxy-status"],queryFn:()=>Fe.cliproxy.proxyStatus(),refetchInterval:3e4})}function HE(){const n=lt(),{t:a}=fe();return st({mutationFn:()=>Fe.cliproxy.proxyStart(),onSuccess:o=>{n.invalidateQueries({queryKey:["proxy-status"]}),o.alreadyRunning?le.info(a("toasts.cliproxyAlreadyRunning")):o.started?le.success(a("toasts.cliproxyStarted")):le.error(o.error||a("toasts.cliproxyStartFailed"))},onError:o=>{le.error(o.message)}})}function BE(){const n=lt(),{t:a}=fe();return st({mutationFn:()=>Fe.cliproxy.proxyStop(),onSuccess:o=>{n.invalidateQueries({queryKey:["proxy-status"]}),o.stopped?le.success(`CLIProxy stopped${o.sessionCount?` (${o.sessionCount} session(s) disconnected)`:""}`):le.error(o.error||a("toasts.cliproxyStopFailed"))},onError:o=>{le.error(o.message)}})}function aN(){return Nt({queryKey:["cliproxy-update-check"],queryFn:()=>Fe.cliproxy.updateCheck(),staleTime:300*1e3,refetchInterval:300*1e3,refetchOnWindowFocus:!0})}function FE(){const n=lt();return st({mutationKey:["update-backend"],mutationFn:({backend:a,force:o=!1})=>Fe.cliproxyServer.updateBackend(a,o),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 qE(){return Nt({queryKey:["cliproxy-versions"],queryFn:()=>Fe.cliproxy.versions(),staleTime:300*1e3,refetchOnWindowFocus:!0})}function KE(){const n=lt();return st({mutationFn:({version:a,force:o})=>Fe.cliproxy.install(a,o),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 GE(){const n=lt();return st({mutationFn:()=>Fe.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 iN=V0,oN=W0,rN=Y0;function sN(n){return[{title:n("nav.general"),items:[{path:"/",icon:PS,label:n("nav.home")},{path:"/analytics",icon:MS,label:n("nav.analytics")}]},{title:n("nav.identityAccess"),items:[{path:"/providers",icon:Ld,label:n("nav.apiProfiles"),badge:{icons:["/icons/openrouter.svg","/assets/providers/alibabacloud-color.svg","/icons/ollama.svg"]}},{path:"/cliproxy",icon:Rb,label:n("nav.cliproxyPlus"),isCollapsible:!0,children:[{path:"/cliproxy",label:n("nav.cliproxyOverview")},{path:"/cliproxy/ai-providers",icon:Ld,label:"AI Providers"},{path:"/cliproxy/control-panel",icon:jS,label:n("nav.controlPanel")}]},{path:"/copilot",icon:Ob,label:n("nav.githubCopilot")},{path:"/cursor",iconSrc:"/assets/sidebar/cursor.svg",label:n("nav.cursorIde")},{path:"/accounts",icon:_b,label:n("nav.accounts"),isCollapsible:!0,children:[{path:"/accounts",label:n("nav.allAccounts")},{path:"/shared",icon:Ib,label:n("nav.sharedData")}]}]},{title:n("nav.compatibleClis"),items:[{path:"/claude-extension",icon:ES,label:n("nav.claudeExtension")},{path:"/codex",iconSrc:"/assets/sidebar/codex.svg",label:"Codex CLI"},{path:"/droid",icon:LS,label:n("nav.factoryDroid")}]},{title:n("nav.system"),items:[{path:"/health",icon:zr,label:n("nav.health")},{path:"/logs",icon:Ub,label:n("nav.logs")},{path:"/settings",icon:RS,label:n("nav.settings")}]}]}function lN(){const{t:n}=fe(),a=jl(),o=Jd(),{state:r}=zl(),{data:c}=aN(),d=sN(n),h=c?.backendLabel??"CLIProxy",p=C=>C.path==="/cliproxy"?h:C.label,m=C=>a.pathname===C,g=C=>C.some(T=>m(T.path)||a.pathname.startsWith(T.path+"/")),v=C=>C.path==="/accounts"?"/shared":C.path,b=C=>{if(C.iconSrc)return l.jsx("img",{src:C.iconSrc,alt:"",className:"w-4 h-4 object-contain"});if(C.icon){const T=C.icon;return l.jsx(T,{className:"w-4 h-4"})}return null};return l.jsxs(OA,{collapsible:"icon",children:[l.jsx(_A,{className:"h-12 flex items-center justify-center",children:l.jsx(ux,{size:"sm",showText:r==="expanded"})}),l.jsx(zA,{children:d.map((C,T)=>l.jsxs(HA,{children:[C.title&&l.jsx(BA,{children:C.title}),l.jsx(FA,{children:l.jsx(qA,{children:C.items.map(k=>l.jsx(KA,{children:k.isCollapsible&&k.children?l.jsxs(iN,{defaultOpen:g(k.children)||m(k.path),className:"group/collapsible",children:[l.jsx(oN,{asChild:!0,children:l.jsxs(by,{tooltip:p(k),isActive:g(k.children),onClick:()=>o(v(k)),children:[b(k),l.jsx("span",{className:"group-data-[collapsible=icon]:hidden",children:p(k)}),l.jsx(El,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 group-data-[collapsible=icon]:hidden"})]})}),l.jsx(rN,{children:l.jsx(VA,{children:k.children.map(M=>l.jsx(YA,{children:l.jsx(WA,{asChild:!0,isActive:m(M.path),children:l.jsx(Cl,{to:M.path,children:l.jsx("span",{children:M.label})})})},M.path))})})]}):l.jsx(by,{asChild:!0,isActive:m(k.path),tooltip:p(k),children:l.jsxs(Cl,{to:k.path,children:[b(k),l.jsx("span",{className:"group-data-[collapsible=icon]:hidden flex-1",children:p(k)}),k.badge&&l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs("span",{className:F("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(k.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:[(k.badge.icons&&k.badge.icons.length>0?k.badge.icons:k.badge.icon?[k.badge.icon]:[]).map(M=>l.jsx("span",{className:F("inline-flex h-4 w-4 items-center justify-center rounded-[3px] border",m(k.path)?"bg-white border-black/10":"bg-background/80 border-border/40 group-hover/menu-item:bg-white/90"),children:l.jsx("img",{src:M,alt:"",className:"h-3 w-3 object-contain"})},M)),k.badge.text&&l.jsx("span",{className:"hidden sm:inline",children:k.badge.text})]})}),l.jsx(ka,{side:"right",children:l.jsx("p",{children:n("nav.openrouterTooltip")})})]})]})})},k.path))})})]},C.title||T))}),l.jsx(UA,{className:"p-4 border-t flex items-center justify-center",children:l.jsx(IA,{})})]})}const fh=()=>{const n=S.useContext(ax);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n};function cN(){const{theme:n,setTheme:a}=fh(),{t:o}=fe();return l.jsxs(rt,{variant:"ghost",size:"icon",onClick:()=>a(n==="dark"?"light":"dark"),children:[l.jsx(zb,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(Hb,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),l.jsx("span",{className:"sr-only",children:o("themeToggle.srLabel")})]})}function uN(){const{privacyMode:n,togglePrivacyMode:a}=oh(),{t:o}=fe();return l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(rt,{variant:"ghost",size:"icon",onClick:a,className:F("h-8 w-8 transition-colors",n&&"text-amber-600 hover:text-amber-700 dark:text-amber-400"),children:n?l.jsx(Vr,{className:"h-4 w-4"}):l.jsx(Yr,{className:"h-4 w-4"})})}),l.jsx(ka,{children:l.jsx("p",{children:o(n?"privacyToggle.modeOn":"privacyToggle.modeOff")})})]})}const dN="https://github.com/kaitranntt/ccs/issues";function hN(){const{t:n}=fe();return l.jsx(rt,{variant:"ghost",size:"icon",asChild:!0,title:n("githubLink.title"),children:l.jsx("a",{href:dN,target:"_blank",rel:"noopener noreferrer",children:l.jsx(Ob,{className:"w-4 h-4"})})})}const fN="https://docs.ccs.kaitran.ca";function pN(){const{t:n}=fe();return l.jsx(rt,{variant:"ghost",size:"icon",asChild:!0,title:n("docsLink.title"),children:l.jsx("a",{href:fN,target:"_blank",rel:"noopener noreferrer",children:l.jsx(OS,{className:"w-4 h-4"})})})}function mN(){const{t:n}=fe(),[a,o]=S.useState("disconnected"),[r,c]=S.useState(!1),d=S.useRef(null),h=lt(),p=S.useRef(0),m=5,g=S.useRef(null),v=S.useRef(()=>{}),b=S.useCallback(k=>{switch(k.type){case"connected":console.log("[WS] Server acknowledged connection");break;case"config-changed":h.invalidateQueries({queryKey:["profiles"]}),h.invalidateQueries({queryKey:["cliproxy"]}),le.info(n("toasts.configUpdatedExternally"));break;case"settings-changed":h.invalidateQueries({queryKey:["profiles"]}),le.info(n("toasts.settingsFileUpdated"));break;case"profiles-changed":h.invalidateQueries({queryKey:["accounts"]}),le.info(n("toasts.accountsUpdated"));break;case"proxy-status-changed":h.invalidateQueries({queryKey:["proxy-status"]});break;case"pong":break;default:console.log(`[WS] Unknown message: ${k.type}`)}},[h,n]),C=S.useCallback(()=>{if(d.current?.readyState===WebSocket.OPEN)return;o("connecting");const k=window.location.protocol==="https:"?"wss:":"ws:",M=new WebSocket(`${k}//${window.location.host}/ws`);d.current=M,M.onopen=()=>{o("connected"),c(!1),p.current=0,console.log("[WS] Connected")},M.onmessage=L=>{try{const E=JSON.parse(L.data);b(E),window.dispatchEvent(new CustomEvent("ws-message",{detail:E}))}catch{console.log("[WS] Invalid message")}},M.onclose=()=>{if(o("disconnected"),d.current=null,p.current<m){c(!0);const L=Math.min(1e3*Math.pow(2,p.current),3e4);p.current++,console.log(`[WS] Reconnecting in ${L}ms (attempt ${p.current})`),g.current=setTimeout(()=>{v.current()},L)}else c(!1)},M.onerror=()=>{console.log("[WS] Connection error")}},[b]);v.current=C;const T=S.useCallback(()=>{p.current=m,c(!1),g.current&&(clearTimeout(g.current),g.current=null),d.current?.close()},[]);return S.useEffect(()=>(v.current(),()=>T()),[]),S.useEffect(()=>{const k=setInterval(()=>{d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"ping"}))},3e4);return()=>clearInterval(k)},[]),S.useMemo(()=>({status:a,isReconnecting:r,connect:C,disconnect:T}),[a,r,C,T])}function gN(){const{status:n,isReconnecting:a}=mN(),{t:o}=fe(),c={connected:{icon:_S,color:"text-green-600",label:o("connectionIndicator.connected"),animate:!1},connecting:{icon:Hr,color:"text-yellow-500",label:o("connectionIndicator.connecting"),animate:!0},disconnected:{icon:a?Hr:IS,color:a?"text-amber-500":"text-red-500",label:o(a?"connectionIndicator.reconnecting":"connectionIndicator.disconnected"),animate:a}}[n],d=c.icon;return l.jsxs("div",{className:`flex items-center gap-1 text-sm ${c.color}`,children:[l.jsx(d,{className:`w-4 h-4 ${c.animate?"animate-spin":""}`}),l.jsx("span",{className:"hidden sm:inline",children:c.label})]})}function yN(){const[n,a]=S.useState(!1),{authEnabled:o,authConfigured:r,isLocalAccess:c,loading:d}=Ul(),{t:h}=fe(),p=!c&&!o;if(n&&!p||d)return null;const m=p?"w-full border-t border-amber-200 bg-amber-50 px-4 py-2 text-amber-900 transition-colors duration-200 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-200":"w-full border-t border-yellow-200 bg-yellow-50 px-4 py-2 text-yellow-800 transition-colors duration-200 dark:border-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-200",g=p?"text-amber-600 hover:bg-amber-100 hover:text-amber-800 dark:text-amber-400 dark:hover:bg-amber-800/30":"text-yellow-600 hover:bg-yellow-100 hover:text-yellow-800 dark:text-yellow-400 dark:hover:bg-yellow-800/30",v=p?l.jsx(l.Fragment,{children:r?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:h("localhostDisclaimer.remoteReadonlyAuthDisabledLong")}),l.jsx("span",{className:"sm:hidden",children:h("localhostDisclaimer.remoteReadonlyAuthDisabledShort")})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:h("localhostDisclaimer.remoteReadonlySetupLong")}),l.jsx("span",{className:"sm:hidden",children:h("localhostDisclaimer.remoteReadonlySetupShort")})]})}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:h("localhostDisclaimer.localLong")}),l.jsx("span",{className:"sm:hidden",children:h("localhostDisclaimer.localShort")})]});return l.jsx("div",{className:m,children:l.jsxs("div",{className:"flex items-center justify-center gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(US,{className:"w-4 h-4 flex-shrink-0"}),v]}),p?null:l.jsx("button",{onClick:()=>a(!0),className:`flex-shrink-0 rounded p-1 transition-colors ${g}`,"aria-label":h("localhostDisclaimer.dismiss"),children:l.jsx(No,{className:"w-4 h-4"})})]})})}const bN="https://claudekit.cc?ref=HMNKXOHN";function xN(){const{t:n}=fe();return l.jsxs("a",{href:bN,target:"_blank",rel:"noopener noreferrer",className:F("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:n("claudekitBadge.title"),children:[l.jsx("img",{src:"/logos/claudekit-logo.png",alt:n("claudekitBadge.alt"),className:"w-5 h-5"}),l.jsxs("span",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[l.jsx("span",{className:F("text-[10px] font-medium uppercase tracking-wide","text-muted-foreground group-hover:text-accent-foreground/80","transition-colors"),children:n("claudekitBadge.poweredBy")}),l.jsx("span",{className:F("text-xs font-bold text-foreground","group-hover:text-accent-foreground","transition-colors"),children:n("claudekitBadge.claudekit")})]})]})}const vN="https://github.com/sponsors/kaitranntt";function CN(){const{t:n}=fe();return l.jsxs("a",{href:vN,target:"_blank",rel:"noopener noreferrer",className:F("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:n("sponsorButton.title"),children:[l.jsx(zS,{className:F("w-4 h-4 text-pink-500","group-hover:text-white group-hover:fill-white","group-hover:animate-pulse","transition-colors")}),l.jsx("span",{className:F("text-xs font-bold text-pink-600 dark:text-pink-300","group-hover:text-white dark:group-hover:text-white","transition-colors"),children:n("sponsorButton.sponsor")})]})}function ph({...n}){return l.jsx(fb,{"data-slot":"dialog",...n})}function SN({...n}){return l.jsx(bb,{"data-slot":"dialog-portal",...n})}function wN({className:n,...a}){return l.jsx(xb,{"data-slot":"dialog-overlay",className:F("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 mh({className:n,children:a,showCloseButton:o=!0,...r}){return l.jsxs(SN,{"data-slot":"dialog-portal",children:[l.jsx(wN,{}),l.jsxs(pb,{"data-slot":"dialog-content",className:F("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),...r,children:[a,o&&l.jsxs(mb,{"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:[l.jsx(No,{}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function gh({className:n,...a}){return l.jsx("div",{"data-slot":"dialog-header",className:F("flex flex-col gap-2 text-center sm:text-left",n),...a})}function kN({className:n,...a}){return l.jsx("div",{"data-slot":"dialog-footer",className:F("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...a})}function yh({className:n,...a}){return l.jsx(gb,{"data-slot":"dialog-title",className:F("text-lg leading-none font-semibold",n),...a})}function bh({className:n,...a}){return l.jsx(yb,{"data-slot":"dialog-description",className:F("text-muted-foreground text-sm",n),...a})}function AN({open:n,onClose:a,sessionId:o,provider:r,projects:c,defaultProjectId:d,supportsAll:h,onSelect:p,timeoutSeconds:m=30}){const[g,v]=S.useState(d),[b,C]=S.useState(!1),[T,k]=S.useState(m),{t:M}=fe();S.useEffect(()=>{if(!n){k(m);return}const N=setInterval(()=>{k(D=>D<=1?(clearInterval(N),L(!0),0):D-1)},1e3);return()=>clearInterval(N)},[n,m]),S.useEffect(()=>{n&&(v(d),C(!1),k(m))},[n,d,m]);const L=async(N=!1)=>{if(!b){C(!0);try{await p(N?"":g),a()}catch(D){console.error("Failed to submit project selection:",D);try{await p("")}catch{}a()}}},E=r.charAt(0).toUpperCase()+r.slice(1);return l.jsx(ph,{open:n,onOpenChange:N=>!N&&!b&&a(),children:l.jsxs(mh,{className:"sm:max-w-lg",children:[l.jsxs(gh,{children:[l.jsxs(yh,{className:"flex items-center gap-2",children:[l.jsx(Ib,{className:"w-5 h-5"}),M("projectSelectionDialog.title")]}),l.jsxs(bh,{children:[M("projectSelectionDialog.description",{provider:E}),T>0&&l.jsx("span",{className:"text-muted-foreground ml-1",children:M("projectSelectionDialog.autoSelectCountdown",{count:T})})]})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[l.jsxs("div",{className:"space-y-2",children:[c.map(N=>l.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${g===N.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!b&&v(N.id),children:[g===N.id?l.jsx(_g,{className:"w-5 h-5 text-primary"}):l.jsx(Ug,{className:"w-5 h-5 text-muted-foreground"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium",children:N.name}),l.jsx("div",{className:"text-sm text-muted-foreground font-mono",children:N.id})]}),N.id===d&&l.jsx("span",{className:"text-xs px-2 py-1 bg-secondary rounded",children:M("projectSelectionDialog.default")})]},N.id)),h&&l.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${g==="ALL"?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!b&&v("ALL"),children:[g==="ALL"?l.jsx(_g,{className:"w-5 h-5 text-primary"}):l.jsx(Ug,{className:"w-5 h-5 text-muted-foreground"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium",children:M("projectSelectionDialog.allProjects")}),l.jsx("div",{className:"text-sm text-muted-foreground",children:M("projectSelectionDialog.allProjectsDescription",{count:c.length})})]})]})]}),l.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[l.jsx(rt,{variant:"ghost",onClick:()=>L(!0),disabled:b,children:M("projectSelectionDialog.useDefault")}),l.jsx(rt,{onClick:()=>L(!1),disabled:b,children:b?l.jsxs(l.Fragment,{children:[l.jsx(An,{className:"w-4 h-4 mr-2 animate-spin"}),M("projectSelectionDialog.selecting")]}):l.jsxs(l.Fragment,{children:[l.jsx(wo,{className:"w-4 h-4 mr-2"}),M("projectSelectionDialog.confirmSelection")]})})]})]})]})})}const Ao={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"]}},xh=Object.freeze(Object.keys(Ao)),zd=Object.freeze(["agy","codex","claude","gemini","ghcp"]);new Set(zd);const NN=Object.freeze([...zd,...zd.flatMap(n=>Ao[n].aliases),"all"].filter((n,a,o)=>o.indexOf(n)===a));NN.join(", ");new Set(xh);function DN(n=Ao){const a=new Map,o=Object.keys(n),r=(c,d)=>{const h=c.trim().toLowerCase();if(!h)return;const p=a.get(h);if(p&&p!==d)throw new Error(`Provider alias collision for "${h}": ${p} and ${d}`);a.set(h,d)};for(const c of o){r(c,c);for(const d of n[c].aliases)r(d,c)}return a}DN();function TN(n){return xh.filter(a=>Ao[a].oauthFlow===n)}const vh=xh;function $r(n){return vh.includes(n)}function Na(n){return typeof n=="string"?n.trim().toLowerCase():""}const PN=["openai","vertex"];function ql(n){return $r(n)||PN.includes(n)}const hx=Object.freeze(Object.fromEntries(vh.map(n=>[n,{displayName:Ao[n].displayName,description:Ao[n].description}]))),MN={gemini:"/assets/providers/gemini-color.svg",agy:"/assets/providers/agy.png",codex:"/assets/providers/codex-color.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",openai:"/assets/providers/openai.svg",vertex:"/assets/providers/vertex.svg"},xy={textClass:"text-gray-600",letter:"?"},jN={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"},openai:{textClass:"text-slate-900",letter:"O"},vertex:{textClass:"text-blue-600",letter:"V"}},EN=new Set(["kimi"]),LN=new Set(["codex"]);function VE(n){switch(n){case"gemini-api-key":return"gemini";case"codex-api-key":return"codex";case"claude-api-key":return"claude";case"vertex-api-key":return"vertex";case"openai-compatibility":return"openai"}}function YE(n){return n.split(`
11
+ `).map(a=>a.trim()).filter(a=>a.length>0).map(a=>{const o=a.indexOf("=");if(o===-1)return{name:a.trim(),alias:""};const r=a.slice(0,o).trim(),c=a.slice(o+1).trim();return c?{name:c,alias:r}:{name:r,alias:""}}).filter(a=>a.name.length>0||a.alias.length>0)}function WE(n){return n.split(`
12
+ `).map((a,o)=>({line:a.trim(),lineNumber:o+1})).filter(({line:a})=>a.length>0&&a.includes("=")).flatMap(({line:a,lineNumber:o})=>{const r=a.indexOf("="),c=a.slice(0,r).trim(),d=a.slice(r+1).trim();return c&&d?[]:[`Line ${o}: use requested=upstream or a plain model name.`]})}function QE(n){return(n||[]).map(a=>{const o=a.alias?.trim()||"",r=a.name?.trim()||"";return o?`${o}=${r}`:r}).join(`
13
+ `)}function $E(n){return n.alias.trim()||n.name.trim()}function fx(n){const a=Na(n);if(ql(a))return MN[a]}function RN(n){const a=Na(n);return ql(a)?jN[a]:{...xy,letter:a[0]?.toUpperCase()||xy.letter}}function ON(n){const a=Na(n);return ql(a)&&EN.has(a)}function IN(n){const a=Na(n);return ql(a)&&LN.has(a)}const Ch={gemini:"#4285F4",agy:"#f3722c",codex:"#10a37f",openai:"#111827",vertex:"#4285F4",iflow:"#f94144",qwen:"#6236FF",kiro:"#4d908e",ghcp:"#43aa8b",claude:"#D97757",kimi:"#FF6B35"},_N={...Object.fromEntries(vh.map(n=>[n,hx[n].displayName])),openai:"OpenAI",vertex:"Vertex AI"};function Sh(n){const a=Na(n);return a?_N[a]||String(n):"Unknown provider"}function UN(n){const a=Na(n);return $r(a)?hx[a].description:""}const zN=[...TN("device_code")],HN=Object.freeze({ghcp:"GitHub Copilot",kiro:"Kiro (AWS)",qwen:"Qwen Code"}),BN=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 XE(n){const a=Na(n);return $r(a)&&zN.includes(a)}function bl(n){const a=Na(n);return a?$r(a)?HN[a]||Sh(a):String(n):"Unknown provider"}function FN(n){const a=Na(n);return $r(a)&&BN[a]||"Complete the authorization in your browser."}const qN=["authcode","device"],Hd="authcode",ZE="aws",vy=[{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"},{id:"idc",label:"AWS Identity Center (IDC)",description:"Use your organization start URL with auth code or device flow.",flowType:"authorization_code",startEndpoint:"start"}];function KN(n){return qN.includes(n)}function GN(n){if(!n)return Hd;const a=n.trim().toLowerCase();return KN(a)?a:Hd}function JE(n){return vy.find(o=>o.id===n)||vy[0]}function eL(n,a=Hd){return n==="aws"||n==="idc"&&GN(a)==="device"?"device_code":"authorization_code"}function tL(n){return n==="google"||n==="github"?"start-url":"start"}function nL(n){return n==="google"||n==="github"}function VN({open:n,onClose:a,sessionId:o,provider:r,userCode:c,verificationUrl:d,expiresAt:h}){const[p,m]=S.useState(!1),[g,v]=S.useState(null);S.useEffect(()=>{if(!n)return;let N=null;const D=()=>{const A=Math.max(0,Math.floor((h-Date.now())/1e3));v(A),A===0&&N&&(clearInterval(N),N=null)};return D(),N=setInterval(D,1e3),()=>{N&&clearInterval(N)}},[n,h]);const b=S.useCallback(async()=>{try{await navigator.clipboard.writeText(c),m(!0),le.success(me.t("commonToast.codeCopied")),setTimeout(()=>m(!1),2e3)}catch{le.error(me.t("commonToast.copyCodeFailed"))}},[c]),C=S.useCallback(()=>{window.open(d,"_blank","noopener,noreferrer")},[d]),T=bl(r),k=FN(r),M=T==="Unknown provider"?me.t("deviceCodeDialog.openVerificationPage"):me.t("deviceCodeDialog.openProviderPage",{provider:T.split(" ")[0]}),L=N=>{const D=Math.floor(N/60),A=N%60;return`${D}:${A.toString().padStart(2,"0")}`},E=g===0;return l.jsx(ph,{open:n,onOpenChange:N=>!N&&a(),children:l.jsxs(mh,{className:"sm:max-w-md","data-session-id":o,children:[l.jsxs(gh,{children:[l.jsxs(yh,{className:"flex items-center gap-2",children:[l.jsx(eh,{className:"w-5 h-5"}),me.t("deviceCodeDialog.authorize",{provider:T})]}),l.jsxs(bh,{children:[me.t("deviceCodeDialog.enterCodeAtPage"),g!==null&&g>0&&l.jsx("span",{className:"text-muted-foreground ml-1",children:me.t("deviceCodeDialog.expiresIn",{time:L(g)})}),E&&l.jsx("span",{className:"text-destructive ml-1 font-medium",children:me.t("deviceCodeDialog.codeExpired")})]})]}),l.jsxs("div",{className:"space-y-6 py-4",children:[l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"bg-muted rounded-lg p-6 text-center",children:l.jsx("div",{className:"text-4xl font-mono font-bold tracking-[0.3em] text-foreground select-all",children:c})}),l.jsx(rt,{variant:"outline",size:"icon",className:"absolute top-2 right-2",onClick:b,"aria-label":p?me.t("deviceCodeDialog.codeCopiedAria"):me.t("deviceCodeDialog.copyCodeAria"),children:p?l.jsx(wo,{className:"h-4 w-4 text-green-500"}):l.jsx(Sl,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"text-sm text-muted-foreground text-center",children:l.jsx("p",{children:k})}),l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs(rt,{onClick:C,className:"w-full",children:[l.jsx(Bb,{className:"w-4 h-4 mr-2"}),M]}),l.jsx(rt,{variant:"outline",onClick:b,className:"w-full",children:p?l.jsxs(l.Fragment,{children:[l.jsx(wo,{className:"w-4 h-4 mr-2 text-green-500"}),me.t("deviceCodeDialog.copied")]}):l.jsxs(l.Fragment,{children:[l.jsx(Sl,{className:"w-4 h-4 mr-2"}),me.t("deviceCodeDialog.copyCode")]})})]}),l.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[l.jsx(An,{className:"h-4 w-4 animate-spin"}),l.jsx("span",{children:me.t("deviceCodeDialog.waitingForAuth")})]})]})]})})}function YN({...n}){return l.jsx(Q0,{"data-slot":"dropdown-menu",...n})}function WN({...n}){return l.jsx($0,{"data-slot":"dropdown-menu-trigger",...n})}function QN({className:n,sideOffset:a=4,...o}){return l.jsx(X0,{children:l.jsx(Z0,{"data-slot":"dropdown-menu-content",sideOffset:a,className:F("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),...o})})}function $N({className:n,inset:a,variant:o="default",...r}){return l.jsx(J0,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":o,className:F("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),...r})}function XN(){const{authRequired:n,isAuthenticated:a,username:o,logout:r}=Ul();if(!n||!a)return null;const c=async()=>{await r()};return l.jsxs(YN,{children:[l.jsx(WN,{asChild:!0,children:l.jsxs(rt,{variant:"ghost",size:"sm",className:"gap-2",children:[l.jsx(Fb,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:o})]})}),l.jsx(QN,{align:"end",children:l.jsxs($N,{onClick:c,className:"gap-2 text-destructive",children:[l.jsx(HS,{className:"h-4 w-4"}),"Sign Out"]})})]})}const px=oS,mx=rS,wh=S.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(vb,{ref:r,className:F("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),...o,children:[a,l.jsx(eS,{asChild:!0,children:l.jsx(Ll,{className:"h-4 w-4 opacity-50"})})]}));wh.displayName=vb.displayName;const gx=S.forwardRef(({className:n,...a},o)=>l.jsx(Cb,{ref:o,className:F("flex cursor-default items-center justify-center py-1",n),...a,children:l.jsx(th,{className:"h-4 w-4"})}));gx.displayName=Cb.displayName;const yx=S.forwardRef(({className:n,...a},o)=>l.jsx(Sb,{ref:o,className:F("flex cursor-default items-center justify-center py-1",n),...a,children:l.jsx(Ll,{className:"h-4 w-4"})}));yx.displayName=Sb.displayName;const kh=S.forwardRef(({className:n,children:a,position:o="popper",...r},c)=>l.jsx(tS,{children:l.jsxs(wb,{ref:c,className:F("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",o==="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:o,...r,children:[l.jsx(gx,{}),l.jsx(nS,{className:F("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),l.jsx(yx,{})]})}));kh.displayName=wb.displayName;const ZN=S.forwardRef(({className:n,...a},o)=>l.jsx(kb,{ref:o,className:F("px-2 py-1.5 text-sm font-semibold",n),...a}));ZN.displayName=kb.displayName;const Ir=S.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(Ab,{ref:r,className:F("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),...o,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(aS,{children:l.jsx(wo,{className:"h-4 w-4"})})}),l.jsx(iS,{children:a})]}));Ir.displayName=Ab.displayName;const JN=S.forwardRef(({className:n,...a},o)=>l.jsx(Nb,{ref:o,className:F("-mx-1 my-1 h-px bg-muted",n),...a}));JN.displayName=Nb.displayName;function eD(){const{t:n,i18n:a}=fe(),o=Qr(a.resolvedLanguage??a.language??"en"),r=c=>{const d=Gk(c);a.changeLanguage(d)};return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(qb,{className:"h-4 w-4 text-muted-foreground"}),l.jsxs(px,{value:o,onValueChange:r,children:[l.jsx(wh,{className:"h-8 w-[150px]",children:l.jsx(mx,{placeholder:n("layout.languageSwitcher")})}),l.jsx(kh,{children:qk.map(c=>l.jsx(Ir,{value:c,children:n(`locale.${c}`)},c))})]})]})}function tD(){const[n,a]=S.useState({isOpen:!1,prompt:null});S.useEffect(()=>{const c=d=>{const h=d.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 o=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]),r=S.useCallback(()=>{a({isOpen:!1,prompt:null})},[]);return S.useMemo(()=>({isOpen:n.isOpen,prompt:n.prompt,onSelect:o,onClose:r}),[n.isOpen,n.prompt,o,r])}function nD(n){return typeof n!="string"?"unknown":n.trim().toLowerCase()||"unknown"}function aD(){const{t:n}=fe(),[a,o]=S.useState({isOpen:!1,prompt:null,error:null});S.useEffect(()=>{const h=p=>{const m=p.detail;if(m.type==="deviceCodeReceived"){console.log("[DeviceCode] Received prompt:",m.sessionId);const g=nD(m.provider),v=bl(g);le.info(n("toasts.authRequired",{provider:v})),o({isOpen:!0,prompt:{sessionId:m.sessionId,provider:g,userCode:m.userCode,verificationUrl:m.verificationUrl,expiresAt:m.expiresAt},error:null})}else m.type==="deviceCodeCompleted"?(console.log("[DeviceCode] Auth completed:",m.sessionId),o(g=>{if(g.prompt&&g.prompt.sessionId===m.sessionId){const v=bl(g.prompt.provider);return le.success(n("toasts.authSuccess",{provider:v})),{isOpen:!1,prompt:null,error:null}}return g})):m.type==="deviceCodeFailed"?(console.log("[DeviceCode] Auth failed:",m.sessionId,m.error),o(g=>{if(g.prompt&&g.prompt.sessionId===m.sessionId){const v=bl(g.prompt.provider);return le.error(n("toasts.authFailed",{provider:v})),{isOpen:!1,prompt:null,error:m.error}}return g})):m.type==="deviceCodeExpired"&&(console.log("[DeviceCode] Code expired:",m.sessionId),o(g=>g.prompt?.sessionId===m.sessionId?(le.error(n("toasts.deviceCodeExpired")),{isOpen:!1,prompt:null,error:"Device code expired"}):g))};return window.addEventListener("ws-message",h),()=>{window.removeEventListener("ws-message",h)}},[n]);const r=S.useCallback(()=>{o({isOpen:!1,prompt:null,error:null})},[]),c=S.useCallback(()=>{a.prompt?.verificationUrl&&window.open(a.prompt.verificationUrl,"_blank","noopener,noreferrer")},[a.prompt]),d=S.useCallback(async()=>{if(a.prompt?.userCode)try{await navigator.clipboard.writeText(a.prompt.userCode),le.success(n("toasts.codeCopied"))}catch{le.error(n("toasts.failedCopy"))}},[a.prompt,n]);return S.useMemo(()=>({isOpen:a.isOpen,prompt:a.prompt,error:a.error,onClose:r,onOpenUrl:c,onCopyCode:d}),[a.isOpen,a.prompt,a.error,r,c,d])}const iD="ccs-dashboard:last-route";function oD(n,a="",o=""){try{localStorage.setItem(iD,`${n}${a}${o}`)}catch{}}function rD(){return l.jsxs("div",{className:"p-6 space-y-4",children:[l.jsx($e,{className:"h-8 w-48"}),l.jsx($e,{className:"h-64 w-full"})]})}function sD(){const n=jl(),{isOpen:a,prompt:o,onSelect:r,onClose:c}=tD(),d=aD();return S.useEffect(()=>{oD(n.pathname,n.search,n.hash)},[n.pathname,n.search,n.hash]),l.jsxs(RA,{children:[l.jsx(lN,{}),l.jsxs("main",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-background",children:[l.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:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(xN,{}),l.jsx(CN,{})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(gN,{}),l.jsx(eD,{}),l.jsx(pN,{}),l.jsx(hN,{}),l.jsx(uN,{}),l.jsx(cN,{}),l.jsx(XN,{})]})]}),l.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:l.jsx(S.Suspense,{fallback:l.jsx(rD,{}),children:l.jsx(Ed,{})})}),l.jsx(yN,{})]}),o&&l.jsx(AN,{open:a,onClose:c,sessionId:o.sessionId,provider:o.provider,projects:o.projects,defaultProjectId:o.defaultProjectId,supportsAll:o.supportsAll,onSelect:r}),d.prompt&&l.jsx(VN,{open:d.isOpen,onClose:d.onClose,sessionId:d.prompt.sessionId,provider:d.prompt.provider,userCode:d.prompt.userCode,verificationUrl:d.prompt.verificationUrl,expiresAt:d.prompt.expiresAt})]})}const lD=Il("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 zt({className:n,variant:a,...o}){return l.jsx("div",{className:F(lD({variant:a}),n),...o})}function cD({version:n}){const{t:a}=fe();return l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(ux,{size:"lg",showText:!1}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("h1",{className:"text-2xl font-bold",children:a("heroSection.title")}),n&&l.jsxs(zt,{variant:"outline",className:"font-mono text-xs",children:["v",n]})]}),l.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:a("heroSection.subtitle")})]})]})}const uD=100,Cy=["#3b3c36","#568203","#8d4557","#da9100","#3c6c82","#c96907"];function dD(n){return Cy[n%Cy.length]}function Bd(n){return n.replace(/@(gmail|yahoo|hotmail|outlook|icloud)\.com$/i,"")}function hD(n){const o=new Date().getTime()-n.getTime(),r=Math.floor(o/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const c=Math.floor(r/60);return c<24?`${c}h`:`${Math.floor(c/24)}d`}function fD(n){const a=[],o=Date.now(),r=n.reduce((c,d)=>{const h=d.lastUsedAt?new Date(d.lastUsedAt).getTime():o;return Math.max(c,isNaN(h)?o:h)},o);return n.forEach(c=>{const d=new Date(r),h=(p,m)=>{for(let g=0;g<p;g++){const v=Math.floor(Math.random()*24*60*60*1e3*(g/(p||1))),b=new Date(d.getTime()-v),C=Math.floor((Math.random()-.5)*10*60*1e3);b.setTime(b.getTime()+C);const T=new Date;b>T&&b.setTime(T.getTime()),a.push({id:`${c.id}-${m}-${g}`,timestamp:b,accountEmail:c.email,status:m,latencyMs:m==="success"?50+Math.floor(Math.random()*150):200+Math.floor(Math.random()*4800)})}};h(c.successCount,"success"),h(c.failureCount,"failed")}),a.sort((c,d)=>d.timestamp.getTime()-c.timestamp.getTime())}function pD({containerRef:n,svgRef:a,accounts:o}){if(!n.current||!a.current)return[];const r=n.current,d=a.current.getBoundingClientRect(),h=r.querySelector("[data-provider-node]");if(!h)return[];const p=h.getBoundingClientRect(),m=[];return o.forEach((g,v)=>{const b=r.querySelector(`[data-account-index="${v}"]`);if(!b)return;const C=b.getBoundingClientRect(),T=b.getAttribute("data-zone")||"left";let k,M,L,E;switch(T){case"right":k=C.left-d.left,M=C.top+C.height/2-d.top,L=p.right-d.left,E=p.top+p.height/2-d.top;break;case"top":k=C.left+C.width/2-d.left,M=C.bottom-d.top,L=p.left+p.width/2-d.left,E=p.top-d.top;break;case"bottom":k=C.left+C.width/2-d.left,M=C.top-d.top,L=p.left+p.width/2-d.left,E=p.bottom-d.top;break;default:k=C.right-d.left,M=C.top+C.height/2-d.top,L=p.left-d.left,E=p.top+p.height/2-d.top}let N,D,A,P;T==="top"||T==="bottom"?(N=k,D=M+(E-M)*.5,A=L,P=E-(E-M)*.5):(N=k+(L-k)*.5,D=M,A=L-(L-k)*.5,P=E),m.push(`M ${k} ${M} C ${N} ${D}, ${A} ${P}, ${L} ${E}`)}),m}function mD(n){const a=n.length;if(a<=2)return{leftAccounts:n,rightAccounts:[],topAccounts:[],bottomAccounts:[]};if(a<=4){const r=Math.ceil(a/2);return{leftAccounts:n.slice(0,r),rightAccounts:n.slice(r),topAccounts:[],bottomAccounts:[]}}if(a<=8){const r=Math.ceil(a/3);return{leftAccounts:n.slice(0,r),rightAccounts:n.slice(r,r*2),topAccounts:n.slice(r*2),bottomAccounts:[]}}const o=Math.ceil(a/4);return{leftAccounts:n.slice(0,o),rightAccounts:n.slice(o,o*2),topAccounts:n.slice(o*2,o*3),bottomAccounts:n.slice(o*3)}}function gD(n){return n>=9?"w-64":n>=5?"w-60":n>=3?"w-56":"w-52"}function yD({storageKey:n,onDrag:a}){const[o,r]=S.useState(null),c=S.useRef(null),d=S.useRef(!1),h=S.useCallback(()=>{try{const k=localStorage.getItem(n);if(k)return JSON.parse(k)}catch{}return{}},[n]),[p,m]=S.useState(()=>h());S.useEffect(()=>{Object.keys(p).length>0&&localStorage.setItem(n,JSON.stringify(p))},[p,n]);const g=S.useCallback(()=>{m({}),localStorage.removeItem(n)},[n]),v=S.useCallback((k,M)=>{M.preventDefault(),M.stopPropagation(),M.target.setPointerCapture(M.pointerId);const L=p[k]||{x:0,y:0};c.current={x:M.clientX,y:M.clientY,offsetX:L.x,offsetY:L.y},d.current=!1,r(k)},[p]),b=S.useCallback(k=>{if(!o||!c.current)return;const M=c.current,L=k.clientX-M.x,E=k.clientY-M.y;(Math.abs(L)>3||Math.abs(E)>3)&&(d.current=!0),m(N=>({...N,[o]:{x:M.offsetX+L,y:M.offsetY+E}})),a&&requestAnimationFrame(a)},[o,a]),C=S.useCallback(()=>{r(null),c.current=null},[]);return{dragOffsets:p,draggingId:o,didDragRef:d,handlePointerDown:v,handlePointerMove:b,handlePointerUp:C,getOffset:k=>p[k]||{x:0,y:0},resetPositions:g,hasCustomPositions:Object.keys(p).length>0}}function bD(n){let a=0,o=0;return Object.values(n).forEach(r=>{a=Math.min(a,r.y),o=Math.max(o,r.y)}),{paddingTop:Math.max(0,-a),paddingBottom:Math.max(0,o),extraHeight:Math.max(0,Math.abs(a),Math.abs(o))*2}}function xD(n){const[a,o]=S.useState(new Set),r=S.useRef({});return S.useEffect(()=>{const c=new Set,d={};if(n.forEach(h=>{const p=h.successCount+h.failureCount;d[h.id]=p;const m=r.current[h.id];m!==void 0&&p>m&&c.add(h.id)}),r.current=d,c.size>0){o(c);const h=setTimeout(()=>o(new Set),2e3);return()=>clearTimeout(h)}},[n]),a}function vD({events:n,privacyMode:a}){const{t:o}=fe();return n.length===0?l.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:l.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:o("flowViz.noRecentConnections")})}):l.jsxs("div",{className:"h-full flex flex-col",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3 px-2",children:[l.jsx(zr,{className:"w-3.5 h-3.5 text-muted-foreground"}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:o("flowViz.connectionTimeline")})]}),l.jsx("div",{className:F("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:l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute left-[7px] top-2 bottom-2 w-px bg-border/50 dark:bg-white/[0.08]"}),l.jsx("div",{className:"space-y-3",children:n.map(r=>{const c=r.status==="success"?Zt.success:r.status==="failed"?Zt.failed:Zt.degraded;return l.jsxs("div",{className:"relative flex items-start gap-3 pl-1",children:[l.jsx("div",{className:F("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}}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("span",{className:F("text-[10px] font-mono text-foreground truncate",a&&ox),children:Bd(r.accountEmail)}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-mono flex-shrink-0",children:hD(r.timestamp)})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[l.jsx("span",{className:"text-[9px] font-medium uppercase",style:{color:c},children:r.status}),r.latencyMs&&l.jsxs("span",{className:"text-[9px] text-muted-foreground font-mono",children:[r.latencyMs,"ms"]})]})]})]},r.id)})})]})})]})}const CD=new Set(["free","plus","pro"]),SD=new Set(["team"]);function Sy(n){return n.trim().replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi,"").replace(/[^a-z0-9._-]+/gi,"-").replace(/-+/g,"-").toLowerCase()}function Pr(n){const a=n.trim().toLowerCase();if(!a)return"";switch(a){case"team":return"Team";case"free":return"Free";case"plus":return"Plus";case"pro":return"Pro";default:return/^[a-f0-9]{8}$/i.test(a)?a:a.split(/[._-]+/).filter(Boolean).map(o=>o[0]?.toUpperCase()+o.slice(1)).join(" ")}}function bx(n){const a=n.split("#")[0]?.trim();return a&&a.includes("@")?a:null}function wD(n,a){if(!a)return null;const o=`${a}#`;return n.startsWith(o)?n.slice(o.length):null}function kD(n,a){if(!n||!a)return null;const r=(n.split(/[\\/]/).pop()??n).replace(/\.json$/i,"");if(!r.toLowerCase().startsWith("codex-"))return null;const c=r.indexOf("-"),d=c>0&&!r.slice(0,c).includes("@")?r.slice(c+1):r,h=d.toLowerCase().indexOf(a.toLowerCase());if(h===-1)return null;const p=Sy(d.slice(0,h)),m=Sy(d.slice(h+a.length)),g=[p,m].filter(Boolean);return g.length>0?g.join("-"):null}function AD(n){const a=n.find(r=>/^[a-f0-9]{8}$/i.test(r));if(a)return{detailLabel:`Workspace ${a.toLowerCase()}`,compactDetailLabel:a.toLowerCase()};const o=n.map(Pr).filter(Boolean).join(" · ");return{detailLabel:o||"Team",compactDetailLabel:o||"Team"}}function ND(n,a,o){const r=a?.trim()||bx(n)||void 0;return kD(o,r)??wD(n,r)}function Ah(n,a,o){const r=a?.trim()||bx(n)||n,c=ND(n,r,o);if(!c)return{email:r,audience:"unknown",audienceLabel:null,detailLabel:null,compactDetailLabel:null,inlineLabel:null};const d=c.split("-").filter(Boolean);if(d.length===0)return{email:r,audience:"unknown",audienceLabel:null,detailLabel:null,compactDetailLabel:null,inlineLabel:null};const h=d[d.length-1]?.toLowerCase();if(h&&SD.has(h)){const m=AD(d.slice(0,-1)),g=["Business",m.detailLabel].filter(Boolean).join(" · ");return{email:r,audience:"business",audienceLabel:"Business",detailLabel:m.detailLabel,compactDetailLabel:m.compactDetailLabel,inlineLabel:g}}if(h&&CD.has(h)){const g=[Pr(h),...d.slice(0,-1).map(Pr)].filter(Boolean).join(" · ")||Pr(h),v=["Personal",g].filter(Boolean).join(" · ");return{email:r,audience:"personal",audienceLabel:"Personal",detailLabel:g,compactDetailLabel:g,inlineLabel:v}}const p=d.map(Pr).filter(Boolean).join(" · ");return{email:r,audience:"unknown",audienceLabel:null,detailLabel:p||null,compactDetailLabel:p||null,inlineLabel:p||null}}function DD(n,a,o){const r=Ah(n,a,o);return r.inlineLabel?`${r.email} (${r.inlineLabel})`:r.email}const Si="text-red-700 dark:text-red-400";function TD(n){if(!n)return null;const a=n.split(/[\s_-]+/g).map(o=>o.trim()).filter(o=>o.length>0).map(o=>o.charAt(0).toUpperCase()+o.slice(1));return a.length>0?a.join(" "):n}function PD(n){if(!n)return null;try{const a=new Date(n);return Number.isNaN(a.getTime())?null:a.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch{return null}}function MD(n,a,o){switch(n){case"five_hour":return o("quotaTooltip.fiveHourLimit");case"seven_day":return o("quotaTooltip.weeklyLimit");case"seven_day_opus":return o("quotaTooltip.weeklyOpus");case"seven_day_sonnet":return o("quotaTooltip.weeklySonnet");case"seven_day_oauth_apps":return o("quotaTooltip.weeklyOAuthApps");case"seven_day_cowork":return o("quotaTooltip.weeklyCowork");case"overage":return o("quotaTooltip.extraUsage");default:return a}}function wy(n){if(!n)return null;switch(n.trim().toLowerCase()){case"requests":return"Requests";case"input":return"Input tokens";case"output":return"Output tokens";default:return n.split(/[\s_-]+/g).map(a=>a.trim()).filter(a=>a.length>0).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}}function jD(n){switch(n){case"Gemini Flash Lite Series":return"Flash Lite";case"Gemini Flash Series":return"Flash";case"Gemini Pro Series":return"Pro";default:return n}}function ED(n){const a=Array.from(new Set((n||[]).filter(Boolean)));return a.length>0?a.join(", "):null}function LD(n,a,o){if(n==null)return null;const r=n.toLocaleString();switch(a?.trim().toLowerCase()){case"requests":return o("quotaTooltip.requestsRemaining",{count:r});case"input":return o("quotaTooltip.inputTokensRemaining",{count:r});case"output":return o("quotaTooltip.outputTokensRemaining",{count:r});default:return o("quotaTooltip.amountRemaining",{count:r})}}function ky(n,a){if(!n)return null;const o=[];return n.rawTierLabel?o.push({label:a("quotaTooltip.tier"),value:n.rawTierLabel}):n.normalizedTier!=="unknown"&&o.push({label:a("quotaTooltip.tier"),value:n.normalizedTier}),n.rawTierId&&o.push({label:a("quotaTooltip.tierId"),value:n.rawTierId}),(n.accessState!=="entitled"||n.capacityState!=="available")&&o.push({label:a("quotaTooltip.state"),value:`${n.accessState.replaceAll("_"," ")} / ${n.capacityState.replaceAll("_"," ")}`}),o.length===0?null:o.map(r=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground",children:r.label}),l.jsx("span",{className:"font-mono",children:r.value})]},r.label))}function Fd({quota:n,resetTime:a}){const{t:o}=fe();if(!n)return l.jsx("p",{className:"text-xs text-muted-foreground",children:o("quotaTooltip.loadingQuota")});if(!n.success){const r=hh(n),c=r?.tone==="destructive"?"text-destructive":r?.tone==="warning"?"text-amber-700 dark:text-amber-300":"text-foreground";return l.jsxs("div",{className:"max-w-sm space-y-2 text-xs",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:F("font-semibold tracking-tight",c),children:r?.label||n.error||o("quotaTooltip.failedLoadQuota")}),l.jsx("p",{className:"leading-relaxed text-foreground/90",children:r?.summary||n.error})]}),r?.actionHint&&l.jsx("div",{className:"rounded-md border border-border/70 bg-muted/35 px-2.5 py-2 text-foreground/80",children:r.actionHint}),r?.technicalDetail&&l.jsx("div",{className:"rounded-md border border-border/60 bg-muted/25 px-2 py-1.5 font-mono text-[11px] text-foreground/75",children:r.technicalDetail}),r?.rawDetail&&l.jsx("pre",{className:"max-h-56 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border/70 bg-muted/55 px-2.5 py-2 font-mono text-[11px] leading-relaxed text-foreground/85",children:r.rawDetail})]})}if(ch(n)){const r=lA(n.models||[]),c=cA(r),d=["primary","gemini-3","gemini-2","other"];return l.jsxs("div",{className:"text-xs space-y-1.5",children:[ky(n.entitlement,o),l.jsx("p",{className:"font-medium",children:o("quotaTooltip.modelQuotas")}),d.map((h,p)=>{const m=c.get(h);if(!m||m.length===0)return null;const g=d.slice(0,p).every(v=>!c.get(v)?.length);return l.jsxs("div",{children:[!g&&l.jsx("div",{className:"my-1 border-t border-border/40"}),m.map(v=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:F("truncate",v.exhausted&&Si),children:v.displayName}),l.jsxs("span",{className:F("font-mono",v.exhausted&&Si),children:[v.percentage,"%"]})]},v.name))]},h)}),l.jsx(xl,{resetTime:a})]})}if(Bl(n)){const{fiveHourWindow:r,weeklyWindow:c,codeReviewWindows:d,unknownWindows:h}=Hl(n.windows),p=n.coreUsage?.fiveHour?.resetAt??r?.resetAt??null,m=n.coreUsage?.weekly?.resetAt??c?.resetAt??null,g=[r,c,...d,...h].filter(v=>!!v).filter((v,b,C)=>C.findIndex(T=>T.label===v.label&&T.resetAt===v.resetAt)===b);return l.jsxs("div",{className:"text-xs space-y-1.5",children:[l.jsx("p",{className:"font-medium",children:o("quotaTooltip.rateLimits")}),n.planType&&l.jsx("p",{className:"text-muted-foreground",children:o("quotaTooltip.plan",{plan:n.planType})}),g.map((v,b)=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:F(v.remainingPercent<20&&Si),children:dA(v,g)}),l.jsxs("span",{className:"font-mono",children:[v.remainingPercent,"%"]})]},`${v.label}-${v.resetAt??"no-reset"}-${b}`)),l.jsx(Ay,{fiveHourResetTime:p,weeklyResetTime:m,fallbackResetTime:a})]})}if(Fl(n)){const r=[n.coreUsage?.fiveHour,n.coreUsage?.weekly].filter(m=>!!m).map(m=>({rateLimitType:m.rateLimitType,label:m.label,remainingPercent:m.remainingPercent,resetAt:m.resetAt,status:m.status})),c=n.windows.map(m=>({rateLimitType:m.rateLimitType,label:m.label,remainingPercent:m.remainingPercent,resetAt:m.resetAt,status:m.status})),d=[...r,...c].filter((m,g,v)=>v.findIndex(b=>b.rateLimitType===m.rateLimitType&&b.resetAt===m.resetAt&&b.status===m.status)===g),h=n.coreUsage?.fiveHour?.resetAt??n.windows.find(m=>m.rateLimitType==="five_hour")?.resetAt??null,p=n.coreUsage?.weekly?.resetAt??n.windows.find(m=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(m.rateLimitType))?.resetAt??null;return l.jsxs("div",{className:"text-xs space-y-1.5",children:[l.jsx("p",{className:"font-medium",children:o("quotaTooltip.rateLimits")}),d.map((m,g)=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:F(m.remainingPercent<20&&Si),children:MD(m.rateLimitType,m.label,o)}),l.jsxs("span",{className:"font-mono",children:[m.remainingPercent,"%"]})]},`${m.rateLimitType}-${m.resetAt??"no-reset"}-${m.status}-${g}`)),l.jsx(Ay,{fiveHourResetTime:h,weeklyResetTime:p,fallbackResetTime:a})]})}if(uh(n)){const r=n.buckets.some(p=>!!p.resetTime),c=!!n.entitlement?.rawTierLabel||n.entitlement?.normalizedTier!=="unknown",d=Array.from(new Set(n.buckets.map(p=>wy(p.tokenType)).filter(p=>!!p))),h=d.length===1?d[0]:null;return l.jsxs("div",{className:"text-xs space-y-1.5",children:[ky(n.entitlement,o),!c&&n.tierLabel&&l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground",children:o("quotaTooltip.tier")}),l.jsx("span",{className:"font-mono",children:n.tierLabel})]}),n.creditBalance!==null&&n.creditBalance!==void 0&&l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground",children:o("quotaTooltip.credits")}),l.jsx("span",{className:"font-mono",children:n.creditBalance.toLocaleString()})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-medium",children:o("quotaTooltip.modelQuotasLower")}),h&&l.jsx("p",{className:"text-[11px] text-muted-foreground",children:o("quotaTooltip.allBucketsReport",{tokenType:h})})]}),n.buckets.map(p=>{const m=h?null:wy(p.tokenType),g=ED(p.modelIds),v=LD(p.remainingAmount,p.tokenType,o);return l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0 space-y-0.5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:F(p.remainingPercent<20&&Si),children:jD(p.label)}),m&&l.jsx("span",{className:"rounded border border-border/60 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:m})]}),g&&l.jsx("div",{className:"break-words text-[11px] text-muted-foreground",children:g})]}),l.jsxs("span",{className:"shrink-0 font-mono",children:[p.remainingPercent,"%"]})]}),(v||p.resetTime)&&l.jsxs("div",{className:"flex justify-between gap-4 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:v??""}),l.jsx("span",{children:PD(p.resetTime)??""})]})]},p.id)}),!r&&l.jsx(xl,{resetTime:a})]})}if(dh(n)){const r=[{label:o("quotaTooltip.premiumInteractions"),snapshot:n.snapshots.premiumInteractions},{label:o("quotaTooltip.chat"),snapshot:n.snapshots.chat},{label:o("quotaTooltip.completions"),snapshot:n.snapshots.completions}],c=n.quotaResetDate??a,d=TD(n.planType);return l.jsxs("div",{className:"text-xs space-y-1.5",children:[l.jsx("p",{className:"font-medium",children:o("quotaTooltip.quotaSnapshots")}),d&&l.jsx("p",{className:"text-muted-foreground",children:o("quotaTooltip.plan",{plan:d})}),r.map(({label:h,snapshot:p})=>{const m=p.percentRemaining<20;return l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:F(m&&Si),children:h}),l.jsx("span",{className:F("font-mono",m&&Si),children:p.unlimited?o("quotaTooltip.unlimited"):`${sh(p.percentRemaining)}%`})]}),!p.unlimited&&l.jsx("div",{className:"text-[11px] text-muted-foreground",children:o("quotaTooltip.remaining",{remaining:p.remaining,entitlement:p.entitlement})})]},h)}),l.jsx(xl,{resetTime:c})]})}return null}function xl({resetTime:n}){const{t:a}=fe();return n?l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/60 pt-1",children:[l.jsx(ko,{className:"h-3 w-3 text-sky-600 dark:text-sky-300"}),l.jsx("span",{className:"font-medium text-sky-600 dark:text-sky-300",children:a("quotaTooltip.resets",{time:Ud(n)})})]}):null}function Ay({fiveHourResetTime:n,weeklyResetTime:a,fallbackResetTime:o}){const{t:r}=fe(),c=!!n||!!a;return!c&&!o?null:l.jsxs("div",{className:"space-y-1 border-t border-border/60 pt-1",children:[n&&l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ko,{className:"h-3 w-3 text-sky-600 dark:text-sky-300"}),l.jsx("span",{className:"font-medium text-sky-600 dark:text-sky-300",children:r("quotaTooltip.fiveHourResets",{time:Ud(n)})})]}),a&&l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ko,{className:"h-3 w-3 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{className:"font-medium text-indigo-600 dark:text-indigo-300",children:r("quotaTooltip.weeklyResets",{time:Ud(a)})})]}),!c&&o&&l.jsx(xl,{resetTime:o})]})}const qd=S.forwardRef(({className:n,value:a=0,max:o=100,indicatorClassName:r,...c},d)=>{const h=Math.min(Math.max(a/o*100,0),100);return l.jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":a,className:F("relative h-2 w-full overflow-hidden rounded-full bg-secondary",n),...c,children:l.jsx("div",{className:F("h-full transition-all",r||"bg-primary"),style:{width:`${h}%`}})})});qd.displayName="Progress";function Ny(n){const a=Math.max(0,Math.min(100,n));return a<=20?"bg-destructive":a<=50?"bg-yellow-500":"bg-green-500"}function Dy(n){if(!n)return"";try{const a=new Date(n),o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/(1e3*60)),c=Math.floor(o/(1e3*60*60)),d=Math.floor(o/(1e3*60*60*24));return d>0?`${d}d ago`:c>0?`${c}h ago`:r>0?`${r}m ago`:"just now"}catch{return""}}function RD(n){if(!n)return!1;try{return Date.now()-new Date(n).getTime()<3600*1e3}catch{return!1}}function OD({provider:n,quota:a,quotaLoading:o,runtimeLastUsed:r,mode:c,className:d}){const{t:h}=fe(),p=n.toLowerCase(),m=p==="codex",g=p==="claude"||p==="anthropic",v=lx(n,a),b=cx(n,a),C=v!==null?sh(v):null,T=C!==null?Number(C):null,k=hh(a),M=k?.label==="Reauth"?eh:k?.tone==="warning"?Gn:Br,L=m&&a&&Bl(a)?Hl(a.windows):null,N=(m?[{label:"5h",value:L?.fiveHourWindow?.remainingPercent??null},{label:c==="compact"?"Wk":"Weekly",value:L?.weeklyWindow?.remainingPercent??null}]:g&&a&&Fl(a)?[{label:"5h",value:a.coreUsage?.fiveHour?.remainingPercent??a.windows.find(A=>A.rateLimitType==="five_hour")?.remainingPercent??null},{label:c==="compact"?"Wk":"Weekly",value:a.coreUsage?.weekly?.remainingPercent??a.windows.find(A=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(A.rateLimitType))?.remainingPercent??null}]:[]).filter(A=>A.value!==null);if(o)return l.jsxs("div",{className:F("flex items-center gap-1.5 text-xs text-muted-foreground",d),children:[l.jsx(An,{className:"w-3 h-3 animate-spin"}),l.jsx("span",{children:h(c==="compact"?"accountCard.quotaLoading":"accountQuotaPanel.loadingQuota")})]});if(T!==null)return l.jsx("div",{className:F(c==="compact"?"px-0.5":"",d),children:l.jsx(Pi,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:c==="compact"?l.jsxs("div",{className:"space-y-0.5 cursor-help",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:h("accountCard.quota")}),l.jsxs("span",{className:F("text-[10px] font-mono font-bold",T>50?"text-emerald-600 dark:text-emerald-400":T>20?"text-amber-500":"text-red-500"),children:[C,"%"]})]}),N.length>0&&l.jsx("div",{className:"flex items-center justify-between text-[7px] text-muted-foreground/70",children:N.map(A=>l.jsxs("span",{children:[A.label," ",A.value,"%"]},A.label))}),l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:l.jsx("div",{className:F("h-full rounded-full transition-all",T>50?"bg-emerald-500":T>20?"bg-amber-500":"bg-red-500"),style:{width:`${T}%`}})})]}):l.jsxs("div",{className:"space-y-1.5 cursor-help",children:[l.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:RD(r)?l.jsxs(l.Fragment,{children:[l.jsx(Wr,{className:"w-3 h-3 text-emerald-500"}),l.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["Active ·"," ",Dy(r)]})]}):r?l.jsxs(l.Fragment,{children:[l.jsx(ko,{className:"w-3 h-3 text-muted-foreground"}),l.jsxs("span",{className:"text-muted-foreground",children:["Last used"," ",Dy(r)]})]}):l.jsxs(l.Fragment,{children:[l.jsx(zg,{className:"w-3 h-3 text-muted-foreground"}),l.jsx("span",{className:"text-muted-foreground",children:h("accountCardStats.notUsedYet")})]})}),N.length>0?l.jsx("div",{className:"space-y-1.5",children:N.map(A=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"w-10 text-[10px] text-muted-foreground",children:A.label}),l.jsx(qd,{value:Math.max(0,Math.min(100,A.value)),className:"h-2 flex-1",indicatorClassName:Ny(A.value)}),l.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[A.value,"%"]})]},A.label))}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(qd,{value:Math.max(0,Math.min(100,T)),className:"h-2 flex-1",indicatorClassName:Ny(T)}),l.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[C,"%"]})]})]})}),l.jsx(ka,{side:c==="compact"?"top":"bottom",className:"sm:max-w-sm",children:l.jsx(Fd,{quota:a,resetTime:b})})]})})});if(a?.success)return c==="compact"?l.jsx("div",{className:F("text-[8px] text-muted-foreground/60",d),children:h("accountCard.quotaUnavailable")}):l.jsx("div",{className:d,children:l.jsxs(zt,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-muted-foreground/50 text-muted-foreground",children:[l.jsx(zg,{className:"w-3 h-3"}),h("accountCard.quotaUnavailable")]})});if(!k)return null;const D=k.tone==="warning"?"text-amber-600 dark:text-amber-400 border-amber-500/50":k.tone==="destructive"?"text-destructive border-destructive/50":"text-muted-foreground/70 border-muted-foreground/50";return l.jsx(Pi,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:c==="compact"?l.jsxs("div",{className:F("flex items-center gap-1 text-[8px]",D,d),children:[l.jsx(M,{className:"w-2.5 h-2.5"}),l.jsx("span",{children:k.label})]}):l.jsx("div",{className:d,children:l.jsxs(zt,{variant:"outline",className:F("text-[10px] h-5 px-2 gap-1",D),children:[l.jsx(M,{className:"w-3 h-3"}),k.label]})})}),l.jsx(ka,{side:c==="compact"?"top":"bottom",className:"sm:max-w-sm",children:l.jsx(Fd,{quota:a,resetTime:b})})]})})}function ID(n){return n==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":n==="personal"?"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300":"bg-muted text-muted-foreground"}function _D(n){return n==="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"}function UD(n,a){return n==="business"?a("accountSurfaceCard.business"):n==="personal"?a("accountSurfaceCard.personal"):"?"}function zD(n,a){if(a&&"entitlement"in a){const o=a.entitlement?.normalizedTier;if(o&&o!=="unknown")return o}return n}function HD({mode:n,provider:a,accountId:o,email:r,displayEmail:c,tokenFile:d,tier:h,isDefault:p,paused:m,privacyMode:g,showQuota:v,quota:b,quotaLoading:C,runtimeLastUsed:T,beforeIdentity:k,headerEnd:M,compactMetaBadges:L,bodySlot:E,footerSlot:N,quotaInsetClassName:D,className:A}){const{t:P}=fe(),w=Ah(o,r,d),O=c||w.email||o,B=a.toLowerCase(),_=zD(h,b),K=(B==="agy"||B==="antigravity"||B==="gemini")&&_&&_!=="unknown"&&_!=="free",J=n==="compact",$=l.jsxs(l.Fragment,{children:[K&&l.jsx("span",{className:F("text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0",_D(_)),children:_}),w.audienceLabel&&l.jsx("span",{title:w.audienceLabel,className:F("text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0",w.audience==="business"?"bg-sky-500/15 text-sky-700 dark:bg-sky-500/25 dark:text-sky-300":"bg-emerald-500/15 text-emerald-700 dark:bg-emerald-500/25 dark:text-emerald-300"),children:UD(w.audience,P)}),m&&l.jsx("span",{className:"text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0 bg-amber-500/15 text-amber-700 dark:bg-amber-500/25 dark:text-amber-300",children:"Paused"})]});return l.jsxs("div",{className:F("flex flex-col gap-2",A),children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:F("flex min-w-0 flex-1",J?"gap-2":"gap-3"),children:[k,!J&&l.jsxs("div",{className:"relative shrink-0",children:[l.jsx("div",{className:F("flex items-center justify-center w-8 h-8 rounded-full",p?"bg-primary/10":"bg-muted"),children:l.jsx(Fb,{className:"w-4 h-4"})}),K&&l.jsx("span",{className:F("absolute -bottom-0.5 -right-0.5 text-[7px] font-bold uppercase px-1 py-px rounded ring-1 ring-background",_==="ultra"?"bg-violet-500/20 text-violet-600 dark:bg-violet-500/30 dark:text-violet-300":"bg-yellow-500/20 text-yellow-700 dark:bg-yellow-500/25 dark:text-yellow-400"),children:_==="ultra"?"U":"P"})]}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:F("flex items-center min-w-0",J?"gap-1.5":"gap-2 flex-wrap"),children:[l.jsx("span",{title:O,className:F(J?"flex-1 min-w-0 text-xs font-semibold tracking-tight truncate leading-none":"font-medium text-sm truncate",g&&ox),children:O}),J&&(L??$),!J&&w.audienceLabel&&l.jsx(zt,{variant:"outline",className:F("text-[10px] h-4 px-1.5 border-transparent",ID(w.audience)),children:w.audienceLabel}),!J&&w.detailLabel&&l.jsx(zt,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:w.detailLabel}),!J&&p&&l.jsxs(zt,{variant:"secondary",className:"text-[10px] h-4 px-1.5 gap-0.5",children:[l.jsx(BS,{className:"w-2.5 h-2.5 fill-current"}),"Default"]}),!J&&m&&l.jsxs(zt,{variant:"outline",className:"text-[10px] h-4 px-1.5 border-yellow-500 text-yellow-600",children:[l.jsx(Kb,{className:"w-2 h-2 mr-0.5"}),"Paused"]})]}),E&&l.jsx("div",{className:"mt-1",children:E})]})]}),M&&l.jsx("div",{className:F("flex items-center shrink-0",J?"gap-0.5":"gap-1"),children:M})]}),N,v&&l.jsx(OD,{provider:a,quota:b,quotaLoading:C,runtimeLastUsed:T,mode:n,className:D})]})}async function BD(){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 FD(){const n=await fetch("/api/cliproxy/status");if(!n.ok)throw new Error("Failed to fetch status");return n.json()}function qD(){return Nt({queryKey:["cliproxy-status"],queryFn:FD,refetchInterval:1e4,retry:1})}function KD(n=!0){return Nt({queryKey:["cliproxy-stats"],queryFn:BD,enabled:n,refetchInterval:5e3,retry:1,staleTime:3e3})}async function GD(){const n=await fetch("/api/cliproxy/error-logs");if(!n.ok){const o=await n.json();throw new Error(o.message||"Failed to fetch error logs")}return(await n.json()).files??[]}async function VD(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 YD(n=!0){return Nt({queryKey:["cliproxy-error-logs"],queryFn:GD,enabled:n,refetchInterval:3e4,retry:1,staleTime:1e4})}function WD(n){return Nt({queryKey:["cliproxy-error-log-content",n],queryFn:()=>n?VD(n):Promise.resolve(""),enabled:!!n,staleTime:6e4})}const xx=["agy","codex","claude","gemini","ghcp"],QD={antigravity:"agy",anthropic:"claude","gemini-cli":"gemini",copilot:"ghcp","github-copilot":"ghcp"};function vx(n){const a=n.trim().toLowerCase();return a?xx.includes(a)?a:QD[a]??null:null}async function Ty(n,a){const o=await fetch(`/api/cliproxy/quota/${n}/${encodeURIComponent(a)}`);if(!o.ok){let r="Failed to fetch quota";try{r=(await o.json()).message||r}catch{}throw new Error(r)}return o.json()}async function $D(n){const a=await fetch(`/api/cliproxy/quota/codex/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch Codex quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}async function XD(n){const a=await fetch(`/api/cliproxy/quota/claude/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch Claude quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}async function ZD(n){const a=await fetch(`/api/cliproxy/quota/gemini/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch Gemini quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}async function JD(n){const a=await fetch(`/api/cliproxy/quota/ghcp/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch GitHub Copilot quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}function Cx(n,a,o=!0){const r=vx(n);return{queryKey:["account-quota",r??n,a],queryFn:()=>eT(r??n,a),enabled:o&&!!r&&!!a,staleTime:6e4,refetchInterval:6e4,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:1}}async function eT(n,a){const o=vx(n);if(!o)return Ty(n,a);switch(o){case"codex":return $D(a);case"claude":return XD(a);case"gemini":return ZD(a);case"ghcp":return JD(a);default:return Ty(n,a)}}function tT(n,a,o=!0){return Nt(Cx(n,a,o))}function nT(n,a=!0){return AS({queries:n.map(o=>Cx(o.provider,o.accountId,a))})}function aT({success:n,failure:a,showDetails:o}){const{t:r}=fe(),c=n+a,d=c>0?n/c*100:100;return l.jsxs("div",{className:"mt-2 space-y-2",children:[l.jsxs("div",{className:"flex items-end justify-between px-0.5",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:r("authMonitorLive.successRate")}),l.jsxs("span",{className:F("text-sm font-mono font-bold leading-none mt-0.5",d===100?"text-emerald-600 dark:text-emerald-400":d>=90?"text-amber-500":"text-red-500"),children:[Math.round(d),"%"]})]}),l.jsxs("div",{className:"flex flex-col items-end",children:[l.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:"Volume"}),l.jsx("span",{className:"text-xs font-mono font-medium text-foreground/80 leading-none mt-0.5",children:c.toLocaleString()})]})]}),l.jsxs("div",{className:F("grid grid-cols-2 gap-2 overflow-hidden transition-all duration-300 ease-in-out",o?"max-h-20 opacity-100 mt-2":"max-h-0 opacity-0 mt-0"),children:[l.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:[l.jsx(Wr,{className:"w-2.5 h-2.5 text-emerald-600 dark:text-emerald-400"}),l.jsx("span",{className:"text-[10px] font-mono font-bold text-emerald-600 dark:text-emerald-400",children:n})]}),l.jsxs("div",{className:F("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:[l.jsx(nh,{className:F("w-2.5 h-2.5",a>0?"text-red-500":"text-muted-foreground")}),l.jsx("span",{className:F("text-[10px] font-mono font-bold",a>0?"text-red-500":"text-muted-foreground"),children:a})]})]})]})}const iT=["antigravity","anthropic","gemini-cli","copilot","github-copilot"],oT={left:"border-l-2",right:"border-r-2",top:"border-t-2",bottom:"border-b-2"},rT={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 sT(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 lT(n){return n>50?"bg-emerald-500":n>20?"bg-amber-500":"bg-red-500"}function Sx(n,a){return n==="business"?"Biz":n==="personal"?"Pers":a?.trim()?.[0]?.toUpperCase()??"?"}function cT(n){const a=new Set(n.map(o=>o.audience));if(a.size===2&&a.has("business")&&a.has("personal"))return"B|P";if(n.length===1){const[o]=n;return Sx(o.audience,o.audienceLabel??o.detailLabel??null)}return null}function uT({account:n,zone:a,originalIndex:o,isHovered:r,isDragging:c,offset:d,showDetails:h,privacyMode:p,onMouseEnter:m,onMouseLeave:g,onPointerDown:v,onPointerMove:b,onPointerUp:C,onPauseToggle:T,isPausingAccount:k}){const{t:M}=fe(),L=oT[a],E=sT(a,n.color),N=rT[a],D=n.provider.toLowerCase(),A=xx.includes(D)||iT.includes(D),P=(n.variants?.length??0)>1,{data:w,isLoading:O}=tT(D,n.id,A&&!P),B=nT((n.variants??[]).map(te=>({provider:n.provider,accountId:te.id})),A&&P),_=P?Array.from(new Map((n.variants??[]).slice().sort((te,Se)=>{const U={business:0,personal:1,unknown:2};return U[te.audience]-U[Se.audience]}).map(te=>[te.audienceLabel??te.detailLabel??te.id,te])).values()):[],K=cT(_),J=P?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"inline-flex shrink-0 items-center overflow-hidden rounded-md border border-border/60 bg-muted/60 shadow-sm shadow-black/5 dark:bg-zinc-900/80",title:_.map(te=>te.audienceLabel??te.detailLabel??M("accountSurfaceCard.variant")).join(" • "),children:K?l.jsx("span",{className:"inline-flex min-w-[2.2rem] items-center justify-center px-1.5 py-1 text-[9px] font-semibold leading-none text-foreground/80",children:K}):_.map((te,Se)=>l.jsx("span",{className:F("inline-flex min-w-[1.9rem] items-center justify-center px-1.5 py-1 text-[9px] font-semibold leading-none",Se>0&&"border-l border-border/50",te.audience==="business"?"bg-sky-500/12 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300":te.audience==="personal"?"bg-emerald-500/12 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-300":"bg-muted text-muted-foreground"),children:Sx(te.audience,te.audienceLabel??te.detailLabel??null)},te.id))}),n.paused&&l.jsx("span",{className:"text-[7px] font-bold uppercase tracking-wide px-1 py-px rounded shrink-0 bg-amber-500/15 text-amber-700 dark:bg-amber-500/25 dark:text-amber-300",children:"Paused"})]}):void 0,$=P&&A?(n.variants??[]).map((te,Se)=>{const U=B[Se],Z=U?.data,ne=lx(n.provider,Z),W=cx(n.provider,Z),oe=ne!==null?sh(ne):null,ue=oe!==null?Number(oe):null,pe=hh(Z),X=te.audienceLabel??te.detailLabel??Bd(te.email);return l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs("div",{className:"space-y-0.5 cursor-help",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 text-[8px]",children:[l.jsx("span",{className:"text-muted-foreground/80 truncate",children:X}),l.jsx("span",{className:"font-mono text-foreground/80 shrink-0",children:U?.isLoading?M("accountCard.quotaLoading"):ue!==null?`${oe}%`:pe?.label||M("accountCard.quotaUnavailable")})]}),ue!==null&&l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:l.jsx("div",{className:F("h-full rounded-full transition-all",lT(ue)),style:{width:`${ue}%`}})})]})}),l.jsx(ka,{side:"top",className:"sm:max-w-sm",children:l.jsx(Fd,{quota:Z,resetTime:W})})]},te.id)}):null,be=l.jsxs(l.Fragment,{children:[T&&l.jsx(Pi,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(rt,{variant:"ghost",size:"icon",className:F("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:te=>{te.stopPropagation(),T(n.memberIds??[n.id],!n.paused)},disabled:k,children:k?l.jsx(An,{className:"w-2.5 h-2.5 animate-spin"}):n.paused?l.jsx(FS,{className:"w-2.5 h-2.5 text-amber-600 dark:text-amber-400"}):l.jsx(Kb,{className:"w-2.5 h-2.5 text-muted-foreground/50 hover:text-foreground"})})}),l.jsx(ka,{side:"top",className:"text-xs",children:n.paused?M("accountCard.resumeAccount"):M("accountCard.pauseAccount")})]})}),l.jsx(Rl,{className:"w-4 h-4 text-muted-foreground/40 shrink-0"})]});return l.jsxs("div",{"data-account-index":o,"data-zone":a,onMouseEnter:m,onMouseLeave:g,onPointerDown:v,onPointerMove:b,onPointerUp:C,onPointerCancel:C,className:F("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]",L,"select-none touch-none",r&&"bg-muted/50 dark:bg-zinc-800/60",c&&"cursor-grabbing shadow-xl scale-105 z-50",n.paused&&"opacity-60"),style:{...E,transform:`translate(${d.x}px, ${d.y}px)${c?" scale(1.05)":""}`},children:[l.jsx(HD,{mode:"compact",provider:n.provider,accountId:n.id,email:n.email,displayEmail:Bd(n.email),tokenFile:n.tokenFile,tier:n.tier,isDefault:n.isDefault,paused:n.paused,privacyMode:p,showQuota:A&&!P,quota:w,quotaLoading:O,runtimeLastUsed:n.lastUsedAt,headerEnd:be,compactMetaBadges:J,footerSlot:l.jsxs(l.Fragment,{children:[l.jsx(aT,{success:n.successCount,failure:n.failureCount,showDetails:h}),$&&l.jsx("div",{className:"mt-2 px-0.5 space-y-1",children:$})]})}),l.jsx("div",{className:F("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",N,r&&"bg-foreground dark:bg-white border-transparent")})]})}function Nh({provider:n,className:a,size:o=18,withBackground:r=!1}){const c=n.toLowerCase(),d=fx(n),h=Ch[c]||"#6b7280",p=r?Math.floor(o*.65):o,m=d?l.jsx("img",{src:d,alt:`${n} icon`,width:p,height:p,className:"shrink-0 object-contain"}):l.jsx("span",{className:"font-bold",style:{color:h,fontSize:p*.6},children:n.charAt(0).toUpperCase()});if(r)return l.jsx("div",{className:F("shrink-0 rounded-full bg-white border border-border flex items-center justify-center shadow-sm",a),style:{width:o,height:o},children:m});if(d)return l.jsx("img",{src:d,alt:`${n} icon`,width:o,height:o,className:F("shrink-0 rounded-sm object-contain",a)});const g=h;return l.jsx("div",{className:F("shrink-0 rounded-full flex items-center justify-center text-white font-bold",a),style:{width:o,height:o,backgroundColor:g,fontSize:o*.5},children:n.charAt(0).toUpperCase()})}function dT({providerData:n,providerColor:a,totalRequests:o,maxRequests:r,showVisibleMetrics:c=!1,hiddenPausedCount:d=0,isDragging:h,offset:p,hoveredAccount:m,hasRightAccounts:g,hasTopAccounts:v,hasBottomAccounts:b,onPointerDown:C,onPointerMove:T,onPointerUp:k}){const{t:M}=fe(),{accounts:L}=n,E=Math.max(1,r*Math.max(1,L.length));return l.jsxs("div",{"data-provider-node":!0,onPointerDown:C,onPointerMove:T,onPointerUp:k,onPointerCancel:k,className:F("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]",!h&&"animate-subtle-float animate-border-glow","select-none touch-none",m!==null&&"scale-[1.02]",h&&"cursor-grabbing shadow-2xl scale-105 z-50"),style:{"--glow-color":`${a}60`,borderColor:m!==null?`${a}80`:void 0,transform:`translate(${p.x}px, ${p.y}px)${h?" scale(1.05)":""}`},children:[l.jsx(Rl,{className:"absolute top-2 right-2 w-4 h-4 text-muted-foreground/40"}),l.jsx("div",{className:"absolute inset-0 rounded-xl animate-glow-pulse pointer-events-none",style:{"--glow-color":`${a}30`}}),l.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)"}}),g&&l.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)"}}),v&&l.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)"}}),b&&l.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)"}}),l.jsxs("div",{className:"flex items-center gap-3 mb-4 relative z-10",children:[l.jsx("div",{className:"animate-icon-breathe",children:l.jsx(Nh,{provider:n.provider,size:36,withBackground:!0})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground tracking-tight",children:n.displayName}),l.jsx("p",{className:"text-[10px] text-muted-foreground font-medium uppercase",children:M("flowViz.provider")})]})]}),l.jsxs("div",{className:"space-y-2 relative z-10",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:M(c?"flowViz.visibleTotalRequests":"flowViz.totalRequests")}),l.jsx("span",{className:"text-foreground font-mono",children:o.toLocaleString()})]}),l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:M(c?"flowViz.visibleAccounts":"flowViz.accounts")}),l.jsx("span",{className:"text-foreground font-mono",children:L.length})]}),l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full mt-2 overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${Math.min(100,o/E*100)}%`,backgroundColor:a}})}),c&&d>0&&l.jsx("div",{className:"text-[10px] text-muted-foreground",children:M("flowViz.excludingPausedAccounts",{count:d})})]})]})}function hT({paths:n,accounts:a,maxRequests:o,hoveredAccount:r,pulsingAccounts:c}){return l.jsxs(l.Fragment,{children:[l.jsx("defs",{children:l.jsxs("filter",{id:"flow-glow",x:"-20%",y:"-20%",width:"140%",height:"140%",filterUnits:"userSpaceOnUse",children:[l.jsx("feGaussianBlur",{stdDeviation:"3",result:"blur"}),l.jsx("feComposite",{in:"SourceGraphic",in2:"blur",operator:"over"})]})}),n.map((d,h)=>{const p=a[h];if(!p)return null;const m=p.successCount+p.failureCount,g=Math.max(2,m/o*10),v=r===h,b=r!==null&&r!==h,C=c.has(p.id),T=dD(h);return l.jsxs("g",{children:[l.jsx("path",{d,fill:"none",stroke:T,strokeWidth:g,strokeOpacity:v?.8:b?.15:.4,strokeLinecap:"round",filter:v?"url(#flow-glow)":void 0,className:"transition-all duration-300"}),C&&l.jsxs(l.Fragment,{children:[l.jsx("path",{d,fill:"none",stroke:p.color,strokeWidth:g*2,strokeLinecap:"round",filter:"url(#flow-glow)",className:"animate-request-pulse"}),l.jsx("circle",{r:6,fill:p.color,filter:"url(#flow-glow)",style:{offsetPath:`path('${d}')`,offsetDistance:"0%",animation:"travel-dot 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards"}})]})]},h)})]})}function fT({onBack:n,showDetails:a,onToggleDetails:o,showPausedAccounts:r,pausedAccountsCount:c,onTogglePausedAccounts:d,hasCustomPositions:h,onResetPositions:p}){const{t:m}=fe();return l.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",children:[n?l.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:[l.jsx(El,{className:"w-3.5 h-3.5 rotate-180 transition-transform group-hover:-translate-x-0.5"}),l.jsx("span",{children:m("flowViz.backToProviders")})]}):l.jsx("div",{}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:o,className:F("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?l.jsx(Vr,{className:"w-3.5 h-3.5"}):l.jsx(Yr,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:m(a?"flowViz.hideDetails":"flowViz.showDetails")})]}),c>0&&l.jsxs("button",{onClick:d,className:F("flex items-center gap-1.5 text-xs font-medium transition-all duration-200 px-3 py-1.5 rounded-md border shadow-sm",r?"bg-background text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-muted/50":"bg-amber-500/15 text-amber-700 border-amber-500/40 hover:bg-amber-500/20 dark:bg-amber-500/20 dark:text-amber-300 dark:border-amber-500/30"),children:[l.jsx(qS,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:r?m("flowViz.hidePausedAccounts",{count:c}):m("flowViz.showPausedAccounts",{count:c})})]}),h&&l.jsxs("button",{onClick:p,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:[l.jsx(KS,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:m("flowViz.resetLayout")})]})]})]})}const Py="ccs-auth-monitor-show-paused";function pT({providerData:n,onBack:a,onPauseToggle:o,isPausingAccount:r}){const c=S.useRef(null),d=S.useRef(null),[h,p]=S.useState(null),[m,g]=S.useState(!1),[v,b]=S.useState(()=>{if(typeof window<"u"){const we=localStorage.getItem(Py);return we!==null?we==="true":!0}return!0}),[C,T]=S.useState([]),{privacyMode:k}=oh(),{accounts:M}=n,L=S.useMemo(()=>M.filter(we=>we.paused).length,[M]),E=S.useMemo(()=>v?M:M.filter(we=>!we.paused),[M,v]),N=S.useMemo(()=>new Set(E.map(we=>we.id)),[E]),D=Math.max(...E.map(we=>we.successCount+we.failureCount),1),A=E.reduce((we,Re)=>we+Re.successCount+Re.failureCount,0),P=S.useMemo(()=>({...n,accounts:E,totalRequests:A}),[n,E,A]),w=S.useCallback(()=>{const we=pD({containerRef:c,svgRef:d,accounts:E});T(we)},[E]),O=`ccs-flow-positions-${n.provider}`,{dragOffsets:B,draggingId:_,handlePointerDown:K,handlePointerMove:J,handlePointerUp:$,getOffset:be,resetPositions:te,hasCustomPositions:Se}=yD({storageKey:O,onDrag:w}),U=S.useMemo(()=>Object.fromEntries(Object.entries(B).filter(([we])=>we==="provider"||N.has(we))),[B,N]),Z=bD(U),ne=Object.keys(U).length>0,W=xD(E),oe=S.useMemo(()=>fD(E).slice(0,uD),[E]);S.useEffect(()=>{const we=setTimeout(w,50);return window.addEventListener("resize",w),()=>{clearTimeout(we),window.removeEventListener("resize",w)}},[w]),S.useEffect(()=>{const we=setTimeout(w,10);return()=>clearTimeout(we)},[B,w]),S.useEffect(()=>{const we=Date.now(),Re=350,Ve=()=>{w(),Date.now()-we<Re&&requestAnimationFrame(Ve)};requestAnimationFrame(Ve)},[m,w]);const ue=Ch[n.provider.toLowerCase()]||"#6b7280",pe=S.useMemo(()=>mD(E),[E]),{leftAccounts:X,rightAccounts:ae,topAccounts:de,bottomAccounts:ie}=pe,se=ae.length>0,xe=de.length>0,Pe=ie.length>0,ze=S.useMemo(()=>gD(E.length),[E.length]),Ze=(we,Re)=>we.map(Ve=>{const Tt=E.findIndex(Et=>Et.id===Ve.id);return l.jsx(uT,{account:Ve,zone:Re,originalIndex:Tt,isHovered:h===Tt,isDragging:_===Ve.id,offset:be(Ve.id),showDetails:m,privacyMode:k,onMouseEnter:()=>p(Tt),onMouseLeave:()=>p(null),onPointerDown:Et=>K(Ve.id,Et),onPointerMove:J,onPointerUp:$,onPauseToggle:o,isPausingAccount:r},Ve.id)});return l.jsxs("div",{className:"flex flex-col",ref:c,children:[l.jsx(fT,{onBack:a,showDetails:m,onToggleDetails:()=>g(!m),showPausedAccounts:v,pausedAccountsCount:L,onTogglePausedAccounts:()=>{p(null);const we=!v;b(we),typeof window<"u"&&localStorage.setItem(Py,String(we))},hasCustomPositions:Se&&ne,onResetPositions:te}),l.jsxs("div",{className:"min-h-[320px] flex gap-4 px-4 py-6 self-stretch items-stretch transition-all duration-200",children:[l.jsxs("div",{className:"relative flex-1 flex flex-col items-stretch justify-center px-4",style:{paddingTop:`${24+Z.paddingTop}px`,paddingBottom:`${24+Z.paddingBottom}px`,minHeight:`${320+Z.extraHeight}px`},children:[l.jsx("svg",{ref:d,className:"absolute inset-0 w-full h-full pointer-events-none z-0 overflow-visible",children:l.jsx(hT,{paths:C,accounts:E,maxRequests:D,hoveredAccount:h,pulsingAccounts:W})}),xe&&l.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mb-8",children:Ze(de,"top")}),l.jsxs("div",{className:"flex items-center justify-between gap-8 flex-1",children:[l.jsx("div",{className:"flex flex-col gap-3 z-10 w-48 justify-center flex-shrink-0",children:Ze(X,"left")}),l.jsx("div",{className:F("z-10 flex items-center flex-shrink-0",ze),children:l.jsx(dT,{providerData:P,providerColor:ue,totalRequests:A,maxRequests:D,showVisibleMetrics:!v&&L>0,hiddenPausedCount:v?0:L,isDragging:_==="provider",offset:be("provider"),hoveredAccount:h,hasRightAccounts:se,hasTopAccounts:xe,hasBottomAccounts:Pe,onPointerDown:we=>K("provider",we),onPointerMove:J,onPointerUp:$})}),se&&l.jsx("div",{className:"flex flex-col gap-3 z-10 w-48 justify-center flex-shrink-0",children:Ze(ae,"right")})]}),Pe&&l.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mt-8",children:Ze(ie,"bottom")})]}),l.jsx("div",{className:"w-56 flex-shrink-0 self-stretch relative",children:l.jsx("div",{className:"absolute inset-0",children:l.jsx(vD,{events:oe,privacyMode:k})})})]})]})}function mT(n,a){return`${n.trim().toLowerCase()}:${a.trim()}`}function gT(n,a){const o=Array.from(new Set([a.id,a.email].filter(r=>!!r?.trim())));for(const r of o){const c=mT(a.provider,r),d=n?.accountStats?.[c]??n?.accountStats?.[r];if(d)return d}}const My={business:0,personal:1,unknown:2};function yT(n,a){return a?n?new Date(a).getTime()>new Date(n).getTime()?a:n:a:n}function bT(n,a){const o=Ah(n.id,n.email,n.tokenFile),r=gT(a,n);return{id:n.id,email:o.email||n.email||n.id,tokenFile:n.tokenFile,isDefault:n.isDefault,successCount:r?.successCount??0,failureCount:r?.failureCount??0,lastUsedAt:r?.lastUsedAt??n.lastUsedAt,paused:n.paused,tier:n.tier,audience:o.audience,audienceLabel:o.audienceLabel,detailLabel:o.detailLabel}}function xT(n){return[...n].sort((a,o)=>{const r=My[a.audience]-My[o.audience];if(r!==0)return r;const c=a.audienceLabel??a.detailLabel??a.id,d=o.audienceLabel??o.detailLabel??o.id;return c.localeCompare(d)})}function vT(n,a){const o=new Map,r=new Map;for(const c of n){const d=bT(c,a),p=c.provider.toLowerCase()==="codex"?`${c.provider}:${d.email}`:c.id;o.has(p)||o.set(p,[]),o.get(p)?.push(d),r.set(c.id,c)}return Array.from(o.entries()).map(([c,d])=>{if(d.length===1){const[g]=d,v=r.get(g.id);return{id:g.id,email:g.email,tokenFile:g.tokenFile,provider:v?.provider??"codex",isDefault:g.isDefault,successCount:g.successCount,failureCount:g.failureCount,lastUsedAt:g.lastUsedAt,paused:g.paused,tier:g.tier,projectId:v?.projectId}}const h=xT(d),p=h[0]?.email??c,m=r.get(h[0]?.id??"")?.provider??"codex";return{id:c,email:p,tokenFile:h[0]?.tokenFile??"",provider:m,isDefault:h.some(g=>g.isDefault),successCount:h.reduce((g,v)=>g+v.successCount,0),failureCount:h.reduce((g,v)=>g+v.failureCount,0),lastUsedAt:h.reduce((g,v)=>yT(g,v.lastUsedAt),void 0),paused:h.every(g=>!!g.paused),memberIds:h.map(g=>g.id),variants:h}})}function wx(n,a){const o=n+a;return o===0?100:Math.round(n/o*100)}const jy=["#1e6091","#2d8a6e","#d4a012","#c92a2d","#c45a1a","#6b9c4d","#3d5a73","#cc7614","#3a7371","#7c5fc4"];function CT(){const{data:n,isLoading:a,error:o}=ZA(),{data:r,isLoading:c,dataUpdatedAt:d}=KD(),[h,p]=S.useState("");S.useEffect(()=>{if(!d)return;const k=()=>{const L=Math.floor((Date.now()-d)/1e3);L<60?p(`${L}s ago`):p(`${Math.floor(L/60)}m ago`)};k();const M=setInterval(k,1e3);return()=>clearInterval(M)},[d]);const{accounts:m,totalSuccess:g,totalFailure:v,totalRequests:b,providerStats:C}=S.useMemo(()=>{if(!n?.authStatus)return{accounts:[],totalSuccess:0,totalFailure:0,totalRequests:0,providerStats:[]};const k=[],M=new Map;let L=0,E=0,N=0;n.authStatus.forEach(A=>{const P=A.provider;M.has(P)||M.set(P,{success:0,failure:0,accounts:[]});const w=M.get(P);if(!w)return;const O=(A.accounts??[]).map(B=>({...B,provider:B.provider||A.provider}));vT(O,r).forEach(B=>{L+=B.successCount,E+=B.failureCount,w.success+=B.successCount,w.failure+=B.failureCount;const _={id:B.id,email:B.email,tokenFile:B.tokenFile,provider:A.provider,displayName:A.displayName,isDefault:B.isDefault,successCount:B.successCount,failureCount:B.failureCount,lastUsedAt:B.lastUsedAt,color:jy[N%jy.length],projectId:B.projectId,paused:B.paused,tier:B.tier,memberIds:B.memberIds,variants:B.variants};k.push(_),w.accounts.push(_),N++})});const D=[];return M.forEach((A,P)=>{A.accounts.length!==0&&D.push({provider:P,displayName:Sh(P),totalRequests:A.success+A.failure,successCount:A.success,failureCount:A.failure,accountCount:A.accounts.length,accounts:A.accounts})}),D.sort((A,P)=>P.totalRequests-A.totalRequests),{accounts:k,totalSuccess:L,totalFailure:E,totalRequests:L+E,providerStats:D}},[n?.authStatus,r]),T=b>0?Math.round(g/b*100):100;return{accounts:m,totalSuccess:g,totalFailure:v,totalRequests:b,providerStats:C,overallSuccessRate:T,isLoading:a||c,error:o??null,timeSinceUpdate:h}}function ST(){return l.jsxs("div",{className:"relative flex items-center justify-center w-5 h-5",children:[l.jsx("div",{className:"absolute w-4 h-4 rounded-full animate-ping opacity-20",style:{backgroundColor:Zt.success}}),l.jsx("div",{className:"absolute w-3 h-3 rounded-full animate-pulse opacity-40",style:{backgroundColor:Zt.success}}),l.jsx("div",{className:"relative w-2 h-2 rounded-full z-10",style:{backgroundColor:Zt.success}})]})}function wT({success:n,failure:a}){const{t:o}=fe();return n===0&&a===0?l.jsx("span",{className:"text-[9px] text-muted-foreground/50 font-mono",children:o("authMonitorLive.noActivity")}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex items-center gap-0.5",children:[l.jsx(Wr,{className:"w-3 h-3 text-emerald-700 dark:text-emerald-500"}),l.jsx("span",{className:"text-[10px] font-mono font-medium text-emerald-700 dark:text-emerald-500",children:n.toLocaleString()})]}),a>0&&l.jsxs("div",{className:"flex items-center gap-0.5",children:[l.jsx(nh,{className:"w-3 h-3 text-red-700 dark:text-red-500"}),l.jsx("span",{className:"text-[10px] font-mono font-medium text-red-700 dark:text-red-500",children:a.toLocaleString()})]})]})}function kT({stats:n,isHovered:a,privacyMode:o,onSelect:r,onMouseEnter:c,onMouseLeave:d}){const{t:h}=fe(),p=wx(n.successCount,n.failureCount),m=Ch[n.provider.toLowerCase()]||"#6b7280";return l.jsxs("button",{onClick:r,onMouseEnter:c,onMouseLeave:d,className:F("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?m:void 0,"--ring-color":m},children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx(Nh,{provider:n.provider,size:36,withBackground:!0}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground tracking-tight",children:n.displayName}),l.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[n.accountCount," account",n.accountCount!==1?"s":""]})]}),l.jsx(El,{className:F("w-4 h-4 ml-auto text-muted-foreground transition-all",a?"opacity-100 translate-x-0":"opacity-0 -translate-x-2")})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:h("authMonitorLive.stats")}),l.jsx(wT,{success:n.successCount,failure:n.failureCount})]}),l.jsxs("div",{className:"flex justify-between text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:h("authMonitorLive.successRate")}),l.jsxs("span",{className:"font-mono font-semibold",style:{color:p===100?Zt.success:p>=95?Zt.degraded:Zt.failed},children:[p,"%"]})]}),l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${p}%`,backgroundColor:m}})})]}),l.jsxs("div",{className:"flex gap-1 mt-3 items-center",children:[n.accounts.slice(0,5).map(g=>{const v=n.provider==="agy"&&!g.projectId;return l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:F("w-2 h-2 rounded-full",g.paused&&"opacity-50"),style:{backgroundColor:g.color},title:o?"••••••":DD(g.id,g.email,g.tokenFile)}),v&&l.jsx(Pi,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(Gn,{className:"absolute -top-1 -right-1 w-2.5 h-2.5 text-amber-500","aria-label":h("providerCard.missingProjectIdAria")})}),l.jsx(ka,{side:"top",className:"text-xs",children:"Missing Project ID - re-add account to fix"})]})})]},g.id)}),n.accounts.length>5&&l.jsxs("span",{className:"text-[10px] text-muted-foreground ml-1",children:["+",n.accounts.length-5]})]})]})}function pl({icon:n,label:a,value:o,color:r}){return l.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:[l.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center",style:{backgroundColor:r?`${r}15`:"var(--muted)",color:r||"var(--muted-foreground)"},children:n}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:a}),l.jsx("div",{className:"text-lg font-semibold font-mono leading-tight",style:{color:r||"var(--foreground)"},children:o})]})]})}const yd="auth-monitor-selected-provider";function AT(){const{t:n}=fe(),{accounts:a,totalSuccess:o,totalFailure:r,totalRequests:c,providerStats:d,overallSuccessRate:h,isLoading:p,error:m,timeSinceUpdate:g}=CT(),{privacyMode:v}=oh(),[b,C]=S.useState(()=>typeof window<"u"?localStorage.getItem(yd):null),T=$=>{C($),$?localStorage.setItem(yd,$):localStorage.removeItem(yd)},k=S.useMemo(()=>b&&d.some($=>$.provider===b)?b:null,[b,d]),[M,L]=S.useState(null),E=JA(),N=eN(),D=tN(),A=nN(),P=k?d.find($=>$.provider===k):null,w=P?.accountCount??a.length,O=P?.successCount??o,B=P?.failureCount??r,_=P?.totalRequests??c,K=P?wx(P.successCount,P.failureCount):h,J=($,be)=>{if(!k||E.isPending||N.isPending||D.isPending||A.isPending)return;if($.length>1){be?D.mutate({provider:k,accountIds:$}):A.mutate({provider:k,accountIds:$});return}const[te]=$;te&&(be?E.mutate({provider:k,accountId:te}):N.mutate({provider:k,accountId:te}))};return p?l.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:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[l.jsx($e,{className:"h-4 w-32"}),l.jsx($e,{className:"h-4 w-20"})]}),l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsx("div",{className:"flex gap-3",children:[1,2,3,4].map($=>l.jsx($e,{className:"h-16 flex-1 rounded-lg"},$))}),l.jsx($e,{className:"h-48 w-full rounded-lg"})]})]}):m||a.length===0?null:l.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:[l.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:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ST,{}),l.jsx("span",{className:"text-xs font-semibold tracking-tight text-foreground",children:n("authMonitorLive.live")}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:n("authMonitorLive.accountMonitor")})]}),l.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(GS,{className:"w-3 h-3 animate-pulse"}),l.jsx("span",{children:g?n("authMonitorLive.updated",{time:g}):n("authMonitorLive.updatedNow")})]}),l.jsx("span",{className:"text-muted-foreground/50",children:"|"}),l.jsx("span",{children:n("authMonitor.accountsCount",{count:w})}),l.jsxs("span",{className:"font-mono",children:[_.toLocaleString()," ",n("authMonitorLive.requestsLabel")]})]})]}),l.jsxs("div",{className:"grid grid-cols-4 gap-3 p-4 border-b border-border bg-muted/20 dark:bg-zinc-900/30",children:[l.jsx(pl,{icon:l.jsx(zr,{className:"w-4 h-4"}),label:n("authMonitor.accounts"),value:w,color:"var(--accent)"}),l.jsx(pl,{icon:l.jsx(Wr,{className:"w-4 h-4"}),label:n("authMonitor.success"),value:O.toLocaleString(),color:Zt.success}),l.jsx(pl,{icon:l.jsx(nh,{className:"w-4 h-4"}),label:n("authMonitor.failed"),value:B.toLocaleString(),color:B>0?Zt.failed:void 0}),l.jsx(pl,{icon:l.jsx(zr,{className:"w-4 h-4"}),label:n("authMonitor.successRate"),value:`${K}%`,color:K===100?Zt.success:K>=95?Zt.degraded:Zt.failed})]}),l.jsx("div",{className:"relative overflow-hidden",children:P?l.jsx(pT,{providerData:P,onBack:()=>T(null),onPauseToggle:J,isPausingAccount:E.isPending||N.isPending||D.isPending||A.isPending}):l.jsxs("div",{className:"p-6",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-widest mb-4",children:"Request Distribution by Provider"}),l.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-4",children:d.map($=>l.jsx(kT,{stats:$,isHovered:M===$.provider,privacyMode:v,onSelect:()=>T($.provider),onMouseEnter:()=>L($.provider),onMouseLeave:()=>L(null)},$.provider))})]})})]})}const Kl=S.createContext(null);Kl.displayName="PanelGroupContext";const yt={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"},Dh=10,Ni=S.useLayoutEffect,Ey=vS.useId,NT=typeof Ey=="function"?Ey:()=>null;let DT=0;function Th(n=null){const a=NT(),o=S.useRef(n||a||null);return o.current===null&&(o.current=""+DT++),n??o.current}function kx({children:n,className:a="",collapsedSize:o,collapsible:r,defaultSize:c,forwardedRef:d,id:h,maxSize:p,minSize:m,onCollapse:g,onExpand:v,onResize:b,order:C,style:T,tagName:k="div",...M}){const L=S.useContext(Kl);if(L===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:E,expandPanel:N,getPanelSize:D,getPanelStyle:A,groupId:P,isPanelCollapsed:w,reevaluatePanelConstraints:O,registerPanel:B,resizePanel:_,unregisterPanel:K}=L,J=Th(h),$=S.useRef({callbacks:{onCollapse:g,onExpand:v,onResize:b},constraints:{collapsedSize:o,collapsible:r,defaultSize:c,maxSize:p,minSize:m},id:J,idIsFromProps:h!==void 0,order:C});S.useRef({didLogMissingDefaultSizeWarning:!1}),Ni(()=>{const{callbacks:te,constraints:Se}=$.current,U={...Se};$.current.id=J,$.current.idIsFromProps=h!==void 0,$.current.order=C,te.onCollapse=g,te.onExpand=v,te.onResize=b,Se.collapsedSize=o,Se.collapsible=r,Se.defaultSize=c,Se.maxSize=p,Se.minSize=m,(U.collapsedSize!==Se.collapsedSize||U.collapsible!==Se.collapsible||U.maxSize!==Se.maxSize||U.minSize!==Se.minSize)&&O($.current,U)}),Ni(()=>{const te=$.current;return B(te),()=>{K(te)}},[C,J,B,K]),S.useImperativeHandle(d,()=>({collapse:()=>{E($.current)},expand:te=>{N($.current,te)},getId(){return J},getSize(){return D($.current)},isCollapsed(){return w($.current)},isExpanded(){return!w($.current)},resize:te=>{_($.current,te)}}),[E,N,D,w,J,_]);const be=A($.current,c);return S.createElement(k,{...M,children:n,className:a,id:J,style:{...be,...T},[yt.groupId]:P,[yt.panel]:"",[yt.panelCollapsible]:r||void 0,[yt.panelId]:J,[yt.panelSize]:parseFloat(""+be.flexGrow).toFixed(1)})}const qr=S.forwardRef((n,a)=>S.createElement(kx,{...n,forwardedRef:a}));kx.displayName="Panel";qr.displayName="forwardRef(Panel)";let Kd=null,vl=-1,Ja=null;function TT(n,a,o){const r=(a&Px)!==0,c=(a&Mx)!==0,d=(a&jx)!==0,h=(a&Ex)!==0;if(a){if(r)return d?"se-resize":h?"ne-resize":"e-resize";if(c)return d?"sw-resize":h?"nw-resize":"w-resize";if(d)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 PT(){Ja!==null&&(document.head.removeChild(Ja),Kd=null,Ja=null,vl=-1)}function bd(n,a,o){var r,c;const d=TT(n,a);if(Kd!==d){if(Kd=d,Ja===null&&(Ja=document.createElement("style"),document.head.appendChild(Ja)),vl>=0){var h;(h=Ja.sheet)===null||h===void 0||h.removeRule(vl)}vl=(r=(c=Ja.sheet)===null||c===void 0?void 0:c.insertRule(`*{cursor: ${d} !important;}`))!==null&&r!==void 0?r:-1}}function Ax(n){return n.type==="keydown"}function Nx(n){return n.type.startsWith("pointer")}function Dx(n){return n.type.startsWith("mouse")}function Gl(n){if(Nx(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Dx(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function MT(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function jT(n,a,o){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 ET(n,a){if(n===a)throw new Error("Cannot compare node with itself");const o={a:Oy(n),b:Oy(a)};let r;for(;o.a.at(-1)===o.b.at(-1);)n=o.a.pop(),a=o.b.pop(),r=n;Ue(r,"Stacking order can only be calculated for elements with a common ancestor");const c={a:Ry(Ly(o.a)),b:Ry(Ly(o.b))};if(c.a===c.b){const d=r.childNodes,h={a:o.a.at(-1),b:o.b.at(-1)};let p=d.length;for(;p--;){const m=d[p];if(m===h.a)return 1;if(m===h.b)return-1}}return Math.sign(c.a-c.b)}const LT=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function RT(n){var a;const o=getComputedStyle((a=Tx(n))!==null&&a!==void 0?a:n).display;return o==="flex"||o==="inline-flex"}function OT(n){const a=getComputedStyle(n);return!!(a.position==="fixed"||a.zIndex!=="auto"&&(a.position!=="static"||RT(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"||LT.test(a.willChange)||a.webkitOverflowScrolling==="touch")}function Ly(n){let a=n.length;for(;a--;){const o=n[a];if(Ue(o,"Missing node"),OT(o))return o}return null}function Ry(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Oy(n){const a=[];for(;n;)a.push(n),n=Tx(n);return a}function Tx(n){const{parentNode:a}=n;return a&&a instanceof ShadowRoot?a.host:a}const Px=1,Mx=2,jx=4,Ex=8,IT=MT()==="coarse";let En=[],So=!1,ei=new Map,Vl=new Map;const Kr=new Set;function _T(n,a,o,r,c){var d;const{ownerDocument:h}=a,p={direction:o,element:a,hitAreaMargins:r,setResizeHandlerState:c},m=(d=ei.get(h))!==null&&d!==void 0?d:0;return ei.set(h,m+1),Kr.add(p),Nl(),function(){var v;Vl.delete(n),Kr.delete(p);const b=(v=ei.get(h))!==null&&v!==void 0?v:1;if(ei.set(h,b-1),Nl(),b===1&&ei.delete(h),En.includes(p)){const C=En.indexOf(p);C>=0&&En.splice(C,1),Yl(),c("up",!0,null)}}}function UT(n){const{target:a}=n,{x:o,y:r}=Gl(n);So=!0,Ph({target:a,x:o,y:r}),Nl(),En.length>0&&(Dl("down",n),Yl(),n.preventDefault(),Lx(a)||n.stopImmediatePropagation())}function xd(n){const{x:a,y:o}=Gl(n);if(So&&n.type!=="pointerleave"&&n.buttons===0&&(So=!1,Dl("up",n)),!So){const{target:r}=n;Ph({target:r,x:a,y:o})}Dl("move",n),Yl(),En.length>0&&n.preventDefault()}function vd(n){const{target:a}=n,{x:o,y:r}=Gl(n);Vl.clear(),So=!1,En.length>0&&(n.preventDefault(),Lx(a)||n.stopImmediatePropagation()),Dl("up",n),Ph({target:a,x:o,y:r}),Yl(),Nl()}function Lx(n){let a=n;for(;a;){if(a.hasAttribute(yt.resizeHandle))return!0;a=a.parentElement}return!1}function Ph({target:n,x:a,y:o}){En.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),Kr.forEach(c=>{const{element:d,hitAreaMargins:h}=c,p=d.getBoundingClientRect(),{bottom:m,left:g,right:v,top:b}=p,C=IT?h.coarse:h.fine;if(a>=g-C&&a<=v+C&&o>=b-C&&o<=m+C){if(r!==null&&document.contains(r)&&d!==r&&!d.contains(r)&&!r.contains(d)&&ET(r,d)>0){let k=r,M=!1;for(;k&&!k.contains(d);){if(jT(k.getBoundingClientRect(),p)){M=!0;break}k=k.parentElement}if(M)return}En.push(c)}})}function Cd(n,a){Vl.set(n,a)}function Yl(){let n=!1,a=!1;En.forEach(r=>{const{direction:c}=r;c==="horizontal"?n=!0:a=!0});let o=0;Vl.forEach(r=>{o|=r}),n&&a?bd("intersection",o):n?bd("horizontal",o):a?bd("vertical",o):PT()}let Sd;function Nl(){var n;(n=Sd)===null||n===void 0||n.abort(),Sd=new AbortController;const a={capture:!0,signal:Sd.signal};Kr.size&&(So?(En.length>0&&ei.forEach((o,r)=>{const{body:c}=r;o>0&&(c.addEventListener("contextmenu",vd,a),c.addEventListener("pointerleave",xd,a),c.addEventListener("pointermove",xd,a))}),ei.forEach((o,r)=>{const{body:c}=r;c.addEventListener("pointerup",vd,a),c.addEventListener("pointercancel",vd,a)})):ei.forEach((o,r)=>{const{body:c}=r;o>0&&(c.addEventListener("pointerdown",UT,a),c.addEventListener("pointermove",xd,a))}))}function Dl(n,a){Kr.forEach(o=>{const{setResizeHandlerState:r}=o,c=En.includes(o);r(n,c,a)})}function zT(){const[n,a]=S.useState(0);return S.useCallback(()=>a(o=>o+1),[])}function Ue(n,a){if(!n)throw console.error(a),Error(a)}function Mi(n,a,o=Dh){return n.toFixed(o)===a.toFixed(o)?0:n>a?1:-1}function ya(n,a,o=Dh){return Mi(n,a,o)===0}function dn(n,a,o){return Mi(n,a,o)===0}function HT(n,a,o){if(n.length!==a.length)return!1;for(let r=0;r<n.length;r++){const c=n[r],d=a[r];if(!dn(c,d,o))return!1}return!0}function vo({panelConstraints:n,panelIndex:a,size:o}){const r=n[a];Ue(r!=null,`Panel constraints not found for index ${a}`);let{collapsedSize:c=0,collapsible:d,maxSize:h=100,minSize:p=0}=r;if(Mi(o,p)<0)if(d){const m=(c+p)/2;Mi(o,m)<0?o=c:o=p}else o=p;return o=Math.min(h,o),o=parseFloat(o.toFixed(Dh)),o}function Mr({delta:n,initialLayout:a,panelConstraints:o,pivotIndices:r,prevLayout:c,trigger:d}){if(dn(n,0))return a;const h=[...a],[p,m]=r;Ue(p!=null,"Invalid first pivot index"),Ue(m!=null,"Invalid second pivot index");let g=0;if(d==="keyboard"){{const b=n<0?m:p,C=o[b];Ue(C,`Panel constraints not found for index ${b}`);const{collapsedSize:T=0,collapsible:k,minSize:M=0}=C;if(k){const L=a[b];if(Ue(L!=null,`Previous layout not found for panel index ${b}`),dn(L,T)){const E=M-L;Mi(E,Math.abs(n))>0&&(n=n<0?0-E:E)}}}{const b=n<0?p:m,C=o[b];Ue(C,`No panel constraints found for index ${b}`);const{collapsedSize:T=0,collapsible:k,minSize:M=0}=C;if(k){const L=a[b];if(Ue(L!=null,`Previous layout not found for panel index ${b}`),dn(L,M)){const E=L-T;Mi(E,Math.abs(n))>0&&(n=n<0?0-E:E)}}}}{const b=n<0?1:-1;let C=n<0?m:p,T=0;for(;;){const M=a[C];Ue(M!=null,`Previous layout not found for panel index ${C}`);const E=vo({panelConstraints:o,panelIndex:C,size:100})-M;if(T+=E,C+=b,C<0||C>=o.length)break}const k=Math.min(Math.abs(n),Math.abs(T));n=n<0?0-k:k}{let C=n<0?p:m;for(;C>=0&&C<o.length;){const T=Math.abs(n)-Math.abs(g),k=a[C];Ue(k!=null,`Previous layout not found for panel index ${C}`);const M=k-T,L=vo({panelConstraints:o,panelIndex:C,size:M});if(!dn(k,L)&&(g+=k-L,h[C]=L,g.toFixed(3).localeCompare(Math.abs(n).toFixed(3),void 0,{numeric:!0})>=0))break;n<0?C--:C++}}if(HT(c,h))return c;{const b=n<0?m:p,C=a[b];Ue(C!=null,`Previous layout not found for panel index ${b}`);const T=C+g,k=vo({panelConstraints:o,panelIndex:b,size:T});if(h[b]=k,!dn(k,T)){let M=T-k,E=n<0?m:p;for(;E>=0&&E<o.length;){const N=h[E];Ue(N!=null,`Previous layout not found for panel index ${E}`);const D=N+M,A=vo({panelConstraints:o,panelIndex:E,size:D});if(dn(N,A)||(M-=A-N,h[E]=A),dn(M,0))break;n>0?E--:E++}}}const v=h.reduce((b,C)=>C+b,0);return dn(v,100)?h:c}function BT({layout:n,panelsArray:a,pivotIndices:o}){let r=0,c=100,d=0,h=0;const p=o[0];Ue(p!=null,"No pivot index found"),a.forEach((b,C)=>{const{constraints:T}=b,{maxSize:k=100,minSize:M=0}=T;C===p?(r=M,c=k):(d+=M,h+=k)});const m=Math.min(c,100-d),g=Math.max(r,100-h),v=n[p];return{valueMax:m,valueMin:g,valueNow:v}}function Gr(n,a=document){return Array.from(a.querySelectorAll(`[${yt.resizeHandleId}][data-panel-group-id="${n}"]`))}function Rx(n,a,o=document){const c=Gr(n,o).findIndex(d=>d.getAttribute(yt.resizeHandleId)===a);return c??null}function Ox(n,a,o){const r=Rx(n,a,o);return r!=null?[r,r+1]:[-1,-1]}function FT(n){return n instanceof HTMLElement?!0:typeof n=="object"&&n!==null&&"tagName"in n&&"getAttribute"in n}function Ix(n,a=document){if(FT(a)&&a.dataset.panelGroupId==n)return a;const o=a.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return o||null}function Wl(n,a=document){const o=a.querySelector(`[${yt.resizeHandleId}="${n}"]`);return o||null}function qT(n,a,o,r=document){var c,d,h,p;const m=Wl(a,r),g=Gr(n,r),v=m?g.indexOf(m):-1,b=(c=(d=o[v])===null||d===void 0?void 0:d.id)!==null&&c!==void 0?c:null,C=(h=(p=o[v+1])===null||p===void 0?void 0:p.id)!==null&&h!==void 0?h:null;return[b,C]}function KT({committedValuesRef:n,eagerValuesRef:a,groupId:o,layout:r,panelDataArray:c,panelGroupElement:d,setLayout:h}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Ni(()=>{if(!d)return;const p=Gr(o,d);for(let m=0;m<c.length-1;m++){const{valueMax:g,valueMin:v,valueNow:b}=BT({layout:r,panelsArray:c,pivotIndices:[m,m+1]}),C=p[m];if(C!=null){const T=c[m];Ue(T,`No panel data found for index "${m}"`),C.setAttribute("aria-controls",T.id),C.setAttribute("aria-valuemax",""+Math.round(g)),C.setAttribute("aria-valuemin",""+Math.round(v)),C.setAttribute("aria-valuenow",b!=null?""+Math.round(b):"")}}return()=>{p.forEach((m,g)=>{m.removeAttribute("aria-controls"),m.removeAttribute("aria-valuemax"),m.removeAttribute("aria-valuemin"),m.removeAttribute("aria-valuenow")})}},[o,r,c,d]),S.useEffect(()=>{if(!d)return;const p=a.current;Ue(p,"Eager values not found");const{panelDataArray:m}=p,g=Ix(o,d);Ue(g!=null,`No group found for id "${o}"`);const v=Gr(o,d);Ue(v,`No resize handles found for group id "${o}"`);const b=v.map(C=>{const T=C.getAttribute(yt.resizeHandleId);Ue(T,"Resize handle element has no handle id attribute");const[k,M]=qT(o,T,m,d);if(k==null||M==null)return()=>{};const L=E=>{if(!E.defaultPrevented)switch(E.key){case"Enter":{E.preventDefault();const N=m.findIndex(D=>D.id===k);if(N>=0){const D=m[N];Ue(D,`No panel data found for index ${N}`);const A=r[N],{collapsedSize:P=0,collapsible:w,minSize:O=0}=D.constraints;if(A!=null&&w){const B=Mr({delta:dn(A,P)?O-P:P-A,initialLayout:r,panelConstraints:m.map(_=>_.constraints),pivotIndices:Ox(o,T,d),prevLayout:r,trigger:"keyboard"});r!==B&&h(B)}}break}}};return C.addEventListener("keydown",L),()=>{C.removeEventListener("keydown",L)}});return()=>{b.forEach(C=>C())}},[d,n,a,o,r,c,h])}function Iy(n,a){if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++)if(n[o]!==a[o])return!1;return!0}function _x(n,a){const o=n==="horizontal",{x:r,y:c}=Gl(a);return o?r:c}function GT(n,a,o,r,c){const d=o==="horizontal",h=Wl(a,c);Ue(h,`No resize handle element found for id "${a}"`);const p=h.getAttribute(yt.groupId);Ue(p,"Resize handle element has no group id attribute");let{initialCursorPosition:m}=r;const g=_x(o,n),v=Ix(p,c);Ue(v,`No group element found for id "${p}"`);const b=v.getBoundingClientRect(),C=d?b.width:b.height;return(g-m)/C*100}function VT(n,a,o,r,c,d){if(Ax(n)){const h=o==="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 r==null?0:GT(n,a,o,r,d)}function YT({panelDataArray:n}){const a=Array(n.length),o=n.map(d=>d.constraints);let r=0,c=100;for(let d=0;d<n.length;d++){const h=o[d];Ue(h,`Panel constraints not found for index ${d}`);const{defaultSize:p}=h;p!=null&&(r++,a[d]=p,c-=p)}for(let d=0;d<n.length;d++){const h=o[d];Ue(h,`Panel constraints not found for index ${d}`);const{defaultSize:p}=h;if(p!=null)continue;const m=n.length-r,g=c/m;r++,a[d]=g,c-=g}return a}function bo(n,a,o){a.forEach((r,c)=>{const d=n[c];Ue(d,`Panel data not found for index ${c}`);const{callbacks:h,constraints:p,id:m}=d,{collapsedSize:g=0,collapsible:v}=p,b=o[m];if(b==null||r!==b){o[m]=r;const{onCollapse:C,onExpand:T,onResize:k}=h;k&&k(r,b),v&&(C||T)&&(T&&(b==null||ya(b,g))&&!ya(r,g)&&T(),C&&(b==null||!ya(b,g))&&ya(r,g)&&C())}})}function ml(n,a){if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++)if(n[o]!=a[o])return!1;return!0}function WT({defaultSize:n,dragState:a,layout:o,panelData:r,panelIndex:c,precision:d=3}){const h=o[c];let p;return h==null?p=n!=null?n.toFixed(d):"1":r.length===1?p="1":p=h.toFixed(d),{flexBasis:0,flexGrow:p,flexShrink:1,overflow:"hidden",pointerEvents:a!==null?"none":void 0}}function QT(n,a=10){let o=null;return(...c)=>{o!==null&&clearTimeout(o),o=setTimeout(()=>{n(...c)},a)}}function _y(n){try{if(typeof localStorage<"u")n.getItem=a=>localStorage.getItem(a),n.setItem=(a,o)=>{localStorage.setItem(a,o)};else throw new Error("localStorage not supported in this environment")}catch(a){console.error(a),n.getItem=()=>null,n.setItem=()=>{}}}function Ux(n){return`react-resizable-panels:${n}`}function zx(n){return n.map(a=>{const{constraints:o,id:r,idIsFromProps:c,order:d}=a;return c?r:d?`${d}:${JSON.stringify(o)}`:JSON.stringify(o)}).sort((a,o)=>a.localeCompare(o)).join(",")}function Hx(n,a){try{const o=Ux(n),r=a.getItem(o);if(r){const c=JSON.parse(r);if(typeof c=="object"&&c!=null)return c}}catch{}return null}function $T(n,a,o){var r,c;const d=(r=Hx(n,o))!==null&&r!==void 0?r:{},h=zx(a);return(c=d[h])!==null&&c!==void 0?c:null}function XT(n,a,o,r,c){var d;const h=Ux(n),p=zx(a),m=(d=Hx(n,c))!==null&&d!==void 0?d:{};m[p]={expandToSizes:Object.fromEntries(o.entries()),layout:r};try{c.setItem(h,JSON.stringify(m))}catch(g){console.error(g)}}function Uy({layout:n,panelConstraints:a}){const o=[...n],r=o.reduce((d,h)=>d+h,0);if(o.length!==a.length)throw Error(`Invalid ${a.length} panel layout: ${o.map(d=>`${d}%`).join(", ")}`);if(!dn(r,100)&&o.length>0)for(let d=0;d<a.length;d++){const h=o[d];Ue(h!=null,`No layout data found for index ${d}`);const p=100/r*h;o[d]=p}let c=0;for(let d=0;d<a.length;d++){const h=o[d];Ue(h!=null,`No layout data found for index ${d}`);const p=vo({panelConstraints:a,panelIndex:d,size:h});h!=p&&(c+=h-p,o[d]=p)}if(!dn(c,0))for(let d=0;d<a.length;d++){const h=o[d];Ue(h!=null,`No layout data found for index ${d}`);const p=h+c,m=vo({panelConstraints:a,panelIndex:d,size:p});if(h!==m&&(c-=m-h,o[d]=m,dn(c,0)))break}return o}const ZT=100,jr={getItem:n=>(_y(jr),jr.getItem(n)),setItem:(n,a)=>{_y(jr),jr.setItem(n,a)}},zy={};function Bx({autoSaveId:n=null,children:a,className:o="",direction:r,forwardedRef:c,id:d=null,onLayout:h=null,keyboardResizeBy:p=null,storage:m=jr,style:g,tagName:v="div",...b}){const C=Th(d),T=S.useRef(null),[k,M]=S.useState(null),[L,E]=S.useState([]),N=zT(),D=S.useRef({}),A=S.useRef(new Map),P=S.useRef(0),w=S.useRef({autoSaveId:n,direction:r,dragState:k,id:C,keyboardResizeBy:p,onLayout:h,storage:m}),O=S.useRef({layout:L,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(c,()=>({getId:()=>w.current.id,getLayout:()=>{const{layout:X}=O.current;return X},setLayout:X=>{const{onLayout:ae}=w.current,{layout:de,panelDataArray:ie}=O.current,se=Uy({layout:X,panelConstraints:ie.map(xe=>xe.constraints)});Iy(de,se)||(E(se),O.current.layout=se,ae&&ae(se),bo(ie,se,D.current))}}),[]),Ni(()=>{w.current.autoSaveId=n,w.current.direction=r,w.current.dragState=k,w.current.id=C,w.current.onLayout=h,w.current.storage=m}),KT({committedValuesRef:w,eagerValuesRef:O,groupId:C,layout:L,panelDataArray:O.current.panelDataArray,setLayout:E,panelGroupElement:T.current}),S.useEffect(()=>{const{panelDataArray:X}=O.current;if(n){if(L.length===0||L.length!==X.length)return;let ae=zy[n];ae==null&&(ae=QT(XT,ZT),zy[n]=ae);const de=[...X],ie=new Map(A.current);ae(n,de,ie,L,m)}},[n,L,m]),S.useEffect(()=>{});const B=S.useCallback(X=>{const{onLayout:ae}=w.current,{layout:de,panelDataArray:ie}=O.current;if(X.constraints.collapsible){const se=ie.map(Ze=>Ze.constraints),{collapsedSize:xe=0,panelSize:Pe,pivotIndices:ze}=wi(ie,X,de);if(Ue(Pe!=null,`Panel size not found for panel "${X.id}"`),!ya(Pe,xe)){A.current.set(X.id,Pe);const we=xo(ie,X)===ie.length-1?Pe-xe:xe-Pe,Re=Mr({delta:we,initialLayout:de,panelConstraints:se,pivotIndices:ze,prevLayout:de,trigger:"imperative-api"});ml(de,Re)||(E(Re),O.current.layout=Re,ae&&ae(Re),bo(ie,Re,D.current))}}},[]),_=S.useCallback((X,ae)=>{const{onLayout:de}=w.current,{layout:ie,panelDataArray:se}=O.current;if(X.constraints.collapsible){const xe=se.map(Ve=>Ve.constraints),{collapsedSize:Pe=0,panelSize:ze=0,minSize:Ze=0,pivotIndices:we}=wi(se,X,ie),Re=ae??Ze;if(ya(ze,Pe)){const Ve=A.current.get(X.id),Tt=Ve!=null&&Ve>=Re?Ve:Re,Yn=xo(se,X)===se.length-1?ze-Tt:Tt-ze,je=Mr({delta:Yn,initialLayout:ie,panelConstraints:xe,pivotIndices:we,prevLayout:ie,trigger:"imperative-api"});ml(ie,je)||(E(je),O.current.layout=je,de&&de(je),bo(se,je,D.current))}}},[]),K=S.useCallback(X=>{const{layout:ae,panelDataArray:de}=O.current,{panelSize:ie}=wi(de,X,ae);return Ue(ie!=null,`Panel size not found for panel "${X.id}"`),ie},[]),J=S.useCallback((X,ae)=>{const{panelDataArray:de}=O.current,ie=xo(de,X);return WT({defaultSize:ae,dragState:k,layout:L,panelData:de,panelIndex:ie})},[k,L]),$=S.useCallback(X=>{const{layout:ae,panelDataArray:de}=O.current,{collapsedSize:ie=0,collapsible:se,panelSize:xe}=wi(de,X,ae);return Ue(xe!=null,`Panel size not found for panel "${X.id}"`),se===!0&&ya(xe,ie)},[]),be=S.useCallback(X=>{const{layout:ae,panelDataArray:de}=O.current,{collapsedSize:ie=0,collapsible:se,panelSize:xe}=wi(de,X,ae);return Ue(xe!=null,`Panel size not found for panel "${X.id}"`),!se||Mi(xe,ie)>0},[]),te=S.useCallback(X=>{const{panelDataArray:ae}=O.current;ae.push(X),ae.sort((de,ie)=>{const se=de.order,xe=ie.order;return se==null&&xe==null?0:se==null?-1:xe==null?1:se-xe}),O.current.panelDataArrayChanged=!0,N()},[N]);Ni(()=>{if(O.current.panelDataArrayChanged){O.current.panelDataArrayChanged=!1;const{autoSaveId:X,onLayout:ae,storage:de}=w.current,{layout:ie,panelDataArray:se}=O.current;let xe=null;if(X){const ze=$T(X,se,de);ze&&(A.current=new Map(Object.entries(ze.expandToSizes)),xe=ze.layout)}xe==null&&(xe=YT({panelDataArray:se}));const Pe=Uy({layout:xe,panelConstraints:se.map(ze=>ze.constraints)});Iy(ie,Pe)||(E(Pe),O.current.layout=Pe,ae&&ae(Pe),bo(se,Pe,D.current))}}),Ni(()=>{const X=O.current;return()=>{X.layout=[]}},[]);const Se=S.useCallback(X=>{let ae=!1;const de=T.current;return de&&window.getComputedStyle(de,null).getPropertyValue("direction")==="rtl"&&(ae=!0),function(se){se.preventDefault();const xe=T.current;if(!xe)return()=>null;const{direction:Pe,dragState:ze,id:Ze,keyboardResizeBy:we,onLayout:Re}=w.current,{layout:Ve,panelDataArray:Tt}=O.current,{initialLayout:Et}=ze??{},Yn=Ox(Ze,X,xe);let je=VT(se,X,Pe,ze,we,xe);const Jt=Pe==="horizontal";Jt&&ae&&(je=-je);const Ln=Tt.map(Wn=>Wn.constraints),en=Mr({delta:je,initialLayout:Et??Ve,panelConstraints:Ln,pivotIndices:Yn,prevLayout:Ve,trigger:Ax(se)?"keyboard":"mouse-or-touch"}),Da=!ml(Ve,en);(Nx(se)||Dx(se))&&P.current!=je&&(P.current=je,!Da&&je!==0?Jt?Cd(X,je<0?Px:Mx):Cd(X,je<0?jx:Ex):Cd(X,0)),Da&&(E(en),O.current.layout=en,Re&&Re(en),bo(Tt,en,D.current))}},[]),U=S.useCallback((X,ae)=>{const{onLayout:de}=w.current,{layout:ie,panelDataArray:se}=O.current,xe=se.map(Ve=>Ve.constraints),{panelSize:Pe,pivotIndices:ze}=wi(se,X,ie);Ue(Pe!=null,`Panel size not found for panel "${X.id}"`);const we=xo(se,X)===se.length-1?Pe-ae:ae-Pe,Re=Mr({delta:we,initialLayout:ie,panelConstraints:xe,pivotIndices:ze,prevLayout:ie,trigger:"imperative-api"});ml(ie,Re)||(E(Re),O.current.layout=Re,de&&de(Re),bo(se,Re,D.current))},[]),Z=S.useCallback((X,ae)=>{const{layout:de,panelDataArray:ie}=O.current,{collapsedSize:se=0,collapsible:xe}=ae,{collapsedSize:Pe=0,collapsible:ze,maxSize:Ze=100,minSize:we=0}=X.constraints,{panelSize:Re}=wi(ie,X,de);Re!=null&&(xe&&ze&&ya(Re,se)?ya(se,Pe)||U(X,Pe):Re<we?U(X,we):Re>Ze&&U(X,Ze))},[U]),ne=S.useCallback((X,ae)=>{const{direction:de}=w.current,{layout:ie}=O.current;if(!T.current)return;const se=Wl(X,T.current);Ue(se,`Drag handle element not found for id "${X}"`);const xe=_x(de,ae);M({dragHandleId:X,dragHandleRect:se.getBoundingClientRect(),initialCursorPosition:xe,initialLayout:ie})},[]),W=S.useCallback(()=>{M(null)},[]),oe=S.useCallback(X=>{const{panelDataArray:ae}=O.current,de=xo(ae,X);de>=0&&(ae.splice(de,1),delete D.current[X.id],O.current.panelDataArrayChanged=!0,N())},[N]),ue=S.useMemo(()=>({collapsePanel:B,direction:r,dragState:k,expandPanel:_,getPanelSize:K,getPanelStyle:J,groupId:C,isPanelCollapsed:$,isPanelExpanded:be,reevaluatePanelConstraints:Z,registerPanel:te,registerResizeHandle:Se,resizePanel:U,startDragging:ne,stopDragging:W,unregisterPanel:oe,panelGroupElement:T.current}),[B,k,r,_,K,J,C,$,be,Z,te,Se,U,ne,W,oe]),pe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(Kl.Provider,{value:ue},S.createElement(v,{...b,children:a,className:o,id:d,ref:T,style:{...pe,...g},[yt.group]:"",[yt.groupDirection]:r,[yt.groupId]:C}))}const Mh=S.forwardRef((n,a)=>S.createElement(Bx,{...n,forwardedRef:a}));Bx.displayName="PanelGroup";Mh.displayName="forwardRef(PanelGroup)";function xo(n,a){return n.findIndex(o=>o===a||o.id===a.id)}function wi(n,a,o){const r=xo(n,a),d=r===n.length-1?[r-1,r]:[r,r+1],h=o[r];return{...a.constraints,panelSize:h,pivotIndices:d}}function JT({disabled:n,handleId:a,resizeHandler:o,panelGroupElement:r}){S.useEffect(()=>{if(n||o==null||r==null)return;const c=Wl(a,r);if(c==null)return;const d=h=>{if(!h.defaultPrevented)switch(h.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{h.preventDefault(),o(h);break}case"F6":{h.preventDefault();const p=c.getAttribute(yt.groupId);Ue(p,`No group element found for id "${p}"`);const m=Gr(p,r),g=Rx(p,a,r);Ue(g!==null,`No resize element found for id "${a}"`);const v=h.shiftKey?g>0?g-1:m.length-1:g+1<m.length?g+1:0;m[v].focus();break}}};return c.addEventListener("keydown",d),()=>{c.removeEventListener("keydown",d)}},[r,n,a,o])}function jh({children:n=null,className:a="",disabled:o=!1,hitAreaMargins:r,id:c,onBlur:d,onClick:h,onDragging:p,onFocus:m,onPointerDown:g,onPointerUp:v,style:b={},tabIndex:C=0,tagName:T="div",...k}){var M,L;const E=S.useRef(null),N=S.useRef({onClick:h,onDragging:p,onPointerDown:g,onPointerUp:v});S.useEffect(()=>{N.current.onClick=h,N.current.onDragging=p,N.current.onPointerDown=g,N.current.onPointerUp=v});const D=S.useContext(Kl);if(D===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:A,groupId:P,registerResizeHandle:w,startDragging:O,stopDragging:B,panelGroupElement:_}=D,K=Th(c),[J,$]=S.useState("inactive"),[be,te]=S.useState(!1),[Se,U]=S.useState(null),Z=S.useRef({state:J});Ni(()=>{Z.current.state=J}),S.useEffect(()=>{if(o)U(null);else{const ue=w(K);U(()=>ue)}},[o,K,w]);const ne=(M=r?.coarse)!==null&&M!==void 0?M:15,W=(L=r?.fine)!==null&&L!==void 0?L:5;S.useEffect(()=>{if(o||Se==null)return;const ue=E.current;Ue(ue,"Element ref not attached");let pe=!1;return _T(K,ue,A,{coarse:ne,fine:W},(ae,de,ie)=>{if(!de){$("inactive");return}switch(ae){case"down":{$("drag"),pe=!1,Ue(ie,'Expected event to be defined for "down" action'),O(K,ie);const{onDragging:se,onPointerDown:xe}=N.current;se?.(!0),xe?.();break}case"move":{const{state:se}=Z.current;pe=!0,se!=="drag"&&$("hover"),Ue(ie,'Expected event to be defined for "move" action'),Se(ie);break}case"up":{$("hover"),B();const{onClick:se,onDragging:xe,onPointerUp:Pe}=N.current;xe?.(!1),Pe?.(),pe||se?.();break}}})},[ne,A,o,W,w,K,Se,O,B]),JT({disabled:o,handleId:K,resizeHandler:Se,panelGroupElement:_});const oe={touchAction:"none",userSelect:"none"};return S.createElement(T,{...k,children:n,className:a,id:c,onBlur:()=>{te(!1),d?.()},onFocus:()=>{te(!0),m?.()},ref:E,role:"separator",style:{...oe,...b},tabIndex:C,[yt.groupDirection]:A,[yt.groupId]:P,[yt.resizeHandle]:"",[yt.resizeHandleActive]:J==="drag"?"pointer":be?"keyboard":void 0,[yt.resizeHandleEnabled]:!o,[yt.resizeHandleId]:K,[yt.resizeHandleState]:J})}jh.displayName="PanelResizeHandle";const Do=S.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(Db,{ref:r,className:F("relative overflow-hidden",n),...o,children:[l.jsx(sS,{className:"h-full w-full rounded-[inherit]",children:a}),l.jsx(Fx,{}),l.jsx(lS,{})]}));Do.displayName=Db.displayName;const Fx=S.forwardRef(({className:n,orientation:a="vertical",...o},r)=>l.jsx(Tb,{ref:r,orientation:a,className:F("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),...o,children:l.jsx(cS,{className:"relative flex-1 rounded-full bg-border"})}));Fx.displayName=Tb.displayName;function eP(n){const a={provider:"unknown",endpoint:"unknown",timestamp:new Date,raw:n},o=n.match(/error-api-provider-([^-]+)-/);o&&(a.provider=o[1]);const r=n.match(/error-api-provider-[^-]+-(.+?)-\d{4}-\d{2}-\d{2}T/);r&&(a.endpoint=r[1].replace(/-/g,"/"));const c=n.match(/(\d{4}-\d{2}-\d{2}T\d{6})/);if(c){const d=c[1],h=`${d.slice(0,10)}T${d.slice(11,13)}:${d.slice(13,15)}:${d.slice(15,17)}`;a.timestamp=new Date(h)}return a}function tP(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},o=n.split(/^===\s*(.+?)\s*===$/m);let r="";for(let c=0;c<o.length;c++){const d=o[c].trim();if(d==="REQUEST INFO"){r="request_info";continue}else if(d==="HEADERS"){r="headers";continue}else if(d==="REQUEST BODY"){r="request_body";continue}else if(d==="API RESPONSE"){r="";continue}else if(d==="RESPONSE"){r="response";continue}switch(r){case"request_info":nP(d,a);break;case"headers":a.requestHeaders=aP(d);break;case"request_body":a.requestBody=d;break;case"response":iP(d,a);break}}return oP(a),a}function nP(n,a){const o=n.split(`
14
+ `);for(const r of o){const[c,...d]=r.split(":"),h=d.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 aP(n){const a={},o=n.split(`
15
+ `);for(const r of o){const c=r.indexOf(":");if(c>0){const d=r.slice(0,c).trim(),h=r.slice(c+1).trim();d&&(a[d]=h)}}return a}function iP(n,a){const o=n.split(`
16
+ `);let r=!1;const c=[];for(const d of o){if(d.startsWith("Status:")){const p=d.replace("Status:","").trim().split(/\s+/);a.statusCode=parseInt(p[0],10)||0,a.statusText=p.slice(1).join(" ")||lP(a.statusCode);continue}if(d.trim()===""&&!r){r=!0;continue}if(r)c.push(d);else{const h=d.indexOf(":");if(h>0){const p=d.slice(0,h).trim(),m=d.slice(h+1).trim();p&&(a.responseHeaders[p]=m)}}}a.responseBody=c.join(`
17
+ `).trim()}function oP(n){const a=n.url.match(/\/api\/provider\/([^/]+)/);a&&(n.provider=a[1]);const o=n.url.match(/\/api\/provider\/[^/]+\/(.+?)(?:\?|$)/);o&&(n.endpoint=o[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"),rP(n),n.statusCode===429&&sP(n)}function rP(n){if(n.requestBody)try{const a=JSON.parse(n.requestBody);typeof a.model=="string"&&(n.model=a.model)}catch{}}function sP(n){if(n.responseBody)try{const a=JSON.parse(n.responseBody),o=Gd(a);o!==null&&(n.quotaResetDelay=o);const r=Vd(a);r&&(n.quotaResetTimestamp=r)}catch{}}function Gd(n){if(typeof n!="object"||n===null)return null;const a=n;if("quotaResetDelay"in a){const o=a.quotaResetDelay;if(typeof o=="number")return o;if(typeof o=="string"){const r=o.match(/^(\d+)s?$/);if(r)return parseInt(r[1],10)}}if("error"in a&&typeof a.error=="object"){const o=Gd(a.error);if(o!==null)return o}if("details"in a&&Array.isArray(a.details))for(const o of a.details){const r=Gd(o);if(r!==null)return r}return null}function Vd(n){if(typeof n!="object"||n===null)return null;const a=n;for(const o of["quotaResetTimeStamp","quotaResetTimestamp","resetTime","reset_time"])if(o in a&&typeof a[o]=="string")return a[o];if("error"in a&&typeof a.error=="object"){const o=Vd(a.error);if(o)return o}if("details"in a&&Array.isArray(a.details))for(const o of a.details){const r=Vd(o);if(r)return r}return null}function lP(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 cP(n,a){const o=ih(),r=Date.now(),c=n*1e3,d=r-c,h=Math.floor(d/1e3),p=Math.floor(h/60),m=Math.floor(p/60),g=Math.floor(m/24);if(h<60){const b=o==="zh-CN",C=o==="vi";return b?"刚刚":C?"vừa xong":"just now"}if(p<60){const b=o==="zh-CN",C=o==="vi";return b?`${p} 分钟前`:C?`${p} phút trước`:`${p}m ago`}if(m<24){const b=o==="zh-CN",C=o==="vi";return b?`${m} 小时前`:C?`${m} giờ trước`:`${m}h ago`}if(g<7){const b=o==="zh-CN",C=o==="vi";return b?`${g} 天前`:C?`${g} ngày trước`:`${g}d ago`}return new Date(c).toLocaleDateString(o,{month:"short",day:"numeric"})}function uP(n){return n>=500?"text-red-500":n===429?"text-orange-500":n>=400?"text-yellow-500":"text-gray-500"}function dP(n,a){const o=ih();return o==="zh-CN"?{rate_limit:"限流",auth:"认证错误",not_found:"未找到",server:"服务错误",timeout:"超时",unknown:"错误"}[n]||"错误":o==="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 hP(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),o=Math.floor(n%3600/60);return o>0?`${a}h ${o}m`:`${a}h`}function fP(n,a){if(!n)return null;const o=ih(),r=o==="zh-CN",c=o==="vi";try{const d=new Date(n),h=new Date,p=d.getTime()-h.getTime();if(p<=0)return r?"现在":c?"bây giờ":"now";const m=Math.floor(p/1e3);if(m<60)return r?`${m}秒`:c?`${m} giây`:`${m}s`;if(m<3600){const b=Math.floor(m/60);return r?`${b}分钟`:c?`${b} phút`:`${b}m`}const g=Math.floor(m/3600),v=Math.floor(m%3600/60);return r?v>0?`${g}小时 ${v}分钟`:`${g}小时`:c?v>0?`${g} giờ ${v} phút`:`${g} giờ`:v>0?`${g}h ${v}m`:`${g}h`}catch{return null}}function pP(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 mP(n){return n||""}function gP({name:n,size:a,modified:o,isSelected:r,onClick:c,statusCode:d,model:h}){const p=S.useMemo(()=>eP(n),[n]),m=S.useMemo(()=>mP(h),[h]);return l.jsxs("button",{onClick:c,className:F("w-full px-2.5 py-2 flex items-center gap-2 text-left transition-colors","hover:bg-muted/40 border-l-[3px]",r?"bg-muted/50 border-l-red-500":"border-l-transparent"),children:[l.jsx("span",{className:F("shrink-0 text-[10px] font-bold px-1.5 py-0.5 rounded min-w-[32px] text-center",pP(d)),children:d||"???"}),l.jsx(Nh,{provider:p.provider,size:18,withBackground:!0,className:"shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[l.jsx("span",{className:"text-[11px] font-medium text-foreground truncate",children:p.endpoint||"unknown"}),m&&l.jsx("span",{className:"text-[10px] text-muted-foreground truncate",title:m,children:m}),l.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-muted-foreground/60",children:[l.jsx(ko,{className:"w-2.5 h-2.5"}),l.jsx("span",{children:cP(o)})]})]})]})}function Hy({value:n,className:a,variant:o="outline",size:r="icon",label:c="Copy to clipboard"}){const[d,h]=S.useState(!1),p=()=>{navigator.clipboard.writeText(n),h(!0),setTimeout(()=>h(!1),2e3)};return l.jsx(Pi,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs(rt,{size:r,variant:o,className:F("relative z-10 text-muted-foreground hover:text-foreground",a),onClick:m=>{m.stopPropagation(),p()},children:[d?l.jsx(wo,{className:"h-3.5 w-3.5 text-green-500"}):l.jsx(Sl,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"sr-only",children:c})]})}),l.jsx(ka,{children:l.jsx("p",{children:d?"Copied!":c})})]})})}function Nr({active:n,onClick:a,children:o,icon:r}){return l.jsxs("button",{onClick:a,className:F("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:[r&&l.jsx(r,{className:"w-3.5 h-3.5"}),o]})}function qx({code:n}){const a=uP(n);return l.jsx("span",{className:F("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 yP({parsed:n}){const{t:a}=fe(),o=hP(n.quotaResetDelay)||fP(n.quotaResetTimestamp),r=a("errorLogs.na");return l.jsx(Do,{className:"h-full",children:l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(qx,{code:n.statusCode}),l.jsx("span",{className:"text-sm font-medium",children:n.statusText}),l.jsx("span",{className:"text-xs text-muted-foreground px-2 py-0.5 rounded bg-muted/50",children:dP(n.errorType)})]}),n.model&&l.jsxs("div",{className:"flex items-center gap-2.5 p-3 rounded-lg bg-violet-500/10 border border-violet-500/20",children:[l.jsx(VS,{className:"w-4 h-4 text-violet-500 shrink-0"}),l.jsxs("div",{className:"text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:a("errorLogs.modelLabel")}),l.jsx("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:n.model})]})]}),n.errorType==="rate_limit"&&o&&l.jsxs("div",{className:"flex items-center gap-2.5 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:[l.jsx(ko,{className:"w-4 h-4 text-amber-500 shrink-0"}),l.jsxs("div",{className:"text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:a("errorLogs.quotaResetsIn")}),l.jsx("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:o})]})]}),l.jsxs("div",{className:"grid grid-cols-4 gap-3 text-xs",children:[l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.method")}),l.jsx("div",{className:"font-medium",children:n.method||r})]}),l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.provider")}),l.jsx("div",{className:"font-medium",children:n.provider||r})]}),l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.version")}),l.jsx("div",{className:"font-medium",children:n.version||r})]}),l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.endpoint")}),l.jsx("div",{className:"font-medium truncate",title:n.endpoint,children:n.endpoint||r})]})]}),l.jsxs("div",{className:"text-xs",children:[l.jsx("div",{className:"text-muted-foreground mb-1.5",children:a("errorLogs.url")}),l.jsx("div",{className:"font-mono p-2.5 rounded bg-muted/30 border border-border/50 break-all leading-relaxed",children:n.url||r})]}),l.jsxs("div",{className:"text-xs",children:[l.jsx("div",{className:"text-muted-foreground mb-1.5",children:a("errorLogs.timestamp")}),l.jsx("div",{className:"font-mono",children:n.timestamp||r})]}),n.errorType!=="unknown"&&l.jsxs("div",{className:F("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"?l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}):n.errorType==="auth"?l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-red-500 shrink-0"}):l.jsx(Ol,{className:"w-4 h-4 mt-0.5 text-blue-500 shrink-0"}),l.jsxs("div",{className:F("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 bP({headers:n}){const{t:a}=fe(),o=Object.entries(n);return o.length===0?l.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:a("errorLogs.noHeaders")}):l.jsx(Do,{className:"h-full",children:l.jsx("div",{className:"p-4 space-y-1",children:o.map(([r,c])=>l.jsxs("div",{className:"flex gap-3 text-xs font-mono py-1.5 border-b border-border/30 last:border-0",children:[l.jsxs("span",{className:"text-muted-foreground shrink-0 min-w-[140px]",children:[r,":"]}),l.jsx("span",{className:"break-all",children:c})]},r))})})}function By({content:n,label:a}){const{t:o}=fe();if(!n||n.trim()===""){const d=a==="Request"?"errorLogs.noRequestBody":"errorLogs.noResponseBody";return l.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:o(d)})}let r=n,c=!1;try{const d=JSON.parse(n);r=JSON.stringify(d,null,2),c=!0}catch{}return l.jsx(Do,{className:"h-full",children:l.jsx("pre",{className:F("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:r})})}function xP({content:n}){return l.jsx(Do,{className:"h-full",children:l.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 vP({name:n,absolutePath:a}){const{t:o}=fe(),[r,c]=S.useState("overview"),{data:d,isLoading:h,error:p}=WD(n),m=S.useMemo(()=>d?tP(d):null,[d]);return n?h?l.jsxs("div",{className:"flex-1 p-6 space-y-3",children:[l.jsx($e,{className:"h-5 w-full"}),l.jsx($e,{className:"h-5 w-3/4"}),l.jsx($e,{className:"h-5 w-5/6"}),l.jsx($e,{className:"h-5 w-2/3"})]}):p||!d||!m?l.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:l.jsx("p",{className:"text-sm",children:o("errorLogs.failedLoadContent")})}):l.jsxs("div",{className:"flex-1 flex flex-col min-w-0 h-full",children:[l.jsxs("div",{className:"px-4 py-3 border-b border-border bg-muted/30 flex items-center justify-between gap-3 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx(qx,{code:m.statusCode}),l.jsxs("span",{className:"text-xs font-semibold truncate text-foreground",children:[m.provider,"/",m.endpoint||"unknown"]}),n&&l.jsx(Hy,{value:a||n,label:o("errorLogs.copyAbsolutePath"),size:"icon-sm",className:"ml-1 text-muted-foreground hover:text-foreground opacity-50 hover:opacity-100 transition-opacity"})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[d&&l.jsx(Hy,{value:d,label:o("errorLogs.copyRawContent"),variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-foreground"}),l.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})]})]}),l.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:[l.jsx(Nr,{active:r==="overview",onClick:()=>c("overview"),icon:Ol,children:o("errorLogs.tabOverview")}),l.jsx(Nr,{active:r==="headers",onClick:()=>c("headers"),icon:WS,children:o("errorLogs.tabHeaders")}),l.jsx(Nr,{active:r==="request",onClick:()=>c("request"),icon:Gb,children:o("errorLogs.tabRequest")}),l.jsx(Nr,{active:r==="response",onClick:()=>c("response"),icon:QS,children:o("errorLogs.tabResponse")}),l.jsx(Nr,{active:r==="raw",onClick:()=>c("raw"),icon:$S,children:o("errorLogs.tabRaw")})]}),l.jsxs("div",{className:"flex-1 overflow-hidden bg-card/30",children:[r==="overview"&&l.jsx(yP,{parsed:m}),r==="headers"&&l.jsx(bP,{headers:m.requestHeaders}),r==="request"&&l.jsx(By,{content:m.requestBody,label:o("errorLogs.tabRequest")}),r==="response"&&l.jsx(By,{content:m.responseBody,label:o("errorLogs.tabResponse")}),r==="raw"&&l.jsx(xP,{content:d})]})]}):l.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:l.jsxs("div",{className:"text-center space-y-3",children:[l.jsx(YS,{className:"w-10 h-10 mx-auto opacity-40"}),l.jsx("p",{className:"text-sm",children:o("errorLogs.selectLog")})]})})}function CP(){const{t:n}=fe(),{data:a,isLoading:o}=qD(),{data:r,isLoading:c,error:d}=YD(a?.running??!1),[h,p]=S.useState(500),[m,g]=S.useState(!1),v=S.useRef(null),b=S.useRef(null),C=()=>{b.current&&(clearInterval(b.current),b.current=null)};S.useEffect(()=>{if(!m)return;const A=w=>{const O=v.current;if(!O)return;const _=O.getBoundingClientRect().top+window.scrollY,K=w.pageY-_;p(Math.max(300,K));const $=window.innerHeight-w.clientY,be=15;C(),$<50?b.current=setInterval(()=>{window.scrollBy(0,be)},16):w.clientY<50&&(b.current=setInterval(()=>{window.scrollBy(0,-be)},16))},P=()=>{g(!1),C(),document.body.style.cursor="default",document.body.style.userSelect="auto"};return document.addEventListener("mousemove",A),document.addEventListener("mouseup",P),document.body.style.cursor="row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",P),document.body.style.cursor="default",document.body.style.userSelect="auto",C()}},[m]);const T=A=>{A.preventDefault(),g(!0)},k=S.useMemo(()=>r?.[0]?.name??null,[r]),[M,L]=S.useState(null),E=M??k,N=S.useMemo(()=>!E||!r?void 0:r.find(P=>P.name===E)?.absolutePath,[E,r]);if(o||!a?.running)return null;if(c)return l.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:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[l.jsx($e,{className:"h-4 w-32"}),l.jsx($e,{className:"h-4 w-20"})]}),l.jsx("div",{className:"p-4 space-y-3",children:[1,2,3].map(A=>l.jsx($e,{className:"h-12 w-full rounded-lg"},A))})]});if(!r||r.length===0)return null;const D=r.length;return l.jsxs("div",{ref:v,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:[l.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:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx(Gn,{className:"w-4 h-4 text-amber-500"}),l.jsx("span",{className:"text-sm font-semibold tracking-tight",children:n("errorLogs.title")}),l.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:n("errorLogs.failedRequests",{count:D})})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[l.jsx(XS,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:n("errorLogs.cliproxyDiagnostics")})]})]}),l.jsx("div",{className:"flex-1 min-h-0",children:l.jsxs(Mh,{direction:"horizontal",children:[l.jsx(qr,{defaultSize:30,minSize:20,maxSize:50,className:"flex flex-col min-w-0",children:l.jsxs(Do,{className:"h-full",children:[l.jsx("div",{className:"divide-y divide-border/50",children:r.slice(0,50).map(A=>l.jsx(gP,{name:A.name,size:A.size,modified:A.modified,isSelected:E===A.name,onClick:()=>L(A.name),statusCode:A.statusCode,model:A.model},A.name))}),r.length>50&&l.jsx("div",{className:"px-3 py-3 text-center text-[10px] text-muted-foreground border-t border-border/50",children:n("errorLogs.showingCount",{total:r.length})})]})}),l.jsxs(jh,{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:[l.jsx("div",{className:"w-[1px] h-full bg-border group-hover:bg-primary/50 transition-colors"}),l.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:l.jsx(Rl,{className:"h-4 w-4 text-muted-foreground"})})]}),l.jsx(qr,{className:"flex flex-col min-w-0 bg-background/50",children:l.jsx(vP,{name:E,absolutePath:N})})]})}),d?l.jsx("div",{className:"px-4 py-2 border-t border-border text-xs text-destructive bg-destructive/5 shrink-0",children:d.message}):l.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:T,children:l.jsx(ZS,{className:"w-8 h-3 text-border group-hover:text-primary/50 transition-colors"})})]})}const SP=Il("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"}}),_r=S.forwardRef(({className:n,variant:a,...o},r)=>l.jsx("div",{ref:r,role:"alert",className:F(SP({variant:a}),n),...o}));_r.displayName="Alert";const Tl=S.forwardRef(({className:n,...a},o)=>l.jsx("h5",{ref:o,className:F("mb-1 font-medium leading-none tracking-tight",n),...a}));Tl.displayName="AlertTitle";const Ur=S.forwardRef(({className:n,...a},o)=>l.jsx("div",{ref:o,className:F("text-sm [&_p]:leading-relaxed",n),...a}));Ur.displayName="AlertDescription";function wP(){return Nt({queryKey:["overview"],queryFn:async()=>(await fetch("/api/overview")).json()})}function Kx(n,a){return typeof n=="object"&&n!==null&&"error"in n&&typeof n.error=="string"?n.error:a}function Gx(n){const a=n.trim();if(!a)return null;try{return JSON.parse(a)}catch{return null}}function kP(n){const a=n.trim().toLowerCase();return a.startsWith("<!doctype html")||a.startsWith("<html")}function AP(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 Vx(n,a){const o=await n.text(),r=Gx(o);if(!n.ok){const c=Kx(r,a);throw new Error(c)}if(r===null)throw new Error(a);return r}function NP(){return Nt({queryKey:["shared","summary"],queryFn:async()=>{const n=await fetch("/api/shared/summary");return Vx(n,"Failed to fetch shared summary")}})}function aL(n){return Nt({queryKey:["shared",n],queryFn:async()=>{const a=await fetch(`/api/shared/${n}`);return Vx(a,`Failed to fetch shared ${n}`)}})}function iL(n,a){return Nt({queryKey:["shared",n,"content",a],enabled:typeof a=="string"&&a.length>0,queryFn:async()=>{if(!a)throw new Error("Missing shared item path");const o=new URLSearchParams({type:n,path:a}),r=await fetch(`/api/shared/content?${o.toString()}`),c=await r.text(),d=Gx(c);if(!r.ok)throw new Error(Kx(d,`Failed to fetch shared ${n} content`));if(AP(d))return{content:d.content,contentPath:typeof d.contentPath=="string"&&d.contentPath.length>0?d.contentPath:a};if(c.trim().length>0){if(kP(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 DP={ok:"success",warning:"warning",error:"error"},TP={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 gl({title:n,value:a,icon:o,variant:r="default",onClick:c}){const d=TP[r];return l.jsxs("button",{onClick:c,className:F("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:[l.jsx("div",{className:F("flex items-center justify-center w-9 h-9 rounded-md",d.iconBg),children:l.jsx(o,{className:F("w-4 h-4",d.iconColor)})}),l.jsxs("div",{className:"text-left",children:[l.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:n}),l.jsx("p",{className:F("text-lg font-bold font-mono leading-tight",d.iconColor),children:a})]})]})}function PP(){const{t:n}=fe(),a=Jd(),{data:o,isLoading:r}=wP(),{data:c,isLoading:d}=NP();if(r||d)return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"rounded-xl border p-6 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx($e,{className:"h-12 w-12 rounded-lg"}),l.jsxs("div",{children:[l.jsx($e,{className:"h-7 w-[180px] mb-2"}),l.jsx($e,{className:"h-4 w-[220px]"})]})]}),l.jsx("div",{className:"flex items-center gap-3",children:[1,2,3,4].map(p=>l.jsx($e,{className:"h-14 w-28 rounded-lg"},p))})]}),l.jsxs("div",{className:"border rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"px-4 py-2.5 border-b flex items-center justify-between",children:[l.jsx($e,{className:"h-4 w-32"}),l.jsx($e,{className:"h-4 w-20"})]}),l.jsx("div",{className:"px-4 py-3 border-b",children:l.jsx($e,{className:"h-2 w-full rounded-full"})}),[1,2,3].map(p=>l.jsxs("div",{className:"px-4 py-2.5 flex items-center gap-3 border-b last:border-b-0",children:[l.jsx($e,{className:"w-2.5 h-2.5 rounded-full"}),l.jsx($e,{className:"h-4 flex-1"}),l.jsx($e,{className:"h-1.5 w-24 rounded-full"}),l.jsx($e,{className:"h-4 w-16"})]},p))]})]});const h=o?.health?DP[o.health.status]:void 0;return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"relative overflow-hidden rounded-xl border bg-gradient-to-br from-background via-background to-muted/30",children:[l.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",children:l.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)",backgroundSize:"24px 24px"}})}),l.jsxs("div",{className:"relative p-6 flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[l.jsx(cD,{version:o?.version}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(gl,{title:n("home.profiles"),value:o?.profiles??0,icon:Ld,variant:"accent",onClick:()=>a("/providers")}),l.jsx(gl,{title:n("home.cliproxy"),value:o?.cliproxy??0,icon:Rb,variant:"accent",onClick:()=>a("/cliproxy")}),l.jsx(gl,{title:n("home.accounts"),value:o?.accounts??0,icon:_b,variant:"default",onClick:()=>a("/accounts")}),l.jsx(gl,{title:n("home.health"),value:o?.health?`${o.health.passed}/${o.health.total}`:"-",icon:zr,variant:h,onClick:()=>a("/health")})]})]})]}),c?.symlinkStatus&&!c.symlinkStatus.valid&&l.jsxs(_r,{variant:"warning",children:[l.jsx(Gn,{className:"h-4 w-4"}),l.jsx(Tl,{children:n("home.configurationRequired")}),l.jsx(Ur,{children:c.symlinkStatus.message})]}),l.jsx(AT,{}),l.jsx("div",{className:"rounded-xl border bg-card/70 p-5",children:l.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"rounded-xl bg-muted p-2.5",children:l.jsx(Ub,{className:"h-5 w-5 text-muted-foreground"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-lg font-semibold",children:n("homePageV2.logsMoved")}),l.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground",children:"Use the unified logs page for source-level filtering, structured entry inspection, and retention policy edits without crowding the home dashboard."})]})]}),l.jsxs(rt,{variant:"outline",className:"gap-2",onClick:()=>a("/logs"),children:["Open logs",l.jsx(JS,{className:"h-4 w-4"})]})]})}),l.jsx(CP,{})]})}const Yx=uS,Eh=S.forwardRef(({className:n,...a},o)=>l.jsx(Pb,{ref:o,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",n),...a}));Eh.displayName=Pb.displayName;const Pl=S.forwardRef(({className:n,...a},o)=>l.jsx(Mb,{ref:o,className:F("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}));Pl.displayName=Mb.displayName;const Yd=S.forwardRef(({className:n,...a},o)=>l.jsx(jb,{ref:o,className:F("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...a}));Yd.displayName=jb.displayName;function qt({className:n,...a}){return l.jsx(dS,{"data-slot":"label",className:F("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 Lh="ccs:openrouter-models",MP=1440*60*1e3,Wx="1";function Wd(n){const a=parseFloat(n);return isNaN(a)||a===0?0:a*1e6}function Fy(n){const a=Wd(n);return a===0?me.t("openrouterUtils.priceFree"):a<.01?me.t("openrouterUtils.priceLessThanCent"):a<1?`$${a.toFixed(2)}`:`$${a.toFixed(a<10?2:0)}`}function jP(n){const a=Fy(n.prompt),o=Fy(n.completion);return a===me.t("openrouterUtils.priceFree")&&o===me.t("openrouterUtils.priceFree")?me.t("openrouterUtils.priceFree"):`${a}/${o}`}function EP(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 LP(n){return{...n,category:EP(n),pricePerMillionPrompt:Wd(n.pricing.prompt),pricePerMillionCompletion:Wd(n.pricing.completion),isFree:n.pricing.prompt==="0"&&n.pricing.completion==="0",isExacto:n.id.includes(":exacto")}}function RP(n,a,o){const r=a.toLowerCase().trim();return n.filter(c=>o?.category&&c.category!==o.category||o?.freeOnly&&!c.isFree||o?.minContext&&c.context_length<o.minContext?!1:r?c.id.toLowerCase().includes(r)||c.name.toLowerCase().includes(r)||c.description?.toLowerCase().includes(r):!0)}function oL(n){return[...n].sort((a,o)=>{if(a.isFree&&!o.isFree)return-1;if(!a.isFree&&o.isFree)return 1;if(!a.isFree&&!o.isFree){if(a.isExacto&&!o.isExacto)return-1;if(!a.isExacto&&o.isExacto)return 1}return a.name.localeCompare(o.name)})}function OP(){try{const n=localStorage.getItem(Lh);if(!n)return null;const a=JSON.parse(n);return a.version!==Wx||Date.now()-a.fetchedAt>MP?null:a.models}catch{return null}}function IP(n){try{localStorage.setItem(Lh,JSON.stringify({models:n,fetchedAt:Date.now(),version:Wx}))}catch{}}function _P(){localStorage.removeItem(Lh)}function rL(n,a){const[o]=n.split("/");if(!o)return{};const r=a.filter(h=>h.id.startsWith(`${o}/`));if(r.length===0)return{};const c=[...r].sort((h,p)=>p.pricePerMillionPrompt-h.pricePerMillionPrompt),d=Math.ceil(c.length/3);return{opus:c[0]?.id,sonnet:c[Math.min(d,c.length-1)]?.id,haiku:c[c.length-1]?.id}}function UP(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${Math.round(n/1e3)}K`:String(n)}const sL={anthropic:"Anthropic (Claude)",openai:"OpenAI (GPT)",google:"Google (Gemini)",meta:"Meta (Llama)",mistral:"Mistral",opensource:"Open Source",other:"Other"},zP={anthropic:["anthropic/"],openai:["openai/"],google:["google/"],meta:["meta-llama/","meta/"],mistral:["mistralai/"],opensource:["deepseek/","qwen/","cohere/"],other:[]};function HP(n,a=2){const o=[],r=["anthropic","openai","google","meta","mistral","opensource"];for(const c of r){const d=zP[c];if(d.length===0)continue;const p=[...n.filter(m=>d.some(g=>m.id.toLowerCase().startsWith(g)))].sort((m,g)=>(g.created??0)-(m.created??0));o.push(...p.slice(0,a))}return o.sort((c,d)=>(d.created??0)-(c.created??0))}function BP(n){const o=Date.now()/1e3-n;return o<86400?me.t("openrouterUtils.ageToday"):o<172800?me.t("openrouterUtils.ageYesterday"):o<604800?me.t("openrouterUtils.ageDaysAgo",{count:Math.floor(o/86400)}):o<2592e3?me.t("openrouterUtils.ageWeeksAgo",{count:Math.floor(o/604800)}):o<31536e3?me.t("openrouterUtils.ageMonthsAgo",{count:Math.floor(o/2592e3)}):me.t("openrouterUtils.ageYearsAgo",{count:Math.floor(o/31536e3)})}const FP="https://openrouter.ai/api/v1/models",Qx=["openrouter-models"],qy=1440*60*1e3;async function qP(){const n=await fetch(FP);if(!n.ok)throw new Error(`Failed to fetch OpenRouter models: ${n.status}`);const o=(await n.json()).data;return IP(o),o}function $x(){return Nt({queryKey:Qx,queryFn:qP,staleTime:qy,gcTime:qy,initialData:()=>OP()??void 0,refetchOnWindowFocus:!1})}function KP(){const n=$x(),a=(n.data??[]).map(LP);return{...n,models:a}}function lL(){const n=lt();return()=>(_P(),n.invalidateQueries({queryKey:Qx}))}function cL(){const{data:n,isLoading:a,isError:o}=$x();return{isReady:!!n&&n.length>0,isLoading:a,isError:o,modelCount:n?.length??0}}function Rh({profileEnv:n={}}){const{t:a}=fe(),[o,r]=S.useState(null),[c,d]=S.useState(!0),[h,p]=S.useState(!1);S.useEffect(()=>{m()},[]);const m=async()=>{try{d(!0);const T=await fetch("/api/global-env");if(!T.ok)throw new Error("Failed to load");const k=await T.json();r(k)}catch{r(null)}finally{d(!1)}};if(c||!o?.enabled)return null;const g=o.env||{},v=Object.keys(g);if(v.length===0)return null;const b=v.filter(T=>!(T in n)),C=v.filter(T=>T in n);return l.jsxs("div",{className:"border-t bg-muted/20",children:[l.jsxs("button",{onClick:()=>p(!h),className:"w-full px-4 py-2 flex items-center gap-2 hover:bg-muted/30 transition-colors",children:[l.jsx(Ol,{className:"w-4 h-4 text-blue-500"}),l.jsxs("span",{className:"text-xs text-muted-foreground flex-1 text-left",children:[a("globalEnvIndicator.injectedCount",{count:b.length}),C.length>0&&l.jsx("span",{className:"text-amber-600 dark:text-amber-400 ml-1",children:a("globalEnvIndicator.overriddenCount",{count:C.length})})]}),h?l.jsx(th,{className:"w-4 h-4 text-muted-foreground"}):l.jsx(Ll,{className:"w-4 h-4 text-muted-foreground"})]}),h&&l.jsxs("div",{className:"px-4 pb-3 space-y-2",children:[b.length>0&&l.jsx("div",{className:"space-y-1",children:b.map(T=>l.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:[l.jsx("span",{className:"text-green-500",children:"+"}),l.jsxs("span",{className:"truncate",children:[T,"=",g[T]]})]},T))}),C.length>0&&l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:a("globalEnvIndicator.skippedLabel")}),C.map(T=>l.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:[l.jsx("span",{className:"text-amber-500",children:"~"}),l.jsx("span",{className:"truncate",children:T})]},T))]}),l.jsx("div",{className:"pt-2 border-t border-border/50",children:l.jsx(rt,{variant:"ghost",size:"sm",asChild:!0,className:"h-7 text-xs gap-1.5 -ml-2",children:l.jsxs(Cl,{to:"/settings?tab=globalenv",children:[l.jsx(ah,{className:"w-3.5 h-3.5"}),a("globalEnvIndicator.configureInSettings"),l.jsx(Bb,{className:"w-3 h-3 opacity-50"})]})})})]})]})}function GP({className:n,...a}){return l.jsx(hS,{"data-slot":"switch",className:F("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n),...a,children:l.jsx(fS,{"data-slot":"switch-thumb",className:F("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function VP(n,a,o){return n(o==="refreshing"?"imageAnalysisStatus.refreshingPreview":o==="invalid"?"imageAnalysisStatus.savedStatus":a==="editor"?"imageAnalysisStatus.livePreview":"imageAnalysisStatus.savedStatus")}function YP(n,a,o){return a.status==="disabled"?n("imageAnalysisStatus.disabledGlobally"):o!=="claude"?n("imageAnalysisStatus.targetBypassesHook",{target:n(`imageAnalysisStatus.targetLabel.${o}`)}):a.nativeReadPreference?n("imageAnalysisStatus.nativeImageReading"):a.status==="hook-missing"?n("imageAnalysisStatus.setupNeeded"):a.authReadiness==="missing"?n("imageAnalysisStatus.needsAuth"):a.proxyReadiness==="unavailable"?n("imageAnalysisStatus.needsProxy"):a.effectiveRuntimeMode==="native-read"?n("imageAnalysisStatus.nativeFallback"):n("imageAnalysisStatus.transformerReady")}function WP(n,a,o){return a.status==="disabled"?{label:n("imageAnalysisStatus.badgeDisabled"),className:"border-border/80 bg-background/85 text-muted-foreground"}:o!=="claude"?{label:n("imageAnalysisStatus.badgeBypassed"),className:"border-sky-500/25 bg-sky-500/10 text-sky-800 dark:text-sky-200"}:a.nativeReadPreference?{label:n("imageAnalysisStatus.badgeNative"),className:"border-emerald-500/25 bg-emerald-500/10 text-emerald-800 dark:text-emerald-200"}:a.status==="hook-missing"||a.authReadiness==="missing"?{label:a.status==="hook-missing"?n("imageAnalysisStatus.badgeSetup"):n("imageAnalysisStatus.badgeAuth"),className:"border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-200"}:a.proxyReadiness==="unavailable"?{label:n("imageAnalysisStatus.badgeProxy"),className:"border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-200"}:{label:n("imageAnalysisStatus.badgeReady"),className:"border-emerald-500/25 bg-emerald-500/10 text-emerald-800 dark:text-emerald-200"}}function QP(n,a,o){if(a.nativeReadPreference)return a.profileModel&&a.nativeImageCapable?n("imageAnalysisStatus.toggleSummaryNativeCapable",{model:a.profileModel}):a.profileModel?n("imageAnalysisStatus.toggleSummaryNativeModel",{model:a.profileModel}):n("imageAnalysisStatus.toggleSummaryNativeDefault");if(!a.backendDisplayName&&o==="claude")return n("imageAnalysisStatus.toggleSummaryNativeFileAccess");if(!a.backendDisplayName)return n("imageAnalysisStatus.toggleSummaryInactiveTarget",{target:n(`imageAnalysisStatus.targetLabel.${o}`)});const r=a.model?` · ${a.model}`:"";return n("imageAnalysisStatus.toggleSummaryTransformerRoute",{backend:a.backendDisplayName,modelSuffix:r})}function $P(n,a,o){return a.status==="disabled"?n("imageAnalysisStatus.noteDisabledGlobally"):o!=="claude"?n("imageAnalysisStatus.noteTargetBypassesHook",{target:n(`imageAnalysisStatus.targetLabel.${o}`)}):a.nativeReadPreference?a.nativeImageCapable===!0?null:a.nativeImageReason:a.status==="hook-missing"?n("imageAnalysisStatus.notePersistHook"):a.authReadiness==="missing"?a.authReason:a.proxyReadiness==="unavailable"?a.proxyReason:null}function XP({status:n,target:a="claude",source:o="saved",previewState:r="saved",nativeReadPreferenceOverride:c,onToggleNativeRead:d}){const{t:h}=fe();if(!n)return l.jsxs("div",{className:"rounded-2xl border bg-muted/20 px-4 py-3","aria-live":"polite",children:[l.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),l.jsx("div",{className:"mt-2 h-3 w-52 animate-pulse rounded bg-muted"})]});const p=c??n.nativeReadPreference,m={...n,nativeReadPreference:p},g=WP(h,m,a),v=$P(h,m,a),b=n.nativeImageCapable?h("imageAnalysisStatus.capabilityVerified"):n.profileModel?h("imageAnalysisStatus.capabilityUnknown"):null;return l.jsxs("section",{className:"rounded-2xl border bg-background/95 px-4 py-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("div",{className:"min-w-0",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"inline-flex h-8 w-8 items-center justify-center rounded-xl border border-sky-500/20 bg-sky-500/10 text-sky-700 dark:text-sky-300",children:l.jsx(Vb,{className:"h-4 w-4"})}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold",children:h("imageAnalysisStatus.sectionTitle")}),l.jsx(zt,{className:F("h-5 border px-1.5 text-[10px]",g.className),children:g.label})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[VP(h,o,r)," ·"," ",YP(h,m,a)]})]})]})}),l.jsx(rt,{size:"sm",variant:"outline",className:"h-8 shrink-0",asChild:!0,children:l.jsxs(Cl,{to:"/settings?tab=image",children:[h("imageAnalysisStatus.openSettings"),l.jsx(Gb,{className:"ml-1 h-3.5 w-3.5"})]})})]}),l.jsx("div",{className:"mt-3 rounded-xl border bg-muted/15 px-3 py-3",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("div",{className:"text-sm font-medium text-foreground",children:h("imageAnalysisStatus.useNativeImageReading")}),b&&l.jsx(zt,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:b})]}),l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:QP(h,m,a)})]}),l.jsx(GP,{checked:p,onCheckedChange:d,disabled:!d,"aria-label":h("imageAnalysisStatus.useNativeImageReading")})]})}),v&&l.jsx("div",{className:"mt-2 rounded-lg border border-border/70 bg-muted/20 px-3 py-2 text-xs leading-5 text-muted-foreground",children:v})]})}const ZP=S.lazy(()=>it(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function uL({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,settings:r,profileTarget:c="claude",imageAnalysisStatus:d,imageAnalysisStatusSource:h="saved",imageAnalysisStatusPreviewState:p="saved",nativeReadPreferenceOverride:m,onToggleNativeRead:g,onChange:v,missingRequiredFields:b=[]}){const{t:C}=fe(),T=b.length>0;return l.jsx(S.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(An,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:C("profileEditorSections.loadingEditor")})]}),children:l.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[!a&&o!==null&&l.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:[l.jsx(No,{className:"w-4 h-4"}),C("profileEditor.invalidJson")]}),a&&T&&l.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:[l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),l.jsxs("div",{children:[l.jsxs("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:[C("profileEditor.missingFields"),":"]})," ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:b.join(", ")}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:C("profileEditor.missingFieldsHint")})]})]}),l.jsx("div",{className:"min-h-0 flex-1 overflow-hidden px-6 pb-4 pt-4",children:l.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:l.jsx(ZP,{value:n,onChange:v,language:"json",minHeight:"100%",heightMode:"fill-parent"})})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx(XP,{status:d,target:c,source:h,previewState:p,nativeReadPreferenceOverride:m,onToggleNativeRead:g})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx("div",{className:"border rounded-md overflow-hidden",children:l.jsx(Rh,{profileEnv:r?.env})})})]})})}function Ky(n,a){try{var o=n()}catch(r){return a(r)}return o&&o.then?o.then(void 0,a):o}function JP(n,a){for(var o={};n.length;){var r=n[0],c=r.code,d=r.message,h=r.path.join(".");if(!o[h])if("unionErrors"in r){var p=r.unionErrors[0].errors[0];o[h]={message:p.message,type:p.code}}else o[h]={message:d,type:c};if("unionErrors"in r&&r.unionErrors.forEach(function(v){return v.errors.forEach(function(b){return n.push(b)})}),a){var m=o[h].types,g=m&&m[r.code];o[h]=Yb(h,a,o,c,g?[].concat(g,r.message):r.message)}n.shift()}return o}function eM(n,a){for(var o={};n.length;){var r=n[0],c=r.code,d=r.message,h=r.path.join(".");if(!o[h])if(r.code==="invalid_union"&&r.errors.length>0){var p=r.errors[0][0];o[h]={message:p.message,type:p.code}}else o[h]={message:d,type:c};if(r.code==="invalid_union"&&r.errors.forEach(function(v){return v.forEach(function(b){return n.push(b)})}),a){var m=o[h].types,g=m&&m[r.code];o[h]=Yb(h,a,o,c,g?[].concat(g,r.message):r.message)}n.shift()}return o}function tM(n,a,o){if(o===void 0&&(o={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(n))return function(r,c,d){try{return Promise.resolve(Ky(function(){return Promise.resolve(n[o.mode==="sync"?"parse":"parseAsync"](r,a)).then(function(h){return d.shouldUseNativeValidation&&Kg({},d),{errors:{},values:o.raw?Object.assign({},r):h}})},function(h){if((function(p){return Array.isArray(p?.issues)})(h))return{values:{},errors:Gg(JP(h.errors,!d.shouldUseNativeValidation&&d.criteriaMode==="all"),d)};throw h}))}catch(h){return Promise.reject(h)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(n))return function(r,c,d){try{return Promise.resolve(Ky(function(){return Promise.resolve((o.mode==="sync"?Hw:Bw)(n,r,a)).then(function(h){return d.shouldUseNativeValidation&&Kg({},d),{errors:{},values:o.raw?Object.assign({},r):h}})},function(h){if((function(p){return p instanceof Fw})(h))return{values:{},errors:Gg(eM(h.issues,!d.shouldUseNativeValidation&&d.criteriaMode==="all"),d)};throw h}))}catch(h){return Promise.reject(h)}};throw new Error("Invalid input: not a Zod schema")}const nM={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 aM({provider:n,className:a,size:o="md"}){const r=RN(n),c=nM[o],d=fx(n),h=IN(n);return l.jsx("div",{className:F("flex items-center justify-center rounded-md",d&&!h&&(ON(n)?"bg-gray-900 p-1":"bg-white p-1"),c.container,a),children:d?l.jsx("img",{src:d,alt:`${n} logo`,className:F(h?c.container:c.icon,"object-contain")}):l.jsx("span",{className:F("font-semibold",r.textClass,c.text),children:r.letter})})}function dL(){return Nt({queryKey:["profiles"],queryFn:()=>Fe.profiles.list()})}function iM(){const n=lt(),{t:a}=fe();return st({mutationFn:o=>Fe.profiles.create(o),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success(a("toasts.profileCreated"))},onError:o=>{le.error(o.message)}})}function hL(){const n=lt(),{t:a}=fe();return st({mutationFn:o=>Fe.profiles.delete(o),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success(a("toasts.profileDeleted"))},onError:o=>{le.error(o.message)}})}function fL(){return st({mutationFn:()=>Fe.profiles.discoverOrphans()})}function pL(){const n=lt(),{t:a}=fe();return st({mutationFn:o=>Fe.profiles.registerOrphans(o),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success(a("toasts.orphanProfilesComplete"))}})}function mL(){const n=lt(),{t:a}=fe();return st({mutationFn:({name:o,data:r})=>Fe.profiles.copy(o,r),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success(a("toasts.profileCopied"))}})}function gL(){return st({mutationFn:({name:n,includeSecrets:a})=>Fe.profiles.export(n,a??!1)})}function yL(){const n=lt(),{t:a}=fe();return st({mutationFn:o=>Fe.profiles.import(o),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success(a("toasts.profileImported"))}})}const oM="https://openrouter.ai/api",Xx=Object.freeze({glmt:"glm",kimi:"km",alibaba:"alibaba-coding-plan",acp:"alibaba-coding-plan",hf:"huggingface"}),Zx=[{id:"openrouter",name:"OpenRouter",description:"349+ models from OpenAI, Anthropic, Google, Meta",baseUrl:oM,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:"huggingface",name:"Hugging Face",description:"Inference Providers router via OpenAI-compatible chat completions",baseUrl:"https://router.huggingface.co/v1",defaultProfileName:"hf",defaultModel:"openai/gpt-oss-120b:fastest",apiKeyPlaceholder:"hf_...",apiKeyHint:"Create a User Access Token at hf.co/settings/tokens",category:"alternative",requiresApiKey:!0,defaultTarget:"droid",badge:"Router"},{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 Jx(n){return{...n,extraEnv:n.extraEnv?{...n.extraEnv}:void 0}}function rM(n){const a=Jx(n);return a.extraEnv&&Object.freeze(a.extraEnv),Object.freeze(a)}function sM(n,a){const o=new Set;for(const c of n){const d=c.id.trim().toLowerCase();if(c.id!==d)throw new Error(`Preset ID must be normalized: "${c.id}"`);if(o.has(c.id))throw new Error(`Duplicate preset ID detected: "${c.id}"`);o.add(c.id)}const r=new Set;for(const[c,d]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(r.has(h))throw new Error(`Duplicate normalized preset alias detected: "${c}"`);if(r.add(h),!o.has(d))throw new Error(`Preset alias "${c}" points to unknown target "${d}"`);if(o.has(h))throw new Error(`Preset alias "${c}" collides with canonical preset ID "${h}"`)}}sM(Zx,Xx);const lM=Object.freeze(Zx.map(rM));function cM(){return lM.map(Jx)}function uM(n){const a=n.trim().toLowerCase();return Xx[a]||a}const dM=cM(),Oh=Object.freeze(dM.map(n=>({...n})));function hM(n,a){return a||(n?.requiresApiKey===!1?n.apiKeyPlaceholder||n.id:"")}function fM(n){return Oh.filter(a=>a.category===n)}function wd(n){const a=uM(n);return Oh.find(o=>o.id===a)}const pM=Za().refine(n=>n.trim().length===0||Za().url().safeParse(n).success,{message:"Invalid URL format"}),mM=qw({name:Za().min(1,"Name is required").regex(/^[a-zA-Z][a-zA-Z0-9._-]*$/,"Must start with letter, only letters/numbers/.-_"),baseUrl:pM,apiKey:Za(),model:Za().optional(),opusModel:Za().optional(),sonnetModel:Za().optional(),haikuModel:Za().optional(),target:Kw(["claude","droid","codex"])}),gM=["/chat/completions","/v1/messages","/messages","/completions"],ki="custom",kd="openrouter",ev=new Set(["ollama","llamacpp"]),Ad={name:"",baseUrl:"",apiKey:"",model:"",opusModel:"",sonnetModel:"",haikuModel:"",target:"claude"},tv=fM("recommended"),yM=tv.filter(n=>!ev.has(n.id)),bM=tv.filter(n=>ev.has(n.id)),xM=Oh.filter(n=>n.category!=="recommended");function bL({open:n,onOpenChange:a,onSuccess:o,initialMode:r="openrouter"}){const{t:c}=fe(),d=iM(),[h,p]=S.useState("basic"),[m,g]=S.useState(null),[v,b]=S.useState(!1),[C,T]=S.useState(kd),[k,M]=S.useState(""),{models:L}=KP(),{register:E,handleSubmit:N,formState:{errors:D},control:A,reset:P,setValue:w}=Gw({resolver:tM(mM),defaultValues:Ad}),O=Vg({control:A,name:"baseUrl"}),B=Vg({control:A,name:"target"}),_=S.useCallback(W=>{if(!W){P(Ad);return}P({...Ad,name:W.defaultProfileName,baseUrl:W.baseUrl,model:W.defaultModel,opusModel:W.defaultModel,sonnetModel:W.defaultModel,haikuModel:W.defaultModel,target:W.defaultTarget??"claude"})},[P]),K=S.useMemo(()=>C===ki?null:wd(C)??null,[C]),J=S.useMemo(()=>k.trim()?[...RP(L,k)].sort((oe,ue)=>(ue.created??0)-(oe.created??0)).slice(0,20):HP(L,2),[L,k]);S.useEffect(()=>{if(n)if(p("basic"),g(null),b(!1),M(""),r==="normal")T(ki),_(null);else{const oe=wd(r==="openrouter"?kd:r);if(oe){T(oe.id),_(oe);return}T(ki),_(null)}},[n,r,_,P]);const $=W=>{const oe=wd(W);if(oe){T(oe.id),_(oe);return}T(ki),_(null)},be=W=>{w("model",W.id),w("opusModel",W.id),w("sonnetModel",W.id),w("haikuModel",W.id),M(W.name),le.success(c("profileCreateDialog.appliedModelToTiers",{model:W.name}),{duration:2e3})};S.useEffect(()=>{if(O&&C===ki){const oe=O.toLowerCase();for(const ue of gM)if(oe.endsWith(ue)){const pe=O.replace(new RegExp(ue+"$","i"),"");g(`URL ends with "${ue}" - Claude appends this automatically. You likely want: ${pe}`);return}}g(null)},[O,C]);const te=async W=>{if(K?.requiresApiKey!==!1&&!W.apiKey){le.error(me.t("commonToast.apiKeyRequired"));return}const oe={...W,apiKey:hM(K,W.apiKey)};try{await d.mutateAsync(oe),le.success(c("profileCreateDialog.profileCreated",{name:oe.name})),o(oe.name),a(!1)}catch(ue){le.error(ue.message||c("profileCreateDialog.failedCreate"))}},Se=!!D.name||!!D.baseUrl||!!D.apiKey,U=!!D.model||!!D.opusModel||!!D.sonnetModel||!!D.haikuModel,Z=d.isPending,ne=K?.id===kd;return l.jsx(ph,{open:n,onOpenChange:a,children:l.jsxs(mh,{className:"sm:max-w-[700px] p-0 gap-0 overflow-hidden max-h-[90vh] !flex !flex-col",children:[l.jsxs(gh,{className:"p-6 pb-4 border-b",children:[l.jsxs(yh,{className:"flex items-center gap-2",children:[l.jsx(Hg,{className:"w-5 h-5 text-primary"}),c("profileCreateDialog.createProfile")]}),l.jsx(bh,{children:c("profileCreateDialog.chooseProviderHint")})]}),l.jsxs("form",{onSubmit:N(te),className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[l.jsx("div",{className:"border-b bg-muted/10 px-6 py-3 space-y-3",children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(qt,{className:"text-xs text-muted-foreground",children:c("profileEditor.provider")}),l.jsx("p",{className:"text-xs text-muted-foreground",children:c("profileEditor.providerChooserHint")})]}),l.jsx("span",{className:"pt-0.5 text-[11px] text-muted-foreground",children:c("profileEditor.scrollHint")})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{className:"text-xs font-medium uppercase tracking-[0.12em] text-foreground/70",children:c("profileEditor.featuredProviders")}),l.jsx("div",{className:"-mx-1 overflow-x-auto pb-1",children:l.jsxs("div",{className:"flex min-w-max items-stretch gap-2 px-1",children:[yM.map(W=>l.jsx(Nd,{preset:W,isSelected:C===W.id,onClick:()=>$(W.id),density:"featured"},W.id)),l.jsx("div",{className:"mx-1 hidden w-px rounded-full bg-border/70 sm:block"}),l.jsx(vM,{isSelected:C===ki,onClick:()=>$(ki)})]})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{className:"text-xs font-medium uppercase tracking-[0.12em] text-foreground/70",children:c("profileEditor.morePresets")}),l.jsx("div",{className:"-mx-1 overflow-x-auto pb-1",children:l.jsx("div",{className:"flex min-w-max items-stretch gap-2 px-1",children:xM.map(W=>l.jsx(Nd,{preset:W,isSelected:C===W.id,onClick:()=>$(W.id),density:"compact"},W.id))})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{className:"text-xs font-medium uppercase tracking-[0.12em] text-foreground/70",children:c("openrouterQuickStart.localRuntimesTitle")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:bM.map(W=>l.jsx(Nd,{preset:W,isSelected:C===W.id,onClick:()=>$(W.id),density:"compact"},W.id))})]})]})}),l.jsxs(Yx,{value:h,onValueChange:p,className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[l.jsx("div",{className:"px-6 pt-4",children:l.jsxs(Eh,{className:"grid w-full grid-cols-2",children:[l.jsxs(Pl,{value:"basic",className:"relative",children:[c("profileCreateDialog.basicInformation"),Se&&l.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-destructive animate-pulse"})]}),l.jsxs(Pl,{value:"models",className:"relative",children:[c("profileCreateDialog.modelConfiguration"),U&&l.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-destructive animate-pulse"})]})]})}),l.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[l.jsxs(Yd,{value:"basic",className:"p-6 space-y-4 mt-0",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"name",children:[c("profileDialog.name")," ",l.jsx("span",{className:"text-destructive",children:"*"})]}),l.jsx(Hn,{id:"name",...E("name"),placeholder:c("profileDialog.namePlaceholder"),className:"font-mono"}),D.name?l.jsx("p",{className:"text-xs text-destructive",children:D.name.message}):l.jsxs("p",{className:"text-xs text-muted-foreground",children:[c("profileCreateDialog.usedInCli")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:'ccs my-api "prompt"'})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(qt,{htmlFor:"baseUrl",children:c("profileCreateDialog.apiBaseUrl")}),l.jsx(Hn,{id:"baseUrl",...E("baseUrl"),placeholder:c("profileCreateDialog.baseUrlPlaceholder")}),D.baseUrl?l.jsx("p",{className:"text-xs text-destructive",children:D.baseUrl.message}):m?l.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:[l.jsx(Gn,{className:"w-4 h-4 shrink-0 mt-0.5"}),l.jsx("span",{children:m})]}):K?l.jsx("p",{className:"text-xs text-muted-foreground",children:K.baseUrl?c("profileCreateDialog.prefilledFromPreset",{name:K.name}):c("profileCreateDialog.optionalForPreset",{name:K.name})}):l.jsx("p",{className:"text-xs text-muted-foreground",children:c("profileCreateDialog.endpointHint")})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"apiKey",children:[c("profileDialog.apiKey")," ",K?.requiresApiKey!==!1&&l.jsx("span",{className:"text-destructive",children:"*"}),K?.requiresApiKey===!1&&l.jsx("span",{className:"text-muted-foreground text-xs font-normal",children:c("profileCreateDialog.optional")})]}),l.jsxs("div",{className:"relative",children:[l.jsx(Hn,{id:"apiKey",type:v?"text":"password",...E("apiKey"),placeholder:K?.requiresApiKey===!1?c("profileCreateDialog.apiKeyOptionalPlaceholder"):K?.apiKeyPlaceholder??c("profileCreateDialog.apiKeyPlaceholder"),className:"pr-10"}),l.jsx(rt,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-9 w-9 text-muted-foreground hover:text-foreground",onClick:()=>b(!v),tabIndex:-1,children:v?l.jsx(Vr,{className:"h-4 w-4"}):l.jsx(Yr,{className:"h-4 w-4"})})]}),D.apiKey?l.jsx("p",{className:"text-xs text-destructive",children:D.apiKey.message}):K?.requiresApiKey===!1?l.jsx("p",{className:"text-xs text-muted-foreground",children:c("profileCreateDialog.apiKeyOptionalHint")}):K?.apiKeyHint&&l.jsx("p",{className:"text-xs text-muted-foreground",children:K.apiKeyHint})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(qt,{htmlFor:"target",children:c("codex.defaultTargetCli")}),l.jsxs(px,{value:B,onValueChange:W=>w("target",W),children:[l.jsx(wh,{id:"target",children:l.jsx(mx,{})}),l.jsxs(kh,{children:[l.jsx(Ir,{value:"claude",children:c("profileCard.claudeCodeDefault")}),l.jsx(Ir,{value:"droid",children:c("profileCard.factoryDroid")}),l.jsx(Ir,{value:"codex",children:c("profileCard.codexCli")})]})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[B==="droid"?l.jsxs(l.Fragment,{children:[c("profileEditor.targetHintPreferredAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccs-droid"}),"."]}):B==="codex"?l.jsxs(l.Fragment,{children:[c("profileEditor.targetHintPreferredAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccsx"}),"."]}):l.jsxs(l.Fragment,{children:[c("profileEditor.targetHintClaudeDefault")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccs"}),"."]}),B==="droid"?l.jsxs(l.Fragment,{children:[" ",c("profileEditor.targetHintLegacyAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccsd"}),"."]}):B==="codex"?l.jsxs(l.Fragment,{children:[" ",c("profileEditor.targetHintLegacyAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccs-codex"}),"."]}):null," ",c("profileEditor.targetHintOverride")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"--target"}),"."]})]})]}),l.jsxs(Yd,{value:"models",className:"p-6 mt-0 space-y-4",children:[l.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:[l.jsx(Ol,{className:"w-5 h-5 shrink-0 mt-0.5"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium mb-1",children:c("profileCreateDialog.modelMapping")}),l.jsx("p",{className:"text-xs opacity-90",children:c("profileCreateDialog.modelMappingDesc")})]})]}),ne&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{children:c("openrouterModelPicker.searchModels")}),l.jsx(Hn,{value:k,onChange:W=>M(W.target.value),placeholder:c("profileCreateDialog.searchModelsPlaceholder"),onKeyDown:W=>{W.key==="Enter"&&J.length>0&&(W.preventDefault(),be(J[0]))}}),l.jsx("div",{className:"border rounded-md max-h-48 overflow-y-auto",children:J.length===0?l.jsx("p",{className:"text-sm text-muted-foreground p-3 text-center",children:k?c("profileCreateDialog.noModelsFound",{query:k}):c("profileCreateDialog.loadingModels")}):l.jsxs("div",{className:"p-1",children:[!k&&l.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground",children:[l.jsx(ew,{className:"w-3 h-3 text-accent"}),l.jsx("span",{children:c("openrouterModelPicker.newestModels")})]}),J.map(W=>l.jsx(CM,{model:W,onClick:()=>be(W),showAge:!k},W.id))]})})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"model",children:[c("profileCreateDialog.defaultModel"),l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"ANTHROPIC_MODEL"})]}),l.jsx(Hn,{id:"model",...E("model"),placeholder:K?.defaultModel??"claude-sonnet-4",className:"font-mono text-sm"})]}),l.jsxs("div",{className:"grid gap-3 pt-2 border-t",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"sonnetModel",className:"text-sm",children:[c("profileCreateDialog.sonnetMapping"),l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_SONNET"})]}),l.jsx(Hn,{id:"sonnetModel",...E("sonnetModel"),placeholder:c("profileCreateDialog.sonnetMappingPlaceholder"),className:"font-mono text-sm h-9"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"opusModel",className:"text-sm",children:[c("profileCreateDialog.opusMapping"),l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_OPUS"})]}),l.jsx(Hn,{id:"opusModel",...E("opusModel"),placeholder:c("profileCreateDialog.opusMappingPlaceholder"),className:"font-mono text-sm h-9"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"haikuModel",className:"text-sm",children:[c("profileCreateDialog.haikuMapping"),l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_HAIKU"})]}),l.jsx(Hn,{id:"haikuModel",...E("haikuModel"),placeholder:c("profileCreateDialog.haikuMappingPlaceholder"),className:"font-mono text-sm h-9"})]})]})]})]})]}),l.jsxs(kN,{className:"p-6 pt-4 border-t bg-muted/10",children:[l.jsx(rt,{type:"button",variant:"outline",onClick:()=>a(!1),children:c("profileDialog.cancel")}),l.jsx(rt,{type:"submit",disabled:Z,className:F(Z&&"opacity-80"),children:Z?l.jsxs(l.Fragment,{children:[l.jsx(An,{className:"w-4 h-4 mr-2 animate-spin"}),c("cliproxyDialog.creating")]}):l.jsxs(l.Fragment,{children:[l.jsx(Hg,{className:"w-4 h-4 mr-2"}),c("profileCreateDialog.createProfile")]})})]})]})]})]})})}function Nd({preset:n,isSelected:a,onClick:o,density:r="compact"}){const c=n.id==="anthropic",d=r==="featured";return l.jsxs("button",{type:"button",onClick:o,className:F("flex flex-none items-center gap-3 rounded-xl border px-3 py-2.5 text-left transition-all",d?"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:[l.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border/60 bg-background",children:c?l.jsx(aM,{provider:"claude",size:"md",className:"rounded-lg"}):n.icon?l.jsx("img",{src:n.icon,alt:"",className:"h-5 w-5 object-contain"}):l.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)})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("div",{className:"truncate text-[13px] font-semibold leading-tight tracking-[-0.01em]",children:n.name}),n.badge&&d&&l.jsx(zt,{variant:"secondary",className:"inline-flex bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:n.badge})]}),n.badge&&!d&&l.jsx(zt,{variant:"secondary",className:"inline-flex w-fit bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:n.badge})]})]})}function vM({isSelected:n,onClick:a}){const{t:o}=fe();return l.jsxs("button",{type:"button",onClick:a,className:F("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:[l.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:l.jsx(ah,{className:"h-4 w-4 text-muted-foreground"})}),l.jsx("div",{className:"min-w-0 flex-1",children:l.jsx("div",{className:"text-sm font-semibold leading-tight",children:o("profileEditor.customEndpoint")})})]})}function CM({model:n,onClick:a,showAge:o}){const{t:r}=fe();return l.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:[l.jsx("span",{className:"flex-1 truncate",children:n.name}),l.jsxs("span",{className:"text-muted-foreground group-hover:text-accent-foreground/80 ml-2 flex items-center gap-2 text-xs",children:[o&&n.created&&l.jsx(zt,{variant:"outline",className:"text-[10px] text-accent group-hover:text-accent-foreground/80 group-hover:border-accent-foreground/30",children:BP(n.created)}),n.isFree?l.jsx(zt,{variant:"secondary",className:"text-xs group-hover:bg-accent-foreground/20 group-hover:text-accent-foreground",children:r("profileCreateDialog.free")}):l.jsx("span",{children:jP(n.pricing)}),l.jsx("span",{children:UP(n.context_length)})]})]})}function SM({className:n,...a}){return l.jsx("div",{"data-slot":"card",className:F("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function wM({className:n,...a}){return l.jsx("div",{"data-slot":"card-header",className:F("@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 kM({className:n,...a}){return l.jsx("div",{"data-slot":"card-title",className:F("leading-none font-semibold",n),...a})}function AM({className:n,...a}){return l.jsx("div",{"data-slot":"card-description",className:F("text-muted-foreground text-sm",n),...a})}function NM({className:n,...a}){return l.jsx("div",{"data-slot":"card-content",className:F("px-6",n),...a})}const Ih="[1m]",_h=["ANTHROPIC_MODEL","ANTHROPIC_DEFAULT_OPUS_MODEL","ANTHROPIC_DEFAULT_SONNET_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL"],DM=new Set(_h);function xL(n){return n.toLowerCase().startsWith("gemini-")}function Uh(n){return n.toLowerCase().endsWith(Ih.toLowerCase())}function TM(n){return!n||Uh(n)?n:`${n}${Ih}`}function nv(n){return n&&(Uh(n)?n.slice(0,-Ih.length):n)}function vL(n){return DM.has(n)}function PM(n){return nv(n.trim()).replace(/\([^)]+\)$/,"")}function CL(n){return _h.some(a=>{const o=n[a];return typeof o=="string"&&Uh(o)})}function SL(n,a,o={}){const r={...n};for(const c of _h){const d=r[c];if(typeof d!="string"||d.trim().length===0)continue;const h=PM(d),p=o.supportsExtendedContext?.(h,c)??!0;r[c]=a&&p?TM(d):nv(d)}return r}const MM=["agy","claude","gemini","codex","qwen","kimi","iflow","kiro","ghcp"],wL=MM.map(n=>({id:n,name:Sh(n),description:UN(n)})),jM=["provider","auth","variant","success"];function kL(n){return n==="account"?1:jM.indexOf(n)}const AL=mS,NL=yS,DL=gS,EM=S.forwardRef(({className:n,align:a="center",sideOffset:o=4,...r},c)=>l.jsx(pS,{children:l.jsx(Eb,{ref:c,align:a,sideOffset:o,className:F("z-50 w-80 max-w-[calc(100vw-2rem)] rounded-lg border border-border/70 bg-popover p-4 text-popover-foreground shadow-xl shadow-black/10 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),...r})}));EM.displayName=Eb.displayName;const LM=S.lazy(()=>it(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function TL({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,onRawJsonChange:r,profileEnv:c,missingRequiredFields:d=[]}){const{t:h}=fe(),p=d.length>0;return l.jsx(S.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(An,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:h("providerEditor.loadingEditor")})]}),children:l.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[!a&&o!==null&&l.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:[l.jsx(No,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&p&&l.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:[l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:d.join(", ")}),l.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."})]})]}),l.jsx("div",{className:"min-h-0 flex-1 overflow-hidden px-6 pb-4 pt-4",children:l.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:l.jsx(LM,{value:n,onChange:r,language:"json",minHeight:"100%",heightMode:"fill-parent"})})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx("div",{className:"border rounded-md overflow-hidden",children:l.jsx(Rh,{profileEnv:c})})})]})})}var Xt={},Gy;function RM(){if(Gy)return Xt;Gy=1;var n=Xt&&Xt.__assign||function(){return n=Object.assign||function(P){for(var w,O=1,B=arguments.length;O<B;O++){w=arguments[O];for(var _ in w)Object.prototype.hasOwnProperty.call(w,_)&&(P[_]=w[_])}return P},n.apply(this,arguments)},a=Xt&&Xt.__createBinding||(Object.create?(function(P,w,O,B){B===void 0&&(B=O);var _=Object.getOwnPropertyDescriptor(w,O);(!_||("get"in _?!w.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return w[O]}}),Object.defineProperty(P,B,_)}):(function(P,w,O,B){B===void 0&&(B=O),P[B]=w[O]})),o=Xt&&Xt.__setModuleDefault||(Object.create?(function(P,w){Object.defineProperty(P,"default",{enumerable:!0,value:w})}):function(P,w){P.default=w}),r=Xt&&Xt.__importStar||function(P){if(P&&P.__esModule)return P;var w={};if(P!=null)for(var O in P)O!=="default"&&Object.prototype.hasOwnProperty.call(P,O)&&a(w,P,O);return o(w,P),w},c=Xt&&Xt.__rest||function(P,w){var O={};for(var B in P)Object.prototype.hasOwnProperty.call(P,B)&&w.indexOf(B)<0&&(O[B]=P[B]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,B=Object.getOwnPropertySymbols(P);_<B.length;_++)w.indexOf(B[_])<0&&Object.prototype.propertyIsEnumerable.call(P,B[_])&&(O[B[_]]=P[B[_]]);return O};Object.defineProperty(Xt,"__esModule",{value:!0});var d=r(Zd()),h=89,p=90,m=77,g=57,v=219,b=222,C=192,T=100,k=3e3,M=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),L=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),E="npm__react-simple-code-editor__textarea",N=`
18
+ /**
19
+ * Reset the text fill color so that placeholder is visible
20
+ */
21
+ .`.concat(E,`:empty {
22
+ -webkit-text-fill-color: inherit !important;
23
+ }
24
+
25
+ /**
26
+ * Hack to apply on some CSS on IE10 and IE11
27
+ */
28
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
29
+ /**
30
+ * IE doesn't support '-webkit-text-fill-color'
31
+ * So we use 'color: transparent' to make the text transparent on IE
32
+ * Unlike other browsers, it doesn't affect caret color in IE
33
+ */
34
+ .`).concat(E,` {
35
+ color: transparent !important;
36
+ }
37
+
38
+ .`).concat(E,`::selection {
39
+ background-color: #accef7 !important;
40
+ color: transparent !important;
41
+ }
42
+ }
43
+ `),D=d.forwardRef(function(w,O){var B=w.autoFocus,_=w.disabled,K=w.form,J=w.highlight,$=w.ignoreTabKey,be=$===void 0?!1:$,te=w.insertSpaces,Se=te===void 0?!0:te,U=w.maxLength,Z=w.minLength,ne=w.name,W=w.onBlur,oe=w.onClick,ue=w.onFocus,pe=w.onKeyDown,X=w.onKeyUp,ae=w.onValueChange,de=w.padding,ie=de===void 0?0:de,se=w.placeholder,xe=w.preClassName,Pe=w.readOnly,ze=w.required,Ze=w.style,we=w.tabSize,Re=we===void 0?2:we,Ve=w.textareaClassName,Tt=w.textareaId,Et=w.value,Yn=c(w,["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"]),je=d.useRef({stack:[],offset:-1}),Jt=d.useRef(null),Ln=d.useState(!0),en=Ln[0],Da=Ln[1],Wn={paddingTop:typeof ie=="object"?ie.top:ie,paddingRight:typeof ie=="object"?ie.right:ie,paddingBottom:typeof ie=="object"?ie.bottom:ie,paddingLeft:typeof ie=="object"?ie.left:ie},bt=J(Et),tn=function(ee,Oe){return ee.substring(0,Oe).split(`
44
+ `)},Qn=d.useCallback(function(ee,Oe){var ke,Ie,ht;Oe===void 0&&(Oe=!1);var ye=je.current,Me=ye.stack,Ae=ye.offset;if(Me.length&&Ae>-1){je.current.stack=Me.slice(0,Ae+1);var _e=je.current.stack.length;if(_e>T){var ct=_e-T;je.current.stack=Me.slice(ct,_e),je.current.offset=Math.max(je.current.offset-ct,0)}}var De=Date.now();if(Oe){var Ht=je.current.stack[je.current.offset];if(Ht&&De-Ht.timestamp<k){var Xn=/[^a-z0-9]([a-z0-9]+)$/i,Pt=(ke=tn(Ht.value,Ht.selectionStart).pop())===null||ke===void 0?void 0:ke.match(Xn),nn=(Ie=tn(ee.value,ee.selectionStart).pop())===null||Ie===void 0?void 0:Ie.match(Xn);if(Pt?.[1]&&(!((ht=nn?.[1])===null||ht===void 0)&&ht.startsWith(Pt[1]))){je.current.stack[je.current.offset]=n(n({},ee),{timestamp:De});return}}}je.current.stack.push(n(n({},ee),{timestamp:De})),je.current.offset++},[]),ni=d.useCallback(function(){var ee=Jt.current;if(ee){var Oe=ee.value,ke=ee.selectionStart,Ie=ee.selectionEnd;Qn({value:Oe,selectionStart:ke,selectionEnd:Ie})}},[Qn]),Rn=function(ee){var Oe=Jt.current;Oe&&(Oe.value=ee.value,Oe.selectionStart=ee.selectionStart,Oe.selectionEnd=ee.selectionEnd,ae?.(ee.value))},On=function(ee){var Oe=Jt.current,ke=je.current.stack[je.current.offset];ke&&Oe&&(je.current.stack[je.current.offset]=n(n({},ke),{selectionStart:Oe.selectionStart,selectionEnd:Oe.selectionEnd})),Qn(ee),Rn(ee)},ji=function(){var ee=je.current,Oe=ee.stack,ke=ee.offset,Ie=Oe[ke-1];Ie&&(Rn(Ie),je.current.offset=Math.max(ke-1,0))},To=function(){var ee=je.current,Oe=ee.stack,ke=ee.offset,Ie=Oe[ke+1];Ie&&(Rn(Ie),je.current.offset=Math.min(ke+1,Oe.length-1))},Po=function(ee){if(!(pe&&(pe(ee),ee.defaultPrevented))){ee.key==="Escape"&&ee.currentTarget.blur();var Oe=ee.currentTarget,ke=Oe.value,Ie=Oe.selectionStart,ht=Oe.selectionEnd,ye=(Se?" ":" ").repeat(Re);if(ee.key==="Tab"&&!be&&en)if(ee.preventDefault(),ee.shiftKey){var Me=tn(ke,Ie),Ae=Me.length-1,_e=tn(ke,ht).length-1,ct=ke.split(`
45
+ `).map(function(Zn,Ei){return Ei>=Ae&&Ei<=_e&&Zn.startsWith(ye)?Zn.substring(ye.length):Zn}).join(`
46
+ `);if(ke!==ct){var De=Me[Ae];On({value:ct,selectionStart:De?.startsWith(ye)?Ie-ye.length:Ie,selectionEnd:ht-(ke.length-ct.length)})}}else if(Ie!==ht){var Me=tn(ke,Ie),Ht=Me.length-1,Xn=tn(ke,ht).length-1,De=Me[Ht];On({value:ke.split(`
47
+ `).map(function(Eo,Lo){return Lo>=Ht&&Lo<=Xn?ye+Eo:Eo}).join(`
48
+ `),selectionStart:De&&/\S/.test(De)?Ie+ye.length:Ie,selectionEnd:ht+ye.length*(Xn-Ht+1)})}else{var Pt=Ie+ye.length;On({value:ke.substring(0,Ie)+ye+ke.substring(ht),selectionStart:Pt,selectionEnd:Pt})}else if(ee.key==="Backspace"){var nn=Ie!==ht,Nn=ke.substring(0,Ie);if(Nn.endsWith(ye)&&!nn){ee.preventDefault();var Pt=Ie-ye.length;On({value:ke.substring(0,Ie-ye.length)+ke.substring(ht),selectionStart:Pt,selectionEnd:Pt})}}else if(ee.key==="Enter"){if(Ie===ht){var Mo=tn(ke,Ie).pop(),ai=Mo?.match(/^\s+/);if(ai?.[0]){ee.preventDefault();var jo=`
49
+ `+ai[0],Pt=Ie+jo.length;On({value:ke.substring(0,Ie)+jo+ke.substring(ht),selectionStart:Pt,selectionEnd:Pt})}}}else if(ee.keyCode===g||ee.keyCode===v||ee.keyCode===b||ee.keyCode===C){var pn=void 0;ee.keyCode===g&&ee.shiftKey?pn=["(",")"]:ee.keyCode===v?ee.shiftKey?pn=["{","}"]:pn=["[","]"]:ee.keyCode===b?ee.shiftKey?pn=['"','"']:pn=["'","'"]:ee.keyCode===C&&!ee.shiftKey&&(pn=["`","`"]),Ie!==ht&&pn&&(ee.preventDefault(),On({value:ke.substring(0,Ie)+pn[0]+ke.substring(Ie,ht)+pn[1]+ke.substring(ht),selectionStart:Ie,selectionEnd:ht+2}))}else(L?ee.metaKey&&ee.keyCode===p:ee.ctrlKey&&ee.keyCode===p)&&!ee.shiftKey&&!ee.altKey?(ee.preventDefault(),ji()):(L?ee.metaKey&&ee.keyCode===p&&ee.shiftKey:M?ee.ctrlKey&&ee.keyCode===h:ee.ctrlKey&&ee.keyCode===p&&ee.shiftKey)&&!ee.altKey?(ee.preventDefault(),To()):ee.keyCode===m&&ee.ctrlKey&&(!L||ee.shiftKey)&&(ee.preventDefault(),Da(function(Zn){return!Zn}))}},$n=function(ee){var Oe=ee.currentTarget,ke=Oe.value,Ie=Oe.selectionStart,ht=Oe.selectionEnd;Qn({value:ke,selectionStart:Ie,selectionEnd:ht},!0),ae(ke)};return d.useEffect(function(){ni()},[ni]),d.useImperativeHandle(O,function(){return{get session(){return{history:je.current}},set session(ee){je.current=ee.history}}},[]),d.createElement("div",n({},Yn,{style:n(n({},A.container),Ze)}),d.createElement("pre",n({className:xe,"aria-hidden":"true",style:n(n(n({},A.editor),A.highlight),Wn)},typeof bt=="string"?{dangerouslySetInnerHTML:{__html:bt+"<br />"}}:{children:bt})),d.createElement("textarea",{ref:function(ee){return Jt.current=ee},style:n(n(n({},A.editor),A.textarea),Wn),className:E+(Ve?" ".concat(Ve):""),id:Tt,value:Et,onChange:$n,onKeyDown:Po,onClick:oe,onKeyUp:X,onFocus:ue,onBlur:W,disabled:_,form:K,maxLength:U,minLength:Z,name:ne,placeholder:se,readOnly:Pe,required:ze,autoFocus:B,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),d.createElement("style",{dangerouslySetInnerHTML:{__html:N}}))}),A={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 Xt.default=D,Xt}var OM=RM();const IM=Lb(OM);var Dd={exports:{}},Vy;function _M(){return Vy||(Vy=1,(function(n){var a=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var o=(function(r){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,h={},p={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function N(D){return D instanceof m?new m(D.type,N(D.content),D.alias):Array.isArray(D)?D.map(N):D.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(N){return Object.prototype.toString.call(N).slice(8,-1)},objId:function(N){return N.__id||Object.defineProperty(N,"__id",{value:++d}),N.__id},clone:function N(D,A){A=A||{};var P,w;switch(p.util.type(D)){case"Object":if(w=p.util.objId(D),A[w])return A[w];P={},A[w]=P;for(var O in D)D.hasOwnProperty(O)&&(P[O]=N(D[O],A));return P;case"Array":return w=p.util.objId(D),A[w]?A[w]:(P=[],A[w]=P,D.forEach(function(B,_){P[_]=N(B,A)}),P);default:return D}},getLanguage:function(N){for(;N;){var D=c.exec(N.className);if(D)return D[1].toLowerCase();N=N.parentElement}return"none"},setLanguage:function(N,D){N.className=N.className.replace(RegExp(c,"gi"),""),N.classList.add("language-"+D)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(P){var N=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(P.stack)||[])[1];if(N){var D=document.getElementsByTagName("script");for(var A in D)if(D[A].src==N)return D[A]}return null}},isActive:function(N,D,A){for(var P="no-"+D;N;){var w=N.classList;if(w.contains(D))return!0;if(w.contains(P))return!1;N=N.parentElement}return!!A}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(N,D){var A=p.util.clone(p.languages[N]);for(var P in D)A[P]=D[P];return A},insertBefore:function(N,D,A,P){P=P||p.languages;var w=P[N],O={};for(var B in w)if(w.hasOwnProperty(B)){if(B==D)for(var _ in A)A.hasOwnProperty(_)&&(O[_]=A[_]);A.hasOwnProperty(B)||(O[B]=w[B])}var K=P[N];return P[N]=O,p.languages.DFS(p.languages,function(J,$){$===K&&J!=N&&(this[J]=O)}),O},DFS:function N(D,A,P,w){w=w||{};var O=p.util.objId;for(var B in D)if(D.hasOwnProperty(B)){A.call(D,B,D[B],P||B);var _=D[B],K=p.util.type(_);K==="Object"&&!w[O(_)]?(w[O(_)]=!0,N(_,A,null,w)):K==="Array"&&!w[O(_)]&&(w[O(_)]=!0,N(_,A,B,w))}}},plugins:{},highlightAll:function(N,D){p.highlightAllUnder(document,N,D)},highlightAllUnder:function(N,D,A){var P={callback:A,container:N,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};p.hooks.run("before-highlightall",P),P.elements=Array.prototype.slice.apply(P.container.querySelectorAll(P.selector)),p.hooks.run("before-all-elements-highlight",P);for(var w=0,O;O=P.elements[w++];)p.highlightElement(O,D===!0,P.callback)},highlightElement:function(N,D,A){var P=p.util.getLanguage(N),w=p.languages[P];p.util.setLanguage(N,P);var O=N.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&p.util.setLanguage(O,P);var B=N.textContent,_={element:N,language:P,grammar:w,code:B};function K($){_.highlightedCode=$,p.hooks.run("before-insert",_),_.element.innerHTML=_.highlightedCode,p.hooks.run("after-highlight",_),p.hooks.run("complete",_),A&&A.call(_.element)}if(p.hooks.run("before-sanity-check",_),O=_.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!_.code){p.hooks.run("complete",_),A&&A.call(_.element);return}if(p.hooks.run("before-highlight",_),!_.grammar){K(p.util.encode(_.code));return}if(D&&r.Worker){var J=new Worker(p.filename);J.onmessage=function($){K($.data)},J.postMessage(JSON.stringify({language:_.language,code:_.code,immediateClose:!0}))}else K(p.highlight(_.code,_.grammar,_.language))},highlight:function(N,D,A){var P={code:N,grammar:D,language:A};if(p.hooks.run("before-tokenize",P),!P.grammar)throw new Error('The language "'+P.language+'" has no grammar.');return P.tokens=p.tokenize(P.code,P.grammar),p.hooks.run("after-tokenize",P),m.stringify(p.util.encode(P.tokens),P.language)},tokenize:function(N,D){var A=D.rest;if(A){for(var P in A)D[P]=A[P];delete D.rest}var w=new b;return C(w,w.head,N),v(N,w,D,w.head,0),k(w)},hooks:{all:{},add:function(N,D){var A=p.hooks.all;A[N]=A[N]||[],A[N].push(D)},run:function(N,D){var A=p.hooks.all[N];if(!(!A||!A.length))for(var P=0,w;w=A[P++];)w(D)}},Token:m};r.Prism=p;function m(N,D,A,P){this.type=N,this.content=D,this.alias=A,this.length=(P||"").length|0}m.stringify=function N(D,A){if(typeof D=="string")return D;if(Array.isArray(D)){var P="";return D.forEach(function(K){P+=N(K,A)}),P}var w={type:D.type,content:N(D.content,A),tag:"span",classes:["token",D.type],attributes:{},language:A},O=D.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(w.classes,O):w.classes.push(O)),p.hooks.run("wrap",w);var B="";for(var _ in w.attributes)B+=" "+_+'="'+(w.attributes[_]||"").replace(/"/g,"&quot;")+'"';return"<"+w.tag+' class="'+w.classes.join(" ")+'"'+B+">"+w.content+"</"+w.tag+">"};function g(N,D,A,P){N.lastIndex=D;var w=N.exec(A);if(w&&P&&w[1]){var O=w[1].length;w.index+=O,w[0]=w[0].slice(O)}return w}function v(N,D,A,P,w,O){for(var B in A)if(!(!A.hasOwnProperty(B)||!A[B])){var _=A[B];_=Array.isArray(_)?_:[_];for(var K=0;K<_.length;++K){if(O&&O.cause==B+","+K)return;var J=_[K],$=J.inside,be=!!J.lookbehind,te=!!J.greedy,Se=J.alias;if(te&&!J.pattern.global){var U=J.pattern.toString().match(/[imsuy]*$/)[0];J.pattern=RegExp(J.pattern.source,U+"g")}for(var Z=J.pattern||J,ne=P.next,W=w;ne!==D.tail&&!(O&&W>=O.reach);W+=ne.value.length,ne=ne.next){var oe=ne.value;if(D.length>N.length)return;if(!(oe instanceof m)){var ue=1,pe;if(te){if(pe=g(Z,W,N,be),!pe||pe.index>=N.length)break;var ie=pe.index,X=pe.index+pe[0].length,ae=W;for(ae+=ne.value.length;ie>=ae;)ne=ne.next,ae+=ne.value.length;if(ae-=ne.value.length,W=ae,ne.value instanceof m)continue;for(var de=ne;de!==D.tail&&(ae<X||typeof de.value=="string");de=de.next)ue++,ae+=de.value.length;ue--,oe=N.slice(W,ae),pe.index-=W}else if(pe=g(Z,0,oe,be),!pe)continue;var ie=pe.index,se=pe[0],xe=oe.slice(0,ie),Pe=oe.slice(ie+se.length),ze=W+oe.length;O&&ze>O.reach&&(O.reach=ze);var Ze=ne.prev;xe&&(Ze=C(D,Ze,xe),W+=xe.length),T(D,Ze,ue);var we=new m(B,$?p.tokenize(se,$):se,Se,se);if(ne=C(D,Ze,we),Pe&&C(D,ne,Pe),ue>1){var Re={cause:B+","+K,reach:ze};v(N,D,A,ne.prev,W,Re),O&&Re.reach>O.reach&&(O.reach=Re.reach)}}}}}}function b(){var N={value:null,prev:null,next:null},D={value:null,prev:N,next:null};N.next=D,this.head=N,this.tail=D,this.length=0}function C(N,D,A){var P=D.next,w={value:A,prev:D,next:P};return D.next=w,P.prev=w,N.length++,w}function T(N,D,A){for(var P=D.next,w=0;w<A&&P!==N.tail;w++)P=P.next;D.next=P,P.prev=D,N.length-=w}function k(N){for(var D=[],A=N.head.next;A!==N.tail;)D.push(A.value),A=A.next;return D}if(!r.document)return r.addEventListener&&(p.disableWorkerMessageHandler||r.addEventListener("message",function(N){var D=JSON.parse(N.data),A=D.language,P=D.code,w=D.immediateClose;r.postMessage(p.highlight(P,p.languages[A],A)),w&&r.close()},!1)),p;var M=p.util.currentScript();M&&(p.filename=M.src,M.hasAttribute("data-manual")&&(p.manual=!0));function L(){p.manual||p.highlightAll()}if(!p.manual){var E=document.readyState;E==="loading"||E==="interactive"&&M&&M.defer?document.addEventListener("DOMContentLoaded",L):window.requestAnimationFrame?window.requestAnimationFrame(L):window.setTimeout(L,16)}return p})(a);n.exports&&(n.exports=o),typeof Ig<"u"&&(Ig.Prism=o),o.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},o.languages.markup.tag.inside["attr-value"].inside.entity=o.languages.markup.entity,o.languages.markup.doctype.inside["internal-subset"].inside=o.languages.markup,o.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(c,d){var h={};h["language-"+d]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:o.languages[d]},h.cdata=/^<!\[CDATA\[|\]\]>$/i;var p={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:h}};p["language-"+d]={pattern:/[\s\S]+/,inside:o.languages[d]};var m={};m[c]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return c}),"i"),lookbehind:!0,greedy:!0,inside:p},o.languages.insertBefore("markup","cdata",m)}}),Object.defineProperty(o.languages.markup.tag,"addAttribute",{value:function(r,c){o.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[c,"language-"+c],inside:o.languages[c]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),o.languages.html=o.languages.markup,o.languages.mathml=o.languages.markup,o.languages.svg=o.languages.markup,o.languages.xml=o.languages.extend("markup",{}),o.languages.ssml=o.languages.xml,o.languages.atom=o.languages.xml,o.languages.rss=o.languages.xml,(function(r){var c=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+c.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+c.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+c.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+c.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:c,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var d=r.languages.markup;d&&(d.tag.addInlined("style","css"),d.tag.addAttribute("style","css"))})(o),o.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},o.languages.javascript=o.languages.extend("clike",{"class-name":[o.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),o.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,o.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:o.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:o.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:o.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:o.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:o.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),o.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:o.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),o.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),o.languages.markup&&(o.languages.markup.tag.addInlined("script","javascript"),o.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),o.languages.js=o.languages.javascript,(function(){if(typeof o>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",c=function(M,L){return"✖ Error "+M+" while fetching file: "+L},d="✖ Error: File does not exist or is empty",h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},p="data-src-status",m="loading",g="loaded",v="failed",b="pre[data-src]:not(["+p+'="'+g+'"]):not(['+p+'="'+m+'"])';function C(M,L,E){var N=new XMLHttpRequest;N.open("GET",M,!0),N.onreadystatechange=function(){N.readyState==4&&(N.status<400&&N.responseText?L(N.responseText):N.status>=400?E(c(N.status,N.statusText)):E(d))},N.send(null)}function T(M){var L=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(M||"");if(L){var E=Number(L[1]),N=L[2],D=L[3];return N?D?[E,Number(D)]:[E,void 0]:[E,E]}}o.hooks.add("before-highlightall",function(M){M.selector+=", "+b}),o.hooks.add("before-sanity-check",function(M){var L=M.element;if(L.matches(b)){M.code="",L.setAttribute(p,m);var E=L.appendChild(document.createElement("CODE"));E.textContent=r;var N=L.getAttribute("data-src"),D=M.language;if(D==="none"){var A=(/\.(\w+)$/.exec(N)||[,"none"])[1];D=h[A]||A}o.util.setLanguage(E,D),o.util.setLanguage(L,D);var P=o.plugins.autoloader;P&&P.loadLanguages(D),C(N,function(w){L.setAttribute(p,g);var O=T(L.getAttribute("data-range"));if(O){var B=w.split(/\r\n?|\n/g),_=O[0],K=O[1]==null?B.length:O[1];_<0&&(_+=B.length),_=Math.max(0,Math.min(_-1,B.length)),K<0&&(K+=B.length),K=Math.max(0,Math.min(K,B.length)),w=B.slice(_,K).join(`
50
+ `),L.hasAttribute("data-start")||L.setAttribute("data-start",String(_+1))}E.textContent=w,o.highlightElement(E)},function(w){L.setAttribute(p,v),E.textContent=w})}}),o.plugins.fileHighlight={highlight:function(L){for(var E=(L||document).querySelectorAll(b),N=0,D;D=E[N++];)o.highlightElement(D)}};var k=!1;o.fileHighlight=function(){k||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),k=!0),o.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Dd)),Dd.exports}var UM=_M();const zM=Lb(UM);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(n){var a=/[*&][^\s[\]{},]+/,o=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+o.source+"(?:[ ]+"+a.source+")?|"+a.source+"(?:[ ]+"+o.source+")?)",c=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),d=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function h(p,m){m=(m||"").replace(/m/g,"")+"m";var g=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return p});return RegExp(g,m)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+c+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:h(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:h(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:h(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:h(d),lookbehind:!0,greedy:!0},number:{pattern:h(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:o,important:a,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(Prism);(function(n){var a=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function o(r){return r.replace(/__/g,function(){return a})}n.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(o(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(o(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(Prism);function HM(n,a){let o=n.slice(0,a).split(/\r\n|\n|\r/g);return[o.length,o.pop().length+1]}function BM(n,a,o){let r=n.split(/\r\n|\n|\r/g),c="",d=(Math.log10(a+1)|0)+1;for(let h=a-1;h<=a+1;h++){let p=r[h-1];p&&(c+=h.toString().padEnd(d," "),c+=": ",c+=p,c+=`
51
+ `,h===a&&(c+=" ".repeat(d+o+2),c+=`^
52
+ `))}return c}class Ye extends Error{line;column;codeblock;constructor(a,o){const[r,c]=HM(o.toml,o.ptr),d=BM(o.toml,r,c);super(`Invalid TOML document: ${a}
53
+
54
+ ${d}`,o),this.line=r,this.column=c,this.codeblock=d}}function FM(n,a){let o=0;for(;n[a-++o]==="\\";);return--o&&o%2}function Qd(n,a=0,o=n.length){let r=n.indexOf(`
55
+ `,a);return n[r-1]==="\r"&&r--,r<=o?r:-1}function Ql(n,a){for(let o=a;o<n.length;o++){let r=n[o];if(r===`
56
+ `)return o;if(r==="\r"&&n[o+1]===`
57
+ `)return o+1;if(r<" "&&r!==" "||r==="")throw new Ye("control characters are not allowed in comments",{toml:n,ptr:a})}return n.length}function Ca(n,a,o,r){let c;for(;;){for(;(c=n[a])===" "||c===" "||!o&&(c===`
58
+ `||c==="\r"&&n[a+1]===`
59
+ `);)a++;if(r||c!=="#")break;a=Ql(n,a)}return a}function qM(n,a,o,r,c=!1){if(!r)return a=Qd(n,a),a<0?n.length:a;for(let d=a;d<n.length;d++){let h=n[d];if(h==="#")d=Qd(n,d);else{if(h===o)return d+1;if(h===r||c&&(h===`
60
+ `||h==="\r"&&n[d+1]===`
61
+ `))return d}}throw new Ye("cannot find end of structure",{toml:n,ptr:a})}function av(n,a){let o=n[a],r=o===n[a+1]&&n[a+1]===n[a+2]?n.slice(a,a+3):o;a+=r.length-1;do a=n.indexOf(r,++a);while(a>-1&&o!=="'"&&FM(n,a));return a>-1&&(a+=r.length,r.length>1&&(n[a]===o&&a++,n[a]===o&&a++)),a}let KM=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;class Co extends Date{#t=!1;#n=!1;#e=null;constructor(a){let o=!0,r=!0,c="Z";if(typeof a=="string"){let d=a.match(KM);d?(d[1]||(o=!1,a=`0000-01-01T${a}`),r=!!d[2],r&&a[10]===" "&&(a=a.replace(" ","T")),d[2]&&+d[2]>23?a="":(c=d[3]||null,a=a.toUpperCase(),!c&&r&&(a+="Z"))):a=""}super(a),isNaN(this.getTime())||(this.#t=o,this.#n=r,this.#e=c)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let a=super.toISOString();if(this.isDate())return a.slice(0,10);if(this.isTime())return a.slice(11,23);if(this.#e===null)return a.slice(0,-1);if(this.#e==="Z")return a;let o=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return o=this.#e[0]==="-"?o:-o,new Date(this.getTime()-o*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(a,o="Z"){let r=new Co(a);return r.#e=o,r}static wrapAsLocalDateTime(a){let o=new Co(a);return o.#e=null,o}static wrapAsLocalDate(a){let o=new Co(a);return o.#n=!1,o.#e=null,o}static wrapAsLocalTime(a){let o=new Co(a);return o.#t=!1,o.#e=null,o}}let GM=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,VM=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,YM=/^[+-]?0[0-9_]/,WM=/^[0-9a-f]{2,8}$/i,Yy={b:"\b",t:" ",n:`
62
+ `,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function iv(n,a=0,o=n.length){let r=n[a]==="'",c=n[a++]===n[a]&&n[a]===n[a+1];c&&(o-=2,n[a+=2]==="\r"&&a++,n[a]===`
63
+ `&&a++);let d=0,h,p="",m=a;for(;a<o-1;){let g=n[a++];if(g===`
64
+ `||g==="\r"&&n[a]===`
65
+ `){if(!c)throw new Ye("newlines are not allowed in strings",{toml:n,ptr:a-1})}else if(g<" "&&g!==" "||g==="")throw new Ye("control characters are not allowed in strings",{toml:n,ptr:a-1});if(h){if(h=!1,g==="x"||g==="u"||g==="U"){let v=n.slice(a,a+=g==="x"?2:g==="u"?4:8);if(!WM.test(v))throw new Ye("invalid unicode escape",{toml:n,ptr:d});try{p+=String.fromCodePoint(parseInt(v,16))}catch{throw new Ye("invalid unicode escape",{toml:n,ptr:d})}}else if(c&&(g===`
66
+ `||g===" "||g===" "||g==="\r")){if(a=Ca(n,a-1,!0),n[a]!==`
67
+ `&&n[a]!=="\r")throw new Ye("invalid escape: only line-ending whitespace may be escaped",{toml:n,ptr:d});a=Ca(n,a)}else if(g in Yy)p+=Yy[g];else throw new Ye("unrecognized escape sequence",{toml:n,ptr:d});m=a}else!r&&g==="\\"&&(d=a-1,h=!0,p+=n.slice(m,d))}return p+n.slice(m,o-1)}function QM(n,a,o,r){if(n==="true")return!0;if(n==="false")return!1;if(n==="-inf")return-1/0;if(n==="inf"||n==="+inf")return 1/0;if(n==="nan"||n==="+nan"||n==="-nan")return NaN;if(n==="-0")return r?0n:0;let c=GM.test(n);if(c||VM.test(n)){if(YM.test(n))throw new Ye("leading zeroes are not allowed",{toml:a,ptr:o});n=n.replace(/_/g,"");let h=+n;if(isNaN(h))throw new Ye("invalid number",{toml:a,ptr:o});if(c){if((c=!Number.isSafeInteger(h))&&!r)throw new Ye("integer value cannot be represented losslessly",{toml:a,ptr:o});(c||r===!0)&&(h=BigInt(n))}return h}const d=new Co(n);if(!d.isValid())throw new Ye("invalid value",{toml:a,ptr:o});return d}function $M(n,a,o){let r=n.slice(a,o),c=r.indexOf("#");return c>-1&&(Ql(n,c),r=r.slice(0,c)),[r.trimEnd(),c]}function zh(n,a,o,r,c){if(r===0)throw new Ye("document contains excessively nested structures. aborting.",{toml:n,ptr:a});let d=n[a];if(d==="["||d==="{"){let[m,g]=d==="["?JM(n,a,r,c):ZM(n,a,r,c);if(o){if(g=Ca(n,g),n[g]===",")g++;else if(n[g]!==o)throw new Ye("expected comma or end of structure",{toml:n,ptr:g})}return[m,g]}let h;if(d==='"'||d==="'"){h=av(n,a);let m=iv(n,a,h);if(o){if(h=Ca(n,h),n[h]&&n[h]!==","&&n[h]!==o&&n[h]!==`
68
+ `&&n[h]!=="\r")throw new Ye("unexpected character encountered",{toml:n,ptr:h});h+=+(n[h]===",")}return[m,h]}h=qM(n,a,",",o);let p=$M(n,a,h-+(n[h-1]===","));if(!p[0])throw new Ye("incomplete key-value declaration: no value specified",{toml:n,ptr:a});return o&&p[1]>-1&&(h=Ca(n,a+p[1]),h+=+(n[h]===",")),[QM(p[0],n,a,c),h]}let XM=/^[a-zA-Z0-9-_]+[ \t]*$/;function $d(n,a,o="="){let r=a-1,c=[],d=n.indexOf(o,a);if(d<0)throw new Ye("incomplete key-value: cannot find end of key",{toml:n,ptr:a});do{let h=n[a=++r];if(h!==" "&&h!==" ")if(h==='"'||h==="'"){if(h===n[a+1]&&h===n[a+2])throw new Ye("multiline strings are not allowed in keys",{toml:n,ptr:a});let p=av(n,a);if(p<0)throw new Ye("unfinished string encountered",{toml:n,ptr:a});r=n.indexOf(".",p);let m=n.slice(p,r<0||r>d?d:r),g=Qd(m);if(g>-1)throw new Ye("newlines are not allowed in keys",{toml:n,ptr:a+r+g});if(m.trimStart())throw new Ye("found extra tokens after the string part",{toml:n,ptr:p});if(d<p&&(d=n.indexOf(o,p),d<0))throw new Ye("incomplete key-value: cannot find end of key",{toml:n,ptr:a});c.push(iv(n,a,p))}else{r=n.indexOf(".",a);let p=n.slice(a,r<0||r>d?d:r);if(!XM.test(p))throw new Ye("only letter, numbers, dashes and underscores are allowed in keys",{toml:n,ptr:a});c.push(p.trimEnd())}}while(r+1&&r<d);return[c,Ca(n,d+1,!0,!0)]}function ZM(n,a,o,r){let c={},d=new Set,h;for(a++;(h=n[a++])!=="}"&&h;){if(h===",")throw new Ye("expected value, found comma",{toml:n,ptr:a-1});if(h==="#")a=Ql(n,a);else if(h!==" "&&h!==" "&&h!==`
69
+ `&&h!=="\r"){let p,m=c,g=!1,[v,b]=$d(n,a-1);for(let k=0;k<v.length;k++){if(k&&(m=g?m[p]:m[p]={}),p=v[k],(g=Object.hasOwn(m,p))&&(typeof m[p]!="object"||d.has(m[p])))throw new Ye("trying to redefine an already defined value",{toml:n,ptr:a});!g&&p==="__proto__"&&Object.defineProperty(m,p,{enumerable:!0,configurable:!0,writable:!0})}if(g)throw new Ye("trying to redefine an already defined value",{toml:n,ptr:a});let[C,T]=zh(n,b,"}",o-1,r);d.add(C),m[p]=C,a=T}}if(!h)throw new Ye("unfinished table encountered",{toml:n,ptr:a});return[c,a]}function JM(n,a,o,r){let c=[],d;for(a++;(d=n[a++])!=="]"&&d;){if(d===",")throw new Ye("expected value, found comma",{toml:n,ptr:a-1});if(d==="#")a=Ql(n,a);else if(d!==" "&&d!==" "&&d!==`
70
+ `&&d!=="\r"){let h=zh(n,a-1,"]",o-1,r);c.push(h[0]),a=h[1]}}if(!d)throw new Ye("unfinished array encountered",{toml:n,ptr:a});return[c,a]}function Wy(n,a,o,r){let c=a,d=o,h,p=!1,m;for(let g=0;g<n.length;g++){if(g){if(c=p?c[h]:c[h]={},d=(m=d[h]).c,r===0&&(m.t===1||m.t===2))return null;if(m.t===2){let v=c.length-1;c=c[v],d=d[v].c}}if(h=n[g],(p=Object.hasOwn(c,h))&&d[h]?.t===0&&d[h]?.d)return null;p||(h==="__proto__"&&(Object.defineProperty(c,h,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(d,h,{enumerable:!0,configurable:!0,writable:!0})),d[h]={t:g<n.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(m=d[h],m.t!==r&&!(r===1&&m.t===3)||(r===2&&(m.d||(m.d=!0,c[h]=[]),c[h].push(c={}),m.c[m.i++]=m={t:1,d:!1,i:0,c:{}}),m.d))return null;if(m.d=!0,r===1)c=p?c[h]:c[h]={};else if(r===0&&p)return null;return[h,c,m.c]}function e1(n,{maxDepth:a=1e3,integersAsBigInt:o}={}){let r={},c={},d=r,h=c;for(let p=Ca(n,0);p<n.length;){if(n[p]==="["){let m=n[++p]==="[",g=$d(n,p+=+m,"]");if(m){if(n[g[1]-1]!=="]")throw new Ye("expected end of table declaration",{toml:n,ptr:g[1]-1});g[1]++}let v=Wy(g[0],r,c,m?2:1);if(!v)throw new Ye("trying to redefine an already defined table or value",{toml:n,ptr:p});h=v[2],d=v[1],p=g[1]}else{let m=$d(n,p),g=Wy(m[0],d,h,0);if(!g)throw new Ye("trying to redefine an already defined table or value",{toml:n,ptr:p});let v=zh(n,m[1],void 0,a,o);g[1][g[0]]=v[0],p=v[1]}if(p=Ca(n,p,!0),n[p]&&n[p]!==`
71
+ `&&n[p]!=="\r")throw new Ye("each key-value declaration must be followed by an end-of-line",{toml:n,ptr:p});p=Ca(n,p)}return r}const t1=[/^ANTHROPIC_AUTH_TOKEN$/,/_API_KEY$/,/_AUTH_TOKEN$/,/_SECRET$/,/_SECRET_KEY$/,/^API_KEY$/,/^AUTH_TOKEN$/,/^SECRET$/,/_PASSWORD$/,/^PASSWORD$/,/_CREDENTIAL$/,/_PRIVATE_KEY$/];function n1(n){return t1.some(a=>a.test(n))}function a1(n){if(!n.trim())return{valid:!0};try{return JSON.parse(n),{valid:!0}}catch(a){const r=a.message,c=r.match(/position (\d+)/);if(c){const d=parseInt(c[1],10),h=n.substring(0,d).split(`
72
+ `);return{valid:!1,error:r,line:h.length}}return{valid:!1,error:r}}}function i1(n){if(!n.trim())return{valid:!0};try{return e1(n),{valid:!0}}catch(a){const o=a.message,r=o.match(/line\s+(\d+)/i);return{valid:!1,error:o,line:r?Number.parseInt(r[1],10):void 0}}}function ov({value:n,onChange:a,language:o="json",readonly:r=!1,className:c,minHeight:d="300px",heightMode:h="content"}){const{isDark:p}=fh(),{t:m}=fe(),[g,v]=S.useState(!1),[b,C]=S.useState(!0),T=h==="fill-parent",k=S.useMemo(()=>o==="json"?a1(n):o==="toml"?i1(n):{valid:!0},[n,o]),M=S.useCallback(L=>l.jsx(Vw,{prism:zM,theme:p?Yg.nightOwl:Yg.github,code:L,language:o,children:({tokens:E,getLineProps:N,getTokenProps:D})=>{let A=!1;return l.jsx(l.Fragment,{children:E.map((P,w)=>l.jsx("div",{...N({line:P}),className:F(k.line===w+1&&"bg-destructive/20"),children:P.map((O,B)=>{let _=!1;if(O.types.includes("property")){const J=O.content.replace(/['"]/g,"");n1(J)?A=!0:A=!1}else(O.types.includes("string")||O.types.includes("number")||O.types.includes("boolean"))&&A?(_=!0,A=!1):O.types.includes("punctuation")&&O.content!==":"&&O.content!=="["&&O.content!=="{"&&(A=!1);const K=D({token:O});return _&&b&&(K.className=F(K.className,"blur-[3px] select-none opacity-70 transition-all duration-200")),l.jsx("span",{...K},B)})},w))})}}),[p,o,k.line,b]);return l.jsxs("div",{className:F("flex min-h-0 flex-col",T&&"h-full",c),style:T?{height:d==="auto"?void 0:d}:void 0,children:[l.jsxs("div",{className:F("relative rounded-md border overflow-hidden","bg-muted/30",T&&"flex min-h-0 flex-1 flex-col",g&&"ring-2 ring-ring ring-offset-2 ring-offset-background",r&&"opacity-70 cursor-not-allowed",!k.valid&&"border-destructive"),"data-slot":"code-editor-surface",children:[l.jsx("div",{className:F(T&&"scrollbar-editor min-h-0 flex-1 overflow-auto"),"data-slot":T?"code-editor-viewport":void 0,children:l.jsx(IM,{value:n,onValueChange:r?()=>{}:a,highlight:M,padding:12,disabled:r,onFocus:()=>v(!0),onBlur:()=>v(!1),textareaClassName:F("focus:outline-none font-mono text-sm",r&&"cursor-not-allowed"),preClassName:"font-mono text-sm",style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.875rem",minHeight:d}},p?"dark-editor":"light-editor")}),l.jsx("div",{className:"absolute top-2 right-2 z-10 opacity-50 hover:opacity-100 transition-opacity",children:l.jsx(rt,{variant:"ghost",size:"icon",className:"h-6 w-6 bg-background/50 hover:bg-background border shadow-sm rounded-full",onClick:()=>C(!b),title:m(b?"codeEditor.revealSensitive":"codeEditor.maskSensitive"),children:b?l.jsx(Yr,{className:"h-3 w-3"}):l.jsx(Vr,{className:"h-3 w-3"})})})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs",children:[k.valid?l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[l.jsx(Wr,{className:"w-3 h-3 text-green-500"}),m("codeEditor.valid",{language:o.toUpperCase()})]}):l.jsxs("span",{className:"flex items-center gap-1 text-destructive",children:[l.jsx(Br,{className:"w-3 h-3"}),k.error,k.line&&` (line ${k.line})`]}),r&&l.jsx("span",{className:"ml-auto text-muted-foreground",children:m("codeEditor.readOnly")})]})]})}const $l=Object.freeze(Object.defineProperty({__proto__:null,CodeEditor:ov},Symbol.toStringTag,{value:"Module"})),o1={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 r1(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 rv=S.createContext(null);function s1({children:n}){const[a,o]=S.useReducer(r1,o1);return l.jsx(rv.Provider,{value:{state:a,dispatch:o},children:n})}function sv(){const n=S.useContext(rv);if(!n)throw new Error("useSettingsContext must be used within a SettingsProvider");return n}function l1(){const{dispatch:n}=sv(),a=S.useCallback(w=>n({type:"SET_WEBSEARCH_CONFIG",payload:w}),[n]),o=S.useCallback(w=>n({type:"SET_WEBSEARCH_STATUS",payload:w}),[n]),r=S.useCallback(w=>n({type:"SET_WEBSEARCH_LOADING",payload:w}),[n]),c=S.useCallback(w=>n({type:"SET_WEBSEARCH_STATUS_LOADING",payload:w}),[n]),d=S.useCallback(w=>n({type:"SET_WEBSEARCH_SAVING",payload:w}),[n]),h=S.useCallback(w=>n({type:"SET_WEBSEARCH_ERROR",payload:w}),[n]),p=S.useCallback(w=>n({type:"SET_WEBSEARCH_SUCCESS",payload:w}),[n]),m=S.useCallback(w=>n({type:"SET_GLOBALENV_CONFIG",payload:w}),[n]),g=S.useCallback(w=>n({type:"SET_GLOBALENV_LOADING",payload:w}),[n]),v=S.useCallback(w=>n({type:"SET_GLOBALENV_SAVING",payload:w}),[n]),b=S.useCallback(w=>n({type:"SET_GLOBALENV_ERROR",payload:w}),[n]),C=S.useCallback(w=>n({type:"SET_GLOBALENV_SUCCESS",payload:w}),[n]),T=S.useCallback(w=>n({type:"SET_PROXY_CONFIG",payload:w}),[n]),k=S.useCallback(w=>n({type:"SET_PROXY_LOADING",payload:w}),[n]),M=S.useCallback(w=>n({type:"SET_PROXY_SAVING",payload:w}),[n]),L=S.useCallback(w=>n({type:"SET_PROXY_ERROR",payload:w}),[n]),E=S.useCallback(w=>n({type:"SET_PROXY_SUCCESS",payload:w}),[n]),N=S.useCallback(w=>n({type:"SET_PROXY_TEST_RESULT",payload:w}),[n]),D=S.useCallback(w=>n({type:"SET_PROXY_TESTING",payload:w}),[n]),A=S.useCallback(w=>n({type:"SET_RAW_CONFIG",payload:w}),[n]),P=S.useCallback(w=>n({type:"SET_RAW_CONFIG_LOADING",payload:w}),[n]);return S.useMemo(()=>({setWebSearchConfig:a,setWebSearchStatus:o,setWebSearchLoading:r,setWebSearchStatusLoading:c,setWebSearchSaving:d,setWebSearchError:h,setWebSearchSuccess:p,setGlobalEnvConfig:m,setGlobalEnvLoading:g,setGlobalEnvSaving:v,setGlobalEnvError:b,setGlobalEnvSuccess:C,setProxyConfig:T,setProxyLoading:k,setProxySaving:M,setProxyError:L,setProxySuccess:E,setProxyTestResult:N,setProxyTesting:D,setRawConfig:A,setRawConfigLoading:P}),[a,o,r,c,d,h,p,m,g,v,b,C,T,k,M,L,E,N,D,A,P])}function c1(){const[n,a]=CS(),o=n.get("tab")?.toLowerCase(),r=o==="imageanalysis"||o==="image"?"image":o==="channels"?"channels":o==="globalenv"?"globalenv":o==="proxy"?"proxy":o==="auth"?"auth":o==="thinking"?"thinking":o==="backups"?"backups":"websearch",c=S.useCallback(d=>{a({tab:d},{replace:!0})},[a]);return{activeTab:r,setActiveTab:c}}function u1(){const{state:n}=sv(),a=l1(),[o,r]=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]),d=S.useCallback(async()=>{if(n.rawConfig)try{await navigator.clipboard.writeText(n.rawConfig),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},[n.rawConfig]);return{rawConfig:n.rawConfig,loading:n.rawConfigLoading,copied:o,fetchRawConfig:c,copyToClipboard:d}}function Qy({activeTab:n,onTabChange:a}){const{t:o}=fe(),r=[{value:"websearch",label:o("settingsTabs.web"),icon:qb},{value:"image",label:o("settingsTabs.image"),icon:Vb},{value:"channels",label:o("settingsTabs.channels"),icon:tw},{value:"globalenv",label:o("settingsTabs.env"),icon:ah},{value:"thinking",label:o("settingsTabs.think"),icon:nw},{value:"proxy",label:o("settingsTabs.proxy"),icon:aw},{value:"auth",label:o("settingsTabs.auth"),icon:eh},{value:"backups",label:o("settingsTabs.backup"),icon:iw}];return l.jsx(Yx,{value:n,onValueChange:c=>a(c),children:l.jsx(Eh,{className:"grid w-full grid-cols-8",children:r.map(({value:c,label:d,icon:h})=>l.jsxs(Pl,{value:c,className:"gap-1.5 px-2 text-xs",children:[l.jsx(h,{className:"h-3.5 w-3.5 shrink-0"}),l.jsx("span",{className:"truncate",children:d})]},c))})})}function $y(){return l.jsxs("div",{className:"flex-1 p-5 space-y-6",children:[l.jsx($e,{className:"h-4 w-2/3"}),l.jsx("div",{className:"p-4 rounded-lg border",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx($e,{className:"h-5 w-32"}),l.jsx($e,{className:"h-4 w-48"})]}),l.jsx($e,{className:"h-6 w-10 rounded-full"})]})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx($e,{className:"h-5 w-24"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx($e,{className:"h-20 w-full rounded-lg"}),l.jsx($e,{className:"h-20 w-full rounded-lg"}),l.jsx($e,{className:"h-20 w-full rounded-lg"})]})]})]})}function lv(n,a=3,o=1e3){return n().catch(r=>{if(a<=0)throw r;return new Promise(c=>setTimeout(c,o)).then(()=>lv(n,a-1,o*2))})}function ti(n){return S.lazy(()=>lv(n))}const Xy=ti(()=>it(()=>import("./index-B5Egq7qY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),Zy=ti(()=>it(()=>import("./index-DZddoGfE.js"),__vite__mapDeps([10,1,2,4,5,6,7,8,9]))),Jy=ti(()=>it(()=>import("./channels-FaDUjf3Y.js"),__vite__mapDeps([11,1,2,4,5,6,7,8,9]))),eb=ti(()=>it(()=>import("./globalenv-section-NPjCcYBN.js"),__vite__mapDeps([12,1,2,4,5,6,7,8,9]))),tb=ti(()=>it(()=>import("./index-BcUkpsGj.js"),__vite__mapDeps([13,1,2,4,5,6,7,8,9]))),nb=ti(()=>it(()=>import("./index-BgGHTjTd.js"),__vite__mapDeps([14,1,2,15,4,16,17,5,6,18,7,8,9]))),ab=ti(()=>it(()=>import("./auth-section-BNX8_9MJ.js"),__vite__mapDeps([19,1,2,4,5,6,7,8,9]))),ib=ti(()=>it(()=>import("./backups-section-Bt0FA5zl.js"),__vite__mapDeps([20,1,2,17,4,5,6,7,8,9])));class ob 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?l.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:l.jsxs("div",{className:"text-center p-6 max-w-md",children:[l.jsx(Br,{className:"w-12 h-12 mx-auto mb-4 text-destructive"}),l.jsx("p",{className:"font-medium text-foreground mb-2",children:me.t("settings.sectionLoadFailed")}),l.jsx("p",{className:"text-sm mb-4",children:this.state.error?.message||me.t("settings.unknownError")}),l.jsxs(rt,{variant:"outline",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2",children:[l.jsx(Hr,{className:"w-4 h-4"}),me.t("settings.reloadPage")]})]})}):this.props.children}}function d1(){const{t:n}=fe(),{activeTab:a,setActiveTab:o}=c1(),{rawConfig:r,loading:c,copied:d,fetchRawConfig:h,copyToClipboard:p}=u1();S.useEffect(()=>{h()},[h]);const m=g=>{S.startTransition(()=>{o(g)})};return l.jsxs("div",{className:"h-full min-h-0",children:[l.jsxs("div",{className:"md:hidden h-full flex flex-col",children:[l.jsx("div",{className:"border-b bg-background p-4",children:l.jsx(Qy,{activeTab:a,onTabChange:m})}),l.jsx(ob,{children:l.jsxs(S.Suspense,{fallback:l.jsx($y,{}),children:[a==="websearch"&&l.jsx(Xy,{}),a==="image"&&l.jsx(Zy,{}),a==="channels"&&l.jsx(Jy,{}),a==="globalenv"&&l.jsx(eb,{}),a==="thinking"&&l.jsx(tb,{}),a==="proxy"&&l.jsx(nb,{}),a==="auth"&&l.jsx(ab,{}),a==="backups"&&l.jsx(ib,{})]})})]}),l.jsxs(Mh,{direction:"horizontal",className:"h-full hidden md:flex",children:[l.jsx(qr,{defaultSize:46,minSize:36,maxSize:62,children:l.jsxs("div",{className:"h-full border-r flex flex-col bg-muted/30 relative",children:[l.jsx("div",{className:"p-5 border-b bg-background",children:l.jsx(Qy,{activeTab:a,onTabChange:m})}),l.jsx(ob,{children:l.jsxs(S.Suspense,{fallback:l.jsx($y,{}),children:[a==="websearch"&&l.jsx(Xy,{}),a==="image"&&l.jsx(Zy,{}),a==="channels"&&l.jsx(Jy,{}),a==="globalenv"&&l.jsx(eb,{}),a==="thinking"&&l.jsx(tb,{}),a==="proxy"&&l.jsx(nb,{}),a==="auth"&&l.jsx(ab,{}),a==="backups"&&l.jsx(ib,{})]})})]})}),l.jsx(jh,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:l.jsx(Rl,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),l.jsx(qr,{defaultSize:54,minSize:35,children:l.jsxs("div",{className:"h-full flex flex-col",children:[l.jsxs("div",{className:"p-4 border-b bg-background flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Bg,{className:"w-5 h-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-semibold",children:"config.yaml"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"~/.ccs/config.yaml"})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(rt,{variant:"outline",size:"sm",onClick:p,disabled:!r,children:d?l.jsxs(l.Fragment,{children:[l.jsx(wo,{className:"w-4 h-4 mr-1"}),n("settings.copied")]}):l.jsxs(l.Fragment,{children:[l.jsx(Sl,{className:"w-4 h-4 mr-1"}),n("settings.copy")]})}),l.jsx(rt,{variant:"outline",size:"sm",onClick:h,disabled:c,children:l.jsx(Hr,{className:`w-4 h-4 ${c?"animate-spin":""}`})})]})]}),l.jsx("div",{className:"flex-1 overflow-auto",children:r?l.jsx(ov,{value:r,onChange:()=>{},language:"yaml",readonly:!0,minHeight:"auto",className:"min-h-full"}):c?l.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[l.jsx(Hr,{className:"w-5 h-5 animate-spin mr-2"}),n("settings.loading")]}):l.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:l.jsxs("div",{className:"text-center",children:[l.jsx(Bg,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),l.jsx("p",{children:n("settings.configFileNotFound")}),l.jsx("code",{className:"text-sm bg-muted px-2 py-1 rounded mt-2 inline-block",children:"ccs migrate"})]})})})]})})]})]})}function h1(){return l.jsx(s1,{children:l.jsx(d1,{})})}const f1=Object.freeze(Object.defineProperty({__proto__:null,SettingsPage:h1},Symbol.toStringTag,{value:"Module"}));function p1(n,a,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:n,timeZoneName:o}).format(a).split(/\s/g).slice(2).join(" ")}const m1={},Er={};function Ai(n,a){try{const r=(m1[n]||=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).format)(a).split("GMT")[1];return r in Er?Er[r]:rb(r,r.split(":"))}catch{if(n in Er)return Er[n];const o=n?.match(g1);return o?rb(n,o.slice(1)):NaN}}const g1=/([+-]\d\d):?(\d\d)?/;function rb(n,a){const o=+(a[0]||0),r=+(a[1]||0),c=+(a[2]||0)/60;return Er[n]=o*60+r>0?o*60+r+c:o*60-r-c}class qn extends Date{constructor(...a){super(),a.length>1&&typeof a[a.length-1]=="string"&&(this.timeZone=a.pop()),this.internal=new Date,isNaN(Ai(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)),cv(this),Xd(this)):this.setTime(Date.now())}static tz(a,...o){return o.length?new qn(...o,a):new qn(Date.now(),a)}withTimeZone(a){return new qn(+this,a)}getTimezoneOffset(){const a=-Ai(this.timeZone,this);return a>0?Math.floor(a):Math.ceil(a)}setTime(a){return Date.prototype.setTime.apply(this,arguments),Xd(this),+this}[Symbol.for("constructDateFrom")](a){return new qn(+new Date(a),this.timeZone)}}const sb=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!sb.test(n))return;const a=n.replace(sb,"$1UTC");qn.prototype[a]&&(n.startsWith("get")?qn.prototype[n]=function(){return this.internal[a]()}:(qn.prototype[n]=function(){return Date.prototype[a].apply(this.internal,arguments),y1(this),+this},qn.prototype[a]=function(){return Date.prototype[a].apply(this,arguments),Xd(this),+this}))});function Xd(n){n.internal.setTime(+n),n.internal.setUTCSeconds(n.internal.getUTCSeconds()-Math.round(-Ai(n.timeZone,n)*60))}function y1(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()),cv(n)}function cv(n){const a=Ai(n.timeZone,n),o=a>0?Math.floor(a):Math.ceil(a),r=new Date(+n);r.setUTCHours(r.getUTCHours()-1);const c=-new Date(+n).getTimezoneOffset(),d=-new Date(+r).getTimezoneOffset(),h=c-d,p=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();h&&p&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+h);const m=c-o;m&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+m);const g=new Date(+n);g.setUTCSeconds(0);const v=c>0?g.getSeconds():(g.getSeconds()-60)%60,b=Math.round(-(Ai(n.timeZone,n)*60))%60;(b||v)&&(n.internal.setUTCSeconds(n.internal.getUTCSeconds()+b),Date.prototype.setUTCSeconds.call(n,Date.prototype.getUTCSeconds.call(n)+b+v));const C=Ai(n.timeZone,n),T=C>0?Math.floor(C):Math.ceil(C),M=-new Date(+n).getTimezoneOffset()-T,L=T!==o,E=M-m;if(L&&E){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+E);const N=Ai(n.timeZone,n),D=N>0?Math.floor(N):Math.ceil(N),A=T-D;A&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+A),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+A))}}class ba extends qn{static tz(a,...o){return o.length?new ba(...o,a):new ba(Date.now(),a)}toISOString(){const[a,o,r]=this.tzComponents(),c=`${a}${o}:${r}`;return this.internal.toISOString().slice(0,-1)+c}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[a,o,r,c]=this.internal.toUTCString().split(" ");return`${a?.slice(0,-1)} ${r} ${o} ${c}`}toTimeString(){const a=this.internal.toUTCString().split(" ")[4],[o,r,c]=this.tzComponents();return`${a} GMT${o}${r}${c} (${p1(this.timeZone,this)})`}toLocaleString(a,o){return Date.prototype.toLocaleString.call(this,a,{...o,timeZone:o?.timeZone||this.timeZone})}toLocaleDateString(a,o){return Date.prototype.toLocaleDateString.call(this,a,{...o,timeZone:o?.timeZone||this.timeZone})}toLocaleTimeString(a,o){return Date.prototype.toLocaleTimeString.call(this,a,{...o,timeZone:o?.timeZone||this.timeZone})}tzComponents(){const a=this.getTimezoneOffset(),o=a>0?"-":"+",r=String(Math.floor(Math.abs(a)/60)).padStart(2,"0"),c=String(Math.abs(a)%60).padStart(2,"0");return[o,r,c]}withTimeZone(a){return new ba(+this,a)}[Symbol.for("constructDateFrom")](a){return new ba(+new Date(a),this.timeZone)}}const lb=5,b1=4;function x1(n,a){const o=a.startOfMonth(n),r=o.getDay()>0?o.getDay():7,c=a.addDays(n,-r+1),d=a.addDays(c,lb*7-1);return a.getMonth(n)===a.getMonth(d)?lb:b1}function uv(n,a){const o=a.startOfMonth(n),r=o.getDay();return r===1?o:r===0?a.addDays(o,-6):a.addDays(o,-1*(r-1))}function v1(n,a){const o=uv(n,a),r=x1(n,a);return a.addDays(o,r*7-1)}const dv={...wr,labels:{labelDayButton:(n,a,o,r)=>{let c;r&&typeof r.format=="function"?c=r.format.bind(r):c=(h,p)=>Dr(h,p,{locale:wr,...o});let d=c(n,"PPPP");return a.today&&(d=`Today, ${d}`),a.selected&&(d=`${d}, selected`),d},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,o)=>{let r;return o&&typeof o.format=="function"?r=o.format.bind(o):r=(c,d)=>Dr(c,d,{locale:wr,...a}),r(n,"LLLL yyyy")},labelGridcell:(n,a,o,r)=>{let c;r&&typeof r.format=="function"?c=r.format.bind(r):c=(h,p)=>Dr(h,p,{locale:wr,...o});let d=c(n,"PPPP");return a?.today&&(d=`Today, ${d}`),d},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(n,a,o)=>{let r;return o&&typeof o.format=="function"?r=o.format.bind(o):r=(c,d)=>Dr(c,d,{locale:wr,...a}),r(n,"cccc")}}};class fn{constructor(a,o){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?ba.tz(this.options.timeZone):new this.Date,this.newDate=(r,c,d)=>this.overrides?.newDate?this.overrides.newDate(r,c,d):this.options.timeZone?new ba(r,c,d,this.options.timeZone):new Date(r,c,d),this.addDays=(r,c)=>this.overrides?.addDays?this.overrides.addDays(r,c):cw(r,c),this.addMonths=(r,c)=>this.overrides?.addMonths?this.overrides.addMonths(r,c):uw(r,c),this.addWeeks=(r,c)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,c):dw(r,c),this.addYears=(r,c)=>this.overrides?.addYears?this.overrides.addYears(r,c):hw(r,c),this.differenceInCalendarDays=(r,c)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,c):fw(r,c),this.differenceInCalendarMonths=(r,c)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,c):pw(r,c),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):mw(r),this.eachYearOfInterval=r=>{const c=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):gw(r),d=new Set(c.map(p=>this.getYear(p)));if(d.size===c.length)return c;const h=[];return d.forEach(p=>{h.push(new Date(p,0,1))}),h},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):v1(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):yw(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):bw(r),this.endOfWeek=(r,c)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,c):xw(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):vw(r),this.format=(r,c,d)=>{const h=this.overrides?.format?this.overrides.format(r,c,this.options):Dr(r,c,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(h):h},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):Cw(r),this.getMonth=(r,c)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):Sw(r,this.options),this.getYear=(r,c)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):ww(r,this.options),this.getWeek=(r,c)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):kw(r,this.options),this.isAfter=(r,c)=>this.overrides?.isAfter?this.overrides.isAfter(r,c):Aw(r,c),this.isBefore=(r,c)=>this.overrides?.isBefore?this.overrides.isBefore(r,c):Nw(r,c),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):Dw(r),this.isSameDay=(r,c)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,c):Tw(r,c),this.isSameMonth=(r,c)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,c):Pw(r,c),this.isSameYear=(r,c)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,c):Mw(r,c),this.max=r=>this.overrides?.max?this.overrides.max(r):jw(r),this.min=r=>this.overrides?.min?this.overrides.min(r):Ew(r),this.setMonth=(r,c)=>this.overrides?.setMonth?this.overrides.setMonth(r,c):Lw(r,c),this.setYear=(r,c)=>this.overrides?.setYear?this.overrides.setYear(r,c):Rw(r,c),this.startOfBroadcastWeek=(r,c)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):uv(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Ow(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):Iw(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):_w(r),this.startOfWeek=(r,c)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Uw(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):zw(r),this.options={locale:dv,...a},this.overrides=o}getDigitMap(){const{numerals:a="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:a}),r={};for(let c=0;c<10;c++)r[c.toString()]=o.format(c);return r}replaceDigits(a){const o=this.getDigitMap();return a.replace(/\d/g,r=>o[r]||r)}formatNumber(a){return this.replaceDigits(a.toString())}getMonthYearOrder(){const a=this.options.locale?.code;return a&&fn.yearFirstLocales.has(a)?"year-first":"month-first"}formatMonthYear(a){const{locale:o,timeZone:r,numerals:c}=this.options,d=o?.code;if(d&&fn.yearFirstLocales.has(d))try{return new Intl.DateTimeFormat(d,{month:"long",year:"numeric",timeZone:r,numberingSystem:c}).format(a)}catch{}const h=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(a,h)}}fn.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 Vn=new fn;class hv{constructor(a,o,r=Vn){this.date=a,this.displayMonth=o,this.outside=!!(o&&!r.isSameMonth(a,o)),this.dateLib=r,this.isoDate=r.format(a,"yyyy-MM-dd"),this.displayMonthId=r.format(o,"yyyy-MM"),this.dateMonthId=r.format(a,"yyyy-MM")}isEqualTo(a){return this.dateLib.isSameDay(a.date,this.date)&&this.dateLib.isSameMonth(a.displayMonth,this.displayMonth)}}class C1{constructor(a,o){this.date=a,this.weeks=o}}class S1{constructor(a,o){this.days=o,this.weekNumber=a}}function w1(n){return ce.createElement("button",{...n})}function k1(n){return ce.createElement("span",{...n})}function A1(n){const{size:a=24,orientation:o="left",className:r}=n;return ce.createElement("svg",{className:r,width:a,height:a,viewBox:"0 0 24 24"},o==="up"&&ce.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&ce.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&ce.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&ce.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function N1(n){const{day:a,modifiers:o,...r}=n;return ce.createElement("td",{...r})}function D1(n){const{day:a,modifiers:o,...r}=n,c=ce.useRef(null);return ce.useEffect(()=>{o.focused&&c.current?.focus()},[o.focused]),ce.createElement("button",{ref:c,...r})}var ve;(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"})(ve||(ve={}));var pt;(function(n){n.disabled="disabled",n.hidden="hidden",n.outside="outside",n.focused="focused",n.today="today"})(pt||(pt={}));var jn;(function(n){n.range_end="range_end",n.range_middle="range_middle",n.range_start="range_start",n.selected="selected"})(jn||(jn={}));var hn;(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"})(hn||(hn={}));function T1(n){const{options:a,className:o,components:r,classNames:c,...d}=n,h=[c[ve.Dropdown],o].join(" "),p=a?.find(({value:m})=>m===d.value);return ce.createElement("span",{"data-disabled":d.disabled,className:c[ve.DropdownRoot]},ce.createElement(r.Select,{className:h,...d},a?.map(({value:m,label:g,disabled:v})=>ce.createElement(r.Option,{key:m,value:m,disabled:v},g))),ce.createElement("span",{className:c[ve.CaptionLabel],"aria-hidden":!0},p?.label,ce.createElement(r.Chevron,{orientation:"down",size:18,className:c[ve.Chevron]})))}function P1(n){return ce.createElement("div",{...n})}function M1(n){return ce.createElement("div",{...n})}function j1(n){const{calendarMonth:a,displayIndex:o,...r}=n;return ce.createElement("div",{...r},n.children)}function E1(n){const{calendarMonth:a,displayIndex:o,...r}=n;return ce.createElement("div",{...r})}function L1(n){return ce.createElement("table",{...n})}function R1(n){return ce.createElement("div",{...n})}const fv=S.createContext(void 0);function Xr(){const n=S.useContext(fv);if(n===void 0)throw new Error("useDayPicker() must be used within a custom component.");return n}function O1(n){const{components:a}=Xr();return ce.createElement(a.Dropdown,{...n})}function I1(n){const{onPreviousClick:a,onNextClick:o,previousMonth:r,nextMonth:c,...d}=n,{components:h,classNames:p,labels:{labelPrevious:m,labelNext:g}}=Xr(),v=S.useCallback(C=>{c&&o?.(C)},[c,o]),b=S.useCallback(C=>{r&&a?.(C)},[r,a]);return ce.createElement("nav",{...d},ce.createElement(h.PreviousMonthButton,{type:"button",className:p[ve.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":m(r),onClick:b},ce.createElement(h.Chevron,{disabled:r?void 0:!0,className:p[ve.Chevron],orientation:"left"})),ce.createElement(h.NextMonthButton,{type:"button",className:p[ve.NextMonthButton],tabIndex:c?void 0:-1,"aria-disabled":c?void 0:!0,"aria-label":g(c),onClick:v},ce.createElement(h.Chevron,{disabled:c?void 0:!0,orientation:"right",className:p[ve.Chevron]})))}function _1(n){const{components:a}=Xr();return ce.createElement(a.Button,{...n})}function U1(n){return ce.createElement("option",{...n})}function z1(n){const{components:a}=Xr();return ce.createElement(a.Button,{...n})}function H1(n){const{rootRef:a,...o}=n;return ce.createElement("div",{...o,ref:a})}function B1(n){return ce.createElement("select",{...n})}function F1(n){const{week:a,...o}=n;return ce.createElement("tr",{...o})}function q1(n){return ce.createElement("th",{...n})}function K1(n){return ce.createElement("thead",{"aria-hidden":!0},ce.createElement("tr",{...n}))}function G1(n){const{week:a,...o}=n;return ce.createElement("th",{...o})}function V1(n){return ce.createElement("th",{...n})}function Y1(n){return ce.createElement("tbody",{...n})}function W1(n){const{components:a}=Xr();return ce.createElement(a.Dropdown,{...n})}const Q1=Object.freeze(Object.defineProperty({__proto__:null,Button:w1,CaptionLabel:k1,Chevron:A1,Day:N1,DayButton:D1,Dropdown:T1,DropdownNav:P1,Footer:M1,Month:j1,MonthCaption:E1,MonthGrid:L1,Months:R1,MonthsDropdown:O1,Nav:I1,NextMonthButton:_1,Option:U1,PreviousMonthButton:z1,Root:H1,Select:B1,Week:F1,WeekNumber:G1,WeekNumberHeader:V1,Weekday:q1,Weekdays:K1,Weeks:Y1,YearsDropdown:W1},Symbol.toStringTag,{value:"Module"}));function xa(n,a,o=!1,r=Vn){let{from:c,to:d}=n;const{differenceInCalendarDays:h,isSameDay:p}=r;return c&&d?(h(d,c)<0&&([c,d]=[d,c]),h(a,c)>=(o?1:0)&&h(d,a)>=(o?1:0)):!o&&d?p(d,a):!o&&c?p(c,a):!1}function Hh(n){return!!(n&&typeof n=="object"&&"before"in n&&"after"in n)}function Xl(n){return!!(n&&typeof n=="object"&&"from"in n)}function Bh(n){return!!(n&&typeof n=="object"&&"after"in n)}function Fh(n){return!!(n&&typeof n=="object"&&"before"in n)}function pv(n){return!!(n&&typeof n=="object"&&"dayOfWeek"in n)}function mv(n,a){return Array.isArray(n)&&n.every(a.isDate)}function va(n,a,o=Vn){const r=Array.isArray(a)?a:[a],{isSameDay:c,differenceInCalendarDays:d,isAfter:h}=o;return r.some(p=>{if(typeof p=="boolean")return p;if(o.isDate(p))return c(n,p);if(mv(p,o))return p.some(m=>c(n,m));if(Xl(p))return xa(p,n,!1,o);if(pv(p))return Array.isArray(p.dayOfWeek)?p.dayOfWeek.includes(n.getDay()):p.dayOfWeek===n.getDay();if(Hh(p)){const m=d(p.before,n),g=d(p.after,n),v=m>0,b=g<0;return h(p.before,p.after)?b&&v:v||b}return Bh(p)?d(n,p.after)>0:Fh(p)?d(p.before,n)>0:typeof p=="function"?p(n):!1})}function $1(n,a,o,r,c){const{disabled:d,hidden:h,modifiers:p,showOutsideDays:m,broadcastCalendar:g,today:v=c.today()}=a,{isSameDay:b,isSameMonth:C,startOfMonth:T,isBefore:k,endOfMonth:M,isAfter:L}=c,E=o&&T(o),N=r&&M(r),D={[pt.focused]:[],[pt.outside]:[],[pt.disabled]:[],[pt.hidden]:[],[pt.today]:[]},A={};for(const P of n){const{date:w,displayMonth:O}=P,B=!!(O&&!C(w,O)),_=!!(E&&k(w,E)),K=!!(N&&L(w,N)),J=!!(d&&va(w,d,c)),$=!!(h&&va(w,h,c))||_||K||!g&&!m&&B||g&&m===!1&&B,be=b(w,v);B&&D.outside.push(P),J&&D.disabled.push(P),$&&D.hidden.push(P),be&&D.today.push(P),p&&Object.keys(p).forEach(te=>{const Se=p?.[te];Se&&va(w,Se,c)&&(A[te]?A[te].push(P):A[te]=[P])})}return P=>{const w={[pt.focused]:!1,[pt.disabled]:!1,[pt.hidden]:!1,[pt.outside]:!1,[pt.today]:!1},O={};for(const B in D){const _=D[B];w[B]=_.some(K=>K===P)}for(const B in A)O[B]=A[B].some(_=>_===P);return{...w,...O}}}function X1(n,a,o={}){return Object.entries(n).filter(([,c])=>c===!0).reduce((c,[d])=>(o[d]?c.push(o[d]):a[pt[d]]?c.push(a[pt[d]]):a[jn[d]]&&c.push(a[jn[d]]),c),[a[ve.Day]])}function Z1(n){return{...Q1,...n}}function J1(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(([o,r])=>{o.startsWith("data-")&&(a[o]=r)}),a}function ej(){const n={};for(const a in ve)n[ve[a]]=`rdp-${ve[a]}`;for(const a in pt)n[pt[a]]=`rdp-${pt[a]}`;for(const a in jn)n[jn[a]]=`rdp-${jn[a]}`;for(const a in hn)n[hn[a]]=`rdp-${hn[a]}`;return n}function gv(n,a,o){return(o??new fn(a)).formatMonthYear(n)}const tj=gv;function nj(n,a,o){return(o??new fn(a)).format(n,"d")}function aj(n,a=Vn){return a.format(n,"LLLL")}function ij(n,a,o){return(o??new fn(a)).format(n,"cccccc")}function oj(n,a=Vn){return n<10?a.formatNumber(`0${n.toLocaleString()}`):a.formatNumber(`${n.toLocaleString()}`)}function rj(){return""}function yv(n,a=Vn){return a.format(n,"yyyy")}const sj=yv,lj=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:gv,formatDay:nj,formatMonthCaption:tj,formatMonthDropdown:aj,formatWeekNumber:oj,formatWeekNumberHeader:rj,formatWeekdayName:ij,formatYearCaption:sj,formatYearDropdown:yv},Symbol.toStringTag,{value:"Module"}));function cj(n){return n?.formatMonthCaption&&!n.formatCaption&&(n.formatCaption=n.formatMonthCaption),n?.formatYearCaption&&!n.formatYearDropdown&&(n.formatYearDropdown=n.formatYearCaption),{...lj,...n}}function qh(n,a,o,r){let c=(r??new fn(o)).format(n,"PPPP");return a.today&&(c=`Today, ${c}`),a.selected&&(c=`${c}, selected`),c}const uj=qh;function Kh(n,a,o){return(o??new fn(a)).formatMonthYear(n)}const dj=Kh;function bv(n,a,o,r){let c=(r??new fn(o)).format(n,"PPPP");return a?.today&&(c=`Today, ${c}`),c}function xv(n){return"Choose the Month"}function vv(){return""}const hj="Go to the Next Month";function Cv(n,a){return hj}function Sv(n){return"Go to the Previous Month"}function wv(n,a,o){return(o??new fn(a)).format(n,"cccc")}function kv(n,a){return`Week ${n}`}function Av(n){return"Week Number"}function Nv(n){return"Choose the Year"}const fj=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:dj,labelDay:uj,labelDayButton:qh,labelGrid:Kh,labelGridcell:bv,labelMonthDropdown:xv,labelNav:vv,labelNext:Cv,labelPrevious:Sv,labelWeekNumber:kv,labelWeekNumberHeader:Av,labelWeekday:wv,labelYearDropdown:Nv},Symbol.toStringTag,{value:"Module"})),Mn=(n,a,o)=>a||(o?typeof o=="function"?o:(...r)=>o:n);function pj(n,a){const o=a.locale?.labels??{};return{...fj,...n??{},labelDayButton:Mn(qh,n?.labelDayButton,o.labelDayButton),labelMonthDropdown:Mn(xv,n?.labelMonthDropdown,o.labelMonthDropdown),labelNext:Mn(Cv,n?.labelNext,o.labelNext),labelPrevious:Mn(Sv,n?.labelPrevious,o.labelPrevious),labelWeekNumber:Mn(kv,n?.labelWeekNumber,o.labelWeekNumber),labelYearDropdown:Mn(Nv,n?.labelYearDropdown,o.labelYearDropdown),labelGrid:Mn(Kh,n?.labelGrid,o.labelGrid),labelGridcell:Mn(bv,n?.labelGridcell,o.labelGridcell),labelNav:Mn(vv,n?.labelNav,o.labelNav),labelWeekNumberHeader:Mn(Av,n?.labelWeekNumberHeader,o.labelWeekNumberHeader),labelWeekday:Mn(wv,n?.labelWeekday,o.labelWeekday)}}function mj(n,a,o,r,c){const{startOfMonth:d,startOfYear:h,endOfYear:p,eachMonthOfInterval:m,getMonth:g}=c;return m({start:h(n),end:p(n)}).map(C=>{const T=r.formatMonthDropdown(C,c),k=g(C),M=a&&C<d(a)||o&&C>d(o)||!1;return{value:k,label:T,disabled:M}})}function gj(n,a={},o={}){let r={...a?.[ve.Day]};return Object.entries(n).filter(([,c])=>c===!0).forEach(([c])=>{r={...r,...o?.[c]}}),r}function yj(n,a,o,r){const c=r??n.today(),d=o?n.startOfBroadcastWeek(c,n):a?n.startOfISOWeek(c):n.startOfWeek(c),h=[];for(let p=0;p<7;p++){const m=n.addDays(d,p);h.push(m)}return h}function bj(n,a,o,r,c=!1){if(!n||!a)return;const{startOfYear:d,endOfYear:h,eachYearOfInterval:p,getYear:m}=r,g=d(n),v=h(a),b=p({start:g,end:v});return c&&b.reverse(),b.map(C=>{const T=o.formatYearDropdown(C,r);return{value:m(C),label:T,disabled:!1}})}const Zr=n=>n instanceof HTMLElement?n:null,Td=n=>[...n.querySelectorAll("[data-animated-month]")??[]],xj=n=>Zr(n.querySelector("[data-animated-month]")),Pd=n=>Zr(n.querySelector("[data-animated-caption]")),Md=n=>Zr(n.querySelector("[data-animated-weeks]")),vj=n=>Zr(n.querySelector("[data-animated-nav]")),Cj=n=>Zr(n.querySelector("[data-animated-weekdays]"));function Sj(n,a,{classNames:o,months:r,focused:c,dateLib:d}){const h=S.useRef(null),p=S.useRef(r),m=S.useRef(!1);S.useLayoutEffect(()=>{const g=p.current;if(p.current=r,!a||!n.current||!(n.current instanceof HTMLElement)||r.length===0||g.length===0||r.length!==g.length)return;const v=d.isSameMonth(r[0].date,g[0].date),b=d.isAfter(r[0].date,g[0].date),C=b?o[hn.caption_after_enter]:o[hn.caption_before_enter],T=b?o[hn.weeks_after_enter]:o[hn.weeks_before_enter],k=h.current,M=n.current.cloneNode(!0);if(M instanceof HTMLElement?(Td(M).forEach(D=>{if(!(D instanceof HTMLElement))return;const A=xj(D);A&&D.contains(A)&&D.removeChild(A);const P=Pd(D);P&&P.classList.remove(C);const w=Md(D);w&&w.classList.remove(T)}),h.current=M):h.current=null,m.current||v||c)return;const L=k instanceof HTMLElement?Td(k):[],E=Td(n.current);if(E?.every(N=>N instanceof HTMLElement)&&L&&L.every(N=>N instanceof HTMLElement)){m.current=!0,n.current.style.isolation="isolate";const N=vj(n.current);N&&(N.style.zIndex="1"),E.forEach((D,A)=>{const P=L[A];if(!P)return;D.style.position="relative",D.style.overflow="hidden";const w=Pd(D);w&&w.classList.add(C);const O=Md(D);O&&O.classList.add(T);const B=()=>{m.current=!1,n.current&&(n.current.style.isolation=""),N&&(N.style.zIndex=""),w&&w.classList.remove(C),O&&O.classList.remove(T),D.style.position="",D.style.overflow="",D.contains(P)&&D.removeChild(P)};P.style.pointerEvents="none",P.style.position="absolute",P.style.overflow="hidden",P.setAttribute("aria-hidden","true");const _=Cj(P);_&&(_.style.opacity="0");const K=Pd(P);K&&(K.classList.add(b?o[hn.caption_before_exit]:o[hn.caption_after_exit]),K.addEventListener("animationend",B));const J=Md(P);J&&J.classList.add(b?o[hn.weeks_before_exit]:o[hn.weeks_after_exit]),D.insertBefore(P,D.firstChild)})}})}function wj(n,a,o,r){const c=n[0],d=n[n.length-1],{ISOWeek:h,fixedWeeks:p,broadcastCalendar:m}=o??{},{addDays:g,differenceInCalendarDays:v,differenceInCalendarMonths:b,endOfBroadcastWeek:C,endOfISOWeek:T,endOfMonth:k,endOfWeek:M,isAfter:L,startOfBroadcastWeek:E,startOfISOWeek:N,startOfWeek:D}=r,A=m?E(c,r):h?N(c):D(c),P=m?C(d):h?T(k(d)):M(k(d)),w=a&&(m?C(a):h?T(a):M(a)),O=w&&L(P,w)?w:P,B=v(O,A),_=b(d,c)+1,K=[];for(let be=0;be<=B;be++){const te=g(A,be);K.push(te)}const $=(m?35:42)*_;if(p&&K.length<$){const be=$-K.length;for(let te=0;te<be;te++){const Se=g(K[K.length-1],1);K.push(Se)}}return K}function kj(n){const a=[];return n.reduce((o,r)=>{const c=r.weeks.reduce((d,h)=>d.concat(h.days.slice()),a.slice());return o.concat(c.slice())},a.slice())}function Aj(n,a,o,r){const{numberOfMonths:c=1}=o,d=[];for(let h=0;h<c;h++){const p=r.addMonths(n,h);if(a&&p>a)break;d.push(p)}return d}function cb(n,a,o,r){const{month:c,defaultMonth:d,today:h=r.today(),numberOfMonths:p=1}=n;let m=c||d||h;const{differenceInCalendarMonths:g,addMonths:v,startOfMonth:b}=r;if(o&&g(o,m)<p-1){const C=-1*(p-1);m=v(o,C)}return a&&g(m,a)<0&&(m=a),b(m)}function Nj(n,a,o,r){const{addDays:c,endOfBroadcastWeek:d,endOfISOWeek:h,endOfMonth:p,endOfWeek:m,getISOWeek:g,getWeek:v,startOfBroadcastWeek:b,startOfISOWeek:C,startOfWeek:T}=r,k=n.reduce((M,L)=>{const E=o.broadcastCalendar?b(L,r):o.ISOWeek?C(L):T(L),N=o.broadcastCalendar?d(L):o.ISOWeek?h(p(L)):m(p(L)),D=a.filter(O=>O>=E&&O<=N),A=o.broadcastCalendar?35:42;if(o.fixedWeeks&&D.length<A){const O=a.filter(B=>{const _=A-D.length;return B>N&&B<=c(N,_)});D.push(...O)}const P=D.reduce((O,B)=>{const _=o.ISOWeek?g(B):v(B),K=O.find($=>$.weekNumber===_),J=new hv(B,L,r);return K?K.days.push(J):O.push(new S1(_,[J])),O},[]),w=new C1(L,P);return M.push(w),M},[]);return o.reverseMonths?k.reverse():k}function Dj(n,a){let{startMonth:o,endMonth:r}=n;const{startOfYear:c,startOfDay:d,startOfMonth:h,endOfMonth:p,addYears:m,endOfYear:g,newDate:v,today:b}=a,{fromYear:C,toYear:T,fromMonth:k,toMonth:M}=n;!o&&k&&(o=k),!o&&C&&(o=a.newDate(C,0,1)),!r&&M&&(r=M),!r&&T&&(r=v(T,11,31));const L=n.captionLayout==="dropdown"||n.captionLayout==="dropdown-years";return o?o=h(o):C?o=v(C,0,1):!o&&L&&(o=c(m(n.today??b(),-100))),r?r=p(r):T?r=v(T,11,31):!r&&L&&(r=g(n.today??b())),[o&&d(o),r&&d(r)]}function Tj(n,a,o,r){if(o.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:d=1}=o,{startOfMonth:h,addMonths:p,differenceInCalendarMonths:m}=r,g=c?d:1,v=h(n);if(!a)return p(v,g);if(!(m(a,n)<d))return p(v,g)}function Pj(n,a,o,r){if(o.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:d}=o,{startOfMonth:h,addMonths:p,differenceInCalendarMonths:m}=r,g=c?d??1:1,v=h(n);if(!a)return p(v,-g);if(!(m(v,a)<=0))return p(v,-g)}function Mj(n){const a=[];return n.reduce((o,r)=>o.concat(r.weeks.slice()),a.slice())}function Zl(n,a){const[o,r]=S.useState(n);return[a===void 0?o:a,r]}function jj(n,a){const[o,r]=Dj(n,a),{startOfMonth:c,endOfMonth:d}=a,h=cb(n,o,r,a),[p,m]=Zl(h,n.month?h:void 0);S.useEffect(()=>{const A=cb(n,o,r,a);m(A)},[n.timeZone]);const{months:g,weeks:v,days:b,previousMonth:C,nextMonth:T}=S.useMemo(()=>{const A=Aj(p,r,{numberOfMonths:n.numberOfMonths},a),P=wj(A,n.endMonth?d(n.endMonth):void 0,{ISOWeek:n.ISOWeek,fixedWeeks:n.fixedWeeks,broadcastCalendar:n.broadcastCalendar},a),w=Nj(A,P,{broadcastCalendar:n.broadcastCalendar,fixedWeeks:n.fixedWeeks,ISOWeek:n.ISOWeek,reverseMonths:n.reverseMonths},a),O=Mj(w),B=kj(w),_=Pj(p,o,n,a),K=Tj(p,r,n,a);return{months:w,weeks:O,days:B,previousMonth:_,nextMonth:K}},[a,p.getTime(),r?.getTime(),o?.getTime(),n.disableNavigation,n.broadcastCalendar,n.endMonth?.getTime(),n.fixedWeeks,n.ISOWeek,n.numberOfMonths,n.pagedNavigation,n.reverseMonths]),{disableNavigation:k,onMonthChange:M}=n,L=A=>v.some(P=>P.days.some(w=>w.isEqualTo(A))),E=A=>{if(k)return;let P=c(A);o&&P<c(o)&&(P=c(o)),r&&P>c(r)&&(P=c(r)),m(P),M?.(P)};return{months:g,weeks:v,days:b,navStart:o,navEnd:r,previousMonth:C,nextMonth:T,goToMonth:E,goToDay:A=>{L(A)||E(A.date)}}}var Bn;(function(n){n[n.Today=0]="Today",n[n.Selected=1]="Selected",n[n.LastFocused=2]="LastFocused",n[n.FocusedModifier=3]="FocusedModifier"})(Bn||(Bn={}));function ub(n){return!n[pt.disabled]&&!n[pt.hidden]&&!n[pt.outside]}function Ej(n,a,o,r){let c,d=-1;for(const h of n){const p=a(h);ub(p)&&(p[pt.focused]&&d<Bn.FocusedModifier?(c=h,d=Bn.FocusedModifier):r?.isEqualTo(h)&&d<Bn.LastFocused?(c=h,d=Bn.LastFocused):o(h.date)&&d<Bn.Selected?(c=h,d=Bn.Selected):p[pt.today]&&d<Bn.Today&&(c=h,d=Bn.Today))}return c||(c=n.find(h=>ub(a(h)))),c}function Lj(n,a,o,r,c,d,h){const{ISOWeek:p,broadcastCalendar:m}=d,{addDays:g,addMonths:v,addWeeks:b,addYears:C,endOfBroadcastWeek:T,endOfISOWeek:k,endOfWeek:M,max:L,min:E,startOfBroadcastWeek:N,startOfISOWeek:D,startOfWeek:A}=h;let w={day:g,week:b,month:v,year:C,startOfWeek:O=>m?N(O,h):p?D(O):A(O),endOfWeek:O=>m?T(O):p?k(O):M(O)}[n](o,a==="after"?1:-1);return a==="before"&&r?w=L([r,w]):a==="after"&&c&&(w=E([c,w])),w}function Dv(n,a,o,r,c,d,h,p=0){if(p>365)return;const m=Lj(n,a,o.date,r,c,d,h),g=!!(d.disabled&&va(m,d.disabled,h)),v=!!(d.hidden&&va(m,d.hidden,h)),b=m,C=new hv(m,b,h);return!g&&!v?C:Dv(n,a,C,r,c,d,h,p+1)}function Rj(n,a,o,r,c){const{autoFocus:d}=n,[h,p]=S.useState(),m=Ej(a.days,o,r||(()=>!1),h),[g,v]=S.useState(d?m:void 0);return{isFocusTarget:M=>!!m?.isEqualTo(M),setFocused:v,focused:g,blur:()=>{p(g),v(void 0)},moveFocus:(M,L)=>{if(!g)return;const E=Dv(M,L,g,a.navStart,a.navEnd,n,c);E&&(n.disableNavigation&&!a.days.some(D=>D.isEqualTo(E))||(a.goToDay(E),v(E)))}}}function Oj(n,a){const{selected:o,required:r,onSelect:c}=n,[d,h]=Zl(o,c?o:void 0),p=c?o:d,{isSameDay:m}=a,g=T=>p?.some(k=>m(k,T))??!1,{min:v,max:b}=n;return{selected:p,select:(T,k,M)=>{let L=[...p??[]];if(g(T)){if(p?.length===v||r&&p?.length===1)return;L=p?.filter(E=>!m(E,T))}else p?.length===b?L=[T]:L=[...L,T];return c||h(L),c?.(L,T,k,M),L},isSelected:g}}function Ij(n,a,o=0,r=0,c=!1,d=Vn){const{from:h,to:p}=a||{},{isSameDay:m,isAfter:g,isBefore:v}=d;let b;if(!h&&!p)b={from:n,to:o>0?void 0:n};else if(h&&!p)m(h,n)?o===0?b={from:h,to:n}:c?b={from:h,to:void 0}:b=void 0:v(n,h)?b={from:n,to:h}:b={from:h,to:n};else if(h&&p)if(m(h,n)&&m(p,n))c?b={from:h,to:p}:b=void 0;else if(m(h,n))b={from:h,to:o>0?void 0:n};else if(m(p,n))b={from:n,to:o>0?void 0:n};else if(v(n,h))b={from:n,to:p};else if(g(n,h))b={from:h,to:n};else if(g(n,p))b={from:h,to:n};else throw new Error("Invalid range");if(b?.from&&b?.to){const C=d.differenceInCalendarDays(b.to,b.from);r>0&&C>r?b={from:n,to:void 0}:o>1&&C<o&&(b={from:n,to:void 0})}return b}function _j(n,a,o=Vn){const r=Array.isArray(a)?a:[a];let c=n.from;const d=o.differenceInCalendarDays(n.to,n.from),h=Math.min(d,6);for(let p=0;p<=h;p++){if(r.includes(c.getDay()))return!0;c=o.addDays(c,1)}return!1}function db(n,a,o=Vn){return xa(n,a.from,!1,o)||xa(n,a.to,!1,o)||xa(a,n.from,!1,o)||xa(a,n.to,!1,o)}function Uj(n,a,o=Vn){const r=Array.isArray(a)?a:[a];if(r.filter(p=>typeof p!="function").some(p=>typeof p=="boolean"?p:o.isDate(p)?xa(n,p,!1,o):mv(p,o)?p.some(m=>xa(n,m,!1,o)):Xl(p)?p.from&&p.to?db(n,{from:p.from,to:p.to},o):!1:pv(p)?_j(n,p.dayOfWeek,o):Hh(p)?o.isAfter(p.before,p.after)?db(n,{from:o.addDays(p.after,1),to:o.addDays(p.before,-1)},o):va(n.from,p,o)||va(n.to,p,o):Bh(p)||Fh(p)?va(n.from,p,o)||va(n.to,p,o):!1))return!0;const h=r.filter(p=>typeof p=="function");if(h.length){let p=n.from;const m=o.differenceInCalendarDays(n.to,n.from);for(let g=0;g<=m;g++){if(h.some(v=>v(p)))return!0;p=o.addDays(p,1)}}return!1}function zj(n,a){const{disabled:o,excludeDisabled:r,selected:c,required:d,onSelect:h}=n,[p,m]=Zl(c,h?c:void 0),g=h?c:p;return{selected:g,select:(C,T,k)=>{const{min:M,max:L}=n,E=C?Ij(C,g,M,L,d,a):void 0;return r&&o&&E?.from&&E.to&&Uj({from:E.from,to:E.to},o,a)&&(E.from=C,E.to=void 0),h||m(E),h?.(E,C,T,k),E},isSelected:C=>g&&xa(g,C,!1,a)}}function Hj(n,a){const{selected:o,required:r,onSelect:c}=n,[d,h]=Zl(o,c?o:void 0),p=c?o:d,{isSameDay:m}=a;return{selected:p,select:(b,C,T)=>{let k=b;return!r&&p&&p&&m(b,p)&&(k=void 0),c||h(k),c?.(k,b,C,T),k},isSelected:b=>p?m(p,b):!1}}function Bj(n,a){const o=Hj(n,a),r=Oj(n,a),c=zj(n,a);switch(n.mode){case"single":return o;case"multiple":return r;case"range":return c;default:return}}function Ut(n,a){return n instanceof ba&&n.timeZone===a?n:new ba(n,a)}function hb(n,a){return typeof n=="boolean"||typeof n=="function"?n:n instanceof Date?Ut(n,a):Array.isArray(n)?n.map(o=>o instanceof Date?Ut(o,a):o):Xl(n)?{...n,from:n.from?Ut(n.from,a):n.from,to:n.to?Ut(n.to,a):n.to}:Hh(n)?{before:Ut(n.before,a),after:Ut(n.after,a)}:Bh(n)?{after:Ut(n.after,a)}:Fh(n)?{before:Ut(n.before,a)}:n}function jd(n,a){return n&&(Array.isArray(n)?n.map(o=>hb(o,a)):hb(n,a))}function Fj(n){let a=n;const o=a.timeZone;if(o&&(a={...n,timeZone:o},a.today&&(a.today=Ut(a.today,o)),a.month&&(a.month=Ut(a.month,o)),a.defaultMonth&&(a.defaultMonth=Ut(a.defaultMonth,o)),a.startMonth&&(a.startMonth=Ut(a.startMonth,o)),a.endMonth&&(a.endMonth=Ut(a.endMonth,o)),a.mode==="single"&&a.selected?a.selected=Ut(a.selected,o):a.mode==="multiple"&&a.selected?a.selected=a.selected?.map(ye=>Ut(ye,o)):a.mode==="range"&&a.selected&&(a.selected={from:a.selected.from?Ut(a.selected.from,o):a.selected.from,to:a.selected.to?Ut(a.selected.to,o):a.selected.to}),a.disabled!==void 0&&(a.disabled=jd(a.disabled,o)),a.hidden!==void 0&&(a.hidden=jd(a.hidden,o)),a.modifiers)){const ye={};Object.keys(a.modifiers).forEach(Me=>{ye[Me]=jd(a.modifiers?.[Me],o)}),a.modifiers=ye}const{components:r,formatters:c,labels:d,dateLib:h,locale:p,classNames:m}=S.useMemo(()=>{const ye={...dv,...a.locale},Me=new fn({locale:ye,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:Me,components:Z1(a.components),formatters:cj(a.formatters),labels:pj(a.labels,Me.options),locale:ye,classNames:{...ej(),...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:g,mode:v,navLayout:b,numberOfMonths:C=1,onDayBlur:T,onDayClick:k,onDayFocus:M,onDayKeyDown:L,onDayMouseEnter:E,onDayMouseLeave:N,onNextClick:D,onPrevClick:A,showWeekNumber:P,styles:w}=a,{formatCaption:O,formatDay:B,formatMonthDropdown:_,formatWeekNumber:K,formatWeekNumberHeader:J,formatWeekdayName:$,formatYearDropdown:be}=c,te=jj(a,h),{days:Se,months:U,navStart:Z,navEnd:ne,previousMonth:W,nextMonth:oe,goToMonth:ue}=te,pe=$1(Se,a,Z,ne,h),{isSelected:X,select:ae,selected:de}=Bj(a,h)??{},{blur:ie,focused:se,isFocusTarget:xe,moveFocus:Pe,setFocused:ze}=Rj(a,te,pe,X??(()=>!1),h),{labelDayButton:Ze,labelGridcell:we,labelGrid:Re,labelMonthDropdown:Ve,labelNav:Tt,labelPrevious:Et,labelNext:Yn,labelWeekday:je,labelWeekNumber:Jt,labelWeekNumberHeader:Ln,labelYearDropdown:en}=d,Da=S.useMemo(()=>yj(h,a.ISOWeek,a.broadcastCalendar,a.today),[h,a.ISOWeek,a.broadcastCalendar,a.today]),Wn=v!==void 0||k!==void 0,bt=S.useCallback(()=>{W&&(ue(W),A?.(W))},[W,ue,A]),tn=S.useCallback(()=>{oe&&(ue(oe),D?.(oe))},[ue,oe,D]),Qn=S.useCallback((ye,Me)=>Ae=>{Ae.preventDefault(),Ae.stopPropagation(),ze(ye),!Me.disabled&&(ae?.(ye.date,Me,Ae),k?.(ye.date,Me,Ae))},[ae,k,ze]),ni=S.useCallback((ye,Me)=>Ae=>{ze(ye),M?.(ye.date,Me,Ae)},[M,ze]),Rn=S.useCallback((ye,Me)=>Ae=>{ie(),T?.(ye.date,Me,Ae)},[ie,T]),On=S.useCallback((ye,Me)=>Ae=>{const _e={ArrowLeft:[Ae.shiftKey?"month":"day",a.dir==="rtl"?"after":"before"],ArrowRight:[Ae.shiftKey?"month":"day",a.dir==="rtl"?"before":"after"],ArrowDown:[Ae.shiftKey?"year":"week","after"],ArrowUp:[Ae.shiftKey?"year":"week","before"],PageUp:[Ae.shiftKey?"year":"month","before"],PageDown:[Ae.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(_e[Ae.key]){Ae.preventDefault(),Ae.stopPropagation();const[ct,De]=_e[Ae.key];Pe(ct,De)}L?.(ye.date,Me,Ae)},[Pe,L,a.dir]),ji=S.useCallback((ye,Me)=>Ae=>{E?.(ye.date,Me,Ae)},[E]),To=S.useCallback((ye,Me)=>Ae=>{N?.(ye.date,Me,Ae)},[N]),Po=S.useCallback(ye=>Me=>{const Ae=Number(Me.target.value),_e=h.setMonth(h.startOfMonth(ye),Ae);ue(_e)},[h,ue]),$n=S.useCallback(ye=>Me=>{const Ae=Number(Me.target.value),_e=h.setYear(h.startOfMonth(ye),Ae);ue(_e)},[h,ue]),{className:ee,style:Oe}=S.useMemo(()=>({className:[m[ve.Root],a.className].filter(Boolean).join(" "),style:{...w?.[ve.Root],...a.style}}),[m,a.className,a.style,w]),ke=J1(a),Ie=S.useRef(null);Sj(Ie,!!a.animate,{classNames:m,months:U,focused:se,dateLib:h});const ht={dayPickerProps:a,selected:de,select:ae,isSelected:X,months:U,nextMonth:oe,previousMonth:W,goToMonth:ue,getModifiers:pe,components:r,classNames:m,styles:w,labels:d,formatters:c};return ce.createElement(fv.Provider,{value:ht},ce.createElement(r.Root,{rootRef:a.animate?Ie:void 0,className:ee,style:Oe,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"],...ke},ce.createElement(r.Months,{className:m[ve.Months],style:w?.[ve.Months]},!a.hideNavigation&&!b&&ce.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:m[ve.Nav],style:w?.[ve.Nav],"aria-label":Tt(),onPreviousClick:bt,onNextClick:tn,previousMonth:W,nextMonth:oe}),U.map((ye,Me)=>ce.createElement(r.Month,{"data-animated-month":a.animate?"true":void 0,className:m[ve.Month],style:w?.[ve.Month],key:Me,displayIndex:Me,calendarMonth:ye},b==="around"&&!a.hideNavigation&&Me===0&&ce.createElement(r.PreviousMonthButton,{type:"button",className:m[ve.PreviousMonthButton],tabIndex:W?void 0:-1,"aria-disabled":W?void 0:!0,"aria-label":Et(W),onClick:bt,"data-animated-button":a.animate?"true":void 0},ce.createElement(r.Chevron,{disabled:W?void 0:!0,className:m[ve.Chevron],orientation:a.dir==="rtl"?"right":"left"})),ce.createElement(r.MonthCaption,{"data-animated-caption":a.animate?"true":void 0,className:m[ve.MonthCaption],style:w?.[ve.MonthCaption],calendarMonth:ye,displayIndex:Me},g?.startsWith("dropdown")?ce.createElement(r.DropdownNav,{className:m[ve.Dropdowns],style:w?.[ve.Dropdowns]},(()=>{const Ae=g==="dropdown"||g==="dropdown-months"?ce.createElement(r.MonthsDropdown,{key:"month",className:m[ve.MonthsDropdown],"aria-label":Ve(),classNames:m,components:r,disabled:!!a.disableNavigation,onChange:Po(ye.date),options:mj(ye.date,Z,ne,c,h),style:w?.[ve.Dropdown],value:h.getMonth(ye.date)}):ce.createElement("span",{key:"month"},_(ye.date,h)),_e=g==="dropdown"||g==="dropdown-years"?ce.createElement(r.YearsDropdown,{key:"year",className:m[ve.YearsDropdown],"aria-label":en(h.options),classNames:m,components:r,disabled:!!a.disableNavigation,onChange:$n(ye.date),options:bj(Z,ne,c,h,!!a.reverseYears),style:w?.[ve.Dropdown],value:h.getYear(ye.date)}):ce.createElement("span",{key:"year"},be(ye.date,h));return h.getMonthYearOrder()==="year-first"?[_e,Ae]:[Ae,_e]})(),ce.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"}},O(ye.date,h.options,h))):ce.createElement(r.CaptionLabel,{className:m[ve.CaptionLabel],role:"status","aria-live":"polite"},O(ye.date,h.options,h))),b==="around"&&!a.hideNavigation&&Me===C-1&&ce.createElement(r.NextMonthButton,{type:"button",className:m[ve.NextMonthButton],tabIndex:oe?void 0:-1,"aria-disabled":oe?void 0:!0,"aria-label":Yn(oe),onClick:tn,"data-animated-button":a.animate?"true":void 0},ce.createElement(r.Chevron,{disabled:oe?void 0:!0,className:m[ve.Chevron],orientation:a.dir==="rtl"?"left":"right"})),Me===C-1&&b==="after"&&!a.hideNavigation&&ce.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:m[ve.Nav],style:w?.[ve.Nav],"aria-label":Tt(),onPreviousClick:bt,onNextClick:tn,previousMonth:W,nextMonth:oe}),ce.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":v==="multiple"||v==="range","aria-label":Re(ye.date,h.options,h)||void 0,className:m[ve.MonthGrid],style:w?.[ve.MonthGrid]},!a.hideWeekdays&&ce.createElement(r.Weekdays,{"data-animated-weekdays":a.animate?"true":void 0,className:m[ve.Weekdays],style:w?.[ve.Weekdays]},P&&ce.createElement(r.WeekNumberHeader,{"aria-label":Ln(h.options),className:m[ve.WeekNumberHeader],style:w?.[ve.WeekNumberHeader],scope:"col"},J()),Da.map(Ae=>ce.createElement(r.Weekday,{"aria-label":je(Ae,h.options,h),className:m[ve.Weekday],key:String(Ae),style:w?.[ve.Weekday],scope:"col"},$(Ae,h.options,h)))),ce.createElement(r.Weeks,{"data-animated-weeks":a.animate?"true":void 0,className:m[ve.Weeks],style:w?.[ve.Weeks]},ye.weeks.map(Ae=>ce.createElement(r.Week,{className:m[ve.Week],key:Ae.weekNumber,style:w?.[ve.Week],week:Ae},P&&ce.createElement(r.WeekNumber,{week:Ae,style:w?.[ve.WeekNumber],"aria-label":Jt(Ae.weekNumber,{locale:p}),className:m[ve.WeekNumber],scope:"row",role:"rowheader"},K(Ae.weekNumber,h)),Ae.days.map(_e=>{const{date:ct}=_e,De=pe(_e);if(De[pt.focused]=!De.hidden&&!!se?.isEqualTo(_e),De[jn.selected]=X?.(ct)||De.selected,Xl(de)){const{from:nn,to:Nn}=de;De[jn.range_start]=!!(nn&&Nn&&h.isSameDay(ct,nn)),De[jn.range_end]=!!(nn&&Nn&&h.isSameDay(ct,Nn)),De[jn.range_middle]=xa(de,ct,!0,h)}const Ht=gj(De,w,a.modifiersStyles),Xn=X1(De,m,a.modifiersClassNames),Pt=!Wn&&!De.hidden?we(ct,De,h.options,h):void 0;return ce.createElement(r.Day,{key:`${_e.isoDate}_${_e.displayMonthId}`,day:_e,modifiers:De,className:Xn.join(" "),style:Ht,role:"gridcell","aria-selected":De.selected||void 0,"aria-label":Pt,"data-day":_e.isoDate,"data-month":_e.outside?_e.dateMonthId:void 0,"data-selected":De.selected||void 0,"data-disabled":De.disabled||void 0,"data-hidden":De.hidden||void 0,"data-outside":_e.outside||void 0,"data-focused":De.focused||void 0,"data-today":De.today||void 0},!De.hidden&&Wn?ce.createElement(r.DayButton,{className:m[ve.DayButton],style:w?.[ve.DayButton],type:"button",day:_e,modifiers:De,disabled:!De.focused&&De.disabled||void 0,"aria-disabled":De.focused&&De.disabled||void 0,tabIndex:xe(_e)?0:-1,"aria-label":Ze(ct,De,h.options,h),onClick:Qn(_e,De),onBlur:Rn(_e,De),onFocus:ni(_e,De),onKeyDown:On(_e,De),onMouseEnter:ji(_e,De),onMouseLeave:To(_e,De)},B(ct,h.options,h)):!De.hidden&&B(_e.date,h.options,h))})))))))),a.footer&&ce.createElement(r.Footer,{className:m[ve.Footer],style:w?.[ve.Footer],role:"status","aria-live":"polite"},a.footer)))}function qj({className:n,classNames:a,showOutsideDays:o=!0,...r}){return l.jsx(Fj,{showOutsideDays:o,className:F("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:F(yl({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-70 hover:opacity-100 hover:bg-accent rounded-md"),button_next:F(yl({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:F("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:F(yl({variant:"ghost"}),"h-8 w-8 p-0 font-normal rounded-full text-xs","aria-selected:opacity-100"),range_start:F("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:F("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:F("aria-selected:bg-accent aria-selected:text-accent-foreground","aria-selected:rounded-none"),selected:F("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:d,...h})=>{const p=c==="left"?ow:c==="right"?El:c==="up"?th:Ll;return l.jsx(p,{className:F("h-4 w-4",d),...h})}},...r})}qj.displayName="Calendar";const Kj=S.lazy(()=>it(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function PL({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,rawSettingsEnv:r,onChange:c,missingRequiredFields:d=[]}){const{t:h}=fe(),p=d.length>0;return l.jsx(S.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(An,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:h("providerEditor.loadingEditor")})]}),children:l.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[!a&&o!==null&&l.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:[l.jsx(No,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&p&&l.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:[l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:d.join(", ")}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"These fields will use default values at runtime."})]})]}),l.jsx("div",{className:"min-h-0 flex-1 overflow-hidden px-6 pb-4 pt-4",children:l.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:l.jsx(Kj,{value:n,onChange:c,language:"json",minHeight:"100%",heightMode:"fill-parent"})})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx("div",{className:"border rounded-md overflow-hidden",children:l.jsx(Rh,{profileEnv:r})})})]})})}const ML={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},jL=[{id:"codex-target-runtime-support",title:"Native Codex runtime support is live",summary:"Codex now participates as a first-class runtime target through ccs-codex, ccsx, ccsxp, or --target codex.",primaryAction:"Use Codex as a runtime target for native Codex sessions and Codex-routed CLIProxy flows.",publishedAt:"2026-03-28",status:"new",scopes:["target","cliproxy","api-profiles"],entryIds:["codex-target","codex-cliproxy"],highlights:["Use ccs-codex or ccsx for native Codex runs.","Use ccsxp for the built-in CCS Codex provider shortcut on native Codex.","Built-in Codex and Codex bridge profiles can run on native Codex with --target codex.","Saved default targets for API profiles and variants can now be claude, droid, or codex."],actions:[{id:"copy-codex-alias-command",label:"Open native Codex",description:"Launch Codex through the explicit CCS runtime alias.",type:"command",command:"ccs-codex"},{id:"copy-codex-provider-command",label:"Run built-in Codex on Codex",description:"Use the built-in Codex provider shortcut on native Codex.",type:"command",command:'ccsxp "your prompt"'},{id:"copy-codex-provider-command-explicit",label:"Run built-in Codex on Codex (explicit)",description:"Use the explicit built-in Codex provider route on native Codex.",type:"command",command:'ccs codex --target codex "your prompt"'},{id:"open-codex-dashboard",label:"Open Codex dashboard",description:"Review Codex runtime support, config layers, and dashboard setup flows.",type:"route",path:"/codex"}],routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx",'ccsxp "your prompt"','ccs codex --target codex "your prompt"']},{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 ccs-droid as the explicit alias, with ccsd kept as the legacy shortcut."],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-ccs-droid-command",label:"Run once with explicit Droid alias",description:"Use ccs-droid to force the Droid target with your current profile.",type:"command",command:"ccs-droid 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:["ccs-droid glm",'ccs codex --target droid "your prompt"',"ccs cliproxy create mycodex --provider codex --target droid"]},{id:"updates-center-launch",title:"Updates Center is available for rollout tasks",summary:"A focused Updates Center 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 Center 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 Center",path:"/updates"}],commands:["ccs config"]}],Gj=[{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:["ccs-droid glm","ccs km --target droid","ccs codex --target droid"],notes:"Use ccs-droid as the explicit runtime alias. Legacy ccsd still works."},{id:"codex-target",name:"Codex CLI",scope:"target",status:"new",summary:"First-class runtime target for native Codex sessions and Codex-routed CLIProxy flows.",pillars:{baseUrl:"Native ~/.codex config for default mode, transient -c overrides for CCS-backed routes",auth:"Native Codex auth for default mode, env_key injection for CCS-backed routes",model:"Native Codex config or routed Codex model mapping from CLIProxy"},routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx","ccs codex --target codex","ccs codex-api --target codex"],notes:"Saved default targets for API profiles and CLIProxy variants can now be claude, droid, or codex."},{id:"codex-cliproxy",name:"Codex via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed provider with configurable variant model and a native Codex shortcut.",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:['ccsxp "your prompt"',"ccs codex --target codex","ccs codex","ccs cliproxy create mycodex --provider codex","ccs api create codex-api --cliproxy-provider codex"],notes:"Use ccsxp when you want the built-in Codex provider on native Codex without retyping --target 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."}],Vj=new Map(Gj.map(n=>[n.id,n]));function EL(n){return n.entryIds.map(a=>Vj.get(a)).filter(a=>!!a)}function LL(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)}S.lazy(()=>it(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function Yj(){const{t:n}=fe(),{isDark:a,setTheme:o}=fh(),[r,c]=S.useState(""),[d,h]=S.useState(""),[p,m]=S.useState(!1),[g,v]=S.useState(null),[b,C]=S.useState(!1),{login:T,authRequired:k,isAuthenticated:M,loading:L,accessMode:E,authEnabled:N}=Ul(),D=Jd(),A=jl(),P=E==="setup",w=n(P?"auth.remoteGuardLabel":"auth.protectedAccessLabel"),O=n(P?N?"auth.incompleteSetupDescription":"auth.remoteSetupDescription":"auth.loginDescription"),B=A.state?.from?.pathname||"/";if(S.useEffect(()=>{L||(M||!k)&&D(B,{replace:!0})},[M,k,L,D,B]),L)return l.jsx("div",{className:"flex min-h-[100dvh] items-center justify-center bg-background px-4",children:l.jsxs("div",{className:"flex items-center gap-3 rounded-full border border-border/80 bg-card/90 px-5 py-3 text-sm text-muted-foreground shadow-sm",children:[l.jsx(An,{className:"h-4 w-4 animate-spin"}),n("auth.loading")]})});if(M||!k)return null;const _=async K=>{K.preventDefault(),v(null),C(!0);try{await T(r,d),D(B,{replace:!0})}catch(J){v(J instanceof Error?J.message:n("auth.loginFailed"))}finally{C(!1)}};return l.jsxs("div",{className:"relative min-h-[100dvh] overflow-hidden bg-background",children:[l.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(167,85,52,0.16),transparent_42%),radial-gradient(circle_at_bottom_right,rgba(39,39,42,0.12),transparent_48%)]"}),l.jsx("div",{className:"absolute inset-0 opacity-[0.18] [background-image:linear-gradient(rgba(127,117,107,0.14)_1px,transparent_1px),linear-gradient(90deg,rgba(127,117,107,0.14)_1px,transparent_1px)] [background-size:24px_24px]"}),l.jsx("div",{className:"relative mx-auto flex min-h-[100dvh] max-w-6xl items-center px-4 py-8 sm:px-6",children:l.jsxs("div",{className:"grid w-full items-stretch gap-6 lg:grid-cols-[minmax(0,1.05fr)_minmax(360px,430px)]",children:[l.jsxs("section",{className:"flex flex-col justify-between rounded-[28px] border border-border/70 bg-card/85 p-6 shadow-[0_24px_80px_-48px_rgba(68,48,34,0.55)] backdrop-blur sm:p-8",children:[l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsxs("span",{className:"inline-flex w-fit items-center gap-2 rounded-full border border-border/70 bg-background/75 px-3 py-1 text-xs font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:[l.jsx(dl,{className:"h-3.5 w-3.5 text-accent"}),w]}),l.jsxs("div",{className:"inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/75 p-1 shadow-sm backdrop-blur",children:[l.jsxs(rt,{type:"button",variant:"ghost",size:"sm",className:F("rounded-full px-3 text-xs font-semibold",!a&&"bg-card text-foreground shadow-sm"),"aria-pressed":!a,onClick:()=>o("light"),children:[l.jsx(zb,{className:"h-3.5 w-3.5"}),n("auth.lightMode")]}),l.jsxs(rt,{type:"button",variant:"ghost",size:"sm",className:F("rounded-full px-3 text-xs font-semibold",a&&"bg-card text-foreground shadow-sm"),"aria-pressed":a,onClick:()=>o("dark"),children:[l.jsx(Hb,{className:"h-3.5 w-3.5"}),n("auth.darkMode")]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("h1",{className:"max-w-xl text-4xl font-semibold tracking-[-0.04em] text-balance text-foreground sm:text-5xl",children:n(P?"auth.remoteSetupTitle":"auth.dashboardTitle")}),l.jsx("p",{className:"max-w-2xl text-base leading-7 text-muted-foreground sm:text-lg",children:O})]})]}),l.jsxs("div",{className:"mt-8 grid gap-3 text-sm text-muted-foreground sm:grid-cols-3",children:[l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/70 p-4",children:[l.jsx(Fg,{className:"mb-3 h-4 w-4 text-accent"}),l.jsx("p",{children:n("auth.safetyNoteRemote")})]}),l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/70 p-4",children:[l.jsx(qg,{className:"mb-3 h-4 w-4 text-accent"}),l.jsx("p",{children:n("auth.safetyNoteLocal")})]}),l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/70 p-4",children:[l.jsx(dl,{className:"mb-3 h-4 w-4 text-accent"}),l.jsx("p",{children:n("auth.safetyNoteSession")})]})]})]}),l.jsxs(SM,{className:"justify-center rounded-[28px] border-border/70 bg-card/95 py-0 shadow-[0_24px_90px_-54px_rgba(34,24,16,0.62)]",children:[l.jsxs(wM,{className:"space-y-3 border-b border-border/70 px-6 py-6",children:[l.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl border border-accent/20 bg-accent/10",children:P?l.jsx(Fg,{className:"h-5 w-5 text-accent"}):l.jsx(qg,{className:"h-5 w-5 text-accent"})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(kM,{className:"text-2xl tracking-[-0.03em]",children:n(P?"auth.remoteSetupTitle":"auth.dashboardTitle")}),l.jsx(AM,{className:"text-sm leading-6 text-muted-foreground",children:P?O:n("auth.credentialsHint")})]})]}),l.jsx(NM,{className:"space-y-5 px-6 py-6",children:P?l.jsxs(l.Fragment,{children:[l.jsxs(_r,{variant:"warning",className:"rounded-2xl border-yellow-300/70 bg-yellow-50/80",children:[l.jsx(Br,{className:"h-4 w-4"}),l.jsx(Tl,{children:n("auth.noDefaultCredentials")}),l.jsx(Ur,{children:n("auth.credentialsHint")})]}),l.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/75 p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[l.jsx(rw,{className:"h-4 w-4 text-accent"}),n("auth.hostStepTitle")]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:n("auth.hostStepDescription")}),l.jsx("code",{className:"mt-4 block rounded-xl border border-border/70 bg-muted/60 px-3 py-2 font-mono text-[13px] text-foreground",children:"ccs config auth setup"})]}),l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/75 p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[l.jsx(dl,{className:"h-4 w-4 text-accent"}),n("auth.localStepTitle")]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:n("auth.localStepDescription")})]})]})]}):l.jsxs("form",{onSubmit:_,className:"space-y-4",children:[g&&l.jsxs(_r,{variant:"destructive",className:"rounded-2xl",children:[l.jsx(Br,{className:"h-4 w-4"}),l.jsx(Ur,{children:g})]}),l.jsxs(_r,{variant:"info",className:"rounded-2xl border-blue-200/80 bg-blue-50/80",children:[l.jsx(dl,{className:"h-4 w-4"}),l.jsx(Tl,{children:n("auth.noDefaultCredentials")}),l.jsx(Ur,{children:n("auth.credentialsHint")})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{htmlFor:"username",className:"text-sm font-semibold",children:n("auth.username")}),l.jsx(Hn,{id:"username",type:"text",value:r,onChange:K=>c(K.target.value),placeholder:n("auth.usernamePlaceholder"),autoComplete:"username",className:"h-12 rounded-2xl border-border/80 bg-background/85 px-4 text-base md:text-base",disabled:b,required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{htmlFor:"password",className:"text-sm font-semibold",children:n("auth.password")}),l.jsxs("div",{className:"relative",children:[l.jsx(Hn,{id:"password",type:p?"text":"password",value:d,onChange:K=>h(K.target.value),placeholder:n("auth.passwordPlaceholder"),autoComplete:"current-password",className:"h-12 rounded-2xl border-border/80 bg-background/85 px-4 pr-14 text-base md:text-base",disabled:b,required:!0}),l.jsx(rt,{type:"button",variant:"ghost",size:"sm",className:"absolute inset-y-1 right-1 h-auto rounded-xl px-3 text-muted-foreground hover:text-foreground","aria-label":n(p?"auth.hidePassword":"auth.showPassword"),"aria-pressed":p,onClick:()=>m(K=>!K),disabled:b,children:p?l.jsx(Vr,{className:"h-4 w-4"}):l.jsx(Yr,{className:"h-4 w-4"})})]})]}),l.jsx(rt,{type:"submit",className:"h-12 w-full rounded-2xl text-sm font-semibold",disabled:b,children:b?l.jsxs(l.Fragment,{children:[l.jsx(An,{className:"mr-2 h-4 w-4 animate-spin"}),n("auth.signingIn")]}):n("auth.signIn")})]})})]})]})})]})}const Wj=S.lazy(()=>it(()=>import("./index-BY2j-o67.js"),__vite__mapDeps([21,1,2,4,5,7,22,6,8,9])).then(n=>({default:n.AnalyticsPage}))),Qj=S.lazy(()=>it(()=>import("./api-D2cjf1H4.js"),__vite__mapDeps([23,1,2,5,24,17,6,4,3,7,8,9])).then(n=>({default:n.ApiPage}))),$j=S.lazy(()=>it(()=>import("./cliproxy-CD7z-_q8.js"),__vite__mapDeps([25,1,2,5,15,6,4,18,26,24,17,27,28,16,7,8,9])).then(n=>({default:n.CliproxyPage}))),Xj=S.lazy(()=>it(()=>import("./cliproxy-ai-providers-QSOOqh8F.js"),__vite__mapDeps([29,1,2,16,17,5,6,4,24,7,8,9])).then(n=>({default:n.CliproxyAiProvidersPage}))),Zj=S.lazy(()=>it(()=>import("./cliproxy-control-panel-D9dLU28p.js"),__vite__mapDeps([30,1,2,5,15,4,6,7,8,9])).then(n=>({default:n.CliproxyControlPanelPage}))),Jj=S.lazy(()=>it(()=>import("./copilot-BnQrRCuJ.js"),__vite__mapDeps([31,1,2,5,24,17,4,27,28,6,7,8,9])).then(n=>({default:n.CopilotPage}))),eE=S.lazy(()=>it(()=>import("./cursor-CXopLKfC.js"),__vite__mapDeps([32,1,2,6,5,15,27,28,4,7,8,9])).then(n=>({default:n.CursorPage}))),tE=S.lazy(()=>it(()=>import("./claude-extension-D-skBToQ.js"),__vite__mapDeps([33,1,2,5,6,4,7,8,9])).then(n=>({default:n.ClaudeExtensionPage}))),nE=S.lazy(()=>it(()=>import("./codex-CHO5_hku.js"),__vite__mapDeps([34,1,2,6,4,27,5,9,7,35,36,8])).then(n=>({default:n.CodexPage}))),aE=S.lazy(()=>it(()=>import("./droid-CLFg9ELE.js"),__vite__mapDeps([37,1,2,6,5,36,4,27,7,8,9])).then(n=>({default:n.DroidPage}))),iE=S.lazy(()=>it(()=>import("./logs-Bb1OVYeK.js"),__vite__mapDeps([38,1,2,4,5,6,7,8,9])).then(n=>({default:n.LogsPage}))),oE=S.lazy(()=>it(()=>import("./accounts-DN0lP-yj.js"),__vite__mapDeps([39,1,2,5,35,17,6,4,26,7,8,9])).then(n=>({default:n.AccountsPage}))),rE=S.lazy(()=>it(()=>Promise.resolve().then(()=>f1),void 0).then(n=>({default:n.SettingsPage}))),sE=S.lazy(()=>it(()=>import("./health-B_3JpCrY.js"),__vite__mapDeps([40,1,2,5,6,4,7,8,9])).then(n=>({default:n.HealthPage}))),lE=S.lazy(()=>it(()=>import("./shared-DyQlJnbj.js"),__vite__mapDeps([41,1,2,4,5,6,7,8,9])).then(n=>({default:n.SharedPage}))),cE=S.lazy(()=>it(()=>import("./updates-DSCXb6Au.js"),__vite__mapDeps([42,1,2,4,5,6,7,8,9])).then(n=>({default:n.UpdatesPage})));function Bt(){return l.jsx("div",{className:"flex h-64 items-center justify-center",children:l.jsx(An,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}function uE(){return l.jsx(NS,{client:ek,children:l.jsx(Wk,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(Qk,{children:l.jsx(eA,{children:l.jsxs(SS,{children:[l.jsxs(wS,{children:[l.jsx(At,{path:"/login",element:l.jsx(Yj,{})}),l.jsx(At,{element:l.jsx(tA,{}),children:l.jsxs(At,{element:l.jsx(sD,{}),children:[l.jsx(At,{path:"/",element:l.jsx(PP,{})}),l.jsx(At,{path:"/analytics",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(Wj,{})})}),l.jsx(At,{path:"/updates",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(cE,{})})}),l.jsx(At,{path:"/providers",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(Qj,{})})}),l.jsx(At,{path:"/cliproxy",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx($j,{})})}),l.jsx(At,{path:"/cliproxy/ai-providers",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(Xj,{})})}),l.jsx(At,{path:"/cliproxy/control-panel",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(Zj,{})})}),l.jsx(At,{path:"/copilot",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(Jj,{})})}),l.jsx(At,{path:"/cursor",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(eE,{})})}),l.jsx(At,{path:"/claude-extension",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(tE,{})})}),l.jsx(At,{path:"/codex",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(nE,{})})}),l.jsx(At,{path:"/droid",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(aE,{})})}),l.jsx(At,{path:"/accounts",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(oE,{})})}),l.jsx(At,{path:"/settings",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(rE,{})})}),l.jsx(At,{path:"/health",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(sE,{})})}),l.jsx(At,{path:"/logs",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(iE,{})})}),l.jsx(At,{path:"/shared",element:l.jsx(S.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(lE,{})})})]})})]}),l.jsx(DS,{position:"top-right"})]})})})})})}const Tv=document.getElementById("root");if(!Tv)throw new Error("Root element not found. Failed to mount React application.");Xw.createRoot(Tv).render(l.jsx(S.StrictMode,{children:l.jsx(uE,{})}));export{dL as $,RP as A,zt as B,SM as C,HP as D,oL as E,sL as F,jP as G,UP as H,Hn as I,BP as J,rL as K,qt as L,iN as M,oN as N,rN as O,ox as P,Yx as Q,Eh as R,$e as S,Sa as T,Pl as U,Yd as V,me as W,uL as X,Fe as Y,cL as Z,AM as _,fe as a,jE as a$,hL as a0,fL as a1,pL as a2,mL as a3,gL as a4,yL as a5,$x as a6,bL as a7,PM as a8,Ah as a9,SL as aA,vL as aB,kN as aC,aM as aD,xL as aE,GP as aF,nv as aG,tT as aH,gT as aI,Pi as aJ,YN as aK,WN as aL,QN as aM,$N as aN,HD as aO,xx as aP,OE as aQ,IE as aR,_E as aS,UE as aT,TL as aU,wE as aV,aN as aW,PE as aX,ME as aY,JA as aZ,eN as a_,vE as aa,ZA as ab,kE as ac,DE as ad,EE as ae,LE as af,ph as ag,mh as ah,gh as ai,yh as aj,bh as ak,wL as al,jM as am,kL as an,$r as ao,XE as ap,qd as aq,ZE as ar,Hd as as,RE as at,JE as au,eL as av,nL as aw,vy as ax,tL as ay,CL as az,NM as b,tN as b0,nN as b1,TE as b2,Sh as b3,VE as b4,WE as b5,QE as b6,YE as b7,ov as b8,Rh as b9,jk as bA,Od as bB,Di as bC,wk as bD,Ak as bE,Pk as bF,Ok as bG,qE as bH,AE as bI,NE as bJ,HE as bK,BE as bL,GE as bM,KE as bN,yl as bO,$E as ba,Tr as bb,CE as bc,SE as bd,_r as be,Tl as bf,Ur as bg,PL as bh,Mh as bi,qr as bj,jh as bk,CP as bl,NP as bm,aL as bn,iL as bo,LL as bp,ML as bq,jL as br,EL as bs,sv as bt,l1 as bu,u1 as bv,FE as bw,zE as bx,Zb as by,Lk as bz,F as c,rt as d,AL as e,NL as f,EM as g,qj as h,xE as i,wM as j,kM as k,qD as l,KD as m,Do as n,DL as o,wa as p,ka as q,px as r,wh as s,mx as t,oh as u,kh as v,Ir as w,Hy as x,KP as y,lL as z};