@wangcansun/cc-config 1.2.2 → 1.3.0
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/cli.mjs +12 -2
- package/dashboard/dist/client/assets/activity-4TqyD_rE.js +1 -0
- package/dashboard/dist/client/assets/{commands-DhNv8XVR.js → commands-DEkiXZYl.js} +1 -1
- package/dashboard/dist/client/assets/dashboard-kD72rFaQ.js +1 -0
- package/dashboard/dist/client/assets/{detail-panel-C8SGLgm-.js → detail-panel-BIvsI61i.js} +1 -1
- package/dashboard/dist/client/assets/{header-CBzSNzdI.js → header-BTV9BL6u.js} +1 -1
- package/dashboard/dist/client/assets/{index-CaDf51H6.js → index-C8Brdl4F.js} +2 -2
- package/dashboard/dist/client/assets/{index-CFEz1CGb.js → index-CUdpRxTZ.js} +1 -1
- package/dashboard/dist/client/assets/{markdown-viewer-Bj8nSOSJ.js → markdown-viewer-Bcu9HM71.js} +3 -3
- package/dashboard/dist/client/assets/{mcp-BX69kbwu.js → mcp-DrHxDxfw.js} +1 -1
- package/dashboard/dist/client/assets/{plugins-BslRzmVr.js → plugins-husUl0t4.js} +1 -1
- package/dashboard/dist/client/assets/{profiles-CfOCpDPJ.js → profiles-tCUJYeeT.js} +1 -1
- package/dashboard/dist/client/assets/{recommended-BAj0agKu.js → recommended-Brh5GAZB.js} +1 -1
- package/dashboard/dist/client/assets/{search-box-CqaIZ9mR.js → search-box-CO7338GK.js} +1 -1
- package/dashboard/dist/client/assets/{select-BtWQJMup.js → select-BdEpCEBk.js} +1 -1
- package/dashboard/dist/client/assets/{settings-CicCcNf_.js → settings-DpddxKm5.js} +1 -1
- package/dashboard/dist/client/assets/{skills-DML4G4BP.js → skills-BvLEIHVX.js} +1 -1
- package/dashboard/dist/client/assets/{tag-Q3V7Jugn.js → tag-CkZkoVAp.js} +1 -1
- package/dashboard/dist/client/index.html +1 -1
- package/dashboard/dist/server.mjs +12 -2
- package/package.json +1 -1
- package/dashboard/dist/client/assets/activity-DS5YBWMm.js +0 -1
- package/dashboard/dist/client/assets/dashboard-DIyDYrl6.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dashboard-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dashboard-kD72rFaQ.js","assets/header-BTV9BL6u.js","assets/recommended-Brh5GAZB.js","assets/tag-CkZkoVAp.js","assets/search-box-CO7338GK.js","assets/plugins-husUl0t4.js","assets/detail-panel-BIvsI61i.js","assets/select-BdEpCEBk.js","assets/markdown-viewer-Bcu9HM71.js","assets/mcp-DrHxDxfw.js","assets/skills-BvLEIHVX.js","assets/commands-DEkiXZYl.js","assets/settings-DpddxKm5.js","assets/profiles-tCUJYeeT.js","assets/activity-4TqyD_rE.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function mp(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var nS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ec={exports:{}},po={},Cc={exports:{}},U={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -73,4 +73,4 @@ Error generating stack: `+o.message+`
|
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the MIT license found in the
|
|
75
75
|
* LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/var Zn=w;function bm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ev=typeof Object.is=="function"?Object.is:bm,tv=Zn.useState,nv=Zn.useEffect,rv=Zn.useLayoutEffect,iv=Zn.useDebugValue;function ov(e,t){var n=t(),r=tv({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return rv(function(){i.value=n,i.getSnapshot=t,ss(i)&&o({inst:i})},[e,n,t]),nv(function(){return ss(i)&&o({inst:i}),e(function(){ss(i)&&o({inst:i})})},[e]),iv(n),n}function ss(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ev(e,n)}catch{return!0}}function sv(e,t){return t()}var lv=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sv:ov;Jd.useSyncExternalStore=Zn.useSyncExternalStore!==void 0?Zn.useSyncExternalStore:lv;Yd.exports=Jd;var pl=Yd.exports;const Gd=0,Xd=1,qd=2,qu=3;var Zu=Object.prototype.hasOwnProperty;function hl(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&hl(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Zu.call(e,n)&&++r&&!Zu.call(t,n)||!(n in t)||!hl(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Et=new WeakMap,_t=()=>{},Ee=_t(),gl=Object,A=e=>e===Ee,gt=e=>typeof e=="function",en=(e,t)=>({...e,...t}),Zd=e=>gt(e.then),ls={},Ei={},_a="undefined",oi=typeof window!=_a,ml=typeof document!=_a,av=oi&&"Deno"in window,uv=()=>oi&&typeof window.requestAnimationFrame!=_a,bd=(e,t)=>{const n=Et.get(e);return[()=>!A(t)&&e.get(t)||ls,r=>{if(!A(t)){const i=e.get(t);t in Ei||(Ei[t]=i),n[5](t,en(i,r),i||ls)}},n[6],()=>!A(t)&&t in Ei?Ei[t]:!A(t)&&e.get(t)||ls]};let vl=!0;const cv=()=>vl,[yl,Sl]=oi&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[_t,_t],fv=()=>{const e=ml&&document.visibilityState;return A(e)||e!=="hidden"},dv=e=>(ml&&document.addEventListener("visibilitychange",e),yl("focus",e),()=>{ml&&document.removeEventListener("visibilitychange",e),Sl("focus",e)}),pv=e=>{const t=()=>{vl=!0,e()},n=()=>{vl=!1};return yl("online",t),yl("offline",n),()=>{Sl("online",t),Sl("offline",n)}},hv={isOnline:cv,isVisible:fv},gv={initFocus:dv,initReconnect:pv},bu=!ei.useId,Hn=!oi||av,mv=e=>uv()?window.requestAnimationFrame(e):setTimeout(e,1),as=Hn?w.useEffect:w.useLayoutEffect,us=typeof navigator<"u"&&navigator.connection,ec=!Hn&&us&&(["slow-2g","2g"].includes(us.effectiveType)||us.saveData),Ci=new WeakMap,vv=e=>gl.prototype.toString.call(e),cs=(e,t)=>e===`[object ${t}]`;let yv=0;const wl=e=>{const t=typeof e,n=vv(e),r=cs(n,"Date"),i=cs(n,"RegExp"),o=cs(n,"Object");let s,l;if(gl(e)===e&&!r&&!i){if(s=Ci.get(e),s)return s;if(s=++yv+"~",Ci.set(e,s),Array.isArray(e)){for(s="@",l=0;l<e.length;l++)s+=wl(e[l])+",";Ci.set(e,s)}if(o){s="#";const a=gl.keys(e).sort();for(;!A(l=a.pop());)A(e[l])||(s+=l+":"+wl(e[l])+",");Ci.set(e,s)}}else s=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},La=e=>{if(gt(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?wl(e):"",[e,t]};let Sv=0;const xl=()=>++Sv;async function ep(...e){const[t,n,r,i]=e,o=en({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let s=o.populateCache;const l=o.rollbackOnError;let a=o.optimisticData;const u=p=>typeof l=="function"?l(p):l!==!1,d=o.throwOnError;if(gt(n)){const p=n,v=[],m=t.keys();for(const y of m)!/^\$(inf|sub)\$/.test(y)&&p(t.get(y)._k)&&v.push(y);return Promise.all(v.map(c))}return c(n);async function c(p){const[v]=La(p);if(!v)return;const[m,y]=bd(t,v),[k,g,f,h]=Et.get(t),S=()=>{const F=k[v];return(gt(o.revalidate)?o.revalidate(m().data,p):o.revalidate!==!1)&&(delete f[v],delete h[v],F&&F[0])?F[0](qd).then(()=>m().data):m().data};if(e.length<3)return S();let x=r,_,P=!1;const R=xl();g[v]=[R,0];const T=!A(a),O=m(),Q=O.data,M=O._c,j=A(M)?Q:M;if(T&&(a=gt(a)?a(j,Q):a,y({data:a,_c:j})),gt(x))try{x=x(j)}catch(F){_=F,P=!0}if(x&&Zd(x))if(x=await x.catch(F=>{_=F,P=!0}),R!==g[v][0]){if(P)throw _;return x}else P&&T&&u(_)&&(s=!0,y({data:j,_c:Ee}));if(s&&!P)if(gt(s)){const F=s(x,j);y({data:F,error:Ee,_c:Ee})}else y({data:x,error:Ee,_c:Ee});if(g[v][1]=xl(),Promise.resolve(S()).then(()=>{y({_c:Ee})}),P){if(d)throw _;return}return x}}const tc=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},wv=(e,t)=>{if(!Et.has(e)){const n=en(gv,t),r=Object.create(null),i=ep.bind(Ee,e);let o=_t;const s=Object.create(null),l=(d,c)=>{const p=s[d]||[];return s[d]=p,p.push(c),()=>p.splice(p.indexOf(c),1)},a=(d,c,p)=>{e.set(d,c);const v=s[d];if(v)for(const m of v)m(c,p)},u=()=>{if(!Et.has(e)&&(Et.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,a,l]),!Hn)){const d=n.initFocus(setTimeout.bind(Ee,tc.bind(Ee,r,Gd))),c=n.initReconnect(setTimeout.bind(Ee,tc.bind(Ee,r,Xd)));o=()=>{d&&d(),c&&c(),Et.delete(e)}}};return u(),[e,i,u,o]}return[e,Et.get(e)[4]]},xv=(e,t,n,r,i)=>{const o=n.errorRetryCount,s=i.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!A(o)&&s>o||setTimeout(r,l,i)},kv=hl,[tp,Je]=wv(new Map),Ev=en({onLoadingSlow:_t,onSuccess:_t,onError:_t,onErrorRetry:xv,onDiscarded:_t,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ec?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ec?5e3:3e3,compare:kv,isPaused:()=>!1,cache:tp,mutate:Je,fallback:{}},hv),Cv=(e,t)=>{const n=en(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:s}=t;r&&o&&(n.use=r.concat(o)),i&&s&&(n.fallback=en(i,s))}return n},Pv=w.createContext({}),_v="$inf$",np=oi&&window.__SWR_DEVTOOLS_USE__,Lv=np?window.__SWR_DEVTOOLS_USE__:[],Rv=()=>{np&&(window.__SWR_DEVTOOLS_REACT__=ei)},Nv=e=>gt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ov=()=>{const e=w.useContext(Pv);return w.useMemo(()=>en(Ev,e),[e])},Tv=e=>(t,n,r)=>e(t,n&&((...o)=>{const[s]=La(t),[,,,l]=Et.get(tp);if(s.startsWith(_v))return n(...o);const a=l[s];return A(a)?n(...o):(delete l[s],a)}),r),jv=Lv.concat(Tv),Iv=e=>function(...n){const r=Ov(),[i,o,s]=Nv(n),l=Cv(r,s);let a=e;const{use:u}=l,d=(u||[]).concat(jv);for(let c=d.length;c--;)a=d[c](a);return a(i,o||l.fetcher||null,l)},Dv=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};Rv();const fs=ei.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),ds={dedupe:!0},nc=Promise.resolve(Ee),zv=()=>_t,Fv=(e,t,n)=>{const{cache:r,compare:i,suspense:o,fallbackData:s,revalidateOnMount:l,revalidateIfStale:a,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:c,keepPreviousData:p,strictServerPrefetchWarning:v}=n,[m,y,k,g]=Et.get(r),[f,h]=La(e),S=w.useRef(!1),x=w.useRef(!1),_=w.useRef(f),P=w.useRef(t),R=w.useRef(n),T=()=>R.current,O=()=>T().isVisible()&&T().isOnline(),[Q,M,j,F]=bd(r,f),Y=w.useRef({}).current,H=A(s)?A(n.fallback)?Ee:n.fallback[f]:s,re=(J,ie)=>{for(const oe in Y){const se=oe;if(se==="data"){if(!i(J[se],ie[se])&&(!A(J[se])||!i(We,ie[se])))return!1}else if(ie[se]!==J[se])return!1}return!0},L=!S.current,I=w.useMemo(()=>{const J=Q(),ie=F(),oe=fe=>{const tt=en(fe);return delete tt._k,(()=>{if(!f||!t||T().isPaused())return!1;if(L&&!A(l))return l;const lr=A(H)?tt.data:H;return A(lr)||a})()?{isValidating:!0,isLoading:!0,...tt}:tt},se=oe(J),ct=J===ie?se:oe(ie);let Qe=se;return[()=>{const fe=oe(Q());return re(fe,Qe)?(Qe.data=fe.data,Qe.isLoading=fe.isLoading,Qe.isValidating=fe.isValidating,Qe.error=fe.error,Qe):(Qe=fe,fe)},()=>ct]},[r,f]),D=pl.useSyncExternalStore(w.useCallback(J=>j(f,(ie,oe)=>{re(oe,ie)||J()}),[r,f]),I[0],I[1]),$=m[f]&&m[f].length>0,V=D.data,he=A(V)?H&&Zd(H)?fs(H):H:V,Pe=D.error,ut=w.useRef(he),We=p?A(V)?A(ut.current)?he:ut.current:V:he,Ke=f&&A(he),ir=w.useRef(null);!Hn&&pl.useSyncExternalStore(zv,()=>(ir.current=!1,ir),()=>(ir.current=!0,ir));const dp=ir.current;v&&dp&&!o&&Ke&&console.warn(`Missing pre-initiated data for serialized key "${f}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const Ra=!f||!t||T().isPaused()||$&&!A(Pe)?!1:L&&!A(l)?l:o?A(he)?!1:a:A(he)||a,Na=L&&Ra,pp=A(D.isValidating)?Na:D.isValidating,hp=A(D.isLoading)?Na:D.isLoading,or=w.useCallback(async J=>{const ie=P.current;if(!f||!ie||x.current||T().isPaused())return!1;let oe,se,ct=!0;const Qe=J||{},fe=!k[f]||!Qe.dedupe,tt=()=>bu?!x.current&&f===_.current&&S.current:f===_.current,sr={isValidating:!1,isLoading:!1},lr=()=>{M(sr)},Ta=()=>{const Ye=k[f];Ye&&Ye[1]===se&&delete k[f]},ja={isValidating:!0};A(Q().data)&&(ja.isLoading=!0);try{if(fe&&(M(ja),n.loadingTimeout&&A(Q().data)&&setTimeout(()=>{ct&&tt()&&T().onLoadingSlow(f,n)},n.loadingTimeout),k[f]=[ie(h),xl()]),[oe,se]=k[f],oe=await oe,fe&&setTimeout(Ta,n.dedupingInterval),!k[f]||k[f][1]!==se)return fe&&tt()&&T().onDiscarded(f),!1;sr.error=Ee;const Ye=y[f];if(!A(Ye)&&(se<=Ye[0]||se<=Ye[1]||Ye[1]===0))return lr(),fe&&tt()&&T().onDiscarded(f),!1;const St=Q().data;sr.data=i(St,oe)?St:oe,fe&&tt()&&T().onSuccess(oe,f,n)}catch(Ye){Ta();const St=T(),{shouldRetryOnError:To}=St;St.isPaused()||(sr.error=Ye,fe&&tt()&&(St.onError(Ye,f,St),(To===!0||gt(To)&&To(Ye))&&(!T().revalidateOnFocus||!T().revalidateOnReconnect||O())&&St.onErrorRetry(Ye,f,St,gp=>{const jo=m[f];jo&&jo[0]&&jo[0](qu,gp)},{retryCount:(Qe.retryCount||0)+1,dedupe:!0})))}return ct=!1,lr(),!0},[f,r]),Oa=w.useCallback((...J)=>ep(r,_.current,...J),[]);if(as(()=>{P.current=t,R.current=n,A(V)||(ut.current=V)}),as(()=>{if(!f)return;const J=or.bind(Ee,ds);let ie=0;T().revalidateOnFocus&&(ie=Date.now()+T().focusThrottleInterval);const se=Dv(f,m,(ct,Qe={})=>{if(ct==Gd){const fe=Date.now();T().revalidateOnFocus&&fe>ie&&O()&&(ie=fe+T().focusThrottleInterval,J())}else if(ct==Xd)T().revalidateOnReconnect&&O()&&J();else{if(ct==qd)return or();if(ct==qu)return or(Qe)}});return x.current=!1,_.current=f,S.current=!0,M({_k:h}),Ra&&(k[f]||(A(he)||Hn?J():mv(J))),()=>{x.current=!0,se()}},[f]),as(()=>{let J;function ie(){const se=gt(u)?u(Q().data):u;se&&J!==-1&&(J=setTimeout(oe,se))}function oe(){!Q().error&&(d||T().isVisible())&&(c||T().isOnline())?or(ds).then(ie):ie()}return ie(),()=>{J&&(clearTimeout(J),J=-1)}},[u,d,c,f]),w.useDebugValue(We),o){if(!bu&&Hn&&Ke)throw new Error("Fallback data is required when using Suspense in SSR.");Ke&&(P.current=t,R.current=n,x.current=!1);const J=g[f],ie=!A(J)&&Ke?Oa(J):nc;if(fs(ie),!A(Pe)&&Ke)throw Pe;const oe=Ke?or(ds):nc;!A(We)&&Ke&&(oe.status="fulfilled",oe.value=!0),fs(oe)}return{mutate:Oa,get data(){return Y.data=!0,We},get error(){return Y.error=!0,Pe},get isValidating(){return Y.isValidating=!0,pp},get isLoading(){return Y.isLoading=!0,hp}}},Fe=Iv(Fv),z=e=>typeof e=="string",mr=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},rc=e=>e==null?"":String(e),Mv=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},$v=/###/g,ic=e=>e&&e.includes("###")?e.replace($v,"."):e,oc=e=>!e||z(e),Or=(e,t,n)=>{const r=z(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(oc(e))return{};const o=ic(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return oc(e)?{}:{obj:e,k:ic(r[i])}},sc=(e,t,n)=>{const{obj:r,k:i}=Or(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),l=Or(e,s,Object);for(;l.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),l=Or(e,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},Uv=(e,t,n,r)=>{const{obj:i,k:o}=Or(e,t,Object);i[o]=i[o]||[],i[o].push(n)},uo=(e,t)=>{const{obj:n,k:r}=Or(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Av=(e,t,n)=>{const r=uo(e,n);return r!==void 0?r:uo(t,n)},rp=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?z(e[r])||e[r]instanceof String||z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):rp(e[r],t[r],n):e[r]=t[r]);return e},wt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Vv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Bv=e=>z(e)?e.replace(/[&<>"'\/]/g,t=>Vv[t]):e;class Hv{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Wv=[" ",",","?","!",";"],Kv=new Hv(20),Qv=(e,t,n)=>{t=t||"",n=n||"";const r=Wv.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const i=Kv.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},kl=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let s,l="";for(let a=o;a<r.length;++a)if(a!==o&&(l+=n),l+=r[a],s=i[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&a<r.length-1)continue;o+=a-o+1;break}i=s}return i},Zr=e=>e==null?void 0:e.replace(/_/g,"-"),Yv={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class co{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Yv,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(t=t.map(o=>z(o)?o.replace(/[\r\n\x00-\x1F\x7F]/g," "):o),z(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new co(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new co(this.logger,t)}}var mt=new co;class Oo{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...i)=>{n(...i),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let s=0;s<o;s++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,o])=>{for(let s=0;s<o;s++)i(t,...n)})}}class lc extends Oo{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var u,d;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.includes(".")?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):z(r)&&o?l.push(...r.split(o)):l.push(r)));const a=uo(this.data,l);return!a&&!n&&!r&&t.includes(".")&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!s||!z(r)?a:kl((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(s?r.split(s):r)),t.includes(".")&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),sc(this.data,l,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(z(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,s={silent:!1,skipCopy:!1}){let l=[t,n];t.includes(".")&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let a=uo(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?rp(a,r,o):a={...a,...r},sc(this.data,l,a),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var ip={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var s;t=((s=this.processors[o])==null?void 0:s.process(t,n,r,i))??t}),t}};const op=Symbol("i18next/PATH_KEY");function Jv(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>{var o;return(o=n==null?void 0:n.revoke)==null||o.call(n),i===op?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Wn(e,t){const{[op]:n}=e(Jv()),r=(t==null?void 0:t.keySeparator)??".",i=(t==null?void 0:t.nsSeparator)??":";if(n.length>1&&i){const o=t==null?void 0:t.ns,s=Array.isArray(o)?o:null;if(s&&s.length>1&&s.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}const ps=e=>!z(e)&&typeof e!="boolean"&&typeof e!="number";class fo extends Oo{constructor(t,n={}){super(),Mv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=mt.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if((i==null?void 0:i.res)===void 0)return!1;const o=ps(i.res);return!(r.returnObjects===!1&&o)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Qv(t,r,i);if(s&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:z(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.includes(u[0]))&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:z(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=Wn(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(j=>typeof j=="function"?Wn(j,{...this.options,...i}):String(j));const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:a}=this.extractFromKey(t[t.length-1],i),u=a[a.length-1];let d=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const c=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?o?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${d}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:l;const v=this.resolve(t,i);let m=v==null?void 0:v.res;const y=(v==null?void 0:v.usedKey)||l,k=(v==null?void 0:v.exactUsedKey)||l,g=["[object Number]","[object Function]","[object RegExp]"],f=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,h=!this.i18nFormat||this.i18nFormat.handleAsObject,S=i.count!==void 0&&!z(i.count),x=fo.hasDefaultValue(i),_=S?this.pluralResolver.getSuffix(c,i.count,i):"",P=i.ordinal&&S?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",R=S&&!i.ordinal&&i.count===0,T=R&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${_}`]||i[`defaultValue${P}`]||i.defaultValue;let O=m;h&&!m&&x&&(O=T);const Q=ps(O),M=Object.prototype.toString.apply(O);if(h&&O&&Q&&!g.includes(M)&&!(z(f)&&Array.isArray(O))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,O,{...i,ns:a}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(v.res=j,v.usedParams=this.getUsedParamsDetails(i),v):j}if(s){const j=Array.isArray(O),F=j?[]:{},Y=j?k:y;for(const H in O)if(Object.prototype.hasOwnProperty.call(O,H)){const re=`${Y}${s}${H}`;x&&!m?F[H]=this.translate(re,{...i,defaultValue:ps(T)?T[H]:void 0,joinArrays:!1,ns:a}):F[H]=this.translate(re,{...i,joinArrays:!1,ns:a}),F[H]===re&&(F[H]=O[H])}m=F}}else if(h&&z(f)&&Array.isArray(m))m=m.join(f),m&&(m=this.extendTranslation(m,t,i,r));else{let j=!1,F=!1;!this.isValidLookup(m)&&x&&(j=!0,m=T),this.isValidLookup(m)||(F=!0,m=l);const H=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:m,re=x&&T!==m&&this.options.updateMissing;if(F||j||re){if(this.logger.log(re?"updateKey":"missingKey",c,u,l,re?T:m),s){const $=this.resolve(l,{...i,keySeparator:!1});$&&$.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 L=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let $=0;$<I.length;$++)L.push(I[$]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(i.lng||this.language):L.push(i.lng||this.language);const D=($,V,he)=>{var ut;const Pe=x&&he!==m?he:H;this.options.missingKeyHandler?this.options.missingKeyHandler($,u,V,Pe,re,i):(ut=this.backendConnector)!=null&&ut.saveMissing&&this.backendConnector.saveMissing($,u,V,Pe,re,i),this.emit("missingKey",$,u,V,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?L.forEach($=>{const V=this.pluralResolver.getSuffixes($,i);R&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!V.includes(`${this.options.pluralSeparator}zero`)&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(he=>{D([$],l+he,i[`defaultValue${he}`]||T)})}):D(L,l,T))}m=this.extendTranslation(m,t,i,v,r),F&&m===l&&this.options.appendNamespaceToMissingKey&&(m=`${u}${d}${l}`),(F||j)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,j?m:void 0,i))}return o?(v.res=m,v.usedParams=this.getUsedParamsDetails(i),v):m}extendTranslation(t,n,r,i,o){var a,u;if((a=this.i18nFormat)!=null&&a.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=z(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(d){const v=t.match(this.interpolator.nestingRegexp);c=v&&v.length}let p=r.replace&&!z(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),d){const v=t.match(this.interpolator.nestingRegexp),m=v&&v.length;c<m&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...v)=>(o==null?void 0:o[0])===v[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):this.translate(...v,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=z(s)?[s]:s;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=ip.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,s,l;return z(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(a=>typeof a=="function"?Wn(a,{...this.options,...n}):a)),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),d=u.key;i=d;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=n.count!==void 0&&!z(n.count),v=p&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(z(n.context)||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);c.forEach(k=>{var g,f;this.isValidLookup(r)||(l=k,!this.checkedLoadedFor[`${y[0]}-${k}`]&&((g=this.utils)!=null&&g.hasLoadedNamespace)&&!((f=this.utils)!=null&&f.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${y[0]}-${k}`]=!0,this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),y.forEach(h=>{var _;if(this.isValidLookup(r))return;s=h;const S=[d];if((_=this.i18nFormat)!=null&&_.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,h,k,n);else{let P;p&&(P=this.pluralResolver.getSuffix(h,n.count,n));const R=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&P.startsWith(T)&&S.push(d+P.replace(T,this.options.pluralSeparator)),S.push(d+P),v&&S.push(d+R)),m){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),p&&(n.ordinal&&P.startsWith(T)&&S.push(O+P.replace(T,this.options.pluralSeparator)),S.push(O+P),v&&S.push(O+R))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(o=x,r=this.getResource(h,k,x,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!z(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class ac{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mt.create("languageUtils")}getScriptPartFromCode(t){if(t=Zr(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Zr(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(z(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>s===o?!0:!s.includes("-")&&!o.includes("-")?!1:!!(s.includes("-")&&!o.includes("-")&&s.slice(0,s.indexOf("-"))===o||s.startsWith(o)&&o.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),z(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return z(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):z(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.includes(s)||o(this.formatLanguageCode(s))}),i}}const uc={zero:0,one:1,two:2,few:3,many:4,other:5},cc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Gv{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=mt.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Zr(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),cc;if(!t.match(/-|_/))return cc;const a=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(a,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>uc[i]-uc[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const fc=(e,t,n,r=".",i=!0)=>{let o=Av(e,t,n);return!o&&i&&z(n)&&(o=kl(e,n,r),o===void 0&&(o=kl(t,n,r))),o},hs=e=>e.replace(/\$/g,"$$$$");class dc{constructor(t={}){var n;this.logger=mt.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:d,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:v,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:k,maxReplaces:g,alwaysFormat:f}=t.interpolation;this.escape=n!==void 0?n:Bv,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?wt(o):s||"{{",this.suffix=l?wt(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":c?wt(c):"-",this.unescapeSuffix=this.unescapePrefix?"":d?wt(d):"",this.nestingPrefix=p?wt(p):v||wt("$t("),this.nestingSuffix=m?wt(m):y||wt(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=g||1e3,this.alwaysFormat=f!==void 0?f:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var v;let o,s,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(!m.includes(this.formatSeparator)){const f=fc(n,a,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(f,void 0,r,{...i,...n,interpolationkey:m}):f}const y=m.split(this.formatSeparator),k=y.shift().trim(),g=y.join(this.formatSeparator).trim();return this.format(fc(n,a,k,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...i,...n,interpolationkey:k})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((v=i==null?void 0:i.interpolation)==null?void 0:v.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>hs(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?hs(this.escape(m)):hs(m)}].forEach(m=>{for(l=0;o=m.regex.exec(t);){const y=o[1].trim();if(s=u(y),s===void 0)if(typeof d=="function"){const g=d(t,o,i);s=z(g)?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,y))s="";else if(c){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),s="";else!z(s)&&!this.useRawValueToEscape&&(s=rc(s));const k=m.safeValue(s);if(t=t.replace(o[0],k),c?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,s;const l=(a,u)=>{const d=this.nestingOptionsSeparator;if(!a.includes(d))return a;const c=a.split(new RegExp(`${wt(d)}[ ]*{`));let p=`{${c[1]}`;a=c[0],p=this.interpolate(p,s);const v=p.match(/'/g),m=p.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),u&&(s={...u,...s})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,y),`${a}${d}${p}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,a};for(;i=this.nestingRegexp.exec(t);){let a=[];s={...r},s=s.replace&&!z(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(a=i[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),o=n(l.call(this,i[1].trim(),s),s),o&&i[0]===t&&!z(o))return o;z(o)||(o=rc(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce((d,c)=>this.format(d,c,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const Xv=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].slice(0,-1);t==="currency"&&!i.includes(":")?n.currency||(n.currency=i.trim()):t==="relativetime"&&!i.includes(":")?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...a]=s.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},pc=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let l=t[s];return l||(l=e(Zr(r),i),t[s]=l),l(n)}},qv=e=>(t,n,r)=>e(Zr(n),r)(t);class Zv{constructor(t={}){this.logger=mt.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?pc:qv;this.formats={number:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o});return l=>s.format(l)}),currency:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o,style:"currency"});return l=>s.format(l)}),datetime:r((i,o)=>{const s=new Intl.DateTimeFormat(i,{...o});return l=>s.format(l)}),relativetime:r((i,o)=>{const s=new Intl.RelativeTimeFormat(i,{...o});return l=>s.format(l,o.range||"day")}),list:r((i,o)=>{const s=new Intl.ListFormat(i,{...o});return l=>s.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=pc(n)}format(t,n,r,i={}){if(!n||t==null)return t;const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&!o[0].includes(")")&&o.find(l=>l.includes(")"))){const l=o.findIndex(a=>a.includes(")"));o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{var c;const{formatName:u,formatOptions:d}=Xv(a);if(this.formats[u]){let p=l;try{const v=((c=i==null?void 0:i.formatParams)==null?void 0:c[i.interpolationkey])||{},m=v.locale||v.lng||i.locale||i.lng||r;p=this.formats[u](l,m,{...d,...i,...v})}catch(v){this.logger.warn(v)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const bv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class ey extends Oo{constructor(t,n,r,i={}){var o,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=mt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},l={},a={};return t.forEach(u=>{let d=!0;n.forEach(c=>{const p=`${u}|${c}`;!r.reload&&this.store.hasResourceBundle(u,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,d=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),a[c]===void 0&&(a[c]=!0)))}),d||(l[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{Uv(a.loaded,[o],s),bv(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const d=a.loaded[u];d.length&&d.forEach(c=>{l[u][c]===void 0&&(l[u][c]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r,i=0,o=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&d&&i<this.maxRetries){setTimeout(()=>{this.read(t,n,r,i+1,o*2,s)},o);return}s(u,d)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();z(t)&&(t=this.languageUtils.toResolveHierarchy(t)),z(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,l),this.loaded(t,s,l)})}saveMissing(t,n,r,i,o,s={},l=()=>{}){var a,u,d,c,p;if((u=(a=this.services)==null?void 0:a.utils)!=null&&u.hasLoadedNamespace&&!((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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((p=this.backend)!=null&&p.create){const v={...s,isUpdate:o},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(t,n,r,i,v):y=m(t,n,r,i),y&&typeof y.then=="function"?y.then(k=>l(null,k)).catch(l):l(null,y)}catch(y){l(y)}else m(t,n,r,i,l,v)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const gs=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),z(e[1])&&(t.defaultValue=e[1]),z(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),hc=e=>(z(e.ns)&&(e.ns=[e.ns]),z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Pi=()=>{},ty=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Tr extends Oo{constructor(t={},n){if(super(),this.options=hc(t),this.services={},this.logger=mt,this.modules={external:[]},ty(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(z(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=gs();this.options={...r,...this.options,...hc(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?mt.init(i(this.modules.logger),this.options):mt.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Zv;const d=new ac(this.options);this.store=new lc(this.options.resources,this.options);const c=this.services;c.logger=mt,c.resourceStore=this.store,c.languageUtils=d,c.pluralResolver=new Gv(d,{prepend:this.options.pluralSeparator}),u&&(c.formatter=i(u),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new dc(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new ey(i(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(p,...v)=>{this.emit(p,...v)}),this.modules.languageDetector&&(c.languageDetector=i(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=i(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new fo(this.services,this.options),this.translator.on("*",(p,...v)=>{this.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Pi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=mr(),a=()=>{const u=(d,c)=>{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),l.resolve(c),n(d,c)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),l}loadResources(t,n=Pi){var o,s;let r=n;const i=z(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(c=>{c!=="cimode"&&(l.includes(c)||l.push(c))})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>a(d)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,u=>a(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=mr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Pi),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&ip.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=mr();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,a)=>{a?this.isLanguageChangingTo===t&&(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},s=l=>{var d,c;!t&&!l&&this.services.languageDetector&&(l=[]);const a=z(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(z(l)?[l]:l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(c=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||c.call(d,u)),this.loadResources(u,p=>{o(p,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r){const i=(o,s,...l)=>{let a;typeof s!="object"?a=this.options.overloadTranslationOptionHandler([o,s].concat(l)):a={...s},a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix!==""&&(a.keyPrefix=a.keyPrefix||r||i.keyPrefix);const u={...this.options,...a};typeof a.keyPrefix=="function"&&(a.keyPrefix=Wn(a.keyPrefix,u));const d=this.options.keySeparator||".";let c;return a.keyPrefix&&Array.isArray(o)?c=o.map(p=>(typeof p=="function"&&(p=Wn(p,u)),`${a.keyPrefix}${d}${p}`)):(typeof o=="function"&&(o=Wn(o,u)),c=a.keyPrefix?`${a.keyPrefix}${d}${o}`:o),this.t(c,a)};return z(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){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=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=mr();return this.options.ns?(z(t)&&(t=[t]),t.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=mr();z(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>!i.includes(s)&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["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=((o=this.services)==null?void 0:o.languageUtils)||new ac(gs());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Tr(t,n);return r.createInstance=Tr.createInstance,r}cloneInstance(t={},n=Pi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Tr(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const l=Object.keys(this.store.data).reduce((a,u)=>(a[u]={...this.store.data[u]},a[u]=Object.keys(a[u]).reduce((d,c)=>(d[c]={...a[u][c]},d),a[u]),a),{});o.store=new lc(l,i),o.services.resourceStore=o.store}if(t.interpolation){const a={...gs().interpolation,...this.options.interpolation,...t.interpolation},u={...i,interpolation:a};o.services.interpolator=new dc(u)}return o.translator=new fo(o.services,i),o.translator.on("*",(l,...a)=>{o.emit(l,...a)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Oe=Tr.createInstance();Oe.createInstance;Oe.dir;Oe.init;Oe.loadResources;Oe.reloadResources;Oe.use;Oe.changeLanguage;Oe.getFixedT;Oe.t;Oe.exists;Oe.setDefaultNamespace;Oe.hasLoadedNamespace;Oe.loadNamespaces;Oe.loadLanguages;const ny=(e,t,n,r)=>{var o,s,l,a;const i=[n,{code:t,...r||{}}];if((s=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&s.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);yn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(a=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&a.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},gc={},El=(e,t,n,r)=>{yn(n)&&gc[n]||(yn(n)&&(gc[n]=new Date),ny(e,t,n,r))},sp=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Cl=(e,t,n)=>{e.loadNamespaces(t,sp(e,n))},mc=(e,t,n,r)=>{if(yn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Cl(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,sp(e,r))},ry=(e,t,n={})=>!t.languages||!t.languages.length?(El(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),yn=e=>typeof e=="string",iy=e=>typeof e=="object"&&e!==null,oy=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,sy={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ly=e=>sy[e],ay=e=>e.replace(oy,ly);let Pl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ay,transDefaultProps:void 0};const uy=(e={})=>{Pl={...Pl,...e}},cy=()=>Pl;let lp;const fy=e=>{lp=e},dy=()=>lp,py={type:"3rdParty",init(e){uy(e.options.react),fy(e)}},hy=w.createContext();class gy{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const my=(e,t)=>{if(yn(t))return t;if(iy(t)&&yn(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},vy={t:my,ready:!1},yy=()=>()=>{},ap=(e,t={})=>{var T,O,Q;const{i18n:n}=t,{i18n:r,defaultNS:i}=w.useContext(hy)||{},o=n||r||dy();o&&!o.reportNamespaces&&(o.reportNamespaces=new gy),o||El(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=w.useMemo(()=>{var M;return{...cy(),...(M=o==null?void 0:o.options)==null?void 0:M.react,...t}},[o,t]),{useSuspense:l,keyPrefix:a}=s,u=i||((T=o==null?void 0:o.options)==null?void 0:T.defaultNS),d=yn(u)?[u]:u||["translation"],c=w.useMemo(()=>d,d);(Q=(O=o==null?void 0:o.reportNamespaces)==null?void 0:O.addUsedNamespaces)==null||Q.call(O,c);const p=w.useRef(0),v=w.useCallback(M=>{if(!o)return yy;const{bindI18n:j,bindI18nStore:F}=s,Y=()=>{p.current+=1,M()};return j&&o.on(j,Y),F&&o.store.on(F,Y),()=>{j&&j.split(" ").forEach(H=>o.off(H,Y)),F&&F.split(" ").forEach(H=>o.store.off(H,Y))}},[o,s]),m=w.useRef(),y=w.useCallback(()=>{if(!o)return vy;const M=!!(o.isInitialized||o.initializedStoreOnce)&&c.every(L=>ry(L,o,s)),j=t.lng||o.language,F=p.current,Y=m.current;if(Y&&Y.ready===M&&Y.lng===j&&Y.keyPrefix===a&&Y.revision===F)return Y;const re={t:o.getFixedT(j,s.nsMode==="fallback"?c:c[0],a),ready:M,lng:j,keyPrefix:a,revision:F};return m.current=re,re},[o,c,a,s,t.lng]),[k,g]=w.useState(0),{t:f,ready:h}=pl.useSyncExternalStore(v,y,y);w.useEffect(()=>{if(o&&!h&&!l){const M=()=>g(j=>j+1);t.lng?mc(o,t.lng,c,M):Cl(o,c,M)}},[o,t.lng,c,h,l,k]);const S=o||{},x=w.useRef(null),_=w.useRef(),P=M=>{const j=Object.getOwnPropertyDescriptors(M);j.__original&&delete j.__original;const F=Object.create(Object.getPrototypeOf(M),j);if(!Object.prototype.hasOwnProperty.call(F,"__original"))try{Object.defineProperty(F,"__original",{value:M,writable:!1,enumerable:!1,configurable:!1})}catch{}return F},R=w.useMemo(()=>{const M=S,j=M==null?void 0:M.language;let F=M;M&&(x.current&&x.current.__original===M?_.current!==j?(F=P(M),x.current=F,_.current=j):F=x.current:(F=P(M),x.current=F,_.current=j));const Y=!h&&!l?(...re)=>(El(o,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),f(...re)):f,H=[Y,F,h];return H.t=Y,H.i18n=F,H.ready=h,H},[f,S,h,S.resolvedLanguage,S.language,S.languages]);if(o&&l&&!h)throw new Promise(M=>{const j=()=>M();t.lng?mc(o,t.lng,c,j):Cl(o,c,j)});return R},Sy=[{labelKey:"nav.dashboard",icon:"📊",href:"/"},{labelKey:"nav.recommended",icon:"✨",href:"/recommended"},{labelKey:"nav.configuration",icon:"⚙️",href:"/config"},{labelKey:"nav.profiles",icon:"👤",href:"/profiles"},{labelKey:"nav.activity",icon:"🖥️",href:"/activity"}];function wy(){const{pathname:e}=xn(),{theme:t,setTheme:n}=Zm(),{t:r,i18n:i}=ap(),o=i.resolvedLanguage??"en",{data:s}=Fe("/api/info",u=>fetch(u).then(d=>d.json()),{revalidateOnFocus:!1}),l=(s==null?void 0:s.version)??"…",a=u=>u==="/"?e==="/"||e==="/metrics":e.startsWith(u);return E.jsxs("aside",{style:{width:"240px",minWidth:"240px",backgroundColor:"var(--bg-secondary)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",height:"100vh",position:"fixed",top:0,left:0,overflowY:"auto"},children:[E.jsx("div",{className:"p-4",style:{borderBottom:"1px solid var(--border)"},children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-white text-sm font-medium",style:{backgroundColor:"var(--accent)"},children:"C"}),E.jsxs("div",{children:[E.jsx("div",{className:"text-sm",style:{color:"var(--text-primary)",fontWeight:510},children:"Claude Config"}),E.jsx("div",{className:"text-xs",style:{color:"var(--text-faint)"},children:`v${l}`})]})]})}),E.jsx("nav",{className:"flex-1 p-3",children:E.jsx("ul",{className:"space-y-1",children:Sy.map(u=>E.jsx("li",{children:E.jsxs(Kd,{to:u.href,className:"flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors",style:a(u.href)?{backgroundColor:"var(--accent)",color:"#fff"}:{color:"var(--text-secondary)"},children:[E.jsx("span",{className:"text-base",children:u.icon}),E.jsx("span",{children:r(u.labelKey)})]})},u.href))})}),E.jsxs("div",{className:"p-3 space-y-2",style:{borderTop:"1px solid var(--border)"},children:[E.jsx("div",{className:"flex items-center gap-1 p-1 rounded-lg",style:{backgroundColor:"var(--bg-tertiary)"},children:["en","zh"].map(u=>E.jsx("button",{onClick:()=>void i.changeLanguage(u),className:"flex-1 px-2 py-1 rounded text-xs transition-colors",style:{backgroundColor:o===u?"var(--accent)":"transparent",color:o===u?"#fff":"var(--text-muted)"},children:r(`language.${u}`)},u))}),E.jsx("div",{className:"flex items-center gap-1 p-1 rounded-lg",style:{backgroundColor:"var(--bg-tertiary)"},children:["system","dark","light"].map(u=>E.jsx("button",{onClick:()=>n(u),className:"flex-1 px-2 py-1 rounded text-xs transition-colors",style:{backgroundColor:t===u?"var(--accent)":"transparent",color:t===u?"#fff":"var(--text-muted)"},children:u==="system"?`🖥️ ${r("theme.auto")}`:u==="dark"?`🌙 ${r("theme.dark")}`:`☀️ ${r("theme.light")}`},u))})]})]})}function xy(){w.useEffect(()=>{const e=new EventSource("/api/events");return e.onmessage=t=>{try{const n=JSON.parse(t.data);if(n.type==="heartbeat")return;switch(n.category){case"settings":Je("settings"),Je("stats");break;case"plugins":Je("plugins"),Je("stats"),Je("skills");break;case"mcps":Je("mcp-servers"),Je("stats");break;case"sessions":Je("sessions");break;case"profiles":Je("profiles"),Je("stats");break;default:Je(()=>!0)}}catch{}},e.onerror=()=>{},()=>e.close()},[])}function ky(){return xy(),null}const Ey="modulepreload",Cy=function(e){return"/"+e},vc={},Dt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=Cy(a),a in vc)return;vc[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":Ey,u||(c.as="script"),c.crossOrigin="",c.href=a,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((p,v)=>{c.addEventListener("load",p),c.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Py={primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"btn-ghost"},_y={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm"};function ms({children:e,variant:t="secondary",size:n="md",onClick:r,disabled:i=!1,type:o="button",title:s}){return E.jsx("button",{type:o,onClick:r,disabled:i,title:s,className:`inline-flex items-center justify-center rounded-md transition-colors ${_y[n]} ${Py[t]} ${i?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,style:{fontWeight:510},children:e})}const Ly="/api";async function K(e,t){const n=await fetch(`${Ly}${e}`,{headers:{"Content-Type":"application/json"},...t});if(!n.ok){const r=await n.text().catch(()=>n.statusText);throw new Error(`API error ${n.status}: ${r}`)}return n.json()}function Ry(){return K("/stats")}function Ny(){return K("/plugins")}function rS(e){return K(`/plugins/${encodeURIComponent(e)}`,{method:"DELETE"})}function iS(e,t){return K(`/plugins/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify({enabled:t})})}function Oy(){return K("/mcp-servers")}function oS(e){return K(`/mcp-servers/${encodeURIComponent(e)}`,{method:"DELETE"})}function Ty(){return K("/settings")}function sS(e){return K("/settings",{method:"PATCH",body:JSON.stringify(e)})}function lS(){return K("/settings/env")}function aS(e,t){return K("/settings/env",{method:"PUT",body:JSON.stringify({key:e,value:t})})}function uS(e){return K(`/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"})}function jy(){return K("/sessions")}function Iy(e,t){const n=new URLSearchParams({file:e});return K(`/sessions/history?${n.toString()}`)}function Dy(){return K("/skills")}function cS(e){return K(`/skills/content?path=${encodeURIComponent(e)}`)}async function fS(e,t){const n=await fetch("/api/skills/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t})});if(!n.ok)throw new Error("Failed to save");return n.json()}async function dS(e){const t=await fetch(`/api/skills/search?q=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Search failed");return t.json()}async function pS(){const e=await fetch("/api/skills/top");if(!e.ok)throw new Error("Failed to fetch top skills");return e.json()}async function hS(){const e=await fetch("/api/mcp-registry/top");if(!e.ok)throw new Error("Failed to fetch top MCP servers");return e.json()}async function gS(e){const t=await fetch(`/api/mcp-registry?q=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Search failed");return t.json()}async function mS(e,t,n,r){const i=await fetch("/api/mcp-registry/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,command:t,args:n,env:r})});if(!i.ok){const o=await i.json().catch(()=>({error:"Install failed"}));throw new Error(o.error??"Install failed")}return i.json()}function zy(){return K("/commands")}function Fy(){return K("/profiles")}function My(e){return K("/profiles",{method:"POST",body:JSON.stringify({name:e})})}function vS(e){return K(`/profiles/${encodeURIComponent(e)}/activate`,{method:"POST"})}function yS(e){return K(`/profiles/${encodeURIComponent(e)}`,{method:"DELETE"})}function SS(e){return K("/profiles/export",{method:"POST",body:JSON.stringify({name:e})})}function wS(e,t="replace"){return K("/profiles/import",{method:"POST",body:JSON.stringify({data:e,strategy:t})})}function $y(){return K("/metrics")}function Uy(){return K("/marketplaces")}function xS(e,t){return K("/marketplaces",{method:"POST",body:JSON.stringify({name:e,repo:t})})}function kS(e){return K(`/marketplaces/${encodeURIComponent(e)}`,{method:"DELETE"})}function Ay(e){return K(`/marketplaces/${encodeURIComponent(e)}/plugins`)}function Vy(){return K("/recommendations")}function ES(){return K("/recommendations",{method:"POST"})}const He={revalidateOnFocus:!1,dedupingInterval:5e3};function CS(){return Fe("stats",Ry,He)}function PS(){return Fe("plugins",Ny,He)}function _S(){return Fe("mcp-servers",Oy,He)}function LS(){return Fe("skills",Dy,He)}function RS(){return Fe("commands",zy,He)}function By(){return Fe("profiles",Fy,He)}function NS(){return Fe("settings",Ty,He)}function OS(){return Fe("sessions",jy,He)}function TS(e){return Fe(e?["session-history",e]:null,()=>e?Iy(e):Promise.resolve([]),He)}function jS(){return Fe("metrics",$y,He)}function IS(){return Fe("marketplaces",Uy,He)}function DS(e){return Fe(e?["available-plugins",e]:null,()=>e?Ay(e):Promise.resolve([]),He)}function zS(){return Fe("recommendations",Vy,He)}const Hy=[{key:"plugins",href:"/config/plugins"},{key:"mcp",href:"/config/mcp"},{key:"skills",href:"/config/skills"},{key:"commands",href:"/config/commands"},{key:"settings",href:"/config/settings"}];function Wy({children:e}){const{pathname:t}=xn(),n=Pa(),{t:r}=ap(),{mutate:i}=By(),[o,s]=w.useState(!1),[l,a]=w.useState(""),[u,d]=w.useState(""),[c,p]=w.useState(!1),[v,m]=w.useState(null),[y,k]=w.useState(null);function g(){s(!1),a(""),d(""),k(null)}async function f(){const h=l.trim();if(!h){k(r("config.saveDialog.nameRequired"));return}p(!0),k(null);try{await My(h),i(),m(r("config.saveDialog.profileSaved",{name:h})),g(),setTimeout(()=>m(null),3e3)}catch(S){console.error("Failed to create profile",S),k(S instanceof Error?S.message:r("config.saveDialog.saveFailed"))}finally{p(!1)}}return E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[E.jsx("div",{className:"flex items-center gap-1 p-1 rounded-lg",style:{backgroundColor:"var(--bg-tertiary)",flex:1},children:Hy.map(h=>{const S=t.startsWith(h.href);return E.jsx(Kd,{to:h.href,className:"px-4 py-2 rounded-md text-sm transition-colors",style:{backgroundColor:S?"var(--accent)":"transparent",color:S?"#fff":"var(--text-muted)",fontWeight:S?510:400},children:r(`config.tabs.${h.key}`)},h.href)})}),E.jsx(ms,{variant:"primary",size:"md",onClick:()=>s(!0),children:r("config.saveToProfile")})]}),e,o&&E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backgroundColor:"var(--overlay-bg)"},onClick:g,children:E.jsxs("div",{className:"rounded-lg p-6 w-full max-w-md mx-4",style:{backgroundColor:"var(--bg-tertiary)",border:"1px solid var(--card-border)",boxShadow:"rgba(0,0,0,0.4) 0px 2px 4px"},onClick:h=>h.stopPropagation(),children:[E.jsx("h3",{className:"text-lg mb-2",style:{color:"var(--text-primary)",fontWeight:510},children:r("config.saveDialog.title")}),E.jsx("p",{className:"text-sm mb-4",style:{color:"var(--text-secondary)"},children:r("config.saveDialog.body")}),E.jsxs("div",{className:"mb-4",children:[E.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider mb-2",style:{color:"var(--text-muted)"},children:r("config.saveDialog.profileName")}),E.jsx("input",{type:"text",value:l,onChange:h=>a(h.target.value),placeholder:r("config.saveDialog.namePlaceholder"),className:"w-full px-3 py-2 rounded-lg text-sm outline-none profile-input",style:{backgroundColor:"var(--input-bg)",border:"1px solid var(--card-border)",color:"var(--text-primary)"},onKeyDown:h=>{h.key==="Enter"&&f(),h.key==="Escape"&&g()},autoFocus:!0})]}),E.jsxs("div",{className:"mb-4",children:[E.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider mb-2",style:{color:"var(--text-muted)"},children:r("config.saveDialog.descriptionLabel")}),E.jsx("input",{type:"text",value:u,onChange:h=>d(h.target.value),placeholder:r("config.saveDialog.descriptionPlaceholder"),className:"w-full px-3 py-2 rounded-lg text-sm outline-none profile-input",style:{backgroundColor:"var(--input-bg)",border:"1px solid var(--card-border)",color:"var(--text-primary)"}})]}),y&&E.jsx("p",{className:"text-xs mb-3",style:{color:"var(--accent-red, #e5484d)"},children:y}),E.jsxs("div",{className:"flex items-center justify-end gap-3",children:[E.jsx(ms,{variant:"ghost",size:"md",onClick:g,disabled:c,children:r("common.cancel")}),E.jsx(ms,{variant:"primary",size:"md",onClick:f,disabled:c||!l.trim(),children:r(c?"common.saving":"common.save")})]})]})}),v&&E.jsxs("div",{className:"fixed bottom-6 right-6 z-50 rounded-lg px-4 py-3 text-sm cursor-pointer",style:{backgroundColor:"var(--bg-tertiary)",border:"1px solid var(--accent)",color:"var(--text-primary)",boxShadow:"rgba(0,0,0,0.4) 0px 2px 8px"},onClick:()=>{m(null),n("/profiles")},children:[v," ",E.jsx("span",{style:{color:"var(--text-muted)"},children:r("config.saveDialog.clickToView")})]})]})}const Ky=w.lazy(()=>Dt(()=>import("./dashboard-DIyDYrl6.js"),__vite__mapDeps([0,1]))),Qy=w.lazy(()=>Dt(()=>import("./recommended-BAj0agKu.js"),__vite__mapDeps([2,1,3,4]))),Yy=w.lazy(()=>Dt(()=>import("./plugins-BslRzmVr.js"),__vite__mapDeps([5,1,6,3,4,7,8]))),Jy=w.lazy(()=>Dt(()=>import("./mcp-BX69kbwu.js"),__vite__mapDeps([9,1,6,3,4]))),Gy=w.lazy(()=>Dt(()=>import("./skills-DML4G4BP.js"),__vite__mapDeps([10,1,4,3,8]))),Xy=w.lazy(()=>Dt(()=>import("./commands-DhNv8XVR.js"),__vite__mapDeps([11,1,3,8]))),qy=w.lazy(()=>Dt(()=>import("./settings-CicCcNf_.js"),__vite__mapDeps([12,1,7,3]))),Zy=w.lazy(()=>Dt(()=>import("./profiles-CfOCpDPJ.js"),__vite__mapDeps([13,1,3,7]))),by=w.lazy(()=>Dt(()=>import("./activity-DS5YBWMm.js"),__vite__mapDeps([14,1,4,3])));function e0(){return E.jsxs("div",{className:"animate-pulse space-y-4",children:[E.jsx("div",{className:"h-8 w-48 rounded",style:{backgroundColor:"var(--input-bg)"}}),E.jsx("div",{className:"grid grid-cols-4 gap-4",children:[1,2,3,4].map(e=>E.jsx("div",{className:"h-24 rounded-lg",style:{backgroundColor:"var(--input-bg)"}},e))})]})}function t0(){return E.jsx(Wy,{children:E.jsx(Mm,{})})}function n0(){return E.jsx(w.Suspense,{fallback:E.jsx(e0,{}),children:E.jsxs(Um,{children:[E.jsx(le,{path:"/",element:E.jsx(Ky,{})}),E.jsx(le,{path:"/recommended",element:E.jsx(Qy,{})}),E.jsxs(le,{path:"/config",element:E.jsx(t0,{}),children:[E.jsx(le,{index:!0,element:E.jsx(dt,{to:"/config/plugins",replace:!0})}),E.jsx(le,{path:"plugins",element:E.jsx(Yy,{})}),E.jsx(le,{path:"mcp",element:E.jsx(Jy,{})}),E.jsx(le,{path:"skills",element:E.jsx(Gy,{})}),E.jsx(le,{path:"commands",element:E.jsx(Xy,{})}),E.jsx(le,{path:"settings",element:E.jsx(qy,{})})]}),E.jsx(le,{path:"/profiles",element:E.jsx(Zy,{})}),E.jsx(le,{path:"/activity",element:E.jsx(by,{})}),E.jsx(le,{path:"/plugins",element:E.jsx(dt,{to:"/config/plugins",replace:!0})}),E.jsx(le,{path:"/mcp-servers",element:E.jsx(dt,{to:"/config/mcp",replace:!0})}),E.jsx(le,{path:"/skills",element:E.jsx(dt,{to:"/config/skills",replace:!0})}),E.jsx(le,{path:"/commands",element:E.jsx(dt,{to:"/config/commands",replace:!0})}),E.jsx(le,{path:"/settings",element:E.jsx(dt,{to:"/config/settings",replace:!0})}),E.jsx(le,{path:"/sessions",element:E.jsx(dt,{to:"/activity",replace:!0})}),E.jsx(le,{path:"/export-import",element:E.jsx(dt,{to:"/profiles",replace:!0})}),E.jsx(le,{path:"/metrics",element:E.jsx(dt,{to:"/",replace:!0})}),E.jsx(le,{path:"*",element:E.jsx(dt,{to:"/",replace:!0})})]})})}function r0(){return E.jsxs(E.Fragment,{children:[E.jsx(ky,{}),E.jsxs("div",{style:{display:"flex",minHeight:"100vh"},children:[E.jsx(wy,{}),E.jsx("main",{style:{flex:1,marginLeft:"240px",padding:"24px",backgroundColor:"var(--bg-primary)",minHeight:"100vh"},children:E.jsx(n0,{})})]})]})}const{slice:i0,forEach:o0}=[];function s0(e){return o0.call(i0.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function l0(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const yc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,a0=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!yc.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!yc.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},Sc={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=a0(e,t,i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var u0={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Sc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:o}=t;n&&typeof document<"u"&&Sc.create(n,e,r,i,o)}},c0={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let l=0;l<s.length;l++){const a=s[l].indexOf("=");a>0&&s[l].substring(0,a)===t&&(n=s[l].substring(a+1))}}return n}},f0={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const s=o.substring(1);if(t){const l=s.split("&");for(let a=0;a<l.length;a++){const u=l[a].indexOf("=");u>0&&l[a].substring(0,u)===t&&(r=l[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const l=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let En=null;const wc=()=>{if(En!==null)return En;try{if(En=typeof window<"u"&&window.localStorage!==null,!En)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{En=!1}return En};var d0={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&wc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&wc()&&window.localStorage.setItem(n,e)}};let Cn=null;const xc=()=>{if(Cn!==null)return Cn;try{if(Cn=typeof window<"u"&&window.sessionStorage!==null,!Cn)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Cn=!1}return Cn};var p0={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&xc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&xc()&&window.sessionStorage.setItem(n,e)}},h0={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},g0={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},m0={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},v0={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let up=!1;try{document.cookie,up=!0}catch{}const cp=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];up||cp.splice(1,1);const y0=()=>({order:cp,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class fp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=s0(n,this.options||{},y0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(u0),this.addDetector(c0),this.addDetector(d0),this.addDetector(p0),this.addDetector(h0),this.addDetector(g0),this.addDetector(m0),this.addDetector(v0),this.addDetector(f0)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!l0(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}fp.type="languageDetector";const S0={dashboard:"Dashboard",recommended:"Recommended",configuration:"Configuration",profiles:"Profiles",activity:"Activity",overview:"Overview",config:"Config",sessions:"Sessions",recommend:"Recommend",settings:"Settings",profiles_wip:"Profiles (WIP)"},w0={nav:"nav",enter:"enter",back:"back",switch_focus:"switch focus",filter:"filter",help:"help",quit:"quit"},x0={auto:"Auto",dark:"Dark",light:"Light"},k0={label:"Language",en:"English",zh:"中文"},E0={title:"Overview",plugins:"Plugins",mcpServers:"MCP Servers",skills:"Skills",profiles:"Profiles",sessions:"Sessions",topSkills:"Top Skills",topTools:"Top Tools",recentSessions:"Recent Sessions",environmentHealth:"Environment Health",viewAll:"View all",noData:"No data yet.",hooksNone:"None",active:"{{count}} active",configured:"{{count}} configured",envSet:"{{count}} set",active_profile:"Active profile:",plugins_count:"Plugins: {{n}}",mcps_count:"MCPs: {{n}}",skills_count:"Skills: {{n}}",commands_count:"Commands: {{n}}",recent_sessions:"Recent sessions",dashboard:"Dashboard:",running:"● running",stopped:"○ stopped"},C0={title:"Recommended",subtitle:"AI-powered recommendations based on your setup",emptyTitle:"No recommendations yet",emptyBody:"Click Generate to analyze your installed plugins, MCP servers, and skills and produce personalized suggestions.",generate:"Generate Recommendations",generating:"Generating…",refresh:"Refresh",lastUpdated:"Last updated {{when}}",install:"Install",dismiss:"Dismiss",why:"Why we recommend this",filterAll:"All",filterPlugins:"Plugins",filterMcps:"MCP Servers",filterSkills:"Skills",findMore:"Find More",findMoreBody:"Search skills.sh and MCP registries to discover more tools.",findMorePlaceholder:"Search skills and MCP servers…",findMoreEmpty:"No results. Try a different keyword.",count_title:"Recommended ({{n}})",copy_hint:"c/y:copy install cmd /:filter",empty_title:"No recommendations yet",empty_hint:"Run `/ccm-recommendations` in Claude Code to generate."},P0={tabs:{plugins:"Plugins",mcp:"MCP Servers",skills:"Skills",commands:"Commands",settings:"Settings"},saveToProfile:"Save to Profile",saveDialog:{title:"Save current configuration as profile",body:"Captures a snapshot of your current plugins, MCP servers, skills, commands, and settings.",profileName:"Profile name",descriptionLabel:"Description (optional)",namePlaceholder:"e.g. frontend-dev",descriptionPlaceholder:"Short description…",nameRequired:"Profile name is required",saveFailed:"Failed to save profile",profileSaved:'Profile "{{name}}" saved',clickToView:"— click to view"},plugins:{title:"Plugins ({{n}} installed)",installed:"Installed",marketplace:"Marketplace",manageMarketplaces:"Manage Marketplaces",searchInstalledPlaceholder:"Search installed plugins…",searchAvailablePlaceholder:"Search available plugins…",marketplaceSelectPlaceholder:"Select marketplace…",enabled:"Enabled",disabled:"Disabled",copyCommand:"Click to copy",installNotice:"Plugin install must be run inside Claude Code. The command is copied to your clipboard.",marketplaceStaleNotice:"Dashboard cannot fetch marketplace updates. Run `/plugin marketplace update` in Claude Code — command copied to clipboard.",hint:"space:toggle enter:toggle /:filter ?:help"},mcp:{title:"MCP servers ({{n}})",installed:"Installed",store:"Store",searchInstalledPlaceholder:"Search MCP servers…",searchStorePlaceholder:"Search the MCP store…",install:"Install",installCopyNotice:"Install command copied — paste it into your terminal.",noResults:"No MCP servers match your search.",hint:"space:toggle enter:toggle /:filter"},skills:{title:"Skills ({{n}})",searchPlaceholder:"Search skills…",installed:"Installed",store:"Store",top:"Top",edit:"Edit",preview:"Preview",noResults:"No skills match your search.",hint:"space:toggle enter:toggle /:filter"},commands:{title:"Commands ({{n}}) — read-only in v1",searchPlaceholder:"Search commands…",noResults:"No commands match your search."},settings:{title:"Settings",model:"Model",modelHelp:"Default model used by Claude Code in this project.",modelSelectPlaceholder:"-- Select a model --",modelCustomPlaceholder:"Or type a custom model ID…",hooks:"Hooks",envVars:"Environment Variables",envKeyPlaceholder:"KEY",envValuePlaceholder:"value",envAdd:"Add",envShow:"Show",envHide:"Hide",envRemove:"Remove",noEnv:"No environment variables set.",model_cycle_hint:"(Enter to cycle)",env_copy_hint:"(Enter to copy KEY=value)"}},_0={title:"Profiles",wip_note:"(work in progress)",tabs:{profiles:"Profiles",exportImport:"Export / Import"},emptyTitle:"No saved profiles yet",emptyBody:"Your current configuration is the default. Save it as a profile to switch between setups later.",saveCurrent:"Save Current Configuration"},L0={title:"Sessions",subtitle:"{{running}} running, {{total}} total",recent:"Recent ({{count}})",allSessions:"All Sessions",searchPlaceholder:"Search sessions…",running:"Running",resume:"Resume"},R0={title:"Sessions ({{n}})",filter_hint:"(Enter to confirm, Esc to clear)",no_matches:"(no matches)",no_selected:"(no session selected)",no_history_file:"(no history file)",no_input_history:"(no input history found)",recent_inputs:"Recent inputs",hint:"y:copy resume id /:filter ?:help",status_live:"● live",status_ended:"○ ended",id_prefix:"id: ",copy_ok:"Resume id copied ({{via}})",copy_fail:"Copy failed; install pbcopy/xclip",detail:{name:"Name",project:"Project",session_id:"Session ID",started:"Started",status:"Status"}},N0={title:"TUI preferences",language:"language",theme:"theme",quit_confirm:"quit-confirm",toggle_hint:"(Enter to toggle en ↔ zh)",theme_value:"auto (terminal palette)",quit_value:"off",coming_soon:"TUI inherits terminal palette; coming in v2"},O0={switch_profile_title:"Switch to {{name}}?",switch_profile_body:'Active profile becomes "{{name}}". This rewrites ~/.claude/settings.json.',confirm:"Confirm",cancel:"Cancel"},T0={enabled:"Enabled {{name}}",disabled:"Disabled {{name}}",switched_profile:"Switched to {{name}}",model_set:"Model: {{model}}",language_set:"Language: {{lang}}",copied:"Copied: {{text}}",copy_failed:"Copy failed; install pbcopy/xclip",switch_failed:"Switch failed: {{err}}",failed_toggle:"Failed to toggle {{name}}: {{err}}",failed_generic:"Failed: {{err}}",install_cmd_copied:"Install command copied: {{cmd}}"},j0={close:"Close",cancel:"Cancel",save:"Save",saving:"Saving…",delete:"Delete",confirm:"Confirm",copy:"Copy",copied:"Copied",loading:"Loading…",search:"Search",none:"(none)",unset:"(unset)",no_matches:"(no matches)",loading_lower:"loading…",unknown:"(unknown)"},I0={settings_unreadable:"Settings unreadable: {{message}}",non_tty:"claude-config requires a TTY. Use subcommands for scripted workflows: claude-config --help",too_small:"claude-config TUI requires terminal ≥ {{cols}}×{{rows}}. Resize and retry."},D0={title:"Keymap (Esc to close)"},z0={dashboard:"dashboard",running:"running",stopped:"stopped"},F0={nav:S0,footer:w0,theme:x0,language:k0,overview:E0,recommended:C0,config:P0,profiles:_0,activity:L0,sessions:R0,settings_prefs:N0,modals:O0,toasts:T0,common:j0,errors:I0,help:D0,header:z0},M0={dashboard:"仪表盘",recommended:"推荐",configuration:"配置",profiles:"配置档案",activity:"活动",overview:"概览",config:"配置",sessions:"会话",recommend:"推荐",settings:"设置",profiles_wip:"配置档案 (WIP)"},$0={nav:"导航",enter:"确认",back:"返回",switch_focus:"切换焦点",filter:"过滤",help:"帮助",quit:"退出"},U0={auto:"自动",dark:"暗色",light:"亮色"},A0={label:"语言",en:"English",zh:"中文"},V0={title:"概览",plugins:"插件",mcpServers:"MCP 服务器",skills:"技能",profiles:"配置档案",sessions:"会话",topSkills:"热门技能",topTools:"热门工具",recentSessions:"最近会话",environmentHealth:"环境状态",viewAll:"查看全部",noData:"暂无数据。",hooksNone:"无",active:"{{count}} 个已启用",configured:"{{count}} 个已配置",envSet:"{{count}} 个已设置",active_profile:"当前配置档案:",plugins_count:"插件:{{n}}",mcps_count:"MCP:{{n}}",skills_count:"技能:{{n}}",commands_count:"命令:{{n}}",recent_sessions:"最近会话",dashboard:"仪表盘:",running:"● 运行中",stopped:"○ 已停止"},B0={title:"推荐",subtitle:"基于你的配置生成的 AI 推荐",emptyTitle:"暂无推荐",emptyBody:"点击「生成推荐」分析已安装的插件、MCP 服务器和技能,给出个性化建议。",generate:"生成推荐",generating:"生成中…",refresh:"刷新",lastUpdated:"最近更新 {{when}}",install:"安装",dismiss:"忽略",why:"推荐理由",filterAll:"全部",filterPlugins:"插件",filterMcps:"MCP 服务器",filterSkills:"技能",findMore:"发现更多",findMoreBody:"在 skills.sh 和 MCP 注册表里搜索更多工具。",findMorePlaceholder:"搜索技能和 MCP 服务器…",findMoreEmpty:"没有结果,换个关键词试试。",count_title:"推荐 ({{n}})",copy_hint:"c/y:复制安装命令 /:过滤",empty_title:"暂无推荐",empty_hint:"请在 Claude Code 中运行 `/ccm-recommendations` 以生成推荐。"},H0={tabs:{plugins:"插件",mcp:"MCP 服务器",skills:"技能",commands:"命令",settings:"设置"},saveToProfile:"保存为配置档案",saveDialog:{title:"保存当前配置为配置档案",body:"会为当前的插件、MCP 服务器、技能、命令和设置拍一个快照。",profileName:"档案名称",descriptionLabel:"描述(可选)",namePlaceholder:"例如:frontend-dev",descriptionPlaceholder:"简要说明…",nameRequired:"请填写档案名称",saveFailed:"保存失败",profileSaved:'已保存 "{{name}}"',clickToView:"— 点击查看"},plugins:{title:"插件 (已安装 {{n}})",installed:"已安装",marketplace:"市场",manageMarketplaces:"管理市场",searchInstalledPlaceholder:"搜索已安装的插件…",searchAvailablePlaceholder:"搜索可用的插件…",marketplaceSelectPlaceholder:"选择市场…",enabled:"已启用",disabled:"已禁用",copyCommand:"点击复制",installNotice:"插件安装命令需要在 Claude Code 中执行,已复制到剪贴板。",marketplaceStaleNotice:"Dashboard 无法拉取市场更新。请在 Claude Code 中运行 `/plugin marketplace update`(命令已复制)。",hint:"space:切换 enter:切换 /:过滤 ?:帮助"},mcp:{title:"MCP 服务器 ({{n}})",installed:"已安装",store:"市场",searchInstalledPlaceholder:"搜索 MCP 服务器…",searchStorePlaceholder:"在 MCP 市场中搜索…",install:"安装",installCopyNotice:"安装命令已复制 — 粘贴到终端执行。",noResults:"没有匹配的 MCP 服务器。",hint:"space:切换 enter:切换 /:过滤"},skills:{title:"技能 ({{n}})",searchPlaceholder:"搜索技能…",installed:"已安装",store:"市场",top:"Top",edit:"编辑",preview:"预览",noResults:"没有匹配的技能。",hint:"space:切换 enter:切换 /:过滤"},commands:{title:"命令 ({{n}}) — v1 只读",searchPlaceholder:"搜索命令…",noResults:"没有匹配的命令。"},settings:{title:"设置",model:"模型",modelHelp:"Claude Code 在本项目默认使用的模型。",modelSelectPlaceholder:"-- 选择模型 --",modelCustomPlaceholder:"或输入自定义模型 ID…",hooks:"Hooks",envVars:"环境变量",envKeyPlaceholder:"键名",envValuePlaceholder:"值",envAdd:"添加",envShow:"显示",envHide:"隐藏",envRemove:"删除",noEnv:"尚未设置环境变量。",model_cycle_hint:"(Enter 循环切换)",env_copy_hint:"(Enter 复制 KEY=value)"}},W0={title:"配置档案",wip_note:"(开发中)",tabs:{profiles:"配置档案",exportImport:"导出 / 导入"},emptyTitle:"还没有保存的配置档案",emptyBody:"当前配置就是默认状态。保存为配置档案后即可在不同环境间切换。",saveCurrent:"保存当前配置"},K0={title:"会话",subtitle:"{{running}} 个运行中,共 {{total}} 个",recent:"最近 ({{count}})",allSessions:"全部会话",searchPlaceholder:"搜索会话…",running:"运行中",resume:"恢复"},Q0={title:"会话 ({{n}})",filter_hint:"(Enter 确认,Esc 清除)",no_matches:"(无匹配)",no_selected:"(未选择会话)",no_history_file:"(无历史文件)",no_input_history:"(没有输入历史)",recent_inputs:"最近输入",hint:"y:复制恢复 ID /:过滤 ?:帮助",status_live:"● 运行中",status_ended:"○ 已结束",id_prefix:"id:",copy_ok:"恢复 ID 已复制 ({{via}})",copy_fail:"复制失败;请安装 pbcopy/xclip",detail:{name:"名称",project:"项目",session_id:"会话 ID",started:"启动时间",status:"状态"}},Y0={title:"TUI 偏好设置",language:"语言",theme:"主题",quit_confirm:"退出确认",toggle_hint:"(Enter 切换 en ↔ zh)",theme_value:"自动(终端调色板)",quit_value:"关",coming_soon:"TUI 继承终端配色;v2 支持"},J0={switch_profile_title:"切换到 {{name}}?",switch_profile_body:"当前配置档案将变为「{{name}}」,这会重写 ~/.claude/settings.json。",confirm:"确认",cancel:"取消"},G0={enabled:"已启用 {{name}}",disabled:"已禁用 {{name}}",switched_profile:"已切换到 {{name}}",model_set:"模型:{{model}}",language_set:"语言:{{lang}}",copied:"已复制:{{text}}",copy_failed:"复制失败;请安装 pbcopy/xclip",switch_failed:"切换失败:{{err}}",failed_toggle:"切换 {{name}} 失败:{{err}}",failed_generic:"失败:{{err}}",install_cmd_copied:"安装命令已复制:{{cmd}}"},X0={close:"关闭",cancel:"取消",save:"保存",saving:"保存中…",delete:"删除",confirm:"确认",copy:"复制",copied:"已复制",loading:"加载中…",search:"搜索",none:"(无)",unset:"(未设置)",no_matches:"(无匹配)",loading_lower:"加载中…",unknown:"(未知)"},q0={settings_unreadable:"设置不可读:{{message}}",non_tty:"claude-config 需要 TTY。请使用子命令进行脚本化工作流:claude-config --help",too_small:"claude-config TUI 需要终端 ≥ {{cols}}×{{rows}},请调整窗口大小后重试。"},Z0={title:"快捷键(Esc 关闭)"},b0={dashboard:"仪表盘",running:"运行中",stopped:"已停止"},eS={nav:M0,footer:$0,theme:U0,language:A0,overview:V0,recommended:B0,config:H0,profiles:W0,activity:K0,sessions:Q0,settings_prefs:Y0,modals:J0,toasts:G0,common:X0,errors:q0,help:Z0,header:b0},kc={en:F0,zh:eS};Oe.use(fp).use(py).init({resources:{en:{translation:kc.en},zh:{translation:kc.zh}},fallbackLng:"en",supportedLngs:["en","zh"],load:"languageOnly",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],lookupLocalStorage:"ccm-lang",caches:["localStorage"]}});vs.createRoot(document.getElementById("root")).render(E.jsx(ei.StrictMode,{children:E.jsx(Qm,{children:E.jsx(qm,{children:E.jsx(r0,{})})})}));export{fS as A,ms as B,pS as C,RS as D,lS as E,sS as F,aS as G,uS as H,SS as I,wS as J,By as K,vS as L,yS as M,TS as N,nS as O,vp as P,Dt as _,OS as a,Pa as b,NS as c,CS as d,jS as e,zS as f,ES as g,gS as h,Wg as i,E as j,cS as k,PS as l,IS as m,DS as n,rS as o,xS as p,kS as q,w as r,dS as s,iS as t,ap as u,_S as v,oS as w,hS as x,mS as y,LS as z};
|
|
76
|
+
*/var Zn=w;function bm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ev=typeof Object.is=="function"?Object.is:bm,tv=Zn.useState,nv=Zn.useEffect,rv=Zn.useLayoutEffect,iv=Zn.useDebugValue;function ov(e,t){var n=t(),r=tv({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return rv(function(){i.value=n,i.getSnapshot=t,ss(i)&&o({inst:i})},[e,n,t]),nv(function(){return ss(i)&&o({inst:i}),e(function(){ss(i)&&o({inst:i})})},[e]),iv(n),n}function ss(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ev(e,n)}catch{return!0}}function sv(e,t){return t()}var lv=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sv:ov;Jd.useSyncExternalStore=Zn.useSyncExternalStore!==void 0?Zn.useSyncExternalStore:lv;Yd.exports=Jd;var pl=Yd.exports;const Gd=0,Xd=1,qd=2,qu=3;var Zu=Object.prototype.hasOwnProperty;function hl(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&hl(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Zu.call(e,n)&&++r&&!Zu.call(t,n)||!(n in t)||!hl(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Et=new WeakMap,_t=()=>{},Ee=_t(),gl=Object,A=e=>e===Ee,gt=e=>typeof e=="function",en=(e,t)=>({...e,...t}),Zd=e=>gt(e.then),ls={},Ei={},_a="undefined",oi=typeof window!=_a,ml=typeof document!=_a,av=oi&&"Deno"in window,uv=()=>oi&&typeof window.requestAnimationFrame!=_a,bd=(e,t)=>{const n=Et.get(e);return[()=>!A(t)&&e.get(t)||ls,r=>{if(!A(t)){const i=e.get(t);t in Ei||(Ei[t]=i),n[5](t,en(i,r),i||ls)}},n[6],()=>!A(t)&&t in Ei?Ei[t]:!A(t)&&e.get(t)||ls]};let vl=!0;const cv=()=>vl,[yl,Sl]=oi&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[_t,_t],fv=()=>{const e=ml&&document.visibilityState;return A(e)||e!=="hidden"},dv=e=>(ml&&document.addEventListener("visibilitychange",e),yl("focus",e),()=>{ml&&document.removeEventListener("visibilitychange",e),Sl("focus",e)}),pv=e=>{const t=()=>{vl=!0,e()},n=()=>{vl=!1};return yl("online",t),yl("offline",n),()=>{Sl("online",t),Sl("offline",n)}},hv={isOnline:cv,isVisible:fv},gv={initFocus:dv,initReconnect:pv},bu=!ei.useId,Hn=!oi||av,mv=e=>uv()?window.requestAnimationFrame(e):setTimeout(e,1),as=Hn?w.useEffect:w.useLayoutEffect,us=typeof navigator<"u"&&navigator.connection,ec=!Hn&&us&&(["slow-2g","2g"].includes(us.effectiveType)||us.saveData),Ci=new WeakMap,vv=e=>gl.prototype.toString.call(e),cs=(e,t)=>e===`[object ${t}]`;let yv=0;const wl=e=>{const t=typeof e,n=vv(e),r=cs(n,"Date"),i=cs(n,"RegExp"),o=cs(n,"Object");let s,l;if(gl(e)===e&&!r&&!i){if(s=Ci.get(e),s)return s;if(s=++yv+"~",Ci.set(e,s),Array.isArray(e)){for(s="@",l=0;l<e.length;l++)s+=wl(e[l])+",";Ci.set(e,s)}if(o){s="#";const a=gl.keys(e).sort();for(;!A(l=a.pop());)A(e[l])||(s+=l+":"+wl(e[l])+",");Ci.set(e,s)}}else s=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},La=e=>{if(gt(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?wl(e):"",[e,t]};let Sv=0;const xl=()=>++Sv;async function ep(...e){const[t,n,r,i]=e,o=en({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let s=o.populateCache;const l=o.rollbackOnError;let a=o.optimisticData;const u=p=>typeof l=="function"?l(p):l!==!1,d=o.throwOnError;if(gt(n)){const p=n,v=[],m=t.keys();for(const y of m)!/^\$(inf|sub)\$/.test(y)&&p(t.get(y)._k)&&v.push(y);return Promise.all(v.map(c))}return c(n);async function c(p){const[v]=La(p);if(!v)return;const[m,y]=bd(t,v),[k,g,f,h]=Et.get(t),S=()=>{const F=k[v];return(gt(o.revalidate)?o.revalidate(m().data,p):o.revalidate!==!1)&&(delete f[v],delete h[v],F&&F[0])?F[0](qd).then(()=>m().data):m().data};if(e.length<3)return S();let x=r,_,P=!1;const R=xl();g[v]=[R,0];const T=!A(a),O=m(),Q=O.data,M=O._c,j=A(M)?Q:M;if(T&&(a=gt(a)?a(j,Q):a,y({data:a,_c:j})),gt(x))try{x=x(j)}catch(F){_=F,P=!0}if(x&&Zd(x))if(x=await x.catch(F=>{_=F,P=!0}),R!==g[v][0]){if(P)throw _;return x}else P&&T&&u(_)&&(s=!0,y({data:j,_c:Ee}));if(s&&!P)if(gt(s)){const F=s(x,j);y({data:F,error:Ee,_c:Ee})}else y({data:x,error:Ee,_c:Ee});if(g[v][1]=xl(),Promise.resolve(S()).then(()=>{y({_c:Ee})}),P){if(d)throw _;return}return x}}const tc=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},wv=(e,t)=>{if(!Et.has(e)){const n=en(gv,t),r=Object.create(null),i=ep.bind(Ee,e);let o=_t;const s=Object.create(null),l=(d,c)=>{const p=s[d]||[];return s[d]=p,p.push(c),()=>p.splice(p.indexOf(c),1)},a=(d,c,p)=>{e.set(d,c);const v=s[d];if(v)for(const m of v)m(c,p)},u=()=>{if(!Et.has(e)&&(Et.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,a,l]),!Hn)){const d=n.initFocus(setTimeout.bind(Ee,tc.bind(Ee,r,Gd))),c=n.initReconnect(setTimeout.bind(Ee,tc.bind(Ee,r,Xd)));o=()=>{d&&d(),c&&c(),Et.delete(e)}}};return u(),[e,i,u,o]}return[e,Et.get(e)[4]]},xv=(e,t,n,r,i)=>{const o=n.errorRetryCount,s=i.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!A(o)&&s>o||setTimeout(r,l,i)},kv=hl,[tp,Je]=wv(new Map),Ev=en({onLoadingSlow:_t,onSuccess:_t,onError:_t,onErrorRetry:xv,onDiscarded:_t,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ec?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ec?5e3:3e3,compare:kv,isPaused:()=>!1,cache:tp,mutate:Je,fallback:{}},hv),Cv=(e,t)=>{const n=en(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:s}=t;r&&o&&(n.use=r.concat(o)),i&&s&&(n.fallback=en(i,s))}return n},Pv=w.createContext({}),_v="$inf$",np=oi&&window.__SWR_DEVTOOLS_USE__,Lv=np?window.__SWR_DEVTOOLS_USE__:[],Rv=()=>{np&&(window.__SWR_DEVTOOLS_REACT__=ei)},Nv=e=>gt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ov=()=>{const e=w.useContext(Pv);return w.useMemo(()=>en(Ev,e),[e])},Tv=e=>(t,n,r)=>e(t,n&&((...o)=>{const[s]=La(t),[,,,l]=Et.get(tp);if(s.startsWith(_v))return n(...o);const a=l[s];return A(a)?n(...o):(delete l[s],a)}),r),jv=Lv.concat(Tv),Iv=e=>function(...n){const r=Ov(),[i,o,s]=Nv(n),l=Cv(r,s);let a=e;const{use:u}=l,d=(u||[]).concat(jv);for(let c=d.length;c--;)a=d[c](a);return a(i,o||l.fetcher||null,l)},Dv=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};Rv();const fs=ei.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),ds={dedupe:!0},nc=Promise.resolve(Ee),zv=()=>_t,Fv=(e,t,n)=>{const{cache:r,compare:i,suspense:o,fallbackData:s,revalidateOnMount:l,revalidateIfStale:a,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:c,keepPreviousData:p,strictServerPrefetchWarning:v}=n,[m,y,k,g]=Et.get(r),[f,h]=La(e),S=w.useRef(!1),x=w.useRef(!1),_=w.useRef(f),P=w.useRef(t),R=w.useRef(n),T=()=>R.current,O=()=>T().isVisible()&&T().isOnline(),[Q,M,j,F]=bd(r,f),Y=w.useRef({}).current,H=A(s)?A(n.fallback)?Ee:n.fallback[f]:s,re=(J,ie)=>{for(const oe in Y){const se=oe;if(se==="data"){if(!i(J[se],ie[se])&&(!A(J[se])||!i(We,ie[se])))return!1}else if(ie[se]!==J[se])return!1}return!0},L=!S.current,I=w.useMemo(()=>{const J=Q(),ie=F(),oe=fe=>{const tt=en(fe);return delete tt._k,(()=>{if(!f||!t||T().isPaused())return!1;if(L&&!A(l))return l;const lr=A(H)?tt.data:H;return A(lr)||a})()?{isValidating:!0,isLoading:!0,...tt}:tt},se=oe(J),ct=J===ie?se:oe(ie);let Qe=se;return[()=>{const fe=oe(Q());return re(fe,Qe)?(Qe.data=fe.data,Qe.isLoading=fe.isLoading,Qe.isValidating=fe.isValidating,Qe.error=fe.error,Qe):(Qe=fe,fe)},()=>ct]},[r,f]),D=pl.useSyncExternalStore(w.useCallback(J=>j(f,(ie,oe)=>{re(oe,ie)||J()}),[r,f]),I[0],I[1]),$=m[f]&&m[f].length>0,V=D.data,he=A(V)?H&&Zd(H)?fs(H):H:V,Pe=D.error,ut=w.useRef(he),We=p?A(V)?A(ut.current)?he:ut.current:V:he,Ke=f&&A(he),ir=w.useRef(null);!Hn&&pl.useSyncExternalStore(zv,()=>(ir.current=!1,ir),()=>(ir.current=!0,ir));const dp=ir.current;v&&dp&&!o&&Ke&&console.warn(`Missing pre-initiated data for serialized key "${f}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const Ra=!f||!t||T().isPaused()||$&&!A(Pe)?!1:L&&!A(l)?l:o?A(he)?!1:a:A(he)||a,Na=L&&Ra,pp=A(D.isValidating)?Na:D.isValidating,hp=A(D.isLoading)?Na:D.isLoading,or=w.useCallback(async J=>{const ie=P.current;if(!f||!ie||x.current||T().isPaused())return!1;let oe,se,ct=!0;const Qe=J||{},fe=!k[f]||!Qe.dedupe,tt=()=>bu?!x.current&&f===_.current&&S.current:f===_.current,sr={isValidating:!1,isLoading:!1},lr=()=>{M(sr)},Ta=()=>{const Ye=k[f];Ye&&Ye[1]===se&&delete k[f]},ja={isValidating:!0};A(Q().data)&&(ja.isLoading=!0);try{if(fe&&(M(ja),n.loadingTimeout&&A(Q().data)&&setTimeout(()=>{ct&&tt()&&T().onLoadingSlow(f,n)},n.loadingTimeout),k[f]=[ie(h),xl()]),[oe,se]=k[f],oe=await oe,fe&&setTimeout(Ta,n.dedupingInterval),!k[f]||k[f][1]!==se)return fe&&tt()&&T().onDiscarded(f),!1;sr.error=Ee;const Ye=y[f];if(!A(Ye)&&(se<=Ye[0]||se<=Ye[1]||Ye[1]===0))return lr(),fe&&tt()&&T().onDiscarded(f),!1;const St=Q().data;sr.data=i(St,oe)?St:oe,fe&&tt()&&T().onSuccess(oe,f,n)}catch(Ye){Ta();const St=T(),{shouldRetryOnError:To}=St;St.isPaused()||(sr.error=Ye,fe&&tt()&&(St.onError(Ye,f,St),(To===!0||gt(To)&&To(Ye))&&(!T().revalidateOnFocus||!T().revalidateOnReconnect||O())&&St.onErrorRetry(Ye,f,St,gp=>{const jo=m[f];jo&&jo[0]&&jo[0](qu,gp)},{retryCount:(Qe.retryCount||0)+1,dedupe:!0})))}return ct=!1,lr(),!0},[f,r]),Oa=w.useCallback((...J)=>ep(r,_.current,...J),[]);if(as(()=>{P.current=t,R.current=n,A(V)||(ut.current=V)}),as(()=>{if(!f)return;const J=or.bind(Ee,ds);let ie=0;T().revalidateOnFocus&&(ie=Date.now()+T().focusThrottleInterval);const se=Dv(f,m,(ct,Qe={})=>{if(ct==Gd){const fe=Date.now();T().revalidateOnFocus&&fe>ie&&O()&&(ie=fe+T().focusThrottleInterval,J())}else if(ct==Xd)T().revalidateOnReconnect&&O()&&J();else{if(ct==qd)return or();if(ct==qu)return or(Qe)}});return x.current=!1,_.current=f,S.current=!0,M({_k:h}),Ra&&(k[f]||(A(he)||Hn?J():mv(J))),()=>{x.current=!0,se()}},[f]),as(()=>{let J;function ie(){const se=gt(u)?u(Q().data):u;se&&J!==-1&&(J=setTimeout(oe,se))}function oe(){!Q().error&&(d||T().isVisible())&&(c||T().isOnline())?or(ds).then(ie):ie()}return ie(),()=>{J&&(clearTimeout(J),J=-1)}},[u,d,c,f]),w.useDebugValue(We),o){if(!bu&&Hn&&Ke)throw new Error("Fallback data is required when using Suspense in SSR.");Ke&&(P.current=t,R.current=n,x.current=!1);const J=g[f],ie=!A(J)&&Ke?Oa(J):nc;if(fs(ie),!A(Pe)&&Ke)throw Pe;const oe=Ke?or(ds):nc;!A(We)&&Ke&&(oe.status="fulfilled",oe.value=!0),fs(oe)}return{mutate:Oa,get data(){return Y.data=!0,We},get error(){return Y.error=!0,Pe},get isValidating(){return Y.isValidating=!0,pp},get isLoading(){return Y.isLoading=!0,hp}}},Fe=Iv(Fv),z=e=>typeof e=="string",mr=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},rc=e=>e==null?"":String(e),Mv=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},$v=/###/g,ic=e=>e&&e.includes("###")?e.replace($v,"."):e,oc=e=>!e||z(e),Or=(e,t,n)=>{const r=z(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(oc(e))return{};const o=ic(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return oc(e)?{}:{obj:e,k:ic(r[i])}},sc=(e,t,n)=>{const{obj:r,k:i}=Or(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),l=Or(e,s,Object);for(;l.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),l=Or(e,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},Uv=(e,t,n,r)=>{const{obj:i,k:o}=Or(e,t,Object);i[o]=i[o]||[],i[o].push(n)},uo=(e,t)=>{const{obj:n,k:r}=Or(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Av=(e,t,n)=>{const r=uo(e,n);return r!==void 0?r:uo(t,n)},rp=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?z(e[r])||e[r]instanceof String||z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):rp(e[r],t[r],n):e[r]=t[r]);return e},wt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Vv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Bv=e=>z(e)?e.replace(/[&<>"'\/]/g,t=>Vv[t]):e;class Hv{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Wv=[" ",",","?","!",";"],Kv=new Hv(20),Qv=(e,t,n)=>{t=t||"",n=n||"";const r=Wv.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const i=Kv.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},kl=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let s,l="";for(let a=o;a<r.length;++a)if(a!==o&&(l+=n),l+=r[a],s=i[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&a<r.length-1)continue;o+=a-o+1;break}i=s}return i},Zr=e=>e==null?void 0:e.replace(/_/g,"-"),Yv={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class co{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Yv,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(t=t.map(o=>z(o)?o.replace(/[\r\n\x00-\x1F\x7F]/g," "):o),z(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new co(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new co(this.logger,t)}}var mt=new co;class Oo{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...i)=>{n(...i),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let s=0;s<o;s++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,o])=>{for(let s=0;s<o;s++)i(t,...n)})}}class lc extends Oo{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var u,d;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.includes(".")?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):z(r)&&o?l.push(...r.split(o)):l.push(r)));const a=uo(this.data,l);return!a&&!n&&!r&&t.includes(".")&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!s||!z(r)?a:kl((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(s?r.split(s):r)),t.includes(".")&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),sc(this.data,l,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(z(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,s={silent:!1,skipCopy:!1}){let l=[t,n];t.includes(".")&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let a=uo(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?rp(a,r,o):a={...a,...r},sc(this.data,l,a),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var ip={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var s;t=((s=this.processors[o])==null?void 0:s.process(t,n,r,i))??t}),t}};const op=Symbol("i18next/PATH_KEY");function Jv(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>{var o;return(o=n==null?void 0:n.revoke)==null||o.call(n),i===op?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Wn(e,t){const{[op]:n}=e(Jv()),r=(t==null?void 0:t.keySeparator)??".",i=(t==null?void 0:t.nsSeparator)??":";if(n.length>1&&i){const o=t==null?void 0:t.ns,s=Array.isArray(o)?o:null;if(s&&s.length>1&&s.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}const ps=e=>!z(e)&&typeof e!="boolean"&&typeof e!="number";class fo extends Oo{constructor(t,n={}){super(),Mv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=mt.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if((i==null?void 0:i.res)===void 0)return!1;const o=ps(i.res);return!(r.returnObjects===!1&&o)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Qv(t,r,i);if(s&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:z(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.includes(u[0]))&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:z(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=Wn(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(j=>typeof j=="function"?Wn(j,{...this.options,...i}):String(j));const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:a}=this.extractFromKey(t[t.length-1],i),u=a[a.length-1];let d=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const c=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?o?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${d}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:l;const v=this.resolve(t,i);let m=v==null?void 0:v.res;const y=(v==null?void 0:v.usedKey)||l,k=(v==null?void 0:v.exactUsedKey)||l,g=["[object Number]","[object Function]","[object RegExp]"],f=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,h=!this.i18nFormat||this.i18nFormat.handleAsObject,S=i.count!==void 0&&!z(i.count),x=fo.hasDefaultValue(i),_=S?this.pluralResolver.getSuffix(c,i.count,i):"",P=i.ordinal&&S?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",R=S&&!i.ordinal&&i.count===0,T=R&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${_}`]||i[`defaultValue${P}`]||i.defaultValue;let O=m;h&&!m&&x&&(O=T);const Q=ps(O),M=Object.prototype.toString.apply(O);if(h&&O&&Q&&!g.includes(M)&&!(z(f)&&Array.isArray(O))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,O,{...i,ns:a}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(v.res=j,v.usedParams=this.getUsedParamsDetails(i),v):j}if(s){const j=Array.isArray(O),F=j?[]:{},Y=j?k:y;for(const H in O)if(Object.prototype.hasOwnProperty.call(O,H)){const re=`${Y}${s}${H}`;x&&!m?F[H]=this.translate(re,{...i,defaultValue:ps(T)?T[H]:void 0,joinArrays:!1,ns:a}):F[H]=this.translate(re,{...i,joinArrays:!1,ns:a}),F[H]===re&&(F[H]=O[H])}m=F}}else if(h&&z(f)&&Array.isArray(m))m=m.join(f),m&&(m=this.extendTranslation(m,t,i,r));else{let j=!1,F=!1;!this.isValidLookup(m)&&x&&(j=!0,m=T),this.isValidLookup(m)||(F=!0,m=l);const H=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:m,re=x&&T!==m&&this.options.updateMissing;if(F||j||re){if(this.logger.log(re?"updateKey":"missingKey",c,u,l,re?T:m),s){const $=this.resolve(l,{...i,keySeparator:!1});$&&$.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 L=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let $=0;$<I.length;$++)L.push(I[$]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(i.lng||this.language):L.push(i.lng||this.language);const D=($,V,he)=>{var ut;const Pe=x&&he!==m?he:H;this.options.missingKeyHandler?this.options.missingKeyHandler($,u,V,Pe,re,i):(ut=this.backendConnector)!=null&&ut.saveMissing&&this.backendConnector.saveMissing($,u,V,Pe,re,i),this.emit("missingKey",$,u,V,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?L.forEach($=>{const V=this.pluralResolver.getSuffixes($,i);R&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!V.includes(`${this.options.pluralSeparator}zero`)&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(he=>{D([$],l+he,i[`defaultValue${he}`]||T)})}):D(L,l,T))}m=this.extendTranslation(m,t,i,v,r),F&&m===l&&this.options.appendNamespaceToMissingKey&&(m=`${u}${d}${l}`),(F||j)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,j?m:void 0,i))}return o?(v.res=m,v.usedParams=this.getUsedParamsDetails(i),v):m}extendTranslation(t,n,r,i,o){var a,u;if((a=this.i18nFormat)!=null&&a.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=z(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(d){const v=t.match(this.interpolator.nestingRegexp);c=v&&v.length}let p=r.replace&&!z(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),d){const v=t.match(this.interpolator.nestingRegexp),m=v&&v.length;c<m&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...v)=>(o==null?void 0:o[0])===v[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):this.translate(...v,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=z(s)?[s]:s;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=ip.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,s,l;return z(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(a=>typeof a=="function"?Wn(a,{...this.options,...n}):a)),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),d=u.key;i=d;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=n.count!==void 0&&!z(n.count),v=p&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(z(n.context)||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);c.forEach(k=>{var g,f;this.isValidLookup(r)||(l=k,!this.checkedLoadedFor[`${y[0]}-${k}`]&&((g=this.utils)!=null&&g.hasLoadedNamespace)&&!((f=this.utils)!=null&&f.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${y[0]}-${k}`]=!0,this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),y.forEach(h=>{var _;if(this.isValidLookup(r))return;s=h;const S=[d];if((_=this.i18nFormat)!=null&&_.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,h,k,n);else{let P;p&&(P=this.pluralResolver.getSuffix(h,n.count,n));const R=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&P.startsWith(T)&&S.push(d+P.replace(T,this.options.pluralSeparator)),S.push(d+P),v&&S.push(d+R)),m){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),p&&(n.ordinal&&P.startsWith(T)&&S.push(O+P.replace(T,this.options.pluralSeparator)),S.push(O+P),v&&S.push(O+R))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(o=x,r=this.getResource(h,k,x,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!z(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class ac{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mt.create("languageUtils")}getScriptPartFromCode(t){if(t=Zr(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Zr(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(z(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>s===o?!0:!s.includes("-")&&!o.includes("-")?!1:!!(s.includes("-")&&!o.includes("-")&&s.slice(0,s.indexOf("-"))===o||s.startsWith(o)&&o.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),z(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return z(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):z(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.includes(s)||o(this.formatLanguageCode(s))}),i}}const uc={zero:0,one:1,two:2,few:3,many:4,other:5},cc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Gv{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=mt.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Zr(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),cc;if(!t.match(/-|_/))return cc;const a=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(a,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>uc[i]-uc[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const fc=(e,t,n,r=".",i=!0)=>{let o=Av(e,t,n);return!o&&i&&z(n)&&(o=kl(e,n,r),o===void 0&&(o=kl(t,n,r))),o},hs=e=>e.replace(/\$/g,"$$$$");class dc{constructor(t={}){var n;this.logger=mt.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:d,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:v,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:k,maxReplaces:g,alwaysFormat:f}=t.interpolation;this.escape=n!==void 0?n:Bv,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?wt(o):s||"{{",this.suffix=l?wt(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":c?wt(c):"-",this.unescapeSuffix=this.unescapePrefix?"":d?wt(d):"",this.nestingPrefix=p?wt(p):v||wt("$t("),this.nestingSuffix=m?wt(m):y||wt(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=g||1e3,this.alwaysFormat=f!==void 0?f:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var v;let o,s,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(!m.includes(this.formatSeparator)){const f=fc(n,a,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(f,void 0,r,{...i,...n,interpolationkey:m}):f}const y=m.split(this.formatSeparator),k=y.shift().trim(),g=y.join(this.formatSeparator).trim();return this.format(fc(n,a,k,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...i,...n,interpolationkey:k})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((v=i==null?void 0:i.interpolation)==null?void 0:v.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>hs(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?hs(this.escape(m)):hs(m)}].forEach(m=>{for(l=0;o=m.regex.exec(t);){const y=o[1].trim();if(s=u(y),s===void 0)if(typeof d=="function"){const g=d(t,o,i);s=z(g)?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,y))s="";else if(c){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),s="";else!z(s)&&!this.useRawValueToEscape&&(s=rc(s));const k=m.safeValue(s);if(t=t.replace(o[0],k),c?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,s;const l=(a,u)=>{const d=this.nestingOptionsSeparator;if(!a.includes(d))return a;const c=a.split(new RegExp(`${wt(d)}[ ]*{`));let p=`{${c[1]}`;a=c[0],p=this.interpolate(p,s);const v=p.match(/'/g),m=p.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),u&&(s={...u,...s})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,y),`${a}${d}${p}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,a};for(;i=this.nestingRegexp.exec(t);){let a=[];s={...r},s=s.replace&&!z(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(a=i[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),o=n(l.call(this,i[1].trim(),s),s),o&&i[0]===t&&!z(o))return o;z(o)||(o=rc(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce((d,c)=>this.format(d,c,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const Xv=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].slice(0,-1);t==="currency"&&!i.includes(":")?n.currency||(n.currency=i.trim()):t==="relativetime"&&!i.includes(":")?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...a]=s.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},pc=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let l=t[s];return l||(l=e(Zr(r),i),t[s]=l),l(n)}},qv=e=>(t,n,r)=>e(Zr(n),r)(t);class Zv{constructor(t={}){this.logger=mt.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?pc:qv;this.formats={number:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o});return l=>s.format(l)}),currency:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o,style:"currency"});return l=>s.format(l)}),datetime:r((i,o)=>{const s=new Intl.DateTimeFormat(i,{...o});return l=>s.format(l)}),relativetime:r((i,o)=>{const s=new Intl.RelativeTimeFormat(i,{...o});return l=>s.format(l,o.range||"day")}),list:r((i,o)=>{const s=new Intl.ListFormat(i,{...o});return l=>s.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=pc(n)}format(t,n,r,i={}){if(!n||t==null)return t;const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&!o[0].includes(")")&&o.find(l=>l.includes(")"))){const l=o.findIndex(a=>a.includes(")"));o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{var c;const{formatName:u,formatOptions:d}=Xv(a);if(this.formats[u]){let p=l;try{const v=((c=i==null?void 0:i.formatParams)==null?void 0:c[i.interpolationkey])||{},m=v.locale||v.lng||i.locale||i.lng||r;p=this.formats[u](l,m,{...d,...i,...v})}catch(v){this.logger.warn(v)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const bv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class ey extends Oo{constructor(t,n,r,i={}){var o,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=mt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},l={},a={};return t.forEach(u=>{let d=!0;n.forEach(c=>{const p=`${u}|${c}`;!r.reload&&this.store.hasResourceBundle(u,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,d=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),a[c]===void 0&&(a[c]=!0)))}),d||(l[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{Uv(a.loaded,[o],s),bv(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const d=a.loaded[u];d.length&&d.forEach(c=>{l[u][c]===void 0&&(l[u][c]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r,i=0,o=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&d&&i<this.maxRetries){setTimeout(()=>{this.read(t,n,r,i+1,o*2,s)},o);return}s(u,d)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();z(t)&&(t=this.languageUtils.toResolveHierarchy(t)),z(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,l),this.loaded(t,s,l)})}saveMissing(t,n,r,i,o,s={},l=()=>{}){var a,u,d,c,p;if((u=(a=this.services)==null?void 0:a.utils)!=null&&u.hasLoadedNamespace&&!((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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((p=this.backend)!=null&&p.create){const v={...s,isUpdate:o},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(t,n,r,i,v):y=m(t,n,r,i),y&&typeof y.then=="function"?y.then(k=>l(null,k)).catch(l):l(null,y)}catch(y){l(y)}else m(t,n,r,i,l,v)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const gs=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),z(e[1])&&(t.defaultValue=e[1]),z(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),hc=e=>(z(e.ns)&&(e.ns=[e.ns]),z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Pi=()=>{},ty=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Tr extends Oo{constructor(t={},n){if(super(),this.options=hc(t),this.services={},this.logger=mt,this.modules={external:[]},ty(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(z(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=gs();this.options={...r,...this.options,...hc(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?mt.init(i(this.modules.logger),this.options):mt.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Zv;const d=new ac(this.options);this.store=new lc(this.options.resources,this.options);const c=this.services;c.logger=mt,c.resourceStore=this.store,c.languageUtils=d,c.pluralResolver=new Gv(d,{prepend:this.options.pluralSeparator}),u&&(c.formatter=i(u),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new dc(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new ey(i(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(p,...v)=>{this.emit(p,...v)}),this.modules.languageDetector&&(c.languageDetector=i(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=i(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new fo(this.services,this.options),this.translator.on("*",(p,...v)=>{this.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Pi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=mr(),a=()=>{const u=(d,c)=>{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),l.resolve(c),n(d,c)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),l}loadResources(t,n=Pi){var o,s;let r=n;const i=z(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(c=>{c!=="cimode"&&(l.includes(c)||l.push(c))})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>a(d)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,u=>a(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=mr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Pi),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&ip.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=mr();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,a)=>{a?this.isLanguageChangingTo===t&&(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},s=l=>{var d,c;!t&&!l&&this.services.languageDetector&&(l=[]);const a=z(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(z(l)?[l]:l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(c=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||c.call(d,u)),this.loadResources(u,p=>{o(p,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r){const i=(o,s,...l)=>{let a;typeof s!="object"?a=this.options.overloadTranslationOptionHandler([o,s].concat(l)):a={...s},a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix!==""&&(a.keyPrefix=a.keyPrefix||r||i.keyPrefix);const u={...this.options,...a};typeof a.keyPrefix=="function"&&(a.keyPrefix=Wn(a.keyPrefix,u));const d=this.options.keySeparator||".";let c;return a.keyPrefix&&Array.isArray(o)?c=o.map(p=>(typeof p=="function"&&(p=Wn(p,u)),`${a.keyPrefix}${d}${p}`)):(typeof o=="function"&&(o=Wn(o,u)),c=a.keyPrefix?`${a.keyPrefix}${d}${o}`:o),this.t(c,a)};return z(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){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=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=mr();return this.options.ns?(z(t)&&(t=[t]),t.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=mr();z(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>!i.includes(s)&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["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=((o=this.services)==null?void 0:o.languageUtils)||new ac(gs());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Tr(t,n);return r.createInstance=Tr.createInstance,r}cloneInstance(t={},n=Pi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Tr(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const l=Object.keys(this.store.data).reduce((a,u)=>(a[u]={...this.store.data[u]},a[u]=Object.keys(a[u]).reduce((d,c)=>(d[c]={...a[u][c]},d),a[u]),a),{});o.store=new lc(l,i),o.services.resourceStore=o.store}if(t.interpolation){const a={...gs().interpolation,...this.options.interpolation,...t.interpolation},u={...i,interpolation:a};o.services.interpolator=new dc(u)}return o.translator=new fo(o.services,i),o.translator.on("*",(l,...a)=>{o.emit(l,...a)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Oe=Tr.createInstance();Oe.createInstance;Oe.dir;Oe.init;Oe.loadResources;Oe.reloadResources;Oe.use;Oe.changeLanguage;Oe.getFixedT;Oe.t;Oe.exists;Oe.setDefaultNamespace;Oe.hasLoadedNamespace;Oe.loadNamespaces;Oe.loadLanguages;const ny=(e,t,n,r)=>{var o,s,l,a;const i=[n,{code:t,...r||{}}];if((s=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&s.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);yn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(a=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&a.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},gc={},El=(e,t,n,r)=>{yn(n)&&gc[n]||(yn(n)&&(gc[n]=new Date),ny(e,t,n,r))},sp=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Cl=(e,t,n)=>{e.loadNamespaces(t,sp(e,n))},mc=(e,t,n,r)=>{if(yn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Cl(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,sp(e,r))},ry=(e,t,n={})=>!t.languages||!t.languages.length?(El(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),yn=e=>typeof e=="string",iy=e=>typeof e=="object"&&e!==null,oy=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,sy={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ly=e=>sy[e],ay=e=>e.replace(oy,ly);let Pl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ay,transDefaultProps:void 0};const uy=(e={})=>{Pl={...Pl,...e}},cy=()=>Pl;let lp;const fy=e=>{lp=e},dy=()=>lp,py={type:"3rdParty",init(e){uy(e.options.react),fy(e)}},hy=w.createContext();class gy{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const my=(e,t)=>{if(yn(t))return t;if(iy(t)&&yn(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},vy={t:my,ready:!1},yy=()=>()=>{},ap=(e,t={})=>{var T,O,Q;const{i18n:n}=t,{i18n:r,defaultNS:i}=w.useContext(hy)||{},o=n||r||dy();o&&!o.reportNamespaces&&(o.reportNamespaces=new gy),o||El(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=w.useMemo(()=>{var M;return{...cy(),...(M=o==null?void 0:o.options)==null?void 0:M.react,...t}},[o,t]),{useSuspense:l,keyPrefix:a}=s,u=i||((T=o==null?void 0:o.options)==null?void 0:T.defaultNS),d=yn(u)?[u]:u||["translation"],c=w.useMemo(()=>d,d);(Q=(O=o==null?void 0:o.reportNamespaces)==null?void 0:O.addUsedNamespaces)==null||Q.call(O,c);const p=w.useRef(0),v=w.useCallback(M=>{if(!o)return yy;const{bindI18n:j,bindI18nStore:F}=s,Y=()=>{p.current+=1,M()};return j&&o.on(j,Y),F&&o.store.on(F,Y),()=>{j&&j.split(" ").forEach(H=>o.off(H,Y)),F&&F.split(" ").forEach(H=>o.store.off(H,Y))}},[o,s]),m=w.useRef(),y=w.useCallback(()=>{if(!o)return vy;const M=!!(o.isInitialized||o.initializedStoreOnce)&&c.every(L=>ry(L,o,s)),j=t.lng||o.language,F=p.current,Y=m.current;if(Y&&Y.ready===M&&Y.lng===j&&Y.keyPrefix===a&&Y.revision===F)return Y;const re={t:o.getFixedT(j,s.nsMode==="fallback"?c:c[0],a),ready:M,lng:j,keyPrefix:a,revision:F};return m.current=re,re},[o,c,a,s,t.lng]),[k,g]=w.useState(0),{t:f,ready:h}=pl.useSyncExternalStore(v,y,y);w.useEffect(()=>{if(o&&!h&&!l){const M=()=>g(j=>j+1);t.lng?mc(o,t.lng,c,M):Cl(o,c,M)}},[o,t.lng,c,h,l,k]);const S=o||{},x=w.useRef(null),_=w.useRef(),P=M=>{const j=Object.getOwnPropertyDescriptors(M);j.__original&&delete j.__original;const F=Object.create(Object.getPrototypeOf(M),j);if(!Object.prototype.hasOwnProperty.call(F,"__original"))try{Object.defineProperty(F,"__original",{value:M,writable:!1,enumerable:!1,configurable:!1})}catch{}return F},R=w.useMemo(()=>{const M=S,j=M==null?void 0:M.language;let F=M;M&&(x.current&&x.current.__original===M?_.current!==j?(F=P(M),x.current=F,_.current=j):F=x.current:(F=P(M),x.current=F,_.current=j));const Y=!h&&!l?(...re)=>(El(o,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),f(...re)):f,H=[Y,F,h];return H.t=Y,H.i18n=F,H.ready=h,H},[f,S,h,S.resolvedLanguage,S.language,S.languages]);if(o&&l&&!h)throw new Promise(M=>{const j=()=>M();t.lng?mc(o,t.lng,c,j):Cl(o,c,j)});return R},Sy=[{labelKey:"nav.dashboard",icon:"📊",href:"/"},{labelKey:"nav.activity",icon:"🖥️",href:"/activity"},{labelKey:"nav.recommended",icon:"✨",href:"/recommended"},{labelKey:"nav.configuration",icon:"⚙️",href:"/config"},{labelKey:"nav.profiles",icon:"👤",href:"/profiles"}];function wy(){const{pathname:e}=xn(),{theme:t,setTheme:n}=Zm(),{t:r,i18n:i}=ap(),o=i.resolvedLanguage??"en",{data:s}=Fe("/api/info",u=>fetch(u).then(d=>d.json()),{revalidateOnFocus:!1}),l=(s==null?void 0:s.version)??"…",a=u=>u==="/"?e==="/"||e==="/metrics":e.startsWith(u);return E.jsxs("aside",{style:{width:"240px",minWidth:"240px",backgroundColor:"var(--bg-secondary)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",height:"100vh",position:"fixed",top:0,left:0,overflowY:"auto"},children:[E.jsx("div",{className:"p-4",style:{borderBottom:"1px solid var(--border)"},children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-white text-sm font-medium",style:{backgroundColor:"var(--accent)"},children:"C"}),E.jsxs("div",{children:[E.jsx("div",{className:"text-sm",style:{color:"var(--text-primary)",fontWeight:510},children:"Claude Config"}),E.jsx("div",{className:"text-xs",style:{color:"var(--text-faint)"},children:`v${l}`})]})]})}),E.jsx("nav",{className:"flex-1 p-3",children:E.jsx("ul",{className:"space-y-1",children:Sy.map(u=>E.jsx("li",{children:E.jsxs(Kd,{to:u.href,className:"flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors",style:a(u.href)?{backgroundColor:"var(--accent)",color:"#fff"}:{color:"var(--text-secondary)"},children:[E.jsx("span",{className:"text-base",children:u.icon}),E.jsx("span",{children:r(u.labelKey)})]})},u.href))})}),E.jsxs("div",{className:"p-3 space-y-2",style:{borderTop:"1px solid var(--border)"},children:[E.jsx("div",{className:"flex items-center gap-1 p-1 rounded-lg",style:{backgroundColor:"var(--bg-tertiary)"},children:["en","zh"].map(u=>E.jsx("button",{onClick:()=>void i.changeLanguage(u),className:"flex-1 px-2 py-1 rounded text-xs transition-colors",style:{backgroundColor:o===u?"var(--accent)":"transparent",color:o===u?"#fff":"var(--text-muted)"},children:r(`language.${u}`)},u))}),E.jsx("div",{className:"flex items-center gap-1 p-1 rounded-lg",style:{backgroundColor:"var(--bg-tertiary)"},children:["system","dark","light"].map(u=>E.jsx("button",{onClick:()=>n(u),className:"flex-1 px-2 py-1 rounded text-xs transition-colors",style:{backgroundColor:t===u?"var(--accent)":"transparent",color:t===u?"#fff":"var(--text-muted)"},children:u==="system"?`🖥️ ${r("theme.auto")}`:u==="dark"?`🌙 ${r("theme.dark")}`:`☀️ ${r("theme.light")}`},u))})]})]})}function xy(){w.useEffect(()=>{const e=new EventSource("/api/events");return e.onmessage=t=>{try{const n=JSON.parse(t.data);if(n.type==="heartbeat")return;switch(n.category){case"settings":Je("settings"),Je("stats");break;case"plugins":Je("plugins"),Je("stats"),Je("skills");break;case"mcps":Je("mcp-servers"),Je("stats");break;case"sessions":Je("sessions");break;case"profiles":Je("profiles"),Je("stats");break;default:Je(()=>!0)}}catch{}},e.onerror=()=>{},()=>e.close()},[])}function ky(){return xy(),null}const Ey="modulepreload",Cy=function(e){return"/"+e},vc={},Dt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=Cy(a),a in vc)return;vc[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":Ey,u||(c.as="script"),c.crossOrigin="",c.href=a,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((p,v)=>{c.addEventListener("load",p),c.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Py={primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"btn-ghost"},_y={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm"};function ms({children:e,variant:t="secondary",size:n="md",onClick:r,disabled:i=!1,type:o="button",title:s}){return E.jsx("button",{type:o,onClick:r,disabled:i,title:s,className:`inline-flex items-center justify-center rounded-md transition-colors ${_y[n]} ${Py[t]} ${i?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,style:{fontWeight:510},children:e})}const Ly="/api";async function K(e,t){const n=await fetch(`${Ly}${e}`,{headers:{"Content-Type":"application/json"},...t});if(!n.ok){const r=await n.text().catch(()=>n.statusText);throw new Error(`API error ${n.status}: ${r}`)}return n.json()}function Ry(){return K("/stats")}function Ny(){return K("/plugins")}function rS(e){return K(`/plugins/${encodeURIComponent(e)}`,{method:"DELETE"})}function iS(e,t){return K(`/plugins/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify({enabled:t})})}function Oy(){return K("/mcp-servers")}function oS(e){return K(`/mcp-servers/${encodeURIComponent(e)}`,{method:"DELETE"})}function Ty(){return K("/settings")}function sS(e){return K("/settings",{method:"PATCH",body:JSON.stringify(e)})}function lS(){return K("/settings/env")}function aS(e,t){return K("/settings/env",{method:"PUT",body:JSON.stringify({key:e,value:t})})}function uS(e){return K(`/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"})}function jy(){return K("/sessions")}function Iy(e,t){const n=new URLSearchParams({file:e});return K(`/sessions/history?${n.toString()}`)}function Dy(){return K("/skills")}function cS(e){return K(`/skills/content?path=${encodeURIComponent(e)}`)}async function fS(e,t){const n=await fetch("/api/skills/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t})});if(!n.ok)throw new Error("Failed to save");return n.json()}async function dS(e){const t=await fetch(`/api/skills/search?q=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Search failed");return t.json()}async function pS(){const e=await fetch("/api/skills/top");if(!e.ok)throw new Error("Failed to fetch top skills");return e.json()}async function hS(){const e=await fetch("/api/mcp-registry/top");if(!e.ok)throw new Error("Failed to fetch top MCP servers");return e.json()}async function gS(e){const t=await fetch(`/api/mcp-registry?q=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Search failed");return t.json()}async function mS(e,t,n,r){const i=await fetch("/api/mcp-registry/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,command:t,args:n,env:r})});if(!i.ok){const o=await i.json().catch(()=>({error:"Install failed"}));throw new Error(o.error??"Install failed")}return i.json()}function zy(){return K("/commands")}function Fy(){return K("/profiles")}function My(e){return K("/profiles",{method:"POST",body:JSON.stringify({name:e})})}function vS(e){return K(`/profiles/${encodeURIComponent(e)}/activate`,{method:"POST"})}function yS(e){return K(`/profiles/${encodeURIComponent(e)}`,{method:"DELETE"})}function SS(e){return K("/profiles/export",{method:"POST",body:JSON.stringify({name:e})})}function wS(e,t="replace"){return K("/profiles/import",{method:"POST",body:JSON.stringify({data:e,strategy:t})})}function $y(){return K("/metrics")}function Uy(){return K("/marketplaces")}function xS(e,t){return K("/marketplaces",{method:"POST",body:JSON.stringify({name:e,repo:t})})}function kS(e){return K(`/marketplaces/${encodeURIComponent(e)}`,{method:"DELETE"})}function Ay(e){return K(`/marketplaces/${encodeURIComponent(e)}/plugins`)}function Vy(){return K("/recommendations")}function ES(){return K("/recommendations",{method:"POST"})}const He={revalidateOnFocus:!1,dedupingInterval:5e3};function CS(){return Fe("stats",Ry,He)}function PS(){return Fe("plugins",Ny,He)}function _S(){return Fe("mcp-servers",Oy,He)}function LS(){return Fe("skills",Dy,He)}function RS(){return Fe("commands",zy,He)}function By(){return Fe("profiles",Fy,He)}function NS(){return Fe("settings",Ty,He)}function OS(){return Fe("sessions",jy,He)}function TS(e){return Fe(e?["session-history",e]:null,()=>e?Iy(e):Promise.resolve([]),He)}function jS(){return Fe("metrics",$y,He)}function IS(){return Fe("marketplaces",Uy,He)}function DS(e){return Fe(e?["available-plugins",e]:null,()=>e?Ay(e):Promise.resolve([]),He)}function zS(){return Fe("recommendations",Vy,He)}const Hy=[{key:"plugins",href:"/config/plugins"},{key:"mcp",href:"/config/mcp"},{key:"skills",href:"/config/skills"},{key:"commands",href:"/config/commands"},{key:"settings",href:"/config/settings"}];function Wy({children:e}){const{pathname:t}=xn(),n=Pa(),{t:r}=ap(),{mutate:i}=By(),[o,s]=w.useState(!1),[l,a]=w.useState(""),[u,d]=w.useState(""),[c,p]=w.useState(!1),[v,m]=w.useState(null),[y,k]=w.useState(null);function g(){s(!1),a(""),d(""),k(null)}async function f(){const h=l.trim();if(!h){k(r("config.saveDialog.nameRequired"));return}p(!0),k(null);try{await My(h),i(),m(r("config.saveDialog.profileSaved",{name:h})),g(),setTimeout(()=>m(null),3e3)}catch(S){console.error("Failed to create profile",S),k(S instanceof Error?S.message:r("config.saveDialog.saveFailed"))}finally{p(!1)}}return E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[E.jsx("div",{className:"flex items-center gap-1 p-1 rounded-lg",style:{backgroundColor:"var(--bg-tertiary)",flex:1},children:Hy.map(h=>{const S=t.startsWith(h.href);return E.jsx(Kd,{to:h.href,className:"px-4 py-2 rounded-md text-sm transition-colors",style:{backgroundColor:S?"var(--accent)":"transparent",color:S?"#fff":"var(--text-muted)",fontWeight:S?510:400},children:r(`config.tabs.${h.key}`)},h.href)})}),E.jsx(ms,{variant:"primary",size:"md",onClick:()=>s(!0),children:r("config.saveToProfile")})]}),e,o&&E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backgroundColor:"var(--overlay-bg)"},onClick:g,children:E.jsxs("div",{className:"rounded-lg p-6 w-full max-w-md mx-4",style:{backgroundColor:"var(--bg-tertiary)",border:"1px solid var(--card-border)",boxShadow:"rgba(0,0,0,0.4) 0px 2px 4px"},onClick:h=>h.stopPropagation(),children:[E.jsx("h3",{className:"text-lg mb-2",style:{color:"var(--text-primary)",fontWeight:510},children:r("config.saveDialog.title")}),E.jsx("p",{className:"text-sm mb-4",style:{color:"var(--text-secondary)"},children:r("config.saveDialog.body")}),E.jsxs("div",{className:"mb-4",children:[E.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider mb-2",style:{color:"var(--text-muted)"},children:r("config.saveDialog.profileName")}),E.jsx("input",{type:"text",value:l,onChange:h=>a(h.target.value),placeholder:r("config.saveDialog.namePlaceholder"),className:"w-full px-3 py-2 rounded-lg text-sm outline-none profile-input",style:{backgroundColor:"var(--input-bg)",border:"1px solid var(--card-border)",color:"var(--text-primary)"},onKeyDown:h=>{h.key==="Enter"&&f(),h.key==="Escape"&&g()},autoFocus:!0})]}),E.jsxs("div",{className:"mb-4",children:[E.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider mb-2",style:{color:"var(--text-muted)"},children:r("config.saveDialog.descriptionLabel")}),E.jsx("input",{type:"text",value:u,onChange:h=>d(h.target.value),placeholder:r("config.saveDialog.descriptionPlaceholder"),className:"w-full px-3 py-2 rounded-lg text-sm outline-none profile-input",style:{backgroundColor:"var(--input-bg)",border:"1px solid var(--card-border)",color:"var(--text-primary)"}})]}),y&&E.jsx("p",{className:"text-xs mb-3",style:{color:"var(--accent-red, #e5484d)"},children:y}),E.jsxs("div",{className:"flex items-center justify-end gap-3",children:[E.jsx(ms,{variant:"ghost",size:"md",onClick:g,disabled:c,children:r("common.cancel")}),E.jsx(ms,{variant:"primary",size:"md",onClick:f,disabled:c||!l.trim(),children:r(c?"common.saving":"common.save")})]})]})}),v&&E.jsxs("div",{className:"fixed bottom-6 right-6 z-50 rounded-lg px-4 py-3 text-sm cursor-pointer",style:{backgroundColor:"var(--bg-tertiary)",border:"1px solid var(--accent)",color:"var(--text-primary)",boxShadow:"rgba(0,0,0,0.4) 0px 2px 8px"},onClick:()=>{m(null),n("/profiles")},children:[v," ",E.jsx("span",{style:{color:"var(--text-muted)"},children:r("config.saveDialog.clickToView")})]})]})}const Ky=w.lazy(()=>Dt(()=>import("./dashboard-kD72rFaQ.js"),__vite__mapDeps([0,1]))),Qy=w.lazy(()=>Dt(()=>import("./recommended-Brh5GAZB.js"),__vite__mapDeps([2,1,3,4]))),Yy=w.lazy(()=>Dt(()=>import("./plugins-husUl0t4.js"),__vite__mapDeps([5,1,6,3,4,7,8]))),Jy=w.lazy(()=>Dt(()=>import("./mcp-DrHxDxfw.js"),__vite__mapDeps([9,1,6,3,4]))),Gy=w.lazy(()=>Dt(()=>import("./skills-BvLEIHVX.js"),__vite__mapDeps([10,1,4,3,8]))),Xy=w.lazy(()=>Dt(()=>import("./commands-DEkiXZYl.js"),__vite__mapDeps([11,1,3,8]))),qy=w.lazy(()=>Dt(()=>import("./settings-DpddxKm5.js"),__vite__mapDeps([12,1,7,3]))),Zy=w.lazy(()=>Dt(()=>import("./profiles-tCUJYeeT.js"),__vite__mapDeps([13,1,3,7]))),by=w.lazy(()=>Dt(()=>import("./activity-4TqyD_rE.js"),__vite__mapDeps([14,1,4,3])));function e0(){return E.jsxs("div",{className:"animate-pulse space-y-4",children:[E.jsx("div",{className:"h-8 w-48 rounded",style:{backgroundColor:"var(--input-bg)"}}),E.jsx("div",{className:"grid grid-cols-4 gap-4",children:[1,2,3,4].map(e=>E.jsx("div",{className:"h-24 rounded-lg",style:{backgroundColor:"var(--input-bg)"}},e))})]})}function t0(){return E.jsx(Wy,{children:E.jsx(Mm,{})})}function n0(){return E.jsx(w.Suspense,{fallback:E.jsx(e0,{}),children:E.jsxs(Um,{children:[E.jsx(le,{path:"/",element:E.jsx(Ky,{})}),E.jsx(le,{path:"/recommended",element:E.jsx(Qy,{})}),E.jsxs(le,{path:"/config",element:E.jsx(t0,{}),children:[E.jsx(le,{index:!0,element:E.jsx(dt,{to:"/config/plugins",replace:!0})}),E.jsx(le,{path:"plugins",element:E.jsx(Yy,{})}),E.jsx(le,{path:"mcp",element:E.jsx(Jy,{})}),E.jsx(le,{path:"skills",element:E.jsx(Gy,{})}),E.jsx(le,{path:"commands",element:E.jsx(Xy,{})}),E.jsx(le,{path:"settings",element:E.jsx(qy,{})})]}),E.jsx(le,{path:"/profiles",element:E.jsx(Zy,{})}),E.jsx(le,{path:"/activity",element:E.jsx(by,{})}),E.jsx(le,{path:"/plugins",element:E.jsx(dt,{to:"/config/plugins",replace:!0})}),E.jsx(le,{path:"/mcp-servers",element:E.jsx(dt,{to:"/config/mcp",replace:!0})}),E.jsx(le,{path:"/skills",element:E.jsx(dt,{to:"/config/skills",replace:!0})}),E.jsx(le,{path:"/commands",element:E.jsx(dt,{to:"/config/commands",replace:!0})}),E.jsx(le,{path:"/settings",element:E.jsx(dt,{to:"/config/settings",replace:!0})}),E.jsx(le,{path:"/sessions",element:E.jsx(dt,{to:"/activity",replace:!0})}),E.jsx(le,{path:"/export-import",element:E.jsx(dt,{to:"/profiles",replace:!0})}),E.jsx(le,{path:"/metrics",element:E.jsx(dt,{to:"/",replace:!0})}),E.jsx(le,{path:"*",element:E.jsx(dt,{to:"/",replace:!0})})]})})}function r0(){return E.jsxs(E.Fragment,{children:[E.jsx(ky,{}),E.jsxs("div",{style:{display:"flex",minHeight:"100vh"},children:[E.jsx(wy,{}),E.jsx("main",{style:{flex:1,marginLeft:"240px",padding:"24px",backgroundColor:"var(--bg-primary)",minHeight:"100vh"},children:E.jsx(n0,{})})]})]})}const{slice:i0,forEach:o0}=[];function s0(e){return o0.call(i0.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function l0(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const yc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,a0=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!yc.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!yc.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},Sc={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=a0(e,t,i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var u0={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Sc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:o}=t;n&&typeof document<"u"&&Sc.create(n,e,r,i,o)}},c0={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let l=0;l<s.length;l++){const a=s[l].indexOf("=");a>0&&s[l].substring(0,a)===t&&(n=s[l].substring(a+1))}}return n}},f0={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const s=o.substring(1);if(t){const l=s.split("&");for(let a=0;a<l.length;a++){const u=l[a].indexOf("=");u>0&&l[a].substring(0,u)===t&&(r=l[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const l=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let En=null;const wc=()=>{if(En!==null)return En;try{if(En=typeof window<"u"&&window.localStorage!==null,!En)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{En=!1}return En};var d0={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&wc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&wc()&&window.localStorage.setItem(n,e)}};let Cn=null;const xc=()=>{if(Cn!==null)return Cn;try{if(Cn=typeof window<"u"&&window.sessionStorage!==null,!Cn)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Cn=!1}return Cn};var p0={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&xc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&xc()&&window.sessionStorage.setItem(n,e)}},h0={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},g0={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},m0={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},v0={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let up=!1;try{document.cookie,up=!0}catch{}const cp=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];up||cp.splice(1,1);const y0=()=>({order:cp,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class fp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=s0(n,this.options||{},y0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(u0),this.addDetector(c0),this.addDetector(d0),this.addDetector(p0),this.addDetector(h0),this.addDetector(g0),this.addDetector(m0),this.addDetector(v0),this.addDetector(f0)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!l0(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}fp.type="languageDetector";const S0={dashboard:"Dashboard",recommended:"Recommended",configuration:"Configuration",profiles:"Profiles",activity:"Activity",overview:"Overview",config:"Config",sessions:"Sessions",recommend:"Recommend",settings:"Settings",profiles_wip:"Profiles (WIP)"},w0={nav:"nav",enter:"enter",back:"back",switch_focus:"switch focus",filter:"filter",help:"help",quit:"quit"},x0={auto:"Auto",dark:"Dark",light:"Light"},k0={label:"Language",en:"English",zh:"中文"},E0={title:"Overview",plugins:"Plugins",mcpServers:"MCP Servers",skills:"Skills",profiles:"Profiles",sessions:"Sessions",topSkills:"Top Skills",topTools:"Top Tools",recentSessions:"Recent Sessions",environmentHealth:"Environment Health",viewAll:"View all",noData:"No data yet.",hooksNone:"None",active:"{{count}} active",configured:"{{count}} configured",envSet:"{{count}} set",active_profile:"Active profile:",plugins_count:"Plugins: {{n}}",mcps_count:"MCPs: {{n}}",skills_count:"Skills: {{n}}",commands_count:"Commands: {{n}}",recent_sessions:"Recent sessions",dashboard:"Dashboard:",running:"● running",stopped:"○ stopped"},C0={title:"Recommended",subtitle:"AI-powered recommendations based on your setup",emptyTitle:"No recommendations yet",emptyBody:"Click Generate to analyze your installed plugins, MCP servers, and skills and produce personalized suggestions.",generate:"Generate Recommendations",generating:"Generating…",refresh:"Refresh",lastUpdated:"Last updated {{when}}",install:"Install",dismiss:"Dismiss",why:"Why we recommend this",filterAll:"All",filterPlugins:"Plugins",filterMcps:"MCP Servers",filterSkills:"Skills",findMore:"Find More",findMoreBody:"Search skills.sh and MCP registries to discover more tools.",findMorePlaceholder:"Search skills and MCP servers…",findMoreEmpty:"No results. Try a different keyword.",count_title:"Recommended ({{n}})",copy_hint:"c/y:copy install cmd /:filter",empty_title:"No recommendations yet",empty_hint:"Run `/ccm-recommendations` in Claude Code to generate."},P0={tabs:{plugins:"Plugins",mcp:"MCP Servers",skills:"Skills",commands:"Commands",settings:"Settings"},saveToProfile:"Save to Profile",saveDialog:{title:"Save current configuration as profile",body:"Captures a snapshot of your current plugins, MCP servers, skills, commands, and settings.",profileName:"Profile name",descriptionLabel:"Description (optional)",namePlaceholder:"e.g. frontend-dev",descriptionPlaceholder:"Short description…",nameRequired:"Profile name is required",saveFailed:"Failed to save profile",profileSaved:'Profile "{{name}}" saved',clickToView:"— click to view"},plugins:{title:"Plugins ({{n}} installed)",installed:"Installed",marketplace:"Marketplace",manageMarketplaces:"Manage Marketplaces",searchInstalledPlaceholder:"Search installed plugins…",searchAvailablePlaceholder:"Search available plugins…",marketplaceSelectPlaceholder:"Select marketplace…",enabled:"Enabled",disabled:"Disabled",copyCommand:"Click to copy",installNotice:"Plugin install must be run inside Claude Code. The command is copied to your clipboard.",marketplaceStaleNotice:"Dashboard cannot fetch marketplace updates. Run `/plugin marketplace update` in Claude Code — command copied to clipboard.",hint:"space:toggle enter:toggle /:filter ?:help"},mcp:{title:"MCP servers ({{n}})",installed:"Installed",store:"Store",searchInstalledPlaceholder:"Search MCP servers…",searchStorePlaceholder:"Search the MCP store…",install:"Install",installCopyNotice:"Install command copied — paste it into your terminal.",noResults:"No MCP servers match your search.",hint:"space:toggle enter:toggle /:filter"},skills:{title:"Skills ({{n}})",searchPlaceholder:"Search skills…",installed:"Installed",store:"Store",top:"Top",edit:"Edit",preview:"Preview",noResults:"No skills match your search.",hint:"space:toggle enter:toggle /:filter"},commands:{title:"Commands ({{n}}) — read-only in v1",searchPlaceholder:"Search commands…",noResults:"No commands match your search."},settings:{title:"Settings",model:"Model",modelHelp:"Default model used by Claude Code in this project.",modelSelectPlaceholder:"-- Select a model --",modelCustomPlaceholder:"Or type a custom model ID…",hooks:"Hooks",envVars:"Environment Variables",envKeyPlaceholder:"KEY",envValuePlaceholder:"value",envAdd:"Add",envShow:"Show",envHide:"Hide",envRemove:"Remove",noEnv:"No environment variables set.",model_cycle_hint:"(Enter to cycle)",env_copy_hint:"(Enter to copy KEY=value)"}},_0={title:"Profiles",wip_note:"(work in progress)",tabs:{profiles:"Profiles",exportImport:"Export / Import"},emptyTitle:"No saved profiles yet",emptyBody:"Your current configuration is the default. Save it as a profile to switch between setups later.",saveCurrent:"Save Current Configuration"},L0={title:"Sessions",subtitle:"{{running}} running, {{total}} total",recent:"Recent ({{count}})",allSessions:"All Sessions",searchPlaceholder:"Search sessions…",running:"Running",resume:"Resume"},R0={title:"Sessions ({{n}})",filter_hint:"(Enter to confirm, Esc to clear)",no_matches:"(no matches)",no_selected:"(no session selected)",no_history_file:"(no history file)",no_input_history:"(no input history found)",recent_inputs:"Recent inputs",hint:"y:copy resume id /:filter ?:help",status_live:"● live",status_ended:"○ ended",id_prefix:"id: ",copy_ok:"Resume id copied ({{via}})",copy_fail:"Copy failed; install pbcopy/xclip",detail:{name:"Name",project:"Project",session_id:"Session ID",started:"Started",status:"Status"}},N0={title:"TUI preferences",language:"language",theme:"theme",quit_confirm:"quit-confirm",toggle_hint:"(Enter to toggle en ↔ zh)",theme_value:"auto (terminal palette)",quit_value:"off",coming_soon:"TUI inherits terminal palette; coming in v2"},O0={switch_profile_title:"Switch to {{name}}?",switch_profile_body:'Active profile becomes "{{name}}". This rewrites ~/.claude/settings.json.',confirm:"Confirm",cancel:"Cancel"},T0={enabled:"Enabled {{name}}",disabled:"Disabled {{name}}",switched_profile:"Switched to {{name}}",model_set:"Model: {{model}}",language_set:"Language: {{lang}}",copied:"Copied: {{text}}",copy_failed:"Copy failed; install pbcopy/xclip",switch_failed:"Switch failed: {{err}}",failed_toggle:"Failed to toggle {{name}}: {{err}}",failed_generic:"Failed: {{err}}",install_cmd_copied:"Install command copied: {{cmd}}"},j0={close:"Close",cancel:"Cancel",save:"Save",saving:"Saving…",delete:"Delete",confirm:"Confirm",copy:"Copy",copied:"Copied",loading:"Loading…",search:"Search",none:"(none)",unset:"(unset)",no_matches:"(no matches)",loading_lower:"loading…",unknown:"(unknown)"},I0={settings_unreadable:"Settings unreadable: {{message}}",non_tty:"claude-config requires a TTY. Use subcommands for scripted workflows: claude-config --help",too_small:"claude-config TUI requires terminal ≥ {{cols}}×{{rows}}. Resize and retry."},D0={title:"Keymap (Esc to close)"},z0={dashboard:"dashboard",running:"running",stopped:"stopped"},F0={nav:S0,footer:w0,theme:x0,language:k0,overview:E0,recommended:C0,config:P0,profiles:_0,activity:L0,sessions:R0,settings_prefs:N0,modals:O0,toasts:T0,common:j0,errors:I0,help:D0,header:z0},M0={dashboard:"仪表盘",recommended:"推荐",configuration:"配置",profiles:"配置档案",activity:"活动",overview:"概览",config:"配置",sessions:"会话",recommend:"推荐",settings:"设置",profiles_wip:"配置档案 (WIP)"},$0={nav:"导航",enter:"确认",back:"返回",switch_focus:"切换焦点",filter:"过滤",help:"帮助",quit:"退出"},U0={auto:"自动",dark:"暗色",light:"亮色"},A0={label:"语言",en:"English",zh:"中文"},V0={title:"概览",plugins:"插件",mcpServers:"MCP 服务器",skills:"技能",profiles:"配置档案",sessions:"会话",topSkills:"热门技能",topTools:"热门工具",recentSessions:"最近会话",environmentHealth:"环境状态",viewAll:"查看全部",noData:"暂无数据。",hooksNone:"无",active:"{{count}} 个已启用",configured:"{{count}} 个已配置",envSet:"{{count}} 个已设置",active_profile:"当前配置档案:",plugins_count:"插件:{{n}}",mcps_count:"MCP:{{n}}",skills_count:"技能:{{n}}",commands_count:"命令:{{n}}",recent_sessions:"最近会话",dashboard:"仪表盘:",running:"● 运行中",stopped:"○ 已停止"},B0={title:"推荐",subtitle:"基于你的配置生成的 AI 推荐",emptyTitle:"暂无推荐",emptyBody:"点击「生成推荐」分析已安装的插件、MCP 服务器和技能,给出个性化建议。",generate:"生成推荐",generating:"生成中…",refresh:"刷新",lastUpdated:"最近更新 {{when}}",install:"安装",dismiss:"忽略",why:"推荐理由",filterAll:"全部",filterPlugins:"插件",filterMcps:"MCP 服务器",filterSkills:"技能",findMore:"发现更多",findMoreBody:"在 skills.sh 和 MCP 注册表里搜索更多工具。",findMorePlaceholder:"搜索技能和 MCP 服务器…",findMoreEmpty:"没有结果,换个关键词试试。",count_title:"推荐 ({{n}})",copy_hint:"c/y:复制安装命令 /:过滤",empty_title:"暂无推荐",empty_hint:"请在 Claude Code 中运行 `/ccm-recommendations` 以生成推荐。"},H0={tabs:{plugins:"插件",mcp:"MCP 服务器",skills:"技能",commands:"命令",settings:"设置"},saveToProfile:"保存为配置档案",saveDialog:{title:"保存当前配置为配置档案",body:"会为当前的插件、MCP 服务器、技能、命令和设置拍一个快照。",profileName:"档案名称",descriptionLabel:"描述(可选)",namePlaceholder:"例如:frontend-dev",descriptionPlaceholder:"简要说明…",nameRequired:"请填写档案名称",saveFailed:"保存失败",profileSaved:'已保存 "{{name}}"',clickToView:"— 点击查看"},plugins:{title:"插件 (已安装 {{n}})",installed:"已安装",marketplace:"市场",manageMarketplaces:"管理市场",searchInstalledPlaceholder:"搜索已安装的插件…",searchAvailablePlaceholder:"搜索可用的插件…",marketplaceSelectPlaceholder:"选择市场…",enabled:"已启用",disabled:"已禁用",copyCommand:"点击复制",installNotice:"插件安装命令需要在 Claude Code 中执行,已复制到剪贴板。",marketplaceStaleNotice:"Dashboard 无法拉取市场更新。请在 Claude Code 中运行 `/plugin marketplace update`(命令已复制)。",hint:"space:切换 enter:切换 /:过滤 ?:帮助"},mcp:{title:"MCP 服务器 ({{n}})",installed:"已安装",store:"市场",searchInstalledPlaceholder:"搜索 MCP 服务器…",searchStorePlaceholder:"在 MCP 市场中搜索…",install:"安装",installCopyNotice:"安装命令已复制 — 粘贴到终端执行。",noResults:"没有匹配的 MCP 服务器。",hint:"space:切换 enter:切换 /:过滤"},skills:{title:"技能 ({{n}})",searchPlaceholder:"搜索技能…",installed:"已安装",store:"市场",top:"Top",edit:"编辑",preview:"预览",noResults:"没有匹配的技能。",hint:"space:切换 enter:切换 /:过滤"},commands:{title:"命令 ({{n}}) — v1 只读",searchPlaceholder:"搜索命令…",noResults:"没有匹配的命令。"},settings:{title:"设置",model:"模型",modelHelp:"Claude Code 在本项目默认使用的模型。",modelSelectPlaceholder:"-- 选择模型 --",modelCustomPlaceholder:"或输入自定义模型 ID…",hooks:"Hooks",envVars:"环境变量",envKeyPlaceholder:"键名",envValuePlaceholder:"值",envAdd:"添加",envShow:"显示",envHide:"隐藏",envRemove:"删除",noEnv:"尚未设置环境变量。",model_cycle_hint:"(Enter 循环切换)",env_copy_hint:"(Enter 复制 KEY=value)"}},W0={title:"配置档案",wip_note:"(开发中)",tabs:{profiles:"配置档案",exportImport:"导出 / 导入"},emptyTitle:"还没有保存的配置档案",emptyBody:"当前配置就是默认状态。保存为配置档案后即可在不同环境间切换。",saveCurrent:"保存当前配置"},K0={title:"会话",subtitle:"{{running}} 个运行中,共 {{total}} 个",recent:"最近 ({{count}})",allSessions:"全部会话",searchPlaceholder:"搜索会话…",running:"运行中",resume:"恢复"},Q0={title:"会话 ({{n}})",filter_hint:"(Enter 确认,Esc 清除)",no_matches:"(无匹配)",no_selected:"(未选择会话)",no_history_file:"(无历史文件)",no_input_history:"(没有输入历史)",recent_inputs:"最近输入",hint:"y:复制恢复 ID /:过滤 ?:帮助",status_live:"● 运行中",status_ended:"○ 已结束",id_prefix:"id:",copy_ok:"恢复 ID 已复制 ({{via}})",copy_fail:"复制失败;请安装 pbcopy/xclip",detail:{name:"名称",project:"项目",session_id:"会话 ID",started:"启动时间",status:"状态"}},Y0={title:"TUI 偏好设置",language:"语言",theme:"主题",quit_confirm:"退出确认",toggle_hint:"(Enter 切换 en ↔ zh)",theme_value:"自动(终端调色板)",quit_value:"关",coming_soon:"TUI 继承终端配色;v2 支持"},J0={switch_profile_title:"切换到 {{name}}?",switch_profile_body:"当前配置档案将变为「{{name}}」,这会重写 ~/.claude/settings.json。",confirm:"确认",cancel:"取消"},G0={enabled:"已启用 {{name}}",disabled:"已禁用 {{name}}",switched_profile:"已切换到 {{name}}",model_set:"模型:{{model}}",language_set:"语言:{{lang}}",copied:"已复制:{{text}}",copy_failed:"复制失败;请安装 pbcopy/xclip",switch_failed:"切换失败:{{err}}",failed_toggle:"切换 {{name}} 失败:{{err}}",failed_generic:"失败:{{err}}",install_cmd_copied:"安装命令已复制:{{cmd}}"},X0={close:"关闭",cancel:"取消",save:"保存",saving:"保存中…",delete:"删除",confirm:"确认",copy:"复制",copied:"已复制",loading:"加载中…",search:"搜索",none:"(无)",unset:"(未设置)",no_matches:"(无匹配)",loading_lower:"加载中…",unknown:"(未知)"},q0={settings_unreadable:"设置不可读:{{message}}",non_tty:"claude-config 需要 TTY。请使用子命令进行脚本化工作流:claude-config --help",too_small:"claude-config TUI 需要终端 ≥ {{cols}}×{{rows}},请调整窗口大小后重试。"},Z0={title:"快捷键(Esc 关闭)"},b0={dashboard:"仪表盘",running:"运行中",stopped:"已停止"},eS={nav:M0,footer:$0,theme:U0,language:A0,overview:V0,recommended:B0,config:H0,profiles:W0,activity:K0,sessions:Q0,settings_prefs:Y0,modals:J0,toasts:G0,common:X0,errors:q0,help:Z0,header:b0},kc={en:F0,zh:eS};Oe.use(fp).use(py).init({resources:{en:{translation:kc.en},zh:{translation:kc.zh}},fallbackLng:"en",supportedLngs:["en","zh"],load:"languageOnly",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],lookupLocalStorage:"ccm-lang",caches:["localStorage"]}});vs.createRoot(document.getElementById("root")).render(E.jsx(ei.StrictMode,{children:E.jsx(Qm,{children:E.jsx(qm,{children:E.jsx(r0,{})})})}));export{fS as A,ms as B,pS as C,RS as D,lS as E,sS as F,aS as G,uS as H,SS as I,wS as J,By as K,vS as L,yS as M,TS as N,nS as O,vp as P,Dt as _,OS as a,Pa as b,NS as c,CS as d,jS as e,zS as f,ES as g,gS as h,Wg as i,E as j,cS as k,PS as l,IS as m,DS as n,rS as o,xS as p,kS as q,w as r,dS as s,iS as t,ap as u,_S as v,oS as w,hS as x,mS as y,LS as z};
|