@kaitranntt/ccs 7.66.1-dev.4 → 7.66.1-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ccs.js +10 -0
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/proxy-detector.d.ts.map +1 -1
- package/dist/cliproxy/proxy-detector.js +6 -2
- package/dist/cliproxy/proxy-detector.js.map +1 -1
- package/dist/cliproxy/startup-lock.d.ts.map +1 -1
- package/dist/cliproxy/startup-lock.js +5 -1
- package/dist/cliproxy/startup-lock.js.map +1 -1
- package/dist/cliproxy/tool-sanitization-proxy.d.ts +1 -0
- package/dist/cliproxy/tool-sanitization-proxy.d.ts.map +1 -1
- package/dist/cliproxy/tool-sanitization-proxy.js +6 -0
- package/dist/cliproxy/tool-sanitization-proxy.js.map +1 -1
- package/dist/commands/cleanup-command.d.ts +1 -1
- package/dist/commands/cleanup-command.d.ts.map +1 -1
- package/dist/commands/cleanup-command.js +57 -34
- package/dist/commands/cleanup-command.js.map +1 -1
- package/dist/commands/command-catalog.js +1 -1
- package/dist/commands/command-catalog.js.map +1 -1
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/config-command.js +23 -0
- package/dist/commands/config-command.js.map +1 -1
- package/dist/config/unified-config-loader.d.ts +2 -1
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +31 -1
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +22 -0
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +10 -1
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/errors/error-handler.d.ts.map +1 -1
- package/dist/errors/error-handler.js +13 -0
- package/dist/errors/error-handler.js.map +1 -1
- package/dist/glmt/glmt-transformer.d.ts +1 -0
- package/dist/glmt/glmt-transformer.d.ts.map +1 -1
- package/dist/glmt/glmt-transformer.js +9 -0
- package/dist/glmt/glmt-transformer.js.map +1 -1
- package/dist/services/logging/index.d.ts +7 -0
- package/dist/services/logging/index.d.ts.map +1 -0
- package/dist/services/logging/index.js +22 -0
- package/dist/services/logging/index.js.map +1 -0
- package/dist/services/logging/log-buffer.d.ts +5 -0
- package/dist/services/logging/log-buffer.d.ts.map +1 -0
- package/dist/services/logging/log-buffer.js +20 -0
- package/dist/services/logging/log-buffer.js.map +1 -0
- package/dist/services/logging/log-config.d.ts +4 -0
- package/dist/services/logging/log-config.d.ts.map +1 -0
- package/dist/services/logging/log-config.js +68 -0
- package/dist/services/logging/log-config.js.map +1 -0
- package/dist/services/logging/log-paths.d.ts +8 -0
- package/dist/services/logging/log-paths.d.ts.map +1 -0
- package/dist/services/logging/log-paths.js +66 -0
- package/dist/services/logging/log-paths.js.map +1 -0
- package/dist/services/logging/log-reader.d.ts +5 -0
- package/dist/services/logging/log-reader.d.ts.map +1 -0
- package/dist/services/logging/log-reader.js +124 -0
- package/dist/services/logging/log-reader.js.map +1 -0
- package/dist/services/logging/log-redaction.d.ts +2 -0
- package/dist/services/logging/log-redaction.d.ts.map +1 -0
- package/dist/services/logging/log-redaction.js +53 -0
- package/dist/services/logging/log-redaction.js.map +1 -0
- package/dist/services/logging/log-storage.d.ts +4 -0
- package/dist/services/logging/log-storage.d.ts.map +1 -0
- package/dist/services/logging/log-storage.js +109 -0
- package/dist/services/logging/log-storage.js.map +1 -0
- package/dist/services/logging/log-types.d.ts +30 -0
- package/dist/services/logging/log-types.d.ts.map +1 -0
- package/dist/services/logging/log-types.js +19 -0
- package/dist/services/logging/log-types.js.map +1 -0
- package/dist/services/logging/logger.d.ts +9 -0
- package/dist/services/logging/logger.d.ts.map +1 -0
- package/dist/services/logging/logger.js +46 -0
- package/dist/services/logging/logger.js.map +1 -0
- package/dist/ui/assets/{accounts-DUWrYt3x.js → accounts-CoxemH1E.js} +1 -1
- package/dist/ui/assets/{alert-dialog-D_Yz_iZc.js → alert-dialog-CIVd-ody.js} +1 -1
- package/dist/ui/assets/{api-CBTgaJzF.js → api-BVfXHYxj.js} +2 -2
- package/dist/ui/assets/{auth-section-BoDZqbPJ.js → auth-section-DDd9GEBK.js} +1 -1
- package/dist/ui/assets/{backups-section-D4-FbvV4.js → backups-section-BWbdSnXt.js} +1 -1
- package/dist/ui/assets/{channels-BFBl4r-j.js → channels-BPxlzEif.js} +1 -1
- package/dist/ui/assets/{checkbox-DjeKLLRq.js → checkbox-BKFUU2sG.js} +1 -1
- package/dist/ui/assets/{claude-extension-C1FsOq-7.js → claude-extension-C-6KUHA0.js} +1 -1
- package/dist/ui/assets/{cliproxy-C2sZh-5V.js → cliproxy-C2_5ie4n.js} +2 -2
- package/dist/ui/assets/{cliproxy-ai-providers-DcCbeAbO.js → cliproxy-ai-providers-D1-ZGJt9.js} +5 -5
- package/dist/ui/assets/{cliproxy-control-panel-v4kA_2hy.js → cliproxy-control-panel-CTjW6xf_.js} +1 -1
- package/dist/ui/assets/{codex-Cj_wPgw5.js → codex-xU8SQWhS.js} +1 -1
- package/dist/ui/assets/{confirm-dialog-B273dyaD.js → confirm-dialog-B9mG4XrE.js} +1 -1
- package/dist/ui/assets/{copilot-DvgELRFw.js → copilot-B_cDTXu9.js} +2 -2
- package/dist/ui/assets/{cursor-8gcvd36W.js → cursor-B0aHykdX.js} +1 -1
- package/dist/ui/assets/{droid-DZDVCJBf.js → droid-Cou-phPn.js} +1 -1
- package/dist/ui/assets/{globalenv-section-CKv4BfT4.js → globalenv-section-B7fDhbOR.js} +1 -1
- package/dist/ui/assets/{health-DmZLL4IN.js → health-Cux4-fWS.js} +1 -1
- package/dist/ui/assets/icons-C4EMu2PL.js +1 -0
- package/dist/ui/assets/index-7qTHMz5v.css +1 -0
- package/dist/ui/assets/index-B-YlctHj.js +69 -0
- package/dist/ui/assets/index-CHWn7pks.js +1 -0
- package/dist/ui/assets/{index-DUM_z9jT.js → index-Cp8KcNTJ.js} +1 -1
- package/dist/ui/assets/{index-l8yS9gLo.js → index-CvqYFZA_.js} +1 -1
- package/dist/ui/assets/{index-DESEUD89.js → index-DOFoLunG.js} +1 -1
- package/dist/ui/assets/{index-B185OZF2.js → index-WuuQNt8F.js} +1 -1
- package/dist/ui/assets/logs-C2LvO27n.js +1 -0
- package/dist/ui/assets/{masked-input-C-vLCUuQ.js → masked-input-DyN9mmaP.js} +1 -1
- package/dist/ui/assets/{proxy-status-widget-190bjsgV.js → proxy-status-widget-EgraEYSp.js} +1 -1
- package/dist/ui/assets/{raw-json-settings-editor-panel-DcwxTJM2.js → raw-json-settings-editor-panel-T7HrEBqp.js} +1 -1
- package/dist/ui/assets/{searchable-select-CCNEAmMs.js → searchable-select-Bfwi19-3.js} +1 -1
- package/dist/ui/assets/{separator-DdqwGZjf.js → separator-Cia83j78.js} +1 -1
- package/dist/ui/assets/{shared-CiXoJI0N.js → shared-BRUYjDc4.js} +1 -1
- package/dist/ui/assets/{table-BbSidPe4.js → table-DVwKEwq6.js} +1 -1
- package/dist/ui/assets/{tanstack-DWm6aJ-G.js → tanstack-CrmUhA7Z.js} +2 -2
- package/dist/ui/assets/updates-CfwrNAck.js +1 -0
- package/dist/ui/index.html +4 -4
- package/dist/utils/websearch/trace.d.ts.map +1 -1
- package/dist/utils/websearch/trace.js +7 -0
- package/dist/utils/websearch/trace.js.map +1 -1
- package/dist/web-server/index.d.ts.map +1 -1
- package/dist/web-server/index.js +15 -0
- package/dist/web-server/index.js.map +1 -1
- package/dist/web-server/middleware/request-logging-middleware.d.ts +3 -0
- package/dist/web-server/middleware/request-logging-middleware.d.ts.map +1 -0
- package/dist/web-server/middleware/request-logging-middleware.js +30 -0
- package/dist/web-server/middleware/request-logging-middleware.js.map +1 -0
- package/dist/web-server/routes/index.d.ts.map +1 -1
- package/dist/web-server/routes/index.js +2 -0
- package/dist/web-server/routes/index.js.map +1 -1
- package/dist/web-server/routes/logs-routes.d.ts +3 -0
- package/dist/web-server/routes/logs-routes.d.ts.map +1 -0
- package/dist/web-server/routes/logs-routes.js +75 -0
- package/dist/web-server/routes/logs-routes.js.map +1 -0
- package/dist/web-server/services/logs-dashboard-service.d.ts +7 -0
- package/dist/web-server/services/logs-dashboard-service.d.ts.map +1 -0
- package/dist/web-server/services/logs-dashboard-service.js +33 -0
- package/dist/web-server/services/logs-dashboard-service.js.map +1 -0
- package/dist/web-server/websocket.d.ts.map +1 -1
- package/dist/web-server/websocket.js +23 -14
- package/dist/web-server/websocket.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/icons-HPncf80J.js +0 -1
- package/dist/ui/assets/index-CObGkcxo.js +0 -1
- package/dist/ui/assets/index-D8NlA5zN.js +0 -69
- package/dist/ui/assets/index-DY4gWzEw.css +0 -1
- package/dist/ui/assets/updates-DqccLz_y.js +0 -1
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-l8yS9gLo.js","assets/radix-ui-Zb8sVEtn.js","assets/react-vendor-CNOkPC89.js","assets/masked-input-C-vLCUuQ.js","assets/icons-HPncf80J.js","assets/tanstack-DWm6aJ-G.js","assets/notifications-B2HqRBj7.js","assets/utils-CzKF5WmX.js","assets/form-utils-Bcoyqxpq.js","assets/code-highlight-BRUf_pqB.js","assets/index-DUM_z9jT.js","assets/channels-BFBl4r-j.js","assets/globalenv-section-CKv4BfT4.js","assets/index-B185OZF2.js","assets/index-DESEUD89.js","assets/default-ports-1QQSffYX.js","assets/proxy-status-widget-190bjsgV.js","assets/alert-dialog-D_Yz_iZc.js","assets/antigravity-responsibility-constants-Bvh4Ybz0.js","assets/auth-section-BoDZqbPJ.js","assets/backups-section-D4-FbvV4.js","assets/index-CObGkcxo.js","assets/charts-BBPXh0Ar.js","assets/api-CBTgaJzF.js","assets/confirm-dialog-B273dyaD.js","assets/cliproxy-C2sZh-5V.js","assets/checkbox-DjeKLLRq.js","assets/separator-DdqwGZjf.js","assets/searchable-select-CCNEAmMs.js","assets/cliproxy-ai-providers-DcCbeAbO.js","assets/cliproxy-control-panel-v4kA_2hy.js","assets/copilot-DvgELRFw.js","assets/cursor-8gcvd36W.js","assets/claude-extension-C1FsOq-7.js","assets/codex-Cj_wPgw5.js","assets/table-BbSidPe4.js","assets/raw-json-settings-editor-panel-DcwxTJM2.js","assets/droid-DZDVCJBf.js","assets/accounts-DUWrYt3x.js","assets/health-DmZLL4IN.js","assets/shared-CiXoJI0N.js","assets/updates-DqccLz_y.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as l,S as jl,R as lx,C as cx,a as ux,T as dx,D as fx,P as hx,O as px,b as PC,c as LC,d as RC,e as _C,f as zC,A as IC,g as UC,h as HC,i as BC,k as KC,l as qC,m as GC,n as FC,I as VC,o as mx,p as YC,q as gx,r as yx,s as $C,t as xx,V as WC,L as bx,u as vx,v as QC,w as XC,x as Cx,y as ZC,z as JC,B as Sx,E as eS,F as tS,G as wx,H as nS,J as Nx,K as kx,M as Ax,N as aS,Q as iS,U as oS,W as sS,X as rS,Y as Dx,Z as lS,_ as cS,$ as uS}from"./radix-ui-Zb8sVEtn.js";import{e as $d,f as dS,r as C,u as Tl,O as Td,N as fS,h as Wd,L as bl,R as hS,g as jx,d as Pg,i as pS,c as ue,B as mS,j as gS,k as kt}from"./react-vendor-CNOkPC89.js";import{Q as yS,u as At,a as it,b as tt,c as xS,d as bS}from"./tanstack-DWm6aJ-G.js";import{t as le,T as vS}from"./notifications-B2HqRBj7.js";import{L as kn,X as No,P as CS,C as Ml,H as SS,a as wS,K as Md,G as NS,Z as Tx,b as Mx,F as Ex,U as Ox,c as kS,S as AS,A as zs,d as DS,e as Px,M as Lx,E as Gs,f as Fs,B as jS,R as Is,W as TS,g as MS,h as ES,i as OS,j as Lg,k as Rg,l as Co,m as Qd,n as vl,o as Rx,p as _x,q as PS,r as El,s as Xd,t as zx,u as So,T as Fn,v as Us,w as Vs,x as _g,y as LS,z as Ix,D as Zd,I as RS,J as Ol,N as _S,O as zS,Q as IS,V as Pl,Y as US,_ as HS,$ as Ux,a0 as BS,a1 as KS,a2 as qS,a3 as GS,a4 as Jd,a5 as Hx,a6 as zg,a7 as FS,a8 as VS,a9 as YS,aa as $S,ab as WS,ac as Ig,ad as QS,ae as cl,af as Ug,ag as Hg,ah as XS}from"./icons-HPncf80J.js";import{t as ZS,c as JS,a as Ll,e as Cs,f as ks,b as ew,d as tw,g as nw,h as aw,i as iw,j as ow,k as sw,l as rw,m as lw,n as cw,o as uw,p as dw,q as fw,r as hw,s as pw,u as mw,v as gw,w as yw,x as xw,y as bw,z as vw,A as Cw,B as Sw,C as ww,D as Nw,E as kw,F as Aw,G as Dw,H as jw,I as Tw,J as Mw}from"./utils-CzKF5WmX.js";import{o as Bg,s as Kg,p as Ew,a as Ow,$ as Pw,b as Bx,c as Xa,d as Lw,_ as Rw,u as _w,e as qg}from"./form-utils-Bcoyqxpq.js";import{H as zw,t as Gg}from"./code-highlight-BRUf_pqB.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).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 sd={exports:{}},Ss={},rd={exports:{}},ld={};var Fg;function Iw(){return Fg||(Fg=1,(function(n){function a(I,Z){var ae=I.length;I.push(Z);e:for(;0<ae;){var W=ae-1>>>1,oe=I[W];if(0<c(oe,Z))I[W]=Z,I[ae]=oe,ae=W;else break e}}function o(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var Z=I[0],ae=I.pop();if(ae!==Z){I[0]=ae;e:for(var W=0,oe=I.length,ce=oe>>>1;W<ce;){var he=2*(W+1)-1,Q=I[he],J=he+1,re=I[J];if(0>c(Q,ae))J<oe&&0>c(re,Q)?(I[W]=re,I[J]=ae,W=J):(I[W]=Q,I[he]=ae,W=he);else if(J<oe&&0>c(re,ae))I[W]=re,I[J]=ae,W=J;else break e}}return Z}function c(I,Z){var ae=I.sortIndex-Z.sortIndex;return ae!==0?ae:I.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 f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var m=[],y=[],S=1,x=null,b=3,D=!1,N=!1,E=!1,O=!1,L=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function k(I){for(var Z=o(y);Z!==null;){if(Z.callback===null)r(y);else if(Z.startTime<=I)r(y),Z.sortIndex=Z.expirationTime,a(m,Z);else break;Z=o(y)}}function T(I){if(E=!1,k(I),!N)if(o(m)!==null)N=!0,w||(w=!0,X());else{var Z=o(y);Z!==null&&ve(T,Z.startTime-I)}}var w=!1,R=-1,B=5,z=-1;function G(){return O?!0:!(n.unstable_now()-z<B)}function ne(){if(O=!1,w){var I=n.unstable_now();z=I;var Z=!0;try{e:{N=!1,E&&(E=!1,j(R),R=-1),D=!0;var ae=b;try{t:{for(k(I),x=o(m);x!==null&&!(x.expirationTime>I&&G());){var W=x.callback;if(typeof W=="function"){x.callback=null,b=x.priorityLevel;var oe=W(x.expirationTime<=I);if(I=n.unstable_now(),typeof oe=="function"){x.callback=oe,k(I),Z=!0;break t}x===o(m)&&r(m),k(I)}else r(m);x=o(m)}if(x!==null)Z=!0;else{var ce=o(y);ce!==null&&ve(T,ce.startTime-I),Z=!1}}break e}finally{x=null,b=ae,D=!1}Z=void 0}}finally{Z?X():w=!1}}}var X;if(typeof A=="function")X=function(){A(ne)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,te=ye.port2;ye.port1.onmessage=ne,X=function(){te.postMessage(null)}}else X=function(){L(ne,0)};function ve(I,Z){R=L(function(){I(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(I){I.callback=null},n.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<I?Math.floor(1e3/I):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(I){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var ae=b;b=Z;try{return I()}finally{b=ae}},n.unstable_requestPaint=function(){O=!0},n.unstable_runWithPriority=function(I,Z){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var ae=b;b=I;try{return Z()}finally{b=ae}},n.unstable_scheduleCallback=function(I,Z,ae){var W=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?W+ae:W):ae=W,I){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=ae+oe,I={id:S++,callback:Z,priorityLevel:I,startTime:ae,expirationTime:oe,sortIndex:-1},ae>W?(I.sortIndex=ae,a(y,I),o(m)===null&&I===o(y)&&(E?(j(R),R=-1):E=!0,ve(T,ae-W))):(I.sortIndex=oe,a(m,I),N||D||(N=!0,w||(w=!0,X()))),I},n.unstable_shouldYield=G,n.unstable_wrapCallback=function(I){var Z=b;return function(){var ae=b;b=Z;try{return I.apply(this,arguments)}finally{b=ae}}}})(ld)),ld}var Vg;function Uw(){return Vg||(Vg=1,rd.exports=Iw()),rd.exports}var Yg;function Hw(){if(Yg)return Ss;Yg=1;var n=Uw(),a=$d(),o=dS();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 f(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 y(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 h=u.alternate;if(h===null){if(s=u.return,s!==null){i=s;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===i)return m(u),e;if(h===s)return m(u),t;h=h.sibling}throw Error(r(188))}if(i.return!==s.return)i=u,s=h;else{for(var g=!1,v=u.child;v;){if(v===i){g=!0,i=u,s=h;break}if(v===s){g=!0,s=u,i=h;break}v=v.sibling}if(!g){for(v=h.child;v;){if(v===i){g=!0,i=h,s=u;break}if(v===s){g=!0,s=h,i=u;break}v=v.sibling}if(!g)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 S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,b=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),A=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case L:return"Profiler";case O:return"StrictMode";case T:return"Suspense";case w:return"SuspenseList";case z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case A:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R: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 ve=Array.isArray,I=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,ae={pending:!1,data:null,method:null,action:null},W=[],oe=-1;function ce(e){return{current:e}}function he(e){0>oe||(e.current=W[oe],W[oe]=null,oe--)}function Q(e,t){oe++,W[oe]=e.current,e.current=t}var J=ce(null),re=ce(null),ie=ce(null),se=ce(null);function ge(e,t){switch(Q(ie,t),Q(re,e),Q(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ng(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ng(t),e=ag(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}he(J),Q(J,e)}function De(){he(J),he(re),he(ie)}function He(e){e.memoizedState!==null&&Q(se,e);var t=J.current,i=ag(t,e.type);t!==i&&(Q(re,e),Q(J,i))}function lt(e){re.current===e&&(he(J),he(re)),se.current===e&&(he(se),ys._currentValue=ae)}var gt,qe;function ct(e){if(gt===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);gt=t&&t[1]||"",qe=-1<i.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+gt+e+qe}var Bt=!1;function Zt(e,t){if(!e||Bt)return"";Bt=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(F){var q=F}Reflect.construct(e,[],$)}else{try{$.call()}catch(F){q=F}e.call($.prototype)}}else{try{throw Error()}catch(F){q=F}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(F){if(F&&q&&typeof F.stack=="string")return[F.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 h=s.DetermineComponentFrameRoot(),g=h[0],v=h[1];if(g&&v){var M=g.split(`
|
|
5
|
-
`),H=v.split(`
|
|
6
|
-
`);for(u=s=0;s<M.length&&!M[s].includes("DetermineComponentFrameRoot");)s++;for(;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;if(s===M.length||u===H.length)for(s=M.length-1,u=H.length-1;1<=s&&0<=u&&M[s]!==H[u];)u--;for(;1<=s&&0<=u;s--,u--)if(M[s]!==H[u]){if(s!==1||u!==1)do if(s--,u--,0>u||M[s]!==H[u]){var V=`
|
|
7
|
-
`+M[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{Bt=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ct(i):""}function Yn(e,t){switch(e.tag){case 26:case 27:case 5:return ct(e.type);case 16:return ct("Lazy");case 13:return e.child!==t&&t!==null?ct("Suspense Fallback"):ct("Suspense");case 19:return ct("SuspenseList");case 0:case 15:return Zt(e.type,!1);case 11:return Zt(e.type.render,!1);case 1:return Zt(e.type,!0);case 31:return ct("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,Pn=n.unstable_scheduleCallback,en=n.unstable_cancelCallback,Aa=n.unstable_shouldYield,$n=n.unstable_requestPaint,yt=n.unstable_now,tn=n.unstable_getCurrentPriorityLevel,Wn=n.unstable_ImmediatePriority,ti=n.unstable_UserBlockingPriority,Ln=n.unstable_NormalPriority,Rn=n.unstable_LowPriority,Ti=n.unstable_IdlePriority,Ao=n.log,Do=n.unstable_setDisableYieldValue,Qn=null,ee=null;function Ee(e){if(typeof Ao=="function"&&Do(e),ee&&typeof ee.setStrictMode=="function")try{ee.setStrictMode(Qn,e)}catch{}}var Ce=Math.clz32?Math.clz32:me,Oe=Math.log,ut=Math.LN2;function me(e){return e>>>=0,e===0?32:31-(Oe(e)/ut|0)|0}var Ae=256,Se=262144,Pe=4194304;function ot(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ne(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var u=0,h=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var v=s&134217727;return v!==0?(s=v&~h,s!==0?u=ot(s):(g&=v,g!==0?u=ot(g):i||(i=v&~e,i!==0&&(u=ot(i))))):(v=s&~h,v!==0?u=ot(v):g!==0?u=ot(g):i||(i=s&~e,i!==0&&(u=ot(i)))),u===0?0:t!==0&&t!==u&&(t&h)===0&&(h=u&-u,i=t&-t,h>=i||h===32&&(i&4194048)!==0)?t:u}function It(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 Dt(){var e=Pe;return Pe<<=1,(Pe&62914560)===0&&(Pe=4194304),e}function nn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function An(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jo(e,t,i,s,u,h){var g=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var v=e.entanglements,M=e.expirationTimes,H=e.hiddenUpdates;for(i=g&~i;0<i;){var V=31-Ce(i),$=1<<V;v[V]=0,M[V]=-1;var q=H[V];if(q!==null)for(H[V]=null,V=0;V<q.length;V++){var F=q[V];F!==null&&(F.lane&=-536870913)}i&=~$}s!==0&&ni(e,s,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(g&~t))}function ni(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Ce(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function To(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ce(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 Mi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mo(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Ag(e.type))}function Eo(e,t){var i=Z.p;try{return Z.p=e,t()}finally{Z.p=i}}var Da=Math.random().toString(36).slice(2),Et="__reactFiber$"+Da,Kt="__reactProps$"+Da,Ei="__reactContainer$"+Da,Xl="__reactEvents$"+Da,Sv="__reactListeners$"+Da,wv="__reactHandles$"+Da,qf="__reactResources$"+Da,Oo="__reactMarker$"+Da;function Zl(e){delete e[Et],delete e[Kt],delete e[Xl],delete e[Sv],delete e[wv]}function Oi(e){var t=e[Et];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ei]||i[Et]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=ug(e);e!==null;){if(i=e[Et])return i;e=ug(e)}return t}e=i,i=e.parentNode}return null}function Pi(e){if(e=e[Et]||e[Ei]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Po(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Li(e){var t=e[qf];return t||(t=e[qf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[Oo]=!0}var Gf=new Set,Ff={};function ai(e,t){Ri(e,t),Ri(e+"Capture",t)}function Ri(e,t){for(Ff[e]=t,e=0;e<t.length;e++)Gf.add(t[e])}var Nv=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]*$"),Vf={},Yf={};function kv(e){return Jt.call(Yf,e)?!0:Jt.call(Vf,e)?!1:Nv.test(e)?Yf[e]=!0:(Vf[e]=!0,!1)}function Xs(e,t,i){if(kv(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 Zs(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 $f(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Av(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,h=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(g){i=""+g,h.call(this,g)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jl(e){if(!e._valueTracker){var t=$f(e)?"checked":"value";e._valueTracker=Av(e,t,""+e[t])}}function Wf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=$f(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Js(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 Dv=/[\n"\\]/g;function gn(e){return e.replace(Dv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ec(e,t,i,s,u,h,g,v){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?tc(e,g,mn(t)):i!=null?tc(e,g,mn(i)):s!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+mn(v):e.removeAttribute("name")}function Qf(e,t,i,s,u,h,g,v){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||t!=null)){Jl(e);return}i=i!=null?""+mn(i):"",t=t!=null?""+mn(t):i,v||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=v?e.checked:!!s,e.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Jl(e)}function tc(e,t,i){t==="number"&&Js(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function _i(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 Xf(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 Zf(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(r(92));if(ve(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),Jl(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 jv=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 Jf(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||jv.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function eh(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&&Jf(e,u,s)}else for(var h in t)t.hasOwnProperty(h)&&Jf(e,h,t[h])}function nc(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 Tv=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"]]),Mv=/^[\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 er(e){return Mv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var ac=null;function ic(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ii=null,Ui=null;function th(e){var t=Pi(e);if(t&&(e=t.stateNode)){var i=e[Kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ec(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));ec(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&&Wf(s)}break e;case"textarea":Xf(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&_i(e,!!i.multiple,t,!1)}}}var oc=!1;function nh(e,t,i){if(oc)return e(t,i);oc=!0;try{var s=e(t);return s}finally{if(oc=!1,(Ii!==null||Ui!==null)&&(Br(),Ii&&(t=Ii,e=Ui,Ui=Ii=null,th(t),e)))for(t=0;t<e.length;t++)th(e[t])}}function Lo(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"),sc=!1;if(ta)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){sc=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{sc=!1}var ja=null,rc=null,tr=null;function ah(){if(tr)return tr;var e,t=rc,i=t.length,s,u="value"in ja?ja.value:ja.textContent,h=u.length;for(e=0;e<i&&t[e]===u[e];e++);var g=i-e;for(s=1;s<=g&&t[i-s]===u[h-s];s++);return tr=u.slice(e,1<s?1-s:void 0)}function nr(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 ar(){return!0}function ih(){return!1}function qt(e){function t(i,s,u,h,g){this._reactName=i,this._targetInst=u,this.type=s,this.nativeEvent=h,this.target=g,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(i=e[v],this[v]=i?i(h):h[v]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ar:ih,this.isPropagationStopped=ih,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ar)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ar)},persist:function(){},isPersistent:ar}),t}var ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ir=qt(ii),_o=x({},ii,{view:0,detail:0}),Ev=qt(_o),lc,cc,zo,or=x({},_o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dc,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"?(lc=e.screenX-zo.screenX,cc=e.screenY-zo.screenY):cc=lc=0,zo=e),lc)},movementY:function(e){return"movementY"in e?e.movementY:cc}}),oh=qt(or),Ov=x({},or,{dataTransfer:0}),Pv=qt(Ov),Lv=x({},_o,{relatedTarget:0}),uc=qt(Lv),Rv=x({},ii,{animationName:0,elapsedTime:0,pseudoElement:0}),_v=qt(Rv),zv=x({},ii,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Iv=qt(zv),Uv=x({},ii,{data:0}),sh=qt(Uv),Hv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bv={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"},Kv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kv[e])?!!t[e]:!1}function dc(){return qv}var Gv=x({},_o,{key:function(e){if(e.key){var t=Hv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dc,charCode:function(e){return e.type==="keypress"?nr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fv=qt(Gv),Vv=x({},or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rh=qt(Vv),Yv=x({},_o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dc}),$v=qt(Yv),Wv=x({},ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qv=qt(Wv),Xv=x({},or,{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}),Zv=qt(Xv),Jv=x({},ii,{newState:0,oldState:0}),e0=qt(Jv),t0=[9,13,27,32],fc=ta&&"CompositionEvent"in window,Io=null;ta&&"documentMode"in document&&(Io=document.documentMode);var n0=ta&&"TextEvent"in window&&!Io,lh=ta&&(!fc||Io&&8<Io&&11>=Io),ch=" ",uh=!1;function dh(e,t){switch(e){case"keyup":return t0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hi=!1;function a0(e,t){switch(e){case"compositionend":return fh(t);case"keypress":return t.which!==32?null:(uh=!0,ch);case"textInput":return e=t.data,e===ch&&uh?null:e;default:return null}}function i0(e,t){if(Hi)return e==="compositionend"||!fc&&dh(e,t)?(e=ah(),tr=rc=ja=null,Hi=!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 lh&&t.locale!=="ko"?null:t.data;default:return null}}var o0={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 hh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!o0[e.type]:t==="textarea"}function ph(e,t,i,s){Ii?Ui?Ui.push(s):Ui=[s]:Ii=s,t=$r(t,"onChange"),0<t.length&&(i=new ir("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Uo=null,Ho=null;function s0(e){Qm(e,0)}function sr(e){var t=Po(e);if(Wf(t))return e}function mh(e,t){if(e==="change")return t}var gh=!1;if(ta){var hc;if(ta){var pc="oninput"in document;if(!pc){var yh=document.createElement("div");yh.setAttribute("oninput","return;"),pc=typeof yh.oninput=="function"}hc=pc}else hc=!1;gh=hc&&(!document.documentMode||9<document.documentMode)}function xh(){Uo&&(Uo.detachEvent("onpropertychange",bh),Ho=Uo=null)}function bh(e){if(e.propertyName==="value"&&sr(Ho)){var t=[];ph(t,Ho,e,ic(e)),nh(s0,t)}}function r0(e,t,i){e==="focusin"?(xh(),Uo=t,Ho=i,Uo.attachEvent("onpropertychange",bh)):e==="focusout"&&xh()}function l0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sr(Ho)}function c0(e,t){if(e==="click")return sr(t)}function u0(e,t){if(e==="input"||e==="change")return sr(t)}function d0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:d0;function Bo(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 vh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ch(e,t){var i=vh(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=vh(i)}}function Sh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Js(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=Js(e.document)}return t}function mc(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 f0=ta&&"documentMode"in document&&11>=document.documentMode,Bi=null,gc=null,Ko=null,yc=!1;function Nh(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;yc||Bi==null||Bi!==Js(s)||(s=Bi,"selectionStart"in s&&mc(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&&Bo(Ko,s)||(Ko=s,s=$r(gc,"onSelect"),0<s.length&&(t=new ir("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Bi)))}function oi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ki={animationend:oi("Animation","AnimationEnd"),animationiteration:oi("Animation","AnimationIteration"),animationstart:oi("Animation","AnimationStart"),transitionrun:oi("Transition","TransitionRun"),transitionstart:oi("Transition","TransitionStart"),transitioncancel:oi("Transition","TransitionCancel"),transitionend:oi("Transition","TransitionEnd")},xc={},kh={};ta&&(kh=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(xc[e])return xc[e];if(!Ki[e])return e;var t=Ki[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in kh)return xc[e]=t[i];return e}var Ah=si("animationend"),Dh=si("animationiteration"),jh=si("animationstart"),h0=si("transitionrun"),p0=si("transitionstart"),m0=si("transitioncancel"),Th=si("transitionend"),Mh=new Map,bc="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(" ");bc.push("scrollEnd");function Dn(e,t){Mh.set(e,t),ai(t,[e])}var rr=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=[],qi=0,vc=0;function lr(){for(var e=qi,t=vc=qi=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 h=yn[t];if(yn[t++]=null,s!==null&&u!==null){var g=s.pending;g===null?u.next=u:(u.next=g.next,g.next=u),s.pending=u}h!==0&&Eh(i,u,h)}}function cr(e,t,i,s){yn[qi++]=e,yn[qi++]=t,yn[qi++]=i,yn[qi++]=s,vc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Cc(e,t,i,s){return cr(e,t,i,s),ur(e)}function ri(e,t){return cr(e,null,null,t),ur(e)}function Eh(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var u=!1,h=e.return;h!==null;)h.childLanes|=i,s=h.alternate,s!==null&&(s.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(u=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,u&&t!==null&&(u=31-Ce(i),e=h.hiddenUpdates,s=e[u],s===null?e[u]=[t]:s.push(t),t.lane=i|536870912),h):null}function ur(e){if(50<us)throw us=0,Mu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Gi={};function g0(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 g0(e,t,i,s)}function Sc(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 Oh(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 dr(e,t,i,s,u,h){var g=0;if(s=e,typeof e=="function")Sc(e)&&(g=1);else if(typeof e=="string")g=CC(e,i,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case z:return e=on(31,i,t,u),e.elementType=z,e.lanes=h,e;case E:return li(i.children,u,h,t);case O:g=8,u|=24;break;case L:return e=on(12,i,t,u|2),e.elementType=L,e.lanes=h,e;case T:return e=on(13,i,t,u),e.elementType=T,e.lanes=h,e;case w:return e=on(19,i,t,u),e.elementType=w,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:g=10;break e;case j:g=9;break e;case k:g=11;break e;case R:g=14;break e;case B:g=16,s=null;break e}g=29,i=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=on(g,i,t,u),t.elementType=e,t.type=s,t.lanes=h,t}function li(e,t,i,s){return e=on(7,e,s,t),e.lanes=i,e}function wc(e,t,i){return e=on(6,e,null,t),e.lanes=i,e}function Ph(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 Lh=new WeakMap;function xn(e,t){if(typeof e=="object"&&e!==null){var i=Lh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:je(t)},Lh.set(e,t),t)}return{value:e,source:t,stack:je(t)}}var Fi=[],Vi=0,fr=null,qo=0,bn=[],vn=0,Ta=null,_n=1,zn="";function aa(e,t){Fi[Vi++]=qo,Fi[Vi++]=fr,fr=e,qo=t}function Rh(e,t,i){bn[vn++]=_n,bn[vn++]=zn,bn[vn++]=Ta,Ta=e;var s=_n;e=zn;var u=32-Ce(s)-1;s&=~(1<<u),i+=1;var h=32-Ce(t)+u;if(30<h){var g=u-u%5;h=(s&(1<<g)-1).toString(32),s>>=g,u-=g,_n=1<<32-Ce(t)+u|i<<u|s,zn=h+e}else _n=1<<h|i<<u|s,zn=e}function kc(e){e.return!==null&&(aa(e,1),Rh(e,1,0))}function Ac(e){for(;e===fr;)fr=Fi[--Vi],Fi[Vi]=null,qo=Fi[--Vi],Fi[Vi]=null;for(;e===Ta;)Ta=bn[--vn],bn[vn]=null,zn=bn[--vn],bn[vn]=null,_n=bn[--vn],bn[vn]=null}function _h(e,t){bn[vn++]=_n,bn[vn++]=zn,bn[vn++]=Ta,_n=t.id,zn=t.overflow,Ta=e}var Ot=null,st=null,Be=!1,Ma=null,Cn=!1,Dc=Error(r(519));function Ea(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Go(xn(t,e)),Dc}function zh(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[Et]=e,t[Kt]=s,i){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(i=0;i<fs.length;i++)_e(fs[i],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),Qf(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),Zf(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||eg(t.textContent,i)?(s.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),s.onScroll!=null&&_e("scroll",t),s.onScrollEnd!=null&&_e("scrollend",t),s.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||Ea(e,!0)}function Ih(e){for(Ot=e.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Ot=Ot.return}}function Yi(e){if(e!==Ot)return!1;if(!Be)return Ih(e),Be=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Fu(e.type,e.memoizedProps)),i=!i),i&&st&&Ea(e),Ih(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));st=cg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));st=cg(e)}else t===27?(t=st,Fa(e.type)?(e=Qu,Qu=null,st=e):st=t):st=Ot?wn(e.stateNode.nextSibling):null;return!0}function ci(){st=Ot=null,Be=!1}function jc(){var e=Ma;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Ma=null),e}function Go(e){Ma===null?Ma=[e]:Ma.push(e)}var Tc=ce(null),ui=null,ia=null;function Oa(e,t,i){Q(Tc,t._currentValue),t._currentValue=i}function oa(e){e._currentValue=Tc.current,he(Tc)}function Mc(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 Ec(e,t,i,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var h=u.dependencies;if(h!==null){var g=u.child;h=h.firstContext;e:for(;h!==null;){var v=h;h=u;for(var M=0;M<t.length;M++)if(v.context===t[M]){h.lanes|=i,v=h.alternate,v!==null&&(v.lanes|=i),Mc(h.return,i,e),s||(g=null);break e}h=v.next}}else if(u.tag===18){if(g=u.return,g===null)throw Error(r(341));g.lanes|=i,h=g.alternate,h!==null&&(h.lanes|=i),Mc(g,i,e),g=null}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===e){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}}function $i(e,t,i,s){e=null;for(var u=t,h=!1;u!==null;){if(!h){if((u.flags&524288)!==0)h=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var g=u.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var v=u.type;an(u.pendingProps.value,g.value)||(e!==null?e.push(v):e=[v])}}else if(u===se.current){if(g=u.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ys):e=[ys])}u=u.return}e!==null&&Ec(t,e,i,s),t.flags|=262144}function hr(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function di(e){ui=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pt(e){return Uh(ui,e)}function pr(e,t){return ui===null&&di(e),Uh(e,t)}function Uh(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 y0=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()})}},x0=n.unstable_scheduleCallback,b0=n.unstable_NormalPriority,vt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oc(){return{controller:new y0,data:new Map,refCount:0}}function Fo(e){e.refCount--,e.refCount===0&&x0(b0,function(){e.controller.abort()})}var Vo=null,Pc=0,Wi=0,Qi=null;function v0(e,t){if(Vo===null){var i=Vo=[];Pc=0,Wi=_u(),Qi={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Pc++,t.then(Hh,Hh),t}function Hh(){if(--Pc===0&&Vo!==null){Qi!==null&&(Qi.status="fulfilled");var e=Vo;Vo=null,Wi=0,Qi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function C0(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 Bh=I.S;I.S=function(e,t){Nm=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&v0(e,t),Bh!==null&&Bh(e,t)};var fi=ce(null);function Lc(){var e=fi.current;return e!==null?e:et.pooledCache}function mr(e,t){t===null?Q(fi,fi.current):Q(fi,t.pool)}function Kh(){var e=Lc();return e===null?null:{parent:vt._currentValue,pool:e}}var Xi=Error(r(460)),Rc=Error(r(474)),gr=Error(r(542)),yr={then:function(){}};function qh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Gh(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,Vh(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=et,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,Vh(e),e}throw pi=t,Xi}}function hi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(pi=i,Xi):i}}var pi=null;function Fh(){if(pi===null)throw Error(r(459));var e=pi;return pi=null,e}function Vh(e){if(e===Xi||e===gr)throw Error(r(483))}var Zi=null,Yo=0;function xr(e){var t=Yo;return Yo+=1,Zi===null&&(Zi=[]),Gh(Zi,e,t)}function $o(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function br(e,t){throw t.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Yh(e){function t(_,P){if(e){var U=_.deletions;U===null?(_.deletions=[P],_.flags|=16):U.push(P)}}function i(_,P){if(!e)return null;for(;P!==null;)t(_,P),P=P.sibling;return null}function s(_){for(var P=new Map;_!==null;)_.key!==null?P.set(_.key,_):P.set(_.index,_),_=_.sibling;return P}function u(_,P){return _=na(_,P),_.index=0,_.sibling=null,_}function h(_,P,U){return _.index=U,e?(U=_.alternate,U!==null?(U=U.index,U<P?(_.flags|=67108866,P):U):(_.flags|=67108866,P)):(_.flags|=1048576,P)}function g(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function v(_,P,U,Y){return P===null||P.tag!==6?(P=wc(U,_.mode,Y),P.return=_,P):(P=u(P,U),P.return=_,P)}function M(_,P,U,Y){var be=U.type;return be===E?V(_,P,U.props.children,Y,U.key):P!==null&&(P.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===B&&hi(be)===P.type)?(P=u(P,U.props),$o(P,U),P.return=_,P):(P=dr(U.type,U.key,U.props,null,_.mode,Y),$o(P,U),P.return=_,P)}function H(_,P,U,Y){return P===null||P.tag!==4||P.stateNode.containerInfo!==U.containerInfo||P.stateNode.implementation!==U.implementation?(P=Nc(U,_.mode,Y),P.return=_,P):(P=u(P,U.children||[]),P.return=_,P)}function V(_,P,U,Y,be){return P===null||P.tag!==7?(P=li(U,_.mode,Y,be),P.return=_,P):(P=u(P,U),P.return=_,P)}function $(_,P,U){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=wc(""+P,_.mode,U),P.return=_,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case D:return U=dr(P.type,P.key,P.props,null,_.mode,U),$o(U,P),U.return=_,U;case N:return P=Nc(P,_.mode,U),P.return=_,P;case B:return P=hi(P),$(_,P,U)}if(ve(P)||X(P))return P=li(P,_.mode,U,null),P.return=_,P;if(typeof P.then=="function")return $(_,xr(P),U);if(P.$$typeof===A)return $(_,pr(_,P),U);br(_,P)}return null}function q(_,P,U,Y){var be=P!==null?P.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return be!==null?null:v(_,P,""+U,Y);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case D:return U.key===be?M(_,P,U,Y):null;case N:return U.key===be?H(_,P,U,Y):null;case B:return U=hi(U),q(_,P,U,Y)}if(ve(U)||X(U))return be!==null?null:V(_,P,U,Y,null);if(typeof U.then=="function")return q(_,P,xr(U),Y);if(U.$$typeof===A)return q(_,P,pr(_,U),Y);br(_,U)}return null}function F(_,P,U,Y,be){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return _=_.get(U)||null,v(P,_,""+Y,be);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case D:return _=_.get(Y.key===null?U:Y.key)||null,M(P,_,Y,be);case N:return _=_.get(Y.key===null?U:Y.key)||null,H(P,_,Y,be);case B:return Y=hi(Y),F(_,P,U,Y,be)}if(ve(Y)||X(Y))return _=_.get(U)||null,V(P,_,Y,be,null);if(typeof Y.then=="function")return F(_,P,U,xr(Y),be);if(Y.$$typeof===A)return F(_,P,U,pr(P,Y),be);br(P,Y)}return null}function fe(_,P,U,Y){for(var be=null,Fe=null,pe=P,Me=P=0,Ie=null;pe!==null&&Me<U.length;Me++){pe.index>Me?(Ie=pe,pe=null):Ie=pe.sibling;var Ve=q(_,pe,U[Me],Y);if(Ve===null){pe===null&&(pe=Ie);break}e&&pe&&Ve.alternate===null&&t(_,pe),P=h(Ve,P,Me),Fe===null?be=Ve:Fe.sibling=Ve,Fe=Ve,pe=Ie}if(Me===U.length)return i(_,pe),Be&&aa(_,Me),be;if(pe===null){for(;Me<U.length;Me++)pe=$(_,U[Me],Y),pe!==null&&(P=h(pe,P,Me),Fe===null?be=pe:Fe.sibling=pe,Fe=pe);return Be&&aa(_,Me),be}for(pe=s(pe);Me<U.length;Me++)Ie=F(pe,_,Me,U[Me],Y),Ie!==null&&(e&&Ie.alternate!==null&&pe.delete(Ie.key===null?Me:Ie.key),P=h(Ie,P,Me),Fe===null?be=Ie:Fe.sibling=Ie,Fe=Ie);return e&&pe.forEach(function(Qa){return t(_,Qa)}),Be&&aa(_,Me),be}function we(_,P,U,Y){if(U==null)throw Error(r(151));for(var be=null,Fe=null,pe=P,Me=P=0,Ie=null,Ve=U.next();pe!==null&&!Ve.done;Me++,Ve=U.next()){pe.index>Me?(Ie=pe,pe=null):Ie=pe.sibling;var Qa=q(_,pe,Ve.value,Y);if(Qa===null){pe===null&&(pe=Ie);break}e&&pe&&Qa.alternate===null&&t(_,pe),P=h(Qa,P,Me),Fe===null?be=Qa:Fe.sibling=Qa,Fe=Qa,pe=Ie}if(Ve.done)return i(_,pe),Be&&aa(_,Me),be;if(pe===null){for(;!Ve.done;Me++,Ve=U.next())Ve=$(_,Ve.value,Y),Ve!==null&&(P=h(Ve,P,Me),Fe===null?be=Ve:Fe.sibling=Ve,Fe=Ve);return Be&&aa(_,Me),be}for(pe=s(pe);!Ve.done;Me++,Ve=U.next())Ve=F(pe,_,Me,Ve.value,Y),Ve!==null&&(e&&Ve.alternate!==null&&pe.delete(Ve.key===null?Me:Ve.key),P=h(Ve,P,Me),Fe===null?be=Ve:Fe.sibling=Ve,Fe=Ve);return e&&pe.forEach(function(OC){return t(_,OC)}),Be&&aa(_,Me),be}function Je(_,P,U,Y){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case D:e:{for(var be=U.key;P!==null;){if(P.key===be){if(be=U.type,be===E){if(P.tag===7){i(_,P.sibling),Y=u(P,U.props.children),Y.return=_,_=Y;break e}}else if(P.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===B&&hi(be)===P.type){i(_,P.sibling),Y=u(P,U.props),$o(Y,U),Y.return=_,_=Y;break e}i(_,P);break}else t(_,P);P=P.sibling}U.type===E?(Y=li(U.props.children,_.mode,Y,U.key),Y.return=_,_=Y):(Y=dr(U.type,U.key,U.props,null,_.mode,Y),$o(Y,U),Y.return=_,_=Y)}return g(_);case N:e:{for(be=U.key;P!==null;){if(P.key===be)if(P.tag===4&&P.stateNode.containerInfo===U.containerInfo&&P.stateNode.implementation===U.implementation){i(_,P.sibling),Y=u(P,U.children||[]),Y.return=_,_=Y;break e}else{i(_,P);break}else t(_,P);P=P.sibling}Y=Nc(U,_.mode,Y),Y.return=_,_=Y}return g(_);case B:return U=hi(U),Je(_,P,U,Y)}if(ve(U))return fe(_,P,U,Y);if(X(U)){if(be=X(U),typeof be!="function")throw Error(r(150));return U=be.call(U),we(_,P,U,Y)}if(typeof U.then=="function")return Je(_,P,xr(U),Y);if(U.$$typeof===A)return Je(_,P,pr(_,U),Y);br(_,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,P!==null&&P.tag===6?(i(_,P.sibling),Y=u(P,U),Y.return=_,_=Y):(i(_,P),Y=wc(U,_.mode,Y),Y.return=_,_=Y),g(_)):i(_,P)}return function(_,P,U,Y){try{Yo=0;var be=Je(_,P,U,Y);return Zi=null,be}catch(pe){if(pe===Xi||pe===gr)throw pe;var Fe=on(29,pe,null,_.mode);return Fe.lanes=Y,Fe.return=_,Fe}finally{}}}var mi=Yh(!0),$h=Yh(!1),Pa=!1;function _c(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 La(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,($e&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=ur(e),Eh(e,null,i),t}return cr(e,s,t,i),ur(e)}function Wo(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,To(e,i)}}function Ic(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var u=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var g={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?u=h=g:h=h.next=g,i=i.next}while(i!==null);h===null?u=h=t:h=h.next=t}else u=h=t;i={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:h,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 Uc=!1;function Qo(){if(Uc){var e=Qi;if(e!==null)throw e}}function Xo(e,t,i,s){Uc=!1;var u=e.updateQueue;Pa=!1;var h=u.firstBaseUpdate,g=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var M=v,H=M.next;M.next=null,g===null?h=H:g.next=H,g=M;var V=e.alternate;V!==null&&(V=V.updateQueue,v=V.lastBaseUpdate,v!==g&&(v===null?V.firstBaseUpdate=H:v.next=H,V.lastBaseUpdate=M))}if(h!==null){var $=u.baseState;g=0,V=H=M=null,v=h;do{var q=v.lane&-536870913,F=q!==v.lane;if(F?(ze&q)===q:(s&q)===q){q!==0&&q===Wi&&(Uc=!0),V!==null&&(V=V.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var fe=e,we=v;q=t;var Je=i;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){$=fe.call(Je,$,q);break e}$=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,q=typeof fe=="function"?fe.call(Je,$,q):fe,q==null)break e;$=x({},$,q);break e;case 2:Pa=!0}}q=v.callback,q!==null&&(e.flags|=64,F&&(e.flags|=8192),F=u.callbacks,F===null?u.callbacks=[q]:F.push(q))}else F={lane:q,tag:v.tag,payload:v.payload,callback:v.callback,next:null},V===null?(H=V=F,M=$):V=V.next=F,g|=q;if(v=v.next,v===null){if(v=u.shared.pending,v===null)break;F=v,v=F.next,F.next=null,u.lastBaseUpdate=F,u.shared.pending=null}}while(!0);V===null&&(M=$),u.baseState=M,u.firstBaseUpdate=H,u.lastBaseUpdate=V,h===null&&(u.shared.lanes=0),Ha|=g,e.lanes=g,e.memoizedState=$}}function Wh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Qh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Wh(i[e],t)}var Ji=ce(null),vr=ce(0);function Xh(e,t){e=pa,Q(vr,e),Q(Ji,t),pa=e|t.baseLanes}function Hc(){Q(vr,pa),Q(Ji,Ji.current)}function Bc(){pa=vr.current,he(Ji),he(vr)}var sn=ce(null),Sn=null;function _a(e){var t=e.alternate;Q(xt,xt.current&1),Q(sn,e),Sn===null&&(t===null||Ji.current!==null||t.memoizedState!==null)&&(Sn=e)}function Kc(e){Q(xt,xt.current),Q(sn,e),Sn===null&&(Sn=e)}function Zh(e){e.tag===22?(Q(xt,xt.current),Q(sn,e),Sn===null&&(Sn=e)):za()}function za(){Q(xt,xt.current),Q(sn,sn.current)}function rn(e){he(sn),Sn===e&&(Sn=null),he(xt)}var xt=ce(0);function Cr(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)||Wu(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 sa=0,Te=null,Xe=null,Ct=null,Sr=!1,eo=!1,gi=!1,wr=0,Zo=0,to=null,S0=0;function ht(){throw Error(r(321))}function qc(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 Gc(e,t,i,s,u,h){return sa=h,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Rp:ou,gi=!1,h=i(s,u),gi=!1,eo&&(h=ep(t,i,s,u)),Jh(e),h}function Jh(e){I.H=ts;var t=Xe!==null&&Xe.next!==null;if(sa=0,Ct=Xe=Te=null,Sr=!1,Zo=0,to=null,t)throw Error(r(300));e===null||St||(e=e.dependencies,e!==null&&hr(e)&&(St=!0))}function ep(e,t,i,s){Te=e;var u=0;do{if(eo&&(to=null),Zo=0,eo=!1,25<=u)throw Error(r(301));if(u+=1,Ct=Xe=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}I.H=_p,h=t(i,s)}while(eo);return h}function w0(){var e=I.H,t=e.useState()[0];return t=typeof t.then=="function"?Jo(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Te.flags|=1024),t}function Fc(){var e=wr!==0;return wr=0,e}function Vc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Yc(e){if(Sr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Sr=!1}sa=0,Ct=Xe=Te=null,eo=!1,Zo=wr=0,to=null}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Te.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function bt(){if(Xe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=Ct===null?Te.memoizedState:Ct.next;if(t!==null)Ct=t,Xe=e;else{if(e===null)throw Te.alternate===null?Error(r(467)):Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},Ct===null?Te.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Nr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Jo(e){var t=Zo;return Zo+=1,to===null&&(to=[]),e=Gh(to,e,t),t=Te,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Rp:ou),e}function kr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Jo(e);if(e.$$typeof===A)return Pt(e)}throw Error(r(438,String(e)))}function $c(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.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=Nr(),Te.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]=G;return t.index++,i}function ra(e,t){return typeof t=="function"?t(e):t}function Ar(e){var t=bt();return Wc(t,Xe,e)}function Wc(e,t,i){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=i;var u=e.baseQueue,h=s.pending;if(h!==null){if(u!==null){var g=u.next;u.next=h.next,h.next=g}t.baseQueue=u=h,s.pending=null}if(h=e.baseState,u===null)e.memoizedState=h;else{t=u.next;var v=g=null,M=null,H=t,V=!1;do{var $=H.lane&-536870913;if($!==H.lane?(ze&$)===$:(sa&$)===$){var q=H.revertLane;if(q===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),$===Wi&&(V=!0);else if((sa&q)===q){H=H.next,q===Wi&&(V=!0);continue}else $={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},M===null?(v=M=$,g=h):M=M.next=$,Te.lanes|=q,Ha|=q;$=H.action,gi&&i(h,$),h=H.hasEagerState?H.eagerState:i(h,$)}else q={lane:$,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},M===null?(v=M=q,g=h):M=M.next=q,Te.lanes|=$,Ha|=$;H=H.next}while(H!==null&&H!==t);if(M===null?g=h:M.next=v,!an(h,e.memoizedState)&&(St=!0,V&&(i=Qi,i!==null)))throw i;e.memoizedState=h,e.baseState=g,e.baseQueue=M,s.lastRenderedState=h}return u===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Qc(e){var t=bt(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var s=i.dispatch,u=i.pending,h=t.memoizedState;if(u!==null){i.pending=null;var g=u=u.next;do h=e(h,g.action),g=g.next;while(g!==u);an(h,t.memoizedState)||(St=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),i.lastRenderedState=h}return[h,s]}function tp(e,t,i){var s=Te,u=bt(),h=Be;if(h){if(i===void 0)throw Error(r(407));i=i()}else i=t();var g=!an((Xe||u).memoizedState,i);if(g&&(u.memoizedState=i,St=!0),u=u.queue,Jc(ip.bind(null,s,u,e),[e]),u.getSnapshot!==t||g||Ct!==null&&Ct.memoizedState.tag&1){if(s.flags|=2048,no(9,{destroy:void 0},ap.bind(null,s,u,i,t),null),et===null)throw Error(r(349));h||(sa&127)!==0||np(s,t,i)}return i}function np(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=Nr(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function ap(e,t,i,s){t.value=i,t.getSnapshot=s,op(t)&&sp(e)}function ip(e,t,i){return i(function(){op(t)&&sp(e)})}function op(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!an(e,i)}catch{return!0}}function sp(e){var t=ri(e,2);t!==null&&$t(t,e,2)}function Xc(e){var t=Ut();if(typeof e=="function"){var i=e;if(e=i(),gi){Ee(!0);try{i()}finally{Ee(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function rp(e,t,i,s){return e.baseState=i,Wc(e,Xe,typeof s=="function"?s:ra)}function N0(e,t,i,s,u){if(Tr(e))throw Error(r(485));if(e=t.action,e!==null){var h={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){h.listeners.push(g)}};I.T!==null?i(!0):h.isTransition=!1,s(h),i=t.pending,i===null?(h.next=t.pending=h,lp(t,h)):(h.next=i.next,t.pending=i.next=h)}}function lp(e,t){var i=t.action,s=t.payload,u=e.state;if(t.isTransition){var h=I.T,g={};I.T=g;try{var v=i(u,s),M=I.S;M!==null&&M(g,v),cp(e,t,v)}catch(H){Zc(e,t,H)}finally{h!==null&&g.types!==null&&(h.types=g.types),I.T=h}}else try{h=i(u,s),cp(e,t,h)}catch(H){Zc(e,t,H)}}function cp(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){up(e,t,s)},function(s){return Zc(e,t,s)}):up(e,t,i)}function up(e,t,i){t.status="fulfilled",t.value=i,dp(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,lp(e,i)))}function Zc(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,dp(t),t=t.next;while(t!==s)}e.action=null}function dp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function fp(e,t){return t}function hp(e,t){if(Be){var i=et.formState;if(i!==null){e:{var s=Te;if(Be){if(st){t:{for(var u=st,h=Cn;u.nodeType!==8;){if(!h){u=null;break t}if(u=wn(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){st=wn(u.nextSibling),s=u.data==="F!";break e}}Ea(s)}s=!1}s&&(t=i[0])}}return i=Ut(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fp,lastRenderedState:t},i.queue=s,i=Op.bind(null,Te,s),s.dispatch=i,s=Xc(!1),h=iu.bind(null,Te,!1,s.queue),s=Ut(),u={state:t,dispatch:null,action:e,pending:null},s.queue=u,i=N0.bind(null,Te,u,h,i),u.dispatch=i,s.memoizedState=e,[t,i,!1]}function pp(e){var t=bt();return mp(t,Xe,e)}function mp(e,t,i){if(t=Wc(e,t,fp)[0],e=Ar(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Jo(t)}catch(g){throw g===Xi?gr:g}else s=t;t=bt();var u=t.queue,h=u.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,no(9,{destroy:void 0},k0.bind(null,u,i),null)),[s,h,e]}function k0(e,t){e.action=t}function gp(e){var t=bt(),i=Xe;if(i!==null)return mp(t,i,e);bt(),t=t.memoizedState,i=bt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function no(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Nr(),Te.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 yp(){return bt().memoizedState}function Dr(e,t,i,s){var u=Ut();Te.flags|=e,u.memoizedState=no(1|t,{destroy:void 0},i,s===void 0?null:s)}function jr(e,t,i,s){var u=bt();s=s===void 0?null:s;var h=u.memoizedState.inst;Xe!==null&&s!==null&&qc(s,Xe.memoizedState.deps)?u.memoizedState=no(t,h,i,s):(Te.flags|=e,u.memoizedState=no(1|t,h,i,s))}function xp(e,t){Dr(8390656,8,e,t)}function Jc(e,t){jr(2048,8,e,t)}function A0(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Nr(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function bp(e){var t=bt().memoizedState;return A0({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function vp(e,t){return jr(4,2,e,t)}function Cp(e,t){return jr(4,4,e,t)}function Sp(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 wp(e,t,i){i=i!=null?i.concat([e]):null,jr(4,4,Sp.bind(null,t,e),i)}function eu(){}function Np(e,t){var i=bt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&qc(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function kp(e,t){var i=bt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&qc(t,s[1]))return s[0];if(s=e(),gi){Ee(!0);try{e()}finally{Ee(!1)}}return i.memoizedState=[s,t],s}function tu(e,t,i){return i===void 0||(sa&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Am(),Te.lanes|=e,Ha|=e,i)}function Ap(e,t,i,s){return an(i,t)?i:Ji.current!==null?(e=tu(e,i,s),an(e,t)||(St=!0),e):(sa&42)===0||(sa&1073741824)!==0&&(ze&261930)===0?(St=!0,e.memoizedState=i):(e=Am(),Te.lanes|=e,Ha|=e,t)}function Dp(e,t,i,s,u){var h=Z.p;Z.p=h!==0&&8>h?h:8;var g=I.T,v={};I.T=v,iu(e,!1,t,i);try{var M=u(),H=I.S;if(H!==null&&H(v,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var V=C0(M,s);es(e,t,V,un(e))}else es(e,t,s,un(e))}catch($){es(e,t,{then:function(){},status:"rejected",reason:$},un())}finally{Z.p=h,g!==null&&v.types!==null&&(g.types=v.types),I.T=g}}function D0(){}function nu(e,t,i,s){if(e.tag!==5)throw Error(r(476));var u=jp(e).queue;Dp(e,u,t,ae,i===null?D0:function(){return Tp(e),i(s)})}function jp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:ae},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tp(e){var t=jp(e);t.next===null&&(t=e.alternate.memoizedState),es(e,t.next.queue,{},un())}function au(){return Pt(ys)}function Mp(){return bt().memoizedState}function Ep(){return bt().memoizedState}function j0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=un();e=La(i);var s=Ra(t,e,i);s!==null&&($t(s,t,i),Wo(s,t,i)),t={cache:Oc()},e.payload=t;return}t=t.return}}function T0(e,t,i){var s=un();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tr(e)?Pp(t,i):(i=Cc(e,t,i,s),i!==null&&($t(i,e,s),Lp(i,t,s)))}function Op(e,t,i){var s=un();es(e,t,i,s)}function es(e,t,i,s){var u={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tr(e))Pp(t,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var g=t.lastRenderedState,v=h(g,i);if(u.hasEagerState=!0,u.eagerState=v,an(v,g))return cr(e,t,u,0),et===null&&lr(),!1}catch{}finally{}if(i=Cc(e,t,u,s),i!==null)return $t(i,e,s),Lp(i,t,s),!0}return!1}function iu(e,t,i,s){if(s={lane:2,revertLane:_u(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tr(e)){if(t)throw Error(r(479))}else t=Cc(e,i,s,2),t!==null&&$t(t,e,2)}function Tr(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Pp(e,t){eo=Sr=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Lp(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,To(e,i)}}var ts={readContext:Pt,use:kr,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};ts.useEffectEvent=ht;var Rp={readContext:Pt,use:kr,useCallback:function(e,t){return Ut().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:xp,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Dr(4194308,4,Sp.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Dr(4194308,4,e,t)},useInsertionEffect:function(e,t){Dr(4,2,e,t)},useMemo:function(e,t){var i=Ut();t=t===void 0?null:t;var s=e();if(gi){Ee(!0);try{e()}finally{Ee(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Ut();if(i!==void 0){var u=i(t);if(gi){Ee(!0);try{i(t)}finally{Ee(!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=T0.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Ut();return e={current:e},t.memoizedState=e},useState:function(e){e=Xc(e);var t=e.queue,i=Op.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:eu,useDeferredValue:function(e,t){var i=Ut();return tu(i,e,t)},useTransition:function(){var e=Xc(!1);return e=Dp.bind(null,Te,e.queue,!0,!1),Ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,u=Ut();if(Be){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),et===null)throw Error(r(349));(ze&127)!==0||np(s,t,i)}u.memoizedState=i;var h={value:i,getSnapshot:t};return u.queue=h,xp(ip.bind(null,s,h,e),[e]),s.flags|=2048,no(9,{destroy:void 0},ap.bind(null,s,h,i,t),null),i},useId:function(){var e=Ut(),t=et.identifierPrefix;if(Be){var i=zn,s=_n;i=(s&~(1<<32-Ce(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=wr++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=S0++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:au,useFormState:hp,useActionState:hp,useOptimistic:function(e){var t=Ut();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=iu.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:$c,useCacheRefresh:function(){return Ut().memoizedState=j0.bind(null,Te)},useEffectEvent:function(e){var t=Ut(),i={impl:e};return t.memoizedState=i,function(){if(($e&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},ou={readContext:Pt,use:kr,useCallback:Np,useContext:Pt,useEffect:Jc,useImperativeHandle:wp,useInsertionEffect:vp,useLayoutEffect:Cp,useMemo:kp,useReducer:Ar,useRef:yp,useState:function(){return Ar(ra)},useDebugValue:eu,useDeferredValue:function(e,t){var i=bt();return Ap(i,Xe.memoizedState,e,t)},useTransition:function(){var e=Ar(ra)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Jo(e),t]},useSyncExternalStore:tp,useId:Mp,useHostTransitionStatus:au,useFormState:pp,useActionState:pp,useOptimistic:function(e,t){var i=bt();return rp(i,Xe,e,t)},useMemoCache:$c,useCacheRefresh:Ep};ou.useEffectEvent=bp;var _p={readContext:Pt,use:kr,useCallback:Np,useContext:Pt,useEffect:Jc,useImperativeHandle:wp,useInsertionEffect:vp,useLayoutEffect:Cp,useMemo:kp,useReducer:Qc,useRef:yp,useState:function(){return Qc(ra)},useDebugValue:eu,useDeferredValue:function(e,t){var i=bt();return Xe===null?tu(i,e,t):Ap(i,Xe.memoizedState,e,t)},useTransition:function(){var e=Qc(ra)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Jo(e),t]},useSyncExternalStore:tp,useId:Mp,useHostTransitionStatus:au,useFormState:gp,useActionState:gp,useOptimistic:function(e,t){var i=bt();return Xe!==null?rp(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:$c,useCacheRefresh:Ep};_p.useEffectEvent=bp;function su(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:x({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var ru={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=un(),u=La(s);u.payload=t,i!=null&&(u.callback=i),t=Ra(e,u,s),t!==null&&($t(t,e,s),Wo(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=un(),u=La(s);u.tag=1,u.payload=t,i!=null&&(u.callback=i),t=Ra(e,u,s),t!==null&&($t(t,e,s),Wo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=un(),s=La(i);s.tag=2,t!=null&&(s.callback=t),t=Ra(e,s,i),t!==null&&($t(t,e,i),Wo(t,e,i))}};function zp(e,t,i,s,u,h,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,h,g):t.prototype&&t.prototype.isPureReactComponent?!Bo(i,s)||!Bo(u,h):!0}function Ip(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&&ru.enqueueReplaceState(t,t.state,null)}function yi(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=x({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function Up(e){rr(e)}function Hp(e){console.error(e)}function Bp(e){rr(e)}function Mr(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Kp(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 lu(e,t,i){return i=La(i),i.tag=3,i.payload={element:null},i.callback=function(){Mr(e,t)},i}function qp(e){return e=La(e),e.tag=3,e}function Gp(e,t,i,s){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var h=s.value;e.payload=function(){return u(h)},e.callback=function(){Kp(t,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Kp(t,i,s),typeof u!="function"&&(Ba===null?Ba=new Set([this]):Ba.add(this));var v=s.stack;this.componentDidCatch(s.value,{componentStack:v!==null?v:""})})}function M0(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=sn.current,i!==null){switch(i.tag){case 31:case 13:return Sn===null?Kr():i.alternate===null&&pt===0&&(pt=3),i.flags&=-257,i.flags|=65536,i.lanes=u,s===yr?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Pu(e,s,u)),!1;case 22:return i.flags|=65536,s===yr?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)),Pu(e,s,u)),!1}throw Error(r(435,i.tag))}return Pu(e,s,u),Kr(),!1}if(Be)return t=sn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,s!==Dc&&(e=Error(r(422),{cause:s}),Go(xn(e,i)))):(s!==Dc&&(t=Error(r(423),{cause:s}),Go(xn(t,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,s=xn(s,i),u=lu(e.stateNode,s,u),Ic(e,u),pt!==4&&(pt=2)),!1;var h=Error(r(520),{cause:s});if(h=xn(h,i),cs===null?cs=[h]:cs.push(h),pt!==4&&(pt=2),t===null)return!0;s=xn(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=lu(i.stateNode,s,e),Ic(i,e),!1;case 1:if(t=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ba===null||!Ba.has(h))))return i.flags|=65536,u&=-u,i.lanes|=u,u=qp(u),Gp(u,e,i,s),Ic(i,u),!1}i=i.return}while(i!==null);return!1}var cu=Error(r(461)),St=!1;function Lt(e,t,i,s){t.child=e===null?$h(t,null,i,s):mi(t,e.child,i,s)}function Fp(e,t,i,s,u){i=i.render;var h=t.ref;if("ref"in s){var g={};for(var v in s)v!=="ref"&&(g[v]=s[v])}else g=s;return di(t),s=Gc(e,t,i,g,h,u),v=Fc(),e!==null&&!St?(Vc(e,t,u),la(e,t,u)):(Be&&v&&kc(t),t.flags|=1,Lt(e,t,s,u),t.child)}function Vp(e,t,i,s,u){if(e===null){var h=i.type;return typeof h=="function"&&!Sc(h)&&h.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=h,Yp(e,t,h,s,u)):(e=dr(i.type,null,s,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!yu(e,u)){var g=h.memoizedProps;if(i=i.compare,i=i!==null?i:Bo,i(g,s)&&e.ref===t.ref)return la(e,t,u)}return t.flags|=1,e=na(h,s),e.ref=t.ref,e.return=t,t.child=e}function Yp(e,t,i,s,u){if(e!==null){var h=e.memoizedProps;if(Bo(h,s)&&e.ref===t.ref)if(St=!1,t.pendingProps=s=h,yu(e,u))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,la(e,t,u)}return uu(e,t,i,s,u)}function $p(e,t,i,s){var u=s.children,h=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(h=h!==null?h.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&~h}else s=0,t.child=null;return Wp(e,t,h,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mr(t,h!==null?h.cachePool:null),h!==null?Xh(t,h):Hc(),Zh(t);else return s=t.lanes=536870912,Wp(e,t,h!==null?h.baseLanes|i:i,i,s)}else h!==null?(mr(t,h.cachePool),Xh(t,h),za(),t.memoizedState=null):(e!==null&&mr(t,null),Hc(),za());return Lt(e,t,u,i),t.child}function ns(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Wp(e,t,i,s,u){var h=Lc();return h=h===null?null:{parent:vt._currentValue,pool:h},t.memoizedState={baseLanes:i,cachePool:h},e!==null&&mr(t,null),Hc(),Zh(t),e!==null&&$i(e,t,s,!0),t.childLanes=u,null}function Er(e,t){return t=Pr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Qp(e,t,i){return mi(t,e.child,null,i),e=Er(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function E0(e,t,i){var s=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(s.mode==="hidden")return e=Er(t,s),t.lanes=536870912,ns(null,e);if(Kc(t),(e=st)?(e=lg(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:_n,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=Ph(e),i.return=t,t.child=i,Ot=t,st=null)):e=null,e===null)throw Ea(t);return t.lanes=536870912,null}return Er(t,s)}var h=e.memoizedState;if(h!==null){var g=h.dehydrated;if(Kc(t),u)if(t.flags&256)t.flags&=-257,t=Qp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(St||$i(e,t,i,!1),u=(i&e.childLanes)!==0,St||u){if(s=et,s!==null&&(g=pn(s,i),g!==0&&g!==h.retryLane))throw h.retryLane=g,ri(e,g),$t(s,e,g),cu;Kr(),t=Qp(e,t,i)}else e=h.treeContext,st=wn(g.nextSibling),Ot=t,Be=!0,Ma=null,Cn=!1,e!==null&&_h(t,e),t=Er(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 Or(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 uu(e,t,i,s,u){return di(t),i=Gc(e,t,i,s,void 0,u),s=Fc(),e!==null&&!St?(Vc(e,t,u),la(e,t,u)):(Be&&s&&kc(t),t.flags|=1,Lt(e,t,i,u),t.child)}function Xp(e,t,i,s,u,h){return di(t),t.updateQueue=null,i=ep(t,s,i,u),Jh(e),s=Fc(),e!==null&&!St?(Vc(e,t,h),la(e,t,h)):(Be&&s&&kc(t),t.flags|=1,Lt(e,t,i,h),t.child)}function Zp(e,t,i,s,u){if(di(t),t.stateNode===null){var h=Gi,g=i.contextType;typeof g=="object"&&g!==null&&(h=Pt(g)),h=new i(s,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=ru,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=s,h.state=t.memoizedState,h.refs={},_c(t),g=i.contextType,h.context=typeof g=="object"&&g!==null?Pt(g):Gi,h.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(su(t,i,g,s),h.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(g=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),g!==h.state&&ru.enqueueReplaceState(h,h.state,null),Xo(t,s,h,u),Qo(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){h=t.stateNode;var v=t.memoizedProps,M=yi(i,v);h.props=M;var H=h.context,V=i.contextType;g=Gi,typeof V=="object"&&V!==null&&(g=Pt(V));var $=i.getDerivedStateFromProps;V=typeof $=="function"||typeof h.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,V||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v||H!==g)&&Ip(t,h,s,g),Pa=!1;var q=t.memoizedState;h.state=q,Xo(t,s,h,u),Qo(),H=t.memoizedState,v||q!==H||Pa?(typeof $=="function"&&(su(t,i,$,s),H=t.memoizedState),(M=Pa||zp(t,i,M,s,q,H,g))?(V||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=H),h.props=s,h.state=H,h.context=g,s=M):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{h=t.stateNode,zc(e,t),g=t.memoizedProps,V=yi(i,g),h.props=V,$=t.pendingProps,q=h.context,H=i.contextType,M=Gi,typeof H=="object"&&H!==null&&(M=Pt(H)),v=i.getDerivedStateFromProps,(H=typeof v=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(g!==$||q!==M)&&Ip(t,h,s,M),Pa=!1,q=t.memoizedState,h.state=q,Xo(t,s,h,u),Qo();var F=t.memoizedState;g!==$||q!==F||Pa||e!==null&&e.dependencies!==null&&hr(e.dependencies)?(typeof v=="function"&&(su(t,i,v,s),F=t.memoizedState),(V=Pa||zp(t,i,V,s,q,F,M)||e!==null&&e.dependencies!==null&&hr(e.dependencies))?(H||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,F,M),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,F,M)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=F),h.props=s,h.state=F,h.context=M,s=V):(typeof h.componentDidUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),s=!1)}return h=s,Or(e,t),s=(t.flags&128)!==0,h||s?(h=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&s?(t.child=mi(t,e.child,null,u),t.child=mi(t,null,i,u)):Lt(e,t,i,u),t.memoizedState=h.state,e=t.child):e=la(e,t,u),e}function Jp(e,t,i,s){return ci(),t.flags|=256,Lt(e,t,i,s),t.child}var du={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fu(e){return{baseLanes:e,cachePool:Kh()}}function hu(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=cn),e}function em(e,t,i){var s=t.pendingProps,u=!1,h=(t.flags&128)!==0,g;if((g=h)||(g=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),g&&(u=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(u?_a(t):za(),(e=st)?(e=lg(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:_n,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=Ph(e),i.return=t,t.child=i,Ot=t,st=null)):e=null,e===null)throw Ea(t);return Wu(e)?t.lanes=32:t.lanes=536870912,null}var v=s.children;return s=s.fallback,u?(za(),u=t.mode,v=Pr({mode:"hidden",children:v},u),s=li(s,u,i,null),v.return=t,s.return=t,v.sibling=s,t.child=v,s=t.child,s.memoizedState=fu(i),s.childLanes=hu(e,g,i),t.memoizedState=du,ns(null,s)):(_a(t),pu(t,v))}var M=e.memoizedState;if(M!==null&&(v=M.dehydrated,v!==null)){if(h)t.flags&256?(_a(t),t.flags&=-257,t=mu(e,t,i)):t.memoizedState!==null?(za(),t.child=e.child,t.flags|=128,t=null):(za(),v=s.fallback,u=t.mode,s=Pr({mode:"visible",children:s.children},u),v=li(v,u,i,null),v.flags|=2,s.return=t,v.return=t,s.sibling=v,t.child=s,mi(t,e.child,null,i),s=t.child,s.memoizedState=fu(i),s.childLanes=hu(e,g,i),t.memoizedState=du,t=ns(null,s));else if(_a(t),Wu(v)){if(g=v.nextSibling&&v.nextSibling.dataset,g)var H=g.dgst;g=H,s=Error(r(419)),s.stack="",s.digest=g,Go({value:s,source:null,stack:null}),t=mu(e,t,i)}else if(St||$i(e,t,i,!1),g=(i&e.childLanes)!==0,St||g){if(g=et,g!==null&&(s=pn(g,i),s!==0&&s!==M.retryLane))throw M.retryLane=s,ri(e,s),$t(g,e,s),cu;$u(v)||Kr(),t=mu(e,t,i)}else $u(v)?(t.flags|=192,t.child=e.child,t=null):(e=M.treeContext,st=wn(v.nextSibling),Ot=t,Be=!0,Ma=null,Cn=!1,e!==null&&_h(t,e),t=pu(t,s.children),t.flags|=4096);return t}return u?(za(),v=s.fallback,u=t.mode,M=e.child,H=M.sibling,s=na(M,{mode:"hidden",children:s.children}),s.subtreeFlags=M.subtreeFlags&65011712,H!==null?v=na(H,v):(v=li(v,u,i,null),v.flags|=2),v.return=t,s.return=t,s.sibling=v,t.child=s,ns(null,s),s=t.child,v=e.child.memoizedState,v===null?v=fu(i):(u=v.cachePool,u!==null?(M=vt._currentValue,u=u.parent!==M?{parent:M,pool:M}:u):u=Kh(),v={baseLanes:v.baseLanes|i,cachePool:u}),s.memoizedState=v,s.childLanes=hu(e,g,i),t.memoizedState=du,ns(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&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=i,t.memoizedState=null,i)}function pu(e,t){return t=Pr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Pr(e,t){return e=on(22,e,null,t),e.lanes=0,e}function mu(e,t,i){return mi(t,e.child,null,i),e=pu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tm(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Mc(e.return,t,i)}function gu(e,t,i,s,u,h){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:u,treeForkCount:h}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=s,g.tail=i,g.tailMode=u,g.treeForkCount=h)}function nm(e,t,i){var s=t.pendingProps,u=s.revealOrder,h=s.tail;s=s.children;var g=xt.current,v=(g&2)!==0;if(v?(g=g&1|2,t.flags|=128):g&=1,Q(xt,g),Lt(e,t,s,i),s=Be?qo:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tm(e,i,t);else if(e.tag===19)tm(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&&Cr(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),gu(t,!1,u,i,h,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&&Cr(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}gu(t,!0,i,null,h,s);break;case"together":gu(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),Ha|=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 yu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&hr(e)))}function O0(e,t,i){switch(t.tag){case 3:ge(t,t.stateNode.containerInfo),Oa(t,vt,e.memoizedState.cache),ci();break;case 27:case 5:He(t);break;case 4:ge(t,t.stateNode.containerInfo);break;case 10:Oa(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?em(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 nm(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Q(xt,xt.current),s)break;return null;case 22:return t.lanes=0,$p(e,t,i,t.pendingProps);case 24:Oa(t,vt,e.memoizedState.cache)}return la(e,t,i)}function am(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!yu(e,i)&&(t.flags&128)===0)return St=!1,O0(e,t,i);St=(e.flags&131072)!==0}else St=!1,Be&&(t.flags&1048576)!==0&&Rh(t,qo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=hi(t.elementType),t.type=e,typeof e=="function")Sc(e)?(s=yi(e,s),t.tag=1,t=Zp(null,t,e,s,i)):(t.tag=0,t=uu(null,t,e,s,i));else{if(e!=null){var u=e.$$typeof;if(u===k){t.tag=11,t=Fp(null,t,e,s,i);break e}else if(u===R){t.tag=14,t=Vp(null,t,e,s,i);break e}}throw t=te(e)||e,Error(r(306,t,""))}}return t;case 0:return uu(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,u=yi(s,t.pendingProps),Zp(e,t,s,u,i);case 3:e:{if(ge(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var h=t.memoizedState;u=h.element,zc(e,t),Xo(t,s,null,i);var g=t.memoizedState;if(s=g.cache,Oa(t,vt,s),s!==h.cache&&Ec(t,[vt],i,!0),Qo(),s=g.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=Jp(e,t,s,i);break e}else if(s!==u){u=xn(Error(r(424)),t),Go(u),t=Jp(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(st=wn(e.firstChild),Ot=t,Be=!0,Ma=null,Cn=!0,i=$h(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ci(),s===u){t=la(e,t,i);break e}Lt(e,t,s,i)}t=t.child}return t;case 26:return Or(e,t),e===null?(i=pg(t.type,null,t.pendingProps,null))?t.memoizedState=i:Be||(i=t.type,e=t.pendingProps,s=Wr(ie.current).createElement(i),s[Et]=t,s[Kt]=e,Rt(s,i,e),jt(s),t.stateNode=s):t.memoizedState=pg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return He(t),e===null&&Be&&(s=t.stateNode=dg(t.type,t.pendingProps,ie.current),Ot=t,Cn=!0,u=st,Fa(t.type)?(Qu=u,st=wn(s.firstChild)):st=u),Lt(e,t,t.pendingProps.children,i),Or(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((u=s=st)&&(s=lC(s,t.type,t.pendingProps,Cn),s!==null?(t.stateNode=s,Ot=t,st=wn(s.firstChild),Cn=!1,u=!0):u=!1),u||Ea(t)),He(t),u=t.type,h=t.pendingProps,g=e!==null?e.memoizedProps:null,s=h.children,Fu(u,h)?s=null:g!==null&&Fu(u,g)&&(t.flags|=32),t.memoizedState!==null&&(u=Gc(e,t,w0,null,null,i),ys._currentValue=u),Or(e,t),Lt(e,t,s,i),t.child;case 6:return e===null&&Be&&((e=i=st)&&(i=cC(i,t.pendingProps,Cn),i!==null?(t.stateNode=i,Ot=t,st=null,e=!0):e=!1),e||Ea(t)),null;case 13:return em(e,t,i);case 4:return ge(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=mi(t,null,s,i):Lt(e,t,s,i),t.child;case 11:return Fp(e,t,t.type,t.pendingProps,i);case 7:return Lt(e,t,t.pendingProps,i),t.child;case 8:return Lt(e,t,t.pendingProps.children,i),t.child;case 12:return Lt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Oa(t,t.type,s.value),Lt(e,t,s.children,i),t.child;case 9:return u=t.type._context,s=t.pendingProps.children,di(t),u=Pt(u),s=s(u),t.flags|=1,Lt(e,t,s,i),t.child;case 14:return Vp(e,t,t.type,t.pendingProps,i);case 15:return Yp(e,t,t.type,t.pendingProps,i);case 19:return nm(e,t,i);case 31:return E0(e,t,i);case 22:return $p(e,t,i,t.pendingProps);case 24:return di(t),s=Pt(vt),e===null?(u=Lc(),u===null&&(u=et,h=Oc(),u.pooledCache=h,h.refCount++,h!==null&&(u.pooledCacheLanes|=i),u=h),t.memoizedState={parent:s,cache:u},_c(t),Oa(t,vt,u)):((e.lanes&i)!==0&&(zc(e,t),Xo(t,null,null,i),Qo()),u=e.memoizedState,h=t.memoizedState,u.parent!==s?(u={parent:s,cache:s},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Oa(t,vt,s)):(s=h.cache,Oa(t,vt,s),s!==u.cache&&Ec(t,[vt],i,!0))),Lt(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 xu(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(Mm())e.flags|=8192;else throw pi=yr,Rc}else e.flags&=-16777217}function im(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!bg(t))if(Mm())e.flags|=8192;else throw pi=yr,Rc}function Lr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Dt():536870912,e.lanes|=t,so|=t)}function as(e,t){if(!Be)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 rt(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 P0(e,t,i){var s=t.pendingProps;switch(Ac(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),oa(vt),De(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Yi(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,jc())),rt(t),null;case 26:var u=t.type,h=t.memoizedState;return e===null?(ca(t),h!==null?(rt(t),im(t,h)):(rt(t),xu(t,u,null,s,i))):h?h!==e.memoizedState?(ca(t),rt(t),im(t,h)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ca(t),rt(t),xu(t,u,e,s,i)),null;case 27:if(lt(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 rt(t),null}e=J.current,Yi(t)?zh(t):(e=dg(u,s,i),t.stateNode=e,ca(t))}return rt(t),null;case 5:if(lt(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 rt(t),null}if(h=J.current,Yi(t))zh(t);else{var g=Wr(ie.current);switch(h){case 1:h=g.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:h=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":h=g.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":h=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":h=g.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?g.createElement(u,{is:s.is}):g.createElement(u)}}h[Et]=t,h[Kt]=s;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)h.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=h;e:switch(Rt(h,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 rt(t),xu(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,Yi(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,u=Ot,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[Et]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||eg(e.nodeValue,i)),e||Ea(t,!0)}else e=Wr(e).createTextNode(s),e[Et]=t,t.stateNode=e}return rt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Yi(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[Et]=t}else ci(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else i=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return rt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Yi(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[Et]=t}else ci(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),u=!1}else u=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(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),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==u&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Lr(t,t.updateQueue),rt(t),null);case 4:return De(),e===null&&Hu(t.stateNode.containerInfo),rt(t),null;case 10:return oa(t.type),rt(t),null;case 19:if(he(xt),s=t.memoizedState,s===null)return rt(t),null;if(u=(t.flags&128)!==0,h=s.rendering,h===null)if(u)as(s,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=Cr(e),h!==null){for(t.flags|=128,as(s,!1),e=h.updateQueue,t.updateQueue=e,Lr(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Oh(i,e),i=i.sibling;return Q(xt,xt.current&1|2),Be&&aa(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&yt()>Ur&&(t.flags|=128,u=!0,as(s,!1),t.lanes=4194304)}else{if(!u)if(e=Cr(h),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Lr(t,e),as(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!Be)return rt(t),null}else 2*yt()-s.renderingStartTime>Ur&&i!==536870912&&(t.flags|=128,u=!0,as(s,!1),t.lanes=4194304);s.isBackwards?(h.sibling=t.child,t.child=h):(e=s.last,e!==null?e.sibling=h:t.child=h,s.last=h)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=yt(),e.sibling=null,i=xt.current,Q(xt,u?i&1|2:i&1),Be&&aa(t,s.treeForkCount),e):(rt(t),null);case 22:case 23:return rn(t),Bc(),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&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),i=t.updateQueue,i!==null&&Lr(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&&he(fi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),oa(vt),rt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function L0(e,t){switch(Ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(vt),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return lt(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(r(340));ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(xt),null;case 4:return De(),null;case 10:return oa(t.type),null;case 22:case 23:return rn(t),Bc(),e!==null&&he(fi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(vt),null;case 25:return null;default:return null}}function om(e,t){switch(Ac(t),t.tag){case 3:oa(vt),De();break;case 26:case 27:case 5:lt(t);break;case 4:De();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:he(xt);break;case 10:oa(t.type);break;case 22:case 23:rn(t),Bc(),e!==null&&he(fi);break;case 24:oa(vt)}}function is(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 h=i.create,g=i.inst;s=h(),g.destroy=s}i=i.next}while(i!==u)}}catch(v){Qe(t,t.return,v)}}function Ia(e,t,i){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var h=u.next;s=h;do{if((s.tag&e)===e){var g=s.inst,v=g.destroy;if(v!==void 0){g.destroy=void 0,u=t;var M=i,H=v;try{H()}catch(V){Qe(u,M,V)}}}s=s.next}while(s!==h)}}catch(V){Qe(t,t.return,V)}}function sm(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Qh(t,i)}catch(s){Qe(e,e.return,s)}}}function rm(e,t,i){i.props=yi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Qe(e,t,s)}}function os(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){Qe(e,t,u)}}function In(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(u){Qe(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){Qe(e,t,u)}else i.current=null}function lm(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){Qe(e,e.return,u)}}function bu(e,t,i){try{var s=e.stateNode;nC(s,e.type,i,t),s[Kt]=t}catch(u){Qe(e,e.return,u)}}function cm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fa(e.type)||e.tag===4}function vu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cm(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&&Fa(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 Cu(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&&Fa(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Cu(e,t,i),e=e.sibling;e!==null;)Cu(e,t,i),e=e.sibling}function Rr(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&&Fa(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Rr(e,t,i),e=e.sibling;e!==null;)Rr(e,t,i),e=e.sibling}function um(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Rt(t,s,i),t[Et]=e,t[Kt]=i}catch(h){Qe(e,e.return,h)}}var ua=!1,wt=!1,Su=!1,dm=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function R0(e,t){if(e=e.containerInfo,qu=nl,e=wh(e),mc(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,h=s.focusNode;s=s.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var g=0,v=-1,M=-1,H=0,V=0,$=e,q=null;t:for(;;){for(var F;$!==i||u!==0&&$.nodeType!==3||(v=g+u),$!==h||s!==0&&$.nodeType!==3||(M=g+s),$.nodeType===3&&(g+=$.nodeValue.length),(F=$.firstChild)!==null;)q=$,$=F;for(;;){if($===e)break t;if(q===i&&++H===u&&(v=g),q===h&&++V===s&&(M=g),(F=$.nextSibling)!==null)break;$=q,q=$.parentNode}$=F}i=v===-1||M===-1?null:{start:v,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for(Gu={focusedElem:e,selectionRange:i},nl=!1,Tt=t;Tt!==null;)if(t=Tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Tt=e;else for(;Tt!==null;){switch(t=Tt,h=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&&h!==null){e=void 0,i=t,u=h.memoizedProps,h=h.memoizedState,s=i.stateNode;try{var fe=yi(i.type,u);e=s.getSnapshotBeforeUpdate(fe,h),s.__reactInternalSnapshotBeforeUpdate=e}catch(we){Qe(i,i.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Yu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yu(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,Tt=e;break}Tt=t.return}}function fm(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:fa(e,i),s&4&&is(5,i);break;case 1:if(fa(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){Qe(i,i.return,g)}else{var u=yi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Qe(i,i.return,g)}}s&64&&sm(i),s&512&&os(i,i.return);break;case 3:if(fa(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{Qh(e,t)}catch(g){Qe(i,i.return,g)}}break;case 27:t===null&&s&4&&um(i);case 26:case 5:fa(e,i),t===null&&s&4&&lm(i),s&512&&os(i,i.return);break;case 12:fa(e,i);break;case 31:fa(e,i),s&4&&mm(e,i);break;case 13:fa(e,i),s&4&&gm(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=G0.bind(null,i),uC(e,i))));break;case 22:if(s=i.memoizedState!==null||ua,!s){t=t!==null&&t.memoizedState!==null||wt,u=ua;var h=wt;ua=s,(wt=t)&&!h?ha(e,i,(i.subtreeFlags&8772)!==0):fa(e,i),ua=u,wt=h}break;case 30:break;default:fa(e,i)}}function hm(e){var t=e.alternate;t!==null&&(e.alternate=null,hm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Zl(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 dt=null,Gt=!1;function da(e,t,i){for(i=i.child;i!==null;)pm(e,t,i),i=i.sibling}function pm(e,t,i){if(ee&&typeof ee.onCommitFiberUnmount=="function")try{ee.onCommitFiberUnmount(Qn,i)}catch{}switch(i.tag){case 26:wt||In(i,t),da(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:wt||In(i,t);var s=dt,u=Gt;Fa(i.type)&&(dt=i.stateNode,Gt=!1),da(e,t,i),ps(i.stateNode),dt=s,Gt=u;break;case 5:wt||In(i,t);case 6:if(s=dt,u=Gt,dt=null,da(e,t,i),dt=s,Gt=u,dt!==null)if(Gt)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(i.stateNode)}catch(h){Qe(i,t,h)}else try{dt.removeChild(i.stateNode)}catch(h){Qe(i,t,h)}break;case 18:dt!==null&&(Gt?(e=dt,sg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),mo(e)):sg(dt,i.stateNode));break;case 4:s=dt,u=Gt,dt=i.stateNode.containerInfo,Gt=!0,da(e,t,i),dt=s,Gt=u;break;case 0:case 11:case 14:case 15:Ia(2,i,t),wt||Ia(4,i,t),da(e,t,i);break;case 1:wt||(In(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&rm(i,t,s)),da(e,t,i);break;case 21:da(e,t,i);break;case 22:wt=(s=wt)||i.memoizedState!==null,da(e,t,i),wt=s;break;default:da(e,t,i)}}function mm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{mo(e)}catch(i){Qe(t,t.return,i)}}}function gm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{mo(e)}catch(i){Qe(t,t.return,i)}}function _0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dm),t;default:throw Error(r(435,e.tag))}}function _r(e,t){var i=_0(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var u=F0.bind(null,e,s);s.then(u,u)}})}function Ft(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var u=i[s],h=e,g=t,v=g;e:for(;v!==null;){switch(v.tag){case 27:if(Fa(v.type)){dt=v.stateNode,Gt=!1;break e}break;case 5:dt=v.stateNode,Gt=!1;break e;case 3:case 4:dt=v.stateNode.containerInfo,Gt=!0;break e}v=v.return}if(dt===null)throw Error(r(160));pm(h,g,u),dt=null,Gt=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ym(t,e),t=t.sibling}var jn=null;function ym(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ft(t,e),Vt(e),s&4&&(Ia(3,e,e.return),is(3,e),Ia(5,e,e.return));break;case 1:Ft(t,e),Vt(e),s&512&&(wt||i===null||In(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=jn;if(Ft(t,e),Vt(e),s&512&&(wt||i===null||In(i,i.return)),s&4){var h=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":h=u.getElementsByTagName("title")[0],(!h||h[Oo]||h[Et]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=u.createElement(s),u.head.insertBefore(h,u.querySelector("head > title"))),Rt(h,s,i),h[Et]=e,jt(h),s=h;break e;case"link":var g=yg("link","href",u).get(s+(i.href||""));if(g){for(var v=0;v<g.length;v++)if(h=g[v],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){g.splice(v,1);break t}}h=u.createElement(s),Rt(h,s,i),u.head.appendChild(h);break;case"meta":if(g=yg("meta","content",u).get(s+(i.content||""))){for(v=0;v<g.length;v++)if(h=g[v],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){g.splice(v,1);break t}}h=u.createElement(s),Rt(h,s,i),u.head.appendChild(h);break;default:throw Error(r(468,s))}h[Et]=e,jt(h),s=h}e.stateNode=s}else xg(u,e.type,e.stateNode);else e.stateNode=gg(u,s,e.memoizedProps);else h!==s?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,s===null?xg(u,e.type,e.stateNode):gg(u,s,e.memoizedProps)):s===null&&e.stateNode!==null&&bu(e,e.memoizedProps,i.memoizedProps)}break;case 27:Ft(t,e),Vt(e),s&512&&(wt||i===null||In(i,i.return)),i!==null&&s&4&&bu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Ft(t,e),Vt(e),s&512&&(wt||i===null||In(i,i.return)),e.flags&32){u=e.stateNode;try{zi(u,"")}catch(fe){Qe(e,e.return,fe)}}s&4&&e.stateNode!=null&&(u=e.memoizedProps,bu(e,u,i!==null?i.memoizedProps:u)),s&1024&&(Su=!0);break;case 6:if(Ft(t,e),Vt(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(fe){Qe(e,e.return,fe)}}break;case 3:if(Zr=null,u=jn,jn=Qr(t.containerInfo),Ft(t,e),jn=u,Vt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{mo(t.containerInfo)}catch(fe){Qe(e,e.return,fe)}Su&&(Su=!1,xm(e));break;case 4:s=jn,jn=Qr(e.stateNode.containerInfo),Ft(t,e),Vt(e),jn=s;break;case 12:Ft(t,e),Vt(e);break;case 31:Ft(t,e),Vt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,_r(e,s)));break;case 13:Ft(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Ir=yt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,_r(e,s)));break;case 22:u=e.memoizedState!==null;var M=i!==null&&i.memoizedState!==null,H=ua,V=wt;if(ua=H||u,wt=V||M,Ft(t,e),wt=V,ua=H,Vt(e),s&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(i===null||M||ua||wt||xi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){M=i=t;try{if(h=M.stateNode,u)g=h.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{v=M.stateNode;var $=M.memoizedProps.style,q=$!=null&&$.hasOwnProperty("display")?$.display:null;v.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(fe){Qe(M,M.return,fe)}}}else if(t.tag===6){if(i===null){M=t;try{M.stateNode.nodeValue=u?"":M.memoizedProps}catch(fe){Qe(M,M.return,fe)}}}else if(t.tag===18){if(i===null){M=t;try{var F=M.stateNode;u?rg(F,!0):rg(M.stateNode,!1)}catch(fe){Qe(M,M.return,fe)}}}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,_r(e,i))));break;case 19:Ft(t,e),Vt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,_r(e,s)));break;case 30:break;case 21:break;default:Ft(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(cm(s)){i=s;break}s=s.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var u=i.stateNode,h=vu(e);Rr(e,h,u);break;case 5:var g=i.stateNode;i.flags&32&&(zi(g,""),i.flags&=-33);var v=vu(e);Rr(e,v,g);break;case 3:case 4:var M=i.stateNode.containerInfo,H=vu(e);Cu(e,H,M);break;default:throw Error(r(161))}}catch(V){Qe(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fm(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:Ia(4,t,t.return),xi(t);break;case 1:In(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&rm(t,t.return,i),xi(t);break;case 27:ps(t.stateNode);case 26:case 5:In(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 ha(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,u=e,h=t,g=h.flags;switch(h.tag){case 0:case 11:case 15:ha(u,h,i),is(4,h);break;case 1:if(ha(u,h,i),s=h,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(H){Qe(s,s.return,H)}if(s=h,u=s.updateQueue,u!==null){var v=s.stateNode;try{var M=u.shared.hiddenCallbacks;if(M!==null)for(u.shared.hiddenCallbacks=null,u=0;u<M.length;u++)Wh(M[u],v)}catch(H){Qe(s,s.return,H)}}i&&g&64&&sm(h),os(h,h.return);break;case 27:um(h);case 26:case 5:ha(u,h,i),i&&s===null&&g&4&&lm(h),os(h,h.return);break;case 12:ha(u,h,i);break;case 31:ha(u,h,i),i&&g&4&&mm(u,h);break;case 13:ha(u,h,i),i&&g&4&&gm(u,h);break;case 22:h.memoizedState===null&&ha(u,h,i),os(h,h.return);break;case 30:break;default:ha(u,h,i)}t=t.sibling}}function wu(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&&Fo(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&&Fo(e))}function Tn(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bm(e,t,i,s),t=t.sibling}function bm(e,t,i,s){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Tn(e,t,i,s),u&2048&&is(9,t);break;case 1:Tn(e,t,i,s);break;case 3:Tn(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&&Fo(e)));break;case 12:if(u&2048){Tn(e,t,i,s),e=t.stateNode;try{var h=t.memoizedProps,g=h.id,v=h.onPostCommit;typeof v=="function"&&v(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){Qe(t,t.return,M)}}else Tn(e,t,i,s);break;case 31:Tn(e,t,i,s);break;case 13:Tn(e,t,i,s);break;case 23:break;case 22:h=t.stateNode,g=t.alternate,t.memoizedState!==null?h._visibility&2?Tn(e,t,i,s):ss(e,t):h._visibility&2?Tn(e,t,i,s):(h._visibility|=2,ao(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),u&2048&&wu(g,t);break;case 24:Tn(e,t,i,s),u&2048&&Nu(t.alternate,t);break;default:Tn(e,t,i,s)}}function ao(e,t,i,s,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var h=e,g=t,v=i,M=s,H=g.flags;switch(g.tag){case 0:case 11:case 15:ao(h,g,v,M,u),is(8,g);break;case 23:break;case 22:var V=g.stateNode;g.memoizedState!==null?V._visibility&2?ao(h,g,v,M,u):ss(h,g):(V._visibility|=2,ao(h,g,v,M,u)),u&&H&2048&&wu(g.alternate,g);break;case 24:ao(h,g,v,M,u),u&&H&2048&&Nu(g.alternate,g);break;default:ao(h,g,v,M,u)}t=t.sibling}}function ss(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:ss(i,s),u&2048&&wu(s.alternate,s);break;case 24:ss(i,s),u&2048&&Nu(s.alternate,s);break;default:ss(i,s)}t=t.sibling}}var rs=8192;function io(e,t,i){if(e.subtreeFlags&rs)for(e=e.child;e!==null;)vm(e,t,i),e=e.sibling}function vm(e,t,i){switch(e.tag){case 26:io(e,t,i),e.flags&rs&&e.memoizedState!==null&&SC(i,jn,e.memoizedState,e.memoizedProps);break;case 5:io(e,t,i);break;case 3:case 4:var s=jn;jn=Qr(e.stateNode.containerInfo),io(e,t,i),jn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=rs,rs=16777216,io(e,t,i),rs=s):io(e,t,i));break;default:io(e,t,i)}}function Cm(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 ls(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];Tt=s,wm(s,e)}Cm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sm(e),e=e.sibling}function Sm(e){switch(e.tag){case 0:case 11:case 15:ls(e),e.flags&2048&&Ia(9,e,e.return);break;case 3:ls(e);break;case 12:ls(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zr(e)):ls(e);break;default:ls(e)}}function zr(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];Tt=s,wm(s,e)}Cm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ia(8,t,t.return),zr(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,zr(t));break;default:zr(t)}e=e.sibling}}function wm(e,t){for(;Tt!==null;){var i=Tt;switch(i.tag){case 0:case 11:case 15:Ia(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:Fo(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Tt=s;else e:for(i=e;Tt!==null;){s=Tt;var u=s.sibling,h=s.return;if(hm(s),s===i){Tt=null;break e}if(u!==null){u.return=h,Tt=u;break e}Tt=h}}}var z0={getCacheForType:function(e){var t=Pt(vt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Pt(vt).controller.signal}},I0=typeof WeakMap=="function"?WeakMap:Map,$e=0,et=null,Re=null,ze=0,We=0,ln=null,Ua=!1,oo=!1,ku=!1,pa=0,pt=0,Ha=0,bi=0,Au=0,cn=0,so=0,cs=null,Yt=null,Du=!1,Ir=0,Nm=0,Ur=1/0,Hr=null,Ba=null,Nt=0,Ka=null,ro=null,ma=0,ju=0,Tu=null,km=null,us=0,Mu=null;function un(){return($e&2)!==0&&ze!==0?ze&-ze:I.T!==null?_u():Mo()}function Am(){if(cn===0)if((ze&536870912)===0||Be){var e=Se;Se<<=1,(Se&3932160)===0&&(Se=262144),cn=e}else cn=536870912;return e=sn.current,e!==null&&(e.flags|=32),cn}function $t(e,t,i){(e===et&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(lo(e,0),qa(e,ze,cn,!1)),An(e,i),(($e&2)===0||e!==et)&&(e===et&&(($e&2)===0&&(bi|=i),pt===4&&qa(e,ze,cn,!1)),Un(e))}function Dm(e,t,i){if(($e&6)!==0)throw Error(r(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||It(e,t),u=s?B0(e,t):Ou(e,t,!0),h=s;do{if(u===0){oo&&!s&&qa(e,t,0,!1);break}else{if(i=e.current.alternate,h&&!U0(i)){u=Ou(e,t,!1),h=!1;continue}if(u===2){if(h=t,e.errorRecoveryDisabledLanes&h)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var v=e;u=cs;var M=v.current.memoizedState.isDehydrated;if(M&&(lo(v,g).flags|=256),g=Ou(v,g,!1),g!==2){if(ku&&!M){v.errorRecoveryDisabledLanes|=h,bi|=h,u=4;break e}h=Yt,Yt=u,h!==null&&(Yt===null?Yt=h:Yt.push.apply(Yt,h))}u=g}if(h=!1,u!==2)continue}}if(u===1){lo(e,0),qa(e,t,0,!0);break}e:{switch(s=e,h=u,h){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:qa(s,t,cn,!Ua);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Ir+300-yt(),10<u)){if(qa(s,t,cn,!Ua),Ne(s,0,!0)!==0)break e;ma=t,s.timeoutHandle=ig(jm.bind(null,s,i,Yt,Hr,Du,t,cn,bi,so,Ua,h,"Throttled",-0,0),u);break e}jm(s,i,Yt,Hr,Du,t,cn,bi,so,Ua,h,null,-0,0)}}break}while(!0);Un(e)}function jm(e,t,i,s,u,h,g,v,M,H,V,$,q,F){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},vm(t,h,$);var fe=(h&62914560)===h?Ir-yt():(h&4194048)===h?Nm-yt():0;if(fe=wC($,fe),fe!==null){ma=h,e.cancelPendingCommit=fe(_m.bind(null,e,t,h,i,s,u,g,v,M,V,$,null,q,F)),qa(e,h,g,!H);return}}_m(e,t,h,i,s,u,g,v,M)}function U0(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],h=u.getSnapshot;u=u.value;try{if(!an(h(),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 qa(e,t,i,s){t&=~Au,t&=~bi,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var u=t;0<u;){var h=31-Ce(u),g=1<<h;s[h]=-1,u&=~g}i!==0&&ni(e,i,t)}function Br(){return($e&6)===0?(ds(0),!1):!0}function Eu(){if(Re!==null){if(We===0)var e=Re.return;else e=Re,ia=ui=null,Yc(e),Zi=null,Yo=0,e=Re;for(;e!==null;)om(e.alternate,e),e=e.return;Re=null}}function lo(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,oC(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ma=0,Eu(),et=e,Re=i=na(e.current,null),ze=t,We=0,ln=null,Ua=!1,oo=It(e,t),ku=!1,so=cn=Au=bi=Ha=pt=0,Yt=cs=null,Du=!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-Ce(s),h=1<<u;t|=e[u],s&=~h}return pa=t,lr(),i}function Tm(e,t){Te=null,I.H=ts,t===Xi||t===gr?(t=Fh(),We=3):t===Rc?(t=Fh(),We=4):We=t===cu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ln=t,Re===null&&(pt=1,Mr(e,xn(t,e.current)))}function Mm(){var e=sn.current;return e===null?!0:(ze&4194048)===ze?Sn===null:(ze&62914560)===ze||(ze&536870912)!==0?e===Sn:!1}function Em(){var e=I.H;return I.H=ts,e===null?ts:e}function Om(){var e=I.A;return I.A=z0,e}function Kr(){pt=4,Ua||(ze&4194048)!==ze&&sn.current!==null||(oo=!0),(Ha&134217727)===0&&(bi&134217727)===0||et===null||qa(et,ze,cn,!1)}function Ou(e,t,i){var s=$e;$e|=2;var u=Em(),h=Om();(et!==e||ze!==t)&&(Hr=null,lo(e,t)),t=!1;var g=pt;e:do try{if(We!==0&&Re!==null){var v=Re,M=ln;switch(We){case 8:Eu(),g=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(t=!0);var H=We;if(We=0,ln=null,co(e,v,M,H),i&&oo){g=0;break e}break;default:H=We,We=0,ln=null,co(e,v,M,H)}}H0(),g=pt;break}catch(V){Tm(e,V)}while(!0);return t&&e.shellSuspendCounter++,ia=ui=null,$e=s,I.H=u,I.A=h,Re===null&&(et=null,ze=0,lr()),g}function H0(){for(;Re!==null;)Pm(Re)}function B0(e,t){var i=$e;$e|=2;var s=Em(),u=Om();et!==e||ze!==t?(Hr=null,Ur=yt()+500,lo(e,t)):oo=It(e,t);e:do try{if(We!==0&&Re!==null){t=Re;var h=ln;t:switch(We){case 1:We=0,ln=null,co(e,t,h,1);break;case 2:case 9:if(qh(h)){We=0,ln=null,Lm(t);break}t=function(){We!==2&&We!==9||et!==e||(We=7),Un(e)},h.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:qh(h)?(We=0,ln=null,Lm(t)):(We=0,ln=null,co(e,t,h,7));break;case 5:var g=null;switch(Re.tag){case 26:g=Re.memoizedState;case 5:case 27:var v=Re;if(g?bg(g):v.stateNode.complete){We=0,ln=null;var M=v.sibling;if(M!==null)Re=M;else{var H=v.return;H!==null?(Re=H,qr(H)):Re=null}break t}}We=0,ln=null,co(e,t,h,5);break;case 6:We=0,ln=null,co(e,t,h,6);break;case 8:Eu(),pt=6;break e;default:throw Error(r(462))}}K0();break}catch(V){Tm(e,V)}while(!0);return ia=ui=null,I.H=s,I.A=u,$e=i,Re!==null?0:(et=null,ze=0,lr(),pt)}function K0(){for(;Re!==null&&!Aa();)Pm(Re)}function Pm(e){var t=am(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?qr(e):Re=t}function Lm(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Xp(i,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Xp(i,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Yc(t);default:om(i,t),t=Re=Oh(t,pa),t=am(i,t,pa)}e.memoizedProps=e.pendingProps,t===null?qr(e):Re=t}function co(e,t,i,s){ia=ui=null,Yc(t),Zi=null,Yo=0;var u=t.return;try{if(M0(e,u,t,i,ze)){pt=1,Mr(e,xn(i,e.current)),Re=null;return}}catch(h){if(u!==null)throw Re=u,h;pt=1,Mr(e,xn(i,e.current)),Re=null;return}t.flags&32768?(Be||s===1?e=!0:oo||(ze&536870912)!==0?e=!1:(Ua=e=!0,(s===2||s===9||s===3||s===6)&&(s=sn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Rm(t,e)):qr(t)}function qr(e){var t=e;do{if((t.flags&32768)!==0){Rm(t,Ua);return}e=t.return;var i=P0(t.alternate,t,pa);if(i!==null){Re=i;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);pt===0&&(pt=5)}function Rm(e,t){do{var i=L0(e.alternate,e);if(i!==null){i.flags&=32767,Re=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=i}while(e!==null);pt=6,Re=null}function _m(e,t,i,s,u,h,g,v,M){e.cancelPendingCommit=null;do Gr();while(Nt!==0);if(($e&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(h=t.lanes|t.childLanes,h|=vc,jo(e,i,h,g,v,M),e===et&&(Re=et=null,ze=0),ro=t,Ka=e,ma=i,ju=h,Tu=u,km=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,V0(Ln,function(){return Bm(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,u=Z.p,Z.p=2,g=$e,$e|=4;try{R0(e,t,i)}finally{$e=g,Z.p=u,I.T=s}}Nt=1,zm(),Im(),Um()}}function zm(){if(Nt===1){Nt=0;var e=Ka,t=ro,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=I.T,I.T=null;var s=Z.p;Z.p=2;var u=$e;$e|=4;try{ym(t,e);var h=Gu,g=wh(e.containerInfo),v=h.focusedElem,M=h.selectionRange;if(g!==v&&v&&v.ownerDocument&&Sh(v.ownerDocument.documentElement,v)){if(M!==null&&mc(v)){var H=M.start,V=M.end;if(V===void 0&&(V=H),"selectionStart"in v)v.selectionStart=H,v.selectionEnd=Math.min(V,v.value.length);else{var $=v.ownerDocument||document,q=$&&$.defaultView||window;if(q.getSelection){var F=q.getSelection(),fe=v.textContent.length,we=Math.min(M.start,fe),Je=M.end===void 0?we:Math.min(M.end,fe);!F.extend&&we>Je&&(g=Je,Je=we,we=g);var _=Ch(v,we),P=Ch(v,Je);if(_&&P&&(F.rangeCount!==1||F.anchorNode!==_.node||F.anchorOffset!==_.offset||F.focusNode!==P.node||F.focusOffset!==P.offset)){var U=$.createRange();U.setStart(_.node,_.offset),F.removeAllRanges(),we>Je?(F.addRange(U),F.extend(P.node,P.offset)):(U.setEnd(P.node,P.offset),F.addRange(U))}}}}for($=[],F=v;F=F.parentNode;)F.nodeType===1&&$.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<$.length;v++){var Y=$[v];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}nl=!!qu,Gu=qu=null}finally{$e=u,Z.p=s,I.T=i}}e.current=t,Nt=2}}function Im(){if(Nt===2){Nt=0;var e=Ka,t=ro,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=I.T,I.T=null;var s=Z.p;Z.p=2;var u=$e;$e|=4;try{fm(e,t.alternate,t)}finally{$e=u,Z.p=s,I.T=i}}Nt=3}}function Um(){if(Nt===4||Nt===3){Nt=0,$n();var e=Ka,t=ro,i=ma,s=km;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,ro=Ka=null,Hm(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ba=null),Mi(i),t=t.stateNode,ee&&typeof ee.onCommitFiberRoot=="function")try{ee.onCommitFiberRoot(Qn,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=I.T,u=Z.p,Z.p=2,I.T=null;try{for(var h=e.onRecoverableError,g=0;g<s.length;g++){var v=s[g];h(v.value,{componentStack:v.stack})}}finally{I.T=t,Z.p=u}}(ma&3)!==0&&Gr(),Un(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===Mu?us++:(us=0,Mu=e):us=0,ds(0)}}function Hm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Fo(t)))}function Gr(){return zm(),Im(),Um(),Bm()}function Bm(){if(Nt!==5)return!1;var e=Ka,t=ju;ju=0;var i=Mi(ma),s=I.T,u=Z.p;try{Z.p=32>i?32:i,I.T=null,i=Tu,Tu=null;var h=Ka,g=ma;if(Nt=0,ro=Ka=null,ma=0,($e&6)!==0)throw Error(r(331));var v=$e;if($e|=4,Sm(h.current),bm(h,h.current,g,i),$e=v,ds(0,!1),ee&&typeof ee.onPostCommitFiberRoot=="function")try{ee.onPostCommitFiberRoot(Qn,h)}catch{}return!0}finally{Z.p=u,I.T=s,Hm(e,t)}}function Km(e,t,i){t=xn(i,t),t=lu(e.stateNode,t,2),e=Ra(e,t,2),e!==null&&(An(e,2),Un(e))}function Qe(e,t,i){if(e.tag===3)Km(e,e,i);else for(;t!==null;){if(t.tag===3){Km(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ba===null||!Ba.has(s))){e=xn(i,e),i=qp(2),s=Ra(t,i,2),s!==null&&(Gp(i,s,t,e),An(s,2),Un(s));break}}t=t.return}}function Pu(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new I0;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)||(ku=!0,u.add(i),e=q0.bind(null,e,t,i),t.then(e,e))}function q0(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,et===e&&(ze&i)===i&&(pt===4||pt===3&&(ze&62914560)===ze&&300>yt()-Ir?($e&2)===0&&lo(e,0):Au|=i,so===ze&&(so=0)),Un(e)}function qm(e,t){t===0&&(t=Dt()),e=ri(e,t),e!==null&&(An(e,t),Un(e))}function G0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),qm(e,i)}function F0(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),qm(e,i)}function V0(e,t){return Pn(e,t)}var Fr=null,uo=null,Lu=!1,Vr=!1,Ru=!1,Ga=0;function Un(e){e!==uo&&e.next===null&&(uo===null?Fr=uo=e:uo=uo.next=e),Vr=!0,Lu||(Lu=!0,$0())}function ds(e,t){if(!Ru&&Vr){Ru=!0;do for(var i=!1,s=Fr;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var h=0;else{var g=s.suspendedLanes,v=s.pingedLanes;h=(1<<31-Ce(42|e)+1)-1,h&=u&~(g&~v),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Ym(s,h))}else h=ze,h=Ne(s,s===et?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||It(s,h)||(i=!0,Ym(s,h));s=s.next}while(i);Ru=!1}}function Y0(){Gm()}function Gm(){Vr=Lu=!1;var e=0;Ga!==0&&iC()&&(e=Ga);for(var t=yt(),i=null,s=Fr;s!==null;){var u=s.next,h=Fm(s,t);h===0?(s.next=null,i===null?Fr=u:i.next=u,u===null&&(uo=i)):(i=s,(e!==0||(h&3)!==0)&&(Vr=!0)),s=u}Nt!==0&&Nt!==5||ds(e),Ga!==0&&(Ga=0)}function Fm(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var g=31-Ce(h),v=1<<g,M=u[g];M===-1?((v&i)===0||(v&s)!==0)&&(u[g]=Xn(v,t)):M<=t&&(e.expiredLanes|=v),h&=~v}if(t=et,i=ze,i=Ne(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&en(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||It(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&en(s),Mi(i)){case 2:case 8:i=ti;break;case 32:i=Ln;break;case 268435456:i=Ti;break;default:i=Ln}return s=Vm.bind(null,e),i=Pn(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&en(s),e.callbackPriority=2,e.callbackNode=null,2}function Vm(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gr()&&e.callbackNode!==i)return null;var s=ze;return s=Ne(e,e===et?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Dm(e,s,t),Fm(e,yt()),e.callbackNode!=null&&e.callbackNode===i?Vm.bind(null,e):null)}function Ym(e,t){if(Gr())return null;Dm(e,t,!0)}function $0(){sC(function(){($e&6)!==0?Pn(Wn,Y0):Gm()})}function _u(){if(Ga===0){var e=Wi;e===0&&(e=Ae,Ae<<=1,(Ae&261888)===0&&(Ae=256)),Ga=e}return Ga}function $m(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:er(""+e)}function Wm(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 W0(e,t,i,s,u){if(t==="submit"&&i&&i.stateNode===u){var h=$m((u[Kt]||null).action),g=s.submitter;g&&(t=(t=g[Kt]||null)?$m(t.formAction):g.getAttribute("formAction"),t!==null&&(h=t,g=null));var v=new ir("action","action",null,s,u);e.push({event:v,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ga!==0){var M=g?Wm(u,g):new FormData(u);nu(i,{pending:!0,data:M,method:u.method,action:h},null,M)}}else typeof h=="function"&&(v.preventDefault(),M=g?Wm(u,g):new FormData(u),nu(i,{pending:!0,data:M,method:u.method,action:h},h,M))},currentTarget:u}]})}}for(var zu=0;zu<bc.length;zu++){var Iu=bc[zu],Q0=Iu.toLowerCase(),X0=Iu[0].toUpperCase()+Iu.slice(1);Dn(Q0,"on"+X0)}Dn(Ah,"onAnimationEnd"),Dn(Dh,"onAnimationIteration"),Dn(jh,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(h0,"onTransitionRun"),Dn(p0,"onTransitionStart"),Dn(m0,"onTransitionCancel"),Dn(Th,"onTransitionEnd"),Ri("onMouseEnter",["mouseout","mouseover"]),Ri("onMouseLeave",["mouseout","mouseover"]),Ri("onPointerEnter",["pointerout","pointerover"]),Ri("onPointerLeave",["pointerout","pointerover"]),ai("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ai("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ai("onBeforeInput",["compositionend","keypress","textInput","paste"]),ai("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ai("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ai("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),Z0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fs));function Qm(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 h=void 0;if(t)for(var g=s.length-1;0<=g;g--){var v=s[g],M=v.instance,H=v.currentTarget;if(v=v.listener,M!==h&&u.isPropagationStopped())break e;h=v,u.currentTarget=H;try{h(u)}catch(V){rr(V)}u.currentTarget=null,h=M}else for(g=0;g<s.length;g++){if(v=s[g],M=v.instance,H=v.currentTarget,v=v.listener,M!==h&&u.isPropagationStopped())break e;h=v,u.currentTarget=H;try{h(u)}catch(V){rr(V)}u.currentTarget=null,h=M}}}}function _e(e,t){var i=t[Xl];i===void 0&&(i=t[Xl]=new Set);var s=e+"__bubble";i.has(s)||(Xm(t,e,2,!1),i.add(s))}function Uu(e,t,i){var s=0;t&&(s|=4),Xm(i,e,s,t)}var Yr="_reactListening"+Math.random().toString(36).slice(2);function Hu(e){if(!e[Yr]){e[Yr]=!0,Gf.forEach(function(i){i!=="selectionchange"&&(Z0.has(i)||Uu(i,!1,e),Uu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yr]||(t[Yr]=!0,Uu("selectionchange",!1,t))}}function Xm(e,t,i,s){switch(Ag(t)){case 2:var u=AC;break;case 8:u=DC;break;default:u=td}i=u.bind(null,t,i,e),u=void 0,!sc||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 Bu(e,t,i,s,u){var h=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var v=s.stateNode.containerInfo;if(v===u)break;if(g===4)for(g=s.return;g!==null;){var M=g.tag;if((M===3||M===4)&&g.stateNode.containerInfo===u)return;g=g.return}for(;v!==null;){if(g=Oi(v),g===null)return;if(M=g.tag,M===5||M===6||M===26||M===27){s=h=g;continue e}v=v.parentNode}}s=s.return}nh(function(){var H=h,V=ic(i),$=[];e:{var q=Mh.get(e);if(q!==void 0){var F=ir,fe=e;switch(e){case"keypress":if(nr(i)===0)break e;case"keydown":case"keyup":F=Fv;break;case"focusin":fe="focus",F=uc;break;case"focusout":fe="blur",F=uc;break;case"beforeblur":case"afterblur":F=uc;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":F=oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=Pv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=$v;break;case Ah:case Dh:case jh:F=_v;break;case Th:F=Qv;break;case"scroll":case"scrollend":F=Ev;break;case"wheel":F=Zv;break;case"copy":case"cut":case"paste":F=Iv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=rh;break;case"toggle":case"beforetoggle":F=e0}var we=(t&4)!==0,Je=!we&&(e==="scroll"||e==="scrollend"),_=we?q!==null?q+"Capture":null:q;we=[];for(var P=H,U;P!==null;){var Y=P;if(U=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||U===null||_===null||(Y=Lo(P,_),Y!=null&&we.push(hs(P,Y,U))),Je)break;P=P.return}0<we.length&&(q=new F(q,fe,null,i,V),$.push({event:q,listeners:we}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",F=e==="mouseout"||e==="pointerout",q&&i!==ac&&(fe=i.relatedTarget||i.fromElement)&&(Oi(fe)||fe[Ei]))break e;if((F||q)&&(q=V.window===V?V:(q=V.ownerDocument)?q.defaultView||q.parentWindow:window,F?(fe=i.relatedTarget||i.toElement,F=H,fe=fe?Oi(fe):null,fe!==null&&(Je=d(fe),we=fe.tag,fe!==Je||we!==5&&we!==27&&we!==6)&&(fe=null)):(F=null,fe=H),F!==fe)){if(we=oh,Y="onMouseLeave",_="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(we=rh,Y="onPointerLeave",_="onPointerEnter",P="pointer"),Je=F==null?q:Po(F),U=fe==null?q:Po(fe),q=new we(Y,P+"leave",F,i,V),q.target=Je,q.relatedTarget=U,Y=null,Oi(V)===H&&(we=new we(_,P+"enter",fe,i,V),we.target=U,we.relatedTarget=Je,Y=we),Je=Y,F&&fe)t:{for(we=J0,_=F,P=fe,U=0,Y=_;Y;Y=we(Y))U++;Y=0;for(var be=P;be;be=we(be))Y++;for(;0<U-Y;)_=we(_),U--;for(;0<Y-U;)P=we(P),Y--;for(;U--;){if(_===P||P!==null&&_===P.alternate){we=_;break t}_=we(_),P=we(P)}we=null}else we=null;F!==null&&Zm($,q,F,we,!1),fe!==null&&Je!==null&&Zm($,Je,fe,we,!0)}}e:{if(q=H?Po(H):window,F=q.nodeName&&q.nodeName.toLowerCase(),F==="select"||F==="input"&&q.type==="file")var Fe=mh;else if(hh(q))if(gh)Fe=u0;else{Fe=l0;var pe=r0}else F=q.nodeName,!F||F.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?H&&nc(H.elementType)&&(Fe=mh):Fe=c0;if(Fe&&(Fe=Fe(e,H))){ph($,Fe,i,V);break e}pe&&pe(e,q,H),e==="focusout"&&H&&q.type==="number"&&H.memoizedProps.value!=null&&tc(q,"number",q.value)}switch(pe=H?Po(H):window,e){case"focusin":(hh(pe)||pe.contentEditable==="true")&&(Bi=pe,gc=H,Ko=null);break;case"focusout":Ko=gc=Bi=null;break;case"mousedown":yc=!0;break;case"contextmenu":case"mouseup":case"dragend":yc=!1,Nh($,i,V);break;case"selectionchange":if(f0)break;case"keydown":case"keyup":Nh($,i,V)}var Me;if(fc)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Hi?dh(e,i)&&(Ie="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ie="onCompositionStart");Ie&&(lh&&i.locale!=="ko"&&(Hi||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Hi&&(Me=ah()):(ja=V,rc="value"in ja?ja.value:ja.textContent,Hi=!0)),pe=$r(H,Ie),0<pe.length&&(Ie=new sh(Ie,e,null,i,V),$.push({event:Ie,listeners:pe}),Me?Ie.data=Me:(Me=fh(i),Me!==null&&(Ie.data=Me)))),(Me=n0?a0(e,i):i0(e,i))&&(Ie=$r(H,"onBeforeInput"),0<Ie.length&&(pe=new sh("onBeforeInput","beforeinput",null,i,V),$.push({event:pe,listeners:Ie}),pe.data=Me)),W0($,e,H,i,V)}Qm($,t)})}function hs(e,t,i){return{instance:e,listener:t,currentTarget:i}}function $r(e,t){for(var i=t+"Capture",s=[];e!==null;){var u=e,h=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||h===null||(u=Lo(e,i),u!=null&&s.unshift(hs(e,u,h)),u=Lo(e,t),u!=null&&s.push(hs(e,u,h))),e.tag===3)return s;e=e.return}return[]}function J0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zm(e,t,i,s,u){for(var h=t._reactName,g=[];i!==null&&i!==s;){var v=i,M=v.alternate,H=v.stateNode;if(v=v.tag,M!==null&&M===s)break;v!==5&&v!==26&&v!==27||H===null||(M=H,u?(H=Lo(i,h),H!=null&&g.unshift(hs(i,H,M))):u||(H=Lo(i,h),H!=null&&g.push(hs(i,H,M)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var eC=/\r\n?/g,tC=/\u0000|\uFFFD/g;function Jm(e){return(typeof e=="string"?e:""+e).replace(eC,`
|
|
10
|
-
`).replace(tC,"")}function eg(e,t){return t=Jm(t),Jm(e)===t}function Ze(e,t,i,s,u,h){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":Zs(e,"class",s);break;case"tabIndex":Zs(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Zs(e,i,s);break;case"style":eh(e,s,h);break;case"data":if(t!=="object"){Zs(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=er(""+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 h=="function"&&(i==="formAction"?(t!=="input"&&Ze(e,t,"name",u.name,u,null),Ze(e,t,"formEncType",u.formEncType,u,null),Ze(e,t,"formMethod",u.formMethod,u,null),Ze(e,t,"formTarget",u.formTarget,u,null)):(Ze(e,t,"encType",u.encType,u,null),Ze(e,t,"method",u.method,u,null),Ze(e,t,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=er(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ea);break;case"onScroll":s!=null&&_e("scroll",e);break;case"onScrollEnd":s!=null&&_e("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=er(""+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":_e("beforetoggle",e),_e("toggle",e),Xs(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":Xs(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=Tv.get(i)||i,Xs(e,i,s))}}function Ku(e,t,i,s,u,h){switch(i){case"style":eh(e,s,h);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&&_e("scroll",e);break;case"onScrollEnd":s!=null&&_e("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(!Ff.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),t=i.slice(2,u?i.length-7:void 0),h=e[Kt]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(t,h,u),typeof s=="function")){typeof h!="function"&&h!==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,""):Xs(e,i,s)}}}function Rt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var s=!1,u=!1,h;for(h in i)if(i.hasOwnProperty(h)){var g=i[h];if(g!=null)switch(h){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,h,g,i,null)}}u&&Ze(e,t,"srcSet",i.srcSet,i,null),s&&Ze(e,t,"src",i.src,i,null);return;case"input":_e("invalid",e);var v=h=g=u=null,M=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":g=V;break;case"checked":M=V;break;case"defaultChecked":H=V;break;case"value":h=V;break;case"defaultValue":v=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:Ze(e,t,s,V,i,null)}}Qf(e,h,v,M,H,g,u,!1);return;case"select":_e("invalid",e),s=g=h=null;for(u in i)if(i.hasOwnProperty(u)&&(v=i[u],v!=null))switch(u){case"value":h=v;break;case"defaultValue":g=v;break;case"multiple":s=v;default:Ze(e,t,u,v,i,null)}t=h,i=g,e.multiple=!!s,t!=null?_i(e,!!s,t,!1):i!=null&&_i(e,!!s,i,!0);return;case"textarea":_e("invalid",e),h=u=s=null;for(g in i)if(i.hasOwnProperty(g)&&(v=i[g],v!=null))switch(g){case"value":s=v;break;case"defaultValue":u=v;break;case"children":h=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:Ze(e,t,g,v,i,null)}Zf(e,s,u,h);return;case"option":for(M in i)if(i.hasOwnProperty(M)&&(s=i[M],s!=null))switch(M){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ze(e,t,M,s,i,null)}return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(s=0;s<fs.length;s++)_e(fs[s],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in i)if(i.hasOwnProperty(H)&&(s=i[H],s!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,H,s,i,null)}return;default:if(nc(t)){for(V in i)i.hasOwnProperty(V)&&(s=i[V],s!==void 0&&Ku(e,t,V,s,i,void 0));return}}for(v in i)i.hasOwnProperty(v)&&(s=i[v],s!=null&&Ze(e,t,v,s,i,null))}function nC(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,h=null,g=null,v=null,M=null,H=null,V=null;for(F in i){var $=i[F];if(i.hasOwnProperty(F)&&$!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":M=$;default:s.hasOwnProperty(F)||Ze(e,t,F,null,s,$)}}for(var q in s){var F=s[q];if($=i[q],s.hasOwnProperty(q)&&(F!=null||$!=null))switch(q){case"type":h=F;break;case"name":u=F;break;case"checked":H=F;break;case"defaultChecked":V=F;break;case"value":g=F;break;case"defaultValue":v=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,t));break;default:F!==$&&Ze(e,t,q,F,s,$)}}ec(e,g,v,M,H,V,h,u);return;case"select":F=g=v=q=null;for(h in i)if(M=i[h],i.hasOwnProperty(h)&&M!=null)switch(h){case"value":break;case"multiple":F=M;default:s.hasOwnProperty(h)||Ze(e,t,h,null,s,M)}for(u in s)if(h=s[u],M=i[u],s.hasOwnProperty(u)&&(h!=null||M!=null))switch(u){case"value":q=h;break;case"defaultValue":v=h;break;case"multiple":g=h;default:h!==M&&Ze(e,t,u,h,s,M)}t=v,i=g,s=F,q!=null?_i(e,!!i,q,!1):!!s!=!!i&&(t!=null?_i(e,!!i,t,!0):_i(e,!!i,i?[]:"",!1));return;case"textarea":F=q=null;for(v in i)if(u=i[v],i.hasOwnProperty(v)&&u!=null&&!s.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Ze(e,t,v,null,s,u)}for(g in s)if(u=s[g],h=i[g],s.hasOwnProperty(g)&&(u!=null||h!=null))switch(g){case"value":q=u;break;case"defaultValue":F=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==h&&Ze(e,t,g,u,s,h)}Xf(e,q,F);return;case"option":for(var fe in i)if(q=i[fe],i.hasOwnProperty(fe)&&q!=null&&!s.hasOwnProperty(fe))switch(fe){case"selected":e.selected=!1;break;default:Ze(e,t,fe,null,s,q)}for(M in s)if(q=s[M],F=i[M],s.hasOwnProperty(M)&&q!==F&&(q!=null||F!=null))switch(M){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:Ze(e,t,M,q,s,F)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in i)q=i[we],i.hasOwnProperty(we)&&q!=null&&!s.hasOwnProperty(we)&&Ze(e,t,we,null,s,q);for(H in s)if(q=s[H],F=i[H],s.hasOwnProperty(H)&&q!==F&&(q!=null||F!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:Ze(e,t,H,q,s,F)}return;default:if(nc(t)){for(var Je in i)q=i[Je],i.hasOwnProperty(Je)&&q!==void 0&&!s.hasOwnProperty(Je)&&Ku(e,t,Je,void 0,s,q);for(V in s)q=s[V],F=i[V],!s.hasOwnProperty(V)||q===F||q===void 0&&F===void 0||Ku(e,t,V,q,s,F);return}}for(var _ in i)q=i[_],i.hasOwnProperty(_)&&q!=null&&!s.hasOwnProperty(_)&&Ze(e,t,_,null,s,q);for($ in s)q=s[$],F=i[$],!s.hasOwnProperty($)||q===F||q==null&&F==null||Ze(e,t,$,q,s,F)}function tg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aC(){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],h=u.transferSize,g=u.initiatorType,v=u.duration;if(h&&v&&tg(g)){for(g=0,v=u.responseEnd,s+=1;s<i.length;s++){var M=i[s],H=M.startTime;if(H>v)break;var V=M.transferSize,$=M.initiatorType;V&&tg($)&&(M=M.responseEnd,g+=V*(M<v?1:(v-H)/(M-H)))}if(--s,t+=8*(h+g)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var qu=null,Gu=null;function Wr(e){return e.nodeType===9?e:e.ownerDocument}function ng(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 ag(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 Fu(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 Vu=null;function iC(){var e=window.event;return e&&e.type==="popstate"?e===Vu?!1:(Vu=e,!0):(Vu=null,!1)}var ig=typeof setTimeout=="function"?setTimeout:void 0,oC=typeof clearTimeout=="function"?clearTimeout:void 0,og=typeof Promise=="function"?Promise:void 0,sC=typeof queueMicrotask=="function"?queueMicrotask:typeof og<"u"?function(e){return og.resolve(null).then(e).catch(rC)}:ig;function rC(e){setTimeout(function(){throw e})}function Fa(e){return e==="head"}function sg(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),mo(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")ps(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ps(i);for(var h=i.firstChild;h;){var g=h.nextSibling,v=h.nodeName;h[Oo]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=g}}else i==="body"&&ps(e.ownerDocument.body);i=u}while(i);mo(t)}function rg(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 Yu(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":Yu(i),Zl(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function lC(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[Oo])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==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(h=e.getAttribute("src"),(h!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function cC(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 lg(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 Wu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function uC(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 Qu=null;function cg(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 ug(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 dg(e,t,i){switch(t=Wr(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 ps(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zl(e)}var Nn=new Map,fg=new Set;function Qr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=Z.d;Z.d={f:dC,r:fC,D:hC,C:pC,L:mC,m:gC,X:xC,S:yC,M:bC};function dC(){var e=ga.f(),t=Br();return e||t}function fC(e){var t=Pi(e);t!==null&&t.tag===5&&t.type==="form"?Tp(t):ga.r(e)}var fo=typeof document>"u"?null:document;function hg(e,t,i){var s=fo;if(s&&typeof t=="string"&&t){var u=gn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),fg.has(u)||(fg.add(u),e={rel:e,crossOrigin:i,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),Rt(t,"link",e),jt(t),s.head.appendChild(t)))}}function hC(e){ga.D(e),hg("dns-prefetch",e,null)}function pC(e,t){ga.C(e,t),hg("preconnect",e,t)}function mC(e,t,i){ga.L(e,t,i);var s=fo;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 h=u;switch(t){case"style":h=ho(e);break;case"script":h=po(e)}Nn.has(h)||(e=x({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Nn.set(h,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(ms(h))||t==="script"&&s.querySelector(gs(h))||(t=s.createElement("link"),Rt(t,"link",e),jt(t),s.head.appendChild(t)))}}function gC(e,t){ga.m(e,t);var i=fo;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+gn(s)+'"][href="'+gn(e)+'"]',h=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=po(e)}if(!Nn.has(h)&&(e=x({rel:"modulepreload",href:e},t),Nn.set(h,e),i.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(gs(h)))return}s=i.createElement("link"),Rt(s,"link",e),jt(s),i.head.appendChild(s)}}}function yC(e,t,i){ga.S(e,t,i);var s=fo;if(s&&e){var u=Li(s).hoistableStyles,h=ho(e);t=t||"default";var g=u.get(h);if(!g){var v={loading:0,preload:null};if(g=s.querySelector(ms(h)))v.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Nn.get(h))&&Xu(e,i);var M=g=s.createElement("link");jt(M),Rt(M,"link",e),M._p=new Promise(function(H,V){M.onload=H,M.onerror=V}),M.addEventListener("load",function(){v.loading|=1}),M.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Xr(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:v},u.set(h,g)}}}function xC(e,t){ga.X(e,t);var i=fo;if(i&&e){var s=Li(i).hoistableScripts,u=po(e),h=s.get(u);h||(h=i.querySelector(gs(u)),h||(e=x({src:e,async:!0},t),(t=Nn.get(u))&&Zu(e,t),h=i.createElement("script"),jt(h),Rt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(u,h))}}function bC(e,t){ga.M(e,t);var i=fo;if(i&&e){var s=Li(i).hoistableScripts,u=po(e),h=s.get(u);h||(h=i.querySelector(gs(u)),h||(e=x({src:e,async:!0,type:"module"},t),(t=Nn.get(u))&&Zu(e,t),h=i.createElement("script"),jt(h),Rt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(u,h))}}function pg(e,t,i,s){var u=(u=ie.current)?Qr(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=ho(i.href),i=Li(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=ho(i.href);var h=Li(u).hoistableStyles,g=h.get(e);if(g||(u=u.ownerDocument||u,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,g),(h=u.querySelector(ms(e)))&&!h._p&&(g.instance=h,g.state.loading=5),Nn.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},Nn.set(e,i),h||vC(u,e,i,g.state))),t&&s===null)throw Error(r(528,""));return g}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=po(i),i=Li(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 ho(e){return'href="'+gn(e)+'"'}function ms(e){return'link[rel="stylesheet"]['+e+"]"}function mg(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function vC(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}),Rt(t,"link",i),jt(t),e.head.appendChild(t))}function po(e){return'[src="'+gn(e)+'"]'}function gs(e){return"script[async]"+e}function gg(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,jt(s),s;var u=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),jt(s),Rt(s,"style",u),Xr(s,i.precedence,e),t.instance=s;case"stylesheet":u=ho(i.href);var h=e.querySelector(ms(u));if(h)return t.state.loading|=4,t.instance=h,jt(h),h;s=mg(i),(u=Nn.get(u))&&Xu(s,u),h=(e.ownerDocument||e).createElement("link"),jt(h);var g=h;return g._p=new Promise(function(v,M){g.onload=v,g.onerror=M}),Rt(h,"link",s),t.state.loading|=4,Xr(h,i.precedence,e),t.instance=h;case"script":return h=po(i.src),(u=e.querySelector(gs(h)))?(t.instance=u,jt(u),u):(s=i,(u=Nn.get(h))&&(s=x({},i),Zu(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),jt(u),Rt(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,Xr(s,i.precedence,e));return t.instance}function Xr(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,h=u,g=0;g<s.length;g++){var v=s[g];if(v.dataset.precedence===t)h=v;else if(h!==u)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Xu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zr=null;function yg(e,t,i){if(Zr===null){var s=new Map,u=Zr=new Map;u.set(i,s)}else u=Zr,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 h=i[u];if(!(h[Oo]||h[Et]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var g=h.getAttribute(t)||"";g=e+g;var v=s.get(g);v?v.push(h):s.set(g,[h])}}return s}function xg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function CC(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 bg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function SC(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=ho(s.href),h=t.querySelector(ms(u));if(h){t=h._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jr.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=h,jt(h);return}h=t.ownerDocument||t,s=mg(s),(u=Nn.get(u))&&Xu(s,u),h=h.createElement("link"),jt(h);var g=h;g._p=new Promise(function(v,M){g.onload=v,g.onerror=M}),Rt(h,"link",s),i.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Jr.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Ju=0;function wC(e,t){return e.stylesheets&&e.count===0&&tl(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&tl(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+t);0<e.imgBytes&&Ju===0&&(Ju=62500*aC());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tl(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>Ju?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function Jr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var el=null;function tl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,el=new Map,t.forEach(NC,e),el=null,Jr.call(e))}function NC(e,t){if(!(t.state.loading&4)){var i=el.get(e);if(i)var s=i.get(null);else{i=new Map,el.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<u.length;h++){var g=u[h];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(i.set(g.dataset.precedence,g),s=g)}s&&i.set(null,s)}u=t.instance,g=u.getAttribute("data-precedence"),h=i.get(g)||s,h===s&&i.set(null,u),i.set(g,u),this.count++,s=Jr.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),h?h.parentNode.insertBefore(u,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var ys={$$typeof:A,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function kC(e,t,i,s,u,h,g,v,M){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=h,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function vg(e,t,i,s,u,h,g,v,M,H,V,$){return e=new kC(e,t,i,g,M,H,V,$,v),t=1,h===!0&&(t|=24),h=on(3,null,null,t),e.current=h,h.stateNode=e,t=Oc(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:s,isDehydrated:i,cache:t},_c(h),e}function Cg(e){return e?(e=Gi,e):Gi}function Sg(e,t,i,s,u,h){u=Cg(u),s.context===null?s.context=u:s.pendingContext=u,s=La(t),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Ra(e,s,t),i!==null&&($t(i,e,t),Wo(i,e,t))}function wg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function ed(e,t){wg(e,t),(e=e.alternate)&&wg(e,t)}function Ng(e){if(e.tag===13||e.tag===31){var t=ri(e,67108864);t!==null&&$t(t,e,67108864),ed(e,67108864)}}function kg(e){if(e.tag===13||e.tag===31){var t=un();t=Zn(t);var i=ri(e,t);i!==null&&$t(i,e,t),ed(e,t)}}var nl=!0;function AC(e,t,i,s){var u=I.T;I.T=null;var h=Z.p;try{Z.p=2,td(e,t,i,s)}finally{Z.p=h,I.T=u}}function DC(e,t,i,s){var u=I.T;I.T=null;var h=Z.p;try{Z.p=8,td(e,t,i,s)}finally{Z.p=h,I.T=u}}function td(e,t,i,s){if(nl){var u=nd(s);if(u===null)Bu(e,t,s,al,i),Dg(e,s);else if(TC(u,e,t,i,s))s.stopPropagation();else if(Dg(e,s),t&4&&-1<jC.indexOf(e)){for(;u!==null;){var h=Pi(u);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var g=ot(h.pendingLanes);if(g!==0){var v=h;for(v.pendingLanes|=2,v.entangledLanes|=2;g;){var M=1<<31-Ce(g);v.entanglements[1]|=M,g&=~M}Un(h),($e&6)===0&&(Ur=yt()+500,ds(0))}}break;case 31:case 13:v=ri(h,2),v!==null&&$t(v,h,2),Br(),ed(h,2)}if(h=nd(s),h===null&&Bu(e,t,s,al,i),h===u)break;u=h}u!==null&&s.stopPropagation()}else Bu(e,t,s,null,i)}}function nd(e){return e=ic(e),ad(e)}var al=null;function ad(e){if(al=null,e=Oi(e),e!==null){var t=d(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(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 al=e,null}function Ag(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 Wn:return 2;case ti:return 8;case Ln:case Rn:return 32;case Ti:return 268435456;default:return 32}default:return 32}}var id=!1,Va=null,Ya=null,$a=null,xs=new Map,bs=new Map,Wa=[],jC="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 Dg(e,t){switch(e){case"focusin":case"focusout":Va=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":$a=null;break;case"pointerover":case"pointerout":xs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function vs(e,t,i,s,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:h,targetContainers:[u]},t!==null&&(t=Pi(t),t!==null&&Ng(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function TC(e,t,i,s,u){switch(t){case"focusin":return Va=vs(Va,e,t,i,s,u),!0;case"dragenter":return Ya=vs(Ya,e,t,i,s,u),!0;case"mouseover":return $a=vs($a,e,t,i,s,u),!0;case"pointerover":var h=u.pointerId;return xs.set(h,vs(xs.get(h)||null,e,t,i,s,u)),!0;case"gotpointercapture":return h=u.pointerId,bs.set(h,vs(bs.get(h)||null,e,t,i,s,u)),!0}return!1}function jg(e){var t=Oi(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,Eo(e.priority,function(){kg(i)});return}}else if(t===31){if(t=p(i),t!==null){e.blockedOn=t,Eo(e.priority,function(){kg(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 il(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=nd(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ac=s,i.target.dispatchEvent(s),ac=null}else return t=Pi(i),t!==null&&Ng(t),e.blockedOn=i,!1;t.shift()}return!0}function Tg(e,t,i){il(e)&&i.delete(t)}function MC(){id=!1,Va!==null&&il(Va)&&(Va=null),Ya!==null&&il(Ya)&&(Ya=null),$a!==null&&il($a)&&($a=null),xs.forEach(Tg),bs.forEach(Tg)}function ol(e,t){e.blockedOn===t&&(e.blockedOn=null,id||(id=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,MC)))}var sl=null;function Mg(e){sl!==e&&(sl=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){sl===e&&(sl=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(ad(s||i)===null)continue;break}var h=Pi(i);h!==null&&(e.splice(t,3),t-=3,nu(h,{pending:!0,data:u,method:i.method,action:s},s,u))}}))}function mo(e){function t(M){return ol(M,e)}Va!==null&&ol(Va,e),Ya!==null&&ol(Ya,e),$a!==null&&ol($a,e),xs.forEach(t),bs.forEach(t);for(var i=0;i<Wa.length;i++){var s=Wa[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Wa.length&&(i=Wa[0],i.blockedOn===null);)jg(i),i.blockedOn===null&&Wa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var u=i[s],h=i[s+1],g=u[Kt]||null;if(typeof h=="function")g||Mg(i);else if(g){var v=null;if(h&&h.hasAttribute("formAction")){if(u=h,g=h[Kt]||null)v=g.formAction;else if(ad(u)!==null)continue}else v=g.action;typeof v=="function"?i[s+1]=v:(i.splice(s,3),s-=3),Mg(i)}}}function Eg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(g){return u=g})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.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 od(e){this._internalRoot=e}rl.prototype.render=od.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,s=un();Sg(i,s,e,t,null,null)},rl.prototype.unmount=od.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sg(e.current,2,null,e,null,null),Br(),t[Ei]=null}};function rl(e){this._internalRoot=e}rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Wa.length&&t!==0&&t<Wa[i].priority;i++);Wa.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=y(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var EC={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ll.isDisabled&&ll.supportsFiber)try{Qn=ll.inject(EC),ee=ll}catch{}}return Ss.createRoot=function(e,t){if(!c(e))throw Error(r(299));var i=!1,s="",u=Up,h=Hp,g=Bp;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&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=vg(e,1,!1,null,null,i,s,null,u,h,g,Eg),e[Ei]=t.current,Hu(e),new od(t)},Ss.hydrateRoot=function(e,t,i){if(!c(e))throw Error(r(299));var s=!1,u="",h=Up,g=Hp,v=Bp,M=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(v=i.onRecoverableError),i.formState!==void 0&&(M=i.formState)),t=vg(e,1,!0,t,i??null,s,u,M,h,g,v,Eg),t.context=Cg(null),i=t.current,s=un(),s=Zn(s),u=La(s),u.callback=null,Ra(i,u,s),i=s,t.current.lanes=i,An(t,i),Un(t),e[Ei]=t.current,Hu(e),new rl(t)},Ss.version="19.2.1",Ss}var $g;function Bw(){if($g)return sd.exports;$g=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(),sd.exports=Hw(),sd.exports}var Kw=Bw();const qw="modulepreload",Gw=function(n){return"/"+n},Wg={},nt=function(a,o,r){let c=Promise.resolve();if(o&&o.length>0){let m=function(y){return Promise.all(y.map(S=>Promise.resolve(S).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=f?.nonce||f?.getAttribute("nonce");c=m(o.map(y=>{if(y=Gw(y),y in Wg)return;Wg[y]=!0;const S=y.endsWith(".css"),x=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${x}`))return;const b=document.createElement("link");if(b.rel=S?"stylesheet":qw,S||(b.as="script"),b.crossOrigin="",b.href=y,p&&b.setAttribute("nonce",p),document.head.appendChild(b),S)return new Promise((D,N)=>{b.addEventListener("load",D),b.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${y}`)))})}))}function d(f){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=f,window.dispatchEvent(p),!p.defaultPrevented)throw f}return c.then(f=>{for(const p of f||[])p.status==="rejected"&&d(p.reason);return a().catch(d)})},Fw=new yS({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1,retry:1},mutations:{retry:!1}}}),ke=n=>typeof n=="string",ws=()=>{let n,a;const o=new Promise((r,c)=>{n=r,a=c});return o.resolve=n,o.reject=a,o},Qg=n=>n==null?"":""+n,Vw=(n,a,o)=>{n.forEach(r=>{a[r]&&(o[r]=a[r])})},Yw=/###/g,Xg=n=>n&&n.indexOf("###")>-1?n.replace(Yw,"."):n,Zg=n=>!n||ke(n),Es=(n,a,o)=>{const r=ke(a)?a.split("."):a;let c=0;for(;c<r.length-1;){if(Zg(n))return{};const d=Xg(r[c]);!n[d]&&o&&(n[d]=new o),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++c}return Zg(n)?{}:{obj:n,k:Xg(r[c])}},Jg=(n,a,o)=>{const{obj:r,k:c}=Es(n,a,Object);if(r!==void 0||a.length===1){r[c]=o;return}let d=a[a.length-1],f=a.slice(0,a.length-1),p=Es(n,f,Object);for(;p.obj===void 0&&f.length;)d=`${f[f.length-1]}.${d}`,f=f.slice(0,f.length-1),p=Es(n,f,Object),p?.obj&&typeof p.obj[`${p.k}.${d}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${d}`]=o},$w=(n,a,o,r)=>{const{obj:c,k:d}=Es(n,a,Object);c[d]=c[d]||[],c[d].push(o)},Cl=(n,a)=>{const{obj:o,k:r}=Es(n,a);if(o&&Object.prototype.hasOwnProperty.call(o,r))return o[r]},Ww=(n,a,o)=>{const r=Cl(n,o);return r!==void 0?r:Cl(a,o)},Kx=(n,a,o)=>{for(const r in a)r!=="__proto__"&&r!=="constructor"&&(r in n?ke(n[r])||n[r]instanceof String||ke(a[r])||a[r]instanceof String?o&&(n[r]=a[r]):Kx(n[r],a[r],o):n[r]=a[r]);return n},vi=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Qw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Xw=n=>ke(n)?n.replace(/[&<>"'\/]/g,a=>Qw[a]):n;class Zw{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 Jw=[" ",",","?","!",";"],eN=new Zw(20),tN=(n,a,o)=>{a=a||"",o=o||"";const r=Jw.filter(f=>a.indexOf(f)<0&&o.indexOf(f)<0);if(r.length===0)return!0;const c=eN.getRegExp(`(${r.map(f=>f==="?"?"\\?":f).join("|")})`);let d=!c.test(n);if(!d){const f=n.indexOf(o);f>0&&!c.test(n.substring(0,f))&&(d=!0)}return d},Ed=(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 f,p="";for(let m=d;m<r.length;++m)if(m!==d&&(p+=o),p+=r[m],f=c[p],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&m<r.length-1)continue;d+=m-d+1;break}c=f}return c},Hs=n=>n?.replace("_","-"),nN={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 Sl{constructor(a,o={}){this.init(a,o)}init(a,o={}){this.prefix=o.prefix||"i18next:",this.logger=a||nN,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:(ke(a[0])&&(a[0]=`${r}${this.prefix} ${a[0]}`),this.logger[o](a))}create(a){return new Sl(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new Sl(this.logger,a)}}var Kn=new Sl;class Rl{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 f=0;f<d;f++)c(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,d])=>{for(let f=0;f<d;f++)c.apply(c,[a,...o])})}}class ey extends Rl{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,f=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):ke(r)&&d?p.push(...r.split(d)):p.push(r)));const m=Cl(this.data,p);return!m&&!o&&!r&&a.indexOf(".")>-1&&(a=p[0],o=p[1],r=p.slice(2).join(".")),m||!f||!ke(r)?m:Ed(this.data?.[a]?.[o],r,d)}addResource(a,o,r,c,d={silent:!1}){const f=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let p=[a,o];r&&(p=p.concat(f?r.split(f):r)),a.indexOf(".")>-1&&(p=a.split("."),c=o,o=p[1]),this.addNamespaces(o),Jg(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)(ke(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,f={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=Cl(this.data,p)||{};f.skipCopy||(r=JSON.parse(JSON.stringify(r))),c?Kx(m,r,d):m={...m,...r},Jg(this.data,p,m),f.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 qx={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 Gx=Symbol("i18next/PATH_KEY");function aN(){const n=[],a=Object.create(null);let o;return a.get=(r,c)=>(o?.revoke?.(),c===Gx?n:(n.push(c),o=Proxy.revocable(r,a),o.proxy)),Proxy.revocable(Object.create(null),a).proxy}function Od(n,a){const{[Gx]:o}=n(aN());return o.join(a?.keySeparator??".")}const ty={},cd=n=>!ke(n)&&typeof n!="boolean"&&typeof n!="number";class wl extends Rl{constructor(a,o={}){super(),Vw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Kn.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=cd(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 f=r&&a.indexOf(r)>-1,p=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!tN(a,r,c);if(f&&!p){const m=a.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:a,namespaces:ke(d)?[d]:d};const y=a.split(r);(r!==c||r===c&&this.options.ns.indexOf(y[0])>-1)&&(d=y.shift()),a=y.join(c)}return{key:a,namespaces:ke(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,f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:p,namespaces:m}=this.extractFromKey(a[a.length-1],c),y=m[m.length-1];let S=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;S===void 0&&(S=":");const x=c.lng||this.language,b=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return b?d?{res:`${y}${S}${p}`,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(c)}:`${y}${S}${p}`:d?{res:p,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(c)}:p;const D=this.resolve(a,c);let N=D?.res;const E=D?.usedKey||p,O=D?.exactUsedKey||p,L=["[object Number]","[object Function]","[object RegExp]"],j=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,k=c.count!==void 0&&!ke(c.count),T=wl.hasDefaultValue(c),w=k?this.pluralResolver.getSuffix(x,c.count,c):"",R=c.ordinal&&k?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",B=k&&!c.ordinal&&c.count===0,z=B&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${w}`]||c[`defaultValue${R}`]||c.defaultValue;let G=N;A&&!N&&T&&(G=z);const ne=cd(G),X=Object.prototype.toString.apply(G);if(A&&G&&ne&&L.indexOf(X)<0&&!(ke(j)&&Array.isArray(G))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ye=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,G,{...c,ns:m}):`key '${p} (${this.language})' returned an object instead of string.`;return d?(D.res=ye,D.usedParams=this.getUsedParamsDetails(c),D):ye}if(f){const ye=Array.isArray(G),te=ye?[]:{},ve=ye?O:E;for(const I in G)if(Object.prototype.hasOwnProperty.call(G,I)){const Z=`${ve}${f}${I}`;T&&!N?te[I]=this.translate(Z,{...c,defaultValue:cd(z)?z[I]:void 0,joinArrays:!1,ns:m}):te[I]=this.translate(Z,{...c,joinArrays:!1,ns:m}),te[I]===Z&&(te[I]=G[I])}N=te}}else if(A&&ke(j)&&Array.isArray(N))N=N.join(j),N&&(N=this.extendTranslation(N,a,c,r));else{let ye=!1,te=!1;!this.isValidLookup(N)&&T&&(ye=!0,N=z),this.isValidLookup(N)||(te=!0,N=p);const I=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:N,Z=T&&z!==N&&this.options.updateMissing;if(te||ye||Z){if(this.logger.log(Z?"updateKey":"missingKey",x,y,p,Z?z:N),f){const ce=this.resolve(p,{...c,keySeparator:!1});ce&&ce.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ae=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let ce=0;ce<W.length;ce++)ae.push(W[ce]);else this.options.saveMissingTo==="all"?ae=this.languageUtils.toResolveHierarchy(c.lng||this.language):ae.push(c.lng||this.language);const oe=(ce,he,Q)=>{const J=T&&Q!==N?Q:I;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,y,he,J,Z,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ce,y,he,J,Z,c),this.emit("missingKey",ce,y,he,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?ae.forEach(ce=>{const he=this.pluralResolver.getSuffixes(ce,c);B&&c[`defaultValue${this.options.pluralSeparator}zero`]&&he.indexOf(`${this.options.pluralSeparator}zero`)<0&&he.push(`${this.options.pluralSeparator}zero`),he.forEach(Q=>{oe([ce],p+Q,c[`defaultValue${Q}`]||z)})}):oe(ae,p,z))}N=this.extendTranslation(N,a,c,D,r),te&&N===p&&this.options.appendNamespaceToMissingKey&&(N=`${y}${S}${p}`),(te||ye)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${y}${S}${p}`:p,ye?N:void 0,c))}return d?(D.res=N,D.usedParams=this.getUsedParamsDetails(c),D):N}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=ke(a)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(m){const x=a.match(this.interpolator.nestingRegexp);y=x&&x.length}let S=r.replace&&!ke(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(S={...this.options.interpolation.defaultVariables,...S}),a=this.interpolator.interpolate(a,S,r.lng||this.language||c.usedLng,r),m){const x=a.match(this.interpolator.nestingRegexp),b=x&&x.length;y<b&&(r.nest=!1)}!r.lng&&c&&c.res&&(r.lng=this.language||c.usedLng),r.nest!==!1&&(a=this.interpolator.nest(a,(...x)=>d?.[0]===x[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${o[0]}`),null):this.translate(...x,o),r)),r.interpolation&&this.interpolator.reset()}const f=r.postProcess||this.options.postProcess,p=ke(f)?[f]:f;return a!=null&&p?.length&&r.applyPostProcessor!==!1&&(a=qx.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,f,p;return ke(a)&&(a=[a]),a.forEach(m=>{if(this.isValidLookup(r))return;const y=this.extractFromKey(m,o),S=y.key;c=S;let x=y.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const b=o.count!==void 0&&!ke(o.count),D=b&&!o.ordinal&&o.count===0,N=o.context!==void 0&&(ke(o.context)||typeof o.context=="number")&&o.context!=="",E=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);x.forEach(O=>{this.isValidLookup(r)||(p=O,!ty[`${E[0]}-${O}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(ty[`${E[0]}-${O}`]=!0,this.logger.warn(`key "${c}" for languages "${E.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!!!")),E.forEach(L=>{if(this.isValidLookup(r))return;f=L;const j=[S];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(j,S,L,O,o);else{let k;b&&(k=this.pluralResolver.getSuffix(L,o.count,o));const T=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(o.ordinal&&k.indexOf(w)===0&&j.push(S+k.replace(w,this.options.pluralSeparator)),j.push(S+k),D&&j.push(S+T)),N){const R=`${S}${this.options.contextSeparator||"_"}${o.context}`;j.push(R),b&&(o.ordinal&&k.indexOf(w)===0&&j.push(R+k.replace(w,this.options.pluralSeparator)),j.push(R+k),D&&j.push(R+T))}}let A;for(;A=j.pop();)this.isValidLookup(r)||(d=A,r=this.getResource(L,O,A,o))}))})}),{res:r,usedKey:c,exactUsedKey:d,usedLng:f,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&&!ke(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 ny{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kn.create("languageUtils")}getScriptPartFromCode(a){if(a=Hs(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=Hs(a),!a||a.indexOf("-")<0)return a;const o=a.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(a){if(ke(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(f=>{if(f===d)return f;if(!(f.indexOf("-")<0&&d.indexOf("-")<0)&&(f.indexOf("-")>0&&d.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===d||f.indexOf(d)===0&&d.length>1))return f})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(a,o){if(!a)return[];if(typeof a=="function"&&(a=a(o)),ke(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=f=>{f&&(this.isSupportedCode(f)?c.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return ke(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))):ke(a)&&d(this.formatLanguageCode(a)),r.forEach(f=>{c.indexOf(f)<0&&d(this.formatLanguageCode(f))}),c}}const ay={zero:0,one:1,two:2,few:3,many:4,other:5},iy={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class iN{constructor(a,o={}){this.languageUtils=a,this.options=o,this.logger=Kn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(a,o={}){const r=Hs(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 f;try{f=new Intl.PluralRules(r,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),iy;if(!a.match(/-|_/))return iy;const m=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(m,o)}return this.pluralRulesCache[d]=f,f}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)=>ay[c]-ay[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 oy=(n,a,o,r=".",c=!0)=>{let d=Ww(n,a,o);return!d&&c&&ke(o)&&(d=Ed(n,o,r),d===void 0&&(d=Ed(a,o,r))),d},ud=n=>n.replace(/\$/g,"$$$$");class sy{constructor(a={}){this.logger=Kn.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:f,suffix:p,suffixEscaped:m,formatSeparator:y,unescapeSuffix:S,unescapePrefix:x,nestingPrefix:b,nestingPrefixEscaped:D,nestingSuffix:N,nestingSuffixEscaped:E,nestingOptionsSeparator:O,maxReplaces:L,alwaysFormat:j}=a.interpolation;this.escape=o!==void 0?o:Xw,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=d?vi(d):f||"{{",this.suffix=p?vi(p):m||"}}",this.formatSeparator=y||",",this.unescapePrefix=S?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":S||"",this.nestingPrefix=b?vi(b):D||vi("$t("),this.nestingSuffix=N?vi(N):E||vi(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=L||1e3,this.alwaysFormat=j!==void 0?j:!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,f,p;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},y=D=>{if(D.indexOf(this.formatSeparator)<0){const L=oy(o,m,D,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(L,void 0,r,{...c,...o,interpolationkey:D}):L}const N=D.split(this.formatSeparator),E=N.shift().trim(),O=N.join(this.formatSeparator).trim();return this.format(oy(o,m,E,this.options.keySeparator,this.options.ignoreJSONStructure),O,r,{...c,...o,interpolationkey:E})};this.resetRegExp();const S=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:D=>ud(D)},{regex:this.regexp,safeValue:D=>this.escapeValue?ud(this.escape(D)):ud(D)}].forEach(D=>{for(p=0;d=D.regex.exec(a);){const N=d[1].trim();if(f=y(N),f===void 0)if(typeof S=="function"){const O=S(a,d,c);f=ke(O)?O:""}else if(c&&Object.prototype.hasOwnProperty.call(c,N))f="";else if(x){f=d[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${a}`),f="";else!ke(f)&&!this.useRawValueToEscape&&(f=Qg(f));const E=D.safeValue(f);if(a=a.replace(d[0],E),x?(D.regex.lastIndex+=f.length,D.regex.lastIndex-=d[0].length):D.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),a}nest(a,o,r={}){let c,d,f;const p=(m,y)=>{const S=this.nestingOptionsSeparator;if(m.indexOf(S)<0)return m;const x=m.split(new RegExp(`${vi(S)}[ ]*{`));let b=`{${x[1]}`;m=x[0],b=this.interpolate(b,f);const D=b.match(/'/g),N=b.match(/"/g);((D?.length??0)%2===0&&!N||(N?.length??0)%2!==0)&&(b=b.replace(/'/g,'"'));try{f=JSON.parse(b),y&&(f={...y,...f})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,E),`${m}${S}${b}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,m};for(;c=this.nestingRegexp.exec(a);){let m=[];f={...r},f=f.replace&&!ke(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const y=/{.*}/.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(y!==-1&&(m=c[1].slice(y).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),c[1]=c[1].slice(0,y)),d=o(p.call(this,c[1].trim(),f),f),d&&c[0]===a&&!ke(d))return d;ke(d)||(d=Qg(d)),d||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${a}`),d=""),m.length&&(d=m.reduce((S,x)=>this.format(S,x,r.lng,{...r,interpolationkey:c[1].trim()}),d.trim())),a=a.replace(c[0],d),this.regexp.lastIndex=0}return a}}const oN=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(f=>{if(f){const[p,...m]=f.split(":"),y=m.join(":").trim().replace(/^'+|'+$/g,""),S=p.trim();o[S]||(o[S]=y),y==="false"&&(o[S]=!1),y==="true"&&(o[S]=!0),isNaN(y)||(o[S]=parseInt(y,10))}})}return{formatName:a,formatOptions:o}},ry=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 f=r+JSON.stringify(d);let p=a[f];return p||(p=n(Hs(r),c),a[f]=p),p(o)}},sN=n=>(a,o,r)=>n(Hs(o),r)(a);class rN{constructor(a={}){this.logger=Kn.create("formatter"),this.options=a,this.init(a)}init(a,o={interpolation:{}}){this.formatSeparator=o.interpolation.formatSeparator||",";const r=o.cacheInBuiltFormats?ry:sN;this.formats={number:r((c,d)=>{const f=new Intl.NumberFormat(c,{...d});return p=>f.format(p)}),currency:r((c,d)=>{const f=new Intl.NumberFormat(c,{...d,style:"currency"});return p=>f.format(p)}),datetime:r((c,d)=>{const f=new Intl.DateTimeFormat(c,{...d});return p=>f.format(p)}),relativetime:r((c,d)=>{const f=new Intl.RelativeTimeFormat(c,{...d});return p=>f.format(p,d.range||"day")}),list:r((c,d)=>{const f=new Intl.ListFormat(c,{...d});return p=>f.format(p)})}}add(a,o){this.formats[a.toLowerCase().trim()]=o}addCached(a,o){this.formats[a.toLowerCase().trim()]=ry(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:y,formatOptions:S}=oN(m);if(this.formats[y]){let x=p;try{const b=c?.formatParams?.[c.interpolationkey]||{},D=b.locale||b.lng||c.locale||c.lng||r;x=this.formats[y](p,D,{...S,...c,...b})}catch(b){this.logger.warn(b)}return x}else this.logger.warn(`there was no format function for ${y}`);return p},a)}}const lN=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class cN extends Rl{constructor(a,o,r,c={}){super(),this.backend=a,this.store=o,this.services=r,this.languageUtils=r.languageUtils,this.options=c,this.logger=Kn.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={},f={},p={},m={};return a.forEach(y=>{let S=!0;o.forEach(x=>{const b=`${y}|${x}`;!r.reload&&this.store.hasResourceBundle(y,x)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?f[b]===void 0&&(f[b]=!0):(this.state[b]=1,S=!1,f[b]===void 0&&(f[b]=!0),d[b]===void 0&&(d[b]=!0),m[x]===void 0&&(m[x]=!0)))}),S||(p[y]=!0)}),(Object.keys(d).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(d),pending:Object.keys(f),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(m)}}loaded(a,o,r){const c=a.split("|"),d=c[0],f=c[1];o&&this.emit("failedLoading",d,f,o),!o&&r&&this.store.addResourceBundle(d,f,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=>{$w(m.loaded,[d],f),lN(m,a),o&&m.errors.push(o),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(y=>{p[y]||(p[y]={});const S=m.loaded[y];S.length&&S.forEach(x=>{p[y][x]===void 0&&(p[y][x]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(m=>!m.done)}read(a,o,r,c=0,d=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:o,fcName:r,tried:c,wait:d,callback:f});return}this.readingCalls++;const p=(y,S)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(y&&S&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,a,o,r,c+1,d*2,f)},d);return}f(y,S)},m=this.backend[r].bind(this.backend);if(m.length===2){try{const y=m(a,o);y&&typeof y.then=="function"?y.then(S=>p(null,S)).catch(p):p(null,y)}catch(y){p(y)}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();ke(a)&&(a=this.languageUtils.toResolveHierarchy(a)),ke(o)&&(o=[o]);const d=this.queueLoad(a,o,r,c);if(!d.toLoad.length)return d.pending.length||c(),null;d.toLoad.forEach(f=>{this.loadOne(f)})}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,(f,p)=>{f&&this.logger.warn(`${o}loading namespace ${d} for language ${c} failed`,f),!f&&p&&this.logger.log(`${o}loaded namespace ${d} for language ${c}`,p),this.loaded(a,f,p)})}saveMissing(a,o,r,c,d,f={},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={...f,isUpdate:d},y=this.backend.create.bind(this.backend);if(y.length<6)try{let S;y.length===5?S=y(a,o,r,c,m):S=y(a,o,r,c),S&&typeof S.then=="function"?S.then(x=>p(null,x)).catch(p):p(null,S)}catch(S){p(S)}else y(a,o,r,c,p,m)}!a||!a[0]||this.store.addResource(a[0],o,r,c)}}}const dd=()=>({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]),ke(n[1])&&(a.defaultValue=n[1]),ke(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}),ly=n=>(ke(n.ns)&&(n.ns=[n.ns]),ke(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ke(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),ul=()=>{},uN=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(o=>{typeof n[o]=="function"&&(n[o]=n[o].bind(n))})},Fx="__i18next_supportNoticeShown",dN=()=>typeof globalThis<"u"&&!!globalThis[Fx],fN=()=>{typeof globalThis<"u"&&(globalThis[Fx]=!0)},hN=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 Os extends Rl{constructor(a={},o){if(super(),this.options=ly(a),this.services={},this.logger=Kn,this.modules={external:[]},uN(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&&(ke(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const r=dd();this.options={...r,...this.options,...ly(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&&!hN(this)&&!dN()&&(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 💙"),fN());const c=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?Kn.init(c(this.modules.logger),this.options):Kn.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=rN;const S=new ny(this.options);this.store=new ey(this.options.resources,this.options);const x=this.services;x.logger=Kn,x.resourceStore=this.store,x.languageUtils=S,x.pluralResolver=new iN(S,{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"),y&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(x.formatter=c(y),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new sy(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new cN(c(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(D,...N)=>{this.emit(D,...N)}),this.modules.languageDetector&&(x.languageDetector=c(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=c(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new wl(this.services,this.options),this.translator.on("*",(D,...N)=>{this.emit(D,...N)}),this.modules.external.forEach(D=>{D.init&&D.init(this)})}if(this.format=this.options.interpolation.format,o||(o=ul),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(y=>{this[y]=(...S)=>this.store[y](...S)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=(...S)=>(this.store[y](...S),this)});const p=ws(),m=()=>{const y=(S,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),p.resolve(x),o(S,x)};if(this.languages&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),p}loadResources(a,o=ul){let r=o;const c=ke(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=[],f=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(y=>{y!=="cimode"&&d.indexOf(y)<0&&d.push(y)})};c?f(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>f(m)),this.options.preload?.forEach?.(p=>f(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=ws();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=ul),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"&&qx.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=ws();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((...y)=>this.t(...y)),o&&o(p,(...y)=>this.t(...y))},f=p=>{!a&&!p&&this.services.languageDetector&&(p=[]);const m=ke(p)?p:p&&p[0],y=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(ke(p)?[p]:p);y&&(this.language||c(y),this.translator.language||this.translator.changeLanguage(y),this.services.languageDetector?.cacheUserLanguage?.(y)),this.loadResources(y,S=>{d(S,y)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),r}getFixedT(a,o,r){const c=(d,f,...p)=>{let m;typeof f!="object"?m=this.options.overloadTranslationOptionHandler([d,f].concat(p)):m={...f},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 y=this.options.keySeparator||".";let S;return m.keyPrefix&&Array.isArray(d)?S=d.map(x=>(typeof x=="function"&&(x=Od(x,{...this.options,...f})),`${m.keyPrefix}${y}${x}`)):(typeof d=="function"&&(d=Od(d,{...this.options,...f})),S=m.keyPrefix?`${m.keyPrefix}${y}${d}`:d),this.t(S,m)};return ke(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 f=(p,m)=>{const y=this.services.backendConnector.state[`${p}|${m}`];return y===-1||y===0||y===2};if(o.precheck){const p=o.precheck(this,f);if(p!==void 0)return p}return!!(this.hasResourceBundle(r,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(r,a)&&(!c||f(d,a)))}loadNamespaces(a,o){const r=ws();return this.options.ns?(ke(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=ws();ke(a)&&(a=[a]);const c=this.options.preload||[],d=a.filter(f=>c.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return d.length?(this.options.preload=c.concat(d),this.loadResources(f=>{r.resolve(),o&&o(f)}),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 ny(dd());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 Os(a,o);return r.createInstance=Os.createInstance,r}cloneInstance(a={},o=ul){const r=a.forkResourceStore;r&&delete a.forkResourceStore;const c={...this.options,...a,isClone:!0},d=new Os(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,y)=>(m[y]={...this.store.data[y]},m[y]=Object.keys(m[y]).reduce((S,x)=>(S[x]={...m[y][x]},S),m[y]),m),{});d.store=new ey(p,c),d.services.resourceStore=d.store}if(a.interpolation){const m={...dd().interpolation,...this.options.interpolation,...a.interpolation},y={...c,interpolation:m};d.services.interpolator=new sy(y)}return d.translator=new wl(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 Ke=Os.createInstance();Ke.createInstance;Ke.dir;Ke.init;Ke.loadResources;Ke.reloadResources;Ke.use;Ke.changeLanguage;Ke.getFixedT;Ke.t;Ke.exists;Ke.setDefaultNamespace;Ke.hasLoadedNamespace;Ke.loadNamespaces;Ke.loadLanguages;const pN=(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);ki(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},cy={},Vx=(n,a,o,r)=>{ki(o)&&cy[o]||(ki(o)&&(cy[o]=new Date),pN(n,a,o,r))},Yx=(n,a)=>()=>{if(n.isInitialized)a();else{const o=()=>{setTimeout(()=>{n.off("initialized",o)},0),a()};n.on("initialized",o)}},Pd=(n,a,o)=>{n.loadNamespaces(a,Yx(n,o))},uy=(n,a,o,r)=>{if(ki(o)&&(o=[o]),n.options.preload&&n.options.preload.indexOf(a)>-1)return Pd(n,o,r);o.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(a,Yx(n,r))},mN=(n,a,o={})=>!a.languages||!a.languages.length?(Vx(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}}),ki=n=>typeof n=="string",gN=n=>typeof n=="object"&&n!==null,yN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xN={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},bN=n=>xN[n],vN=n=>n.replace(yN,bN);let Ld={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:vN,transDefaultProps:void 0};const CN=(n={})=>{Ld={...Ld,...n}},SN=()=>Ld;let $x;const wN=n=>{$x=n},NN=()=>$x,kN={type:"3rdParty",init(n){CN(n.options.react),wN(n)}},AN=C.createContext();class DN{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(o=>{this.usedNamespaces[o]||(this.usedNamespaces[o]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var fd={exports:{}},hd={};var dy;function jN(){if(dy)return hd;dy=1;var n=$d();function a(x,b){return x===b&&(x!==0||1/x===1/b)||x!==x&&b!==b}var o=typeof Object.is=="function"?Object.is:a,r=n.useState,c=n.useEffect,d=n.useLayoutEffect,f=n.useDebugValue;function p(x,b){var D=b(),N=r({inst:{value:D,getSnapshot:b}}),E=N[0].inst,O=N[1];return d(function(){E.value=D,E.getSnapshot=b,m(E)&&O({inst:E})},[x,D,b]),c(function(){return m(E)&&O({inst:E}),x(function(){m(E)&&O({inst:E})})},[x]),f(D),D}function m(x){var b=x.getSnapshot;x=x.value;try{var D=b();return!o(x,D)}catch{return!0}}function y(x,b){return b()}var S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?y:p;return hd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:S,hd}var fy;function TN(){return fy||(fy=1,fd.exports=jN()),fd.exports}var MN=TN();const EN=(n,a)=>ki(a)?a:gN(a)&&ki(a.defaultValue)?a.defaultValue:Array.isArray(n)?n[n.length-1]:n,ON={t:EN,ready:!1},PN=()=>()=>{},Mt=(n,a={})=>{const{i18n:o}=a,{i18n:r,defaultNS:c}=C.useContext(AN)||{},d=o||r||NN();d&&!d.reportNamespaces&&(d.reportNamespaces=new DN),d||Vx(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const f=C.useMemo(()=>({...SN(),...d?.options?.react,...a}),[d,a]),{useSuspense:p,keyPrefix:m}=f,y=c||d?.options?.defaultNS,S=ki(y)?[y]:y||["translation"],x=C.useMemo(()=>S,S);d?.reportNamespaces?.addUsedNamespaces?.(x);const b=C.useRef(0),D=C.useCallback(z=>{if(!d)return PN;const{bindI18n:G,bindI18nStore:ne}=f,X=()=>{b.current+=1,z()};return G&&d.on(G,X),ne&&d.store.on(ne,X),()=>{G&&G.split(" ").forEach(ye=>d.off(ye,X)),ne&&ne.split(" ").forEach(ye=>d.store.off(ye,X))}},[d,f]),N=C.useRef(),E=C.useCallback(()=>{if(!d)return ON;const z=!!(d.isInitialized||d.initializedStoreOnce)&&x.every(ve=>mN(ve,d,f)),G=a.lng||d.language,ne=b.current,X=N.current;if(X&&X.ready===z&&X.lng===G&&X.keyPrefix===m&&X.revision===ne)return X;const te={t:d.getFixedT(G,f.nsMode==="fallback"?x:x[0],m),ready:z,lng:G,keyPrefix:m,revision:ne};return N.current=te,te},[d,x,m,f,a.lng]),[O,L]=C.useState(0),{t:j,ready:A}=MN.useSyncExternalStore(D,E,E);C.useEffect(()=>{if(d&&!A&&!p){const z=()=>L(G=>G+1);a.lng?uy(d,a.lng,x,z):Pd(d,x,z)}},[d,a.lng,x,A,p,O]);const k=d||{},T=C.useRef(null),w=C.useRef(),R=z=>{const G=Object.getOwnPropertyDescriptors(z);G.__original&&delete G.__original;const ne=Object.create(Object.getPrototypeOf(z),G);if(!Object.prototype.hasOwnProperty.call(ne,"__original"))try{Object.defineProperty(ne,"__original",{value:z,writable:!1,enumerable:!1,configurable:!1})}catch{}return ne},B=C.useMemo(()=>{const z=k,G=z?.language;let ne=z;z&&(T.current&&T.current.__original===z?w.current!==G?(ne=R(z),T.current=ne,w.current=G):ne=T.current:(ne=R(z),T.current=ne,w.current=G));const X=[j,ne,A];return X.t=j,X.i18n=ne,X.ready=A,X},[j,k,A,k.resolvedLanguage,k.language,k.languages]);if(d&&p&&!A)throw new Promise(z=>{const G=()=>z();a.lng?uy(d,a.lng,x,G):Pd(d,x,G)});return B},Wx="ccs-ui-locale",LN=["en","zh-CN","vi","ja"];function Ys(n){return n?n.toLowerCase().startsWith("ja")?"ja":n.toLowerCase().startsWith("zh")?"zh-CN":n.toLowerCase().startsWith("vi")?"vi":"en":"en"}function Qx(){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(Wx);return n?Ys(n):null}catch{return null}}function RN(){const n=Qx();return n||(typeof navigator<"u"?Ys(navigator.language):"en")}function ef(n){const a=Qx();return a||(typeof navigator<"u"?Ys(navigator.language):"en")}function _N(n){const a=Ys(n);if(typeof window<"u")try{window.localStorage.setItem(Wx,a)}catch{}return a}const zN={en:{translation:{locale:{en:"English","zh-CN":"Simplified Chinese",vi:"Vietnamese",ja:"Japanese"},layout:{languageSwitcher:"Language"},nav:{general:"General",home:"Home",analytics:"Analytics",identityAccess:"Identity & Access",apiProfiles:"API Profiles",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"Overview",controlPanel:"Control Panel",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"Accounts",allAccounts:"All Accounts",sharedData:"Shared Data",compatibleClis:"Compatible",factoryDroid:"Factory Droid",system:"System",health:"Health",settings:"Settings",openrouterTooltip:"Featured: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"Profiles",cliproxy:"CLIProxy",accounts:"Accounts",health:"Health",configurationRequired:"Configuration Required"},auth:{dashboardTitle:"CCS Dashboard",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"},componentModelSelector:{selectModel:"Select model",availableModelsCount:"Available Models ({{count}})",preview:"Preview"},searchableSelect:{searchModels:"Search models...",noResults:"No results found."},copilotSettings:{enableCopilot:"Enable Copilot",enableCopilotDesc:"Allow using GitHub Copilot subscription",basicSettings:"Basic Settings",accountType:"Account Type",accountTypeIndividual:"Individual",accountTypeBusiness:"Business",accountTypeEnterprise:"Enterprise",rateLimiting:"Rate Limiting",rateLimitSeconds:"Rate Limit (seconds)",noLimit:"No limit",waitOnRateLimit:"Wait on Rate Limit",waitOnRateLimitDesc:"Wait instead of error when limit hit",daemonSettings:"Daemon Settings",autoStartDaemon:"Auto-start Daemon",autoStartDaemonDesc:"Start copilot-api when using profile"},providerModelSelector:{selectModel:"Select model",noModelsForProvider:"No models available for this provider",broken:"BROKEN",deprecated:"DEPRECATED",paid:"PAID",freeTier:"Free Tier",paidTier:"Paid Tier",modelKnownIssues:"This model has known issues",viewIssueDetails:"View issue details",modelDeprecated:"This model is deprecated",recommended:"Recommended",allModelsCount:"All Models ({{count}})",noModelsAvailable:"No models available"},createAuthProfileDialog:{title:"Create New Account",description:"Auth profiles require Claude CLI login. Run the command below in your terminal. You can edit sync mode, group, and continuity depth later from the Accounts table.",profileName:"Profile Name",profileNamePlaceholder:"e.g., work, personal, client",invalidProfileName:"Name must start with a letter and contain only letters, numbers, dashes, or underscores.",enableSharedHistory:"Enable shared history sync with other ccs auth accounts",historySyncGroupOptional:"History Sync Group (optional)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"Leave empty to use the default shared group. Spaces are normalized to dashes.",deeperContinuity:"Advanced: deeper continuity mode",deeperContinuityHint:"Adds sync for session-env, file-history, shell-snapshots, and todos. Credentials stay isolated.",invalidContextGroup:"Group must start with a letter and use only letters, numbers, dashes, or underscores (max {{max}} chars).",command:"Command",commandFallback:"ccs auth create <name>",afterRunPrefix:"After running the command:",afterRunStep1:"Complete the Claude login in your browser",afterRunStep2:"Return here and refresh to see the new account",poolingHint:"Prefer pooled Claude OAuth routing instead? Use CLIProxy Claude pool from the Accounts page action button.",close:"Close",copied:"Copied!",copyCommand:"Copy Command"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"Other"},cliproxyOverviewComponents:{availableModels:"Available Models",noModelsAvailable:"No models available",startSessionHint:"Start a CLIProxy session to fetch available models",totalCount:"{{count}} total",availableThroughGroupedByProvider:"Models available through {{backendLabel}}, grouped by provider",moreCount:"+{{count}} more"},categorizedModelSelector:{selectModel:"Select a model",noModelsAvailable:"No models available",modelPlaceholder:"Model..."},openrouterQuickStart:{recommended:"Recommended",title:"Start with OpenRouter",description:"Access {{modelCountLabel}} models from OpenAI, Anthropic, Google, Meta and more - all through one API.",featureOneApi:"One API, all providers",featureTierMapping:"Model tier mapping",profileCount:"{{count}} profile",profileCount_other:"{{count}} profiles",selectProfileTitle:"Select an API profile",summaryDescriptionWithProfiles:"You already have {{count}} profile in this workspace. Select one from the left rail to edit it, or create another profile from here.",summaryDescriptionWithProfiles_other:"You already have {{count}} profiles in this workspace. Select one from the left rail to edit it, or create another profile from here.",summaryDescriptionNoProfiles:"Use API Profiles for Anthropic-compatible endpoints. Use AI Providers for Gemini, Codex, Claude, Vertex, and OpenAI-compatible connectors.",openrouterModelsBadge:"{{modelCountLabel}} OpenRouter models",runtimeProviderBadge:"Runtime provider setup",runtimeProviderTitle:"Open AI Providers",runtimeProviderDescription:"Manage shared provider keys and runtime connectors before creating standalone API Profiles.",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",or:"or",createCustomProfile:"Create Custom API Profile"},alibabaCodingPlanQuickStart:{recommended:"Recommended",title:"Try Alibaba Coding Plan",description:"Use Alibaba Cloud Coding Plan through an Anthropic-compatible endpoint for coding workloads.",featureEndpoint:"Anthropic-compatible endpoint",featureKeyFormat:"Dedicated sk-sp API keys",createAlibabaProfile:"Create Alibaba Coding Plan Profile",readGuideAt:"Read setup guide at"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Model Studio Coding Plan via Anthropic endpoint",add:"Add"},credentialHealth:{title:"Credential Health",ready:"Ready",noCredentialsConfigured:"No credentials configured. Use the login buttons above to authenticate.",neverUsed:"Never used",justNow:"Just now",unknown:"Unknown",daysAgo:"{{count}}d ago",hoursAgo:"{{count}}h ago",minutesAgo:"{{count}}m ago"},proxyStatusWidget:{justNow:"just now",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",syncReady:"Sync Ready",noConfig:"No Config",remoteProxy:"Remote Proxy",active:"Active",trafficAutoRouted:"Traffic auto-routed to remote server",tooltipSync:"Sync profiles to CLIProxy",tooltipRestart:"Restart",tooltipStop:"Stop",tooltipClose:"Close",tooltipVersionSettings:"Version settings",versionManagement:"Version Management",selectVersionPlaceholder:"Select version to install...",stable:"(stable)",install:"Install",versionsAboveUnstable:"Versions above {{version}} have known issues",versionsKnownIssues:"Version {{version}} has known issues",lastChecked:"Last checked {{time}}",notRunning:"Not running",start:"Start",port:"Port {{port}}",sessionCount:"{{count}} session",sessionCount_other:"{{count}} sessions",installFaultyTitle:"Install Version With Known Issues?",installFaultyDesc:"You are about to install <strong>v{{version}}</strong>, which falls inside the known faulty range <strong>{{range}}</strong>.",installFaultyWarning:"This version has known bugs and may fail or leave the proxy in a bad state.",installUnstableTitle:"Install Unstable Version?",installUnstableDesc:"You are about to install <strong>v{{version}}</strong>, which is above the maximum stable version <strong>v{{maxStable}}</strong>.",installUnstableWarning:"This version has known stability issues and may cause unexpected behavior.",installUnstableConfirm:"Are you sure you want to proceed?",cancel:"Cancel",installAnyway:"Install Anyway",clickToDowngrade:"Click to downgrade",clickToUpdate:"Click to update"},syncStatusCard:{profileSync:"Profile Sync",ready:"Ready",noConfig:"No Config",syncsProfilesDesc:"Syncs API profiles to local CLIProxy config",runDoctorHint:"Run <code>ccs doctor --fix</code> to generate config.",details:"Details",syncNow:"Sync Now"},syncDialog:{title:"Sync Profiles to Local CLIProxy",description:"Sync your CCS API profiles to the local CLIProxy config.yaml.",noProfiles:"No profiles configured to sync.",createProfilesFirst:"Create API profiles first using the Profiles tab.",modelLabel:"Model:",ready:"Ready",profilesToSync_one:"{{count}} profile to sync",profilesToSync_other:"{{count}} profiles to sync",cancel:"Cancel",syncing:"Syncing...",synced:"Synced!",syncNow:"Sync Now"},errorLogs:{title:"Error Logs",failedRequests_one:"{{count}} failed request",failedRequests_other:"{{count}} failed requests",cliproxyDiagnostics:"CLIProxy Diagnostics",showingCount:"Showing 50 of {{total}} logs",selectLog:"Select a log to view details",failedLoadContent:"Failed to load log content",copyAbsolutePath:"Copy absolute path",copyRawContent:"Copy raw log content",tabOverview:"Overview",tabHeaders:"Headers",tabRequest:"Request",tabResponse:"Response",tabRaw:"Raw",modelLabel:"Model:",quotaResetsIn:"Quota resets in ",method:"Method",provider:"Provider",version:"Version",endpoint:"Endpoint",url:"URL",timestamp:"Timestamp",na:"N/A",noHeaders:"No headers available",noRequestBody:"No request body",noResponseBody:"No response body",rateLimitedMsg:"Rate Limited. Switch to a different account or wait for quota reset. Model {{model}} has exhausted quota.",rateLimitedMsgNoModel:"Rate Limited. Switch to a different account or wait for quota reset.",authFailedMsg:"Authentication failed. Re-authenticate via CLIProxy Settings or check API key.",notFoundMsg:"Endpoint not found. This endpoint may not exist on this provider.",serverErrorMsg:"Server error from upstream. Retry later or check provider status page.",timeoutMsg:"Request timed out. Check network connection or increase timeout settings.",unknown:"unknown"},editAccountContext:{title:"Edit History Sync",description:'Configure how "{{name}}" shares history and continuity with other ccs auth accounts.',syncMode:"Sync Mode",selectContextMode:"Select context mode",isolatedOption:"Isolated",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",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",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:"API Profiles",new:"New",searchPlaceholder:"Search profiles...",loadingProfiles:"Loading profiles...",failedLoadTitle:"Failed to load profiles",failedLoadDesc:"Unable to fetch API profiles. Please try again.",retry:"Retry",noProfilesYet:"No API profiles yet",noProfilesDesc:"Create your first profile to connect to custom API endpoints",createProfile:"Create Profile",noProfileMatch:'No profiles match "{{query}}"',profileCount:"{{count}} profile",profileCount_other:"{{count}} profiles",configuredCount:"{{count}} configured",deleteProfileTitle:"Delete Profile",deleteProfileDesc:'Are you sure you want to delete "{{name}}"? This will remove the settings file and cannot be undone.',delete:"Delete",unsavedChangesTitle:"Unsaved Changes",unsavedChangesDesc:'You have unsaved changes in "{{current}}". Discard and switch to "{{next}}"?',discardSwitch:"Discard and Switch"},accountsPage:{title:"Accounts",managePrefix:"Manage",manageSuffix:"accounts and pool onboarding from one panel.",mobileManageSuffix:"continuity per account.",primaryActions:"Primary Actions",createAccount:"Create Account",authClaudeInPool:"Authenticate Claude in Pool",openClaudePoolSettings:"Open Claude Pool Settings",openCliProxyClaudePool:"Open CLIProxy Claude Pool",migrationFollowup:"Migration Follow-up",legacyContextPending:"{{count}} account still needs first-time mode confirmation.",legacyContextPending_other:"{{count}} accounts still need first-time mode confirmation.",legacyContinuityPending:"{{count}} shared account remains on standard legacy continuity depth.",legacyContinuityPending_other:"{{count}} shared accounts remain on standard legacy continuity depth.",confirmingLegacy:"Confirming Legacy Policies...",confirmLegacy:"Confirm Legacy Policies ({{count}})",noLegacyFollowup:"No legacy follow-up pending.",continuityGuide:"Continuity Guide",expandWhenNeeded:"Expand only when needed.",sharedStandard:"Shared Standard",sharedStandardDesc:"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"},droidPage:{loadingDiagnostics:"Loading Droid diagnostics...",failedDiagnostics:"Failed to load Droid diagnostics.",overview:"Overview",byok:"BYOK",docs:"Docs",runtimeInstall:"Runtime and Installation",status:"Status",detected:"Detected",notFound:"Not Found",detectionSource:"Detection source",binaryPath:"Binary path",installDirectory:"Install directory",version:"Version",overridePath:"Override (CCS_DROID_PATH)",configFiles:"Config Files",path:"Path",resolved:"Resolved",size:"Size",lastModified:"Last modified",parseWarning:"Parse warning: {{value}}",readWarning:"Read warning: {{value}}",warnings:"Warnings",byokSummary:"BYOK Summary",activeModelSelector:"Active model selector",customModels:"Custom models",ccsManaged:"CCS-managed",userManaged:"User-managed",malformedEntries:"Malformed entries",providers:"Providers",none:"none",customModelsTitle:"Custom Models",modelName:"Name / Model",provider:"Provider",baseUrl:"Base URL",noCustomModels:"No custom models",docsAlignedNotes:"Docs-Aligned Notes",factoryDocs:"Factory Docs",providerFactCheckDocs:"Provider Fact-Check Docs",providerValues:"Provider values: {{value}}",settingsHierarchy:"Settings hierarchy: {{value}}",settingsTitle:"Droid BYOK Settings",fixJsonBeforeQuickSettings:"Fix JSON syntax before using quick settings controls.",fixJsonBeforeReasoning:"Fix JSON syntax before updating BYOK reasoning settings.",unableUpdateReasoning:"Unable to update selected BYOK model reasoning setting.",fixJsonBeforeBudget:"Fix JSON syntax before updating thinking budget.",anthropicOnlyBudget:"Thinking budget is only available for Anthropic BYOK models.",invalidJson:"Invalid JSON: {{value}}",saved:"Droid settings saved",changedExternally:"Droid settings changed externally. Refresh and retry.",failedSave:"Failed to save Droid settings"},sharedPage:{commands:"Commands",skills:"Skills",agents:"Agents",title:"Shared Data",subtitle:"Commands, skills, and agents shared across Claude instances",totalShared:"Total Shared",visible:"Visible",markdownDetail:"Markdown detail view",filterPrefix:"Filter:",configurationRequired:"Configuration Required",countsUnavailable:"Counts unavailable",retryCounts:"Retry counts",filterPlaceholder:"Filter {{tab}} by name, description, or path",showing:"Showing {{visible}} of {{total}} {{tab}}",showingQuery:' for "{{query}}"',refreshing:" (refreshing...)",loadingShared:"Loading shared {{tab}}...",failedLoadShared:"Failed to load shared {{tab}}",retry:"Retry",noSharedFound:"No shared {{tab}} found. Run `ccs sync` or add items in your shared directory.",noMatch:'No {{tab}} match "{{query}}".',selectOne:"Select a {{tab}} to view full content.",pathLabel:"Path",resolvedSource:"Resolved Source",loadingMarkdown:"Loading markdown content...",failedLoadContent:"Failed to load content",retryContent:"Retry content",noMarkdown:"No markdown content available."}}},"zh-CN":{translation:{locale:{en:"English","zh-CN":"简体中文",vi:"越南语",ja:"日语"},layout:{languageSwitcher:"语言"},nav:{general:"通用",home:"首页",analytics:"分析",identityAccess:"身份与访问",apiProfiles:"API 配置",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"概览",controlPanel:"控制面板",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"账号",allAccounts:"全部账号",sharedData:"共享数据",compatibleClis:"兼容",factoryDroid:"Factory Droid",system:"系统",health:"健康",settings:"设置",openrouterTooltip:"精选:OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"配置",cliproxy:"CLIProxy",accounts:"账号",health:"健康",configurationRequired:"需要配置"},auth:{dashboardTitle:"CCS 控制台",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:"应用预设"},componentModelSelector:{selectModel:"选择模型",availableModelsCount:"可用模型({{count}})",preview:"预览"},searchableSelect:{searchModels:"搜索模型...",noResults:"未找到匹配结果。"},copilotSettings:{enableCopilot:"启用 Copilot",enableCopilotDesc:"允许使用 GitHub Copilot 订阅",basicSettings:"基础设置",accountType:"账户类型",accountTypeIndividual:"个人",accountTypeBusiness:"企业",accountTypeEnterprise:"组织",rateLimiting:"速率限制",rateLimitSeconds:"速率限制(秒)",noLimit:"不限制",waitOnRateLimit:"触发限速时等待",waitOnRateLimitDesc:"达到限制时等待而不是报错",daemonSettings:"守护进程设置",autoStartDaemon:"自动启动守护进程",autoStartDaemonDesc:"使用配置时自动启动 copilot-api"},providerModelSelector:{selectModel:"选择模型",noModelsForProvider:"该提供商暂无可用模型",broken:"故障",deprecated:"已弃用",paid:"付费",freeTier:"免费档",paidTier:"付费档",modelKnownIssues:"该模型存在已知问题",viewIssueDetails:"查看问题详情",modelDeprecated:"该模型已弃用",recommended:"推荐",allModelsCount:"全部模型({{count}})",noModelsAvailable:"暂无可用模型"},createAuthProfileDialog:{title:"创建新账号",description:"Auth 配置需要先完成 Claude CLI 登录。请在终端执行下方命令。稍后你仍可在 Accounts 表中编辑同步模式、分组与连续性深度。",profileName:"配置名称",profileNamePlaceholder:"例如:work、personal、client",invalidProfileName:"名称必须以字母开头,且只能包含字母、数字、短横线或下划线。",enableSharedHistory:"与其他 ccs auth 账号启用共享历史同步",historySyncGroupOptional:"历史同步分组(可选)",historySyncGroupPlaceholder:"default、sprint-a、client-x",historySyncGroupHint:"留空将使用默认共享分组。空格会自动规范为短横线。",deeperContinuity:"高级:更深连续性模式",deeperContinuityHint:"会同步 session-env、file-history、shell-snapshots 与 todos。凭据仍保持隔离。",invalidContextGroup:"分组必须以字母开头,且只能包含字母、数字、短横线或下划线(最多 {{max}} 个字符)。",command:"命令",commandFallback:"ccs auth create <name>",afterRunPrefix:"执行命令后:",afterRunStep1:"在浏览器中完成 Claude 登录",afterRunStep2:"返回此处并刷新,即可看到新账号",poolingHint:"如果更倾向于共享池化 Claude OAuth 路由,可在 Accounts 页面操作按钮中使用 CLIProxy Claude pool。",close:"关闭",copied:"已复制!",copyCommand:"复制命令"},cliproxyModelCategory:{google:"Google(Gemini)",openai:"OpenAI(GPT)",anthropic:"Anthropic(Claude)",antigravity:"Antigravity",other:"其他"},cliproxyOverviewComponents:{availableModels:"可用模型",noModelsAvailable:"暂无可用模型",startSessionHint:"启动 CLIProxy 会话后即可拉取可用模型",totalCount:"共 {{count}} 个",availableThroughGroupedByProvider:"通过 {{backendLabel}} 提供的模型,按提供商分组",moreCount:"另外 {{count}} 个"},categorizedModelSelector:{selectModel:"选择模型",noModelsAvailable:"暂无可用模型",modelPlaceholder:"模型..."},openrouterQuickStart:{recommended:"推荐",title:"从 OpenRouter 开始",description:"通过一个 API 即可访问来自 OpenAI、Anthropic、Google、Meta 等的 {{modelCountLabel}} 个模型。",featureOneApi:"一个 API,接入全部提供商",featureTierMapping:"模型档位映射",profileCount:"{{count}} 个 API 配置",profileCount_other:"{{count}} 个 API 配置",selectProfileTitle:"选择一个 API 配置",summaryDescriptionWithProfiles:"此工作区中已存在 {{count}} 个 API 配置。请从左侧栏选择一个进行编辑,或在此继续创建新的配置。",summaryDescriptionWithProfiles_other:"此工作区中已存在 {{count}} 个 API 配置。请从左侧栏选择一个进行编辑,或在此继续创建新的配置。",summaryDescriptionNoProfiles:"API 配置适用于 Anthropic 兼容端点。AI Providers 适用于 Gemini、Codex、Claude、Vertex 以及 OpenAI 兼容连接器。",openrouterModelsBadge:"{{modelCountLabel}} 个 OpenRouter 模型",runtimeProviderBadge:"运行时提供商设置",runtimeProviderTitle:"打开 AI Providers",runtimeProviderDescription:"先管理共享的提供商密钥和运行时连接器,再创建独立的 API 配置。",runtimeProviderFeatureConnectors:"Gemini、Codex、Claude、Vertex 以及 OpenAI 兼容连接器",runtimeProviderFeatureSecrets:"共享密钥与单个 API 配置分离存放",runtimeProviderFooter:"当多个配置需要共享同一提供商设置时最适合使用。",createOpenRouterProfile:"创建 OpenRouter 配置",getApiKeyAt:"在此获取 API Key:",or:"或",createCustomProfile:"创建自定义 API 配置"},alibabaCodingPlanQuickStart:{recommended:"推荐",title:"试用阿里云 Coding Plan",description:"通过 Anthropic 兼容端点接入阿里云 Model Studio Coding Plan。",featureEndpoint:"Anthropic 兼容端点",featureKeyFormat:"专用 sk-sp API Key",createAlibabaProfile:"创建 Alibaba Coding Plan 配置",readGuideAt:"查看配置文档:"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"通过 Anthropic 端点接入 Model Studio Coding Plan",add:"添加"},credentialHealth:{title:"凭据健康状态",ready:"就绪",noCredentialsConfigured:"尚未配置凭据。请使用上方登录按钮完成认证。",neverUsed:"从未使用",justNow:"刚刚",unknown:"未知",daysAgo:"{{count}} 天前",hoursAgo:"{{count}} 小时前",minutesAgo:"{{count}} 分钟前"},proxyStatusWidget:{justNow:"刚刚",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",syncReady:"同步就绪",noConfig:"未配置",remoteProxy:"远程代理",active:"已连接",trafficAutoRouted:"流量已自动转发到远程服务器",tooltipSync:"同步配置到 CLIProxy",tooltipRestart:"重启",tooltipStop:"停止",tooltipClose:"关闭",tooltipVersionSettings:"版本设置",versionManagement:"版本管理",selectVersionPlaceholder:"选择要安装的版本...",stable:"(稳定版)",install:"安装",versionsAboveUnstable:"高于 {{version}} 的版本存在已知问题",versionsKnownIssues:"版本 {{version}} 存在已知问题",lastChecked:"上次检查 {{time}}",notRunning:"未运行",start:"启动",port:"端口 {{port}}",sessionCount:"{{count}} 个会话",sessionCount_other:"{{count}} 个会话",installFaultyTitle:"安装存在已知问题的版本?",installFaultyDesc:"即将安装 <strong>v{{version}}</strong>,该版本位于已知故障范围 <strong>{{range}}</strong> 内。",installFaultyWarning:"该版本存在已知缺陷,可能安装失败或让代理处于异常状态。",installUnstableTitle:"安装非稳定版本?",installUnstableDesc:"即将安装 <strong>v{{version}}</strong>,该版本高于当前最大稳定版 <strong>v{{maxStable}}</strong>。",installUnstableWarning:"该版本存在已知稳定性问题,可能导致异常行为。",installUnstableConfirm:"确定要继续吗?",cancel:"取消",installAnyway:"仍要安装",clickToDowngrade:"点击降级",clickToUpdate:"点击更新"},syncStatusCard:{profileSync:"配置同步",ready:"就绪",noConfig:"未配置",syncsProfilesDesc:"将 API 配置同步到本地 CLIProxy 配置",runDoctorHint:"运行 <code>ccs doctor --fix</code> 生成配置。",details:"详情",syncNow:"立即同步"},syncDialog:{title:"同步配置到本地 CLIProxy",description:"将 CCS API 配置同步到本地 CLIProxy 的 config.yaml。",noProfiles:"没有可同步的配置。",createProfilesFirst:"请先在「配置」页创建 API 配置。",modelLabel:"模型:",ready:"就绪",profilesToSync_one:"{{count}} 个配置待同步",profilesToSync_other:"{{count}} 个配置待同步",cancel:"取消",syncing:"同步中...",synced:"已同步!",syncNow:"立即同步"},errorLogs:{title:"错误日志",failedRequests_one:"{{count}} 个失败请求",failedRequests_other:"{{count}} 个失败请求",cliproxyDiagnostics:"CLIProxy 诊断",showingCount:"显示 50 / {{total}} 条",selectLog:"选择一条日志查看详情",failedLoadContent:"加载日志内容失败",copyAbsolutePath:"复制绝对路径",copyRawContent:"复制原始日志",tabOverview:"概览",tabHeaders:"请求头",tabRequest:"请求体",tabResponse:"响应体",tabRaw:"原始",modelLabel:"模型:",quotaResetsIn:"配额重置于 ",method:"方法",provider:"提供商",version:"版本",endpoint:"端点",url:"URL",timestamp:"时间戳",na:"无",noHeaders:"无请求头",noRequestBody:"无请求体内容",noResponseBody:"无响应体内容",rateLimitedMsg:"触发限速。请切换账号或等待配额重置。模型 {{model}} 配额已用尽。",rateLimitedMsgNoModel:"触发限速。请切换账号或等待配额重置。",authFailedMsg:"认证失败。请通过 CLIProxy 设置重新认证或检查 API Key。",notFoundMsg:"端点未找到,该提供商可能不存在此端点。",serverErrorMsg:"上游服务器错误。请稍后重试或查看提供商状态页。",timeoutMsg:"请求超时。请检查网络或增大超时设置。",unknown:"未知"},editAccountContext:{title:"编辑历史同步",description:"配置「{{name}}」与其他 ccs auth 账号共享历史与连续性的方式。",syncMode:"同步模式",selectContextMode:"选择同步模式",isolatedOption:"隔离(不同步)",sharedOption:"共享(启用同步)",sharedModeHint:"共享模式会为同一历史同步分组内的账号复用工作区上下文。",isolatedModeHint:"隔离模式使该账号与其他 ccs auth 账号完全独立。",historySyncGroup:"历史同步分组",groupPlaceholder:"default",groupHint:"会规范为小写(空格变为短横线)。允许:字母、数字、_、-(最多 {{max}} 字符)。",invalidGroup:"请输入以字母开头的有效分组名。",continuityDepth:"连续性深度",selectContinuityDepth:"选择连续性深度",standardOption:"标准(仅项目)",deeperOption:"更深连续性(高级)",deeperHint:"高级模式还会同步 session-env、file-history、shell-snapshots 和 todos。",standardHint:"标准模式仅同步项目工作区上下文。",credentialsIsolated:"凭据与 .anthropic 在所有模式下均按账号隔离。",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:"隐藏详情",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:"网页",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 配置已保存"},droidPage:{loadingDiagnostics:"加载 Droid 诊断中...",failedDiagnostics:"加载 Droid 诊断失败。",overview:"概览",byok:"BYOK",docs:"文档",runtimeInstall:"运行时与安装",status:"状态",detected:"已检测",notFound:"未找到",detectionSource:"检测来源",binaryPath:"二进制路径",installDirectory:"安装目录",version:"版本",overridePath:"覆盖路径(CCS_DROID_PATH)",configFiles:"配置文件",path:"路径",resolved:"解析结果",size:"大小",lastModified:"最后修改",parseWarning:"解析告警:{{value}}",readWarning:"读取告警:{{value}}",warnings:"告警",byokSummary:"BYOK 概览",activeModelSelector:"当前模型选择器",customModels:"自定义模型",ccsManaged:"CCS 管理",userManaged:"用户管理",malformedEntries:"异常条目",providers:"提供商",none:"无",customModelsTitle:"自定义模型",modelName:"名称 / 模型",provider:"提供商",baseUrl:"Base URL",noCustomModels:"没有自定义模型",docsAlignedNotes:"文档对齐说明",factoryDocs:"Factory 文档",providerFactCheckDocs:"Provider 校验文档",providerValues:"Provider 值:{{value}}",settingsHierarchy:"Settings 层级:{{value}}",settingsTitle:"Droid BYOK 设置",fixJsonBeforeQuickSettings:"请先修复 JSON 语法,再使用快速设置。",fixJsonBeforeReasoning:"请先修复 JSON 语法,再更新 BYOK 推理设置。",unableUpdateReasoning:"无法更新所选 BYOK 模型的推理设置。",fixJsonBeforeBudget:"请先修复 JSON 语法,再更新思考预算。",anthropicOnlyBudget:"思考预算仅适用于 Anthropic BYOK 模型。",invalidJson:"JSON 无效:{{value}}",saved:"Droid 设置已保存",changedExternally:"Droid 设置已被外部修改,请刷新后重试。",failedSave:"保存 Droid 设置失败"},sharedPage:{commands:"命令",skills:"技能",agents:"代理",title:"共享数据",subtitle:"在 Claude 实例间共享的命令、技能和代理",totalShared:"共享总数",visible:"可见",markdownDetail:"Markdown 详情视图",filterPrefix:"筛选:",configurationRequired:"需要配置",countsUnavailable:"统计不可用",retryCounts:"重试统计",filterPlaceholder:"按名称、描述或路径筛选 {{tab}}",showing:"显示 {{visible}} / {{total}} 个{{tab}}",showingQuery:"(关键字“{{query}}”)",refreshing:"(刷新中...)",loadingShared:"正在加载共享{{tab}}...",failedLoadShared:"加载共享{{tab}}失败",retry:"重试",noSharedFound:"未找到共享{{tab}}。请运行 `ccs sync` 或在共享目录添加内容。",noMatch:"没有匹配“{{query}}”的{{tab}}。",selectOne:"选择一个{{tab}}查看完整内容。",pathLabel:"路径",resolvedSource:"解析后来源",loadingMarkdown:"正在加载 Markdown 内容...",failedLoadContent:"加载内容失败",retryContent:"重试内容加载",noMarkdown:"暂无 Markdown 内容。"}}},vi:{translation:{locale:{en:"Tiếng Anh","zh-CN":"Tiếng Trung giản thể",vi:"Tiếng Việt",ja:"Tiếng Nhật"},layout:{languageSwitcher:"Ngôn ngữ"},nav:{general:"Chung",home:"Trang chủ",analytics:"Phân tích",identityAccess:"Nhận dạng & Quyền truy cập",apiProfiles:"Hồ sơ API",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"Tổng quan",controlPanel:"Bảng điều khiển",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"Tài khoản",allAccounts:"Tất cả tài khoản",sharedData:"Dữ liệu dùng chung",compatibleClis:"Tương thích",factoryDroid:"Factory Droid",system:"Hệ thống",health:"Sức khỏe",settings:"Cài đặt",openrouterTooltip:"Nổi bật: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"Hồ sơ",cliproxy:"CLIProxy",accounts:"Tài khoản",health:"Sức khỏe",configurationRequired:"Cần cấu hình"},auth:{dashboardTitle:"Bảng điều khiển CCS",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"},componentModelSelector:{selectModel:"Chọn mô hình",availableModelsCount:"Mô hình khả dụng ({{count}})",preview:"Xem trước"},searchableSelect:{searchModels:"Tìm mô hình...",noResults:"Không tìm thấy kết quả phù hợp."},copilotSettings:{enableCopilot:"Bật Copilot",enableCopilotDesc:"Cho phép sử dụng đăng ký GitHub Copilot",basicSettings:"Cài đặt cơ bản",accountType:"Loại tài khoản",accountTypeIndividual:"Cá nhân",accountTypeBusiness:"Business",accountTypeEnterprise:"Enterprise",rateLimiting:"Giới hạn tỷ lệ",rateLimitSeconds:"Giới hạn tốc độ (giây)",noLimit:"Không giới hạn",waitOnRateLimit:"Chờ giới hạn tỷ lệ",waitOnRateLimitDesc:"Chờ thay vì lỗi khi đạt đến giới hạn",daemonSettings:"Cài đặt Daemon",autoStartDaemon:"Daemon tự động khởi động",autoStartDaemonDesc:"Bắt đầu copilot-api khi sử dụng hồ sơ"},providerModelSelector:{selectModel:"Chọn mô hình",noModelsForProvider:"Không có mô hình nào cho nhà cung cấp này",broken:"BROKEN",deprecated:"DEPRECATED",paid:"PAID",freeTier:"Gói miễn phí",paidTier:"Gói trả phí",modelKnownIssues:"Mô hình này có vấn đề đã biết",viewIssueDetails:"Xem chi tiết vấn đề",modelDeprecated:"Mô hình này không được dùng nữa",recommended:"Đề xuất",allModelsCount:"Tất cả mô hình ({{count}})",noModelsAvailable:"Không có mô hình khả dụng"},createAuthProfileDialog:{title:"Tạo tài khoản mới",description:"Hồ sơ xác thực yêu cầu đăng nhập Claude CLI. Chạy lệnh dưới đây trong terminal của bạn. Bạn có thể chỉnh sửa chế độ đồng bộ hóa, nhóm và độ liên tục sau này từ bảng Tài khoản.",profileName:"Tên hồ sơ",profileNamePlaceholder:"ví dụ: công việc, cá nhân, khách hàng",invalidProfileName:"Tên phải bắt đầu bằng một chữ cái và chỉ chứa các chữ cái, số, dấu gạch ngang hoặc dấu gạch dưới.",enableSharedHistory:"Bật đồng bộ hóa lịch sử chia sẻ với các tài khoản xác thực ccs khác",historySyncGroupOptional:"Nhóm đồng bộ hóa lịch sử (tùy chọn)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"Để trống để sử dụng nhóm chia sẻ mặc định. Dấu cách được chuẩn hóa thành dấu gạch ngang.",deeperContinuity:"Nâng cao: chế độ liên tục sâu hơn",deeperContinuityHint:"Thêm đồng bộ cho session-env, file-history, shell-snapshots và todos. Thông tin xác thực vẫn tách biệt.",invalidContextGroup:"Nhóm phải bắt đầu bằng một chữ cái và chỉ sử dụng các chữ cái, số, dấu gạch ngang hoặc dấu gạch dưới (tối đa {{max}} ký tự).",command:"Lệnh",commandFallback:"ccs auth create <name>",afterRunPrefix:"Sau khi chạy lệnh:",afterRunStep1:"Hoàn tất đăng nhập Claude trong trình duyệt của bạn",afterRunStep2:"Quay lại đây và làm mới để xem tài khoản mới",poolingHint:"Muốn dùng định tuyến Claude OAuth dạng pool? Dùng CLIProxy Claude pool từ nút hành động ở trang Tài khoản.",close:"Đóng",copied:"Đã sao chép!",copyCommand:"Sao chép lệnh"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"Khác"},cliproxyOverviewComponents:{availableModels:"Mô hình khả dụng",noModelsAvailable:"Không có mô hình khả dụng",startSessionHint:"Bắt đầu phiên CLIProxy để tải danh sách mô hình khả dụng",totalCount:"tổng cộng {{count}}",availableThroughGroupedByProvider:"Các mô hình khả dụng qua {{backendLabel}}, được nhóm theo nhà cung cấp",moreCount:"+{{count}} thêm"},categorizedModelSelector:{selectModel:"Chọn mô hình",noModelsAvailable:"Không có mô hình khả dụng",modelPlaceholder:"Mô hình..."},openrouterQuickStart:{recommended:"Đề xuất",title:"Bắt đầu với OpenRouter",description:"Truy cập các mô hình {{modelCountLabel}} từ OpenAI, Anthropic, Google, Meta, v.v. - tất cả đều thông qua một API.",featureOneApi:"Một API cho mọi nhà cung cấp",featureTierMapping:"Ánh xạ tầng mô hình",profileCount:"{{count}} hồ sơ",profileCount_other:"{{count}} hồ sơ",selectProfileTitle:"Chọn một hồ sơ API",summaryDescriptionWithProfiles:"Bạn đã có {{count}} hồ sơ trong workspace này. Chọn một hồ sơ ở thanh bên trái để chỉnh sửa, hoặc tạo thêm hồ sơ mới tại đây.",summaryDescriptionWithProfiles_other:"Bạn đã có {{count}} hồ sơ trong workspace này. Chọn một hồ sơ ở thanh bên trái để chỉnh sửa, hoặc tạo thêm hồ sơ mới tại đây.",summaryDescriptionNoProfiles:"Dùng API Profiles cho các endpoint tương thích Anthropic. Dùng AI Providers cho Gemini, Codex, Claude, Vertex và các connector tương thích OpenAI.",openrouterModelsBadge:"{{modelCountLabel}} mô hình OpenRouter",runtimeProviderBadge:"Thiết lập nhà cung cấp runtime",runtimeProviderTitle:"Mở AI Providers",runtimeProviderDescription:"Quản lý khóa nhà cung cấp dùng chung và các connector runtime trước khi tạo API Profiles độc lập.",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",or:"hoặc",createCustomProfile:"Tạo hồ sơ API tùy chỉnh"},alibabaCodingPlanQuickStart:{recommended:"Đề xuất",title:"Dùng thử Alibaba Coding Plan",description:"Sử dụng Alibaba Cloud Coding Plan qua endpoint tương thích Anthropic cho tác vụ lập trình.",featureEndpoint:"Endpoint tương thích Anthropic",featureKeyFormat:"Khóa API sk-sp chuyên dụng",createAlibabaProfile:"Tạo hồ sơ Alibaba Coding Plan",readGuideAt:"Xem hướng dẫn tại"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Model Studio Coding Plan qua endpoint Anthropic",add:"Thêm"},credentialHealth:{title:"Tình trạng thông tin xác thực",ready:"Sẵn sàng",noCredentialsConfigured:"Không có thông tin xác thực nào được định cấu hình. Sử dụng các nút đăng nhập ở trên để xác thực.",neverUsed:"Chưa bao giờ sử dụng",justNow:"Vừa rồi",unknown:"Không xác định",daysAgo:"{{count}} ngày trước",hoursAgo:"{{count}} giờ trước",minutesAgo:"{{count}} phút trước"},proxyStatusWidget:{justNow:"vừa xong",minutesAgo:"{{count}} phút trước",hoursAgo:"{{count}} giờ trước",syncReady:"Sẵn sàng đồng bộ hóa",noConfig:"Không có cấu hình",remoteProxy:"Proxy từ xa",active:"Đang hoạt động",trafficAutoRouted:"Lưu lượng truy cập tự động được định tuyến đến máy chủ từ xa",tooltipSync:"Đồng bộ hóa hồ sơ với CLIProxy",tooltipRestart:"Khởi động lại",tooltipStop:"Dừng lại",tooltipClose:"Đóng",tooltipVersionSettings:"Cài đặt phiên bản",versionManagement:"Quản lý phiên bản",selectVersionPlaceholder:"Chọn phiên bản để cài đặt...",stable:"(ổn định)",install:"Cài đặt",versionsAboveUnstable:"Các phiên bản trên {{version}} có vấn đề đã biết",versionsKnownIssues:"Phiên bản {{version}} có vấn đề đã biết",lastChecked:"Đã kiểm tra lần cuối {{time}}",notRunning:"Không chạy",start:"Bắt đầu",port:"Cổng {{port}}",sessionCount:"{{count}} phiên",sessionCount_other:"{{count}} phiên",installFaultyTitle:"Cài đặt phiên bản có lỗi đã biết?",installFaultyDesc:"Bạn sắp cài đặt <strong>v{{version}}</strong>, phiên bản này nằm trong dải lỗi đã biết <strong>{{range}}</strong>.",installFaultyWarning:"Phiên bản này có lỗi đã biết và có thể cài đặt thất bại hoặc làm proxy ở trạng thái xấu.",installUnstableTitle:"Cài đặt phiên bản không ổn định?",installUnstableDesc:"Bạn sắp cài đặt <strong>v{{version}}</strong>, phiên bản này cao hơn phiên bản ổn định tối đa <strong>v{{maxStable}}</strong>.",installUnstableWarning:"Phiên bản này đã biết có vấn đề về độ ổn định và có thể gây ra hành vi không mong muốn.",installUnstableConfirm:"Bạn có chắc chắn muốn tiếp tục không?",cancel:"Hủy bỏ",installAnyway:"Vẫn cài đặt",clickToDowngrade:"Bấm để hạ cấp",clickToUpdate:"Bấm để cập nhật"},syncStatusCard:{profileSync:"Đồng bộ hồ sơ",ready:"Sẵn sàng",noConfig:"Không có cấu hình",syncsProfilesDesc:"Đồng bộ hóa cấu hình API với cấu hình CLIProxy cục bộ",runDoctorHint:"Chạy <code>ccs doctor --fix</code> để tạo cấu hình.",details:"Chi tiết",syncNow:"Đồng bộ ngay"},syncDialog:{title:"Đồng bộ hóa hồ sơ với CLIProxy cục bộ",description:"Đồng bộ hóa cấu hình API CCS của bạn với CLIProxy config.yaml cục bộ.",noProfiles:"Không có profile nào để đồng bộ.",createProfilesFirst:"Trước tiên hãy tạo hồ sơ API bằng tab Hồ sơ.",modelLabel:"Mô hình:",ready:"Sẵn sàng",profilesToSync_one:"{{count}} hồ sơ để đồng bộ hóa",profilesToSync_other:"{{count}} hồ sơ cần đồng bộ hóa",cancel:"Hủy bỏ",syncing:"Đang đồng bộ hóa...",synced:"Đã đồng bộ hóa!",syncNow:"Đồng bộ ngay"},errorLogs:{title:"Nhật ký lỗi",failedRequests_one:"{{count}} yêu cầu thất bại",failedRequests_other:"{{count}} yêu cầu thất bại",cliproxyDiagnostics:"Chẩn đoán CLIProxy",showingCount:"Hiển thị 50 trong số {{total}} nhật ký",selectLog:"Chọn nhật ký để xem chi tiết",failedLoadContent:"Không tải được nội dung nhật ký",copyAbsolutePath:"Sao chép đường dẫn tuyệt đối",copyRawContent:"Sao chép nội dung nhật ký thô",tabOverview:"Tổng quan",tabHeaders:"Tiêu đề",tabRequest:"Yêu cầu",tabResponse:"Phản hồi",tabRaw:"Raw",modelLabel:"Mô hình:",quotaResetsIn:"Quota sẽ được đặt lại sau",method:"Phương thức",provider:"Nhà cung cấp",version:"Phiên bản",endpoint:"Điểm cuối",url:"URL",timestamp:"Dấu thời gian",na:"không áp dụng",noHeaders:"Không có tiêu đề nào",noRequestBody:"Không có nội dung yêu cầu",noResponseBody:"Không có nội dung phản hồi",rateLimitedMsg:"Bị giới hạn tốc độ. Hãy chuyển sang tài khoản khác hoặc chờ reset hạn ngạch. Mô hình {{model}} đã hết quota.",rateLimitedMsgNoModel:"Bị giới hạn tốc độ. Hãy chuyển sang tài khoản khác hoặc chờ reset hạn ngạch.",authFailedMsg:"Xác thực không thành công. Xác thực lại thông qua Cài đặt CLIProxy hoặc kiểm tra khóa API.",notFoundMsg:"Không tìm thấy điểm cuối. Điểm cuối này có thể không tồn tại trên nhà cung cấp này.",serverErrorMsg:"Lỗi máy chủ từ upstream. Hãy thử lại sau hoặc kiểm tra trang trạng thái của nhà cung cấp.",timeoutMsg:"Yêu cầu hết thời gian chờ. Kiểm tra kết nối mạng hoặc tăng timeout.",unknown:"không rõ"},editAccountContext:{title:"Chỉnh sửa đồng bộ hóa lịch sử",description:'Định cấu hình cách "{{name}}" chia sẻ lịch sử và tính liên tục với các tài khoản xác thực ccs khác.',syncMode:"Chế độ đồng bộ",selectContextMode:"Chọn chế độ ngữ cảnh",isolatedOption:"tách biệt (không đồng bộ)",sharedOption:"chia sẻ (đã bật đồng bộ)",sharedModeHint:"Chế độ chia sẻ sử dụng lại ngữ cảnh không gian làm việc cho các tài khoản trong cùng một nhóm đồng bộ lịch sử.",isolatedModeHint:"Chế độ biệt lập giúp tài khoản này tách biệt hoàn toàn với các tài khoản xác thực ccs khác.",historySyncGroup:"Nhóm đồng bộ hóa lịch sử",groupPlaceholder:"mặc định",groupHint:"Chuẩn hóa thành chữ thường (dấu cách trở thành dấu gạch ngang). Được phép: chữ cái, số, _ , - (tối đa {{max}} ký tự).",invalidGroup:"Nhập tên nhóm hợp lệ bắt đầu bằng một chữ cái.",continuityDepth:"Độ sâu liên tục",selectContinuityDepth:"Chọn độ sâu liên tục",standardOption:"tiêu chuẩn (chỉ đồng bộ project)",deeperOption:"tính liên tục sâu hơn (nâng cao)",deeperHint:"Chế độ nâng cao cũng đồng bộ hóa phiên-env, lịch sử tệp, ảnh chụp nhanh shell và todos.",standardHint:"Chế độ tiêu chuẩn chỉ đồng bộ hóa bối cảnh không gian làm việc của dự án.",credentialsIsolated:"Thông tin xác thực và .anthropic vẫn được tách riêng cho mỗi tài khoản ở tất cả các chế độ.",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",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",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"},droidPage:{loadingDiagnostics:"Đang tải chẩn đoán Droid...",failedDiagnostics:"Không tải được chẩn đoán Droid.",overview:"Tổng quan",byok:"BYOK",docs:"Tài liệu",runtimeInstall:"Thời gian chạy và cài đặt",status:"Trạng thái",detected:"Đã phát hiện",notFound:"Không tìm thấy",detectionSource:"Nguồn phát hiện",binaryPath:"Đường dẫn nhị phân",installDirectory:"Thư mục cài đặt",version:"Phiên bản",overridePath:"Ghi đè (CCS_DROID_PATH)",configFiles:"Tệp cấu hình",path:"Đường dẫn",resolved:"Đã giải quyết",size:"Kích cỡ",lastModified:"Sửa đổi lần cuối",parseWarning:"Cảnh báo phân tích cú pháp: {{value}}",readWarning:"Đọc cảnh báo: {{value}}",warnings:"Cảnh báo",byokSummary:"Tóm tắt BYOK",activeModelSelector:"Bộ chọn mô hình hoạt động",customModels:"Mô hình tùy chỉnh",ccsManaged:"do CCS quản lý",userManaged:"Do người dùng quản lý",malformedEntries:"Mục nhập không đúng định dạng",providers:"Nhà cung cấp",none:"không có",customModelsTitle:"Mô hình tùy chỉnh",modelName:"Tên/model",provider:"Nhà cung cấp",baseUrl:"URL cơ sở",noCustomModels:"Không có mô hình tùy chỉnh",docsAlignedNotes:"Ghi chú được căn chỉnh trong Tài liệu",factoryDocs:"Tài liệu Factory",providerFactCheckDocs:"Tài liệu kiểm tra thực tế của nhà cung cấp",providerValues:"Giá trị của nhà cung cấp: {{value}}",settingsHierarchy:"Phân cấp cài đặt: {{value}}",settingsTitle:"Cài đặt BYOK của Droid",fixJsonBeforeQuickSettings:"Sửa cú pháp JSON trước khi sử dụng các điều khiển cài đặt nhanh.",fixJsonBeforeReasoning:"Sửa cú pháp JSON trước khi cập nhật cài đặt lý luận BYOK.",unableUpdateReasoning:"Không thể cập nhật cài đặt lý luận mô hình BYOK đã chọn.",fixJsonBeforeBudget:"Sửa cú pháp JSON trước khi cập nhật ngân sách tư duy.",anthropicOnlyBudget:"Ngân sách tư duy chỉ có sẵn cho các mô hình BYOK của Anthropic.",invalidJson:"JSON không hợp lệ: {{value}}",saved:"Đã lưu cài đặt Droid",changedExternally:"Cài đặt Droid đã thay đổi bên ngoài. Làm mới và thử lại.",failedSave:"Không lưu được cài đặt Droid"},sharedPage:{commands:"Lệnh",skills:"Kỹ năng",agents:"Agent",title:"Dữ liệu dùng chung",subtitle:"Các lệnh, kỹ năng và agent được chia sẻ giữa các phiên Claude",totalShared:"Tổng số mục dùng chung",visible:"Hiển thị",markdownDetail:"Chế độ xem chi tiết Markdown",filterPrefix:"Lọc:",configurationRequired:"Cần cấu hình",countsUnavailable:"Không có số liệu",retryCounts:"Số lần thử lại",filterPlaceholder:"Lọc {{tab}} theo tên, mô tả hoặc đường dẫn",showing:"Đang hiển thị {{visible}} trong số {{total}} {{tab}}",showingQuery:'cho "{{query}}"',refreshing:"(đang làm mới...)",loadingShared:"Đang tải {{tab}} dùng chung...",failedLoadShared:"Không tải được danh sách {{tab}} dùng chung",retry:"Thử lại",noSharedFound:"Không tìm thấy {{tab}} dùng chung. Chạy `ccs sync` hoặc thêm mục trong thư mục dùng chung của bạn.",noMatch:'Không có {{tab}} khớp với "{{query}}".',selectOne:"Chọn {{tab}} để xem toàn bộ nội dung.",pathLabel:"Đường dẫn",resolvedSource:"Nguồn đã giải quyết",loadingMarkdown:"Đang tải nội dung Markdown...",failedLoadContent:"Không tải được nội dung",retryContent:"Thử lại nội dung",noMarkdown:"Không có nội dung Markdown khả dụng."}}},ja:{translation:{locale:{en:"英語","zh-CN":"簡体字中国語",vi:"ベトナム語",ja:"日本語"},layout:{languageSwitcher:"言語"},nav:{general:"全般",home:"ホーム",analytics:"分析",identityAccess:"認証とアクセス",apiProfiles:"API プロファイル",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"概要",controlPanel:"コントロールパネル",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"アカウント",allAccounts:"すべてのアカウント",sharedData:"共有データ",compatibleClis:"互換",factoryDroid:"Factory Droid",system:"システム",health:"ヘルス",settings:"設定",openrouterTooltip:"注目: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"プロファイル",cliproxy:"CLIProxy",accounts:"アカウント",health:"ヘルス",configurationRequired:"設定が必要"},auth:{dashboardTitle:"CCS Dashboard",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:"プリセットを適用"},componentModelSelector:{selectModel:"モデルを選択",availableModelsCount:"利用可能なモデル ({{count}})",preview:"プレビュー"},searchableSelect:{searchModels:"モデルを検索...",noResults:"一致する結果がありません。"},copilotSettings:{enableCopilot:"Copilot を有効化",enableCopilotDesc:"GitHub Copilot サブスクリプションを利用できるようにします",basicSettings:"基本設定",accountType:"アカウント種別",accountTypeIndividual:"個人",accountTypeBusiness:"ビジネス",accountTypeEnterprise:"エンタープライズ",rateLimiting:"レート制限",rateLimitSeconds:"レート制限 (秒)",noLimit:"制限なし",waitOnRateLimit:"レート制限時に待機",waitOnRateLimitDesc:"制限到達時にエラーではなく待機します",daemonSettings:"デーモン設定",autoStartDaemon:"デーモンを自動起動",autoStartDaemonDesc:"プロファイル使用時に copilot-api を起動します"},providerModelSelector:{selectModel:"モデルを選択",noModelsForProvider:"このプロバイダーで利用可能なモデルはありません",broken:"問題あり",deprecated:"非推奨",paid:"有料",freeTier:"無料ティア",paidTier:"有料ティア",modelKnownIssues:"このモデルには既知の問題があります",viewIssueDetails:"問題の詳細を見る",modelDeprecated:"このモデルは非推奨です",recommended:"推奨",allModelsCount:"すべてのモデル ({{count}})",noModelsAvailable:"利用可能なモデルはありません"},createAuthProfileDialog:{title:"新しいアカウントを作成",description:"認証プロファイルには Claude CLI へのログインが必要です。以下のコマンドをターミナルで実行してください。同期モード、グループ、継続性の深さは後でアカウント一覧から編集できます。",profileName:"プロファイル名",profileNamePlaceholder:"例: work, personal, client",invalidProfileName:"名前は英字で始め、英数字、ハイフン、アンダースコアのみ使用できます。",enableSharedHistory:"他の ccs 認証アカウントとの共有履歴同期を有効にする",historySyncGroupOptional:"履歴同期グループ (任意)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"空欄の場合はデフォルトの共有グループを使用します。スペースはハイフンに正規化されます。",deeperContinuity:"詳細: より深い継続性モード",deeperContinuityHint:"session-env、file-history、shell-snapshots、todos の同期も追加します。認証情報は分離されたままです。",invalidContextGroup:"グループは英字で始め、英数字、ハイフン、アンダースコアのみ使用できます (最大 {{max}} 文字)。",command:"コマンド",commandFallback:"ccs auth create <name>",afterRunPrefix:"コマンド実行後:",afterRunStep1:"ブラウザで Claude のログインを完了します",afterRunStep2:"ここに戻って更新し、新しいアカウントを確認します",poolingHint:"Claude OAuth のプールルーティングを使う場合は、アカウントページのアクションボタンから CLIProxy Claude Pool を利用してください。",close:"閉じる",copied:"コピーしました!",copyCommand:"コマンドをコピー"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"その他"},cliproxyOverviewComponents:{availableModels:"利用可能なモデル",noModelsAvailable:"利用可能なモデルはありません",startSessionHint:"利用可能なモデルを取得するには CLIProxy セッションを開始してください",totalCount:"合計 {{count}}",availableThroughGroupedByProvider:"{{backendLabel}} 経由で利用可能なモデルをプロバイダー別に表示",moreCount:"+{{count}} 件"},categorizedModelSelector:{selectModel:"モデルを選択",noModelsAvailable:"利用可能なモデルはありません",modelPlaceholder:"モデル..."},openrouterQuickStart:{recommended:"推奨",title:"OpenRouter から始める",description:"OpenAI、Anthropic、Google、Meta などの {{modelCountLabel}} モデルを、1 つの API で利用できます。",featureOneApi:"1 つの API で全プロバイダー",featureTierMapping:"モデルティアマッピング",profileCount:"{{count}} 個の API プロファイル",profileCount_other:"{{count}} 個の API プロファイル",selectProfileTitle:"API プロファイルを選択",summaryDescriptionWithProfiles:"このワークスペースには既に {{count}} 個の API プロファイルがあります。左側レールから 1 つ選んで編集するか、ここから新しいプロファイルを作成してください。",summaryDescriptionWithProfiles_other:"このワークスペースには既に {{count}} 個の API プロファイルがあります。左側レールから 1 つ選んで編集するか、ここから新しいプロファイルを作成してください。",summaryDescriptionNoProfiles:"API Profiles は Anthropic 互換エンドポイント向けです。AI Providers は Gemini、Codex、Claude、Vertex、OpenAI 互換コネクタ向けです。",openrouterModelsBadge:"{{modelCountLabel}} 個の OpenRouter モデル",runtimeProviderBadge:"ランタイムプロバイダー設定",runtimeProviderTitle:"AI Providers を開く",runtimeProviderDescription:"個別の API プロファイルを作成する前に、共有プロバイダーキーとランタイムコネクタを管理します。",runtimeProviderFeatureConnectors:"Gemini、Codex、Claude、Vertex、OpenAI 互換コネクタ",runtimeProviderFeatureSecrets:"共有シークレットを個別の API プロファイルから切り離して管理",runtimeProviderFooter:"複数のプロファイルで 1 つのプロバイダー設定を共有したい場合に最適です。",createOpenRouterProfile:"OpenRouter プロファイルを作成",getApiKeyAt:"API キー取得:",or:"または",createCustomProfile:"カスタム API プロファイルを作成"},alibabaCodingPlanQuickStart:{recommended:"推奨",title:"Alibaba Coding Plan を試す",description:"コーディング用途向けに、Anthropic 互換エンドポイント経由で Alibaba Cloud Coding Plan を利用します。",featureEndpoint:"Anthropic 互換エンドポイント",featureKeyFormat:"専用の sk-sp API キー",createAlibabaProfile:"Alibaba Coding Plan プロファイルを作成",readGuideAt:"セットアップガイド:"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Anthropic エンドポイント経由の Model Studio Coding Plan",add:"追加"},credentialHealth:{title:"認証情報の状態",ready:"準備完了",noCredentialsConfigured:"認証情報が未設定です。上のログインボタンから認証してください。",neverUsed:"未使用",justNow:"たった今",unknown:"不明",daysAgo:"{{count}}日前",hoursAgo:"{{count}}時間前",minutesAgo:"{{count}}分前"},proxyStatusWidget:{justNow:"たった今",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",syncReady:"同期準備完了",noConfig:"設定なし",remoteProxy:"リモートプロキシ",active:"稼働中",trafficAutoRouted:"トラフィックは自動でリモートサーバーにルーティングされます",tooltipSync:"CLIProxy にプロファイルを同期",tooltipRestart:"再起動",tooltipStop:"停止",tooltipClose:"閉じる",tooltipVersionSettings:"バージョン設定",versionManagement:"バージョン管理",selectVersionPlaceholder:"インストールするバージョンを選択...",stable:"(安定版)",install:"インストール",versionsAboveUnstable:"{{version}} より新しいバージョンには既知の問題があります",versionsKnownIssues:"バージョン {{version}} には既知の問題があります",lastChecked:"最終確認: {{time}}",notRunning:"停止中",start:"起動",port:"ポート {{port}}",sessionCount:"{{count}} セッション",sessionCount_other:"{{count}} セッション",installFaultyTitle:"既知の問題があるバージョンをインストールしますか?",installFaultyDesc:"既知の不具合範囲 <strong>{{range}}</strong> に含まれる <strong>v{{version}}</strong> をインストールしようとしています。",installFaultyWarning:"このバージョンには既知のバグがあり、失敗したりプロキシが不安定になる可能性があります。",installUnstableTitle:"不安定なバージョンをインストールしますか?",installUnstableDesc:"最大安定版 <strong>v{{maxStable}}</strong> を上回る <strong>v{{version}}</strong> をインストールしようとしています。",installUnstableWarning:"このバージョンには安定性の問題があり、予期しない動作を引き起こす可能性があります。",installUnstableConfirm:"このまま続行しますか?",cancel:"キャンセル",installAnyway:"このままインストール",clickToDowngrade:"クリックしてダウングレード",clickToUpdate:"クリックして更新"},syncStatusCard:{profileSync:"プロファイル同期",ready:"準備完了",noConfig:"設定なし",syncsProfilesDesc:"API プロファイルをローカルの CLIProxy 設定に同期します",runDoctorHint:"設定を生成するには <code>ccs doctor --fix</code> を実行してください。",details:"詳細",syncNow:"今すぐ同期"},syncDialog:{title:"プロファイルをローカル CLIProxy に同期",description:"CCS の API プロファイルをローカルの CLIProxy config.yaml に同期します。",noProfiles:"同期するプロファイルがありません。",createProfilesFirst:"先にプロファイルタブで API プロファイルを作成してください。",modelLabel:"モデル:",ready:"準備完了",profilesToSync_one:"{{count}} 件のプロファイルを同期",profilesToSync_other:"{{count}} 件のプロファイルを同期",cancel:"キャンセル",syncing:"同期中...",synced:"同期完了",syncNow:"今すぐ同期"},errorLogs:{title:"エラーログ",failedRequests_one:"{{count}} 件の失敗したリクエスト",failedRequests_other:"{{count}} 件の失敗したリクエスト",cliproxyDiagnostics:"CLIProxy 診断",showingCount:"{{total}} 件中 50 件のログを表示",selectLog:"詳細を表示するログを選択してください",failedLoadContent:"ログ内容の読み込みに失敗しました",copyAbsolutePath:"絶対パスをコピー",copyRawContent:"生のログ内容をコピー",tabOverview:"概要",tabHeaders:"ヘッダー",tabRequest:"リクエスト",tabResponse:"レスポンス",tabRaw:"生データ",modelLabel:"モデル:",quotaResetsIn:"クォータのリセットまで ",method:"メソッド",provider:"プロバイダー",version:"バージョン",endpoint:"エンドポイント",url:"URL",timestamp:"タイムスタンプ",na:"該当なし",noHeaders:"利用可能なヘッダーはありません",noRequestBody:"リクエストボディなし",noResponseBody:"レスポンスボディなし",rateLimitedMsg:"レート制限です。別のアカウントに切り替えるか、クォータのリセットを待ってください。モデル {{model}} のクォータは上限に達しています。",rateLimitedMsgNoModel:"レート制限です。別のアカウントに切り替えるか、クォータのリセットを待ってください。",authFailedMsg:"認証に失敗しました。CLIProxy 設定で再認証するか、API キーを確認してください。",notFoundMsg:"エンドポイントが見つかりません。このプロバイダーには存在しない可能性があります。",serverErrorMsg:"上流サーバーでエラーが発生しました。後でもう一度試すか、プロバイダーのステータスページを確認してください。",timeoutMsg:"リクエストがタイムアウトしました。ネットワーク接続を確認するか、タイムアウト設定を延長してください。",unknown:"不明"},editAccountContext:{title:"履歴同期の設定",description:'"{{name}}" が他の CCS auth アカウントと履歴や継続性を共有する方法を設定します。',syncMode:"同期モード",selectContextMode:"コンテキストモードを選択",isolatedOption:"分離(同期なし)",sharedOption:"共有(同期あり)",sharedModeHint:"共有モードでは、同じ履歴同期グループ内のアカウントでワークスペースコンテキストを再利用します。",isolatedModeHint:"分離モードでは、このアカウントを他の CCS auth アカウントから完全に切り離します。",historySyncGroup:"履歴同期グループ",groupPlaceholder:"default",groupHint:"小文字に正規化されます(スペースはダッシュに変換)。使用可能: 英字、数字、_、-(最大 {{max}} 文字)。",invalidGroup:"英字で始まる有効なグループ名を入力してください。",continuityDepth:"継続性レベル",selectContinuityDepth:"継続性レベルを選択",standardOption:"標準(プロジェクトのみ)",deeperOption:"拡張継続性(上級者向け)",deeperHint:"上級モードでは、session-env、file-history、shell-snapshots、todos も同期します。",standardHint:"標準モードでは、プロジェクトのワークスペースコンテキストのみ同期します。",credentialsIsolated:"どのモードでも、認証情報と .anthropic はアカウントごとに分離されます。",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:"詳細を隠す",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検索",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設定を保存しました"},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コンテンツはありません。"}}}};Ke.isInitialized||Ke.use(kN).init({resources:zN,lng:RN(),fallbackLng:"en",interpolation:{escapeValue:!1}});const IN={theme:"system",setTheme:()=>null,isDark:!1},Xx=C.createContext(IN);function UN({children:n,defaultTheme:a="system",storageKey:o="vite-ui-theme"}){const[r,c]=C.useState(()=>localStorage.getItem(o)||a),[d,f]=C.useState(()=>typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1);C.useEffect(()=>{const y=window.matchMedia("(prefers-color-scheme: dark)"),S=x=>{f(x.matches)};return y.addEventListener("change",S),()=>y.removeEventListener("change",S)},[]);const p=r==="dark"||r==="system"&&d;C.useEffect(()=>{const y=window.document.documentElement;y.classList.remove("light","dark"),y.classList.add(p?"dark":"light")},[p]);const m={theme:r,setTheme:y=>{localStorage.setItem(o,y),c(y)},isDark:p};return l.jsx(Xx.Provider,{value:m,children:n})}const Zx=C.createContext(null),hy="ccs-privacy-mode";function HN({children:n}){const[a,o]=C.useState(()=>typeof window<"u"?localStorage.getItem(hy)==="true":!1);C.useEffect(()=>{localStorage.setItem(hy,String(a))},[a]);const r=C.useCallback(()=>o(d=>!d),[]),c=C.useMemo(()=>({privacyMode:a,togglePrivacyMode:r}),[a,r]);return l.jsx(Zx.Provider,{value:c,children:n})}function tf(){const n=C.useContext(Zx);if(!n)throw new Error("usePrivacy must be used within a PrivacyProvider");return n}const Jx="blur-[4px] select-none hover:blur-none transition-all duration-200",BN="/api/auth";async function nf(n,a){const o=await fetch(`${BN}${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 KN(){return nf("/check")}function qN(n,a){return nf("/login",{method:"POST",body:JSON.stringify({username:n,password:a})})}function GN(){return nf("/logout",{method:"POST"})}const eb=C.createContext(null);function FN({children:n}){const[a,o]=C.useState(!1),[r,c]=C.useState(!1),[d,f]=C.useState(null),[p,m]=C.useState(!0),[y,S]=C.useState(!1),[x,b]=C.useState(!1),[D,N]=C.useState(!1),[E,O]=C.useState("login");C.useEffect(()=>{KN().then(k=>{o(k.authRequired),c(k.authenticated),f(k.username),S(k.authEnabled),b(k.authConfigured),N(k.isLocalAccess),O(k.accessMode)}).catch(()=>{o(!0),c(!1),S(!0),b(!0),N(!1),O("login")}).finally(()=>m(!1))},[]);const L=C.useCallback(async(k,T)=>{const w=await qN(k,T);c(!0),f(w.username)},[]),j=C.useCallback(async()=>{await GN(),c(!1),f(null)},[]),A=C.useMemo(()=>({authRequired:a,isAuthenticated:r,username:d,loading:p,authEnabled:y,authConfigured:x,isLocalAccess:D,accessMode:E,login:L,logout:j}),[a,r,d,p,y,x,D,E,L,j]);return l.jsx(eb.Provider,{value:A,children:n})}function _l(){const n=C.useContext(eb);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n}function VN(){const{authRequired:n,isAuthenticated:a,loading:o}=_l(),r=Tl();return o?l.jsx("div",{className:"flex h-screen items-center justify-center",children:l.jsx(kn,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):n?a?l.jsx(Td,{}):l.jsx(fS,{to:"/login",state:{from:r},replace:!0}):l.jsx(Td,{})}const pd=768;function YN(){const[n,a]=C.useState(void 0);return C.useEffect(()=>{const o=window.matchMedia(`(max-width: ${pd-1}px)`),r=()=>{a(window.innerWidth<pd)};return o.addEventListener("change",r),a(window.innerWidth<pd),()=>o.removeEventListener("change",r)},[]),!!n}const tb=C.createContext(null);function zl(){const n=C.useContext(tb);if(!n)throw new Error("useSidebar must be used within a SidebarProvider.");return n}function K(...n){return ZS(JS(n))}function af(n){if(!Number.isFinite(n))return"0";const a=Math.max(0,Math.min(100,n));return`${Math.round(a)}`}const py=["#f94144","#f3722c","#f8961e","#f9844a","#f9c74f","#90be6d","#43aa8b","#4d908e","#577590","#277da1"],Xt={success:"#15803d",degraded:"#b45309",failed:"#b91c1c"};function aO(n){let a=2166136261;for(let o=0;o<n.length;o++)a^=n.charCodeAt(o),a=Math.imul(a,16777619);return py[(a>>>0)%py.length]}function Rd(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 of(n){return n.filter(a=>{const o=(a.displayName||a.name||"").toLowerCase();return o.includes("claude")||o.includes("gpt")})}function $N(n){if(n.length===0)return null;const a=of(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 WN(n){if(n.length===0)return null;const a=of(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 QN=/claude-(?:opus|sonnet)-4(?:[.-])5(?:-thinking)?(?=(?:$|[^a-z0-9]))/i;function iO(n){return QN.test((n||"").trim())}const XN=[{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 ZN(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 JN(n){if(n.length===0)return[];const a=of(n),o=[];if(a.length===0)for(const c of XN)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,f=ZN(d);o.push({name:c.name,displayName:d,percentage:c.percentage,tier:f,exhausted:f==="primary"&&c.percentage===0})}const r=["primary","gemini-3","gemini-2","other"];return o.sort((c,d)=>{const f=r.indexOf(c.tier)-r.indexOf(d.tier);return f!==0?f:c.displayName.localeCompare(d.displayName)})}function ek(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 Ps(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 tk(n,a){if(Ps(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=>Ps(m.label)==="usage-5h"&&typeof m.resetAfterSeconds=="number"&&isFinite(m.resetAfterSeconds)&&m.resetAfterSeconds>0),d=a.find(m=>Ps(m.label)==="usage-weekly"&&typeof m.resetAfterSeconds=="number"&&isFinite(m.resetAfterSeconds)&&m.resetAfterSeconds>0);if(!c||!d)return null;const f=Math.abs(r-c.resetAfterSeconds);return Math.abs(r-d.resetAfterSeconds)<=f?"weekly":"5h"}function nk(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(Ps(o)){case"usage-5h":return"5h usage limit";case"usage-weekly":return"Weekly usage limit";case"code-review-5h":case"code-review-weekly":case"code-review":{const d=tk(r,c);return d==="5h"?"Code review (5h)":d==="weekly"?"Code review (weekly)":"Code review"}case"unknown":return o}}function Il(n){if(!n||n.length===0)return{fiveHourWindow:null,weeklyWindow:null,codeReviewWindows:[],unknownWindows:[]};let a=null,o=null;const r=[],c=[],d=[];for(const f of n)switch(Ps(f.label)){case"usage-5h":a||(a=f),d.push(f);break;case"usage-weekly":o||(o=f),d.push(f);break;case"code-review-5h":case"code-review-weekly":case"code-review":r.push(f);break;case"unknown":c.push(f),d.push(f);break}if((!a||!o)&&d.length>0){const f=d.filter(p=>typeof p.resetAfterSeconds=="number"&&p.resetAfterSeconds>=0).sort((p,m)=>(p.resetAfterSeconds||0)-(m.resetAfterSeconds||0));a||(a=f[0]||d[0]||null),o||(o=f.length>1?f[f.length-1]:d.find(p=>p!==a)||null)}return{fiveHourWindow:a,weeklyWindow:o,codeReviewWindows:r,unknownWindows:c}}function ak(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:o}=Il(n),r=[a,o].filter((f,p,m)=>!!f&&m.indexOf(f)===p),d=(r.length>0?r:n).map(f=>f.remainingPercent);return Math.min(...d)}function ik(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:o}=Il(n),r=[a,o].filter((f,p,m)=>!!f&&m.indexOf(f)===p),d=(r.length>0?r:n).map(f=>f.resetAt).filter(f=>f!==null);return d.length===0?null:d.sort()[0]}function ok(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 sk(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 rk(n){if(!n||n.length===0)return null;const a=n.map(o=>o.remainingPercent);return Math.min(...a)}function lk(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 ck(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 Gn(n){return typeof n=="object"&&n!==null}function Ai(n){return typeof n=="number"&&Number.isFinite(n)}function sf(n){if(!Gn(n))return!1;const a=n.models;return typeof n.success=="boolean"&&Array.isArray(a)}function Ul(n){if(!Gn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.windows)||!("planType"in a)?!1:a.windows.every(o=>Gn(o)&&typeof o.label=="string"&&Ai(o.usedPercent)&&Ai(o.remainingPercent))}function Hl(n){if(!Gn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.windows)||"planType"in a?!1:a.windows.every(o=>Gn(o)&&typeof o.rateLimitType=="string"&&Ai(o.remainingPercent)&&typeof o.status=="string")}function rf(n){if(!Gn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.buckets)?!1:a.buckets.every(o=>Gn(o)&&typeof o.id=="string"&&Ai(o.remainingFraction)&&Ai(o.remainingPercent)&&Array.isArray(o.modelIds))}function lf(n){if(!Gn(n))return!1;const a=n,o=a.snapshots;return typeof a.success!="boolean"||!Gn(o)?!1:["premiumInteractions","chat","completions"].every(c=>{const d=o[c];return Gn(d)&&Ai(d.percentRemaining)&&Ai(d.percentUsed)})}function uk(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 dk(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 cf(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=uk(n),d=dk(n,a,c),f=a.toLowerCase();return n.needsReauth||r==="token_expired"||r==="reauth_required"||f.includes("token expired")||f.includes("re-authenticate")||f.includes("reauth")||f.includes("expired or invalid")?{label:Ke.t("accountCard.failureLabelReauth"),summary:a,actionHint:o||Ke.t("accountCard.failureHintReauth"),technicalDetail:c,rawDetail:d,tone:"warning"}:r==="deactivated_workspace"||n.httpStatus===402||f.includes("workspace deactivated")||f.includes("payment or workspace access required")?{label:Ke.t("accountCard.failureLabelWorkspace"),summary:a,actionHint:o||Ke.t("accountCard.failureHintWorkspace"),technicalDetail:c,rawDetail:d,tone:"warning"}:n.isForbidden||n.httpStatus===403||r==="quota_api_forbidden"||f.includes("forbidden")?{label:Ke.t("accountCard.failureLabelNoAccess"),summary:a,actionHint:o||Ke.t("accountCard.failureHintNoAccess"),technicalDetail:c,rawDetail:d,tone:"muted"}:n.httpStatus===429||r==="rate_limited"||f.includes("rate limited")?{label:Ke.t("accountCard.failureLabelRetry"),summary:a,actionHint:o||Ke.t("accountCard.failureHintRetry"),technicalDetail:c,rawDetail:d,tone:"warning"}:r==="auth_file_missing"||r==="missing_account_id"||f.includes("auth file not found")||f.includes("missing chatgpt-account-id")?{label:Ke.t("accountCard.failureLabelReconnect"),summary:a,actionHint:o||Ke.t("accountCard.failureHintReconnect"),technicalDetail:c,rawDetail:d,tone:"muted"}:n.retryable||r==="network_timeout"||r==="network_error"||r==="provider_unavailable"||f.includes("timeout")||f.includes("network")||f.includes("fetch failed")||f.includes("service unavailable")?{label:Ke.t("accountCard.failureLabelTemporary"),summary:a,actionHint:o||Ke.t("accountCard.failureHintTemporary"),technicalDetail:c,rawDetail:d,tone:"warning"}:{label:Ke.t("accountCard.failureLabelUnavailable"),summary:a,actionHint:o,technicalDetail:c,rawDetail:d,tone:"muted"}}function nb(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return sf(a)?$N(a.models):null;case"codex":return Ul(a)?ak(a.windows):null;case"claude":case"anthropic":return Hl(a)?ok(a):null;case"gemini":return rf(a)?rk(a.buckets):null;case"ghcp":case"github-copilot":return lf(a)?ck(a.snapshots):null;default:return null}}function ab(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return sf(a)?WN(a.models):null;case"codex":return Ul(a)?ik(a.windows):null;case"claude":case"anthropic":return Hl(a)?sk(a):null;case"gemini":return rf(a)?lk(a.buckets):null;case"ghcp":case"github-copilot":return lf(a)?a.quotaResetDate:null;default:return null}}const ml=Ll("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 at({className:n,variant:a,size:o,asChild:r=!1,...c}){const d=r?jl:"button";return l.jsx(d,{"data-slot":"button",className:K(ml({variant:a,size:o,className:n})),...c})}function Hn({className:n,type:a,...o}){return l.jsx("input",{type:a,"data-slot":"input",className:K("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 fk({...n}){return l.jsx(lx,{"data-slot":"sheet",...n})}function hk({...n}){return l.jsx(hx,{"data-slot":"sheet-portal",...n})}function pk({className:n,...a}){return l.jsx(px,{"data-slot":"sheet-overlay",className:K("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 mk({className:n,children:a,side:o="right",...r}){return l.jsxs(hk,{children:[l.jsx(pk,{}),l.jsxs(cx,{"data-slot":"sheet-content",className:K("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(ux,{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 gk({className:n,...a}){return l.jsx("div",{"data-slot":"sheet-header",className:K("flex flex-col gap-1.5 p-4",n),...a})}function yk({className:n,...a}){return l.jsx(dx,{"data-slot":"sheet-title",className:K("text-foreground font-semibold",n),...a})}function xk({className:n,...a}){return l.jsx(fx,{"data-slot":"sheet-description",className:K("text-muted-foreground text-sm",n),...a})}function Ye({className:n,...a}){return l.jsx("div",{"data-slot":"skeleton",className:K("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 Di({delayDuration:n=0,...a}){return l.jsx(PC,{"data-slot":"tooltip-provider",delayDuration:n,...a})}function Sa({...n}){return l.jsx(Di,{children:l.jsx(LC,{"data-slot":"tooltip",...n})})}function wa({...n}){return l.jsx(RC,{"data-slot":"tooltip-trigger",...n})}function Na({className:n,sideOffset:a=0,children:o,...r}){return l.jsx(_C,{children:l.jsxs(zC,{"data-slot":"tooltip-content",sideOffset:a,className:K("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",n),...r,children:[o,l.jsx(IC,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const bk="sidebar_state",vk=3600*24*7,Ck="16rem",Sk="18rem",wk="3rem",Nk="b";function kk({defaultOpen:n=!0,open:a,onOpenChange:o,className:r,style:c,children:d,...f}){const p=YN(),[m,y]=C.useState(!1),[S,x]=C.useState(n),b=a??S,D=C.useCallback(L=>{const j=typeof L=="function"?L(b):L;o?o(j):x(j),document.cookie=`${bk}=${j}; path=/; max-age=${vk}`},[o,b]),N=C.useCallback(()=>p?y(L=>!L):D(L=>!L),[p,D,y]);C.useEffect(()=>{const L=j=>{j.key===Nk&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),N())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[N]);const E=b?"expanded":"collapsed",O=C.useMemo(()=>({state:E,open:b,setOpen:D,isMobile:p,openMobile:m,setOpenMobile:y,toggleSidebar:N}),[E,b,D,p,m,y,N]);return l.jsx(tb.Provider,{value:O,children:l.jsx(Di,{delayDuration:0,children:l.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ck,"--sidebar-width-icon":wk,...c},className:K("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh min-h-0 w-full overflow-hidden",r),...f,children:d})})})}function Ak({side:n="left",variant:a="sidebar",collapsible:o="offcanvas",className:r,children:c,...d}){const{isMobile:f,state:p,openMobile:m,setOpenMobile:y}=zl();return o==="none"?l.jsx("div",{"data-slot":"sidebar",className:K("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...d,children:c}):f?l.jsx(fk,{open:m,onOpenChange:y,...d,children:l.jsxs(mk,{"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":Sk},side:n,children:[l.jsxs(gk,{className:"sr-only",children:[l.jsx(yk,{children:"Sidebar"}),l.jsx(xk,{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:K("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:K("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 Dk({className:n,onClick:a,...o}){const{toggleSidebar:r}=zl();return l.jsxs(at,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:K("size-7",n),onClick:c=>{a?.(c),r()},...o,children:[l.jsx(CS,{}),l.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function jk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:K("flex flex-col gap-2 p-2",n),...a})}function Tk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:K("flex flex-col gap-2 p-2",n),...a})}function Mk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:K("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),...a})}function Ek({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:K("relative flex w-full min-w-0 flex-col p-2",n),...a})}function Ok({className:n,asChild:a=!1,...o}){const r=a?jl:"div";return l.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:K("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 Pk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:K("w-full text-sm",n),...a})}function Lk({className:n,...a}){return l.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:K("flex w-full min-w-0 flex-col gap-1 group-data-[collapsible=icon]:items-center",n),...a})}function Rk({className:n,...a}){return l.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:K("group/menu-item relative",n),...a})}const _k=Ll("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 my({asChild:n=!1,isActive:a=!1,variant:o="default",size:r="default",tooltip:c,className:d,...f}){const p=n?jl:"button",{isMobile:m,state:y}=zl(),S=l.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:K(_k({variant:o,size:r}),d),...f});return c?(typeof c=="string"&&(c={children:c}),l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:S}),l.jsx(Na,{side:"right",align:"center",hidden:y!=="collapsed"||m,...c})]})):S}function zk({className:n,...a}){return l.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:K("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 Ik({className:n,...a}){return l.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:K("group/menu-sub-item relative",n),...a})}function Uk({asChild:n=!1,size:a="md",isActive:o=!1,className:r,...c}){const d=n?jl:"a";return l.jsx(d,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":o,className:K("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 Hk={sm:24,md:32,lg:48};function ib({size:n="md",className:a,showText:o=!0}){const r=Hk[n];return l.jsxs("div",{className:K("flex items-center gap-2",a),children:[l.jsx("img",{src:"/logo/ccs-logo-256.png",alt:"CCS Logo",width:r,height:r,className:"rounded"}),o&&l.jsx("span",{className:"font-bold text-lg",children:"CCS Config"})]})}const dl="/api",ob="CONFLICT";class oO extends Error{code=ob;constructor(a="Resource modified externally"){super(a),this.name="ApiConflictError"}}function sO(n){return n instanceof Error&&"code"in n&&n.code===ob}function As(n){return n?/^https?:\/\//i.test(n)||n===dl||n.startsWith(`${dl}/`)?n:`${dl}${n.startsWith("/")?n:`/${n}`}`:dl}async function Bk(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 de(n,a){const o=await fetch(As(n),{headers:{"Content-Type":"application/json"},...a});if(!o.ok)throw new Error(await Bk(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 Ue={profiles:{list:()=>de("/profiles"),create:n=>de("/profiles",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>de(`/profiles/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>de(`/profiles/${n}`,{method:"DELETE"}),discoverOrphans:()=>de("/profiles/orphans"),registerOrphans:n=>de("/profiles/orphans/register",{method:"POST",body:JSON.stringify(n)}),copy:(n,a)=>de(`/profiles/${n}/copy`,{method:"POST",body:JSON.stringify(a)}),export:(n,a=!1)=>de(`/profiles/${n}/export`,{method:"POST",body:JSON.stringify({includeSecrets:a})}),import:n=>de("/profiles/import",{method:"POST",body:JSON.stringify(n)})},imageAnalysis:{get:()=>de("/image-analysis"),update:n=>de("/image-analysis",{method:"PUT",body:JSON.stringify(n)})},cliproxy:{list:()=>de("/cliproxy"),getAuthStatus:()=>de("/cliproxy/auth"),create:n=>de("/cliproxy",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>de(`/cliproxy/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>de(`/cliproxy/${n}`,{method:"DELETE"}),proxyStatus:()=>de("/cliproxy/proxy-status"),proxyStart:()=>de("/cliproxy/proxy-start",{method:"POST"}),proxyStop:()=>de("/cliproxy/proxy-stop",{method:"POST"}),updateCheck:()=>de("/cliproxy/update-check"),versions:()=>de("/cliproxy/versions"),install:(n,a)=>de("/cliproxy/install",{method:"POST",body:JSON.stringify({version:n,force:a})}),restart:()=>de("/cliproxy/restart",{method:"POST"}),stats:()=>de("/cliproxy/usage"),models:()=>de("/cliproxy/models"),updateModel:(n,a)=>de(`/cliproxy/models/${n}`,{method:"PUT",body:JSON.stringify({model:a})}),getRoutingStrategy:()=>de("/cliproxy/routing/strategy"),updateRoutingStrategy:n=>de("/cliproxy/routing/strategy",{method:"PUT",body:JSON.stringify({value:n})}),aiProviders:{list:()=>de("/cliproxy/ai-providers"),create:(n,a)=>de(`/cliproxy/ai-providers/${encodeURIComponent(n)}`,{method:"POST",body:JSON.stringify(a)}),update:(n,a,o)=>de(`/cliproxy/ai-providers/${encodeURIComponent(n)}/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(o)}),delete:(n,a)=>de(`/cliproxy/ai-providers/${encodeURIComponent(n)}/${encodeURIComponent(a)}`,{method:"DELETE"})},getConfigYaml:async()=>{const n=await fetch(As("/cliproxy/config.yaml"));if(!n.ok)throw new Error("Failed to load config");return n.text()},saveConfigYaml:async n=>{const a=await fetch(As("/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:()=>de("/cliproxy/auth-files"),getAuthFile:async n=>{const a=await fetch(As(`/cliproxy/auth-files/download?name=${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load auth file");return a.text()},accounts:{list:()=>de("/cliproxy/auth/accounts"),listByProvider:n=>de(`/cliproxy/auth/accounts/${n}`),setDefault:(n,a)=>de(`/cliproxy/auth/accounts/${n}/default`,{method:"POST",body:JSON.stringify({accountId:a})}),remove:(n,a)=>de(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}`,{method:"DELETE"}),pause:(n,a)=>de(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}/pause`,{method:"POST"}),resume:(n,a)=>de(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}/resume`,{method:"POST"}),solo:(n,a)=>de("/accounts/solo",{method:"POST",body:JSON.stringify({provider:n,accountId:a})}),bulkPause:(n,a)=>de("/accounts/bulk-pause",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})}),bulkResume:(n,a)=>de("/accounts/bulk-resume",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})})},auth:{start:(n,a)=>de(`/cliproxy/auth/${n}/start`,{method:"POST",body:JSON.stringify({nickname:a})}),cancel:n=>de(`/cliproxy/auth/${n}/cancel`,{method:"POST"}),kiroImport:()=>de("/cliproxy/auth/kiro/import",{method:"POST"})},errorLogs:{list:()=>de("/cliproxy/error-logs"),getContent:async n=>{const a=await fetch(As(`/cliproxy/error-logs/${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load error log");return a.text()}}},accounts:{list:()=>de("/accounts"),setDefault:n=>de("/accounts/default",{method:"POST",body:JSON.stringify({name:n})}),resetDefault:()=>de("/accounts/reset-default",{method:"DELETE"}),delete:n=>de(`/accounts/${n}`,{method:"DELETE"}),updateContext:(n,a)=>de(`/accounts/${encodeURIComponent(n)}/context`,{method:"PUT",body:JSON.stringify(a)})},config:{format:()=>de("/config/format"),get:()=>de("/config"),update:n=>de("/config",{method:"PUT",body:JSON.stringify(n)}),migrate:(n=!1)=>de(`/config/migrate?dryRun=${n}`,{method:"POST"}),rollback:n=>de("/config/rollback",{method:"POST",body:JSON.stringify({backupPath:n})})},presets:{list:n=>de(`/settings/${n}/presets`),create:(n,a)=>de(`/settings/${n}/presets`,{method:"POST",body:JSON.stringify(a)}),delete:(n,a)=>de(`/settings/${n}/presets/${encodeURIComponent(a)}`,{method:"DELETE"})},cliproxyServer:{get:()=>de("/cliproxy-server"),update:n=>de("/cliproxy-server",{method:"PUT",body:JSON.stringify(n)}),getBackend:()=>de("/cliproxy-server/backend"),updateBackend:(n,a=!1)=>de("/cliproxy-server/backend",{method:"PUT",body:JSON.stringify({backend:n,force:a})}),test:n=>de("/cliproxy-server/test",{method:"POST",body:JSON.stringify(n)})},quota:{get:(n,a)=>de(`/cliproxy/quota/${n}/${encodeURIComponent(a)}`),getCodex:n=>de(`/cliproxy/quota/codex/${encodeURIComponent(n)}`),getClaude:n=>de(`/cliproxy/quota/claude/${encodeURIComponent(n)}`),getGemini:n=>de(`/cliproxy/quota/gemini/${encodeURIComponent(n)}`)}};function rO(){return At({queryKey:["cliproxy"],queryFn:()=>Ue.cliproxy.list()})}function Kk(){return At({queryKey:["cliproxy-auth"],queryFn:()=>Ue.cliproxy.getAuthStatus()})}function lO(){return At({queryKey:["cliproxy-routing"],queryFn:()=>Ue.cliproxy.getRoutingStrategy()})}function cO(){const n=it();return tt({mutationFn:a=>Ue.cliproxy.updateRoutingStrategy(a),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-routing"]}),le.success(a.message||`Routing strategy set to ${a.strategy}`)},onError:a=>{le.error(a.message)}})}function uO(){const n=it();return tt({mutationFn:a=>Ue.cliproxy.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success("Variant created successfully")},onError:a=>{le.error(a.message)}})}function dO(){const n=it();return tt({mutationFn:a=>Ue.cliproxy.delete(a),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success("Variant deleted successfully")},onError:a=>{le.error(a.message)}})}function fO(){const n=it();return tt({mutationFn:({provider:a,accountId:o})=>Ue.cliproxy.accounts.setDefault(a,o),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),le.success("Default account updated")},onError:a=>{le.error(a.message)}})}function hO(){const n=it();return tt({mutationFn:({provider:a,accountId:o})=>Ue.cliproxy.accounts.remove(a,o),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),le.success("Account removed")},onError:a=>{le.error(a.message)}})}function qk(){const n=it();return tt({mutationFn:({provider:a,accountId:o})=>Ue.cliproxy.accounts.pause(a,o),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Account paused")},onError:a=>{le.error(a.message)}})}function Gk(){const n=it();return tt({mutationFn:({provider:a,accountId:o})=>Ue.cliproxy.accounts.resume(a,o),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Account resumed")},onError:a=>{le.error(a.message)}})}function pO(){const n=it();return tt({mutationFn:({provider:a,accountId:o})=>Ue.cliproxy.accounts.solo(a,o),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),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 Fk(){const n=it();return tt({mutationFn:({provider:a,accountIds:o})=>Ue.cliproxy.accounts.bulkPause(a,o),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(`Paused ${a.succeeded.length} account${a.succeeded.length!==1?"s":""}`),a.failed.length>0&&le.warning(`${a.failed.length} account${a.failed.length!==1?"s":""} failed to pause`)},onError:a=>{le.error(a.message)}})}function Vk(){const n=it();return tt({mutationFn:({provider:a,accountIds:o})=>Ue.cliproxy.accounts.bulkResume(a,o),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(`Resumed ${a.succeeded.length} account${a.succeeded.length!==1?"s":""}`),a.failed.length>0&&le.warning(`${a.failed.length} account${a.failed.length!==1?"s":""} failed to resume`)},onError:a=>{le.error(a.message)}})}function mO(){const n=it();return tt({mutationFn:({provider:a,nickname:o})=>Ue.cliproxy.auth.start(a,o),onSuccess:(a,o)=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),le.success(`Account added for ${o.provider}`)},onError:a=>{le.error(a.message)}})}function gO(){return tt({mutationFn:n=>Ue.cliproxy.auth.cancel(n),onError:n=>{le.error(n.message)}})}function yO(){const n=it();return tt({mutationFn:()=>Ue.cliproxy.auth.kiroImport(),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),a.account?le.success(`Imported Kiro account: ${a.account.email||a.account.id}`):le.success("Kiro token imported")},onError:a=>{le.error(a.message)}})}function xO(){return At({queryKey:["cliproxy-models"],queryFn:()=>Ue.cliproxy.models()})}function bO(n){return At({queryKey:["presets",n],queryFn:()=>Ue.presets.list(n),enabled:!!n})}function vO(){const n=it();return tt({mutationFn:({profile:a,data:o})=>Ue.presets.create(a,o),onSuccess:(a,o)=>{n.invalidateQueries({queryKey:["presets",o.profile]}),le.success(`Preset "${o.data.name}" saved`)},onError:a=>{le.error(a.message)}})}function CO(){const n=it();return tt({mutationFn:({profile:a,name:o})=>Ue.presets.delete(a,o),onSuccess:(a,o)=>{n.invalidateQueries({queryKey:["presets",o.profile]}),le.success("Preset deleted")},onError:a=>{le.error(a.message)}})}function SO(){return At({queryKey:["proxy-status"],queryFn:()=>Ue.cliproxy.proxyStatus(),refetchInterval:3e4})}function wO(){const n=it();return tt({mutationFn:()=>Ue.cliproxy.proxyStart(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.alreadyRunning?le.info("CLIProxy was already running"):a.started?le.success("CLIProxy started successfully"):le.error(a.error||"Failed to start CLIProxy")},onError:a=>{le.error(a.message)}})}function NO(){const n=it();return tt({mutationFn:()=>Ue.cliproxy.proxyStop(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.stopped?le.success(`CLIProxy stopped${a.sessionCount?` (${a.sessionCount} session(s) disconnected)`:""}`):le.error(a.error||"Failed to stop CLIProxy")},onError:a=>{le.error(a.message)}})}function Yk(){return At({queryKey:["cliproxy-update-check"],queryFn:()=>Ue.cliproxy.updateCheck(),staleTime:300*1e3,refetchInterval:300*1e3,refetchOnWindowFocus:!0})}function kO(){const n=it();return tt({mutationKey:["update-backend"],mutationFn:({backend:a,force:o=!1})=>Ue.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 AO(){return At({queryKey:["cliproxy-versions"],queryFn:()=>Ue.cliproxy.versions(),staleTime:300*1e3,refetchOnWindowFocus:!0})}function DO(){const n=it();return tt({mutationFn:({version:a,force:o})=>Ue.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 jO(){const n=it();return tt({mutationFn:()=>Ue.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 $k=UC,Wk=BC,Qk=HC;function Xk(n){return[{title:n("nav.general"),items:[{path:"/",icon:SS,label:n("nav.home")},{path:"/analytics",icon:wS,label:n("nav.analytics")}]},{title:n("nav.identityAccess"),items:[{path:"/providers",icon:Md,label:n("nav.apiProfiles"),badge:{icons:["/icons/openrouter.svg","/assets/providers/alibabacloud-color.svg","/icons/ollama.svg"]}},{path:"/cliproxy",icon:Tx,label:n("nav.cliproxyPlus"),isCollapsible:!0,children:[{path:"/cliproxy",label:n("nav.cliproxyOverview")},{path:"/cliproxy/ai-providers",icon:Md,label:"AI Providers"},{path:"/cliproxy/control-panel",icon:NS,label:n("nav.controlPanel")}]},{path:"/copilot",icon:Mx,label:n("nav.githubCopilot")},{path:"/cursor",iconSrc:"/assets/sidebar/cursor.svg",label:n("nav.cursorIde")},{path:"/accounts",icon:Ox,label:n("nav.accounts"),isCollapsible:!0,children:[{path:"/accounts",label:n("nav.allAccounts")},{path:"/shared",icon:Ex,label:n("nav.sharedData")}]}]},{title:n("nav.compatibleClis"),items:[{path:"/claude-extension",icon:kS,label:n("nav.claudeExtension")},{path:"/codex",iconSrc:"/assets/sidebar/codex.svg",label:"Codex CLI"},{path:"/droid",icon:AS,label:n("nav.factoryDroid")}]},{title:n("nav.system"),items:[{path:"/health",icon:zs,label:n("nav.health")},{path:"/settings",icon:DS,label:n("nav.settings")}]}]}function Zk(){const{t:n}=Mt(),a=Tl(),o=Wd(),{state:r}=zl(),{data:c}=Yk(),d=Xk(n),f=c?.backendLabel??"CLIProxy",p=b=>b.path==="/cliproxy"?f:b.label,m=b=>a.pathname===b,y=b=>b.some(D=>m(D.path)||a.pathname.startsWith(D.path+"/")),S=b=>b.path==="/accounts"?"/shared":b.path,x=b=>{if(b.iconSrc)return l.jsx("img",{src:b.iconSrc,alt:"",className:"w-4 h-4 object-contain"});if(b.icon){const D=b.icon;return l.jsx(D,{className:"w-4 h-4"})}return null};return l.jsxs(Ak,{collapsible:"icon",children:[l.jsx(jk,{className:"h-12 flex items-center justify-center",children:l.jsx(ib,{size:"sm",showText:r==="expanded"})}),l.jsx(Mk,{children:d.map((b,D)=>l.jsxs(Ek,{children:[b.title&&l.jsx(Ok,{children:b.title}),l.jsx(Pk,{children:l.jsx(Lk,{children:b.items.map(N=>l.jsx(Rk,{children:N.isCollapsible&&N.children?l.jsxs($k,{defaultOpen:y(N.children)||m(N.path),className:"group/collapsible",children:[l.jsx(Wk,{asChild:!0,children:l.jsxs(my,{tooltip:p(N),isActive:y(N.children),onClick:()=>o(S(N)),children:[x(N),l.jsx("span",{className:"group-data-[collapsible=icon]:hidden",children:p(N)}),l.jsx(Ml,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 group-data-[collapsible=icon]:hidden"})]})}),l.jsx(Qk,{children:l.jsx(zk,{children:N.children.map(E=>l.jsx(Ik,{children:l.jsx(Uk,{asChild:!0,isActive:m(E.path),children:l.jsx(bl,{to:E.path,children:l.jsx("span",{children:E.label})})})},E.path))})})]}):l.jsx(my,{asChild:!0,isActive:m(N.path),tooltip:p(N),children:l.jsxs(bl,{to:N.path,children:[x(N),l.jsx("span",{className:"group-data-[collapsible=icon]:hidden flex-1",children:p(N)}),N.badge&&l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs("span",{className:K("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(N.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:[(N.badge.icons&&N.badge.icons.length>0?N.badge.icons:N.badge.icon?[N.badge.icon]:[]).map(E=>l.jsx("span",{className:K("inline-flex h-4 w-4 items-center justify-center rounded-[3px] border",m(N.path)?"bg-white border-black/10":"bg-background/80 border-border/40 group-hover/menu-item:bg-white/90"),children:l.jsx("img",{src:E,alt:"",className:"h-3 w-3 object-contain"})},E)),N.badge.text&&l.jsx("span",{className:"hidden sm:inline",children:N.badge.text})]})}),l.jsx(Na,{side:"right",children:l.jsx("p",{children:n("nav.openrouterTooltip")})})]})]})})},N.path))})})]},b.title||D))}),l.jsx(Tk,{className:"p-4 border-t flex items-center justify-center",children:l.jsx(Dk,{})})]})}const uf=()=>{const n=C.useContext(Xx);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n};function Jk(){const{theme:n,setTheme:a}=uf();return l.jsxs(at,{variant:"ghost",size:"icon",onClick:()=>a(n==="dark"?"light":"dark"),children:[l.jsx(Px,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(Lx,{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:"Toggle theme"})]})}function eA(){const{privacyMode:n,togglePrivacyMode:a}=tf();return l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(at,{variant:"ghost",size:"icon",onClick:a,className:K("h-8 w-8 transition-colors",n&&"text-amber-600 hover:text-amber-700 dark:text-amber-400"),children:n?l.jsx(Gs,{className:"h-4 w-4"}):l.jsx(Fs,{className:"h-4 w-4"})})}),l.jsx(Na,{children:l.jsx("p",{children:n?"Privacy mode ON - Click to show data":"Privacy mode OFF - Click to hide data"})})]})}const tA="https://github.com/kaitranntt/ccs/issues";function nA(){return l.jsx(at,{variant:"ghost",size:"icon",asChild:!0,title:"Report an issue on GitHub",children:l.jsx("a",{href:tA,target:"_blank",rel:"noopener noreferrer",children:l.jsx(Mx,{className:"w-4 h-4"})})})}const aA="https://docs.ccs.kaitran.ca";function iA(){return l.jsx(at,{variant:"ghost",size:"icon",asChild:!0,title:"View documentation",children:l.jsx("a",{href:aA,target:"_blank",rel:"noopener noreferrer",children:l.jsx(jS,{className:"w-4 h-4"})})})}function oA(){const[n,a]=C.useState("disconnected"),[o,r]=C.useState(!1),c=C.useRef(null),d=it(),f=C.useRef(0),p=5,m=C.useRef(null),y=C.useRef(()=>{}),S=C.useCallback(D=>{switch(D.type){case"connected":console.log("[WS] Server acknowledged connection");break;case"config-changed":d.invalidateQueries({queryKey:["profiles"]}),d.invalidateQueries({queryKey:["cliproxy"]}),le.info("Configuration updated externally");break;case"settings-changed":d.invalidateQueries({queryKey:["profiles"]}),le.info("Settings file updated");break;case"profiles-changed":d.invalidateQueries({queryKey:["accounts"]}),le.info("Accounts updated");break;case"proxy-status-changed":d.invalidateQueries({queryKey:["proxy-status"]});break;case"pong":break;default:console.log(`[WS] Unknown message: ${D.type}`)}},[d]),x=C.useCallback(()=>{if(c.current?.readyState===WebSocket.OPEN)return;a("connecting");const D=window.location.protocol==="https:"?"wss:":"ws:",N=new WebSocket(`${D}//${window.location.host}/ws`);c.current=N,N.onopen=()=>{a("connected"),r(!1),f.current=0,console.log("[WS] Connected")},N.onmessage=E=>{try{const O=JSON.parse(E.data);S(O),window.dispatchEvent(new CustomEvent("ws-message",{detail:O}))}catch{console.log("[WS] Invalid message")}},N.onclose=()=>{if(a("disconnected"),c.current=null,f.current<p){r(!0);const E=Math.min(1e3*Math.pow(2,f.current),3e4);f.current++,console.log(`[WS] Reconnecting in ${E}ms (attempt ${f.current})`),m.current=setTimeout(()=>{y.current()},E)}else r(!1)},N.onerror=()=>{console.log("[WS] Connection error")}},[S]);y.current=x;const b=C.useCallback(()=>{f.current=p,r(!1),m.current&&(clearTimeout(m.current),m.current=null),c.current?.close()},[]);return C.useEffect(()=>(y.current(),()=>b()),[]),C.useEffect(()=>{const D=setInterval(()=>{c.current?.readyState===WebSocket.OPEN&&c.current.send(JSON.stringify({type:"ping"}))},3e4);return()=>clearInterval(D)},[]),C.useMemo(()=>({status:n,isReconnecting:o,connect:x,disconnect:b}),[n,o,x,b])}function sA(){const{status:n,isReconnecting:a}=oA(),r={connected:{icon:MS,color:"text-green-600",label:"Connected",animate:!1},connecting:{icon:Is,color:"text-yellow-500",label:"Connecting...",animate:!0},disconnected:{icon:a?Is:TS,color:a?"text-amber-500":"text-red-500",label:a?"Reconnecting...":"Disconnected",animate:a}}[n],c=r.icon;return l.jsxs("div",{className:`flex items-center gap-1 text-sm ${r.color}`,children:[l.jsx(c,{className:`w-4 h-4 ${r.animate?"animate-spin":""}`}),l.jsx("span",{className:"hidden sm:inline",children:r.label})]})}function rA(){const[n,a]=C.useState(!1),{authEnabled:o,authConfigured:r,isLocalAccess:c,loading:d}=_l(),f=!c&&!o;if(n&&!f||d)return null;const p=f?"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",m=f?"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",y=f?l.jsx(l.Fragment,{children:r?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:"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."}),l.jsx("span",{className:"sm:hidden",children:"Remote dashboard is read-only until dashboard auth is re-enabled on the host."})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:"Remote dashboard access is read-only until you run ccs config auth setup on the host."}),l.jsx("span",{className:"sm:hidden",children:"Remote dashboard is read-only until host auth is configured."})]})}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:"This dashboard runs locally. All data stays on your machine."}),l.jsx("span",{className:"sm:hidden",children:"Local dashboard - data stays on your device."})]});return l.jsx("div",{className:p,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(ES,{className:"w-4 h-4 flex-shrink-0"}),y]}),f?null:l.jsx("button",{onClick:()=>a(!0),className:`flex-shrink-0 rounded p-1 transition-colors ${m}`,"aria-label":"Dismiss disclaimer",children:l.jsx(No,{className:"w-4 h-4"})})]})})}const lA="https://claudekit.cc?ref=HMNKXOHN";function cA(){return l.jsxs("a",{href:lA,target:"_blank",rel:"noopener noreferrer",className:K("group inline-flex items-center gap-2 px-3 py-1.5 rounded-lg","bg-accent/10 border-2 border-accent/40","hover:bg-accent hover:border-accent","transition-all duration-200 shadow-sm hover:shadow-md"),title:"Powered by ClaudeKit Framework",children:[l.jsx("img",{src:"/logos/claudekit-logo.png",alt:"ClaudeKit",className:"w-5 h-5"}),l.jsxs("span",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[l.jsx("span",{className:K("text-[10px] font-medium uppercase tracking-wide","text-muted-foreground group-hover:text-accent-foreground/80","transition-colors"),children:"Powered by"}),l.jsx("span",{className:K("text-xs font-bold text-foreground","group-hover:text-accent-foreground","transition-colors"),children:"ClaudeKit"})]})]})}const uA="https://github.com/sponsors/kaitranntt";function dA(){return l.jsxs("a",{href:uA,target:"_blank",rel:"noopener noreferrer",className:K("group inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg","bg-pink-500/10 border-2 border-pink-500/40","hover:bg-pink-400 hover:border-pink-400","transition-all duration-200 shadow-sm hover:shadow-md"),title:"Sponsor this project on GitHub",children:[l.jsx(OS,{className:K("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:K("text-xs font-bold text-pink-600 dark:text-pink-300","group-hover:text-white dark:group-hover:text-white","transition-colors"),children:"Sponsor"})]})}function df({...n}){return l.jsx(lx,{"data-slot":"dialog",...n})}function fA({...n}){return l.jsx(hx,{"data-slot":"dialog-portal",...n})}function hA({className:n,...a}){return l.jsx(px,{"data-slot":"dialog-overlay",className:K("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 ff({className:n,children:a,showCloseButton:o=!0,...r}){return l.jsxs(fA,{"data-slot":"dialog-portal",children:[l.jsx(hA,{}),l.jsxs(cx,{"data-slot":"dialog-content",className:K("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(ux,{"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 hf({className:n,...a}){return l.jsx("div",{"data-slot":"dialog-header",className:K("flex flex-col gap-2 text-center sm:text-left",n),...a})}function pA({className:n,...a}){return l.jsx("div",{"data-slot":"dialog-footer",className:K("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...a})}function pf({className:n,...a}){return l.jsx(dx,{"data-slot":"dialog-title",className:K("text-lg leading-none font-semibold",n),...a})}function mf({className:n,...a}){return l.jsx(fx,{"data-slot":"dialog-description",className:K("text-muted-foreground text-sm",n),...a})}function mA({open:n,onClose:a,sessionId:o,provider:r,projects:c,defaultProjectId:d,supportsAll:f,onSelect:p,timeoutSeconds:m=30}){const[y,S]=C.useState(d),[x,b]=C.useState(!1),[D,N]=C.useState(m);C.useEffect(()=>{if(!n){N(m);return}const L=setInterval(()=>{N(j=>j<=1?(clearInterval(L),E(!0),0):j-1)},1e3);return()=>clearInterval(L)},[n,m]),C.useEffect(()=>{n&&(S(d),b(!1),N(m))},[n,d,m]);const E=async(L=!1)=>{if(!x){b(!0);try{await p(L?"":y),a()}catch(j){console.error("Failed to submit project selection:",j);try{await p("")}catch{}a()}}},O=r.charAt(0).toUpperCase()+r.slice(1);return l.jsx(df,{open:n,onOpenChange:L=>!L&&!x&&a(),children:l.jsxs(ff,{className:"sm:max-w-lg",children:[l.jsxs(hf,{children:[l.jsxs(pf,{className:"flex items-center gap-2",children:[l.jsx(Ex,{className:"w-5 h-5"}),"Select Google Cloud Project"]}),l.jsxs(mf,{children:["Choose which project to use for ",O," authentication.",D>0&&l.jsxs("span",{className:"text-muted-foreground ml-1",children:["(Auto-selecting default in ",D,"s)"]})]})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[l.jsxs("div",{className:"space-y-2",children:[c.map(L=>l.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${y===L.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!x&&S(L.id),children:[y===L.id?l.jsx(Lg,{className:"w-5 h-5 text-primary"}):l.jsx(Rg,{className:"w-5 h-5 text-muted-foreground"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium",children:L.name}),l.jsx("div",{className:"text-sm text-muted-foreground font-mono",children:L.id})]}),L.id===d&&l.jsx("span",{className:"text-xs px-2 py-1 bg-secondary rounded",children:"Default"})]},L.id)),f&&l.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${y==="ALL"?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!x&&S("ALL"),children:[y==="ALL"?l.jsx(Lg,{className:"w-5 h-5 text-primary"}):l.jsx(Rg,{className:"w-5 h-5 text-muted-foreground"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium",children:"All Projects"}),l.jsxs("div",{className:"text-sm text-muted-foreground",children:["Onboard all ",c.length," listed projects"]})]})]})]}),l.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[l.jsx(at,{variant:"ghost",onClick:()=>E(!0),disabled:x,children:"Use Default"}),l.jsx(at,{onClick:()=>E(!1),disabled:x,children:x?l.jsxs(l.Fragment,{children:[l.jsx(kn,{className:"w-4 h-4 mr-2 animate-spin"}),"Selecting..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Co,{className:"w-4 h-4 mr-2"}),"Confirm Selection"]})})]})]})]})})}const wo={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"]}},gf=Object.freeze(Object.keys(wo)),_d=Object.freeze(["agy","codex","claude","gemini","ghcp"]);new Set(_d);const gA=Object.freeze([..._d,..._d.flatMap(n=>wo[n].aliases),"all"].filter((n,a,o)=>o.indexOf(n)===a));gA.join(", ");new Set(gf);function yA(n=wo){const a=new Map,o=Object.keys(n),r=(c,d)=>{const f=c.trim().toLowerCase();if(!f)return;const p=a.get(f);if(p&&p!==d)throw new Error(`Provider alias collision for "${f}": ${p} and ${d}`);a.set(f,d)};for(const c of o){r(c,c);for(const d of n[c].aliases)r(d,c)}return a}yA();function xA(n){return gf.filter(a=>wo[a].oauthFlow===n)}const yf=gf;function $s(n){return yf.includes(n)}function ka(n){return typeof n=="string"?n.trim().toLowerCase():""}const bA=["openai","vertex"];function Bl(n){return $s(n)||bA.includes(n)}const sb=Object.freeze(Object.fromEntries(yf.map(n=>[n,{displayName:wo[n].displayName,description:wo[n].description}]))),vA={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"},gy={textClass:"text-gray-600",letter:"?"},CA={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"}},SA=new Set(["kimi"]),wA=new Set(["codex"]);function TO(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 rb(n){const a=ka(n);if(Bl(a))return vA[a]}function NA(n){const a=ka(n);return Bl(a)?CA[a]:{...gy,letter:a[0]?.toUpperCase()||gy.letter}}function kA(n){const a=ka(n);return Bl(a)&&SA.has(a)}function AA(n){const a=ka(n);return Bl(a)&&wA.has(a)}const xf={gemini:"#4285F4",agy:"#f3722c",codex:"#10a37f",openai:"#111827",vertex:"#4285F4",iflow:"#f94144",qwen:"#6236FF",kiro:"#4d908e",ghcp:"#43aa8b",claude:"#D97757",kimi:"#FF6B35"},DA={...Object.fromEntries(yf.map(n=>[n,sb[n].displayName])),openai:"OpenAI",vertex:"Vertex AI"};function bf(n){const a=ka(n);return a?DA[a]||String(n):"Unknown provider"}function jA(n){const a=ka(n);return $s(a)?sb[a].description:""}const TA=[...xA("device_code")],MA=Object.freeze({ghcp:"GitHub Copilot",kiro:"Kiro (AWS)",qwen:"Qwen Code"}),EA=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 MO(n){const a=ka(n);return $s(a)&&TA.includes(a)}function gl(n){const a=ka(n);return a?$s(a)?MA[a]||bf(a):String(n):"Unknown provider"}function OA(n){const a=ka(n);return $s(a)&&EA[a]||"Complete the authorization in your browser."}const PA=["authcode","device"],zd="authcode",EO="aws",yy=[{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 LA(n){return PA.includes(n)}function RA(n){if(!n)return zd;const a=n.trim().toLowerCase();return LA(a)?a:zd}function OO(n){return yy.find(o=>o.id===n)||yy[0]}function PO(n,a=zd){return n==="aws"||n==="idc"&&RA(a)==="device"?"device_code":"authorization_code"}function LO(n){return n==="google"||n==="github"?"start-url":"start"}function RO(n){return n==="google"||n==="github"}function _A({open:n,onClose:a,sessionId:o,provider:r,userCode:c,verificationUrl:d,expiresAt:f}){const[p,m]=C.useState(!1),[y,S]=C.useState(null);C.useEffect(()=>{if(!n)return;let j=null;const A=()=>{const k=Math.max(0,Math.floor((f-Date.now())/1e3));S(k),k===0&&j&&(clearInterval(j),j=null)};return A(),j=setInterval(A,1e3),()=>{j&&clearInterval(j)}},[n,f]);const x=C.useCallback(async()=>{try{await navigator.clipboard.writeText(c),m(!0),le.success(Ke.t("commonToast.codeCopied")),setTimeout(()=>m(!1),2e3)}catch{le.error(Ke.t("commonToast.copyCodeFailed"))}},[c]),b=C.useCallback(()=>{window.open(d,"_blank","noopener,noreferrer")},[d]),D=gl(r),N=OA(r),E=D==="Unknown provider"?"Open verification page":`Open ${D.split(" ")[0]}`,O=j=>{const A=Math.floor(j/60),k=j%60;return`${A}:${k.toString().padStart(2,"0")}`},L=y===0;return l.jsx(df,{open:n,onOpenChange:j=>!j&&a(),children:l.jsxs(ff,{className:"sm:max-w-md","data-session-id":o,children:[l.jsxs(hf,{children:[l.jsxs(pf,{className:"flex items-center gap-2",children:[l.jsx(Qd,{className:"w-5 h-5"}),"Authorize ",D]}),l.jsxs(mf,{children:["Enter the code below at the authorization page.",y!==null&&y>0&&l.jsxs("span",{className:"text-muted-foreground ml-1",children:["(Expires in ",O(y),")"]}),L&&l.jsx("span",{className:"text-destructive ml-1 font-medium",children:"(Code expired)"})]})]}),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(at,{variant:"outline",size:"icon",className:"absolute top-2 right-2",onClick:x,"aria-label":p?"Code copied":"Copy verification code",children:p?l.jsx(Co,{className:"h-4 w-4 text-green-500"}):l.jsx(vl,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"text-sm text-muted-foreground text-center",children:l.jsx("p",{children:N})}),l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs(at,{onClick:b,className:"w-full",children:[l.jsx(Rx,{className:"w-4 h-4 mr-2"}),E]}),l.jsx(at,{variant:"outline",onClick:x,className:"w-full",children:p?l.jsxs(l.Fragment,{children:[l.jsx(Co,{className:"w-4 h-4 mr-2 text-green-500"}),"Copied!"]}):l.jsxs(l.Fragment,{children:[l.jsx(vl,{className:"w-4 h-4 mr-2"}),"Copy Code"]})})]}),l.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[l.jsx(kn,{className:"h-4 w-4 animate-spin"}),l.jsx("span",{children:"Waiting for authorization..."})]})]})]})})}function zA({...n}){return l.jsx(KC,{"data-slot":"dropdown-menu",...n})}function IA({...n}){return l.jsx(qC,{"data-slot":"dropdown-menu-trigger",...n})}function UA({className:n,sideOffset:a=4,...o}){return l.jsx(GC,{children:l.jsx(FC,{"data-slot":"dropdown-menu-content",sideOffset:a,className:K("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 HA({className:n,inset:a,variant:o="default",...r}){return l.jsx(VC,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":o,className:K("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 BA(){const{authRequired:n,isAuthenticated:a,username:o,logout:r}=_l();if(!n||!a)return null;const c=async()=>{await r()};return l.jsxs(zA,{children:[l.jsx(IA,{asChild:!0,children:l.jsxs(at,{variant:"ghost",size:"sm",className:"gap-2",children:[l.jsx(_x,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:o})]})}),l.jsx(UA,{align:"end",children:l.jsxs(HA,{onClick:c,className:"gap-2 text-destructive",children:[l.jsx(PS,{className:"h-4 w-4"}),"Sign Out"]})})]})}const lb=ZC,cb=JC,vf=C.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(mx,{ref:r,className:K("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(YC,{asChild:!0,children:l.jsx(El,{className:"h-4 w-4 opacity-50"})})]}));vf.displayName=mx.displayName;const ub=C.forwardRef(({className:n,...a},o)=>l.jsx(gx,{ref:o,className:K("flex cursor-default items-center justify-center py-1",n),...a,children:l.jsx(Xd,{className:"h-4 w-4"})}));ub.displayName=gx.displayName;const db=C.forwardRef(({className:n,...a},o)=>l.jsx(yx,{ref:o,className:K("flex cursor-default items-center justify-center py-1",n),...a,children:l.jsx(El,{className:"h-4 w-4"})}));db.displayName=yx.displayName;const Cf=C.forwardRef(({className:n,children:a,position:o="popper",...r},c)=>l.jsx($C,{children:l.jsxs(xx,{ref:c,className:K("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(ub,{}),l.jsx(WC,{className:K("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),l.jsx(db,{})]})}));Cf.displayName=xx.displayName;const KA=C.forwardRef(({className:n,...a},o)=>l.jsx(bx,{ref:o,className:K("px-2 py-1.5 text-sm font-semibold",n),...a}));KA.displayName=bx.displayName;const Ls=C.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(vx,{ref:r,className:K("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(QC,{children:l.jsx(Co,{className:"h-4 w-4"})})}),l.jsx(XC,{children:a})]}));Ls.displayName=vx.displayName;const qA=C.forwardRef(({className:n,...a},o)=>l.jsx(Cx,{ref:o,className:K("-mx-1 my-1 h-px bg-muted",n),...a}));qA.displayName=Cx.displayName;function GA(){const{t:n,i18n:a}=Mt(),o=Ys(a.resolvedLanguage??a.language??"en"),r=c=>{const d=_N(c);a.changeLanguage(d)};return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(zx,{className:"h-4 w-4 text-muted-foreground"}),l.jsxs(lb,{value:o,onValueChange:r,children:[l.jsx(vf,{className:"h-8 w-[150px]",children:l.jsx(cb,{placeholder:n("layout.languageSwitcher")})}),l.jsx(Cf,{children:LN.map(c=>l.jsx(Ls,{value:c,children:n(`locale.${c}`)},c))})]})]})}function FA(){const[n,a]=C.useState({isOpen:!1,prompt:null});C.useEffect(()=>{const c=d=>{const f=d.detail;f.type==="projectSelectionRequired"?(console.log("[ProjectSelection] Received prompt:",f.sessionId),a({isOpen:!0,prompt:{sessionId:f.sessionId,provider:f.provider,projects:f.projects,defaultProjectId:f.defaultProjectId,supportsAll:f.supportsAll}})):f.type==="projectSelectionTimeout"?(console.log("[ProjectSelection] Timeout:",f.sessionId),a(p=>p.prompt?.sessionId===f.sessionId?{isOpen:!1,prompt:null}:p)):f.type==="projectSelectionSubmitted"&&(console.log("[ProjectSelection] Submitted:",f.sessionId),a(p=>p.prompt?.sessionId===f.sessionId?{isOpen:!1,prompt:null}:p))};return window.addEventListener("ws-message",c),()=>{window.removeEventListener("ws-message",c)}},[]);const o=C.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=C.useCallback(()=>{a({isOpen:!1,prompt:null})},[]);return C.useMemo(()=>({isOpen:n.isOpen,prompt:n.prompt,onSelect:o,onClose:r}),[n.isOpen,n.prompt,o,r])}function VA(n){return typeof n!="string"?"unknown":n.trim().toLowerCase()||"unknown"}function YA(){const[n,a]=C.useState({isOpen:!1,prompt:null,error:null});C.useEffect(()=>{const d=f=>{const p=f.detail;if(p.type==="deviceCodeReceived"){console.log("[DeviceCode] Received prompt:",p.sessionId);const m=VA(p.provider),y=gl(m);le.info(`${y} authorization required`),a({isOpen:!0,prompt:{sessionId:p.sessionId,provider:m,userCode:p.userCode,verificationUrl:p.verificationUrl,expiresAt:p.expiresAt},error:null})}else p.type==="deviceCodeCompleted"?(console.log("[DeviceCode] Auth completed:",p.sessionId),a(m=>{if(m.prompt&&m.prompt.sessionId===p.sessionId){const y=gl(m.prompt.provider);return le.success(`${y} authentication successful!`),{isOpen:!1,prompt:null,error:null}}return m})):p.type==="deviceCodeFailed"?(console.log("[DeviceCode] Auth failed:",p.sessionId,p.error),a(m=>{if(m.prompt&&m.prompt.sessionId===p.sessionId){const y=gl(m.prompt.provider);return le.error(`${y} authentication failed`),{isOpen:!1,prompt:null,error:p.error}}return m})):p.type==="deviceCodeExpired"&&(console.log("[DeviceCode] Code expired:",p.sessionId),a(m=>m.prompt?.sessionId===p.sessionId?(le.error("Device code expired. Please try again."),{isOpen:!1,prompt:null,error:"Device code expired"}):m))};return window.addEventListener("ws-message",d),()=>{window.removeEventListener("ws-message",d)}},[]);const o=C.useCallback(()=>{a({isOpen:!1,prompt:null,error:null})},[]),r=C.useCallback(()=>{n.prompt?.verificationUrl&&window.open(n.prompt.verificationUrl,"_blank","noopener,noreferrer")},[n.prompt]),c=C.useCallback(async()=>{if(n.prompt?.userCode)try{await navigator.clipboard.writeText(n.prompt.userCode),le.success("Code copied to clipboard")}catch{le.error("Failed to copy code")}},[n.prompt]);return C.useMemo(()=>({isOpen:n.isOpen,prompt:n.prompt,error:n.error,onClose:o,onOpenUrl:r,onCopyCode:c}),[n.isOpen,n.prompt,n.error,o,r,c])}const $A="ccs-dashboard:last-route";function WA(n,a="",o=""){try{localStorage.setItem($A,`${n}${a}${o}`)}catch{}}function QA(){return l.jsxs("div",{className:"p-6 space-y-4",children:[l.jsx(Ye,{className:"h-8 w-48"}),l.jsx(Ye,{className:"h-64 w-full"})]})}function XA(){const n=Tl(),{isOpen:a,prompt:o,onSelect:r,onClose:c}=FA(),d=YA();return C.useEffect(()=>{WA(n.pathname,n.search,n.hash)},[n.pathname,n.search,n.hash]),l.jsxs(kk,{children:[l.jsx(Zk,{}),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(cA,{}),l.jsx(dA,{})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(sA,{}),l.jsx(GA,{}),l.jsx(iA,{}),l.jsx(nA,{}),l.jsx(eA,{}),l.jsx(Jk,{}),l.jsx(BA,{})]})]}),l.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:l.jsx(C.Suspense,{fallback:l.jsx(QA,{}),children:l.jsx(Td,{})})}),l.jsx(rA,{})]}),o&&l.jsx(mA,{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(_A,{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 ZA=Ll("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:K(ZA({variant:a}),n),...o})}function JA({version:n}){return l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(ib,{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:"CCS Config"}),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:"Claude Code Switch Dashboard"})]})]})}const e1=100,xy=["#3b3c36","#568203","#8d4557","#da9100","#3c6c82","#c96907"];function t1(n){return xy[n%xy.length]}function Id(n){return n.replace(/@(gmail|yahoo|hotmail|outlook|icloud)\.com$/i,"")}function n1(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 a1(n){const a=[],o=Date.now(),r=n.reduce((c,d)=>{const f=d.lastUsedAt?new Date(d.lastUsedAt).getTime():o;return Math.max(c,isNaN(f)?o:f)},o);return n.forEach(c=>{const d=new Date(r),f=(p,m)=>{for(let y=0;y<p;y++){const S=Math.floor(Math.random()*24*60*60*1e3*(y/(p||1))),x=new Date(d.getTime()-S),b=Math.floor((Math.random()-.5)*10*60*1e3);x.setTime(x.getTime()+b);const D=new Date;x>D&&x.setTime(D.getTime()),a.push({id:`${c.id}-${m}-${y}`,timestamp:x,accountEmail:c.email,status:m,latencyMs:m==="success"?50+Math.floor(Math.random()*150):200+Math.floor(Math.random()*4800)})}};f(c.successCount,"success"),f(c.failureCount,"failed")}),a.sort((c,d)=>d.timestamp.getTime()-c.timestamp.getTime())}function i1({containerRef:n,svgRef:a,accounts:o}){if(!n.current||!a.current)return[];const r=n.current,d=a.current.getBoundingClientRect(),f=r.querySelector("[data-provider-node]");if(!f)return[];const p=f.getBoundingClientRect(),m=[];return o.forEach((y,S)=>{const x=r.querySelector(`[data-account-index="${S}"]`);if(!x)return;const b=x.getBoundingClientRect(),D=x.getAttribute("data-zone")||"left";let N,E,O,L;switch(D){case"right":N=b.left-d.left,E=b.top+b.height/2-d.top,O=p.right-d.left,L=p.top+p.height/2-d.top;break;case"top":N=b.left+b.width/2-d.left,E=b.bottom-d.top,O=p.left+p.width/2-d.left,L=p.top-d.top;break;case"bottom":N=b.left+b.width/2-d.left,E=b.top-d.top,O=p.left+p.width/2-d.left,L=p.bottom-d.top;break;default:N=b.right-d.left,E=b.top+b.height/2-d.top,O=p.left-d.left,L=p.top+p.height/2-d.top}let j,A,k,T;D==="top"||D==="bottom"?(j=N,A=E+(L-E)*.5,k=O,T=L-(L-E)*.5):(j=N+(O-N)*.5,A=E,k=O-(O-N)*.5,T=L),m.push(`M ${N} ${E} C ${j} ${A}, ${k} ${T}, ${O} ${L}`)}),m}function o1(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 s1(n){return n>=9?"w-64":n>=5?"w-60":n>=3?"w-56":"w-52"}function r1({storageKey:n,onDrag:a}){const[o,r]=C.useState(null),c=C.useRef(null),d=C.useRef(!1),f=C.useCallback(()=>{try{const N=localStorage.getItem(n);if(N)return JSON.parse(N)}catch{}return{}},[n]),[p,m]=C.useState(()=>f());C.useEffect(()=>{Object.keys(p).length>0&&localStorage.setItem(n,JSON.stringify(p))},[p,n]);const y=C.useCallback(()=>{m({}),localStorage.removeItem(n)},[n]),S=C.useCallback((N,E)=>{E.preventDefault(),E.stopPropagation(),E.target.setPointerCapture(E.pointerId);const O=p[N]||{x:0,y:0};c.current={x:E.clientX,y:E.clientY,offsetX:O.x,offsetY:O.y},d.current=!1,r(N)},[p]),x=C.useCallback(N=>{if(!o||!c.current)return;const E=c.current,O=N.clientX-E.x,L=N.clientY-E.y;(Math.abs(O)>3||Math.abs(L)>3)&&(d.current=!0),m(j=>({...j,[o]:{x:E.offsetX+O,y:E.offsetY+L}})),a&&requestAnimationFrame(a)},[o,a]),b=C.useCallback(()=>{r(null),c.current=null},[]);return{dragOffsets:p,draggingId:o,didDragRef:d,handlePointerDown:S,handlePointerMove:x,handlePointerUp:b,getOffset:N=>p[N]||{x:0,y:0},resetPositions:y,hasCustomPositions:Object.keys(p).length>0}}function l1(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 c1(n){const[a,o]=C.useState(new Set),r=C.useRef({});return C.useEffect(()=>{const c=new Set,d={};if(n.forEach(f=>{const p=f.successCount+f.failureCount;d[f.id]=p;const m=r.current[f.id];m!==void 0&&p>m&&c.add(f.id)}),r.current=d,c.size>0){o(c);const f=setTimeout(()=>o(new Set),2e3);return()=>clearTimeout(f)}},[n]),a}function u1({events:n,privacyMode:a}){const{t:o}=Mt();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(zs,{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:K("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"?Xt.success:r.status==="failed"?Xt.failed:Xt.degraded;return l.jsxs("div",{className:"relative flex items-start gap-3 pl-1",children:[l.jsx("div",{className:K("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:K("text-[10px] font-mono text-foreground truncate",a&&Jx),children:Id(r.accountEmail)}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-mono flex-shrink-0",children:n1(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 d1=new Set(["free","plus","pro"]),f1=new Set(["team"]);function by(n){return n.trim().replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi,"").replace(/[^a-z0-9._-]+/gi,"-").replace(/-+/g,"-").toLowerCase()}function Ds(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 fb(n){const a=n.split("#")[0]?.trim();return a&&a.includes("@")?a:null}function h1(n,a){if(!a)return null;const o=`${a}#`;return n.startsWith(o)?n.slice(o.length):null}function p1(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,f=d.toLowerCase().indexOf(a.toLowerCase());if(f===-1)return null;const p=by(d.slice(0,f)),m=by(d.slice(f+a.length)),y=[p,m].filter(Boolean);return y.length>0?y.join("-"):null}function m1(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(Ds).filter(Boolean).join(" · ");return{detailLabel:o||"Team",compactDetailLabel:o||"Team"}}function g1(n,a,o){const r=a?.trim()||fb(n)||void 0;return p1(o,r)??h1(n,r)}function Sf(n,a,o){const r=a?.trim()||fb(n)||n,c=g1(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 f=d[d.length-1]?.toLowerCase();if(f&&f1.has(f)){const m=m1(d.slice(0,-1)),y=["Business",m.detailLabel].filter(Boolean).join(" · ");return{email:r,audience:"business",audienceLabel:"Business",detailLabel:m.detailLabel,compactDetailLabel:m.compactDetailLabel,inlineLabel:y}}if(f&&d1.has(f)){const y=[Ds(f),...d.slice(0,-1).map(Ds)].filter(Boolean).join(" · ")||Ds(f),S=["Personal",y].filter(Boolean).join(" · ");return{email:r,audience:"personal",audienceLabel:"Personal",detailLabel:y,compactDetailLabel:y,inlineLabel:S}}const p=d.map(Ds).filter(Boolean).join(" · ");return{email:r,audience:"unknown",audienceLabel:null,detailLabel:p||null,compactDetailLabel:p||null,inlineLabel:p||null}}function y1(n,a,o){const r=Sf(n,a,o);return r.inlineLabel?`${r.email} (${r.inlineLabel})`:r.email}function x1(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 b1(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 v1(n,a){switch(n){case"five_hour":return"5h usage limit";case"seven_day":return"Weekly usage limit";case"seven_day_opus":return"Weekly usage (Opus)";case"seven_day_sonnet":return"Weekly usage (Sonnet)";case"seven_day_oauth_apps":return"Weekly usage (OAuth apps)";case"seven_day_cowork":return"Weekly usage (Cowork)";case"overage":return"Extra usage";default:return a}}function hb({quota:n,resetTime:a}){if(!n)return l.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading quota..."});if(!n.success){const o=cf(n);return l.jsxs("div",{className:"text-xs space-y-1",children:[l.jsx("p",{className:"font-medium text-destructive",children:o?.label||n.error||"Failed to load quota"}),l.jsx("p",{className:"text-destructive/90",children:o?.summary||n.error}),o?.actionHint&&l.jsx("p",{className:"text-muted-foreground",children:o.actionHint}),o?.technicalDetail&&l.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:o.technicalDetail}),o?.rawDetail&&l.jsx("pre",{className:"whitespace-pre-wrap break-all rounded bg-muted/40 px-2 py-1 font-mono text-[10px] text-muted-foreground",children:o.rawDetail})]})}if(sf(n)){const o=JN(n.models||[]),r=ek(o),c=["primary","gemini-3","gemini-2","other"];return l.jsxs("div",{className:"text-xs space-y-1",children:[l.jsx("p",{className:"font-medium",children:"Model Quotas:"}),c.map((d,f)=>{const p=r.get(d);if(!p||p.length===0)return null;const m=c.slice(0,f).every(y=>!r.get(y)?.length);return l.jsxs("div",{children:[!m&&l.jsx("div",{className:"border-t border-border/40 my-1"}),p.map(y=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:K("truncate",y.exhausted&&"text-red-500"),children:y.displayName}),l.jsxs("span",{className:K("font-mono",y.exhausted&&"text-red-500"),children:[y.percentage,"%"]})]},y.name))]},d)}),l.jsx(yl,{resetTime:a})]})}if(Ul(n)){const{fiveHourWindow:o,weeklyWindow:r,codeReviewWindows:c,unknownWindows:d}=Il(n.windows),f=n.coreUsage?.fiveHour?.resetAt??o?.resetAt??null,p=n.coreUsage?.weekly?.resetAt??r?.resetAt??null,m=[o,r,...c,...d].filter(y=>!!y).filter((y,S,x)=>x.findIndex(b=>b.label===y.label&&b.resetAt===y.resetAt)===S);return l.jsxs("div",{className:"text-xs space-y-1",children:[l.jsx("p",{className:"font-medium",children:"Rate Limits:"}),n.planType&&l.jsxs("p",{className:"text-muted-foreground",children:["Plan: ",n.planType]}),m.map((y,S)=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:K(y.remainingPercent<20&&"text-red-500"),children:nk(y,m)}),l.jsxs("span",{className:"font-mono",children:[y.remainingPercent,"%"]})]},`${y.label}-${y.resetAt??"no-reset"}-${S}`)),l.jsx(vy,{fiveHourResetTime:f,weeklyResetTime:p,fallbackResetTime:a})]})}if(Hl(n)){const o=[n.coreUsage?.fiveHour,n.coreUsage?.weekly].filter(p=>!!p).map(p=>({rateLimitType:p.rateLimitType,label:p.label,remainingPercent:p.remainingPercent,resetAt:p.resetAt,status:p.status})),r=n.windows.map(p=>({rateLimitType:p.rateLimitType,label:p.label,remainingPercent:p.remainingPercent,resetAt:p.resetAt,status:p.status})),c=[...o,...r].filter((p,m,y)=>y.findIndex(S=>S.rateLimitType===p.rateLimitType&&S.resetAt===p.resetAt&&S.status===p.status)===m),d=n.coreUsage?.fiveHour?.resetAt??n.windows.find(p=>p.rateLimitType==="five_hour")?.resetAt??null,f=n.coreUsage?.weekly?.resetAt??n.windows.find(p=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(p.rateLimitType))?.resetAt??null;return l.jsxs("div",{className:"text-xs space-y-1",children:[l.jsx("p",{className:"font-medium",children:"Rate Limits:"}),c.map((p,m)=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:K(p.remainingPercent<20&&"text-red-500"),children:v1(p.rateLimitType,p.label)}),l.jsxs("span",{className:"font-mono",children:[p.remainingPercent,"%"]})]},`${p.rateLimitType}-${p.resetAt??"no-reset"}-${p.status}-${m}`)),l.jsx(vy,{fiveHourResetTime:d,weeklyResetTime:f,fallbackResetTime:a})]})}if(rf(n)){const o=n.buckets.some(r=>!!r.resetTime);return l.jsxs("div",{className:"text-xs space-y-1",children:[n.tierLabel&&l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground",children:"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:"Credits"}),l.jsx("span",{className:"font-mono",children:n.creditBalance.toLocaleString()})]}),l.jsx("p",{className:"font-medium",children:"Buckets:"}),n.buckets.map(r=>l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsxs("span",{className:K(r.remainingPercent<20&&"text-red-500"),children:[r.label,r.tokenType?` (${r.tokenType})`:""]}),l.jsxs("span",{className:"font-mono",children:[r.remainingPercent,"%"]})]}),(r.remainingAmount!==null&&r.remainingAmount!==void 0||r.resetTime)&&l.jsxs("div",{className:"flex justify-between gap-4 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:r.remainingAmount!==null&&r.remainingAmount!==void 0?`${r.remainingAmount.toLocaleString()} remaining`:""}),l.jsx("span",{children:b1(r.resetTime)??""})]})]},r.id)),!o&&l.jsx(yl,{resetTime:a})]})}if(lf(n)){const o=[{label:"Premium Interactions",snapshot:n.snapshots.premiumInteractions},{label:"Chat",snapshot:n.snapshots.chat},{label:"Completions",snapshot:n.snapshots.completions}],r=n.quotaResetDate??a,c=x1(n.planType);return l.jsxs("div",{className:"text-xs space-y-1",children:[l.jsx("p",{className:"font-medium",children:"Quota Snapshots:"}),c&&l.jsxs("p",{className:"text-muted-foreground",children:["Plan: ",c]}),o.map(({label:d,snapshot:f})=>{const p=f.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:K(p&&"text-red-500"),children:d}),l.jsx("span",{className:K("font-mono",p&&"text-red-500"),children:f.unlimited?"Unlimited":`${af(f.percentRemaining)}%`})]}),!f.unlimited&&l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[f.remaining,"/",f.entitlement," remaining"]})]},d)}),l.jsx(yl,{resetTime:r})]})}return null}function yl({resetTime:n}){return n?l.jsxs("div",{className:"flex items-center gap-1.5 pt-1 border-t border-border/50",children:[l.jsx(So,{className:"w-3 h-3 text-blue-400"}),l.jsxs("span",{className:"text-blue-400 font-medium",children:["Resets ",Rd(n)]})]}):null}function vy({fiveHourResetTime:n,weeklyResetTime:a,fallbackResetTime:o}){const r=!!n||!!a;return!r&&!o?null:l.jsxs("div",{className:"pt-1 border-t border-border/50 space-y-1",children:[n&&l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(So,{className:"w-3 h-3 text-blue-400"}),l.jsxs("span",{className:"text-blue-400 font-medium",children:["5h resets ",Rd(n)]})]}),a&&l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(So,{className:"w-3 h-3 text-indigo-400"}),l.jsxs("span",{className:"text-indigo-400 font-medium",children:["Weekly resets ",Rd(a)]})]}),!r&&o&&l.jsx(yl,{resetTime:o})]})}const Ud=C.forwardRef(({className:n,value:a=0,max:o=100,indicatorClassName:r,...c},d)=>{const f=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:K("relative h-2 w-full overflow-hidden rounded-full bg-secondary",n),...c,children:l.jsx("div",{className:K("h-full transition-all",r||"bg-primary"),style:{width:`${f}%`}})})});Ud.displayName="Progress";function Cy(n){const a=Math.max(0,Math.min(100,n));return a<=20?"bg-destructive":a<=50?"bg-yellow-500":"bg-green-500"}function Sy(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 C1(n){if(!n)return!1;try{return Date.now()-new Date(n).getTime()<3600*1e3}catch{return!1}}function S1({provider:n,quota:a,quotaLoading:o,runtimeLastUsed:r,mode:c,className:d}){const{t:f}=Mt(),p=n.toLowerCase(),m=p==="codex",y=p==="claude"||p==="anthropic",S=nb(n,a),x=ab(n,a),b=S!==null?af(S):null,D=b!==null?Number(b):null,N=cf(a),E=N?.label==="Reauth"?Qd:N?.tone==="warning"?Fn:Us,O=m&&a&&Ul(a)?Il(a.windows):null,j=(m?[{label:"5h",value:O?.fiveHourWindow?.remainingPercent??null},{label:c==="compact"?"Wk":"Weekly",value:O?.weeklyWindow?.remainingPercent??null}]:y&&a&&Hl(a)?[{label:"5h",value:a.coreUsage?.fiveHour?.remainingPercent??a.windows.find(k=>k.rateLimitType==="five_hour")?.remainingPercent??null},{label:c==="compact"?"Wk":"Weekly",value:a.coreUsage?.weekly?.remainingPercent??a.windows.find(k=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(k.rateLimitType))?.remainingPercent??null}]:[]).filter(k=>k.value!==null);if(o)return l.jsxs("div",{className:K("flex items-center gap-1.5 text-xs text-muted-foreground",d),children:[l.jsx(kn,{className:"w-3 h-3 animate-spin"}),l.jsx("span",{children:c==="compact"?f("accountCard.quotaLoading"):"Loading quota..."})]});if(D!==null)return l.jsx("div",{className:K(c==="compact"?"px-0.5":"",d),children:l.jsx(Di,{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:f("accountCard.quota")}),l.jsxs("span",{className:K("text-[10px] font-mono font-bold",D>50?"text-emerald-600 dark:text-emerald-400":D>20?"text-amber-500":"text-red-500"),children:[b,"%"]})]}),j.length>0&&l.jsx("div",{className:"flex items-center justify-between text-[7px] text-muted-foreground/70",children:j.map(k=>l.jsxs("span",{children:[k.label," ",k.value,"%"]},k.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:K("h-full rounded-full transition-all",D>50?"bg-emerald-500":D>20?"bg-amber-500":"bg-red-500"),style:{width:`${D}%`}})})]}):l.jsxs("div",{className:"space-y-1.5 cursor-help",children:[l.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:C1(r)?l.jsxs(l.Fragment,{children:[l.jsx(Vs,{className:"w-3 h-3 text-emerald-500"}),l.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["Active · ",Sy(r)]})]}):r?l.jsxs(l.Fragment,{children:[l.jsx(So,{className:"w-3 h-3 text-muted-foreground"}),l.jsxs("span",{className:"text-muted-foreground",children:["Last used ",Sy(r)]})]}):l.jsxs(l.Fragment,{children:[l.jsx(_g,{className:"w-3 h-3 text-muted-foreground"}),l.jsx("span",{className:"text-muted-foreground",children:"Not used yet"})]})}),j.length>0?l.jsx("div",{className:"space-y-1.5",children:j.map(k=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"w-10 text-[10px] text-muted-foreground",children:k.label}),l.jsx(Ud,{value:Math.max(0,Math.min(100,k.value)),className:"h-2 flex-1",indicatorClassName:Cy(k.value)}),l.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[k.value,"%"]})]},k.label))}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ud,{value:Math.max(0,Math.min(100,D)),className:"h-2 flex-1",indicatorClassName:Cy(D)}),l.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[b,"%"]})]})]})}),l.jsx(Na,{side:c==="compact"?"top":"bottom",className:"max-w-xs",children:l.jsx(hb,{quota:a,resetTime:x})})]})})});if(a?.success)return c==="compact"?l.jsx("div",{className:K("text-[8px] text-muted-foreground/60",d),children:f("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(_g,{className:"w-3 h-3"}),f("accountCard.quotaUnavailable")]})});if(!N)return null;const A=N.tone==="warning"?"text-amber-600 dark:text-amber-400 border-amber-500/50":N.tone==="destructive"?"text-destructive border-destructive/50":"text-muted-foreground/70 border-muted-foreground/50";return l.jsx(Di,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:c==="compact"?l.jsxs("div",{className:K("flex items-center gap-1 text-[8px]",A,d),children:[l.jsx(E,{className:"w-2.5 h-2.5"}),l.jsx("span",{children:N.label})]}):l.jsx("div",{className:d,children:l.jsxs(zt,{variant:"outline",className:K("text-[10px] h-5 px-2 gap-1",A),children:[l.jsx(E,{className:"w-3 h-3"}),N.label]})})}),l.jsx(Na,{side:c==="compact"?"top":"bottom",className:"max-w-[260px]",children:l.jsxs("div",{className:"space-y-1 text-xs",children:[l.jsx("p",{children:N.summary}),N.actionHint&&l.jsx("p",{className:"text-muted-foreground",children:N.actionHint}),N.technicalDetail&&l.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:N.technicalDetail}),N.rawDetail&&l.jsx("pre",{className:"whitespace-pre-wrap break-all rounded bg-muted/40 px-2 py-1 font-mono text-[10px] text-muted-foreground",children:N.rawDetail})]})})]})})}function w1(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 N1(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 k1(n){return n==="business"?"Biz":n==="personal"?"Pers":"?"}function A1({mode:n,provider:a,accountId:o,email:r,displayEmail:c,tokenFile:d,tier:f,isDefault:p,paused:m,privacyMode:y,showQuota:S,quota:x,quotaLoading:b,runtimeLastUsed:D,beforeIdentity:N,headerEnd:E,compactMetaBadges:O,bodySlot:L,footerSlot:j,quotaInsetClassName:A,className:k}){const T=Sf(o,r,d),w=c||T.email||o,R=a.toLowerCase(),B=(R==="agy"||R==="antigravity")&&f&&f!=="unknown"&&f!=="free",z=n==="compact",G=l.jsxs(l.Fragment,{children:[B&&l.jsx("span",{className:K("text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0",N1(f)),children:f}),T.audienceLabel&&l.jsx("span",{title:T.audienceLabel,className:K("text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0",T.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:k1(T.audience)}),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:K("flex flex-col gap-2",k),children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:K("flex min-w-0 flex-1",z?"gap-2":"gap-3"),children:[N,!z&&l.jsxs("div",{className:"relative shrink-0",children:[l.jsx("div",{className:K("flex items-center justify-center w-8 h-8 rounded-full",p?"bg-primary/10":"bg-muted"),children:l.jsx(_x,{className:"w-4 h-4"})}),B&&l.jsx("span",{className:K("absolute -bottom-0.5 -right-0.5 text-[7px] font-bold uppercase px-1 py-px rounded ring-1 ring-background",f==="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:f==="ultra"?"U":"P"})]}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:K("flex items-center min-w-0",z?"gap-1.5":"gap-2 flex-wrap"),children:[l.jsx("span",{title:w,className:K(z?"flex-1 min-w-0 text-xs font-semibold tracking-tight truncate leading-none":"font-medium text-sm truncate",y&&Jx),children:w}),z&&(O??G),!z&&T.audienceLabel&&l.jsx(zt,{variant:"outline",className:K("text-[10px] h-4 px-1.5 border-transparent",w1(T.audience)),children:T.audienceLabel}),!z&&T.detailLabel&&l.jsx(zt,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:T.detailLabel}),!z&&p&&l.jsxs(zt,{variant:"secondary",className:"text-[10px] h-4 px-1.5 gap-0.5",children:[l.jsx(LS,{className:"w-2.5 h-2.5 fill-current"}),"Default"]}),!z&&m&&l.jsxs(zt,{variant:"outline",className:"text-[10px] h-4 px-1.5 border-yellow-500 text-yellow-600",children:[l.jsx(Ix,{className:"w-2 h-2 mr-0.5"}),"Paused"]})]}),L&&l.jsx("div",{className:"mt-1",children:L})]})]}),E&&l.jsx("div",{className:K("flex items-center shrink-0",z?"gap-0.5":"gap-1"),children:E})]}),j,S&&l.jsx(S1,{provider:a,quota:x,quotaLoading:b,runtimeLastUsed:D,mode:n,className:A})]})}async function D1(){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 j1(){const n=await fetch("/api/cliproxy/status");if(!n.ok)throw new Error("Failed to fetch status");return n.json()}function T1(){return At({queryKey:["cliproxy-status"],queryFn:j1,refetchInterval:1e4,retry:1})}function M1(n=!0){return At({queryKey:["cliproxy-stats"],queryFn:D1,enabled:n,refetchInterval:5e3,retry:1,staleTime:3e3})}async function E1(){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 O1(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 P1(n=!0){return At({queryKey:["cliproxy-error-logs"],queryFn:E1,enabled:n,refetchInterval:3e4,retry:1,staleTime:1e4})}function L1(n){return At({queryKey:["cliproxy-error-log-content",n],queryFn:()=>n?O1(n):Promise.resolve(""),enabled:!!n,staleTime:6e4})}const pb=["agy","codex","claude","gemini","ghcp"],R1={antigravity:"agy",anthropic:"claude","gemini-cli":"gemini",copilot:"ghcp","github-copilot":"ghcp"};function mb(n){const a=n.trim().toLowerCase();return a?pb.includes(a)?a:R1[a]??null:null}async function wy(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 _1(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 z1(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 I1(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 U1(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 gb(n,a,o=!0){const r=mb(n);return{queryKey:["account-quota",r??n,a],queryFn:()=>H1(r??n,a),enabled:o&&!!r&&!!a,staleTime:6e4,refetchInterval:6e4,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:1}}async function H1(n,a){const o=mb(n);if(!o)return wy(n,a);switch(o){case"codex":return _1(a);case"claude":return z1(a);case"gemini":return I1(a);case"ghcp":return U1(a);default:return wy(n,a)}}function B1(n,a,o=!0){return At(gb(n,a,o))}function K1(n,a=!0){return xS({queries:n.map(o=>gb(o.provider,o.accountId,a))})}function q1({success:n,failure:a,showDetails:o}){const r=n+a,c=r>0?n/r*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:"Success Rate"}),l.jsxs("span",{className:K("text-sm font-mono font-bold leading-none mt-0.5",c===100?"text-emerald-600 dark:text-emerald-400":c>=90?"text-amber-500":"text-red-500"),children:[Math.round(c),"%"]})]}),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:r.toLocaleString()})]})]}),l.jsxs("div",{className:K("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(Vs,{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:K("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(Zd,{className:K("w-2.5 h-2.5",a>0?"text-red-500":"text-muted-foreground")}),l.jsx("span",{className:K("text-[10px] font-mono font-bold",a>0?"text-red-500":"text-muted-foreground"),children:a})]})]})]})}const G1=["antigravity","anthropic","gemini-cli","copilot","github-copilot"],F1={left:"border-l-2",right:"border-r-2",top:"border-t-2",bottom:"border-b-2"},V1={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 Y1(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 $1(n){return n>50?"bg-emerald-500":n>20?"bg-amber-500":"bg-red-500"}function yb(n,a){return n==="business"?"Biz":n==="personal"?"Pers":a?.trim()?.[0]?.toUpperCase()??"?"}function W1(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 yb(o.audience,o.audienceLabel??o.detailLabel??null)}return null}function Q1({account:n,zone:a,originalIndex:o,isHovered:r,isDragging:c,offset:d,showDetails:f,privacyMode:p,onMouseEnter:m,onMouseLeave:y,onPointerDown:S,onPointerMove:x,onPointerUp:b,onPauseToggle:D,isPausingAccount:N}){const{t:E}=Mt(),O=F1[a],L=Y1(a,n.color),j=V1[a],A=n.provider.toLowerCase(),k=pb.includes(A)||G1.includes(A),T=(n.variants?.length??0)>1,{data:w,isLoading:R}=B1(A,n.id,k&&!T),B=K1((n.variants??[]).map(te=>({provider:n.provider,accountId:te.id})),k&&T),z=T?Array.from(new Map((n.variants??[]).slice().sort((te,ve)=>{const I={business:0,personal:1,unknown:2};return I[te.audience]-I[ve.audience]}).map(te=>[te.audienceLabel??te.detailLabel??te.id,te])).values()):[],G=W1(z),ne=T?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:z.map(te=>te.audienceLabel??te.detailLabel??"Variant").join(" • "),children:G?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:G}):z.map((te,ve)=>l.jsx("span",{className:K("inline-flex min-w-[1.9rem] items-center justify-center px-1.5 py-1 text-[9px] font-semibold leading-none",ve>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:yb(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,X=T&&k?(n.variants??[]).map((te,ve)=>{const I=B[ve],Z=I?.data,ae=nb(n.provider,Z),W=ab(n.provider,Z),oe=ae!==null?af(ae):null,ce=oe!==null?Number(oe):null,he=cf(Z),Q=te.audienceLabel??te.detailLabel??Id(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:Q}),l.jsx("span",{className:"font-mono text-foreground/80 shrink-0",children:I?.isLoading?E("accountCard.quotaLoading"):ce!==null?`${oe}%`:he?.label||E("accountCard.quotaUnavailable")})]}),ce!==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:K("h-full rounded-full transition-all",$1(ce)),style:{width:`${ce}%`}})})]})}),l.jsx(Na,{side:"top",className:"max-w-xs",children:l.jsx(hb,{quota:Z,resetTime:W})})]},te.id)}):null,ye=l.jsxs(l.Fragment,{children:[D&&l.jsx(Di,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(at,{variant:"ghost",size:"icon",className:K("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(),D(n.memberIds??[n.id],!n.paused)},disabled:N,children:N?l.jsx(kn,{className:"w-2.5 h-2.5 animate-spin"}):n.paused?l.jsx(RS,{className:"w-2.5 h-2.5 text-amber-600 dark:text-amber-400"}):l.jsx(Ix,{className:"w-2.5 h-2.5 text-muted-foreground/50 hover:text-foreground"})})}),l.jsx(Na,{side:"top",className:"text-xs",children:n.paused?E("accountCard.resumeAccount"):E("accountCard.pauseAccount")})]})}),l.jsx(Ol,{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:y,onPointerDown:S,onPointerMove:x,onPointerUp:b,onPointerCancel:b,className:K("group/card relative rounded-lg p-3 w-44 cursor-grab transition-shadow duration-200","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border border-border/50 dark:border-white/[0.08]",O,"select-none touch-none",r&&"bg-muted/50 dark:bg-zinc-800/60",c&&"cursor-grabbing shadow-xl scale-105 z-50",n.paused&&"opacity-60"),style:{...L,transform:`translate(${d.x}px, ${d.y}px)${c?" scale(1.05)":""}`},children:[l.jsx(A1,{mode:"compact",provider:n.provider,accountId:n.id,email:n.email,displayEmail:Id(n.email),tokenFile:n.tokenFile,tier:n.tier,isDefault:n.isDefault,paused:n.paused,privacyMode:p,showQuota:k&&!T,quota:w,quotaLoading:R,runtimeLastUsed:n.lastUsedAt,headerEnd:ye,compactMetaBadges:ne,footerSlot:l.jsxs(l.Fragment,{children:[l.jsx(q1,{success:n.successCount,failure:n.failureCount,showDetails:f}),X&&l.jsx("div",{className:"mt-2 px-0.5 space-y-1",children:X})]})}),l.jsx("div",{className:K("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",j,r&&"bg-foreground dark:bg-white border-transparent")})]})}function wf({provider:n,className:a,size:o=18,withBackground:r=!1}){const c=n.toLowerCase(),d=rb(n),f=xf[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:f,fontSize:p*.6},children:n.charAt(0).toUpperCase()});if(r)return l.jsx("div",{className:K("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:K("shrink-0 rounded-sm object-contain",a)});const y=f;return l.jsx("div",{className:K("shrink-0 rounded-full flex items-center justify-center text-white font-bold",a),style:{width:o,height:o,backgroundColor:y,fontSize:o*.5},children:n.charAt(0).toUpperCase()})}function X1({providerData:n,providerColor:a,totalRequests:o,maxRequests:r,isDragging:c,offset:d,hoveredAccount:f,hasRightAccounts:p,hasTopAccounts:m,hasBottomAccounts:y,onPointerDown:S,onPointerMove:x,onPointerUp:b}){const{t:D}=Mt(),{accounts:N}=n;return l.jsxs("div",{"data-provider-node":!0,onPointerDown:S,onPointerMove:x,onPointerUp:b,onPointerCancel:b,className:K("group relative w-full rounded-xl p-4 cursor-grab transition-shadow duration-200","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border-2 border-border/50 dark:border-white/[0.08]",!c&&"animate-subtle-float animate-border-glow","select-none touch-none",f!==null&&"scale-[1.02]",c&&"cursor-grabbing shadow-2xl scale-105 z-50"),style:{"--glow-color":`${a}60`,borderColor:f!==null?`${a}80`:void 0,transform:`translate(${d.x}px, ${d.y}px)${c?" scale(1.05)":""}`},children:[l.jsx(Ol,{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)"}}),p&&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)"}}),m&&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)"}}),y&&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(wf,{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:D("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:D("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:D("flowViz.accounts")}),l.jsx("span",{className:"text-foreground font-mono",children:N.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/(r*N.length)*100)}%`,backgroundColor:a}})})]})]})}function Z1({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,f)=>{const p=a[f];if(!p)return null;const m=p.successCount+p.failureCount,y=Math.max(2,m/o*10),S=r===f,x=r!==null&&r!==f,b=c.has(p.id),D=t1(f);return l.jsxs("g",{children:[l.jsx("path",{d,fill:"none",stroke:D,strokeWidth:y,strokeOpacity:S?.8:x?.15:.4,strokeLinecap:"round",filter:S?"url(#flow-glow)":void 0,className:"transition-all duration-300"}),b&&l.jsxs(l.Fragment,{children:[l.jsx("path",{d,fill:"none",stroke:p.color,strokeWidth:y*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"}})]})]},f)})]})}function J1({onBack:n,showDetails:a,onToggleDetails:o,hasCustomPositions:r,onResetPositions:c}){const{t:d}=Mt();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(Ml,{className:"w-3.5 h-3.5 rotate-180 transition-transform group-hover:-translate-x-0.5"}),l.jsx("span",{children:d("flowViz.backToProviders")})]}):l.jsx("div",{}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:o,className:K("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(Gs,{className:"w-3.5 h-3.5"}):l.jsx(Fs,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:d(a?"flowViz.hideDetails":"flowViz.showDetails")})]}),r&&l.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-all duration-200 px-3 py-1.5 rounded-md border border-border/60 hover:border-border bg-background hover:bg-muted/50 shadow-sm",children:[l.jsx(_S,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:d("flowViz.resetLayout")})]})]})]})}function eD({providerData:n,onBack:a,onPauseToggle:o,isPausingAccount:r}){const c=C.useRef(null),d=C.useRef(null),[f,p]=C.useState(null),[m,y]=C.useState(!1),[S,x]=C.useState([]),{privacyMode:b}=tf(),{accounts:D}=n,N=Math.max(...D.map(J=>J.successCount+J.failureCount),1),E=D.reduce((J,re)=>J+re.successCount+re.failureCount,0),O=C.useCallback(()=>{const J=i1({containerRef:c,svgRef:d,accounts:D});J.length>0&&x(J)},[D]),L=`ccs-flow-positions-${n.provider}`,{dragOffsets:j,draggingId:A,handlePointerDown:k,handlePointerMove:T,handlePointerUp:w,getOffset:R,resetPositions:B,hasCustomPositions:z}=r1({storageKey:L,onDrag:O}),G=l1(j),ne=c1(D),X=C.useMemo(()=>a1(D).slice(0,e1),[D]);C.useEffect(()=>{const J=setTimeout(O,50);return window.addEventListener("resize",O),()=>{clearTimeout(J),window.removeEventListener("resize",O)}},[O]),C.useEffect(()=>{const J=setTimeout(O,10);return()=>clearTimeout(J)},[j,O]),C.useEffect(()=>{const J=Date.now(),re=350,ie=()=>{O(),Date.now()-J<re&&requestAnimationFrame(ie)};requestAnimationFrame(ie)},[m,O]);const ye=xf[n.provider.toLowerCase()]||"#6b7280",te=C.useMemo(()=>o1(D),[D]),{leftAccounts:ve,rightAccounts:I,topAccounts:Z,bottomAccounts:ae}=te,W=I.length>0,oe=Z.length>0,ce=ae.length>0,he=C.useMemo(()=>s1(D.length),[D.length]),Q=(J,re)=>J.map(ie=>{const se=D.findIndex(ge=>ge.id===ie.id);return l.jsx(Q1,{account:ie,zone:re,originalIndex:se,isHovered:f===se,isDragging:A===ie.id,offset:R(ie.id),showDetails:m,privacyMode:b,onMouseEnter:()=>p(se),onMouseLeave:()=>p(null),onPointerDown:ge=>k(ie.id,ge),onPointerMove:T,onPointerUp:w,onPauseToggle:o,isPausingAccount:r},ie.id)});return l.jsxs("div",{className:"flex flex-col",ref:c,children:[l.jsx(J1,{onBack:a,showDetails:m,onToggleDetails:()=>y(!m),hasCustomPositions:z,onResetPositions:B}),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+G.paddingTop}px`,paddingBottom:`${24+G.paddingBottom}px`,minHeight:`${320+G.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(Z1,{paths:S,accounts:D,maxRequests:N,hoveredAccount:f,pulsingAccounts:ne})}),oe&&l.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mb-8",children:Q(Z,"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:Q(ve,"left")}),l.jsx("div",{className:K("z-10 flex items-center flex-shrink-0",he),children:l.jsx(X1,{providerData:n,providerColor:ye,totalRequests:E,maxRequests:N,isDragging:A==="provider",offset:R("provider"),hoveredAccount:f,hasRightAccounts:W,hasTopAccounts:oe,hasBottomAccounts:ce,onPointerDown:J=>k("provider",J),onPointerMove:T,onPointerUp:w})}),W&&l.jsx("div",{className:"flex flex-col gap-3 z-10 w-48 justify-center flex-shrink-0",children:Q(I,"right")})]}),ce&&l.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mt-8",children:Q(ae,"bottom")})]}),l.jsx("div",{className:"w-56 flex-shrink-0 self-stretch relative",children:l.jsx("div",{className:"absolute inset-0",children:l.jsx(u1,{events:X,privacyMode:b})})})]})]})}function tD(n,a){return`${n.trim().toLowerCase()}:${a.trim()}`}function nD(n,a){const o=Array.from(new Set([a.id,a.email].filter(r=>!!r?.trim())));for(const r of o){const c=tD(a.provider,r),d=n?.accountStats?.[c]??n?.accountStats?.[r];if(d)return d}}const Ny={business:0,personal:1,unknown:2};function aD(n,a){return a?n?new Date(a).getTime()>new Date(n).getTime()?a:n:a:n}function iD(n,a){const o=Sf(n.id,n.email,n.tokenFile),r=nD(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 oD(n){return[...n].sort((a,o)=>{const r=Ny[a.audience]-Ny[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 sD(n,a){const o=new Map,r=new Map;for(const c of n){const d=iD(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[y]=d,S=r.get(y.id);return{id:y.id,email:y.email,tokenFile:y.tokenFile,provider:S?.provider??"codex",isDefault:y.isDefault,successCount:y.successCount,failureCount:y.failureCount,lastUsedAt:y.lastUsedAt,paused:y.paused,tier:y.tier,projectId:S?.projectId}}const f=oD(d),p=f[0]?.email??c,m=r.get(f[0]?.id??"")?.provider??"codex";return{id:c,email:p,tokenFile:f[0]?.tokenFile??"",provider:m,isDefault:f.some(y=>y.isDefault),successCount:f.reduce((y,S)=>y+S.successCount,0),failureCount:f.reduce((y,S)=>y+S.failureCount,0),lastUsedAt:f.reduce((y,S)=>aD(y,S.lastUsedAt),void 0),paused:f.every(y=>!!y.paused),memberIds:f.map(y=>y.id),variants:f}})}function xb(n,a){const o=n+a;return o===0?100:Math.round(n/o*100)}const ky=["#1e6091","#2d8a6e","#d4a012","#c92a2d","#c45a1a","#6b9c4d","#3d5a73","#cc7614","#3a7371","#7c5fc4"];function rD(){const{data:n,isLoading:a,error:o}=Kk(),{data:r,isLoading:c,dataUpdatedAt:d}=M1(),[f,p]=C.useState("");C.useEffect(()=>{if(!d)return;const N=()=>{const O=Math.floor((Date.now()-d)/1e3);O<60?p(`${O}s ago`):p(`${Math.floor(O/60)}m ago`)};N();const E=setInterval(N,1e3);return()=>clearInterval(E)},[d]);const{accounts:m,totalSuccess:y,totalFailure:S,totalRequests:x,providerStats:b}=C.useMemo(()=>{if(!n?.authStatus)return{accounts:[],totalSuccess:0,totalFailure:0,totalRequests:0,providerStats:[]};const N=[],E=new Map;let O=0,L=0,j=0;n.authStatus.forEach(k=>{const T=k.provider;E.has(T)||E.set(T,{success:0,failure:0,accounts:[]});const w=E.get(T);if(!w)return;const R=(k.accounts??[]).map(B=>({...B,provider:B.provider||k.provider}));sD(R,r).forEach(B=>{O+=B.successCount,L+=B.failureCount,w.success+=B.successCount,w.failure+=B.failureCount;const z={id:B.id,email:B.email,tokenFile:B.tokenFile,provider:k.provider,displayName:k.displayName,isDefault:B.isDefault,successCount:B.successCount,failureCount:B.failureCount,lastUsedAt:B.lastUsedAt,color:ky[j%ky.length],projectId:B.projectId,paused:B.paused,tier:B.tier,memberIds:B.memberIds,variants:B.variants};N.push(z),w.accounts.push(z),j++})});const A=[];return E.forEach((k,T)=>{k.accounts.length!==0&&A.push({provider:T,displayName:bf(T),totalRequests:k.success+k.failure,successCount:k.success,failureCount:k.failure,accountCount:k.accounts.length,accounts:k.accounts})}),A.sort((k,T)=>T.totalRequests-k.totalRequests),{accounts:N,totalSuccess:O,totalFailure:L,totalRequests:O+L,providerStats:A}},[n?.authStatus,r]),D=x>0?Math.round(y/x*100):100;return{accounts:m,totalSuccess:y,totalFailure:S,totalRequests:x,providerStats:b,overallSuccessRate:D,isLoading:a||c,error:o??null,timeSinceUpdate:f}}function lD(){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:Xt.success}}),l.jsx("div",{className:"absolute w-3 h-3 rounded-full animate-pulse opacity-40",style:{backgroundColor:Xt.success}}),l.jsx("div",{className:"relative w-2 h-2 rounded-full z-10",style:{backgroundColor:Xt.success}})]})}function cD({success:n,failure:a}){return n===0&&a===0?l.jsx("span",{className:"text-[9px] text-muted-foreground/50 font-mono",children:"no activity"}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex items-center gap-0.5",children:[l.jsx(Vs,{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(Zd,{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 uD({stats:n,isHovered:a,privacyMode:o,onSelect:r,onMouseEnter:c,onMouseLeave:d}){const f=xb(n.successCount,n.failureCount),p=xf[n.provider.toLowerCase()]||"#6b7280";return l.jsxs("button",{onClick:r,onMouseEnter:c,onMouseLeave:d,className:K("group relative rounded-xl p-4 text-left transition-all duration-300","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border border-border/50 dark:border-white/[0.08]","hover:border-opacity-50 hover:scale-[1.02] hover:shadow-lg",a&&"ring-1"),style:{borderColor:a?p:void 0,"--ring-color":p},children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx(wf,{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(Ml,{className:K("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:"Stats"}),l.jsx(cD,{success:n.successCount,failure:n.failureCount})]}),l.jsxs("div",{className:"flex justify-between text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:"Success Rate"}),l.jsxs("span",{className:"font-mono font-semibold",style:{color:f===100?Xt.success:f>=95?Xt.degraded:Xt.failed},children:[f,"%"]})]}),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:`${f}%`,backgroundColor:p}})})]}),l.jsxs("div",{className:"flex gap-1 mt-3 items-center",children:[n.accounts.slice(0,5).map(m=>{const y=n.provider==="agy"&&!m.projectId;return l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:K("w-2 h-2 rounded-full",m.paused&&"opacity-50"),style:{backgroundColor:m.color},title:o?"••••••":y1(m.id,m.email,m.tokenFile)}),y&&l.jsx(Di,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(Fn,{className:"absolute -top-1 -right-1 w-2.5 h-2.5 text-amber-500","aria-label":"Missing Project ID"})}),l.jsx(Na,{side:"top",className:"text-xs",children:"Missing Project ID - re-add account to fix"})]})})]},m.id)}),n.accounts.length>5&&l.jsxs("span",{className:"text-[10px] text-muted-foreground ml-1",children:["+",n.accounts.length-5]})]})]})}function fl({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 md="auth-monitor-selected-provider";function dD(){const{t:n}=Mt(),{accounts:a,totalSuccess:o,totalFailure:r,totalRequests:c,providerStats:d,overallSuccessRate:f,isLoading:p,error:m,timeSinceUpdate:y}=rD(),{privacyMode:S}=tf(),[x,b]=C.useState(()=>typeof window<"u"?localStorage.getItem(md):null),D=X=>{b(X),X?localStorage.setItem(md,X):localStorage.removeItem(md)},N=C.useMemo(()=>x&&d.some(X=>X.provider===x)?x:null,[x,d]),[E,O]=C.useState(null),L=qk(),j=Gk(),A=Fk(),k=Vk(),T=N?d.find(X=>X.provider===N):null,w=T?.accountCount??a.length,R=T?.successCount??o,B=T?.failureCount??r,z=T?.totalRequests??c,G=T?xb(T.successCount,T.failureCount):f,ne=(X,ye)=>{if(!N||L.isPending||j.isPending||A.isPending||k.isPending)return;if(X.length>1){ye?A.mutate({provider:N,accountIds:X}):k.mutate({provider:N,accountIds:X});return}const[te]=X;te&&(ye?L.mutate({provider:N,accountId:te}):j.mutate({provider:N,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(Ye,{className:"h-4 w-32"}),l.jsx(Ye,{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(X=>l.jsx(Ye,{className:"h-16 flex-1 rounded-lg"},X))}),l.jsx(Ye,{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(lD,{}),l.jsx("span",{className:"text-xs font-semibold tracking-tight text-foreground",children:"LIVE"}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Account Monitor"})]}),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(zS,{className:"w-3 h-3 animate-pulse"}),l.jsxs("span",{children:["Updated ",y||"now"]})]}),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:[z.toLocaleString()," req"]})]})]}),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(fl,{icon:l.jsx(zs,{className:"w-4 h-4"}),label:n("authMonitor.accounts"),value:w,color:"var(--accent)"}),l.jsx(fl,{icon:l.jsx(Vs,{className:"w-4 h-4"}),label:n("authMonitor.success"),value:R.toLocaleString(),color:Xt.success}),l.jsx(fl,{icon:l.jsx(Zd,{className:"w-4 h-4"}),label:n("authMonitor.failed"),value:B.toLocaleString(),color:B>0?Xt.failed:void 0}),l.jsx(fl,{icon:l.jsx(zs,{className:"w-4 h-4"}),label:n("authMonitor.successRate"),value:`${G}%`,color:G===100?Xt.success:G>=95?Xt.degraded:Xt.failed})]}),l.jsx("div",{className:"relative overflow-hidden",children:T?l.jsx(eD,{providerData:T,onBack:()=>D(null),onPauseToggle:ne,isPausingAccount:L.isPending||j.isPending||A.isPending||k.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(X=>l.jsx(uD,{stats:X,isHovered:E===X.provider,privacyMode:S,onSelect:()=>D(X.provider),onMouseEnter:()=>O(X.provider),onMouseLeave:()=>O(null)},X.provider))})]})})]})}const Kl=C.createContext(null);Kl.displayName="PanelGroupContext";const mt={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"},Nf=10,Ni=C.useLayoutEffect,Ay=hS.useId,fD=typeof Ay=="function"?Ay:()=>null;let hD=0;function kf(n=null){const a=fD(),o=C.useRef(n||a||null);return o.current===null&&(o.current=""+hD++),n??o.current}function bb({children:n,className:a="",collapsedSize:o,collapsible:r,defaultSize:c,forwardedRef:d,id:f,maxSize:p,minSize:m,onCollapse:y,onExpand:S,onResize:x,order:b,style:D,tagName:N="div",...E}){const O=C.useContext(Kl);if(O===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:L,expandPanel:j,getPanelSize:A,getPanelStyle:k,groupId:T,isPanelCollapsed:w,reevaluatePanelConstraints:R,registerPanel:B,resizePanel:z,unregisterPanel:G}=O,ne=kf(f),X=C.useRef({callbacks:{onCollapse:y,onExpand:S,onResize:x},constraints:{collapsedSize:o,collapsible:r,defaultSize:c,maxSize:p,minSize:m},id:ne,idIsFromProps:f!==void 0,order:b});C.useRef({didLogMissingDefaultSizeWarning:!1}),Ni(()=>{const{callbacks:te,constraints:ve}=X.current,I={...ve};X.current.id=ne,X.current.idIsFromProps=f!==void 0,X.current.order=b,te.onCollapse=y,te.onExpand=S,te.onResize=x,ve.collapsedSize=o,ve.collapsible=r,ve.defaultSize=c,ve.maxSize=p,ve.minSize=m,(I.collapsedSize!==ve.collapsedSize||I.collapsible!==ve.collapsible||I.maxSize!==ve.maxSize||I.minSize!==ve.minSize)&&R(X.current,I)}),Ni(()=>{const te=X.current;return B(te),()=>{G(te)}},[b,ne,B,G]),C.useImperativeHandle(d,()=>({collapse:()=>{L(X.current)},expand:te=>{j(X.current,te)},getId(){return ne},getSize(){return A(X.current)},isCollapsed(){return w(X.current)},isExpanded(){return!w(X.current)},resize:te=>{z(X.current,te)}}),[L,j,A,w,ne,z]);const ye=k(X.current,c);return C.createElement(N,{...E,children:n,className:a,id:ne,style:{...ye,...D},[mt.groupId]:T,[mt.panel]:"",[mt.panelCollapsible]:r||void 0,[mt.panelId]:ne,[mt.panelSize]:parseFloat(""+ye.flexGrow).toFixed(1)})}const Bs=C.forwardRef((n,a)=>C.createElement(bb,{...n,forwardedRef:a}));bb.displayName="Panel";Bs.displayName="forwardRef(Panel)";let Hd=null,xl=-1,Za=null;function pD(n,a,o){const r=(a&Nb)!==0,c=(a&kb)!==0,d=(a&Ab)!==0,f=(a&Db)!==0;if(a){if(r)return d?"se-resize":f?"ne-resize":"e-resize";if(c)return d?"sw-resize":f?"nw-resize":"w-resize";if(d)return"s-resize";if(f)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function mD(){Za!==null&&(document.head.removeChild(Za),Hd=null,Za=null,xl=-1)}function gd(n,a,o){var r,c;const d=pD(n,a);if(Hd!==d){if(Hd=d,Za===null&&(Za=document.createElement("style"),document.head.appendChild(Za)),xl>=0){var f;(f=Za.sheet)===null||f===void 0||f.removeRule(xl)}xl=(r=(c=Za.sheet)===null||c===void 0?void 0:c.insertRule(`*{cursor: ${d} !important;}`))!==null&&r!==void 0?r:-1}}function vb(n){return n.type==="keydown"}function Cb(n){return n.type.startsWith("pointer")}function Sb(n){return n.type.startsWith("mouse")}function ql(n){if(Cb(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Sb(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function gD(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function yD(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 xD(n,a){if(n===a)throw new Error("Cannot compare node with itself");const o={a:Ty(n),b:Ty(a)};let r;for(;o.a.at(-1)===o.b.at(-1);)n=o.a.pop(),a=o.b.pop(),r=n;Le(r,"Stacking order can only be calculated for elements with a common ancestor");const c={a:jy(Dy(o.a)),b:jy(Dy(o.b))};if(c.a===c.b){const d=r.childNodes,f={a:o.a.at(-1),b:o.b.at(-1)};let p=d.length;for(;p--;){const m=d[p];if(m===f.a)return 1;if(m===f.b)return-1}}return Math.sign(c.a-c.b)}const bD=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function vD(n){var a;const o=getComputedStyle((a=wb(n))!==null&&a!==void 0?a:n).display;return o==="flex"||o==="inline-flex"}function CD(n){const a=getComputedStyle(n);return!!(a.position==="fixed"||a.zIndex!=="auto"&&(a.position!=="static"||vD(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"||bD.test(a.willChange)||a.webkitOverflowScrolling==="touch")}function Dy(n){let a=n.length;for(;a--;){const o=n[a];if(Le(o,"Missing node"),CD(o))return o}return null}function jy(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ty(n){const a=[];for(;n;)a.push(n),n=wb(n);return a}function wb(n){const{parentNode:a}=n;return a&&a instanceof ShadowRoot?a.host:a}const Nb=1,kb=2,Ab=4,Db=8,SD=gD()==="coarse";let On=[],vo=!1,Ja=new Map,Gl=new Map;const Ks=new Set;function wD(n,a,o,r,c){var d;const{ownerDocument:f}=a,p={direction:o,element:a,hitAreaMargins:r,setResizeHandlerState:c},m=(d=Ja.get(f))!==null&&d!==void 0?d:0;return Ja.set(f,m+1),Ks.add(p),Nl(),function(){var S;Gl.delete(n),Ks.delete(p);const x=(S=Ja.get(f))!==null&&S!==void 0?S:1;if(Ja.set(f,x-1),Nl(),x===1&&Ja.delete(f),On.includes(p)){const b=On.indexOf(p);b>=0&&On.splice(b,1),Fl(),c("up",!0,null)}}}function ND(n){const{target:a}=n,{x:o,y:r}=ql(n);vo=!0,Af({target:a,x:o,y:r}),Nl(),On.length>0&&(kl("down",n),Fl(),n.preventDefault(),jb(a)||n.stopImmediatePropagation())}function yd(n){const{x:a,y:o}=ql(n);if(vo&&n.type!=="pointerleave"&&n.buttons===0&&(vo=!1,kl("up",n)),!vo){const{target:r}=n;Af({target:r,x:a,y:o})}kl("move",n),Fl(),On.length>0&&n.preventDefault()}function xd(n){const{target:a}=n,{x:o,y:r}=ql(n);Gl.clear(),vo=!1,On.length>0&&(n.preventDefault(),jb(a)||n.stopImmediatePropagation()),kl("up",n),Af({target:a,x:o,y:r}),Fl(),Nl()}function jb(n){let a=n;for(;a;){if(a.hasAttribute(mt.resizeHandle))return!0;a=a.parentElement}return!1}function Af({target:n,x:a,y:o}){On.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),Ks.forEach(c=>{const{element:d,hitAreaMargins:f}=c,p=d.getBoundingClientRect(),{bottom:m,left:y,right:S,top:x}=p,b=SD?f.coarse:f.fine;if(a>=y-b&&a<=S+b&&o>=x-b&&o<=m+b){if(r!==null&&document.contains(r)&&d!==r&&!d.contains(r)&&!r.contains(d)&&xD(r,d)>0){let N=r,E=!1;for(;N&&!N.contains(d);){if(yD(N.getBoundingClientRect(),p)){E=!0;break}N=N.parentElement}if(E)return}On.push(c)}})}function bd(n,a){Gl.set(n,a)}function Fl(){let n=!1,a=!1;On.forEach(r=>{const{direction:c}=r;c==="horizontal"?n=!0:a=!0});let o=0;Gl.forEach(r=>{o|=r}),n&&a?gd("intersection",o):n?gd("horizontal",o):a?gd("vertical",o):mD()}let vd;function Nl(){var n;(n=vd)===null||n===void 0||n.abort(),vd=new AbortController;const a={capture:!0,signal:vd.signal};Ks.size&&(vo?(On.length>0&&Ja.forEach((o,r)=>{const{body:c}=r;o>0&&(c.addEventListener("contextmenu",xd,a),c.addEventListener("pointerleave",yd,a),c.addEventListener("pointermove",yd,a))}),Ja.forEach((o,r)=>{const{body:c}=r;c.addEventListener("pointerup",xd,a),c.addEventListener("pointercancel",xd,a)})):Ja.forEach((o,r)=>{const{body:c}=r;o>0&&(c.addEventListener("pointerdown",ND,a),c.addEventListener("pointermove",yd,a))}))}function kl(n,a){Ks.forEach(o=>{const{setResizeHandlerState:r}=o,c=On.includes(o);r(n,c,a)})}function kD(){const[n,a]=C.useState(0);return C.useCallback(()=>a(o=>o+1),[])}function Le(n,a){if(!n)throw console.error(a),Error(a)}function ji(n,a,o=Nf){return n.toFixed(o)===a.toFixed(o)?0:n>a?1:-1}function ya(n,a,o=Nf){return ji(n,a,o)===0}function dn(n,a,o){return ji(n,a,o)===0}function AD(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 xo({panelConstraints:n,panelIndex:a,size:o}){const r=n[a];Le(r!=null,`Panel constraints not found for index ${a}`);let{collapsedSize:c=0,collapsible:d,maxSize:f=100,minSize:p=0}=r;if(ji(o,p)<0)if(d){const m=(c+p)/2;ji(o,m)<0?o=c:o=p}else o=p;return o=Math.min(f,o),o=parseFloat(o.toFixed(Nf)),o}function js({delta:n,initialLayout:a,panelConstraints:o,pivotIndices:r,prevLayout:c,trigger:d}){if(dn(n,0))return a;const f=[...a],[p,m]=r;Le(p!=null,"Invalid first pivot index"),Le(m!=null,"Invalid second pivot index");let y=0;if(d==="keyboard"){{const x=n<0?m:p,b=o[x];Le(b,`Panel constraints not found for index ${x}`);const{collapsedSize:D=0,collapsible:N,minSize:E=0}=b;if(N){const O=a[x];if(Le(O!=null,`Previous layout not found for panel index ${x}`),dn(O,D)){const L=E-O;ji(L,Math.abs(n))>0&&(n=n<0?0-L:L)}}}{const x=n<0?p:m,b=o[x];Le(b,`No panel constraints found for index ${x}`);const{collapsedSize:D=0,collapsible:N,minSize:E=0}=b;if(N){const O=a[x];if(Le(O!=null,`Previous layout not found for panel index ${x}`),dn(O,E)){const L=O-D;ji(L,Math.abs(n))>0&&(n=n<0?0-L:L)}}}}{const x=n<0?1:-1;let b=n<0?m:p,D=0;for(;;){const E=a[b];Le(E!=null,`Previous layout not found for panel index ${b}`);const L=xo({panelConstraints:o,panelIndex:b,size:100})-E;if(D+=L,b+=x,b<0||b>=o.length)break}const N=Math.min(Math.abs(n),Math.abs(D));n=n<0?0-N:N}{let b=n<0?p:m;for(;b>=0&&b<o.length;){const D=Math.abs(n)-Math.abs(y),N=a[b];Le(N!=null,`Previous layout not found for panel index ${b}`);const E=N-D,O=xo({panelConstraints:o,panelIndex:b,size:E});if(!dn(N,O)&&(y+=N-O,f[b]=O,y.toFixed(3).localeCompare(Math.abs(n).toFixed(3),void 0,{numeric:!0})>=0))break;n<0?b--:b++}}if(AD(c,f))return c;{const x=n<0?m:p,b=a[x];Le(b!=null,`Previous layout not found for panel index ${x}`);const D=b+y,N=xo({panelConstraints:o,panelIndex:x,size:D});if(f[x]=N,!dn(N,D)){let E=D-N,L=n<0?m:p;for(;L>=0&&L<o.length;){const j=f[L];Le(j!=null,`Previous layout not found for panel index ${L}`);const A=j+E,k=xo({panelConstraints:o,panelIndex:L,size:A});if(dn(j,k)||(E-=k-j,f[L]=k),dn(E,0))break;n>0?L--:L++}}}const S=f.reduce((x,b)=>b+x,0);return dn(S,100)?f:c}function DD({layout:n,panelsArray:a,pivotIndices:o}){let r=0,c=100,d=0,f=0;const p=o[0];Le(p!=null,"No pivot index found"),a.forEach((x,b)=>{const{constraints:D}=x,{maxSize:N=100,minSize:E=0}=D;b===p?(r=E,c=N):(d+=E,f+=N)});const m=Math.min(c,100-d),y=Math.max(r,100-f),S=n[p];return{valueMax:m,valueMin:y,valueNow:S}}function qs(n,a=document){return Array.from(a.querySelectorAll(`[${mt.resizeHandleId}][data-panel-group-id="${n}"]`))}function Tb(n,a,o=document){const c=qs(n,o).findIndex(d=>d.getAttribute(mt.resizeHandleId)===a);return c??null}function Mb(n,a,o){const r=Tb(n,a,o);return r!=null?[r,r+1]:[-1,-1]}function jD(n){return n instanceof HTMLElement?!0:typeof n=="object"&&n!==null&&"tagName"in n&&"getAttribute"in n}function Eb(n,a=document){if(jD(a)&&a.dataset.panelGroupId==n)return a;const o=a.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return o||null}function Vl(n,a=document){const o=a.querySelector(`[${mt.resizeHandleId}="${n}"]`);return o||null}function TD(n,a,o,r=document){var c,d,f,p;const m=Vl(a,r),y=qs(n,r),S=m?y.indexOf(m):-1,x=(c=(d=o[S])===null||d===void 0?void 0:d.id)!==null&&c!==void 0?c:null,b=(f=(p=o[S+1])===null||p===void 0?void 0:p.id)!==null&&f!==void 0?f:null;return[x,b]}function MD({committedValuesRef:n,eagerValuesRef:a,groupId:o,layout:r,panelDataArray:c,panelGroupElement:d,setLayout:f}){C.useRef({didWarnAboutMissingResizeHandle:!1}),Ni(()=>{if(!d)return;const p=qs(o,d);for(let m=0;m<c.length-1;m++){const{valueMax:y,valueMin:S,valueNow:x}=DD({layout:r,panelsArray:c,pivotIndices:[m,m+1]}),b=p[m];if(b!=null){const D=c[m];Le(D,`No panel data found for index "${m}"`),b.setAttribute("aria-controls",D.id),b.setAttribute("aria-valuemax",""+Math.round(y)),b.setAttribute("aria-valuemin",""+Math.round(S)),b.setAttribute("aria-valuenow",x!=null?""+Math.round(x):"")}}return()=>{p.forEach((m,y)=>{m.removeAttribute("aria-controls"),m.removeAttribute("aria-valuemax"),m.removeAttribute("aria-valuemin"),m.removeAttribute("aria-valuenow")})}},[o,r,c,d]),C.useEffect(()=>{if(!d)return;const p=a.current;Le(p,"Eager values not found");const{panelDataArray:m}=p,y=Eb(o,d);Le(y!=null,`No group found for id "${o}"`);const S=qs(o,d);Le(S,`No resize handles found for group id "${o}"`);const x=S.map(b=>{const D=b.getAttribute(mt.resizeHandleId);Le(D,"Resize handle element has no handle id attribute");const[N,E]=TD(o,D,m,d);if(N==null||E==null)return()=>{};const O=L=>{if(!L.defaultPrevented)switch(L.key){case"Enter":{L.preventDefault();const j=m.findIndex(A=>A.id===N);if(j>=0){const A=m[j];Le(A,`No panel data found for index ${j}`);const k=r[j],{collapsedSize:T=0,collapsible:w,minSize:R=0}=A.constraints;if(k!=null&&w){const B=js({delta:dn(k,T)?R-T:T-k,initialLayout:r,panelConstraints:m.map(z=>z.constraints),pivotIndices:Mb(o,D,d),prevLayout:r,trigger:"keyboard"});r!==B&&f(B)}}break}}};return b.addEventListener("keydown",O),()=>{b.removeEventListener("keydown",O)}});return()=>{x.forEach(b=>b())}},[d,n,a,o,r,c,f])}function My(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 Ob(n,a){const o=n==="horizontal",{x:r,y:c}=ql(a);return o?r:c}function ED(n,a,o,r,c){const d=o==="horizontal",f=Vl(a,c);Le(f,`No resize handle element found for id "${a}"`);const p=f.getAttribute(mt.groupId);Le(p,"Resize handle element has no group id attribute");let{initialCursorPosition:m}=r;const y=Ob(o,n),S=Eb(p,c);Le(S,`No group element found for id "${p}"`);const x=S.getBoundingClientRect(),b=d?x.width:x.height;return(y-m)/b*100}function OD(n,a,o,r,c,d){if(vb(n)){const f=o==="horizontal";let p=0;n.shiftKey?p=100:c!=null?p=c:p=10;let m=0;switch(n.key){case"ArrowDown":m=f?0:p;break;case"ArrowLeft":m=f?-p:0;break;case"ArrowRight":m=f?p:0;break;case"ArrowUp":m=f?0:-p;break;case"End":m=100;break;case"Home":m=-100;break}return m}else return r==null?0:ED(n,a,o,r,d)}function PD({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 f=o[d];Le(f,`Panel constraints not found for index ${d}`);const{defaultSize:p}=f;p!=null&&(r++,a[d]=p,c-=p)}for(let d=0;d<n.length;d++){const f=o[d];Le(f,`Panel constraints not found for index ${d}`);const{defaultSize:p}=f;if(p!=null)continue;const m=n.length-r,y=c/m;r++,a[d]=y,c-=y}return a}function go(n,a,o){a.forEach((r,c)=>{const d=n[c];Le(d,`Panel data not found for index ${c}`);const{callbacks:f,constraints:p,id:m}=d,{collapsedSize:y=0,collapsible:S}=p,x=o[m];if(x==null||r!==x){o[m]=r;const{onCollapse:b,onExpand:D,onResize:N}=f;N&&N(r,x),S&&(b||D)&&(D&&(x==null||ya(x,y))&&!ya(r,y)&&D(),b&&(x==null||!ya(x,y))&&ya(r,y)&&b())}})}function hl(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 LD({defaultSize:n,dragState:a,layout:o,panelData:r,panelIndex:c,precision:d=3}){const f=o[c];let p;return f==null?p=n!=null?n.toFixed(d):"1":r.length===1?p="1":p=f.toFixed(d),{flexBasis:0,flexGrow:p,flexShrink:1,overflow:"hidden",pointerEvents:a!==null?"none":void 0}}function RD(n,a=10){let o=null;return(...c)=>{o!==null&&clearTimeout(o),o=setTimeout(()=>{n(...c)},a)}}function Ey(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 Pb(n){return`react-resizable-panels:${n}`}function Lb(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 Rb(n,a){try{const o=Pb(n),r=a.getItem(o);if(r){const c=JSON.parse(r);if(typeof c=="object"&&c!=null)return c}}catch{}return null}function _D(n,a,o){var r,c;const d=(r=Rb(n,o))!==null&&r!==void 0?r:{},f=Lb(a);return(c=d[f])!==null&&c!==void 0?c:null}function zD(n,a,o,r,c){var d;const f=Pb(n),p=Lb(a),m=(d=Rb(n,c))!==null&&d!==void 0?d:{};m[p]={expandToSizes:Object.fromEntries(o.entries()),layout:r};try{c.setItem(f,JSON.stringify(m))}catch(y){console.error(y)}}function Oy({layout:n,panelConstraints:a}){const o=[...n],r=o.reduce((d,f)=>d+f,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 f=o[d];Le(f!=null,`No layout data found for index ${d}`);const p=100/r*f;o[d]=p}let c=0;for(let d=0;d<a.length;d++){const f=o[d];Le(f!=null,`No layout data found for index ${d}`);const p=xo({panelConstraints:a,panelIndex:d,size:f});f!=p&&(c+=f-p,o[d]=p)}if(!dn(c,0))for(let d=0;d<a.length;d++){const f=o[d];Le(f!=null,`No layout data found for index ${d}`);const p=f+c,m=xo({panelConstraints:a,panelIndex:d,size:p});if(f!==m&&(c-=m-f,o[d]=m,dn(c,0)))break}return o}const ID=100,Ts={getItem:n=>(Ey(Ts),Ts.getItem(n)),setItem:(n,a)=>{Ey(Ts),Ts.setItem(n,a)}},Py={};function _b({autoSaveId:n=null,children:a,className:o="",direction:r,forwardedRef:c,id:d=null,onLayout:f=null,keyboardResizeBy:p=null,storage:m=Ts,style:y,tagName:S="div",...x}){const b=kf(d),D=C.useRef(null),[N,E]=C.useState(null),[O,L]=C.useState([]),j=kD(),A=C.useRef({}),k=C.useRef(new Map),T=C.useRef(0),w=C.useRef({autoSaveId:n,direction:r,dragState:N,id:b,keyboardResizeBy:p,onLayout:f,storage:m}),R=C.useRef({layout:O,panelDataArray:[],panelDataArrayChanged:!1});C.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),C.useImperativeHandle(c,()=>({getId:()=>w.current.id,getLayout:()=>{const{layout:Q}=R.current;return Q},setLayout:Q=>{const{onLayout:J}=w.current,{layout:re,panelDataArray:ie}=R.current,se=Oy({layout:Q,panelConstraints:ie.map(ge=>ge.constraints)});My(re,se)||(L(se),R.current.layout=se,J&&J(se),go(ie,se,A.current))}}),[]),Ni(()=>{w.current.autoSaveId=n,w.current.direction=r,w.current.dragState=N,w.current.id=b,w.current.onLayout=f,w.current.storage=m}),MD({committedValuesRef:w,eagerValuesRef:R,groupId:b,layout:O,panelDataArray:R.current.panelDataArray,setLayout:L,panelGroupElement:D.current}),C.useEffect(()=>{const{panelDataArray:Q}=R.current;if(n){if(O.length===0||O.length!==Q.length)return;let J=Py[n];J==null&&(J=RD(zD,ID),Py[n]=J);const re=[...Q],ie=new Map(k.current);J(n,re,ie,O,m)}},[n,O,m]),C.useEffect(()=>{});const B=C.useCallback(Q=>{const{onLayout:J}=w.current,{layout:re,panelDataArray:ie}=R.current;if(Q.constraints.collapsible){const se=ie.map(lt=>lt.constraints),{collapsedSize:ge=0,panelSize:De,pivotIndices:He}=Ci(ie,Q,re);if(Le(De!=null,`Panel size not found for panel "${Q.id}"`),!ya(De,ge)){k.current.set(Q.id,De);const gt=yo(ie,Q)===ie.length-1?De-ge:ge-De,qe=js({delta:gt,initialLayout:re,panelConstraints:se,pivotIndices:He,prevLayout:re,trigger:"imperative-api"});hl(re,qe)||(L(qe),R.current.layout=qe,J&&J(qe),go(ie,qe,A.current))}}},[]),z=C.useCallback((Q,J)=>{const{onLayout:re}=w.current,{layout:ie,panelDataArray:se}=R.current;if(Q.constraints.collapsible){const ge=se.map(ct=>ct.constraints),{collapsedSize:De=0,panelSize:He=0,minSize:lt=0,pivotIndices:gt}=Ci(se,Q,ie),qe=J??lt;if(ya(He,De)){const ct=k.current.get(Q.id),Bt=ct!=null&&ct>=qe?ct:qe,Yn=yo(se,Q)===se.length-1?He-Bt:Bt-He,je=js({delta:Yn,initialLayout:ie,panelConstraints:ge,pivotIndices:gt,prevLayout:ie,trigger:"imperative-api"});hl(ie,je)||(L(je),R.current.layout=je,re&&re(je),go(se,je,A.current))}}},[]),G=C.useCallback(Q=>{const{layout:J,panelDataArray:re}=R.current,{panelSize:ie}=Ci(re,Q,J);return Le(ie!=null,`Panel size not found for panel "${Q.id}"`),ie},[]),ne=C.useCallback((Q,J)=>{const{panelDataArray:re}=R.current,ie=yo(re,Q);return LD({defaultSize:J,dragState:N,layout:O,panelData:re,panelIndex:ie})},[N,O]),X=C.useCallback(Q=>{const{layout:J,panelDataArray:re}=R.current,{collapsedSize:ie=0,collapsible:se,panelSize:ge}=Ci(re,Q,J);return Le(ge!=null,`Panel size not found for panel "${Q.id}"`),se===!0&&ya(ge,ie)},[]),ye=C.useCallback(Q=>{const{layout:J,panelDataArray:re}=R.current,{collapsedSize:ie=0,collapsible:se,panelSize:ge}=Ci(re,Q,J);return Le(ge!=null,`Panel size not found for panel "${Q.id}"`),!se||ji(ge,ie)>0},[]),te=C.useCallback(Q=>{const{panelDataArray:J}=R.current;J.push(Q),J.sort((re,ie)=>{const se=re.order,ge=ie.order;return se==null&&ge==null?0:se==null?-1:ge==null?1:se-ge}),R.current.panelDataArrayChanged=!0,j()},[j]);Ni(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:Q,onLayout:J,storage:re}=w.current,{layout:ie,panelDataArray:se}=R.current;let ge=null;if(Q){const He=_D(Q,se,re);He&&(k.current=new Map(Object.entries(He.expandToSizes)),ge=He.layout)}ge==null&&(ge=PD({panelDataArray:se}));const De=Oy({layout:ge,panelConstraints:se.map(He=>He.constraints)});My(ie,De)||(L(De),R.current.layout=De,J&&J(De),go(se,De,A.current))}}),Ni(()=>{const Q=R.current;return()=>{Q.layout=[]}},[]);const ve=C.useCallback(Q=>{let J=!1;const re=D.current;return re&&window.getComputedStyle(re,null).getPropertyValue("direction")==="rtl"&&(J=!0),function(se){se.preventDefault();const ge=D.current;if(!ge)return()=>null;const{direction:De,dragState:He,id:lt,keyboardResizeBy:gt,onLayout:qe}=w.current,{layout:ct,panelDataArray:Bt}=R.current,{initialLayout:Zt}=He??{},Yn=Mb(lt,Q,ge);let je=OD(se,Q,De,He,gt,ge);const Jt=De==="horizontal";Jt&&J&&(je=-je);const Pn=Bt.map($n=>$n.constraints),en=js({delta:je,initialLayout:Zt??ct,panelConstraints:Pn,pivotIndices:Yn,prevLayout:ct,trigger:vb(se)?"keyboard":"mouse-or-touch"}),Aa=!hl(ct,en);(Cb(se)||Sb(se))&&T.current!=je&&(T.current=je,!Aa&&je!==0?Jt?bd(Q,je<0?Nb:kb):bd(Q,je<0?Ab:Db):bd(Q,0)),Aa&&(L(en),R.current.layout=en,qe&&qe(en),go(Bt,en,A.current))}},[]),I=C.useCallback((Q,J)=>{const{onLayout:re}=w.current,{layout:ie,panelDataArray:se}=R.current,ge=se.map(ct=>ct.constraints),{panelSize:De,pivotIndices:He}=Ci(se,Q,ie);Le(De!=null,`Panel size not found for panel "${Q.id}"`);const gt=yo(se,Q)===se.length-1?De-J:J-De,qe=js({delta:gt,initialLayout:ie,panelConstraints:ge,pivotIndices:He,prevLayout:ie,trigger:"imperative-api"});hl(ie,qe)||(L(qe),R.current.layout=qe,re&&re(qe),go(se,qe,A.current))},[]),Z=C.useCallback((Q,J)=>{const{layout:re,panelDataArray:ie}=R.current,{collapsedSize:se=0,collapsible:ge}=J,{collapsedSize:De=0,collapsible:He,maxSize:lt=100,minSize:gt=0}=Q.constraints,{panelSize:qe}=Ci(ie,Q,re);qe!=null&&(ge&&He&&ya(qe,se)?ya(se,De)||I(Q,De):qe<gt?I(Q,gt):qe>lt&&I(Q,lt))},[I]),ae=C.useCallback((Q,J)=>{const{direction:re}=w.current,{layout:ie}=R.current;if(!D.current)return;const se=Vl(Q,D.current);Le(se,`Drag handle element not found for id "${Q}"`);const ge=Ob(re,J);E({dragHandleId:Q,dragHandleRect:se.getBoundingClientRect(),initialCursorPosition:ge,initialLayout:ie})},[]),W=C.useCallback(()=>{E(null)},[]),oe=C.useCallback(Q=>{const{panelDataArray:J}=R.current,re=yo(J,Q);re>=0&&(J.splice(re,1),delete A.current[Q.id],R.current.panelDataArrayChanged=!0,j())},[j]),ce=C.useMemo(()=>({collapsePanel:B,direction:r,dragState:N,expandPanel:z,getPanelSize:G,getPanelStyle:ne,groupId:b,isPanelCollapsed:X,isPanelExpanded:ye,reevaluatePanelConstraints:Z,registerPanel:te,registerResizeHandle:ve,resizePanel:I,startDragging:ae,stopDragging:W,unregisterPanel:oe,panelGroupElement:D.current}),[B,N,r,z,G,ne,b,X,ye,Z,te,ve,I,ae,W,oe]),he={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return C.createElement(Kl.Provider,{value:ce},C.createElement(S,{...x,children:a,className:o,id:d,ref:D,style:{...he,...y},[mt.group]:"",[mt.groupDirection]:r,[mt.groupId]:b}))}const Df=C.forwardRef((n,a)=>C.createElement(_b,{...n,forwardedRef:a}));_b.displayName="PanelGroup";Df.displayName="forwardRef(PanelGroup)";function yo(n,a){return n.findIndex(o=>o===a||o.id===a.id)}function Ci(n,a,o){const r=yo(n,a),d=r===n.length-1?[r-1,r]:[r,r+1],f=o[r];return{...a.constraints,panelSize:f,pivotIndices:d}}function UD({disabled:n,handleId:a,resizeHandler:o,panelGroupElement:r}){C.useEffect(()=>{if(n||o==null||r==null)return;const c=Vl(a,r);if(c==null)return;const d=f=>{if(!f.defaultPrevented)switch(f.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{f.preventDefault(),o(f);break}case"F6":{f.preventDefault();const p=c.getAttribute(mt.groupId);Le(p,`No group element found for id "${p}"`);const m=qs(p,r),y=Tb(p,a,r);Le(y!==null,`No resize element found for id "${a}"`);const S=f.shiftKey?y>0?y-1:m.length-1:y+1<m.length?y+1:0;m[S].focus();break}}};return c.addEventListener("keydown",d),()=>{c.removeEventListener("keydown",d)}},[r,n,a,o])}function jf({children:n=null,className:a="",disabled:o=!1,hitAreaMargins:r,id:c,onBlur:d,onClick:f,onDragging:p,onFocus:m,onPointerDown:y,onPointerUp:S,style:x={},tabIndex:b=0,tagName:D="div",...N}){var E,O;const L=C.useRef(null),j=C.useRef({onClick:f,onDragging:p,onPointerDown:y,onPointerUp:S});C.useEffect(()=>{j.current.onClick=f,j.current.onDragging=p,j.current.onPointerDown=y,j.current.onPointerUp=S});const A=C.useContext(Kl);if(A===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:k,groupId:T,registerResizeHandle:w,startDragging:R,stopDragging:B,panelGroupElement:z}=A,G=kf(c),[ne,X]=C.useState("inactive"),[ye,te]=C.useState(!1),[ve,I]=C.useState(null),Z=C.useRef({state:ne});Ni(()=>{Z.current.state=ne}),C.useEffect(()=>{if(o)I(null);else{const ce=w(G);I(()=>ce)}},[o,G,w]);const ae=(E=r?.coarse)!==null&&E!==void 0?E:15,W=(O=r?.fine)!==null&&O!==void 0?O:5;C.useEffect(()=>{if(o||ve==null)return;const ce=L.current;Le(ce,"Element ref not attached");let he=!1;return wD(G,ce,k,{coarse:ae,fine:W},(J,re,ie)=>{if(!re){X("inactive");return}switch(J){case"down":{X("drag"),he=!1,Le(ie,'Expected event to be defined for "down" action'),R(G,ie);const{onDragging:se,onPointerDown:ge}=j.current;se?.(!0),ge?.();break}case"move":{const{state:se}=Z.current;he=!0,se!=="drag"&&X("hover"),Le(ie,'Expected event to be defined for "move" action'),ve(ie);break}case"up":{X("hover"),B();const{onClick:se,onDragging:ge,onPointerUp:De}=j.current;ge?.(!1),De?.(),he||se?.();break}}})},[ae,k,o,W,w,G,ve,R,B]),UD({disabled:o,handleId:G,resizeHandler:ve,panelGroupElement:z});const oe={touchAction:"none",userSelect:"none"};return C.createElement(D,{...N,children:n,className:a,id:c,onBlur:()=>{te(!1),d?.()},onFocus:()=>{te(!0),m?.()},ref:L,role:"separator",style:{...oe,...x},tabIndex:b,[mt.groupDirection]:k,[mt.groupId]:T,[mt.resizeHandle]:"",[mt.resizeHandleActive]:ne==="drag"?"pointer":ye?"keyboard":void 0,[mt.resizeHandleEnabled]:!o,[mt.resizeHandleId]:G,[mt.resizeHandleState]:ne})}jf.displayName="PanelResizeHandle";const ko=C.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(Sx,{ref:r,className:K("relative overflow-hidden",n),...o,children:[l.jsx(eS,{className:"h-full w-full rounded-[inherit]",children:a}),l.jsx(zb,{}),l.jsx(tS,{})]}));ko.displayName=Sx.displayName;const zb=C.forwardRef(({className:n,orientation:a="vertical",...o},r)=>l.jsx(wx,{ref:r,orientation:a,className:K("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(nS,{className:"relative flex-1 rounded-full bg-border"})}));zb.displayName=wx.displayName;function HD(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],f=`${d.slice(0,10)}T${d.slice(11,13)}:${d.slice(13,15)}:${d.slice(15,17)}`;a.timestamp=new Date(f)}return a}function BD(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":KD(d,a);break;case"headers":a.requestHeaders=qD(d);break;case"request_body":a.requestBody=d;break;case"response":GD(d,a);break}}return FD(a),a}function KD(n,a){const o=n.split(`
|
|
11
|
-
`);for(const r of o){const[c,...d]=r.split(":"),f=d.join(":").trim();switch(c?.trim()?.toLowerCase()){case"version":a.version=f;break;case"url":a.url=f;break;case"method":a.method=f;break;case"timestamp":a.timestamp=f;break}}}function qD(n){const a={},o=n.split(`
|
|
12
|
-
`);for(const r of o){const c=r.indexOf(":");if(c>0){const d=r.slice(0,c).trim(),f=r.slice(c+1).trim();d&&(a[d]=f)}}return a}function GD(n,a){const o=n.split(`
|
|
13
|
-
`);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(" ")||$D(a.statusCode);continue}if(d.trim()===""&&!r){r=!0;continue}if(r)c.push(d);else{const f=d.indexOf(":");if(f>0){const p=d.slice(0,f).trim(),m=d.slice(f+1).trim();p&&(a.responseHeaders[p]=m)}}}a.responseBody=c.join(`
|
|
14
|
-
`).trim()}function FD(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"),VD(n),n.statusCode===429&&YD(n)}function VD(n){if(n.requestBody)try{const a=JSON.parse(n.requestBody);typeof a.model=="string"&&(n.model=a.model)}catch{}}function YD(n){if(n.responseBody)try{const a=JSON.parse(n.responseBody),o=Bd(a);o!==null&&(n.quotaResetDelay=o);const r=Kd(a);r&&(n.quotaResetTimestamp=r)}catch{}}function Bd(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=Bd(a.error);if(o!==null)return o}if("details"in a&&Array.isArray(a.details))for(const o of a.details){const r=Bd(o);if(r!==null)return r}return null}function Kd(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=Kd(a.error);if(o)return o}if("details"in a&&Array.isArray(a.details))for(const o of a.details){const r=Kd(o);if(r)return r}return null}function $D(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 WD(n,a){const o=ef(),r=o==="zh-CN",c=o==="vi",d=Date.now(),f=n*1e3,p=d-f,m=Math.floor(p/1e3),y=Math.floor(m/60),S=Math.floor(y/60),x=Math.floor(S/24);return m<60?r?"刚刚":c?"vừa xong":"just now":y<60?r?`${y} 分钟前`:c?`${y} phút trước`:`${y}m ago`:S<24?r?`${S} 小时前`:c?`${S} giờ trước`:`${S}h ago`:x<7?r?`${x} 天前`:c?`${x} ngày trước`:`${x}d ago`:new Date(f).toLocaleDateString(o,{month:"short",day:"numeric"})}function QD(n){return n>=500?"text-red-500":n===429?"text-orange-500":n>=400?"text-yellow-500":"text-gray-500"}function XD(n,a){const o=ef();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 ZD(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 JD(n,a){if(!n)return null;const o=ef(),r=o==="zh-CN",c=o==="vi";try{const d=new Date(n),f=new Date,p=d.getTime()-f.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 x=Math.floor(m/60);return r?`${x}分钟`:c?`${x} phút`:`${x}m`}const y=Math.floor(m/3600),S=Math.floor(m%3600/60);return r?S>0?`${y}小时 ${S}分钟`:`${y}小时`:c?S>0?`${y} giờ ${S} phút`:`${y} giờ`:S>0?`${y}h ${S}m`:`${y}h`}catch{return null}}function ej(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 tj(n){return n||""}function nj({name:n,size:a,modified:o,isSelected:r,onClick:c,statusCode:d,model:f}){const p=C.useMemo(()=>HD(n),[n]),m=C.useMemo(()=>tj(f),[f]);return l.jsxs("button",{onClick:c,className:K("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:K("shrink-0 text-[10px] font-bold px-1.5 py-0.5 rounded min-w-[32px] text-center",ej(d)),children:d||"???"}),l.jsx(wf,{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(So,{className:"w-2.5 h-2.5"}),l.jsx("span",{children:WD(o)})]})]})]})}function Ly({value:n,className:a,variant:o="outline",size:r="icon",label:c="Copy to clipboard"}){const[d,f]=C.useState(!1),p=()=>{navigator.clipboard.writeText(n),f(!0),setTimeout(()=>f(!1),2e3)};return l.jsx(Di,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs(at,{size:r,variant:o,className:K("relative z-10 text-muted-foreground hover:text-foreground",a),onClick:m=>{m.stopPropagation(),p()},children:[d?l.jsx(Co,{className:"h-3.5 w-3.5 text-green-500"}):l.jsx(vl,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"sr-only",children:c})]})}),l.jsx(Na,{children:l.jsx("p",{children:d?"Copied!":c})})]})})}function Ns({active:n,onClick:a,children:o,icon:r}){return l.jsxs("button",{onClick:a,className:K("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 Ib({code:n}){const a=QD(n);return l.jsx("span",{className:K("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 aj({parsed:n}){const{t:a}=Mt(),o=ZD(n.quotaResetDelay)||JD(n.quotaResetTimestamp),r=a("errorLogs.na");return l.jsx(ko,{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(Ib,{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:XD(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(IS,{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(So,{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:K("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(Fn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}):n.errorType==="auth"?l.jsx(Fn,{className:"w-4 h-4 mt-0.5 text-red-500 shrink-0"}):l.jsx(Pl,{className:"w-4 h-4 mt-0.5 text-blue-500 shrink-0"}),l.jsxs("div",{className:K("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 ij({headers:n}){const a=Object.entries(n);return a.length===0?l.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:"No headers available"}):l.jsx(ko,{className:"h-full",children:l.jsx("div",{className:"p-4 space-y-1",children:a.map(([o,r])=>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:[o,":"]}),l.jsx("span",{className:"break-all",children:r})]},o))})})}function Ry({content:n,label:a}){const{t:o}=Mt();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(ko,{className:"h-full",children:l.jsx("pre",{className:K("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 oj({content:n}){return l.jsx(ko,{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 sj({name:n,absolutePath:a}){const{t:o}=Mt(),[r,c]=C.useState("overview"),{data:d,isLoading:f,error:p}=L1(n),m=C.useMemo(()=>d?BD(d):null,[d]);return n?f?l.jsxs("div",{className:"flex-1 p-6 space-y-3",children:[l.jsx(Ye,{className:"h-5 w-full"}),l.jsx(Ye,{className:"h-5 w-3/4"}),l.jsx(Ye,{className:"h-5 w-5/6"}),l.jsx(Ye,{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(Ib,{code:m.statusCode}),l.jsxs("span",{className:"text-xs font-semibold truncate text-foreground",children:[m.provider,"/",m.endpoint||"unknown"]}),n&&l.jsx(Ly,{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(Ly,{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(Ns,{active:r==="overview",onClick:()=>c("overview"),icon:Pl,children:o("errorLogs.tabOverview")}),l.jsx(Ns,{active:r==="headers",onClick:()=>c("headers"),icon:HS,children:o("errorLogs.tabHeaders")}),l.jsx(Ns,{active:r==="request",onClick:()=>c("request"),icon:Ux,children:o("errorLogs.tabRequest")}),l.jsx(Ns,{active:r==="response",onClick:()=>c("response"),icon:BS,children:o("errorLogs.tabResponse")}),l.jsx(Ns,{active:r==="raw",onClick:()=>c("raw"),icon:KS,children:o("errorLogs.tabRaw")})]}),l.jsxs("div",{className:"flex-1 overflow-hidden bg-card/30",children:[r==="overview"&&l.jsx(aj,{parsed:m}),r==="headers"&&l.jsx(ij,{headers:m.requestHeaders}),r==="request"&&l.jsx(Ry,{content:m.requestBody,label:"Request"}),r==="response"&&l.jsx(Ry,{content:m.responseBody,label:"Response"}),r==="raw"&&l.jsx(oj,{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(US,{className:"w-10 h-10 mx-auto opacity-40"}),l.jsx("p",{className:"text-sm",children:o("errorLogs.selectLog")})]})})}function rj(){const{t:n}=Mt(),{data:a,isLoading:o}=T1(),{data:r,isLoading:c,error:d}=P1(a?.running??!1),[f,p]=C.useState(500),[m,y]=C.useState(!1),S=C.useRef(null),x=C.useRef(null),b=()=>{x.current&&(clearInterval(x.current),x.current=null)};C.useEffect(()=>{if(!m)return;const k=w=>{const R=S.current;if(!R)return;const z=R.getBoundingClientRect().top+window.scrollY,G=w.pageY-z;p(Math.max(300,G));const X=window.innerHeight-w.clientY,ye=15;b(),X<50?x.current=setInterval(()=>{window.scrollBy(0,ye)},16):w.clientY<50&&(x.current=setInterval(()=>{window.scrollBy(0,-ye)},16))},T=()=>{y(!1),b(),document.body.style.cursor="default",document.body.style.userSelect="auto"};return document.addEventListener("mousemove",k),document.addEventListener("mouseup",T),document.body.style.cursor="row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",T),document.body.style.cursor="default",document.body.style.userSelect="auto",b()}},[m]);const D=k=>{k.preventDefault(),y(!0)},N=C.useMemo(()=>r?.[0]?.name??null,[r]),[E,O]=C.useState(null),L=E??N,j=C.useMemo(()=>!L||!r?void 0:r.find(T=>T.name===L)?.absolutePath,[L,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(Ye,{className:"h-4 w-32"}),l.jsx(Ye,{className:"h-4 w-20"})]}),l.jsx("div",{className:"p-4 space-y-3",children:[1,2,3].map(k=>l.jsx(Ye,{className:"h-12 w-full rounded-lg"},k))})]});if(!r||r.length===0)return null;const A=r.length;return l.jsxs("div",{ref:S,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:f},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(Fn,{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:A})})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[l.jsx(qS,{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(Df,{direction:"horizontal",children:[l.jsx(Bs,{defaultSize:30,minSize:20,maxSize:50,className:"flex flex-col min-w-0",children:l.jsxs(ko,{className:"h-full",children:[l.jsx("div",{className:"divide-y divide-border/50",children:r.slice(0,50).map(k=>l.jsx(nj,{name:k.name,size:k.size,modified:k.modified,isSelected:L===k.name,onClick:()=>O(k.name),statusCode:k.statusCode,model:k.model},k.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(jf,{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(Ol,{className:"h-4 w-4 text-muted-foreground"})})]}),l.jsx(Bs,{className:"flex flex-col min-w-0 bg-background/50",children:l.jsx(sj,{name:L,absolutePath:j})})]})}),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:D,children:l.jsx(GS,{className:"w-8 h-3 text-border group-hover:text-primary/50 transition-colors"})})]})}const lj=Ll("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"}}),Rs=C.forwardRef(({className:n,variant:a,...o},r)=>l.jsx("div",{ref:r,role:"alert",className:K(lj({variant:a}),n),...o}));Rs.displayName="Alert";const Al=C.forwardRef(({className:n,...a},o)=>l.jsx("h5",{ref:o,className:K("mb-1 font-medium leading-none tracking-tight",n),...a}));Al.displayName="AlertTitle";const _s=C.forwardRef(({className:n,...a},o)=>l.jsx("div",{ref:o,className:K("text-sm [&_p]:leading-relaxed",n),...a}));_s.displayName="AlertDescription";function cj(){return At({queryKey:["overview"],queryFn:async()=>(await fetch("/api/overview")).json()})}function Ub(n,a){return typeof n=="object"&&n!==null&&"error"in n&&typeof n.error=="string"?n.error:a}function Hb(n){const a=n.trim();if(!a)return null;try{return JSON.parse(a)}catch{return null}}function uj(n){const a=n.trim().toLowerCase();return a.startsWith("<!doctype html")||a.startsWith("<html")}function dj(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 Bb(n,a){const o=await n.text(),r=Hb(o);if(!n.ok){const c=Ub(r,a);throw new Error(c)}if(r===null)throw new Error(a);return r}function fj(){return At({queryKey:["shared","summary"],queryFn:async()=>{const n=await fetch("/api/shared/summary");return Bb(n,"Failed to fetch shared summary")}})}function _O(n){return At({queryKey:["shared",n],queryFn:async()=>{const a=await fetch(`/api/shared/${n}`);return Bb(a,`Failed to fetch shared ${n}`)}})}function zO(n,a){return At({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=Hb(c);if(!r.ok)throw new Error(Ub(d,`Failed to fetch shared ${n} content`));if(dj(d))return{content:d.content,contentPath:typeof d.contentPath=="string"&&d.contentPath.length>0?d.contentPath:a};if(c.trim().length>0){if(uj(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 hj={ok:"success",warning:"warning",error:"error"},pj={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 pl({title:n,value:a,icon:o,variant:r="default",onClick:c}){const d=pj[r];return l.jsxs("button",{onClick:c,className:K("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:K("flex items-center justify-center w-9 h-9 rounded-md",d.iconBg),children:l.jsx(o,{className:K("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:K("text-lg font-bold font-mono leading-tight",d.iconColor),children:a})]})]})}function mj(){const{t:n}=Mt(),a=Wd(),{data:o,isLoading:r}=cj(),{data:c,isLoading:d}=fj();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(Ye,{className:"h-12 w-12 rounded-lg"}),l.jsxs("div",{children:[l.jsx(Ye,{className:"h-7 w-[180px] mb-2"}),l.jsx(Ye,{className:"h-4 w-[220px]"})]})]}),l.jsx("div",{className:"flex items-center gap-3",children:[1,2,3,4].map(p=>l.jsx(Ye,{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(Ye,{className:"h-4 w-32"}),l.jsx(Ye,{className:"h-4 w-20"})]}),l.jsx("div",{className:"px-4 py-3 border-b",children:l.jsx(Ye,{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(Ye,{className:"w-2.5 h-2.5 rounded-full"}),l.jsx(Ye,{className:"h-4 flex-1"}),l.jsx(Ye,{className:"h-1.5 w-24 rounded-full"}),l.jsx(Ye,{className:"h-4 w-16"})]},p))]})]});const f=o?.health?hj[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(JA,{version:o?.version}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(pl,{title:n("home.profiles"),value:o?.profiles??0,icon:Md,variant:"accent",onClick:()=>a("/providers")}),l.jsx(pl,{title:n("home.cliproxy"),value:o?.cliproxy??0,icon:Tx,variant:"accent",onClick:()=>a("/cliproxy")}),l.jsx(pl,{title:n("home.accounts"),value:o?.accounts??0,icon:Ox,variant:"default",onClick:()=>a("/accounts")}),l.jsx(pl,{title:n("home.health"),value:o?.health?`${o.health.passed}/${o.health.total}`:"-",icon:zs,variant:f,onClick:()=>a("/health")})]})]})]}),c?.symlinkStatus&&!c.symlinkStatus.valid&&l.jsxs(Rs,{variant:"warning",children:[l.jsx(Fn,{className:"h-4 w-4"}),l.jsx(Al,{children:n("home.configurationRequired")}),l.jsx(_s,{children:c.symlinkStatus.message})]}),l.jsx(dD,{}),l.jsx(rj,{})]})}const Kb=aS,Tf=C.forwardRef(({className:n,...a},o)=>l.jsx(Nx,{ref:o,className:K("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",n),...a}));Tf.displayName=Nx.displayName;const Dl=C.forwardRef(({className:n,...a},o)=>l.jsx(kx,{ref:o,className:K("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}));Dl.displayName=kx.displayName;const qd=C.forwardRef(({className:n,...a},o)=>l.jsx(Ax,{ref:o,className:K("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...a}));qd.displayName=Ax.displayName;function Qt({className:n,...a}){return l.jsx(iS,{"data-slot":"label",className:K("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 Mf="ccs:openrouter-models",gj=1440*60*1e3,qb="1";function Gd(n){const a=parseFloat(n);return isNaN(a)||a===0?0:a*1e6}function _y(n){const a=Gd(n);return a===0?"Free":a<.01?"<$0.01":a<1?`$${a.toFixed(2)}`:`$${a.toFixed(a<10?2:0)}`}function yj(n){const a=_y(n.prompt),o=_y(n.completion);return a==="Free"&&o==="Free"?"Free":`${a}/${o}`}function xj(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 bj(n){return{...n,category:xj(n),pricePerMillionPrompt:Gd(n.pricing.prompt),pricePerMillionCompletion:Gd(n.pricing.completion),isFree:n.pricing.prompt==="0"&&n.pricing.completion==="0",isExacto:n.id.includes(":exacto")}}function vj(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 IO(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 Cj(){try{const n=localStorage.getItem(Mf);if(!n)return null;const a=JSON.parse(n);return a.version!==qb||Date.now()-a.fetchedAt>gj?null:a.models}catch{return null}}function Sj(n){try{localStorage.setItem(Mf,JSON.stringify({models:n,fetchedAt:Date.now(),version:qb}))}catch{}}function wj(){localStorage.removeItem(Mf)}function UO(n,a){const[o]=n.split("/");if(!o)return{};const r=a.filter(f=>f.id.startsWith(`${o}/`));if(r.length===0)return{};const c=[...r].sort((f,p)=>p.pricePerMillionPrompt-f.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 Nj(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${Math.round(n/1e3)}K`:String(n)}const HO={anthropic:"Anthropic (Claude)",openai:"OpenAI (GPT)",google:"Google (Gemini)",meta:"Meta (Llama)",mistral:"Mistral",opensource:"Open Source",other:"Other"},kj={anthropic:["anthropic/"],openai:["openai/"],google:["google/"],meta:["meta-llama/","meta/"],mistral:["mistralai/"],opensource:["deepseek/","qwen/","cohere/"],other:[]};function Aj(n,a=2){const o=[],r=["anthropic","openai","google","meta","mistral","opensource"];for(const c of r){const d=kj[c];if(d.length===0)continue;const p=[...n.filter(m=>d.some(y=>m.id.toLowerCase().startsWith(y)))].sort((m,y)=>(y.created??0)-(m.created??0));o.push(...p.slice(0,a))}return o.sort((c,d)=>(d.created??0)-(c.created??0))}function Dj(n){const o=Date.now()/1e3-n;return o<86400?"Today":o<172800?"Yesterday":o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}const jj="https://openrouter.ai/api/v1/models",Gb=["openrouter-models"],zy=1440*60*1e3;async function Tj(){const n=await fetch(jj);if(!n.ok)throw new Error(`Failed to fetch OpenRouter models: ${n.status}`);const o=(await n.json()).data;return Sj(o),o}function Fb(){return At({queryKey:Gb,queryFn:Tj,staleTime:zy,gcTime:zy,initialData:()=>Cj()??void 0,refetchOnWindowFocus:!1})}function Mj(){const n=Fb(),a=(n.data??[]).map(bj);return{...n,models:a}}function BO(){const n=it();return()=>(wj(),n.invalidateQueries({queryKey:Gb}))}function KO(){const{data:n,isLoading:a,isError:o}=Fb();return{isReady:!!n&&n.length>0,isLoading:a,isError:o,modelCount:n?.length??0}}function Ef({profileEnv:n={}}){const[a,o]=C.useState(null),[r,c]=C.useState(!0),[d,f]=C.useState(!1);C.useEffect(()=>{p()},[]);const p=async()=>{try{c(!0);const b=await fetch("/api/global-env");if(!b.ok)throw new Error("Failed to load");const D=await b.json();o(D)}catch{o(null)}finally{c(!1)}};if(r||!a?.enabled)return null;const m=a.env||{},y=Object.keys(m);if(y.length===0)return null;const S=y.filter(b=>!(b in n)),x=y.filter(b=>b in n);return l.jsxs("div",{className:"border-t bg-muted/20",children:[l.jsxs("button",{onClick:()=>f(!d),className:"w-full px-4 py-2 flex items-center gap-2 hover:bg-muted/30 transition-colors",children:[l.jsx(Pl,{className:"w-4 h-4 text-blue-500"}),l.jsxs("span",{className:"text-xs text-muted-foreground flex-1 text-left",children:[l.jsx("span",{className:"font-medium text-foreground",children:S.length})," global env var",S.length!==1?"s":""," will be injected at runtime",x.length>0&&l.jsxs("span",{className:"text-amber-600 dark:text-amber-400 ml-1",children:["(",x.length," overridden by profile)"]})]}),d?l.jsx(Xd,{className:"w-4 h-4 text-muted-foreground"}):l.jsx(El,{className:"w-4 h-4 text-muted-foreground"})]}),d&&l.jsxs("div",{className:"px-4 pb-3 space-y-2",children:[S.length>0&&l.jsx("div",{className:"space-y-1",children:S.map(b=>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:[b,"=",m[b]]})]},b))}),x.length>0&&l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Skipped (profile already defines):"}),x.map(b=>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:b})]},b))]}),l.jsx("div",{className:"pt-2 border-t border-border/50",children:l.jsx(at,{variant:"ghost",size:"sm",asChild:!0,className:"h-7 text-xs gap-1.5 -ml-2",children:l.jsxs(bl,{to:"/settings?tab=globalenv",children:[l.jsx(Jd,{className:"w-3.5 h-3.5"}),"Configure in Settings",l.jsx(Rx,{className:"w-3 h-3 opacity-50"})]})})})]})]})}function Ej({className:n,...a}){return l.jsx(oS,{"data-slot":"switch",className:K("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(sS,{"data-slot":"switch-thumb",className:K("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")})})}const Of={claude:"Claude Code",droid:"Factory Droid",codex:"Codex CLI"};function Oj(n,a){return a==="refreshing"?"Refreshing preview":a==="invalid"?"Saved status":n==="editor"?"Live preview":"Saved status"}function Pj(n,a){return n.status==="disabled"?"Disabled globally":a!=="claude"?`${Of[a]} bypasses the hook`:n.nativeReadPreference?"Native image reading":n.status==="hook-missing"?"Setup needed":n.authReadiness==="missing"?"Needs auth":n.proxyReadiness==="unavailable"?"Needs proxy":n.effectiveRuntimeMode==="native-read"?"Native fallback":"Transformer ready"}function Lj(n,a){return n.status==="disabled"?{label:"Disabled",className:"border-border/80 bg-background/85 text-muted-foreground"}:a!=="claude"?{label:"Bypassed",className:"border-sky-500/25 bg-sky-500/10 text-sky-800 dark:text-sky-200"}:n.nativeReadPreference?{label:"Native",className:"border-emerald-500/25 bg-emerald-500/10 text-emerald-800 dark:text-emerald-200"}:n.status==="hook-missing"||n.authReadiness==="missing"?{label:n.status==="hook-missing"?"Setup":"Auth",className:"border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-200"}:n.proxyReadiness==="unavailable"?{label:"Proxy",className:"border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-200"}:{label:"Ready",className:"border-emerald-500/25 bg-emerald-500/10 text-emerald-800 dark:text-emerald-200"}}function Rj(n,a){if(n.nativeReadPreference)return n.profileModel&&n.nativeImageCapable?`${n.profileModel} looks image-ready. CCS will bypass the transformer here.`:n.profileModel?`CCS will prefer native reading for ${n.profileModel}.`:"CCS will prefer native image reading for this profile.";if(!n.backendDisplayName&&a==="claude")return"This profile currently stays on native file access.";if(!n.backendDisplayName)return`Saved Claude-side image routing is inactive while ${Of[a]} is selected.`;const o=n.model?` · ${n.model}`:"";return`Transformer route: ${n.backendDisplayName}${o}.`}function _j(n,a){return n.status==="disabled"?"Image is disabled globally in CCS settings.":a!=="claude"?`Current target ${Of[a]} bypasses the Claude Read hook.`:n.nativeReadPreference?n.nativeImageCapable===!0?null:n.nativeImageReason:n.status==="hook-missing"?"Persist the profile hook before transformer routing can run here.":n.authReadiness==="missing"?n.authReason:n.proxyReadiness==="unavailable"?n.proxyReason:null}function zj({status:n,target:a="claude",source:o="saved",previewState:r="saved",nativeReadPreferenceOverride:c,onToggleNativeRead:d}){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 f=c??n.nativeReadPreference,p={...n,nativeReadPreference:f},m=Lj(p,a),y=_j(p,a),S=n.nativeImageCapable?"Verified":n.profileModel?"Unknown":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(Hx,{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:"Image"}),l.jsx(zt,{className:K("h-5 border px-1.5 text-[10px]",m.className),children:m.label})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[Oj(o,r)," · ",Pj(p,a)]})]})]})}),l.jsx(at,{size:"sm",variant:"outline",className:"h-8 shrink-0",asChild:!0,children:l.jsxs(bl,{to:"/settings?tab=image",children:["Open Settings",l.jsx(Ux,{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:"Use native image reading"}),S&&l.jsx(zt,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:S})]}),l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:Rj(p,a)})]}),l.jsx(Ej,{checked:f,onCheckedChange:d,disabled:!d,"aria-label":"Use native image reading"})]})}),y&&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:y})]})}const Ij=C.lazy(()=>nt(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function qO({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,settings:r,profileTarget:c="claude",imageAnalysisStatus:d,imageAnalysisStatusSource:f="saved",imageAnalysisStatusPreviewState:p="saved",nativeReadPreferenceOverride:m,onToggleNativeRead:y,onChange:S,missingRequiredFields:x=[]}){const b=x.length>0;return l.jsx(C.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(kn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),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&&b&&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(Fn,{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:x.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(Ij,{value:n,onChange:S,language:"json",minHeight:"100%",heightMode:"fill-parent"})})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx(zj,{status:d,target:c,source:f,previewState:p,nativeReadPreferenceOverride:m,onToggleNativeRead:y})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx("div",{className:"border rounded-md overflow-hidden",children:l.jsx(Ef,{profileEnv:r?.env})})})]})})}function Iy(n,a){try{var o=n()}catch(r){return a(r)}return o&&o.then?o.then(void 0,a):o}function Uj(n,a){for(var o={};n.length;){var r=n[0],c=r.code,d=r.message,f=r.path.join(".");if(!o[f])if("unionErrors"in r){var p=r.unionErrors[0].errors[0];o[f]={message:p.message,type:p.code}}else o[f]={message:d,type:c};if("unionErrors"in r&&r.unionErrors.forEach(function(S){return S.errors.forEach(function(x){return n.push(x)})}),a){var m=o[f].types,y=m&&m[r.code];o[f]=Bx(f,a,o,c,y?[].concat(y,r.message):r.message)}n.shift()}return o}function Hj(n,a){for(var o={};n.length;){var r=n[0],c=r.code,d=r.message,f=r.path.join(".");if(!o[f])if(r.code==="invalid_union"&&r.errors.length>0){var p=r.errors[0][0];o[f]={message:p.message,type:p.code}}else o[f]={message:d,type:c};if(r.code==="invalid_union"&&r.errors.forEach(function(S){return S.forEach(function(x){return n.push(x)})}),a){var m=o[f].types,y=m&&m[r.code];o[f]=Bx(f,a,o,c,y?[].concat(y,r.message):r.message)}n.shift()}return o}function Bj(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(Iy(function(){return Promise.resolve(n[o.mode==="sync"?"parse":"parseAsync"](r,a)).then(function(f){return d.shouldUseNativeValidation&&Bg({},d),{errors:{},values:o.raw?Object.assign({},r):f}})},function(f){if((function(p){return Array.isArray(p?.issues)})(f))return{values:{},errors:Kg(Uj(f.errors,!d.shouldUseNativeValidation&&d.criteriaMode==="all"),d)};throw f}))}catch(f){return Promise.reject(f)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(n))return function(r,c,d){try{return Promise.resolve(Iy(function(){return Promise.resolve((o.mode==="sync"?Ew:Ow)(n,r,a)).then(function(f){return d.shouldUseNativeValidation&&Bg({},d),{errors:{},values:o.raw?Object.assign({},r):f}})},function(f){if((function(p){return p instanceof Pw})(f))return{values:{},errors:Kg(Hj(f.issues,!d.shouldUseNativeValidation&&d.criteriaMode==="all"),d)};throw f}))}catch(f){return Promise.reject(f)}};throw new Error("Invalid input: not a Zod schema")}const Kj={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 qj({provider:n,className:a,size:o="md"}){const r=NA(n),c=Kj[o],d=rb(n),f=AA(n);return l.jsx("div",{className:K("flex items-center justify-center rounded-md",d&&!f&&(kA(n)?"bg-gray-900 p-1":"bg-white p-1"),c.container,a),children:d?l.jsx("img",{src:d,alt:`${n} logo`,className:K(f?c.container:c.icon,"object-contain")}):l.jsx("span",{className:K("font-semibold",r.textClass,c.text),children:r.letter})})}function GO(){return At({queryKey:["profiles"],queryFn:()=>Ue.profiles.list()})}function Gj(){const n=it();return tt({mutationFn:a=>Ue.profiles.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile created successfully")},onError:a=>{le.error(a.message)}})}function FO(){const n=it();return tt({mutationFn:a=>Ue.profiles.delete(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile deleted successfully")},onError:a=>{le.error(a.message)}})}function VO(){return tt({mutationFn:()=>Ue.profiles.discoverOrphans()})}function YO(){const n=it();return tt({mutationFn:a=>Ue.profiles.registerOrphans(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Orphan profiles registration complete")}})}function $O(){const n=it();return tt({mutationFn:({name:a,data:o})=>Ue.profiles.copy(a,o),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile copied successfully")}})}function WO(){return tt({mutationFn:({name:n,includeSecrets:a})=>Ue.profiles.export(n,a??!1)})}function QO(){const n=it();return tt({mutationFn:a=>Ue.profiles.import(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile imported successfully")}})}const Fj="https://openrouter.ai/api",Vb=Object.freeze({glmt:"glm",kimi:"km",alibaba:"alibaba-coding-plan",acp:"alibaba-coding-plan"}),Yb=[{id:"openrouter",name:"OpenRouter",description:"349+ models from OpenAI, Anthropic, Google, Meta",baseUrl:Fj,defaultProfileName:"openrouter",defaultModel:"anthropic/claude-opus-4.5",apiKeyPlaceholder:"sk-or-...",apiKeyHint:"Get your API key at openrouter.ai/keys",category:"recommended",requiresApiKey:!0,badge:"349+ models",featured:!0,icon:"/icons/openrouter.svg"},{id:"alibaba-coding-plan",name:"Alibaba Coding Plan",description:"Alibaba Cloud Coding Plan via Anthropic-compatible endpoint",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/apps/anthropic",defaultProfileName:"albb",defaultModel:"qwen3-coder-plus",apiKeyPlaceholder:"sk-sp-...",apiKeyHint:"Get your Coding Plan key from Alibaba Cloud Model Studio",category:"recommended",requiresApiKey:!0,badge:"Coding Plan",featured:!0,icon:"/assets/providers/alibabacloud-color.svg"},{id:"ollama",name:"Ollama (Local)",description:"Local open-source models via Ollama (32K+ context)",baseUrl:"http://localhost:11434",defaultProfileName:"ollama",defaultModel:"qwen3-coder",apiKeyPlaceholder:"ollama",apiKeyHint:"Install Ollama from ollama.com - no API key needed for local",category:"recommended",requiresApiKey:!1,badge:"Local",featured:!0,icon:"/icons/ollama.svg"},{id:"llamacpp",name:"llama.cpp (Local)",description:"Local inference via llama.cpp (LLaMA models)",baseUrl:"http://127.0.0.1:8080",defaultProfileName:"llamacpp",defaultModel:"llama3-8b",apiKeyPlaceholder:"llamacpp",apiKeyHint:"Run llama.cpp server: ./server --host 0.0.0.0 --port 8080 -m model.gguf",category:"recommended",requiresApiKey:!1,badge:"Local",featured:!0,icon:"/assets/providers/llama-cpp.svg"},{id:"anthropic",name:"Anthropic (Direct API)",description:"Use your own Anthropic API key (sk-ant-...)",baseUrl:"",defaultProfileName:"anthropic",defaultModel:"claude-sonnet-4-5-20250929",apiKeyPlaceholder:"sk-ant-api03-...",apiKeyHint:"Get key at console.anthropic.com/settings/keys",category:"recommended",requiresApiKey:!0,badge:"Direct",featured:!0,icon:"/assets/providers/claude.svg"},{id:"glm",name:"GLM",description:"Direct Z.AI Anthropic-compatible API profile",baseUrl:"https://api.z.ai/api/anthropic",defaultProfileName:"glm",defaultModel:"glm-5",apiKeyPlaceholder:"ghp_...",apiKeyHint:"Get your API key from Z.AI",category:"alternative",requiresApiKey:!0,badge:"Z.AI",icon:"/icons/zai.svg"},{id:"km",name:"Kimi",description:"Moonshot AI - Fast reasoning model",baseUrl:"https://api.kimi.com/coding/",defaultProfileName:"km",defaultModel:"kimi-k2-thinking-turbo",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key from Moonshot AI",category:"alternative",requiresApiKey:!0,alwaysThinkingEnabled:!0,badge:"Reasoning",icon:"/icons/kimi.svg"},{id:"foundry",name:"Azure Foundry",description:"Claude via Microsoft Azure AI Foundry",baseUrl:"https://<your-resource>.services.ai.azure.com/api/anthropic",defaultProfileName:"foundry",defaultModel:"claude-sonnet-4-5",apiKeyPlaceholder:"YOUR_AZURE_API_KEY",apiKeyHint:"Create resource at ai.azure.com, get API key from Keys tab",category:"alternative",requiresApiKey:!0,badge:"Azure",icon:"/icons/azure.svg"},{id:"mm",name:"Minimax",description:"M2.1/M2.1-lightning/M2 - multilang coding (1M context)",baseUrl:"https://api.minimax.io/anthropic",defaultProfileName:"mm",defaultModel:"MiniMax-M2.1",apiKeyPlaceholder:"YOUR_MINIMAX_API_KEY_HERE",apiKeyHint:"Get your API key at platform.minimax.io",category:"alternative",requiresApiKey:!0,badge:"1M context",icon:"/icons/minimax.svg"},{id:"deepseek",name:"DeepSeek",description:"V3.2 and R1 reasoning model (128K context)",baseUrl:"https://api.deepseek.com/anthropic",defaultProfileName:"deepseek",defaultModel:"deepseek-chat",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key at platform.deepseek.com",category:"alternative",requiresApiKey:!0,badge:"Reasoning",icon:"/icons/deepseek.svg"},{id:"qwen",name:"Qwen",description:"Alibaba Cloud - Qwen3 models (256K-1M context, thinking support)",baseUrl:"https://dashscope-intl.aliyuncs.com/apps/anthropic",defaultProfileName:"qwen-api",defaultModel:"qwen3-coder-plus",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key from Alibaba Cloud Model Studio",category:"alternative",requiresApiKey:!0,badge:"Alibaba",icon:"/assets/providers/qwen-color.svg"},{id:"ollama-cloud",name:"Ollama Cloud",description:"Ollama cloud models via direct API (glm-5:cloud, minimax-m2.1:cloud)",baseUrl:"https://ollama.com",defaultProfileName:"ollama-cloud",defaultModel:"glm-5:cloud",apiKeyPlaceholder:"YOUR_OLLAMA_CLOUD_API_KEY",apiKeyHint:"Get your API key at ollama.com",category:"alternative",requiresApiKey:!0,badge:"Cloud",icon:"/icons/ollama.svg"},{id:"novita",name:"Novita AI",description:"Anthropic-compatible API for Claude Code and CCS profiles",baseUrl:"https://api.novita.ai/anthropic",defaultProfileName:"novita",defaultModel:"deepseek/deepseek-v3.2",apiKeyPlaceholder:"YOUR_NOVITA_API_KEY",apiKeyHint:"Get your API key at novita.ai",category:"alternative",requiresApiKey:!0,badge:"Anthropic-compatible",icon:"/icons/novita.svg"}];function $b(n){return{...n,extraEnv:n.extraEnv?{...n.extraEnv}:void 0}}function Vj(n){const a=$b(n);return a.extraEnv&&Object.freeze(a.extraEnv),Object.freeze(a)}function Yj(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 f=c.trim().toLowerCase();if(!f)throw new Error("Preset alias keys cannot be empty");if(c!==f)throw new Error(`Preset alias must be normalized: "${c}"`);if(r.has(f))throw new Error(`Duplicate normalized preset alias detected: "${c}"`);if(r.add(f),!o.has(d))throw new Error(`Preset alias "${c}" points to unknown target "${d}"`);if(o.has(f))throw new Error(`Preset alias "${c}" collides with canonical preset ID "${f}"`)}}Yj(Yb,Vb);const $j=Object.freeze(Yb.map(Vj));function Wj(){return $j.map($b)}function Qj(n){const a=n.trim().toLowerCase();return Vb[a]||a}const Xj=Wj(),Pf=Object.freeze(Xj.map(n=>({...n})));function Zj(n,a){return a||(n?.requiresApiKey===!1?n.apiKeyPlaceholder||n.id:"")}function Jj(n){return Pf.filter(a=>a.category===n)}function Cd(n){const a=Qj(n);return Pf.find(o=>o.id===a)}const eT=Xa().refine(n=>n.trim().length===0||Xa().url().safeParse(n).success,{message:"Invalid URL format"}),tT=Lw({name:Xa().min(1,"Name is required").regex(/^[a-zA-Z][a-zA-Z0-9._-]*$/,"Must start with letter, only letters/numbers/.-_"),baseUrl:eT,apiKey:Xa(),model:Xa().optional(),opusModel:Xa().optional(),sonnetModel:Xa().optional(),haikuModel:Xa().optional(),target:Rw(["claude","droid","codex"])}),nT=["/chat/completions","/v1/messages","/messages","/completions"],Si="custom",Sd="openrouter",wd={name:"",baseUrl:"",apiKey:"",model:"",opusModel:"",sonnetModel:"",haikuModel:"",target:"claude"},aT=Jj("recommended"),iT=Pf.filter(n=>n.category!=="recommended");function XO({open:n,onOpenChange:a,onSuccess:o,initialMode:r="openrouter"}){const{t:c}=Mt(),d=Gj(),[f,p]=C.useState("basic"),[m,y]=C.useState(null),[S,x]=C.useState(!1),[b,D]=C.useState(Sd),[N,E]=C.useState(""),{models:O}=Mj(),{register:L,handleSubmit:j,formState:{errors:A},control:k,reset:T,setValue:w}=_w({resolver:Bj(tT),defaultValues:wd}),R=qg({control:k,name:"baseUrl"}),B=qg({control:k,name:"target"}),z=C.useCallback(W=>{if(!W){T(wd);return}T({...wd,name:W.defaultProfileName,baseUrl:W.baseUrl,model:W.defaultModel,opusModel:W.defaultModel,sonnetModel:W.defaultModel,haikuModel:W.defaultModel})},[T]),G=C.useMemo(()=>b===Si?null:Cd(b)??null,[b]),ne=C.useMemo(()=>N.trim()?[...vj(O,N)].sort((oe,ce)=>(ce.created??0)-(oe.created??0)).slice(0,20):Aj(O,2),[O,N]);C.useEffect(()=>{if(n)if(p("basic"),y(null),x(!1),E(""),r==="normal")D(Si),z(null);else{const oe=Cd(r==="openrouter"?Sd:r);if(oe){D(oe.id),z(oe);return}D(Si),z(null)}},[n,r,z,T]);const X=W=>{const oe=Cd(W);if(oe){D(oe.id),z(oe);return}D(Si),z(null)},ye=W=>{w("model",W.id),w("opusModel",W.id),w("sonnetModel",W.id),w("haikuModel",W.id),E(W.name),le.success(`Applied "${W.name}" to all model tiers`,{duration:2e3})};C.useEffect(()=>{if(R&&b===Si){const oe=R.toLowerCase();for(const ce of nT)if(oe.endsWith(ce)){const he=R.replace(new RegExp(ce+"$","i"),"");y(`URL ends with "${ce}" - Claude appends this automatically. You likely want: ${he}`);return}}y(null)},[R,b]);const te=async W=>{if(G?.requiresApiKey!==!1&&!W.apiKey){le.error(Ke.t("commonToast.apiKeyRequired"));return}const oe={...W,apiKey:Zj(G,W.apiKey)};try{await d.mutateAsync(oe),le.success(`Profile "${oe.name}" created`),o(oe.name),a(!1)}catch(ce){le.error(ce.message||"Failed to create profile")}},ve=!!A.name||!!A.baseUrl||!!A.apiKey,I=!!A.model||!!A.opusModel||!!A.sonnetModel||!!A.haikuModel,Z=d.isPending,ae=G?.id===Sd;return l.jsx(df,{open:n,onOpenChange:a,children:l.jsxs(ff,{className:"sm:max-w-[700px] p-0 gap-0 overflow-hidden max-h-[90vh] !flex !flex-col",children:[l.jsxs(hf,{className:"p-6 pb-4 border-b",children:[l.jsxs(pf,{className:"flex items-center gap-2",children:[l.jsx(zg,{className:"w-5 h-5 text-primary"}),"Create API Profile"]}),l.jsx(mf,{children:"Choose a provider preset or configure a custom API endpoint."})]}),l.jsxs("form",{onSubmit:j(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:[aT.map(W=>l.jsx(Uy,{preset:W,isSelected:b===W.id,onClick:()=>X(W.id),density:"featured"},W.id)),l.jsx("div",{className:"mx-1 hidden w-px rounded-full bg-border/70 sm:block"}),l.jsx(oT,{isSelected:b===Si,onClick:()=>X(Si)})]})})]}),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:iT.map(W=>l.jsx(Uy,{preset:W,isSelected:b===W.id,onClick:()=>X(W.id),density:"compact"},W.id))})})]})]})}),l.jsxs(Kb,{value:f,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(Tf,{className:"grid w-full grid-cols-2",children:[l.jsxs(Dl,{value:"basic",className:"relative",children:["Basic Information",ve&&l.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-destructive animate-pulse"})]}),l.jsxs(Dl,{value:"models",className:"relative",children:["Model Configuration",I&&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(qd,{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:["Profile Name ",l.jsx("span",{className:"text-destructive",children:"*"})]}),l.jsx(Hn,{id:"name",...L("name"),placeholder:"my-api",className:"font-mono"}),A.name?l.jsx("p",{className:"text-xs text-destructive",children:A.name.message}):l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Used in CLI:"," ",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:"API Base URL"}),l.jsx(Hn,{id:"baseUrl",...L("baseUrl"),placeholder:"https://api.example.com/v1"}),A.baseUrl?l.jsx("p",{className:"text-xs text-destructive",children:A.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(Fn,{className:"w-4 h-4 shrink-0 mt-0.5"}),l.jsx("span",{children:m})]}):G?l.jsx("p",{className:"text-xs text-muted-foreground",children:G.baseUrl?`Pre-filled from ${G.name}. You can customize if needed.`:`Optional for ${G.name}. Leave blank to use native Anthropic auth.`}):l.jsx("p",{className:"text-xs text-muted-foreground",children:"The endpoint that accepts OpenAI-compatible and Anthropic requests"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(Qt,{htmlFor:"apiKey",children:["API Key"," ",G?.requiresApiKey!==!1&&l.jsx("span",{className:"text-destructive",children:"*"}),G?.requiresApiKey===!1&&l.jsx("span",{className:"text-muted-foreground text-xs font-normal",children:"(optional)"})]}),l.jsxs("div",{className:"relative",children:[l.jsx(Hn,{id:"apiKey",type:S?"text":"password",...L("apiKey"),placeholder:G?.requiresApiKey===!1?"Optional - only if auth is enabled":G?.apiKeyPlaceholder??"sk-...",className:"pr-10"}),l.jsx(at,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-9 w-9 text-muted-foreground hover:text-foreground",onClick:()=>x(!S),tabIndex:-1,children:S?l.jsx(Gs,{className:"h-4 w-4"}):l.jsx(Fs,{className:"h-4 w-4"})})]}),A.apiKey?l.jsx("p",{className:"text-xs text-destructive",children:A.apiKey.message}):G?.requiresApiKey===!1?l.jsx("p",{className:"text-xs text-muted-foreground",children:"Only needed if your local endpoint has authentication enabled"}):G?.apiKeyHint&&l.jsx("p",{className:"text-xs text-muted-foreground",children:G.apiKeyHint})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(Qt,{htmlFor:"target",children:"Default Target CLI"}),l.jsxs(lb,{value:B,onValueChange:W=>w("target",W),children:[l.jsx(vf,{id:"target",children:l.jsx(cb,{})}),l.jsxs(Cf,{children:[l.jsx(Ls,{value:"claude",children:"Claude Code (default)"}),l.jsx(Ls,{value:"droid",children:"Factory Droid"}),l.jsx(Ls,{value:"codex",children:"Codex CLI"})]})]}),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(qd,{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(Pl,{className:"w-5 h-5 shrink-0 mt-0.5"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium mb-1",children:"Model Mapping"}),l.jsx("p",{className:"text-xs opacity-90",children:"Map Claude Code tiers (Opus/Sonnet/Haiku) to models supported by your provider."})]})]}),ae&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(Qt,{children:"Search Models"}),l.jsx(Hn,{value:N,onChange:W=>E(W.target.value),placeholder:"Type to search (e.g., opus, sonnet, gpt-4o)...",onKeyDown:W=>{W.key==="Enter"&&ne.length>0&&(W.preventDefault(),ye(ne[0]))}}),l.jsx("div",{className:"border rounded-md max-h-48 overflow-y-auto",children:ne.length===0?l.jsx("p",{className:"text-sm text-muted-foreground p-3 text-center",children:N?`No models found for "${N}"`:"Loading models..."}):l.jsxs("div",{className:"p-1",children:[!N&&l.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground",children:[l.jsx(FS,{className:"w-3 h-3 text-accent"}),l.jsx("span",{children:"Newest Models"})]}),ne.map(W=>l.jsx(sT,{model:W,onClick:()=>ye(W),showAge:!N},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:["Default Model",l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"ANTHROPIC_MODEL"})]}),l.jsx(Hn,{id:"model",...L("model"),placeholder:G?.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:["Sonnet Mapping",l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_SONNET"})]}),l.jsx(Hn,{id:"sonnetModel",...L("sonnetModel"),placeholder:"e.g. gpt-4o, claude-sonnet-4",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:["Opus Mapping",l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_OPUS"})]}),l.jsx(Hn,{id:"opusModel",...L("opusModel"),placeholder:"e.g. o1, claude-opus-4.5",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:["Haiku Mapping",l.jsx(zt,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_HAIKU"})]}),l.jsx(Hn,{id:"haikuModel",...L("haikuModel"),placeholder:"e.g. gpt-4o-mini, claude-3.5-haiku",className:"font-mono text-sm h-9"})]})]})]})]})]}),l.jsxs(pA,{className:"p-6 pt-4 border-t bg-muted/10",children:[l.jsx(at,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),l.jsx(at,{type:"submit",disabled:Z,className:K(Z&&"opacity-80"),children:Z?l.jsxs(l.Fragment,{children:[l.jsx(kn,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating..."]}):l.jsxs(l.Fragment,{children:[l.jsx(zg,{className:"w-4 h-4 mr-2"}),"Create Profile"]})})]})]})]})]})})}function Uy({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:K("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(qj,{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 oT({isSelected:n,onClick:a}){const{t:o}=Mt();return l.jsxs("button",{type:"button",onClick:a,className:K("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(Jd,{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 sT({model:n,onClick:a,showAge:o}){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:Dj(n.created)}),n.isFree?l.jsx(zt,{variant:"secondary",className:"text-xs group-hover:bg-accent-foreground/20 group-hover:text-accent-foreground",children:"Free"}):l.jsx("span",{children:yj(n.pricing)}),l.jsx("span",{children:Nj(n.context_length)})]})]})}function rT({className:n,...a}){return l.jsx("div",{"data-slot":"card",className:K("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function lT({className:n,...a}){return l.jsx("div",{"data-slot":"card-header",className:K("@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 cT({className:n,...a}){return l.jsx("div",{"data-slot":"card-title",className:K("leading-none font-semibold",n),...a})}function uT({className:n,...a}){return l.jsx("div",{"data-slot":"card-description",className:K("text-muted-foreground text-sm",n),...a})}function dT({className:n,...a}){return l.jsx("div",{"data-slot":"card-content",className:K("px-6",n),...a})}const Lf="[1m]",Rf=["ANTHROPIC_MODEL","ANTHROPIC_DEFAULT_OPUS_MODEL","ANTHROPIC_DEFAULT_SONNET_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL"],fT=new Set(Rf);function ZO(n){return n.toLowerCase().startsWith("gemini-")}function _f(n){return n.toLowerCase().endsWith(Lf.toLowerCase())}function hT(n){return!n||_f(n)?n:`${n}${Lf}`}function Wb(n){return n&&(_f(n)?n.slice(0,-Lf.length):n)}function JO(n){return fT.has(n)}function pT(n){return Wb(n.trim()).replace(/\([^)]+\)$/,"")}function eP(n){return Rf.some(a=>{const o=n[a];return typeof o=="string"&&_f(o)})}function tP(n,a,o={}){const r={...n};for(const c of Rf){const d=r[c];if(typeof d!="string"||d.trim().length===0)continue;const f=pT(d),p=o.supportsExtendedContext?.(f,c)??!0;r[c]=a&&p?hT(d):Wb(d)}return r}const mT=["agy","claude","gemini","codex","qwen","kimi","iflow","kiro","ghcp"],nP=mT.map(n=>({id:n,name:bf(n),description:jA(n)})),gT=["provider","auth","variant","success"];function aP(n){return n==="account"?1:gT.indexOf(n)}const iP=lS,oP=uS,sP=cS,yT=C.forwardRef(({className:n,align:a="center",sideOffset:o=4,...r},c)=>l.jsx(rS,{children:l.jsx(Dx,{ref:c,align:a,sideOffset:o,className:K("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...r})}));yT.displayName=Dx.displayName;const xT=C.lazy(()=>nt(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function rP({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,onRawJsonChange:r,profileEnv:c,missingRequiredFields:d=[]}){const f=d.length>0;return l.jsx(C.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(kn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),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&&f&&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(Fn,{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(xT,{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(Ef,{profileEnv:c})})})]})})}var Wt={},Hy;function bT(){if(Hy)return Wt;Hy=1;var n=Wt&&Wt.__assign||function(){return n=Object.assign||function(T){for(var w,R=1,B=arguments.length;R<B;R++){w=arguments[R];for(var z in w)Object.prototype.hasOwnProperty.call(w,z)&&(T[z]=w[z])}return T},n.apply(this,arguments)},a=Wt&&Wt.__createBinding||(Object.create?(function(T,w,R,B){B===void 0&&(B=R);var z=Object.getOwnPropertyDescriptor(w,R);(!z||("get"in z?!w.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:function(){return w[R]}}),Object.defineProperty(T,B,z)}):(function(T,w,R,B){B===void 0&&(B=R),T[B]=w[R]})),o=Wt&&Wt.__setModuleDefault||(Object.create?(function(T,w){Object.defineProperty(T,"default",{enumerable:!0,value:w})}):function(T,w){T.default=w}),r=Wt&&Wt.__importStar||function(T){if(T&&T.__esModule)return T;var w={};if(T!=null)for(var R in T)R!=="default"&&Object.prototype.hasOwnProperty.call(T,R)&&a(w,T,R);return o(w,T),w},c=Wt&&Wt.__rest||function(T,w){var R={};for(var B in T)Object.prototype.hasOwnProperty.call(T,B)&&w.indexOf(B)<0&&(R[B]=T[B]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,B=Object.getOwnPropertySymbols(T);z<B.length;z++)w.indexOf(B[z])<0&&Object.prototype.propertyIsEnumerable.call(T,B[z])&&(R[B[z]]=T[B[z]]);return R};Object.defineProperty(Wt,"__esModule",{value:!0});var d=r($d()),f=89,p=90,m=77,y=57,S=219,x=222,b=192,D=100,N=3e3,E=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),O=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),L="npm__react-simple-code-editor__textarea",j=`
|
|
15
|
-
/**
|
|
16
|
-
* Reset the text fill color so that placeholder is visible
|
|
17
|
-
*/
|
|
18
|
-
.`.concat(L,`:empty {
|
|
19
|
-
-webkit-text-fill-color: inherit !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Hack to apply on some CSS on IE10 and IE11
|
|
24
|
-
*/
|
|
25
|
-
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
26
|
-
/**
|
|
27
|
-
* IE doesn't support '-webkit-text-fill-color'
|
|
28
|
-
* So we use 'color: transparent' to make the text transparent on IE
|
|
29
|
-
* Unlike other browsers, it doesn't affect caret color in IE
|
|
30
|
-
*/
|
|
31
|
-
.`).concat(L,` {
|
|
32
|
-
color: transparent !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.`).concat(L,`::selection {
|
|
36
|
-
background-color: #accef7 !important;
|
|
37
|
-
color: transparent !important;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
`),A=d.forwardRef(function(w,R){var B=w.autoFocus,z=w.disabled,G=w.form,ne=w.highlight,X=w.ignoreTabKey,ye=X===void 0?!1:X,te=w.insertSpaces,ve=te===void 0?!0:te,I=w.maxLength,Z=w.minLength,ae=w.name,W=w.onBlur,oe=w.onClick,ce=w.onFocus,he=w.onKeyDown,Q=w.onKeyUp,J=w.onValueChange,re=w.padding,ie=re===void 0?0:re,se=w.placeholder,ge=w.preClassName,De=w.readOnly,He=w.required,lt=w.style,gt=w.tabSize,qe=gt===void 0?2:gt,ct=w.textareaClassName,Bt=w.textareaId,Zt=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),Pn=d.useState(!0),en=Pn[0],Aa=Pn[1],$n={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},yt=ne(Zt),tn=function(ee,Ee){return ee.substring(0,Ee).split(`
|
|
41
|
-
`)},Wn=d.useCallback(function(ee,Ee){var Ce,Oe,ut;Ee===void 0&&(Ee=!1);var me=je.current,Ae=me.stack,Se=me.offset;if(Ae.length&&Se>-1){je.current.stack=Ae.slice(0,Se+1);var Pe=je.current.stack.length;if(Pe>D){var ot=Pe-D;je.current.stack=Ae.slice(ot,Pe),je.current.offset=Math.max(je.current.offset-ot,0)}}var Ne=Date.now();if(Ee){var It=je.current.stack[je.current.offset];if(It&&Ne-It.timestamp<N){var Xn=/[^a-z0-9]([a-z0-9]+)$/i,Dt=(Ce=tn(It.value,It.selectionStart).pop())===null||Ce===void 0?void 0:Ce.match(Xn),nn=(Oe=tn(ee.value,ee.selectionStart).pop())===null||Oe===void 0?void 0:Oe.match(Xn);if(Dt?.[1]&&(!((ut=nn?.[1])===null||ut===void 0)&&ut.startsWith(Dt[1]))){je.current.stack[je.current.offset]=n(n({},ee),{timestamp:Ne});return}}}je.current.stack.push(n(n({},ee),{timestamp:Ne})),je.current.offset++},[]),ti=d.useCallback(function(){var ee=Jt.current;if(ee){var Ee=ee.value,Ce=ee.selectionStart,Oe=ee.selectionEnd;Wn({value:Ee,selectionStart:Ce,selectionEnd:Oe})}},[Wn]),Ln=function(ee){var Ee=Jt.current;Ee&&(Ee.value=ee.value,Ee.selectionStart=ee.selectionStart,Ee.selectionEnd=ee.selectionEnd,J?.(ee.value))},Rn=function(ee){var Ee=Jt.current,Ce=je.current.stack[je.current.offset];Ce&&Ee&&(je.current.stack[je.current.offset]=n(n({},Ce),{selectionStart:Ee.selectionStart,selectionEnd:Ee.selectionEnd})),Wn(ee),Ln(ee)},Ti=function(){var ee=je.current,Ee=ee.stack,Ce=ee.offset,Oe=Ee[Ce-1];Oe&&(Ln(Oe),je.current.offset=Math.max(Ce-1,0))},Ao=function(){var ee=je.current,Ee=ee.stack,Ce=ee.offset,Oe=Ee[Ce+1];Oe&&(Ln(Oe),je.current.offset=Math.min(Ce+1,Ee.length-1))},Do=function(ee){if(!(he&&(he(ee),ee.defaultPrevented))){ee.key==="Escape"&&ee.currentTarget.blur();var Ee=ee.currentTarget,Ce=Ee.value,Oe=Ee.selectionStart,ut=Ee.selectionEnd,me=(ve?" ":" ").repeat(qe);if(ee.key==="Tab"&&!ye&&en)if(ee.preventDefault(),ee.shiftKey){var Ae=tn(Ce,Oe),Se=Ae.length-1,Pe=tn(Ce,ut).length-1,ot=Ce.split(`
|
|
42
|
-
`).map(function(Zn,Mi){return Mi>=Se&&Mi<=Pe&&Zn.startsWith(me)?Zn.substring(me.length):Zn}).join(`
|
|
43
|
-
`);if(Ce!==ot){var Ne=Ae[Se];Rn({value:ot,selectionStart:Ne?.startsWith(me)?Oe-me.length:Oe,selectionEnd:ut-(Ce.length-ot.length)})}}else if(Oe!==ut){var Ae=tn(Ce,Oe),It=Ae.length-1,Xn=tn(Ce,ut).length-1,Ne=Ae[It];Rn({value:Ce.split(`
|
|
44
|
-
`).map(function(Mo,Eo){return Eo>=It&&Eo<=Xn?me+Mo:Mo}).join(`
|
|
45
|
-
`),selectionStart:Ne&&/\S/.test(Ne)?Oe+me.length:Oe,selectionEnd:ut+me.length*(Xn-It+1)})}else{var Dt=Oe+me.length;Rn({value:Ce.substring(0,Oe)+me+Ce.substring(ut),selectionStart:Dt,selectionEnd:Dt})}else if(ee.key==="Backspace"){var nn=Oe!==ut,An=Ce.substring(0,Oe);if(An.endsWith(me)&&!nn){ee.preventDefault();var Dt=Oe-me.length;Rn({value:Ce.substring(0,Oe-me.length)+Ce.substring(ut),selectionStart:Dt,selectionEnd:Dt})}}else if(ee.key==="Enter"){if(Oe===ut){var jo=tn(Ce,Oe).pop(),ni=jo?.match(/^\s+/);if(ni?.[0]){ee.preventDefault();var To=`
|
|
46
|
-
`+ni[0],Dt=Oe+To.length;Rn({value:Ce.substring(0,Oe)+To+Ce.substring(ut),selectionStart:Dt,selectionEnd:Dt})}}}else if(ee.keyCode===y||ee.keyCode===S||ee.keyCode===x||ee.keyCode===b){var pn=void 0;ee.keyCode===y&&ee.shiftKey?pn=["(",")"]:ee.keyCode===S?ee.shiftKey?pn=["{","}"]:pn=["[","]"]:ee.keyCode===x?ee.shiftKey?pn=['"','"']:pn=["'","'"]:ee.keyCode===b&&!ee.shiftKey&&(pn=["`","`"]),Oe!==ut&&pn&&(ee.preventDefault(),Rn({value:Ce.substring(0,Oe)+pn[0]+Ce.substring(Oe,ut)+pn[1]+Ce.substring(ut),selectionStart:Oe,selectionEnd:ut+2}))}else(O?ee.metaKey&&ee.keyCode===p:ee.ctrlKey&&ee.keyCode===p)&&!ee.shiftKey&&!ee.altKey?(ee.preventDefault(),Ti()):(O?ee.metaKey&&ee.keyCode===p&&ee.shiftKey:E?ee.ctrlKey&&ee.keyCode===f:ee.ctrlKey&&ee.keyCode===p&&ee.shiftKey)&&!ee.altKey?(ee.preventDefault(),Ao()):ee.keyCode===m&&ee.ctrlKey&&(!O||ee.shiftKey)&&(ee.preventDefault(),Aa(function(Zn){return!Zn}))}},Qn=function(ee){var Ee=ee.currentTarget,Ce=Ee.value,Oe=Ee.selectionStart,ut=Ee.selectionEnd;Wn({value:Ce,selectionStart:Oe,selectionEnd:ut},!0),J(Ce)};return d.useEffect(function(){ti()},[ti]),d.useImperativeHandle(R,function(){return{get session(){return{history:je.current}},set session(ee){je.current=ee.history}}},[]),d.createElement("div",n({},Yn,{style:n(n({},k.container),lt)}),d.createElement("pre",n({className:ge,"aria-hidden":"true",style:n(n(n({},k.editor),k.highlight),$n)},typeof yt=="string"?{dangerouslySetInnerHTML:{__html:yt+"<br />"}}:{children:yt})),d.createElement("textarea",{ref:function(ee){return Jt.current=ee},style:n(n(n({},k.editor),k.textarea),$n),className:L+(ct?" ".concat(ct):""),id:Bt,value:Zt,onChange:Qn,onKeyDown:Do,onClick:oe,onKeyUp:Q,onFocus:ce,onBlur:W,disabled:z,form:G,maxLength:I,minLength:Z,name:ae,placeholder:se,readOnly:De,required:He,autoFocus:B,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),d.createElement("style",{dangerouslySetInnerHTML:{__html:j}}))}),k={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 Wt.default=A,Wt}var vT=bT();const CT=jx(vT);var Nd={exports:{}},By;function ST(){return By||(By=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,f={},p={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function j(A){return A instanceof m?new m(A.type,j(A.content),A.alias):Array.isArray(A)?A.map(j):A.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(j){return Object.prototype.toString.call(j).slice(8,-1)},objId:function(j){return j.__id||Object.defineProperty(j,"__id",{value:++d}),j.__id},clone:function j(A,k){k=k||{};var T,w;switch(p.util.type(A)){case"Object":if(w=p.util.objId(A),k[w])return k[w];T={},k[w]=T;for(var R in A)A.hasOwnProperty(R)&&(T[R]=j(A[R],k));return T;case"Array":return w=p.util.objId(A),k[w]?k[w]:(T=[],k[w]=T,A.forEach(function(B,z){T[z]=j(B,k)}),T);default:return A}},getLanguage:function(j){for(;j;){var A=c.exec(j.className);if(A)return A[1].toLowerCase();j=j.parentElement}return"none"},setLanguage:function(j,A){j.className=j.className.replace(RegExp(c,"gi"),""),j.classList.add("language-"+A)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(T){var j=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if(j){var A=document.getElementsByTagName("script");for(var k in A)if(A[k].src==j)return A[k]}return null}},isActive:function(j,A,k){for(var T="no-"+A;j;){var w=j.classList;if(w.contains(A))return!0;if(w.contains(T))return!1;j=j.parentElement}return!!k}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function(j,A){var k=p.util.clone(p.languages[j]);for(var T in A)k[T]=A[T];return k},insertBefore:function(j,A,k,T){T=T||p.languages;var w=T[j],R={};for(var B in w)if(w.hasOwnProperty(B)){if(B==A)for(var z in k)k.hasOwnProperty(z)&&(R[z]=k[z]);k.hasOwnProperty(B)||(R[B]=w[B])}var G=T[j];return T[j]=R,p.languages.DFS(p.languages,function(ne,X){X===G&&ne!=j&&(this[ne]=R)}),R},DFS:function j(A,k,T,w){w=w||{};var R=p.util.objId;for(var B in A)if(A.hasOwnProperty(B)){k.call(A,B,A[B],T||B);var z=A[B],G=p.util.type(z);G==="Object"&&!w[R(z)]?(w[R(z)]=!0,j(z,k,null,w)):G==="Array"&&!w[R(z)]&&(w[R(z)]=!0,j(z,k,B,w))}}},plugins:{},highlightAll:function(j,A){p.highlightAllUnder(document,j,A)},highlightAllUnder:function(j,A,k){var T={callback:k,container:j,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};p.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),p.hooks.run("before-all-elements-highlight",T);for(var w=0,R;R=T.elements[w++];)p.highlightElement(R,A===!0,T.callback)},highlightElement:function(j,A,k){var T=p.util.getLanguage(j),w=p.languages[T];p.util.setLanguage(j,T);var R=j.parentElement;R&&R.nodeName.toLowerCase()==="pre"&&p.util.setLanguage(R,T);var B=j.textContent,z={element:j,language:T,grammar:w,code:B};function G(X){z.highlightedCode=X,p.hooks.run("before-insert",z),z.element.innerHTML=z.highlightedCode,p.hooks.run("after-highlight",z),p.hooks.run("complete",z),k&&k.call(z.element)}if(p.hooks.run("before-sanity-check",z),R=z.element.parentElement,R&&R.nodeName.toLowerCase()==="pre"&&!R.hasAttribute("tabindex")&&R.setAttribute("tabindex","0"),!z.code){p.hooks.run("complete",z),k&&k.call(z.element);return}if(p.hooks.run("before-highlight",z),!z.grammar){G(p.util.encode(z.code));return}if(A&&r.Worker){var ne=new Worker(p.filename);ne.onmessage=function(X){G(X.data)},ne.postMessage(JSON.stringify({language:z.language,code:z.code,immediateClose:!0}))}else G(p.highlight(z.code,z.grammar,z.language))},highlight:function(j,A,k){var T={code:j,grammar:A,language:k};if(p.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=p.tokenize(T.code,T.grammar),p.hooks.run("after-tokenize",T),m.stringify(p.util.encode(T.tokens),T.language)},tokenize:function(j,A){var k=A.rest;if(k){for(var T in k)A[T]=k[T];delete A.rest}var w=new x;return b(w,w.head,j),S(j,w,A,w.head,0),N(w)},hooks:{all:{},add:function(j,A){var k=p.hooks.all;k[j]=k[j]||[],k[j].push(A)},run:function(j,A){var k=p.hooks.all[j];if(!(!k||!k.length))for(var T=0,w;w=k[T++];)w(A)}},Token:m};r.Prism=p;function m(j,A,k,T){this.type=j,this.content=A,this.alias=k,this.length=(T||"").length|0}m.stringify=function j(A,k){if(typeof A=="string")return A;if(Array.isArray(A)){var T="";return A.forEach(function(G){T+=j(G,k)}),T}var w={type:A.type,content:j(A.content,k),tag:"span",classes:["token",A.type],attributes:{},language:k},R=A.alias;R&&(Array.isArray(R)?Array.prototype.push.apply(w.classes,R):w.classes.push(R)),p.hooks.run("wrap",w);var B="";for(var z in w.attributes)B+=" "+z+'="'+(w.attributes[z]||"").replace(/"/g,""")+'"';return"<"+w.tag+' class="'+w.classes.join(" ")+'"'+B+">"+w.content+"</"+w.tag+">"};function y(j,A,k,T){j.lastIndex=A;var w=j.exec(k);if(w&&T&&w[1]){var R=w[1].length;w.index+=R,w[0]=w[0].slice(R)}return w}function S(j,A,k,T,w,R){for(var B in k)if(!(!k.hasOwnProperty(B)||!k[B])){var z=k[B];z=Array.isArray(z)?z:[z];for(var G=0;G<z.length;++G){if(R&&R.cause==B+","+G)return;var ne=z[G],X=ne.inside,ye=!!ne.lookbehind,te=!!ne.greedy,ve=ne.alias;if(te&&!ne.pattern.global){var I=ne.pattern.toString().match(/[imsuy]*$/)[0];ne.pattern=RegExp(ne.pattern.source,I+"g")}for(var Z=ne.pattern||ne,ae=T.next,W=w;ae!==A.tail&&!(R&&W>=R.reach);W+=ae.value.length,ae=ae.next){var oe=ae.value;if(A.length>j.length)return;if(!(oe instanceof m)){var ce=1,he;if(te){if(he=y(Z,W,j,ye),!he||he.index>=j.length)break;var ie=he.index,Q=he.index+he[0].length,J=W;for(J+=ae.value.length;ie>=J;)ae=ae.next,J+=ae.value.length;if(J-=ae.value.length,W=J,ae.value instanceof m)continue;for(var re=ae;re!==A.tail&&(J<Q||typeof re.value=="string");re=re.next)ce++,J+=re.value.length;ce--,oe=j.slice(W,J),he.index-=W}else if(he=y(Z,0,oe,ye),!he)continue;var ie=he.index,se=he[0],ge=oe.slice(0,ie),De=oe.slice(ie+se.length),He=W+oe.length;R&&He>R.reach&&(R.reach=He);var lt=ae.prev;ge&&(lt=b(A,lt,ge),W+=ge.length),D(A,lt,ce);var gt=new m(B,X?p.tokenize(se,X):se,ve,se);if(ae=b(A,lt,gt),De&&b(A,ae,De),ce>1){var qe={cause:B+","+G,reach:He};S(j,A,k,ae.prev,W,qe),R&&qe.reach>R.reach&&(R.reach=qe.reach)}}}}}}function x(){var j={value:null,prev:null,next:null},A={value:null,prev:j,next:null};j.next=A,this.head=j,this.tail=A,this.length=0}function b(j,A,k){var T=A.next,w={value:k,prev:A,next:T};return A.next=w,T.prev=w,j.length++,w}function D(j,A,k){for(var T=A.next,w=0;w<k&&T!==j.tail;w++)T=T.next;A.next=T,T.prev=A,j.length-=w}function N(j){for(var A=[],k=j.head.next;k!==j.tail;)A.push(k.value),k=k.next;return A}if(!r.document)return r.addEventListener&&(p.disableWorkerMessageHandler||r.addEventListener("message",function(j){var A=JSON.parse(j.data),k=A.language,T=A.code,w=A.immediateClose;r.postMessage(p.highlight(T,p.languages[k],k)),w&&r.close()},!1)),p;var E=p.util.currentScript();E&&(p.filename=E.src,E.hasAttribute("data-manual")&&(p.manual=!0));function O(){p.manual||p.highlightAll()}if(!p.manual){var L=document.readyState;L==="loading"||L==="interactive"&&E&&E.defer?document.addEventListener("DOMContentLoaded",O):window.requestAnimationFrame?window.requestAnimationFrame(O):window.setTimeout(O,16)}return p})(a);n.exports&&(n.exports=o),typeof Pg<"u"&&(Pg.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(/&/,"&"))}),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(c,d){var f={};f["language-"+d]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:o.languages[d]},f.cdata=/^<!\[CDATA\[|\]\]>$/i;var p={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:f}};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(E,O){return"✖ Error "+E+" while fetching file: "+O},d="✖ Error: File does not exist or is empty",f={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},p="data-src-status",m="loading",y="loaded",S="failed",x="pre[data-src]:not(["+p+'="'+y+'"]):not(['+p+'="'+m+'"])';function b(E,O,L){var j=new XMLHttpRequest;j.open("GET",E,!0),j.onreadystatechange=function(){j.readyState==4&&(j.status<400&&j.responseText?O(j.responseText):j.status>=400?L(c(j.status,j.statusText)):L(d))},j.send(null)}function D(E){var O=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(E||"");if(O){var L=Number(O[1]),j=O[2],A=O[3];return j?A?[L,Number(A)]:[L,void 0]:[L,L]}}o.hooks.add("before-highlightall",function(E){E.selector+=", "+x}),o.hooks.add("before-sanity-check",function(E){var O=E.element;if(O.matches(x)){E.code="",O.setAttribute(p,m);var L=O.appendChild(document.createElement("CODE"));L.textContent=r;var j=O.getAttribute("data-src"),A=E.language;if(A==="none"){var k=(/\.(\w+)$/.exec(j)||[,"none"])[1];A=f[k]||k}o.util.setLanguage(L,A),o.util.setLanguage(O,A);var T=o.plugins.autoloader;T&&T.loadLanguages(A),b(j,function(w){O.setAttribute(p,y);var R=D(O.getAttribute("data-range"));if(R){var B=w.split(/\r\n?|\n/g),z=R[0],G=R[1]==null?B.length:R[1];z<0&&(z+=B.length),z=Math.max(0,Math.min(z-1,B.length)),G<0&&(G+=B.length),G=Math.max(0,Math.min(G,B.length)),w=B.slice(z,G).join(`
|
|
47
|
-
`),O.hasAttribute("data-start")||O.setAttribute("data-start",String(z+1))}L.textContent=w,o.highlightElement(L)},function(w){O.setAttribute(p,S),L.textContent=w})}}),o.plugins.fileHighlight={highlight:function(O){for(var L=(O||document).querySelectorAll(x),j=0,A;A=L[j++];)o.highlightElement(A)}};var N=!1;o.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),o.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Nd)),Nd.exports}var wT=ST();const NT=jx(wT);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 f(p,m){m=(m||"").replace(/m/g,"")+"m";var y=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return p});return RegExp(y,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:f(/\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:f(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:f(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:f(d),lookbehind:!0,greedy:!0},number:{pattern:f(/[+-]?(?: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 kT(n,a){let o=n.slice(0,a).split(/\r\n|\n|\r/g);return[o.length,o.pop().length+1]}function AT(n,a,o){let r=n.split(/\r\n|\n|\r/g),c="",d=(Math.log10(a+1)|0)+1;for(let f=a-1;f<=a+1;f++){let p=r[f-1];p&&(c+=f.toString().padEnd(d," "),c+=": ",c+=p,c+=`
|
|
48
|
-
`,f===a&&(c+=" ".repeat(d+o+2),c+=`^
|
|
49
|
-
`))}return c}class Ge extends Error{line;column;codeblock;constructor(a,o){const[r,c]=kT(o.toml,o.ptr),d=AT(o.toml,r,c);super(`Invalid TOML document: ${a}
|
|
50
|
-
|
|
51
|
-
${d}`,o),this.line=r,this.column=c,this.codeblock=d}}function DT(n,a){let o=0;for(;n[a-++o]==="\\";);return--o&&o%2}function Fd(n,a=0,o=n.length){let r=n.indexOf(`
|
|
52
|
-
`,a);return n[r-1]==="\r"&&r--,r<=o?r:-1}function Yl(n,a){for(let o=a;o<n.length;o++){let r=n[o];if(r===`
|
|
53
|
-
`)return o;if(r==="\r"&&n[o+1]===`
|
|
54
|
-
`)return o+1;if(r<" "&&r!==" "||r==="")throw new Ge("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===`
|
|
55
|
-
`||c==="\r"&&n[a+1]===`
|
|
56
|
-
`);)a++;if(r||c!=="#")break;a=Yl(n,a)}return a}function jT(n,a,o,r,c=!1){if(!r)return a=Fd(n,a),a<0?n.length:a;for(let d=a;d<n.length;d++){let f=n[d];if(f==="#")d=Fd(n,d);else{if(f===o)return d+1;if(f===r||c&&(f===`
|
|
57
|
-
`||f==="\r"&&n[d+1]===`
|
|
58
|
-
`))return d}}throw new Ge("cannot find end of structure",{toml:n,ptr:a})}function Qb(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!=="'"&&DT(n,a));return a>-1&&(a+=r.length,r.length>1&&(n[a]===o&&a++,n[a]===o&&a++)),a}let TT=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;class bo 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(TT);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 bo(a);return r.#e=o,r}static wrapAsLocalDateTime(a){let o=new bo(a);return o.#e=null,o}static wrapAsLocalDate(a){let o=new bo(a);return o.#n=!1,o.#e=null,o}static wrapAsLocalTime(a){let o=new bo(a);return o.#t=!1,o.#e=null,o}}let MT=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ET=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,OT=/^[+-]?0[0-9_]/,PT=/^[0-9a-f]{2,8}$/i,Ky={b:"\b",t:" ",n:`
|
|
59
|
-
`,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function Xb(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]===`
|
|
60
|
-
`&&a++);let d=0,f,p="",m=a;for(;a<o-1;){let y=n[a++];if(y===`
|
|
61
|
-
`||y==="\r"&&n[a]===`
|
|
62
|
-
`){if(!c)throw new Ge("newlines are not allowed in strings",{toml:n,ptr:a-1})}else if(y<" "&&y!==" "||y==="")throw new Ge("control characters are not allowed in strings",{toml:n,ptr:a-1});if(f){if(f=!1,y==="x"||y==="u"||y==="U"){let S=n.slice(a,a+=y==="x"?2:y==="u"?4:8);if(!PT.test(S))throw new Ge("invalid unicode escape",{toml:n,ptr:d});try{p+=String.fromCodePoint(parseInt(S,16))}catch{throw new Ge("invalid unicode escape",{toml:n,ptr:d})}}else if(c&&(y===`
|
|
63
|
-
`||y===" "||y===" "||y==="\r")){if(a=Ca(n,a-1,!0),n[a]!==`
|
|
64
|
-
`&&n[a]!=="\r")throw new Ge("invalid escape: only line-ending whitespace may be escaped",{toml:n,ptr:d});a=Ca(n,a)}else if(y in Ky)p+=Ky[y];else throw new Ge("unrecognized escape sequence",{toml:n,ptr:d});m=a}else!r&&y==="\\"&&(d=a-1,f=!0,p+=n.slice(m,d))}return p+n.slice(m,o-1)}function LT(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=MT.test(n);if(c||ET.test(n)){if(OT.test(n))throw new Ge("leading zeroes are not allowed",{toml:a,ptr:o});n=n.replace(/_/g,"");let f=+n;if(isNaN(f))throw new Ge("invalid number",{toml:a,ptr:o});if(c){if((c=!Number.isSafeInteger(f))&&!r)throw new Ge("integer value cannot be represented losslessly",{toml:a,ptr:o});(c||r===!0)&&(f=BigInt(n))}return f}const d=new bo(n);if(!d.isValid())throw new Ge("invalid value",{toml:a,ptr:o});return d}function RT(n,a,o){let r=n.slice(a,o),c=r.indexOf("#");return c>-1&&(Yl(n,c),r=r.slice(0,c)),[r.trimEnd(),c]}function zf(n,a,o,r,c){if(r===0)throw new Ge("document contains excessively nested structures. aborting.",{toml:n,ptr:a});let d=n[a];if(d==="["||d==="{"){let[m,y]=d==="["?IT(n,a,r,c):zT(n,a,r,c);if(o){if(y=Ca(n,y),n[y]===",")y++;else if(n[y]!==o)throw new Ge("expected comma or end of structure",{toml:n,ptr:y})}return[m,y]}let f;if(d==='"'||d==="'"){f=Qb(n,a);let m=Xb(n,a,f);if(o){if(f=Ca(n,f),n[f]&&n[f]!==","&&n[f]!==o&&n[f]!==`
|
|
65
|
-
`&&n[f]!=="\r")throw new Ge("unexpected character encountered",{toml:n,ptr:f});f+=+(n[f]===",")}return[m,f]}f=jT(n,a,",",o);let p=RT(n,a,f-+(n[f-1]===","));if(!p[0])throw new Ge("incomplete key-value declaration: no value specified",{toml:n,ptr:a});return o&&p[1]>-1&&(f=Ca(n,a+p[1]),f+=+(n[f]===",")),[LT(p[0],n,a,c),f]}let _T=/^[a-zA-Z0-9-_]+[ \t]*$/;function Vd(n,a,o="="){let r=a-1,c=[],d=n.indexOf(o,a);if(d<0)throw new Ge("incomplete key-value: cannot find end of key",{toml:n,ptr:a});do{let f=n[a=++r];if(f!==" "&&f!==" ")if(f==='"'||f==="'"){if(f===n[a+1]&&f===n[a+2])throw new Ge("multiline strings are not allowed in keys",{toml:n,ptr:a});let p=Qb(n,a);if(p<0)throw new Ge("unfinished string encountered",{toml:n,ptr:a});r=n.indexOf(".",p);let m=n.slice(p,r<0||r>d?d:r),y=Fd(m);if(y>-1)throw new Ge("newlines are not allowed in keys",{toml:n,ptr:a+r+y});if(m.trimStart())throw new Ge("found extra tokens after the string part",{toml:n,ptr:p});if(d<p&&(d=n.indexOf(o,p),d<0))throw new Ge("incomplete key-value: cannot find end of key",{toml:n,ptr:a});c.push(Xb(n,a,p))}else{r=n.indexOf(".",a);let p=n.slice(a,r<0||r>d?d:r);if(!_T.test(p))throw new Ge("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 zT(n,a,o,r){let c={},d=new Set,f;for(a++;(f=n[a++])!=="}"&&f;){if(f===",")throw new Ge("expected value, found comma",{toml:n,ptr:a-1});if(f==="#")a=Yl(n,a);else if(f!==" "&&f!==" "&&f!==`
|
|
66
|
-
`&&f!=="\r"){let p,m=c,y=!1,[S,x]=Vd(n,a-1);for(let N=0;N<S.length;N++){if(N&&(m=y?m[p]:m[p]={}),p=S[N],(y=Object.hasOwn(m,p))&&(typeof m[p]!="object"||d.has(m[p])))throw new Ge("trying to redefine an already defined value",{toml:n,ptr:a});!y&&p==="__proto__"&&Object.defineProperty(m,p,{enumerable:!0,configurable:!0,writable:!0})}if(y)throw new Ge("trying to redefine an already defined value",{toml:n,ptr:a});let[b,D]=zf(n,x,"}",o-1,r);d.add(b),m[p]=b,a=D}}if(!f)throw new Ge("unfinished table encountered",{toml:n,ptr:a});return[c,a]}function IT(n,a,o,r){let c=[],d;for(a++;(d=n[a++])!=="]"&&d;){if(d===",")throw new Ge("expected value, found comma",{toml:n,ptr:a-1});if(d==="#")a=Yl(n,a);else if(d!==" "&&d!==" "&&d!==`
|
|
67
|
-
`&&d!=="\r"){let f=zf(n,a-1,"]",o-1,r);c.push(f[0]),a=f[1]}}if(!d)throw new Ge("unfinished array encountered",{toml:n,ptr:a});return[c,a]}function qy(n,a,o,r){let c=a,d=o,f,p=!1,m;for(let y=0;y<n.length;y++){if(y){if(c=p?c[f]:c[f]={},d=(m=d[f]).c,r===0&&(m.t===1||m.t===2))return null;if(m.t===2){let S=c.length-1;c=c[S],d=d[S].c}}if(f=n[y],(p=Object.hasOwn(c,f))&&d[f]?.t===0&&d[f]?.d)return null;p||(f==="__proto__"&&(Object.defineProperty(c,f,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(d,f,{enumerable:!0,configurable:!0,writable:!0})),d[f]={t:y<n.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(m=d[f],m.t!==r&&!(r===1&&m.t===3)||(r===2&&(m.d||(m.d=!0,c[f]=[]),c[f].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[f]:c[f]={};else if(r===0&&p)return null;return[f,c,m.c]}function UT(n,{maxDepth:a=1e3,integersAsBigInt:o}={}){let r={},c={},d=r,f=c;for(let p=Ca(n,0);p<n.length;){if(n[p]==="["){let m=n[++p]==="[",y=Vd(n,p+=+m,"]");if(m){if(n[y[1]-1]!=="]")throw new Ge("expected end of table declaration",{toml:n,ptr:y[1]-1});y[1]++}let S=qy(y[0],r,c,m?2:1);if(!S)throw new Ge("trying to redefine an already defined table or value",{toml:n,ptr:p});f=S[2],d=S[1],p=y[1]}else{let m=Vd(n,p),y=qy(m[0],d,f,0);if(!y)throw new Ge("trying to redefine an already defined table or value",{toml:n,ptr:p});let S=zf(n,m[1],void 0,a,o);y[1][y[0]]=S[0],p=S[1]}if(p=Ca(n,p,!0),n[p]&&n[p]!==`
|
|
68
|
-
`&&n[p]!=="\r")throw new Ge("each key-value declaration must be followed by an end-of-line",{toml:n,ptr:p});p=Ca(n,p)}return r}const HT=[/^ANTHROPIC_AUTH_TOKEN$/,/_API_KEY$/,/_AUTH_TOKEN$/,/_SECRET$/,/_SECRET_KEY$/,/^API_KEY$/,/^AUTH_TOKEN$/,/^SECRET$/,/_PASSWORD$/,/^PASSWORD$/,/_CREDENTIAL$/,/_PRIVATE_KEY$/];function BT(n){return HT.some(a=>a.test(n))}function KT(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),f=n.substring(0,d).split(`
|
|
69
|
-
`);return{valid:!1,error:r,line:f.length}}return{valid:!1,error:r}}}function qT(n){if(!n.trim())return{valid:!0};try{return UT(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 Zb({value:n,onChange:a,language:o="json",readonly:r=!1,className:c,minHeight:d="300px",heightMode:f="content"}){const{isDark:p}=uf(),[m,y]=C.useState(!1),[S,x]=C.useState(!0),b=f==="fill-parent",D=C.useMemo(()=>o==="json"?KT(n):o==="toml"?qT(n):{valid:!0},[n,o]),N=C.useCallback(E=>l.jsx(zw,{prism:NT,theme:p?Gg.nightOwl:Gg.github,code:E,language:o,children:({tokens:O,getLineProps:L,getTokenProps:j})=>{let A=!1;return l.jsx(l.Fragment,{children:O.map((k,T)=>l.jsx("div",{...L({line:k}),className:K(D.line===T+1&&"bg-destructive/20"),children:k.map((w,R)=>{let B=!1;if(w.types.includes("property")){const G=w.content.replace(/['"]/g,"");BT(G)?A=!0:A=!1}else(w.types.includes("string")||w.types.includes("number")||w.types.includes("boolean"))&&A?(B=!0,A=!1):w.types.includes("punctuation")&&w.content!==":"&&w.content!=="["&&w.content!=="{"&&(A=!1);const z=j({token:w});return B&&S&&(z.className=K(z.className,"blur-[3px] select-none opacity-70 transition-all duration-200")),l.jsx("span",{...z},R)})},T))})}}),[p,o,D.line,S]);return l.jsxs("div",{className:K("flex min-h-0 flex-col",b&&"h-full",c),style:b?{height:d==="auto"?void 0:d}:void 0,children:[l.jsxs("div",{className:K("relative rounded-md border overflow-hidden","bg-muted/30",b&&"flex min-h-0 flex-1 flex-col",m&&"ring-2 ring-ring ring-offset-2 ring-offset-background",r&&"opacity-70 cursor-not-allowed",!D.valid&&"border-destructive"),"data-slot":"code-editor-surface",children:[l.jsx("div",{className:K(b&&"scrollbar-editor min-h-0 flex-1 overflow-auto"),"data-slot":b?"code-editor-viewport":void 0,children:l.jsx(CT,{value:n,onValueChange:r?()=>{}:a,highlight:N,padding:12,disabled:r,onFocus:()=>y(!0),onBlur:()=>y(!1),textareaClassName:K("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(at,{variant:"ghost",size:"icon",className:"h-6 w-6 bg-background/50 hover:bg-background border shadow-sm rounded-full",onClick:()=>x(!S),title:S?"Reveal sensitive values":"Mask sensitive values",children:S?l.jsx(Fs,{className:"h-3 w-3"}):l.jsx(Gs,{className:"h-3 w-3"})})})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs",children:[D.valid?l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[l.jsx(Vs,{className:"w-3 h-3 text-green-500"}),"Valid ",o.toUpperCase()]}):l.jsxs("span",{className:"flex items-center gap-1 text-destructive",children:[l.jsx(Us,{className:"w-3 h-3"}),D.error,D.line&&` (line ${D.line})`]}),r&&l.jsx("span",{className:"ml-auto text-muted-foreground",children:"(Read-only)"})]})]})}const $l=Object.freeze(Object.defineProperty({__proto__:null,CodeEditor:Zb},Symbol.toStringTag,{value:"Module"})),GT={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 FT(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 Jb=C.createContext(null);function VT({children:n}){const[a,o]=C.useReducer(FT,GT);return l.jsx(Jb.Provider,{value:{state:a,dispatch:o},children:n})}function ev(){const n=C.useContext(Jb);if(!n)throw new Error("useSettingsContext must be used within a SettingsProvider");return n}function YT(){const{dispatch:n}=ev(),a=C.useCallback(w=>n({type:"SET_WEBSEARCH_CONFIG",payload:w}),[n]),o=C.useCallback(w=>n({type:"SET_WEBSEARCH_STATUS",payload:w}),[n]),r=C.useCallback(w=>n({type:"SET_WEBSEARCH_LOADING",payload:w}),[n]),c=C.useCallback(w=>n({type:"SET_WEBSEARCH_STATUS_LOADING",payload:w}),[n]),d=C.useCallback(w=>n({type:"SET_WEBSEARCH_SAVING",payload:w}),[n]),f=C.useCallback(w=>n({type:"SET_WEBSEARCH_ERROR",payload:w}),[n]),p=C.useCallback(w=>n({type:"SET_WEBSEARCH_SUCCESS",payload:w}),[n]),m=C.useCallback(w=>n({type:"SET_GLOBALENV_CONFIG",payload:w}),[n]),y=C.useCallback(w=>n({type:"SET_GLOBALENV_LOADING",payload:w}),[n]),S=C.useCallback(w=>n({type:"SET_GLOBALENV_SAVING",payload:w}),[n]),x=C.useCallback(w=>n({type:"SET_GLOBALENV_ERROR",payload:w}),[n]),b=C.useCallback(w=>n({type:"SET_GLOBALENV_SUCCESS",payload:w}),[n]),D=C.useCallback(w=>n({type:"SET_PROXY_CONFIG",payload:w}),[n]),N=C.useCallback(w=>n({type:"SET_PROXY_LOADING",payload:w}),[n]),E=C.useCallback(w=>n({type:"SET_PROXY_SAVING",payload:w}),[n]),O=C.useCallback(w=>n({type:"SET_PROXY_ERROR",payload:w}),[n]),L=C.useCallback(w=>n({type:"SET_PROXY_SUCCESS",payload:w}),[n]),j=C.useCallback(w=>n({type:"SET_PROXY_TEST_RESULT",payload:w}),[n]),A=C.useCallback(w=>n({type:"SET_PROXY_TESTING",payload:w}),[n]),k=C.useCallback(w=>n({type:"SET_RAW_CONFIG",payload:w}),[n]),T=C.useCallback(w=>n({type:"SET_RAW_CONFIG_LOADING",payload:w}),[n]);return C.useMemo(()=>({setWebSearchConfig:a,setWebSearchStatus:o,setWebSearchLoading:r,setWebSearchStatusLoading:c,setWebSearchSaving:d,setWebSearchError:f,setWebSearchSuccess:p,setGlobalEnvConfig:m,setGlobalEnvLoading:y,setGlobalEnvSaving:S,setGlobalEnvError:x,setGlobalEnvSuccess:b,setProxyConfig:D,setProxyLoading:N,setProxySaving:E,setProxyError:O,setProxySuccess:L,setProxyTestResult:j,setProxyTesting:A,setRawConfig:k,setRawConfigLoading:T}),[a,o,r,c,d,f,p,m,y,S,x,b,D,N,E,O,L,j,A,k,T])}function $T(){const[n,a]=pS(),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=C.useCallback(d=>{a({tab:d},{replace:!0})},[a]);return{activeTab:r,setActiveTab:c}}function WT(){const{state:n}=ev(),a=YT(),[o,r]=C.useState(!1),c=C.useCallback(async()=>{try{a.setRawConfigLoading(!0);const f=await fetch("/api/config/raw");if(!f.ok){a.setRawConfig(null);return}const p=await f.text();a.setRawConfig(p)}catch{a.setRawConfig(null)}finally{a.setRawConfigLoading(!1)}},[a]),d=C.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 Gy({activeTab:n,onTabChange:a}){const{t:o}=Mt(),r=[{value:"websearch",label:o("settingsTabs.web"),icon:zx},{value:"image",label:"Image",icon:Hx},{value:"channels",label:"Channels",icon:VS},{value:"globalenv",label:o("settingsTabs.env"),icon:Jd},{value:"thinking",label:o("settingsTabs.think"),icon:YS},{value:"proxy",label:o("settingsTabs.proxy"),icon:$S},{value:"auth",label:o("settingsTabs.auth"),icon:Qd},{value:"backups",label:o("settingsTabs.backup"),icon:WS}];return l.jsx(Kb,{value:n,onValueChange:c=>a(c),children:l.jsx(Tf,{className:"grid w-full grid-cols-8",children:r.map(({value:c,label:d,icon:f})=>l.jsxs(Dl,{value:c,className:"gap-1.5 px-2 text-xs",children:[l.jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),l.jsx("span",{className:"truncate",children:d})]},c))})})}function Fy(){return l.jsxs("div",{className:"flex-1 p-5 space-y-6",children:[l.jsx(Ye,{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(Ye,{className:"h-5 w-32"}),l.jsx(Ye,{className:"h-4 w-48"})]}),l.jsx(Ye,{className:"h-6 w-10 rounded-full"})]})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(Ye,{className:"h-5 w-24"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ye,{className:"h-20 w-full rounded-lg"}),l.jsx(Ye,{className:"h-20 w-full rounded-lg"}),l.jsx(Ye,{className:"h-20 w-full rounded-lg"})]})]})]})}function tv(n,a=3,o=1e3){return n().catch(r=>{if(a<=0)throw r;return new Promise(c=>setTimeout(c,o)).then(()=>tv(n,a-1,o*2))})}function ei(n){return C.lazy(()=>tv(n))}const Vy=ei(()=>nt(()=>import("./index-l8yS9gLo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),Yy=ei(()=>nt(()=>import("./index-DUM_z9jT.js"),__vite__mapDeps([10,1,2,4,5,6,7,8,9]))),$y=ei(()=>nt(()=>import("./channels-BFBl4r-j.js"),__vite__mapDeps([11,1,2,4,5,6,7,8,9]))),Wy=ei(()=>nt(()=>import("./globalenv-section-CKv4BfT4.js"),__vite__mapDeps([12,1,2,4,5,6,7,8,9]))),Qy=ei(()=>nt(()=>import("./index-B185OZF2.js"),__vite__mapDeps([13,1,2,4,5,6,7,8,9]))),Xy=ei(()=>nt(()=>import("./index-DESEUD89.js"),__vite__mapDeps([14,1,2,15,4,16,17,5,6,18,7,8,9]))),Zy=ei(()=>nt(()=>import("./auth-section-BoDZqbPJ.js"),__vite__mapDeps([19,1,2,4,5,6,7,8,9]))),Jy=ei(()=>nt(()=>import("./backups-section-D4-FbvV4.js"),__vite__mapDeps([20,1,2,17,4,5,6,7,8,9])));class ex extends C.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(Us,{className:"w-12 h-12 mx-auto mb-4 text-destructive"}),l.jsx("p",{className:"font-medium text-foreground mb-2",children:Ke.t("settings.sectionLoadFailed")}),l.jsx("p",{className:"text-sm mb-4",children:this.state.error?.message||Ke.t("settings.unknownError")}),l.jsxs(at,{variant:"outline",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2",children:[l.jsx(Is,{className:"w-4 h-4"}),Ke.t("settings.reloadPage")]})]})}):this.props.children}}function QT(){const{t:n}=Mt(),{activeTab:a,setActiveTab:o}=$T(),{rawConfig:r,loading:c,copied:d,fetchRawConfig:f,copyToClipboard:p}=WT();C.useEffect(()=>{f()},[f]);const m=y=>{C.startTransition(()=>{o(y)})};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(Gy,{activeTab:a,onTabChange:m})}),l.jsx(ex,{children:l.jsxs(C.Suspense,{fallback:l.jsx(Fy,{}),children:[a==="websearch"&&l.jsx(Vy,{}),a==="image"&&l.jsx(Yy,{}),a==="channels"&&l.jsx($y,{}),a==="globalenv"&&l.jsx(Wy,{}),a==="thinking"&&l.jsx(Qy,{}),a==="proxy"&&l.jsx(Xy,{}),a==="auth"&&l.jsx(Zy,{}),a==="backups"&&l.jsx(Jy,{})]})})]}),l.jsxs(Df,{direction:"horizontal",className:"h-full hidden md:flex",children:[l.jsx(Bs,{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(Gy,{activeTab:a,onTabChange:m})}),l.jsx(ex,{children:l.jsxs(C.Suspense,{fallback:l.jsx(Fy,{}),children:[a==="websearch"&&l.jsx(Vy,{}),a==="image"&&l.jsx(Yy,{}),a==="channels"&&l.jsx($y,{}),a==="globalenv"&&l.jsx(Wy,{}),a==="thinking"&&l.jsx(Qy,{}),a==="proxy"&&l.jsx(Xy,{}),a==="auth"&&l.jsx(Zy,{}),a==="backups"&&l.jsx(Jy,{})]})})]})}),l.jsx(jf,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:l.jsx(Ol,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),l.jsx(Bs,{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(Ig,{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(at,{variant:"outline",size:"sm",onClick:p,disabled:!r,children:d?l.jsxs(l.Fragment,{children:[l.jsx(Co,{className:"w-4 h-4 mr-1"}),n("settings.copied")]}):l.jsxs(l.Fragment,{children:[l.jsx(vl,{className:"w-4 h-4 mr-1"}),n("settings.copy")]})}),l.jsx(at,{variant:"outline",size:"sm",onClick:f,disabled:c,children:l.jsx(Is,{className:`w-4 h-4 ${c?"animate-spin":""}`})})]})]}),l.jsx("div",{className:"flex-1 overflow-auto",children:r?l.jsx(Zb,{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(Is,{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(Ig,{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 XT(){return l.jsx(VT,{children:l.jsx(QT,{})})}const ZT=Object.freeze(Object.defineProperty({__proto__:null,SettingsPage:XT},Symbol.toStringTag,{value:"Module"}));function JT(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 eM={},Ms={};function wi(n,a){try{const r=(eM[n]||=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).format)(a).split("GMT")[1];return r in Ms?Ms[r]:tx(r,r.split(":"))}catch{if(n in Ms)return Ms[n];const o=n?.match(tM);return o?tx(n,o.slice(1)):NaN}}const tM=/([+-]\d\d):?(\d\d)?/;function tx(n,a){const o=+(a[0]||0),r=+(a[1]||0),c=+(a[2]||0)/60;return Ms[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(wi(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)),nv(this),Yd(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=-wi(this.timeZone,this);return a>0?Math.floor(a):Math.ceil(a)}setTime(a){return Date.prototype.setTime.apply(this,arguments),Yd(this),+this}[Symbol.for("constructDateFrom")](a){return new qn(+new Date(a),this.timeZone)}}const nx=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!nx.test(n))return;const a=n.replace(nx,"$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),nM(this),+this},qn.prototype[a]=function(){return Date.prototype[a].apply(this,arguments),Yd(this),+this}))});function Yd(n){n.internal.setTime(+n),n.internal.setUTCSeconds(n.internal.getUTCSeconds()-Math.round(-wi(n.timeZone,n)*60))}function nM(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()),nv(n)}function nv(n){const a=wi(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(),f=c-d,p=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();f&&p&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+f);const m=c-o;m&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+m);const y=new Date(+n);y.setUTCSeconds(0);const S=c>0?y.getSeconds():(y.getSeconds()-60)%60,x=Math.round(-(wi(n.timeZone,n)*60))%60;(x||S)&&(n.internal.setUTCSeconds(n.internal.getUTCSeconds()+x),Date.prototype.setUTCSeconds.call(n,Date.prototype.getUTCSeconds.call(n)+x+S));const b=wi(n.timeZone,n),D=b>0?Math.floor(b):Math.ceil(b),E=-new Date(+n).getTimezoneOffset()-D,O=D!==o,L=E-m;if(O&&L){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+L);const j=wi(n.timeZone,n),A=j>0?Math.floor(j):Math.ceil(j),k=D-A;k&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+k),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+k))}}class xa extends qn{static tz(a,...o){return o.length?new xa(...o,a):new xa(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} (${JT(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 xa(+this,a)}[Symbol.for("constructDateFrom")](a){return new xa(+new Date(a),this.timeZone)}}const ax=5,aM=4;function iM(n,a){const o=a.startOfMonth(n),r=o.getDay()>0?o.getDay():7,c=a.addDays(n,-r+1),d=a.addDays(c,ax*7-1);return a.getMonth(n)===a.getMonth(d)?ax:aM}function av(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 oM(n,a){const o=av(n,a),r=iM(n,a);return a.addDays(o,r*7-1)}const iv={...Cs,labels:{labelDayButton:(n,a,o,r)=>{let c;r&&typeof r.format=="function"?c=r.format.bind(r):c=(f,p)=>ks(f,p,{locale:Cs,...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)=>ks(c,d,{locale:Cs,...a}),r(n,"LLLL yyyy")},labelGridcell:(n,a,o,r)=>{let c;r&&typeof r.format=="function"?c=r.format.bind(r):c=(f,p)=>ks(f,p,{locale:Cs,...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)=>ks(c,d,{locale:Cs,...a}),r(n,"cccc")}}};class hn{constructor(a,o){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?xa.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 xa(r,c,d,this.options.timeZone):new Date(r,c,d),this.addDays=(r,c)=>this.overrides?.addDays?this.overrides.addDays(r,c):ew(r,c),this.addMonths=(r,c)=>this.overrides?.addMonths?this.overrides.addMonths(r,c):tw(r,c),this.addWeeks=(r,c)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,c):nw(r,c),this.addYears=(r,c)=>this.overrides?.addYears?this.overrides.addYears(r,c):aw(r,c),this.differenceInCalendarDays=(r,c)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,c):iw(r,c),this.differenceInCalendarMonths=(r,c)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,c):ow(r,c),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):sw(r),this.eachYearOfInterval=r=>{const c=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):rw(r),d=new Set(c.map(p=>this.getYear(p)));if(d.size===c.length)return c;const f=[];return d.forEach(p=>{f.push(new Date(p,0,1))}),f},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):oM(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):lw(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):cw(r),this.endOfWeek=(r,c)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,c):uw(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):dw(r),this.format=(r,c,d)=>{const f=this.overrides?.format?this.overrides.format(r,c,this.options):ks(r,c,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(f):f},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):fw(r),this.getMonth=(r,c)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):hw(r,this.options),this.getYear=(r,c)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):pw(r,this.options),this.getWeek=(r,c)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):mw(r,this.options),this.isAfter=(r,c)=>this.overrides?.isAfter?this.overrides.isAfter(r,c):gw(r,c),this.isBefore=(r,c)=>this.overrides?.isBefore?this.overrides.isBefore(r,c):yw(r,c),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):xw(r),this.isSameDay=(r,c)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,c):bw(r,c),this.isSameMonth=(r,c)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,c):vw(r,c),this.isSameYear=(r,c)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,c):Cw(r,c),this.max=r=>this.overrides?.max?this.overrides.max(r):Sw(r),this.min=r=>this.overrides?.min?this.overrides.min(r):ww(r),this.setMonth=(r,c)=>this.overrides?.setMonth?this.overrides.setMonth(r,c):Nw(r,c),this.setYear=(r,c)=>this.overrides?.setYear?this.overrides.setYear(r,c):kw(r,c),this.startOfBroadcastWeek=(r,c)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):av(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Aw(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):Dw(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):jw(r),this.startOfWeek=(r,c)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Tw(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):Mw(r),this.options={locale:iv,...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&&hn.yearFirstLocales.has(a)?"year-first":"month-first"}formatMonthYear(a){const{locale:o,timeZone:r,numerals:c}=this.options,d=o?.code;if(d&&hn.yearFirstLocales.has(d))try{return new Intl.DateTimeFormat(d,{month:"long",year:"numeric",timeZone:r,numberingSystem:c}).format(a)}catch{}const f=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(a,f)}}hn.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 hn;class ov{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 sM{constructor(a,o){this.date=a,this.weeks=o}}class rM{constructor(a,o){this.days=o,this.weekNumber=a}}function lM(n){return ue.createElement("button",{...n})}function cM(n){return ue.createElement("span",{...n})}function uM(n){const{size:a=24,orientation:o="left",className:r}=n;return ue.createElement("svg",{className:r,width:a,height:a,viewBox:"0 0 24 24"},o==="up"&&ue.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&ue.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&ue.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&ue.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function dM(n){const{day:a,modifiers:o,...r}=n;return ue.createElement("td",{...r})}function fM(n){const{day:a,modifiers:o,...r}=n,c=ue.useRef(null);return ue.useEffect(()=>{o.focused&&c.current?.focus()},[o.focused]),ue.createElement("button",{ref:c,...r})}var xe;(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"})(xe||(xe={}));var ft;(function(n){n.disabled="disabled",n.hidden="hidden",n.outside="outside",n.focused="focused",n.today="today"})(ft||(ft={}));var En;(function(n){n.range_end="range_end",n.range_middle="range_middle",n.range_start="range_start",n.selected="selected"})(En||(En={}));var fn;(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"})(fn||(fn={}));function hM(n){const{options:a,className:o,components:r,classNames:c,...d}=n,f=[c[xe.Dropdown],o].join(" "),p=a?.find(({value:m})=>m===d.value);return ue.createElement("span",{"data-disabled":d.disabled,className:c[xe.DropdownRoot]},ue.createElement(r.Select,{className:f,...d},a?.map(({value:m,label:y,disabled:S})=>ue.createElement(r.Option,{key:m,value:m,disabled:S},y))),ue.createElement("span",{className:c[xe.CaptionLabel],"aria-hidden":!0},p?.label,ue.createElement(r.Chevron,{orientation:"down",size:18,className:c[xe.Chevron]})))}function pM(n){return ue.createElement("div",{...n})}function mM(n){return ue.createElement("div",{...n})}function gM(n){const{calendarMonth:a,displayIndex:o,...r}=n;return ue.createElement("div",{...r},n.children)}function yM(n){const{calendarMonth:a,displayIndex:o,...r}=n;return ue.createElement("div",{...r})}function xM(n){return ue.createElement("table",{...n})}function bM(n){return ue.createElement("div",{...n})}const sv=C.createContext(void 0);function Ws(){const n=C.useContext(sv);if(n===void 0)throw new Error("useDayPicker() must be used within a custom component.");return n}function vM(n){const{components:a}=Ws();return ue.createElement(a.Dropdown,{...n})}function CM(n){const{onPreviousClick:a,onNextClick:o,previousMonth:r,nextMonth:c,...d}=n,{components:f,classNames:p,labels:{labelPrevious:m,labelNext:y}}=Ws(),S=C.useCallback(b=>{c&&o?.(b)},[c,o]),x=C.useCallback(b=>{r&&a?.(b)},[r,a]);return ue.createElement("nav",{...d},ue.createElement(f.PreviousMonthButton,{type:"button",className:p[xe.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":m(r),onClick:x},ue.createElement(f.Chevron,{disabled:r?void 0:!0,className:p[xe.Chevron],orientation:"left"})),ue.createElement(f.NextMonthButton,{type:"button",className:p[xe.NextMonthButton],tabIndex:c?void 0:-1,"aria-disabled":c?void 0:!0,"aria-label":y(c),onClick:S},ue.createElement(f.Chevron,{disabled:c?void 0:!0,orientation:"right",className:p[xe.Chevron]})))}function SM(n){const{components:a}=Ws();return ue.createElement(a.Button,{...n})}function wM(n){return ue.createElement("option",{...n})}function NM(n){const{components:a}=Ws();return ue.createElement(a.Button,{...n})}function kM(n){const{rootRef:a,...o}=n;return ue.createElement("div",{...o,ref:a})}function AM(n){return ue.createElement("select",{...n})}function DM(n){const{week:a,...o}=n;return ue.createElement("tr",{...o})}function jM(n){return ue.createElement("th",{...n})}function TM(n){return ue.createElement("thead",{"aria-hidden":!0},ue.createElement("tr",{...n}))}function MM(n){const{week:a,...o}=n;return ue.createElement("th",{...o})}function EM(n){return ue.createElement("th",{...n})}function OM(n){return ue.createElement("tbody",{...n})}function PM(n){const{components:a}=Ws();return ue.createElement(a.Dropdown,{...n})}const LM=Object.freeze(Object.defineProperty({__proto__:null,Button:lM,CaptionLabel:cM,Chevron:uM,Day:dM,DayButton:fM,Dropdown:hM,DropdownNav:pM,Footer:mM,Month:gM,MonthCaption:yM,MonthGrid:xM,Months:bM,MonthsDropdown:vM,Nav:CM,NextMonthButton:SM,Option:wM,PreviousMonthButton:NM,Root:kM,Select:AM,Week:DM,WeekNumber:MM,WeekNumberHeader:EM,Weekday:jM,Weekdays:TM,Weeks:OM,YearsDropdown:PM},Symbol.toStringTag,{value:"Module"}));function ba(n,a,o=!1,r=Vn){let{from:c,to:d}=n;const{differenceInCalendarDays:f,isSameDay:p}=r;return c&&d?(f(d,c)<0&&([c,d]=[d,c]),f(a,c)>=(o?1:0)&&f(d,a)>=(o?1:0)):!o&&d?p(d,a):!o&&c?p(c,a):!1}function If(n){return!!(n&&typeof n=="object"&&"before"in n&&"after"in n)}function Wl(n){return!!(n&&typeof n=="object"&&"from"in n)}function Uf(n){return!!(n&&typeof n=="object"&&"after"in n)}function Hf(n){return!!(n&&typeof n=="object"&&"before"in n)}function rv(n){return!!(n&&typeof n=="object"&&"dayOfWeek"in n)}function lv(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:f}=o;return r.some(p=>{if(typeof p=="boolean")return p;if(o.isDate(p))return c(n,p);if(lv(p,o))return p.some(m=>c(n,m));if(Wl(p))return ba(p,n,!1,o);if(rv(p))return Array.isArray(p.dayOfWeek)?p.dayOfWeek.includes(n.getDay()):p.dayOfWeek===n.getDay();if(If(p)){const m=d(p.before,n),y=d(p.after,n),S=m>0,x=y<0;return f(p.before,p.after)?x&&S:S||x}return Uf(p)?d(n,p.after)>0:Hf(p)?d(p.before,n)>0:typeof p=="function"?p(n):!1})}function RM(n,a,o,r,c){const{disabled:d,hidden:f,modifiers:p,showOutsideDays:m,broadcastCalendar:y,today:S=c.today()}=a,{isSameDay:x,isSameMonth:b,startOfMonth:D,isBefore:N,endOfMonth:E,isAfter:O}=c,L=o&&D(o),j=r&&E(r),A={[ft.focused]:[],[ft.outside]:[],[ft.disabled]:[],[ft.hidden]:[],[ft.today]:[]},k={};for(const T of n){const{date:w,displayMonth:R}=T,B=!!(R&&!b(w,R)),z=!!(L&&N(w,L)),G=!!(j&&O(w,j)),ne=!!(d&&va(w,d,c)),X=!!(f&&va(w,f,c))||z||G||!y&&!m&&B||y&&m===!1&&B,ye=x(w,S);B&&A.outside.push(T),ne&&A.disabled.push(T),X&&A.hidden.push(T),ye&&A.today.push(T),p&&Object.keys(p).forEach(te=>{const ve=p?.[te];ve&&va(w,ve,c)&&(k[te]?k[te].push(T):k[te]=[T])})}return T=>{const w={[ft.focused]:!1,[ft.disabled]:!1,[ft.hidden]:!1,[ft.outside]:!1,[ft.today]:!1},R={};for(const B in A){const z=A[B];w[B]=z.some(G=>G===T)}for(const B in k)R[B]=k[B].some(z=>z===T);return{...w,...R}}}function _M(n,a,o={}){return Object.entries(n).filter(([,c])=>c===!0).reduce((c,[d])=>(o[d]?c.push(o[d]):a[ft[d]]?c.push(a[ft[d]]):a[En[d]]&&c.push(a[En[d]]),c),[a[xe.Day]])}function zM(n){return{...LM,...n}}function IM(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 UM(){const n={};for(const a in xe)n[xe[a]]=`rdp-${xe[a]}`;for(const a in ft)n[ft[a]]=`rdp-${ft[a]}`;for(const a in En)n[En[a]]=`rdp-${En[a]}`;for(const a in fn)n[fn[a]]=`rdp-${fn[a]}`;return n}function cv(n,a,o){return(o??new hn(a)).formatMonthYear(n)}const HM=cv;function BM(n,a,o){return(o??new hn(a)).format(n,"d")}function KM(n,a=Vn){return a.format(n,"LLLL")}function qM(n,a,o){return(o??new hn(a)).format(n,"cccccc")}function GM(n,a=Vn){return n<10?a.formatNumber(`0${n.toLocaleString()}`):a.formatNumber(`${n.toLocaleString()}`)}function FM(){return""}function uv(n,a=Vn){return a.format(n,"yyyy")}const VM=uv,YM=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:cv,formatDay:BM,formatMonthCaption:HM,formatMonthDropdown:KM,formatWeekNumber:GM,formatWeekNumberHeader:FM,formatWeekdayName:qM,formatYearCaption:VM,formatYearDropdown:uv},Symbol.toStringTag,{value:"Module"}));function $M(n){return n?.formatMonthCaption&&!n.formatCaption&&(n.formatCaption=n.formatMonthCaption),n?.formatYearCaption&&!n.formatYearDropdown&&(n.formatYearDropdown=n.formatYearCaption),{...YM,...n}}function Bf(n,a,o,r){let c=(r??new hn(o)).format(n,"PPPP");return a.today&&(c=`Today, ${c}`),a.selected&&(c=`${c}, selected`),c}const WM=Bf;function Kf(n,a,o){return(o??new hn(a)).formatMonthYear(n)}const QM=Kf;function dv(n,a,o,r){let c=(r??new hn(o)).format(n,"PPPP");return a?.today&&(c=`Today, ${c}`),c}function fv(n){return"Choose the Month"}function hv(){return""}const XM="Go to the Next Month";function pv(n,a){return XM}function mv(n){return"Go to the Previous Month"}function gv(n,a,o){return(o??new hn(a)).format(n,"cccc")}function yv(n,a){return`Week ${n}`}function xv(n){return"Week Number"}function bv(n){return"Choose the Year"}const ZM=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:QM,labelDay:WM,labelDayButton:Bf,labelGrid:Kf,labelGridcell:dv,labelMonthDropdown:fv,labelNav:hv,labelNext:pv,labelPrevious:mv,labelWeekNumber:yv,labelWeekNumberHeader:xv,labelWeekday:gv,labelYearDropdown:bv},Symbol.toStringTag,{value:"Module"})),Mn=(n,a,o)=>a||(o?typeof o=="function"?o:(...r)=>o:n);function JM(n,a){const o=a.locale?.labels??{};return{...ZM,...n??{},labelDayButton:Mn(Bf,n?.labelDayButton,o.labelDayButton),labelMonthDropdown:Mn(fv,n?.labelMonthDropdown,o.labelMonthDropdown),labelNext:Mn(pv,n?.labelNext,o.labelNext),labelPrevious:Mn(mv,n?.labelPrevious,o.labelPrevious),labelWeekNumber:Mn(yv,n?.labelWeekNumber,o.labelWeekNumber),labelYearDropdown:Mn(bv,n?.labelYearDropdown,o.labelYearDropdown),labelGrid:Mn(Kf,n?.labelGrid,o.labelGrid),labelGridcell:Mn(dv,n?.labelGridcell,o.labelGridcell),labelNav:Mn(hv,n?.labelNav,o.labelNav),labelWeekNumberHeader:Mn(xv,n?.labelWeekNumberHeader,o.labelWeekNumberHeader),labelWeekday:Mn(gv,n?.labelWeekday,o.labelWeekday)}}function eE(n,a,o,r,c){const{startOfMonth:d,startOfYear:f,endOfYear:p,eachMonthOfInterval:m,getMonth:y}=c;return m({start:f(n),end:p(n)}).map(b=>{const D=r.formatMonthDropdown(b,c),N=y(b),E=a&&b<d(a)||o&&b>d(o)||!1;return{value:N,label:D,disabled:E}})}function tE(n,a={},o={}){let r={...a?.[xe.Day]};return Object.entries(n).filter(([,c])=>c===!0).forEach(([c])=>{r={...r,...o?.[c]}}),r}function nE(n,a,o,r){const c=r??n.today(),d=o?n.startOfBroadcastWeek(c,n):a?n.startOfISOWeek(c):n.startOfWeek(c),f=[];for(let p=0;p<7;p++){const m=n.addDays(d,p);f.push(m)}return f}function aE(n,a,o,r,c=!1){if(!n||!a)return;const{startOfYear:d,endOfYear:f,eachYearOfInterval:p,getYear:m}=r,y=d(n),S=f(a),x=p({start:y,end:S});return c&&x.reverse(),x.map(b=>{const D=o.formatYearDropdown(b,r);return{value:m(b),label:D,disabled:!1}})}const Qs=n=>n instanceof HTMLElement?n:null,kd=n=>[...n.querySelectorAll("[data-animated-month]")??[]],iE=n=>Qs(n.querySelector("[data-animated-month]")),Ad=n=>Qs(n.querySelector("[data-animated-caption]")),Dd=n=>Qs(n.querySelector("[data-animated-weeks]")),oE=n=>Qs(n.querySelector("[data-animated-nav]")),sE=n=>Qs(n.querySelector("[data-animated-weekdays]"));function rE(n,a,{classNames:o,months:r,focused:c,dateLib:d}){const f=C.useRef(null),p=C.useRef(r),m=C.useRef(!1);C.useLayoutEffect(()=>{const y=p.current;if(p.current=r,!a||!n.current||!(n.current instanceof HTMLElement)||r.length===0||y.length===0||r.length!==y.length)return;const S=d.isSameMonth(r[0].date,y[0].date),x=d.isAfter(r[0].date,y[0].date),b=x?o[fn.caption_after_enter]:o[fn.caption_before_enter],D=x?o[fn.weeks_after_enter]:o[fn.weeks_before_enter],N=f.current,E=n.current.cloneNode(!0);if(E instanceof HTMLElement?(kd(E).forEach(A=>{if(!(A instanceof HTMLElement))return;const k=iE(A);k&&A.contains(k)&&A.removeChild(k);const T=Ad(A);T&&T.classList.remove(b);const w=Dd(A);w&&w.classList.remove(D)}),f.current=E):f.current=null,m.current||S||c)return;const O=N instanceof HTMLElement?kd(N):[],L=kd(n.current);if(L?.every(j=>j instanceof HTMLElement)&&O&&O.every(j=>j instanceof HTMLElement)){m.current=!0,n.current.style.isolation="isolate";const j=oE(n.current);j&&(j.style.zIndex="1"),L.forEach((A,k)=>{const T=O[k];if(!T)return;A.style.position="relative",A.style.overflow="hidden";const w=Ad(A);w&&w.classList.add(b);const R=Dd(A);R&&R.classList.add(D);const B=()=>{m.current=!1,n.current&&(n.current.style.isolation=""),j&&(j.style.zIndex=""),w&&w.classList.remove(b),R&&R.classList.remove(D),A.style.position="",A.style.overflow="",A.contains(T)&&A.removeChild(T)};T.style.pointerEvents="none",T.style.position="absolute",T.style.overflow="hidden",T.setAttribute("aria-hidden","true");const z=sE(T);z&&(z.style.opacity="0");const G=Ad(T);G&&(G.classList.add(x?o[fn.caption_before_exit]:o[fn.caption_after_exit]),G.addEventListener("animationend",B));const ne=Dd(T);ne&&ne.classList.add(x?o[fn.weeks_before_exit]:o[fn.weeks_after_exit]),A.insertBefore(T,A.firstChild)})}})}function lE(n,a,o,r){const c=n[0],d=n[n.length-1],{ISOWeek:f,fixedWeeks:p,broadcastCalendar:m}=o??{},{addDays:y,differenceInCalendarDays:S,differenceInCalendarMonths:x,endOfBroadcastWeek:b,endOfISOWeek:D,endOfMonth:N,endOfWeek:E,isAfter:O,startOfBroadcastWeek:L,startOfISOWeek:j,startOfWeek:A}=r,k=m?L(c,r):f?j(c):A(c),T=m?b(d):f?D(N(d)):E(N(d)),w=a&&(m?b(a):f?D(a):E(a)),R=w&&O(T,w)?w:T,B=S(R,k),z=x(d,c)+1,G=[];for(let ye=0;ye<=B;ye++){const te=y(k,ye);G.push(te)}const X=(m?35:42)*z;if(p&&G.length<X){const ye=X-G.length;for(let te=0;te<ye;te++){const ve=y(G[G.length-1],1);G.push(ve)}}return G}function cE(n){const a=[];return n.reduce((o,r)=>{const c=r.weeks.reduce((d,f)=>d.concat(f.days.slice()),a.slice());return o.concat(c.slice())},a.slice())}function uE(n,a,o,r){const{numberOfMonths:c=1}=o,d=[];for(let f=0;f<c;f++){const p=r.addMonths(n,f);if(a&&p>a)break;d.push(p)}return d}function ix(n,a,o,r){const{month:c,defaultMonth:d,today:f=r.today(),numberOfMonths:p=1}=n;let m=c||d||f;const{differenceInCalendarMonths:y,addMonths:S,startOfMonth:x}=r;if(o&&y(o,m)<p-1){const b=-1*(p-1);m=S(o,b)}return a&&y(m,a)<0&&(m=a),x(m)}function dE(n,a,o,r){const{addDays:c,endOfBroadcastWeek:d,endOfISOWeek:f,endOfMonth:p,endOfWeek:m,getISOWeek:y,getWeek:S,startOfBroadcastWeek:x,startOfISOWeek:b,startOfWeek:D}=r,N=n.reduce((E,O)=>{const L=o.broadcastCalendar?x(O,r):o.ISOWeek?b(O):D(O),j=o.broadcastCalendar?d(O):o.ISOWeek?f(p(O)):m(p(O)),A=a.filter(R=>R>=L&&R<=j),k=o.broadcastCalendar?35:42;if(o.fixedWeeks&&A.length<k){const R=a.filter(B=>{const z=k-A.length;return B>j&&B<=c(j,z)});A.push(...R)}const T=A.reduce((R,B)=>{const z=o.ISOWeek?y(B):S(B),G=R.find(X=>X.weekNumber===z),ne=new ov(B,O,r);return G?G.days.push(ne):R.push(new rM(z,[ne])),R},[]),w=new sM(O,T);return E.push(w),E},[]);return o.reverseMonths?N.reverse():N}function fE(n,a){let{startMonth:o,endMonth:r}=n;const{startOfYear:c,startOfDay:d,startOfMonth:f,endOfMonth:p,addYears:m,endOfYear:y,newDate:S,today:x}=a,{fromYear:b,toYear:D,fromMonth:N,toMonth:E}=n;!o&&N&&(o=N),!o&&b&&(o=a.newDate(b,0,1)),!r&&E&&(r=E),!r&&D&&(r=S(D,11,31));const O=n.captionLayout==="dropdown"||n.captionLayout==="dropdown-years";return o?o=f(o):b?o=S(b,0,1):!o&&O&&(o=c(m(n.today??x(),-100))),r?r=p(r):D?r=S(D,11,31):!r&&O&&(r=y(n.today??x())),[o&&d(o),r&&d(r)]}function hE(n,a,o,r){if(o.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:d=1}=o,{startOfMonth:f,addMonths:p,differenceInCalendarMonths:m}=r,y=c?d:1,S=f(n);if(!a)return p(S,y);if(!(m(a,n)<d))return p(S,y)}function pE(n,a,o,r){if(o.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:d}=o,{startOfMonth:f,addMonths:p,differenceInCalendarMonths:m}=r,y=c?d??1:1,S=f(n);if(!a)return p(S,-y);if(!(m(S,a)<=0))return p(S,-y)}function mE(n){const a=[];return n.reduce((o,r)=>o.concat(r.weeks.slice()),a.slice())}function Ql(n,a){const[o,r]=C.useState(n);return[a===void 0?o:a,r]}function gE(n,a){const[o,r]=fE(n,a),{startOfMonth:c,endOfMonth:d}=a,f=ix(n,o,r,a),[p,m]=Ql(f,n.month?f:void 0);C.useEffect(()=>{const k=ix(n,o,r,a);m(k)},[n.timeZone]);const{months:y,weeks:S,days:x,previousMonth:b,nextMonth:D}=C.useMemo(()=>{const k=uE(p,r,{numberOfMonths:n.numberOfMonths},a),T=lE(k,n.endMonth?d(n.endMonth):void 0,{ISOWeek:n.ISOWeek,fixedWeeks:n.fixedWeeks,broadcastCalendar:n.broadcastCalendar},a),w=dE(k,T,{broadcastCalendar:n.broadcastCalendar,fixedWeeks:n.fixedWeeks,ISOWeek:n.ISOWeek,reverseMonths:n.reverseMonths},a),R=mE(w),B=cE(w),z=pE(p,o,n,a),G=hE(p,r,n,a);return{months:w,weeks:R,days:B,previousMonth:z,nextMonth:G}},[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:N,onMonthChange:E}=n,O=k=>S.some(T=>T.days.some(w=>w.isEqualTo(k))),L=k=>{if(N)return;let T=c(k);o&&T<c(o)&&(T=c(o)),r&&T>c(r)&&(T=c(r)),m(T),E?.(T)};return{months:y,weeks:S,days:x,navStart:o,navEnd:r,previousMonth:b,nextMonth:D,goToMonth:L,goToDay:k=>{O(k)||L(k.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 ox(n){return!n[ft.disabled]&&!n[ft.hidden]&&!n[ft.outside]}function yE(n,a,o,r){let c,d=-1;for(const f of n){const p=a(f);ox(p)&&(p[ft.focused]&&d<Bn.FocusedModifier?(c=f,d=Bn.FocusedModifier):r?.isEqualTo(f)&&d<Bn.LastFocused?(c=f,d=Bn.LastFocused):o(f.date)&&d<Bn.Selected?(c=f,d=Bn.Selected):p[ft.today]&&d<Bn.Today&&(c=f,d=Bn.Today))}return c||(c=n.find(f=>ox(a(f)))),c}function xE(n,a,o,r,c,d,f){const{ISOWeek:p,broadcastCalendar:m}=d,{addDays:y,addMonths:S,addWeeks:x,addYears:b,endOfBroadcastWeek:D,endOfISOWeek:N,endOfWeek:E,max:O,min:L,startOfBroadcastWeek:j,startOfISOWeek:A,startOfWeek:k}=f;let w={day:y,week:x,month:S,year:b,startOfWeek:R=>m?j(R,f):p?A(R):k(R),endOfWeek:R=>m?D(R):p?N(R):E(R)}[n](o,a==="after"?1:-1);return a==="before"&&r?w=O([r,w]):a==="after"&&c&&(w=L([c,w])),w}function vv(n,a,o,r,c,d,f,p=0){if(p>365)return;const m=xE(n,a,o.date,r,c,d,f),y=!!(d.disabled&&va(m,d.disabled,f)),S=!!(d.hidden&&va(m,d.hidden,f)),x=m,b=new ov(m,x,f);return!y&&!S?b:vv(n,a,b,r,c,d,f,p+1)}function bE(n,a,o,r,c){const{autoFocus:d}=n,[f,p]=C.useState(),m=yE(a.days,o,r||(()=>!1),f),[y,S]=C.useState(d?m:void 0);return{isFocusTarget:E=>!!m?.isEqualTo(E),setFocused:S,focused:y,blur:()=>{p(y),S(void 0)},moveFocus:(E,O)=>{if(!y)return;const L=vv(E,O,y,a.navStart,a.navEnd,n,c);L&&(n.disableNavigation&&!a.days.some(A=>A.isEqualTo(L))||(a.goToDay(L),S(L)))}}}function vE(n,a){const{selected:o,required:r,onSelect:c}=n,[d,f]=Ql(o,c?o:void 0),p=c?o:d,{isSameDay:m}=a,y=D=>p?.some(N=>m(N,D))??!1,{min:S,max:x}=n;return{selected:p,select:(D,N,E)=>{let O=[...p??[]];if(y(D)){if(p?.length===S||r&&p?.length===1)return;O=p?.filter(L=>!m(L,D))}else p?.length===x?O=[D]:O=[...O,D];return c||f(O),c?.(O,D,N,E),O},isSelected:y}}function CE(n,a,o=0,r=0,c=!1,d=Vn){const{from:f,to:p}=a||{},{isSameDay:m,isAfter:y,isBefore:S}=d;let x;if(!f&&!p)x={from:n,to:o>0?void 0:n};else if(f&&!p)m(f,n)?o===0?x={from:f,to:n}:c?x={from:f,to:void 0}:x=void 0:S(n,f)?x={from:n,to:f}:x={from:f,to:n};else if(f&&p)if(m(f,n)&&m(p,n))c?x={from:f,to:p}:x=void 0;else if(m(f,n))x={from:f,to:o>0?void 0:n};else if(m(p,n))x={from:n,to:o>0?void 0:n};else if(S(n,f))x={from:n,to:p};else if(y(n,f))x={from:f,to:n};else if(y(n,p))x={from:f,to:n};else throw new Error("Invalid range");if(x?.from&&x?.to){const b=d.differenceInCalendarDays(x.to,x.from);r>0&&b>r?x={from:n,to:void 0}:o>1&&b<o&&(x={from:n,to:void 0})}return x}function SE(n,a,o=Vn){const r=Array.isArray(a)?a:[a];let c=n.from;const d=o.differenceInCalendarDays(n.to,n.from),f=Math.min(d,6);for(let p=0;p<=f;p++){if(r.includes(c.getDay()))return!0;c=o.addDays(c,1)}return!1}function sx(n,a,o=Vn){return ba(n,a.from,!1,o)||ba(n,a.to,!1,o)||ba(a,n.from,!1,o)||ba(a,n.to,!1,o)}function wE(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)?ba(n,p,!1,o):lv(p,o)?p.some(m=>ba(n,m,!1,o)):Wl(p)?p.from&&p.to?sx(n,{from:p.from,to:p.to},o):!1:rv(p)?SE(n,p.dayOfWeek,o):If(p)?o.isAfter(p.before,p.after)?sx(n,{from:o.addDays(p.after,1),to:o.addDays(p.before,-1)},o):va(n.from,p,o)||va(n.to,p,o):Uf(p)||Hf(p)?va(n.from,p,o)||va(n.to,p,o):!1))return!0;const f=r.filter(p=>typeof p=="function");if(f.length){let p=n.from;const m=o.differenceInCalendarDays(n.to,n.from);for(let y=0;y<=m;y++){if(f.some(S=>S(p)))return!0;p=o.addDays(p,1)}}return!1}function NE(n,a){const{disabled:o,excludeDisabled:r,selected:c,required:d,onSelect:f}=n,[p,m]=Ql(c,f?c:void 0),y=f?c:p;return{selected:y,select:(b,D,N)=>{const{min:E,max:O}=n,L=b?CE(b,y,E,O,d,a):void 0;return r&&o&&L?.from&&L.to&&wE({from:L.from,to:L.to},o,a)&&(L.from=b,L.to=void 0),f||m(L),f?.(L,b,D,N),L},isSelected:b=>y&&ba(y,b,!1,a)}}function kE(n,a){const{selected:o,required:r,onSelect:c}=n,[d,f]=Ql(o,c?o:void 0),p=c?o:d,{isSameDay:m}=a;return{selected:p,select:(x,b,D)=>{let N=x;return!r&&p&&p&&m(x,p)&&(N=void 0),c||f(N),c?.(N,x,b,D),N},isSelected:x=>p?m(p,x):!1}}function AE(n,a){const o=kE(n,a),r=vE(n,a),c=NE(n,a);switch(n.mode){case"single":return o;case"multiple":return r;case"range":return c;default:return}}function _t(n,a){return n instanceof xa&&n.timeZone===a?n:new xa(n,a)}function rx(n,a){return typeof n=="boolean"||typeof n=="function"?n:n instanceof Date?_t(n,a):Array.isArray(n)?n.map(o=>o instanceof Date?_t(o,a):o):Wl(n)?{...n,from:n.from?_t(n.from,a):n.from,to:n.to?_t(n.to,a):n.to}:If(n)?{before:_t(n.before,a),after:_t(n.after,a)}:Uf(n)?{after:_t(n.after,a)}:Hf(n)?{before:_t(n.before,a)}:n}function jd(n,a){return n&&(Array.isArray(n)?n.map(o=>rx(o,a)):rx(n,a))}function DE(n){let a=n;const o=a.timeZone;if(o&&(a={...n,timeZone:o},a.today&&(a.today=_t(a.today,o)),a.month&&(a.month=_t(a.month,o)),a.defaultMonth&&(a.defaultMonth=_t(a.defaultMonth,o)),a.startMonth&&(a.startMonth=_t(a.startMonth,o)),a.endMonth&&(a.endMonth=_t(a.endMonth,o)),a.mode==="single"&&a.selected?a.selected=_t(a.selected,o):a.mode==="multiple"&&a.selected?a.selected=a.selected?.map(me=>_t(me,o)):a.mode==="range"&&a.selected&&(a.selected={from:a.selected.from?_t(a.selected.from,o):a.selected.from,to:a.selected.to?_t(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 me={};Object.keys(a.modifiers).forEach(Ae=>{me[Ae]=jd(a.modifiers?.[Ae],o)}),a.modifiers=me}const{components:r,formatters:c,labels:d,dateLib:f,locale:p,classNames:m}=C.useMemo(()=>{const me={...iv,...a.locale},Ae=new hn({locale:me,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:Ae,components:zM(a.components),formatters:$M(a.formatters),labels:JM(a.labels,Ae.options),locale:me,classNames:{...UM(),...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:f.today()});const{captionLayout:y,mode:S,navLayout:x,numberOfMonths:b=1,onDayBlur:D,onDayClick:N,onDayFocus:E,onDayKeyDown:O,onDayMouseEnter:L,onDayMouseLeave:j,onNextClick:A,onPrevClick:k,showWeekNumber:T,styles:w}=a,{formatCaption:R,formatDay:B,formatMonthDropdown:z,formatWeekNumber:G,formatWeekNumberHeader:ne,formatWeekdayName:X,formatYearDropdown:ye}=c,te=gE(a,f),{days:ve,months:I,navStart:Z,navEnd:ae,previousMonth:W,nextMonth:oe,goToMonth:ce}=te,he=RM(ve,a,Z,ae,f),{isSelected:Q,select:J,selected:re}=AE(a,f)??{},{blur:ie,focused:se,isFocusTarget:ge,moveFocus:De,setFocused:He}=bE(a,te,he,Q??(()=>!1),f),{labelDayButton:lt,labelGridcell:gt,labelGrid:qe,labelMonthDropdown:ct,labelNav:Bt,labelPrevious:Zt,labelNext:Yn,labelWeekday:je,labelWeekNumber:Jt,labelWeekNumberHeader:Pn,labelYearDropdown:en}=d,Aa=C.useMemo(()=>nE(f,a.ISOWeek,a.broadcastCalendar,a.today),[f,a.ISOWeek,a.broadcastCalendar,a.today]),$n=S!==void 0||N!==void 0,yt=C.useCallback(()=>{W&&(ce(W),k?.(W))},[W,ce,k]),tn=C.useCallback(()=>{oe&&(ce(oe),A?.(oe))},[ce,oe,A]),Wn=C.useCallback((me,Ae)=>Se=>{Se.preventDefault(),Se.stopPropagation(),He(me),!Ae.disabled&&(J?.(me.date,Ae,Se),N?.(me.date,Ae,Se))},[J,N,He]),ti=C.useCallback((me,Ae)=>Se=>{He(me),E?.(me.date,Ae,Se)},[E,He]),Ln=C.useCallback((me,Ae)=>Se=>{ie(),D?.(me.date,Ae,Se)},[ie,D]),Rn=C.useCallback((me,Ae)=>Se=>{const Pe={ArrowLeft:[Se.shiftKey?"month":"day",a.dir==="rtl"?"after":"before"],ArrowRight:[Se.shiftKey?"month":"day",a.dir==="rtl"?"before":"after"],ArrowDown:[Se.shiftKey?"year":"week","after"],ArrowUp:[Se.shiftKey?"year":"week","before"],PageUp:[Se.shiftKey?"year":"month","before"],PageDown:[Se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Pe[Se.key]){Se.preventDefault(),Se.stopPropagation();const[ot,Ne]=Pe[Se.key];De(ot,Ne)}O?.(me.date,Ae,Se)},[De,O,a.dir]),Ti=C.useCallback((me,Ae)=>Se=>{L?.(me.date,Ae,Se)},[L]),Ao=C.useCallback((me,Ae)=>Se=>{j?.(me.date,Ae,Se)},[j]),Do=C.useCallback(me=>Ae=>{const Se=Number(Ae.target.value),Pe=f.setMonth(f.startOfMonth(me),Se);ce(Pe)},[f,ce]),Qn=C.useCallback(me=>Ae=>{const Se=Number(Ae.target.value),Pe=f.setYear(f.startOfMonth(me),Se);ce(Pe)},[f,ce]),{className:ee,style:Ee}=C.useMemo(()=>({className:[m[xe.Root],a.className].filter(Boolean).join(" "),style:{...w?.[xe.Root],...a.style}}),[m,a.className,a.style,w]),Ce=IM(a),Oe=C.useRef(null);rE(Oe,!!a.animate,{classNames:m,months:I,focused:se,dateLib:f});const ut={dayPickerProps:a,selected:re,select:J,isSelected:Q,months:I,nextMonth:oe,previousMonth:W,goToMonth:ce,getModifiers:he,components:r,classNames:m,styles:w,labels:d,formatters:c};return ue.createElement(sv.Provider,{value:ut},ue.createElement(r.Root,{rootRef:a.animate?Oe:void 0,className:ee,style:Ee,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"],...Ce},ue.createElement(r.Months,{className:m[xe.Months],style:w?.[xe.Months]},!a.hideNavigation&&!x&&ue.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:m[xe.Nav],style:w?.[xe.Nav],"aria-label":Bt(),onPreviousClick:yt,onNextClick:tn,previousMonth:W,nextMonth:oe}),I.map((me,Ae)=>ue.createElement(r.Month,{"data-animated-month":a.animate?"true":void 0,className:m[xe.Month],style:w?.[xe.Month],key:Ae,displayIndex:Ae,calendarMonth:me},x==="around"&&!a.hideNavigation&&Ae===0&&ue.createElement(r.PreviousMonthButton,{type:"button",className:m[xe.PreviousMonthButton],tabIndex:W?void 0:-1,"aria-disabled":W?void 0:!0,"aria-label":Zt(W),onClick:yt,"data-animated-button":a.animate?"true":void 0},ue.createElement(r.Chevron,{disabled:W?void 0:!0,className:m[xe.Chevron],orientation:a.dir==="rtl"?"right":"left"})),ue.createElement(r.MonthCaption,{"data-animated-caption":a.animate?"true":void 0,className:m[xe.MonthCaption],style:w?.[xe.MonthCaption],calendarMonth:me,displayIndex:Ae},y?.startsWith("dropdown")?ue.createElement(r.DropdownNav,{className:m[xe.Dropdowns],style:w?.[xe.Dropdowns]},(()=>{const Se=y==="dropdown"||y==="dropdown-months"?ue.createElement(r.MonthsDropdown,{key:"month",className:m[xe.MonthsDropdown],"aria-label":ct(),classNames:m,components:r,disabled:!!a.disableNavigation,onChange:Do(me.date),options:eE(me.date,Z,ae,c,f),style:w?.[xe.Dropdown],value:f.getMonth(me.date)}):ue.createElement("span",{key:"month"},z(me.date,f)),Pe=y==="dropdown"||y==="dropdown-years"?ue.createElement(r.YearsDropdown,{key:"year",className:m[xe.YearsDropdown],"aria-label":en(f.options),classNames:m,components:r,disabled:!!a.disableNavigation,onChange:Qn(me.date),options:aE(Z,ae,c,f,!!a.reverseYears),style:w?.[xe.Dropdown],value:f.getYear(me.date)}):ue.createElement("span",{key:"year"},ye(me.date,f));return f.getMonthYearOrder()==="year-first"?[Pe,Se]:[Se,Pe]})(),ue.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"}},R(me.date,f.options,f))):ue.createElement(r.CaptionLabel,{className:m[xe.CaptionLabel],role:"status","aria-live":"polite"},R(me.date,f.options,f))),x==="around"&&!a.hideNavigation&&Ae===b-1&&ue.createElement(r.NextMonthButton,{type:"button",className:m[xe.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},ue.createElement(r.Chevron,{disabled:oe?void 0:!0,className:m[xe.Chevron],orientation:a.dir==="rtl"?"left":"right"})),Ae===b-1&&x==="after"&&!a.hideNavigation&&ue.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:m[xe.Nav],style:w?.[xe.Nav],"aria-label":Bt(),onPreviousClick:yt,onNextClick:tn,previousMonth:W,nextMonth:oe}),ue.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":S==="multiple"||S==="range","aria-label":qe(me.date,f.options,f)||void 0,className:m[xe.MonthGrid],style:w?.[xe.MonthGrid]},!a.hideWeekdays&&ue.createElement(r.Weekdays,{"data-animated-weekdays":a.animate?"true":void 0,className:m[xe.Weekdays],style:w?.[xe.Weekdays]},T&&ue.createElement(r.WeekNumberHeader,{"aria-label":Pn(f.options),className:m[xe.WeekNumberHeader],style:w?.[xe.WeekNumberHeader],scope:"col"},ne()),Aa.map(Se=>ue.createElement(r.Weekday,{"aria-label":je(Se,f.options,f),className:m[xe.Weekday],key:String(Se),style:w?.[xe.Weekday],scope:"col"},X(Se,f.options,f)))),ue.createElement(r.Weeks,{"data-animated-weeks":a.animate?"true":void 0,className:m[xe.Weeks],style:w?.[xe.Weeks]},me.weeks.map(Se=>ue.createElement(r.Week,{className:m[xe.Week],key:Se.weekNumber,style:w?.[xe.Week],week:Se},T&&ue.createElement(r.WeekNumber,{week:Se,style:w?.[xe.WeekNumber],"aria-label":Jt(Se.weekNumber,{locale:p}),className:m[xe.WeekNumber],scope:"row",role:"rowheader"},G(Se.weekNumber,f)),Se.days.map(Pe=>{const{date:ot}=Pe,Ne=he(Pe);if(Ne[ft.focused]=!Ne.hidden&&!!se?.isEqualTo(Pe),Ne[En.selected]=Q?.(ot)||Ne.selected,Wl(re)){const{from:nn,to:An}=re;Ne[En.range_start]=!!(nn&&An&&f.isSameDay(ot,nn)),Ne[En.range_end]=!!(nn&&An&&f.isSameDay(ot,An)),Ne[En.range_middle]=ba(re,ot,!0,f)}const It=tE(Ne,w,a.modifiersStyles),Xn=_M(Ne,m,a.modifiersClassNames),Dt=!$n&&!Ne.hidden?gt(ot,Ne,f.options,f):void 0;return ue.createElement(r.Day,{key:`${Pe.isoDate}_${Pe.displayMonthId}`,day:Pe,modifiers:Ne,className:Xn.join(" "),style:It,role:"gridcell","aria-selected":Ne.selected||void 0,"aria-label":Dt,"data-day":Pe.isoDate,"data-month":Pe.outside?Pe.dateMonthId:void 0,"data-selected":Ne.selected||void 0,"data-disabled":Ne.disabled||void 0,"data-hidden":Ne.hidden||void 0,"data-outside":Pe.outside||void 0,"data-focused":Ne.focused||void 0,"data-today":Ne.today||void 0},!Ne.hidden&&$n?ue.createElement(r.DayButton,{className:m[xe.DayButton],style:w?.[xe.DayButton],type:"button",day:Pe,modifiers:Ne,disabled:!Ne.focused&&Ne.disabled||void 0,"aria-disabled":Ne.focused&&Ne.disabled||void 0,tabIndex:ge(Pe)?0:-1,"aria-label":lt(ot,Ne,f.options,f),onClick:Wn(Pe,Ne),onBlur:Ln(Pe,Ne),onFocus:ti(Pe,Ne),onKeyDown:Rn(Pe,Ne),onMouseEnter:Ti(Pe,Ne),onMouseLeave:Ao(Pe,Ne)},B(ot,f.options,f)):!Ne.hidden&&B(Pe.date,f.options,f))})))))))),a.footer&&ue.createElement(r.Footer,{className:m[xe.Footer],style:w?.[xe.Footer],role:"status","aria-live":"polite"},a.footer)))}function jE({className:n,classNames:a,showOutsideDays:o=!0,...r}){return l.jsx(DE,{showOutsideDays:o,className:K("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:K(ml({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-70 hover:opacity-100 hover:bg-accent rounded-md"),button_next:K(ml({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:K("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:K(ml({variant:"ghost"}),"h-8 w-8 p-0 font-normal rounded-full text-xs","aria-selected:opacity-100"),range_start:K("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:K("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:K("aria-selected:bg-accent aria-selected:text-accent-foreground","aria-selected:rounded-none"),selected:K("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,...f})=>{const p=c==="left"?QS:c==="right"?Ml:c==="up"?Xd:El;return l.jsx(p,{className:K("h-4 w-4",d),...f})}},...r})}jE.displayName="Calendar";const TE=C.lazy(()=>nt(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function lP({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,rawSettingsEnv:r,onChange:c,missingRequiredFields:d=[]}){const f=d.length>0;return l.jsx(C.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(kn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),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&&f&&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(Fn,{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(TE,{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(Ef,{profileEnv:r})})})]})})}const cP={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},uP=[{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"]}],ME=[{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."}],EE=new Map(ME.map(n=>[n.id,n]));function dP(n){return n.entryIds.map(a=>EE.get(a)).filter(a=>!!a)}function fP(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)}C.lazy(()=>nt(()=>Promise.resolve().then(()=>$l),void 0).then(n=>({default:n.CodeEditor})));function OE(){const{t:n}=Mt(),{isDark:a,setTheme:o}=uf(),[r,c]=C.useState(""),[d,f]=C.useState(""),[p,m]=C.useState(!1),[y,S]=C.useState(null),[x,b]=C.useState(!1),{login:D,authRequired:N,isAuthenticated:E,loading:O,accessMode:L,authEnabled:j}=_l(),A=Wd(),k=Tl(),T=L==="setup",w=n(T?"auth.remoteGuardLabel":"auth.protectedAccessLabel"),R=n(T?j?"auth.incompleteSetupDescription":"auth.remoteSetupDescription":"auth.loginDescription"),B=k.state?.from?.pathname||"/";if(C.useEffect(()=>{O||(E||!N)&&A(B,{replace:!0})},[E,N,O,A,B]),O)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(kn,{className:"h-4 w-4 animate-spin"}),n("auth.loading")]})});if(E||!N)return null;const z=async G=>{G.preventDefault(),S(null),b(!0);try{await D(r,d),A(B,{replace:!0})}catch(ne){S(ne instanceof Error?ne.message:n("auth.loginFailed"))}finally{b(!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(cl,{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(at,{type:"button",variant:"ghost",size:"sm",className:K("rounded-full px-3 text-xs font-semibold",!a&&"bg-card text-foreground shadow-sm"),"aria-pressed":!a,onClick:()=>o("light"),children:[l.jsx(Px,{className:"h-3.5 w-3.5"}),n("auth.lightMode")]}),l.jsxs(at,{type:"button",variant:"ghost",size:"sm",className:K("rounded-full px-3 text-xs font-semibold",a&&"bg-card text-foreground shadow-sm"),"aria-pressed":a,onClick:()=>o("dark"),children:[l.jsx(Lx,{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(T?"auth.remoteSetupTitle":"auth.dashboardTitle")}),l.jsx("p",{className:"max-w-2xl text-base leading-7 text-muted-foreground sm:text-lg",children:R})]})]}),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(Ug,{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(Hg,{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(cl,{className:"mb-3 h-4 w-4 text-accent"}),l.jsx("p",{children:n("auth.safetyNoteSession")})]})]})]}),l.jsxs(rT,{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(lT,{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:T?l.jsx(Ug,{className:"h-5 w-5 text-accent"}):l.jsx(Hg,{className:"h-5 w-5 text-accent"})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(cT,{className:"text-2xl tracking-[-0.03em]",children:n(T?"auth.remoteSetupTitle":"auth.dashboardTitle")}),l.jsx(uT,{className:"text-sm leading-6 text-muted-foreground",children:T?R:n("auth.credentialsHint")})]})]}),l.jsx(dT,{className:"space-y-5 px-6 py-6",children:T?l.jsxs(l.Fragment,{children:[l.jsxs(Rs,{variant:"warning",className:"rounded-2xl border-yellow-300/70 bg-yellow-50/80",children:[l.jsx(Us,{className:"h-4 w-4"}),l.jsx(Al,{children:n("auth.noDefaultCredentials")}),l.jsx(_s,{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(XS,{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(cl,{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:z,className:"space-y-4",children:[y&&l.jsxs(Rs,{variant:"destructive",className:"rounded-2xl",children:[l.jsx(Us,{className:"h-4 w-4"}),l.jsx(_s,{children:y})]}),l.jsxs(Rs,{variant:"info",className:"rounded-2xl border-blue-200/80 bg-blue-50/80",children:[l.jsx(cl,{className:"h-4 w-4"}),l.jsx(Al,{children:n("auth.noDefaultCredentials")}),l.jsx(_s,{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:G=>c(G.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:x,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:G=>f(G.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:x,required:!0}),l.jsx(at,{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(G=>!G),disabled:x,children:p?l.jsx(Gs,{className:"h-4 w-4"}):l.jsx(Fs,{className:"h-4 w-4"})})]})]}),l.jsx(at,{type:"submit",className:"h-12 w-full rounded-2xl text-sm font-semibold",disabled:x,children:x?l.jsxs(l.Fragment,{children:[l.jsx(kn,{className:"mr-2 h-4 w-4 animate-spin"}),n("auth.signingIn")]}):n("auth.signIn")})]})})]})]})})]})}const PE=C.lazy(()=>nt(()=>import("./index-CObGkcxo.js"),__vite__mapDeps([21,1,2,4,5,7,22,6,8,9])).then(n=>({default:n.AnalyticsPage}))),LE=C.lazy(()=>nt(()=>import("./api-CBTgaJzF.js"),__vite__mapDeps([23,1,2,5,24,17,6,4,3,7,8,9])).then(n=>({default:n.ApiPage}))),RE=C.lazy(()=>nt(()=>import("./cliproxy-C2sZh-5V.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}))),_E=C.lazy(()=>nt(()=>import("./cliproxy-ai-providers-DcCbeAbO.js"),__vite__mapDeps([29,1,2,16,17,5,6,4,24,7,8,9])).then(n=>({default:n.CliproxyAiProvidersPage}))),zE=C.lazy(()=>nt(()=>import("./cliproxy-control-panel-v4kA_2hy.js"),__vite__mapDeps([30,1,2,5,15,4,6,7,8,9])).then(n=>({default:n.CliproxyControlPanelPage}))),IE=C.lazy(()=>nt(()=>import("./copilot-DvgELRFw.js"),__vite__mapDeps([31,1,2,5,24,17,4,27,28,6,7,8,9])).then(n=>({default:n.CopilotPage}))),UE=C.lazy(()=>nt(()=>import("./cursor-8gcvd36W.js"),__vite__mapDeps([32,1,2,6,5,15,27,28,4,7,8,9])).then(n=>({default:n.CursorPage}))),HE=C.lazy(()=>nt(()=>import("./claude-extension-C1FsOq-7.js"),__vite__mapDeps([33,1,2,5,6,4,7,8,9])).then(n=>({default:n.ClaudeExtensionPage}))),BE=C.lazy(()=>nt(()=>import("./codex-Cj_wPgw5.js"),__vite__mapDeps([34,1,2,6,4,27,5,9,7,35,36,8])).then(n=>({default:n.CodexPage}))),KE=C.lazy(()=>nt(()=>import("./droid-DZDVCJBf.js"),__vite__mapDeps([37,1,2,6,5,36,4,27,7,8,9])).then(n=>({default:n.DroidPage}))),qE=C.lazy(()=>nt(()=>import("./accounts-DUWrYt3x.js"),__vite__mapDeps([38,1,2,5,35,17,6,4,26,7,8,9])).then(n=>({default:n.AccountsPage}))),GE=C.lazy(()=>nt(()=>Promise.resolve().then(()=>ZT),void 0).then(n=>({default:n.SettingsPage}))),FE=C.lazy(()=>nt(()=>import("./health-DmZLL4IN.js"),__vite__mapDeps([39,1,2,5,6,4,7,8,9])).then(n=>({default:n.HealthPage}))),VE=C.lazy(()=>nt(()=>import("./shared-CiXoJI0N.js"),__vite__mapDeps([40,1,2,4,5,6,7,8,9])).then(n=>({default:n.SharedPage}))),YE=C.lazy(()=>nt(()=>import("./updates-DqccLz_y.js"),__vite__mapDeps([41,1,2,4,5,6,7,8,9])).then(n=>({default:n.UpdatesPage})));function Ht(){return l.jsx("div",{className:"flex h-64 items-center justify-center",children:l.jsx(kn,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}function $E(){return l.jsx(bS,{client:Fw,children:l.jsx(UN,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(HN,{children:l.jsx(FN,{children:l.jsxs(mS,{children:[l.jsxs(gS,{children:[l.jsx(kt,{path:"/login",element:l.jsx(OE,{})}),l.jsx(kt,{element:l.jsx(VN,{}),children:l.jsxs(kt,{element:l.jsx(XA,{}),children:[l.jsx(kt,{path:"/",element:l.jsx(mj,{})}),l.jsx(kt,{path:"/analytics",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(PE,{})})}),l.jsx(kt,{path:"/updates",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(YE,{})})}),l.jsx(kt,{path:"/providers",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(LE,{})})}),l.jsx(kt,{path:"/cliproxy",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(RE,{})})}),l.jsx(kt,{path:"/cliproxy/ai-providers",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(_E,{})})}),l.jsx(kt,{path:"/cliproxy/control-panel",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(zE,{})})}),l.jsx(kt,{path:"/copilot",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(IE,{})})}),l.jsx(kt,{path:"/cursor",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(UE,{})})}),l.jsx(kt,{path:"/claude-extension",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(HE,{})})}),l.jsx(kt,{path:"/codex",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(BE,{})})}),l.jsx(kt,{path:"/droid",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(KE,{})})}),l.jsx(kt,{path:"/accounts",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(qE,{})})}),l.jsx(kt,{path:"/settings",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(GE,{})})}),l.jsx(kt,{path:"/health",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(FE,{})})}),l.jsx(kt,{path:"/shared",element:l.jsx(C.Suspense,{fallback:l.jsx(Ht,{}),children:l.jsx(VE,{})})})]})})]}),l.jsx(vS,{position:"top-right"})]})})})})})}const Cv=document.getElementById("root");if(!Cv)throw new Error("Root element not found. Failed to mount React application.");Kw.createRoot(Cv).render(l.jsx(C.StrictMode,{children:l.jsx($E,{})}));export{GO as $,vj as A,zt as B,rT as C,Aj as D,IO as E,HO as F,yj as G,Nj as H,Hn as I,Dj as J,UO as K,Qt as L,$k as M,Wk as N,Qk as O,Jx as P,Kb as Q,Tf as R,Ye as S,Sa as T,Dl as U,qd as V,Ke as W,qO as X,Ue as Y,KO as Z,uT as _,Mt as a,Fk as a$,FO as a0,VO as a1,YO as a2,$O as a3,WO as a4,QO as a5,Fb as a6,XO as a7,pT as a8,Sf as a9,JO as aA,pA as aB,qj as aC,ZO as aD,Ej as aE,Wb as aF,B1 as aG,nD as aH,Di as aI,zA as aJ,IA as aK,UA as aL,HA as aM,A1 as aN,pb as aO,xO as aP,bO as aQ,vO as aR,CO as aS,rP as aT,rO as aU,Yk as aV,fO as aW,hO as aX,qk as aY,Gk as aZ,pO as a_,iO as aa,Kk as ab,uO as ac,mO as ad,gO as ae,df as af,ff as ag,hf as ah,pf as ai,mf as aj,nP as ak,gT as al,aP as am,$s as an,MO as ao,Ud as ap,EO as aq,zd as ar,yO as as,OO as at,PO as au,RO as av,yy as aw,LO as ax,eP as ay,tP as az,dT as b,Vk as b0,dO as b1,bf as b2,TO as b3,Zb as b4,Ef as b5,As as b6,oO as b7,sO as b8,Rs as b9,AN as bA,AO as bB,lO as bC,cO as bD,wO as bE,NO as bF,jO as bG,DO as bH,ml as bI,Al as ba,_s as bb,lP as bc,Df as bd,Bs as be,jf as bf,fj as bg,_O as bh,zO as bi,fP as bj,cP as bk,uP as bl,dP as bm,ev as bn,YT as bo,WT as bp,kO as bq,SO as br,Vx as bs,NN as bt,SN as bu,Od as bv,ki as bw,pN as bx,gN as by,vN as bz,K as c,at as d,iP as e,oP as f,yT as g,jE as h,aO as i,lT as j,cT as k,T1 as l,M1 as m,ko as n,sP as o,wa as p,Na as q,lb as r,vf as s,cb as t,tf as u,Cf as v,Ls as w,Ly as x,Mj as y,BO as z};
|