@c4a/server-cli 0.4.12-alpha.2 → 0.4.12-beta.7
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/index.js +3370 -905
- package/package.json +2 -1
- package/serve.js +7152 -1913
- package/web/assets/index-1QkfhsIS.js +12 -0
- package/web/assets/index-8J6WgTr0.js +238 -0
- package/web/assets/index-B1KeXpYL.css +1 -0
- package/web/assets/index-B1zrTc3w.js +12 -0
- package/web/assets/index-B6uGMtfP.css +1 -0
- package/web/assets/index-BCzQnf3x.css +1 -0
- package/web/assets/index-BE9z9PQF.js +238 -0
- package/web/assets/index-BF6rVrre.js +238 -0
- package/web/assets/index-BMVKFQ7h.js +238 -0
- package/web/assets/index-BRwgHwhm.js +12 -0
- package/web/assets/index-BXaK4HKi.js +12 -0
- package/web/assets/index-BaBWjAP7.css +1 -0
- package/web/assets/index-Be3yvSxB.js +12 -0
- package/web/assets/index-Bh0nrxkS.css +1 -0
- package/web/assets/index-BjM7CFih.js +12 -0
- package/web/assets/index-Bxc-msf3.js +238 -0
- package/web/assets/index-ByCT34eF.css +1 -0
- package/web/assets/index-C0SbV7Fr.js +238 -0
- package/web/assets/index-C1T-mIJp.js +238 -0
- package/web/assets/index-C6uqUNjs.js +238 -0
- package/web/assets/index-CKPy6nsr.js +238 -0
- package/web/assets/index-CSQvEPnB.js +238 -0
- package/web/assets/index-CU-x3HVJ.js +12 -0
- package/web/assets/index-CVcqJsfJ.js +12 -0
- package/web/assets/index-CWKka1Dm.css +1 -0
- package/web/assets/index-Cs1wjzzB.css +1 -0
- package/web/assets/index-D0FYwi5D.css +1 -0
- package/web/assets/index-D9pKIRoL.js +12 -0
- package/web/assets/index-DHMM5gmZ.js +12 -0
- package/web/assets/index-DMIK6qP9.js +12 -0
- package/web/assets/index-DNSKIsZU.js +238 -0
- package/web/assets/index-DW-afpe4.js +12 -0
- package/web/assets/index-DYi5EQi6.css +1 -0
- package/web/assets/index-DaUMALOp.css +1 -0
- package/web/assets/index-DeStbuhs.css +1 -0
- package/web/assets/index-DfXQnmId.js +12 -0
- package/web/assets/index-DisDw0E0.css +1 -0
- package/web/assets/index-Dm-_KwmC.css +1 -0
- package/web/assets/index-DmRvWfJA.js +12 -0
- package/web/assets/index-Drfhm6bu.js +12 -0
- package/web/assets/index-DvnO8hAI.js +12 -0
- package/web/assets/index-G3fxfqeh.js +238 -0
- package/web/assets/index-JdgClnFG.css +1 -0
- package/web/assets/index-P648JtKx.js +12 -0
- package/web/assets/index-VCinLKUc.css +1 -0
- package/web/assets/index-ZtrM6iGG.js +12 -0
- package/web/assets/index-oRdZsAv2.js +238 -0
- package/web/assets/index-snZ8He7E.js +12 -0
- package/web/assets/index-zH92nrE5.css +1 -0
- package/web/index.html +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function Zv(n,i){for(var r=0;r<i.length;r++){const s=i[r];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in n)){const u=Object.getOwnPropertyDescriptor(s,c);u&&Object.defineProperty(n,c,u.get?u:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function r(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(c){if(c.ep)return;c.ep=!0;const u=r(c);fetch(c.href,u)}})();function Fv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zu={exports:{}},fr={};var sp;function Jv(){if(sp)return fr;sp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(s,c,u){var h=null;if(u!==void 0&&(h=""+u),c.key!==void 0&&(h=""+c.key),"key"in c){u={};for(var p in c)p!=="key"&&(u[p]=c[p])}else u=c;return c=u.ref,{$$typeof:n,type:s,key:h,ref:c!==void 0?c:null,props:u}}return fr.Fragment=i,fr.jsx=r,fr.jsxs=r,fr}var op;function Wv(){return op||(op=1,zu.exports=Jv()),zu.exports}var f=Wv();const ze=n=>typeof n=="string",hr=()=>{let n,i;const r=new Promise((s,c)=>{n=s,i=c});return r.resolve=n,r.reject=i,r},cp=n=>n==null?"":""+n,Pv=(n,i,r)=>{n.forEach(s=>{i[s]&&(r[s]=i[s])})},Iv=/###/g,up=n=>n&&n.indexOf("###")>-1?n.replace(Iv,"."):n,dp=n=>!n||ze(n),Sr=(n,i,r)=>{const s=ze(i)?i.split("."):i;let c=0;for(;c<s.length-1;){if(dp(n))return{};const u=up(s[c]);!n[u]&&r&&(n[u]=new r),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++c}return dp(n)?{}:{obj:n,k:up(s[c])}},fp=(n,i,r)=>{const{obj:s,k:c}=Sr(n,i,Object);if(s!==void 0||i.length===1){s[c]=r;return}let u=i[i.length-1],h=i.slice(0,i.length-1),p=Sr(n,h,Object);for(;p.obj===void 0&&h.length;)u=`${h[h.length-1]}.${u}`,h=h.slice(0,h.length-1),p=Sr(n,h,Object),p?.obj&&typeof p.obj[`${p.k}.${u}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${u}`]=r},e0=(n,i,r,s)=>{const{obj:c,k:u}=Sr(n,i,Object);c[u]=c[u]||[],c[u].push(r)},ro=(n,i)=>{const{obj:r,k:s}=Sr(n,i);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},t0=(n,i,r)=>{const s=ro(n,r);return s!==void 0?s:ro(i,r)},Dg=(n,i,r)=>{for(const s in i)s!=="__proto__"&&s!=="constructor"&&(s in n?ze(n[s])||n[s]instanceof String||ze(i[s])||i[s]instanceof String?r&&(n[s]=i[s]):Dg(n[s],i[s],r):n[s]=i[s]);return n},_l=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var a0={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const n0=n=>ze(n)?n.replace(/[&<>"'\/]/g,i=>a0[i]):n;class l0{constructor(i){this.capacity=i,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(i){const r=this.regExpMap.get(i);if(r!==void 0)return r;const s=new RegExp(i);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(i,s),this.regExpQueue.push(i),s}}const i0=[" ",",","?","!",";"],r0=new l0(20),s0=(n,i,r)=>{i=i||"",r=r||"";const s=i0.filter(h=>i.indexOf(h)<0&&r.indexOf(h)<0);if(s.length===0)return!0;const c=r0.getRegExp(`(${s.map(h=>h==="?"?"\\?":h).join("|")})`);let u=!c.test(n);if(!u){const h=n.indexOf(r);h>0&&!c.test(n.substring(0,h))&&(u=!0)}return u},Ju=(n,i,r=".")=>{if(!n)return;if(n[i])return Object.prototype.hasOwnProperty.call(n,i)?n[i]:void 0;const s=i.split(r);let c=n;for(let u=0;u<s.length;){if(!c||typeof c!="object")return;let h,p="";for(let g=u;g<s.length;++g)if(g!==u&&(p+=r),p+=s[g],h=c[p],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&g<s.length-1)continue;u+=g-u+1;break}c=h}return c},wr=n=>n?.replace("_","-"),o0={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,i){console?.[n]?.apply?.(console,i)}};class so{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||o0,this.options=r,this.debug=r.debug}log(...i){return this.forward(i,"log","",!0)}warn(...i){return this.forward(i,"warn","",!0)}error(...i){return this.forward(i,"error","")}deprecate(...i){return this.forward(i,"warn","WARNING DEPRECATED: ",!0)}forward(i,r,s,c){return c&&!this.debug?null:(ze(i[0])&&(i[0]=`${s}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new so(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new so(this.logger,i)}}var Wa=new so;class fo{constructor(){this.observers={}}on(i,r){return i.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const c=this.observers[s].get(r)||0;this.observers[s].set(r,c+1)}),this}off(i,r){if(this.observers[i]){if(!r){delete this.observers[i];return}this.observers[i].delete(r)}}emit(i,...r){this.observers[i]&&Array.from(this.observers[i].entries()).forEach(([c,u])=>{for(let h=0;h<u;h++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,u])=>{for(let h=0;h<u;h++)c.apply(c,[i,...r])})}}class hp extends fo{constructor(i,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=i||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}removeNamespaces(i){const r=this.options.ns.indexOf(i);r>-1&&this.options.ns.splice(r,1)}getResource(i,r,s,c={}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,h=c.ignoreJSONStructure!==void 0?c.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;i.indexOf(".")>-1?p=i.split("."):(p=[i,r],s&&(Array.isArray(s)?p.push(...s):ze(s)&&u?p.push(...s.split(u)):p.push(s)));const g=ro(this.data,p);return!g&&!r&&!s&&i.indexOf(".")>-1&&(i=p[0],r=p[1],s=p.slice(2).join(".")),g||!h||!ze(s)?g:Ju(this.data?.[i]?.[r],s,u)}addResource(i,r,s,c,u={silent:!1}){const h=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let p=[i,r];s&&(p=p.concat(h?s.split(h):s)),i.indexOf(".")>-1&&(p=i.split("."),c=r,r=p[1]),this.addNamespaces(r),fp(this.data,p,c),u.silent||this.emit("added",i,r,s,c)}addResources(i,r,s,c={silent:!1}){for(const u in s)(ze(s[u])||Array.isArray(s[u]))&&this.addResource(i,r,u,s[u],{silent:!0});c.silent||this.emit("added",i,r,s)}addResourceBundle(i,r,s,c,u,h={silent:!1,skipCopy:!1}){let p=[i,r];i.indexOf(".")>-1&&(p=i.split("."),c=s,s=r,r=p[1]),this.addNamespaces(r);let g=ro(this.data,p)||{};h.skipCopy||(s=JSON.parse(JSON.stringify(s))),c?Dg(g,s,u):g={...g,...s},fp(this.data,p,g),h.silent||this.emit("added",i,r,s)}removeResourceBundle(i,r){this.hasResourceBundle(i,r)&&delete this.data[i][r],this.removeNamespaces(r),this.emit("removed",i,r)}hasResourceBundle(i,r){return this.getResource(i,r)!==void 0}getResourceBundle(i,r){return r||(r=this.options.defaultNS),this.getResource(i,r)}getDataByLanguage(i){return this.data[i]}hasLanguageSomeTranslations(i){const r=this.getDataByLanguage(i);return!!(r&&Object.keys(r)||[]).find(c=>r[c]&&Object.keys(r[c]).length>0)}toJSON(){return this.data}}var Mg={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,i,r,s,c){return n.forEach(u=>{i=this.processors[u]?.process(i,r,s,c)??i}),i}};const Ag=Symbol("i18next/PATH_KEY");function c0(){const n=[],i=Object.create(null);let r;return i.get=(s,c)=>(r?.revoke?.(),c===Ag?n:(n.push(c),r=Proxy.revocable(s,i),r.proxy)),Proxy.revocable(Object.create(null),i).proxy}function Wu(n,i){const{[Ag]:r}=n(c0());return r.join(i?.keySeparator??".")}const mp={},Tu=n=>!ze(n)&&typeof n!="boolean"&&typeof n!="number";class oo extends fo{constructor(i,r={}){super(),Pv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wa.create("translator")}changeLanguage(i){i&&(this.language=i)}exists(i,r={interpolation:{}}){const s={...r};if(i==null)return!1;const c=this.resolve(i,s);if(c?.res===void 0)return!1;const u=Tu(c.res);return!(s.returnObjects===!1&&u)}extractFromKey(i,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const c=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let u=r.ns||this.options.defaultNS||[];const h=s&&i.indexOf(s)>-1,p=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!s0(i,s,c);if(h&&!p){const g=i.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:i,namespaces:ze(u)?[u]:u};const m=i.split(s);(s!==c||s===c&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),i=m.join(c)}return{key:i,namespaces:ze(u)?[u]:u}}translate(i,r,s){let c=typeof r=="object"?{...r}:r;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),i==null)return"";typeof i=="function"&&(i=Wu(i,{...this.options,...c})),Array.isArray(i)||(i=[String(i)]);const u=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,h=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:p,namespaces:g}=this.extractFromKey(i[i.length-1],c),m=g[g.length-1];let b=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const x=c.lng||this.language,_=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return _?u?{res:`${m}${b}${p}`,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(c)}:`${m}${b}${p}`:u?{res:p,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(c)}:p;const j=this.resolve(i,c);let w=j?.res;const D=j?.usedKey||p,A=j?.exactUsedKey||p,Q=["[object Number]","[object Function]","[object RegExp]"],J=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,G=!this.i18nFormat||this.i18nFormat.handleAsObject,Z=c.count!==void 0&&!ze(c.count),K=oo.hasDefaultValue(c),ae=Z?this.pluralResolver.getSuffix(x,c.count,c):"",P=c.ordinal&&Z?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",R=Z&&!c.ordinal&&c.count===0,U=R&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${ae}`]||c[`defaultValue${P}`]||c.defaultValue;let $=w;G&&!w&&K&&($=U);const de=Tu($),se=Object.prototype.toString.apply($);if(G&&$&&de&&Q.indexOf(se)<0&&!(ze(J)&&Array.isArray($))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ve=this.options.returnedObjectHandler?this.options.returnedObjectHandler(D,$,{...c,ns:g}):`key '${p} (${this.language})' returned an object instead of string.`;return u?(j.res=ve,j.usedParams=this.getUsedParamsDetails(c),j):ve}if(h){const ve=Array.isArray($),te=ve?[]:{},ce=ve?A:D;for(const M in $)if(Object.prototype.hasOwnProperty.call($,M)){const W=`${ce}${h}${M}`;K&&!w?te[M]=this.translate(W,{...c,defaultValue:Tu(U)?U[M]:void 0,joinArrays:!1,ns:g}):te[M]=this.translate(W,{...c,joinArrays:!1,ns:g}),te[M]===W&&(te[M]=$[M])}w=te}}else if(G&&ze(J)&&Array.isArray(w))w=w.join(J),w&&(w=this.extendTranslation(w,i,c,s));else{let ve=!1,te=!1;!this.isValidLookup(w)&&K&&(ve=!0,w=U),this.isValidLookup(w)||(te=!0,w=p);const M=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:w,W=K&&U!==w&&this.options.updateMissing;if(te||ve||W){if(this.logger.log(W?"updateKey":"missingKey",x,m,p,W?U:w),h){const E=this.resolve(p,{...c,keySeparator:!1});E&&E.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 ue=[];const oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&oe&&oe[0])for(let E=0;E<oe.length;E++)ue.push(oe[E]);else this.options.saveMissingTo==="all"?ue=this.languageUtils.toResolveHierarchy(c.lng||this.language):ue.push(c.lng||this.language);const Ce=(E,Y,I)=>{const le=K&&I!==w?I:M;this.options.missingKeyHandler?this.options.missingKeyHandler(E,m,Y,le,W,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(E,m,Y,le,W,c),this.emit("missingKey",E,m,Y,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&Z?ue.forEach(E=>{const Y=this.pluralResolver.getSuffixes(E,c);R&&c[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(I=>{Ce([E],p+I,c[`defaultValue${I}`]||U)})}):Ce(ue,p,U))}w=this.extendTranslation(w,i,c,j,s),te&&w===p&&this.options.appendNamespaceToMissingKey&&(w=`${m}${b}${p}`),(te||ve)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${b}${p}`:p,ve?w:void 0,c))}return u?(j.res=w,j.usedParams=this.getUsedParamsDetails(c),j):w}extendTranslation(i,r,s,c,u){if(this.i18nFormat?.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const g=ze(i)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(g){const x=i.match(this.interpolator.nestingRegexp);m=x&&x.length}let b=s.replace&&!ze(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),i=this.interpolator.interpolate(i,b,s.lng||this.language||c.usedLng,s),g){const x=i.match(this.interpolator.nestingRegexp),_=x&&x.length;m<_&&(s.nest=!1)}!s.lng&&c&&c.res&&(s.lng=this.language||c.usedLng),s.nest!==!1&&(i=this.interpolator.nest(i,(...x)=>u?.[0]===x[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${r[0]}`),null):this.translate(...x,r),s)),s.interpolation&&this.interpolator.reset()}const h=s.postProcess||this.options.postProcess,p=ze(h)?[h]:h;return i!=null&&p?.length&&s.applyPostProcessor!==!1&&(i=Mg.handle(p,i,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),i}resolve(i,r={}){let s,c,u,h,p;return ze(i)&&(i=[i]),i.forEach(g=>{if(this.isValidLookup(s))return;const m=this.extractFromKey(g,r),b=m.key;c=b;let x=m.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const _=r.count!==void 0&&!ze(r.count),j=_&&!r.ordinal&&r.count===0,w=r.context!==void 0&&(ze(r.context)||typeof r.context=="number")&&r.context!=="",D=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(A=>{this.isValidLookup(s)||(p=A,!mp[`${D[0]}-${A}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(mp[`${D[0]}-${A}`]=!0,this.logger.warn(`key "${c}" for languages "${D.join(", ")}" won't get resolved as namespace "${p}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),D.forEach(Q=>{if(this.isValidLookup(s))return;h=Q;const J=[b];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(J,b,Q,A,r);else{let Z;_&&(Z=this.pluralResolver.getSuffix(Q,r.count,r));const K=`${this.options.pluralSeparator}zero`,ae=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(_&&(r.ordinal&&Z.indexOf(ae)===0&&J.push(b+Z.replace(ae,this.options.pluralSeparator)),J.push(b+Z),j&&J.push(b+K)),w){const P=`${b}${this.options.contextSeparator||"_"}${r.context}`;J.push(P),_&&(r.ordinal&&Z.indexOf(ae)===0&&J.push(P+Z.replace(ae,this.options.pluralSeparator)),J.push(P+Z),j&&J.push(P+K))}}let G;for(;G=J.pop();)this.isValidLookup(s)||(u=G,s=this.getResource(Q,A,G,r))}))})}),{res:s,usedKey:c,exactUsedKey:u,usedLng:h,usedNS:p}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,r,s,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(i,r,s,c):this.resourceStore.getResource(i,r,s,c)}getUsedParamsDetails(i={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=i.replace&&!ze(i.replace);let c=s?i.replace:i;if(s&&typeof i.count<"u"&&(c.count=i.count),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!s){c={...c};for(const u of r)delete c[u]}return c}static hasDefaultValue(i){const r="defaultValue";for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&r===s.substring(0,r.length)&&i[s]!==void 0)return!0;return!1}}class pp{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wa.create("languageUtils")}getScriptPartFromCode(i){if(i=wr(i),!i||i.indexOf("-")<0)return null;const r=i.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(i){if(i=wr(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(ze(i)&&i.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(i)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?i.toLowerCase():i)}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}isSupportedCode(i){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(i=this.getLanguagePartFromCode(i)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(i)>-1}getBestMatchFromCodes(i){if(!i)return null;let r;return i.forEach(s=>{if(r)return;const c=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(c))&&(r=c)}),!r&&this.options.supportedLngs&&i.forEach(s=>{if(r)return;const c=this.getScriptPartFromCode(s);if(this.isSupportedCode(c))return r=c;const u=this.getLanguagePartFromCode(s);if(this.isSupportedCode(u))return r=u;r=this.options.supportedLngs.find(h=>{if(h===u)return h;if(!(h.indexOf("-")<0&&u.indexOf("-")<0)&&(h.indexOf("-")>0&&u.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===u||h.indexOf(u)===0&&u.length>1))return h})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(i,r){if(!i)return[];if(typeof i=="function"&&(i=i(r)),ze(i)&&(i=[i]),Array.isArray(i))return i;if(!r)return i.default||[];let s=i[r];return s||(s=i[this.getScriptPartFromCode(r)]),s||(s=i[this.formatLanguageCode(r)]),s||(s=i[this.getLanguagePartFromCode(r)]),s||(s=i.default),s||[]}toResolveHierarchy(i,r){const s=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],i),c=[],u=h=>{h&&(this.isSupportedCode(h)?c.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return ze(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(i))):ze(i)&&u(this.formatLanguageCode(i)),s.forEach(h=>{c.indexOf(h)<0&&u(this.formatLanguageCode(h))}),c}}const gp={zero:0,one:1,two:2,few:3,many:4,other:5},yp={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class u0{constructor(i,r={}){this.languageUtils=i,this.options=r,this.logger=Wa.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const s=wr(i==="dev"?"en":i),c=r.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:s,type:c});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let h;try{h=new Intl.PluralRules(s,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),yp;if(!i.match(/-|_/))return yp;const g=this.languageUtils.getLanguagePartFromCode(i);h=this.getRule(g,r)}return this.pluralRulesCache[u]=h,h}needsPlural(i,r={}){let s=this.getRule(i,r);return s||(s=this.getRule("dev",r)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(i,r,s={}){return this.getSuffixes(i,s).map(c=>`${r}${c}`)}getSuffixes(i,r={}){let s=this.getRule(i,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((c,u)=>gp[c]-gp[u]).map(c=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${c}`):[]}getSuffix(i,r,s={}){const c=this.getRule(i,s);return c?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${c.select(r)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",r,s))}}const xp=(n,i,r,s=".",c=!0)=>{let u=t0(n,i,r);return!u&&c&&ze(r)&&(u=Ju(n,r,s),u===void 0&&(u=Ju(i,r,s))),u},Ou=n=>n.replace(/\$/g,"$$$$");class vp{constructor(i={}){this.logger=Wa.create("interpolator"),this.options=i,this.format=i?.interpolation?.format||(r=>r),this.init(i)}init(i={}){i.interpolation||(i.interpolation={escapeValue:!0});const{escape:r,escapeValue:s,useRawValueToEscape:c,prefix:u,prefixEscaped:h,suffix:p,suffixEscaped:g,formatSeparator:m,unescapeSuffix:b,unescapePrefix:x,nestingPrefix:_,nestingPrefixEscaped:j,nestingSuffix:w,nestingSuffixEscaped:D,nestingOptionsSeparator:A,maxReplaces:Q,alwaysFormat:J}=i.interpolation;this.escape=r!==void 0?r:n0,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=u?_l(u):h||"{{",this.suffix=p?_l(p):g||"}}",this.formatSeparator=m||",",this.unescapePrefix=b?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=_?_l(_):j||_l("$t("),this.nestingSuffix=w?_l(w):D||_l(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=Q||1e3,this.alwaysFormat=J!==void 0?J:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const i=(r,s)=>r?.source===s?(r.lastIndex=0,r):new RegExp(s,"g");this.regexp=i(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=i(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=i(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(i,r,s,c){let u,h,p;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=j=>{if(j.indexOf(this.formatSeparator)<0){const Q=xp(r,g,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Q,void 0,s,{...c,...r,interpolationkey:j}):Q}const w=j.split(this.formatSeparator),D=w.shift().trim(),A=w.join(this.formatSeparator).trim();return this.format(xp(r,g,D,this.options.keySeparator,this.options.ignoreJSONStructure),A,s,{...c,...r,interpolationkey:D})};this.resetRegExp();const b=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>Ou(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?Ou(this.escape(j)):Ou(j)}].forEach(j=>{for(p=0;u=j.regex.exec(i);){const w=u[1].trim();if(h=m(w),h===void 0)if(typeof b=="function"){const A=b(i,u,c);h=ze(A)?A:""}else if(c&&Object.prototype.hasOwnProperty.call(c,w))h="";else if(x){h=u[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${i}`),h="";else!ze(h)&&!this.useRawValueToEscape&&(h=cp(h));const D=j.safeValue(h);if(i=i.replace(u[0],D),x?(j.regex.lastIndex+=h.length,j.regex.lastIndex-=u[0].length):j.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),i}nest(i,r,s={}){let c,u,h;const p=(g,m)=>{const b=this.nestingOptionsSeparator;if(g.indexOf(b)<0)return g;const x=g.split(new RegExp(`${_l(b)}[ ]*{`));let _=`{${x[1]}`;g=x[0],_=this.interpolate(_,h);const j=_.match(/'/g),w=_.match(/"/g);((j?.length??0)%2===0&&!w||(w?.length??0)%2!==0)&&(_=_.replace(/'/g,'"'));try{h=JSON.parse(_),m&&(h={...m,...h})}catch(D){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,D),`${g}${b}${_}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,g};for(;c=this.nestingRegexp.exec(i);){let g=[];h={...s},h=h.replace&&!ze(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;const m=/{.*}/.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(m!==-1&&(g=c[1].slice(m).split(this.formatSeparator).map(b=>b.trim()).filter(Boolean),c[1]=c[1].slice(0,m)),u=r(p.call(this,c[1].trim(),h),h),u&&c[0]===i&&!ze(u))return u;ze(u)||(u=cp(u)),u||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${i}`),u=""),g.length&&(u=g.reduce((b,x)=>this.format(b,x,s.lng,{...s,interpolationkey:c[1].trim()}),u.trim())),i=i.replace(c[0],u),this.regexp.lastIndex=0}return i}}const d0=n=>{let i=n.toLowerCase().trim();const r={};if(n.indexOf("(")>-1){const s=n.split("(");i=s[0].toLowerCase().trim();const c=s[1].substring(0,s[1].length-1);i==="currency"&&c.indexOf(":")<0?r.currency||(r.currency=c.trim()):i==="relativetime"&&c.indexOf(":")<0?r.range||(r.range=c.trim()):c.split(";").forEach(h=>{if(h){const[p,...g]=h.split(":"),m=g.join(":").trim().replace(/^'+|'+$/g,""),b=p.trim();r[b]||(r[b]=m),m==="false"&&(r[b]=!1),m==="true"&&(r[b]=!0),isNaN(m)||(r[b]=parseInt(m,10))}})}return{formatName:i,formatOptions:r}},bp=n=>{const i={};return(r,s,c)=>{let u=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(u={...u,[c.interpolationkey]:void 0});const h=s+JSON.stringify(u);let p=i[h];return p||(p=n(wr(s),c),i[h]=p),p(r)}},f0=n=>(i,r,s)=>n(wr(r),s)(i);class h0{constructor(i={}){this.logger=Wa.create("formatter"),this.options=i,this.init(i)}init(i,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?bp:f0;this.formats={number:s((c,u)=>{const h=new Intl.NumberFormat(c,{...u});return p=>h.format(p)}),currency:s((c,u)=>{const h=new Intl.NumberFormat(c,{...u,style:"currency"});return p=>h.format(p)}),datetime:s((c,u)=>{const h=new Intl.DateTimeFormat(c,{...u});return p=>h.format(p)}),relativetime:s((c,u)=>{const h=new Intl.RelativeTimeFormat(c,{...u});return p=>h.format(p,u.range||"day")}),list:s((c,u)=>{const h=new Intl.ListFormat(c,{...u});return p=>h.format(p)})}}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=bp(r)}format(i,r,s,c={}){const u=r.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(p=>p.indexOf(")")>-1)){const p=u.findIndex(g=>g.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,p)].join(this.formatSeparator)}return u.reduce((p,g)=>{const{formatName:m,formatOptions:b}=d0(g);if(this.formats[m]){let x=p;try{const _=c?.formatParams?.[c.interpolationkey]||{},j=_.locale||_.lng||c.locale||c.lng||s;x=this.formats[m](p,j,{...b,...c,..._})}catch(_){this.logger.warn(_)}return x}else this.logger.warn(`there was no format function for ${m}`);return p},i)}}const m0=(n,i)=>{n.pending[i]!==void 0&&(delete n.pending[i],n.pendingCount--)};class p0 extends fo{constructor(i,r,s,c={}){super(),this.backend=i,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=c,this.logger=Wa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=c.maxParallelReads||10,this.readingCalls=0,this.maxRetries=c.maxRetries>=0?c.maxRetries:5,this.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,c.backend,c)}queueLoad(i,r,s,c){const u={},h={},p={},g={};return i.forEach(m=>{let b=!0;r.forEach(x=>{const _=`${m}|${x}`;!s.reload&&this.store.hasResourceBundle(m,x)?this.state[_]=2:this.state[_]<0||(this.state[_]===1?h[_]===void 0&&(h[_]=!0):(this.state[_]=1,b=!1,h[_]===void 0&&(h[_]=!0),u[_]===void 0&&(u[_]=!0),g[x]===void 0&&(g[x]=!0)))}),b||(p[m]=!0)}),(Object.keys(u).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(u),pending:Object.keys(h),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}loaded(i,r,s){const c=i.split("|"),u=c[0],h=c[1];r&&this.emit("failedLoading",u,h,r),!r&&s&&this.store.addResourceBundle(u,h,s,void 0,void 0,{skipCopy:!0}),this.state[i]=r?-1:2,r&&s&&(this.state[i]=0);const p={};this.queue.forEach(g=>{e0(g.loaded,[u],h),m0(g,i),r&&g.errors.push(r),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(m=>{p[m]||(p[m]={});const b=g.loaded[m];b.length&&b.forEach(x=>{p[m][x]===void 0&&(p[m][x]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(g=>!g.done)}read(i,r,s,c=0,u=this.retryTimeout,h){if(!i.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:r,fcName:s,tried:c,wait:u,callback:h});return}this.readingCalls++;const p=(m,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(m&&b&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,i,r,s,c+1,u*2,h)},u);return}h(m,b)},g=this.backend[s].bind(this.backend);if(g.length===2){try{const m=g(i,r);m&&typeof m.then=="function"?m.then(b=>p(null,b)).catch(p):p(null,m)}catch(m){p(m)}return}return g(i,r,p)}prepareLoading(i,r,s={},c){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),c&&c();ze(i)&&(i=this.languageUtils.toResolveHierarchy(i)),ze(r)&&(r=[r]);const u=this.queueLoad(i,r,s,c);if(!u.toLoad.length)return u.pending.length||c(),null;u.toLoad.forEach(h=>{this.loadOne(h)})}load(i,r,s){this.prepareLoading(i,r,{},s)}reload(i,r,s){this.prepareLoading(i,r,{reload:!0},s)}loadOne(i,r=""){const s=i.split("|"),c=s[0],u=s[1];this.read(c,u,"read",void 0,void 0,(h,p)=>{h&&this.logger.warn(`${r}loading namespace ${u} for language ${c} failed`,h),!h&&p&&this.logger.log(`${r}loaded namespace ${u} for language ${c}`,p),this.loaded(i,h,p)})}saveMissing(i,r,s,c,u,h={},p=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${s}" as the namespace "${r}" 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(!(s==null||s==="")){if(this.backend?.create){const g={...h,isUpdate:u},m=this.backend.create.bind(this.backend);if(m.length<6)try{let b;m.length===5?b=m(i,r,s,c,g):b=m(i,r,s,c),b&&typeof b.then=="function"?b.then(x=>p(null,x)).catch(p):p(null,b)}catch(b){p(b)}else m(i,r,s,c,p,g)}!i||!i[0]||this.store.addResource(i[0],r,s,c)}}}const Du=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let i={};if(typeof n[1]=="object"&&(i=n[1]),ze(n[1])&&(i.defaultValue=n[1]),ze(n[2])&&(i.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const r=n[3]||n[2];Object.keys(r).forEach(s=>{i[s]=r[s]})}return i},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Sp=n=>(ze(n.ns)&&(n.ns=[n.ns]),ze(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ze(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),Ws=()=>{},g0=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})},Lg="__i18next_supportNoticeShown",y0=()=>typeof globalThis<"u"&&!!globalThis[Lg],x0=()=>{typeof globalThis<"u"&&(globalThis[Lg]=!0)},v0=n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(i=>i?.name?.indexOf("Locize")>0||i?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(i=>i?.projectId));class _r extends fo{constructor(i={},r){if(super(),this.options=Sp(i),this.services={},this.logger=Wa,this.modules={external:[]},g0(this),r&&!this.isInitialized&&!i.isClone){if(!this.options.initAsync)return this.init(i,r),this;setTimeout(()=>{this.init(i,r)},0)}}init(i={},r){this.isInitializing=!0,typeof i=="function"&&(r=i,i={}),i.defaultNS==null&&i.ns&&(ze(i.ns)?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));const s=Du();this.options={...s,...this.options,...Sp(i)},this.options.interpolation={...s.interpolation,...this.options.interpolation},i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!v0(this)&&!y0()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),x0());const c=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Wa.init(c(this.modules.logger),this.options):Wa.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=h0;const b=new pp(this.options);this.store=new hp(this.options.resources,this.options);const x=this.services;x.logger=Wa,x.resourceStore=this.store,x.languageUtils=b,x.pluralResolver=new u0(b,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(x.formatter=c(m),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new vp(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new p0(c(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(j,...w)=>{this.emit(j,...w)}),this.modules.languageDetector&&(x.languageDetector=c(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=c(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new oo(this.services,this.options),this.translator.on("*",(j,...w)=>{this.emit(j,...w)}),this.modules.external.forEach(j=>{j.init&&j.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ws),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=(...b)=>this.store[m](...b)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...b)=>(this.store[m](...b),this)});const p=hr(),g=()=>{const m=(b,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),p.resolve(x),r(b,x)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),p}loadResources(i,r=Ws){let s=r;const c=ze(i)?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const u=[],h=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(m=>{m!=="cimode"&&u.indexOf(m)<0&&u.push(m)})};c?h(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>h(g)),this.options.preload?.forEach?.(p=>h(p)),this.services.backendConnector.load(u,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(p)})}else s(null)}reloadResources(i,r,s){const c=hr();return typeof i=="function"&&(s=i,i=void 0),typeof r=="function"&&(s=r,r=void 0),i||(i=this.languages),r||(r=this.options.ns),s||(s=Ws),this.services.backendConnector.reload(i,r,u=>{c.resolve(),s(u)}),c}use(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Mg.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}setResolvedLanguage(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1)){for(let r=0;r<this.languages.length;r++){const s=this.languages[r];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(i)<0&&this.store.hasLanguageSomeTranslations(i)&&(this.resolvedLanguage=i,this.languages.unshift(i))}}changeLanguage(i,r){this.isLanguageChangingTo=i;const s=hr();this.emit("languageChanging",i);const c=p=>{this.language=p,this.languages=this.services.languageUtils.toResolveHierarchy(p),this.resolvedLanguage=void 0,this.setResolvedLanguage(p)},u=(p,g)=>{g?this.isLanguageChangingTo===i&&(c(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,s.resolve((...m)=>this.t(...m)),r&&r(p,(...m)=>this.t(...m))},h=p=>{!i&&!p&&this.services.languageDetector&&(p=[]);const g=ze(p)?p:p&&p[0],m=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(ze(p)?[p]:p);m&&(this.language||c(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,b=>{u(b,m)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(i),s}getFixedT(i,r,s){const c=(u,h,...p)=>{let g;typeof h!="object"?g=this.options.overloadTranslationOptionHandler([u,h].concat(p)):g={...h},g.lng=g.lng||c.lng,g.lngs=g.lngs||c.lngs,g.ns=g.ns||c.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||s||c.keyPrefix);const m=this.options.keySeparator||".";let b;return g.keyPrefix&&Array.isArray(u)?b=u.map(x=>(typeof x=="function"&&(x=Wu(x,{...this.options,...h})),`${g.keyPrefix}${m}${x}`)):(typeof u=="function"&&(u=Wu(u,{...this.options,...h})),b=g.keyPrefix?`${g.keyPrefix}${m}${u}`:u),this.t(b,g)};return ze(i)?c.lng=i:c.lngs=i,c.ns=r,c.keyPrefix=s,c}t(...i){return this.translator?.translate(...i)}exists(...i){return this.translator?.exists(...i)}setDefaultNamespace(i){this.options.defaultNS=i}hasLoadedNamespace(i,r={}){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 s=r.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const h=(p,g)=>{const m=this.services.backendConnector.state[`${p}|${g}`];return m===-1||m===0||m===2};if(r.precheck){const p=r.precheck(this,h);if(p!==void 0)return p}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(s,i)&&(!c||h(u,i)))}loadNamespaces(i,r){const s=hr();return this.options.ns?(ze(i)&&(i=[i]),i.forEach(c=>{this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}),this.loadResources(c=>{s.resolve(),r&&r(c)}),s):(r&&r(),Promise.resolve())}loadLanguages(i,r){const s=hr();ze(i)&&(i=[i]);const c=this.options.preload||[],u=i.filter(h=>c.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return u.length?(this.options.preload=c.concat(u),this.loadResources(h=>{s.resolve(),r&&r(h)}),s):(r&&r(),Promise.resolve())}dir(i){if(i||(i=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!i)return"rtl";try{const c=new Intl.Locale(i);if(c&&c.getTextInfo){const u=c.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const r=["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"],s=this.services?.languageUtils||new pp(Du());return i.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(s.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(i={},r){const s=new _r(i,r);return s.createInstance=_r.createInstance,s}cloneInstance(i={},r=Ws){const s=i.forkResourceStore;s&&delete i.forkResourceStore;const c={...this.options,...i,isClone:!0},u=new _r(c);if((i.debug!==void 0||i.prefix!==void 0)&&(u.logger=u.logger.clone(i)),["store","services","language"].forEach(p=>{u[p]=this[p]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},s){const p=Object.keys(this.store.data).reduce((g,m)=>(g[m]={...this.store.data[m]},g[m]=Object.keys(g[m]).reduce((b,x)=>(b[x]={...g[m][x]},b),g[m]),g),{});u.store=new hp(p,c),u.services.resourceStore=u.store}if(i.interpolation){const g={...Du().interpolation,...this.options.interpolation,...i.interpolation},m={...c,interpolation:g};u.services.interpolator=new vp(m)}return u.translator=new oo(u.services,c),u.translator.on("*",(p,...g)=>{u.emit(p,...g)}),u.init(c,r),u.translator.options=c,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ft=_r.createInstance();Ft.createInstance;Ft.dir;Ft.init;Ft.loadResources;Ft.reloadResources;Ft.use;Ft.changeLanguage;Ft.getFixedT;Ft.t;Ft.exists;Ft.setDefaultNamespace;Ft.hasLoadedNamespace;Ft.loadNamespaces;Ft.loadLanguages;var Mu={exports:{}},Oe={};var _p;function b0(){if(_p)return Oe;_p=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),_=Symbol.iterator;function j(E){return E===null||typeof E!="object"?null:(E=_&&E[_]||E["@@iterator"],typeof E=="function"?E:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,A={};function Q(E,Y,I){this.props=E,this.context=Y,this.refs=A,this.updater=I||w}Q.prototype.isReactComponent={},Q.prototype.setState=function(E,Y){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,Y,"setState")},Q.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function J(){}J.prototype=Q.prototype;function G(E,Y,I){this.props=E,this.context=Y,this.refs=A,this.updater=I||w}var Z=G.prototype=new J;Z.constructor=G,D(Z,Q.prototype),Z.isPureReactComponent=!0;var K=Array.isArray;function ae(){}var P={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function U(E,Y,I){var le=I.ref;return{$$typeof:n,type:E,key:Y,ref:le!==void 0?le:null,props:I}}function $(E,Y){return U(E.type,Y,E.props)}function de(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function se(E){var Y={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(I){return Y[I]})}var ve=/\/+/g;function te(E,Y){return typeof E=="object"&&E!==null&&E.key!=null?se(""+E.key):Y.toString(36)}function ce(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ae,ae):(E.status="pending",E.then(function(Y){E.status==="pending"&&(E.status="fulfilled",E.value=Y)},function(Y){E.status==="pending"&&(E.status="rejected",E.reason=Y)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function M(E,Y,I,le,be){var je=typeof E;(je==="undefined"||je==="boolean")&&(E=null);var Te=!1;if(E===null)Te=!0;else switch(je){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(E.$$typeof){case n:case i:Te=!0;break;case b:return Te=E._init,M(Te(E._payload),Y,I,le,be)}}if(Te)return be=be(E),Te=le===""?"."+te(E,0):le,K(be)?(I="",Te!=null&&(I=Te.replace(ve,"$&/")+"/"),M(be,Y,I,"",function(zt){return zt})):be!=null&&(de(be)&&(be=$(be,I+(be.key==null||E&&E.key===be.key?"":(""+be.key).replace(ve,"$&/")+"/")+Te)),Y.push(be)),1;Te=0;var ut=le===""?".":le+":";if(K(E))for(var fe=0;fe<E.length;fe++)le=E[fe],je=ut+te(le,fe),Te+=M(le,Y,I,je,be);else if(fe=j(E),typeof fe=="function")for(E=fe.call(E),fe=0;!(le=E.next()).done;)le=le.value,je=ut+te(le,fe++),Te+=M(le,Y,I,je,be);else if(je==="object"){if(typeof E.then=="function")return M(ce(E),Y,I,le,be);throw Y=String(E),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Te}function W(E,Y,I){if(E==null)return E;var le=[],be=0;return M(E,le,"","",function(je){return Y.call(I,je,be++)}),le}function ue(E){if(E._status===-1){var Y=E._result;Y=Y(),Y.then(function(I){(E._status===0||E._status===-1)&&(E._status=1,E._result=I)},function(I){(E._status===0||E._status===-1)&&(E._status=2,E._result=I)}),E._status===-1&&(E._status=0,E._result=Y)}if(E._status===1)return E._result.default;throw E._result}var oe=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},Ce={map:W,forEach:function(E,Y,I){W(E,function(){Y.apply(this,arguments)},I)},count:function(E){var Y=0;return W(E,function(){Y++}),Y},toArray:function(E){return W(E,function(Y){return Y})||[]},only:function(E){if(!de(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Oe.Activity=x,Oe.Children=Ce,Oe.Component=Q,Oe.Fragment=r,Oe.Profiler=c,Oe.PureComponent=G,Oe.StrictMode=s,Oe.Suspense=g,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(E){return P.H.useMemoCache(E)}},Oe.cache=function(E){return function(){return E.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(E,Y,I){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var le=D({},E.props),be=E.key;if(Y!=null)for(je in Y.key!==void 0&&(be=""+Y.key),Y)!R.call(Y,je)||je==="key"||je==="__self"||je==="__source"||je==="ref"&&Y.ref===void 0||(le[je]=Y[je]);var je=arguments.length-2;if(je===1)le.children=I;else if(1<je){for(var Te=Array(je),ut=0;ut<je;ut++)Te[ut]=arguments[ut+2];le.children=Te}return U(E.type,be,le)},Oe.createContext=function(E){return E={$$typeof:h,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:u,_context:E},E},Oe.createElement=function(E,Y,I){var le,be={},je=null;if(Y!=null)for(le in Y.key!==void 0&&(je=""+Y.key),Y)R.call(Y,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(be[le]=Y[le]);var Te=arguments.length-2;if(Te===1)be.children=I;else if(1<Te){for(var ut=Array(Te),fe=0;fe<Te;fe++)ut[fe]=arguments[fe+2];be.children=ut}if(E&&E.defaultProps)for(le in Te=E.defaultProps,Te)be[le]===void 0&&(be[le]=Te[le]);return U(E,je,be)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(E){return{$$typeof:p,render:E}},Oe.isValidElement=de,Oe.lazy=function(E){return{$$typeof:b,_payload:{_status:-1,_result:E},_init:ue}},Oe.memo=function(E,Y){return{$$typeof:m,type:E,compare:Y===void 0?null:Y}},Oe.startTransition=function(E){var Y=P.T,I={};P.T=I;try{var le=E(),be=P.S;be!==null&&be(I,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(ae,oe)}catch(je){oe(je)}finally{Y!==null&&I.types!==null&&(Y.types=I.types),P.T=Y}},Oe.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Oe.use=function(E){return P.H.use(E)},Oe.useActionState=function(E,Y,I){return P.H.useActionState(E,Y,I)},Oe.useCallback=function(E,Y){return P.H.useCallback(E,Y)},Oe.useContext=function(E){return P.H.useContext(E)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(E,Y){return P.H.useDeferredValue(E,Y)},Oe.useEffect=function(E,Y){return P.H.useEffect(E,Y)},Oe.useEffectEvent=function(E){return P.H.useEffectEvent(E)},Oe.useId=function(){return P.H.useId()},Oe.useImperativeHandle=function(E,Y,I){return P.H.useImperativeHandle(E,Y,I)},Oe.useInsertionEffect=function(E,Y){return P.H.useInsertionEffect(E,Y)},Oe.useLayoutEffect=function(E,Y){return P.H.useLayoutEffect(E,Y)},Oe.useMemo=function(E,Y){return P.H.useMemo(E,Y)},Oe.useOptimistic=function(E,Y){return P.H.useOptimistic(E,Y)},Oe.useReducer=function(E,Y,I){return P.H.useReducer(E,Y,I)},Oe.useRef=function(E){return P.H.useRef(E)},Oe.useState=function(E){return P.H.useState(E)},Oe.useSyncExternalStore=function(E,Y,I){return P.H.useSyncExternalStore(E,Y,I)},Oe.useTransition=function(){return P.H.useTransition()},Oe.version="19.2.4",Oe}var jp;function ho(){return jp||(jp=1,Mu.exports=b0()),Mu.exports}var v=ho();const gi=Fv(v),S0=Zv({__proto__:null,default:gi},[v]),_0=(n,i,r,s)=>{const c=[r,{code:i,...s||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(c,"warn","react-i18next::",!0);Nl(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},Np={},kg=(n,i,r,s)=>{Nl(r)&&Np[r]||(Nl(r)&&(Np[r]=new Date),_0(n,i,r,s))},Ug=(n,i)=>()=>{if(n.isInitialized)i();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),i()};n.on("initialized",r)}},Pu=(n,i,r)=>{n.loadNamespaces(i,Ug(n,r))},wp=(n,i,r,s)=>{if(Nl(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(i)>-1)return Pu(n,r,s);r.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(i,Ug(n,s))},j0=(n,i,r={})=>!i.languages||!i.languages.length?(kg(i,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:i.languages}),!0):i.hasLoadedNamespace(n,{lng:r.lng,precheck:(s,c)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!c(s.isLanguageChangingTo,n))return!1}}),Nl=n=>typeof n=="string",N0=n=>typeof n=="object"&&n!==null,w0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,E0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},C0=n=>E0[n],R0=n=>n.replace(w0,C0);let Iu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:R0,transDefaultProps:void 0};const z0=(n={})=>{Iu={...Iu,...n}},T0=()=>Iu;let Hg;const O0=n=>{Hg=n},D0=()=>Hg,M0={type:"3rdParty",init(n){z0(n.options.react),O0(n)}},A0=v.createContext();class L0{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Au={exports:{}},Lu={};var Ep;function k0(){if(Ep)return Lu;Ep=1;var n=ho();function i(x,_){return x===_&&(x!==0||1/x===1/_)||x!==x&&_!==_}var r=typeof Object.is=="function"?Object.is:i,s=n.useState,c=n.useEffect,u=n.useLayoutEffect,h=n.useDebugValue;function p(x,_){var j=_(),w=s({inst:{value:j,getSnapshot:_}}),D=w[0].inst,A=w[1];return u(function(){D.value=j,D.getSnapshot=_,g(D)&&A({inst:D})},[x,j,_]),c(function(){return g(D)&&A({inst:D}),x(function(){g(D)&&A({inst:D})})},[x]),h(j),j}function g(x){var _=x.getSnapshot;x=x.value;try{var j=_();return!r(x,j)}catch{return!0}}function m(x,_){return _()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:p;return Lu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,Lu}var Cp;function U0(){return Cp||(Cp=1,Au.exports=k0()),Au.exports}var H0=U0();const B0=(n,i)=>Nl(i)?i:N0(i)&&Nl(i.defaultValue)?i.defaultValue:Array.isArray(n)?n[n.length-1]:n,q0={t:B0,ready:!1},Y0=()=>()=>{},Re=(n,i={})=>{const{i18n:r}=i,{i18n:s,defaultNS:c}=v.useContext(A0)||{},u=r||s||D0();u&&!u.reportNamespaces&&(u.reportNamespaces=new L0),u||kg(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=v.useMemo(()=>({...T0(),...u?.options?.react,...i}),[u,i]),{useSuspense:p,keyPrefix:g}=h,m=c||u?.options?.defaultNS,b=Nl(m)?[m]:m||["translation"],x=v.useMemo(()=>b,b);u?.reportNamespaces?.addUsedNamespaces?.(x);const _=v.useRef(0),j=v.useCallback(U=>{if(!u)return Y0;const{bindI18n:$,bindI18nStore:de}=h,se=()=>{_.current+=1,U()};return $&&u.on($,se),de&&u.store.on(de,se),()=>{$&&$.split(" ").forEach(ve=>u.off(ve,se)),de&&de.split(" ").forEach(ve=>u.store.off(ve,se))}},[u,h]),w=v.useRef(),D=v.useCallback(()=>{if(!u)return q0;const U=!!(u.isInitialized||u.initializedStoreOnce)&&x.every(ce=>j0(ce,u,h)),$=i.lng||u.language,de=_.current,se=w.current;if(se&&se.ready===U&&se.lng===$&&se.keyPrefix===g&&se.revision===de)return se;const te={t:u.getFixedT($,h.nsMode==="fallback"?x:x[0],g),ready:U,lng:$,keyPrefix:g,revision:de};return w.current=te,te},[u,x,g,h,i.lng]),[A,Q]=v.useState(0),{t:J,ready:G}=H0.useSyncExternalStore(j,D,D);v.useEffect(()=>{if(u&&!G&&!p){const U=()=>Q($=>$+1);i.lng?wp(u,i.lng,x,U):Pu(u,x,U)}},[u,i.lng,x,G,p,A]);const Z=u||{},K=v.useRef(null),ae=v.useRef(),P=U=>{const $=Object.getOwnPropertyDescriptors(U);$.__original&&delete $.__original;const de=Object.create(Object.getPrototypeOf(U),$);if(!Object.prototype.hasOwnProperty.call(de,"__original"))try{Object.defineProperty(de,"__original",{value:U,writable:!1,enumerable:!1,configurable:!1})}catch{}return de},R=v.useMemo(()=>{const U=Z,$=U?.language;let de=U;U&&(K.current&&K.current.__original===U?ae.current!==$?(de=P(U),K.current=de,ae.current=$):de=K.current:(de=P(U),K.current=de,ae.current=$));const se=[J,de,G];return se.t=J,se.i18n=de,se.ready=G,se},[J,Z,G,Z.resolvedLanguage,Z.language,Z.languages]);if(u&&p&&!G)throw new Promise(U=>{const $=()=>U();i.lng?wp(u,i.lng,x,$):Pu(u,x,$)});return R},{slice:V0,forEach:G0}=[];function $0(n){return G0.call(V0.call(arguments,1),i=>{if(i)for(const r in i)n[r]===void 0&&(n[r]=i[r])}),n}function K0(n){return typeof n!="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(r=>r.test(n))}const Rp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,X0=function(n,i){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},c=encodeURIComponent(i);let u=`${n}=${c}`;if(s.maxAge>0){const h=s.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(h)}`}if(s.domain){if(!Rp.test(s.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${s.domain}`}if(s.path){if(!Rp.test(s.path))throw new TypeError("option path is invalid");u+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(u+="; HttpOnly"),s.secure&&(u+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(u+="; Partitioned"),u},zp={create(n,i,r,s){let c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(c.expires=new Date,c.expires.setTime(c.expires.getTime()+r*60*1e3)),s&&(c.domain=s),document.cookie=X0(n,i,c)},read(n){const i=`${n}=`,r=document.cookie.split(";");for(let s=0;s<r.length;s++){let c=r[s];for(;c.charAt(0)===" ";)c=c.substring(1,c.length);if(c.indexOf(i)===0)return c.substring(i.length,c.length)}return null},remove(n,i){this.create(n,"",-1,i)}};var Q0={name:"cookie",lookup(n){let{lookupCookie:i}=n;if(i&&typeof document<"u")return zp.read(i)||void 0},cacheUserLanguage(n,i){let{lookupCookie:r,cookieMinutes:s,cookieDomain:c,cookieOptions:u}=i;r&&typeof document<"u"&&zp.create(r,n,s,c,u)}},Z0={name:"querystring",lookup(n){let{lookupQuerystring:i}=n,r;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const u=s.substring(1).split("&");for(let h=0;h<u.length;h++){const p=u[h].indexOf("=");p>0&&u[h].substring(0,p)===i&&(r=u[h].substring(p+1))}}return r}},F0={name:"hash",lookup(n){let{lookupHash:i,lookupFromHashIndex:r}=n,s;if(typeof window<"u"){const{hash:c}=window.location;if(c&&c.length>2){const u=c.substring(1);if(i){const h=u.split("&");for(let p=0;p<h.length;p++){const g=h[p].indexOf("=");g>0&&h[p].substring(0,g)===i&&(s=h[p].substring(g+1))}}if(s)return s;if(!s&&r>-1){const h=c.match(/\/([a-zA-Z-]*)/g);return Array.isArray(h)?h[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return s}};let hi=null;const Tp=()=>{if(hi!==null)return hi;try{if(hi=typeof window<"u"&&window.localStorage!==null,!hi)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{hi=!1}return hi};var J0={name:"localStorage",lookup(n){let{lookupLocalStorage:i}=n;if(i&&Tp())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupLocalStorage:r}=i;r&&Tp()&&window.localStorage.setItem(r,n)}};let mi=null;const Op=()=>{if(mi!==null)return mi;try{if(mi=typeof window<"u"&&window.sessionStorage!==null,!mi)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{mi=!1}return mi};var W0={name:"sessionStorage",lookup(n){let{lookupSessionStorage:i}=n;if(i&&Op())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupSessionStorage:r}=i;r&&Op()&&window.sessionStorage.setItem(r,n)}},P0={name:"navigator",lookup(n){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:s,language:c}=navigator;if(r)for(let u=0;u<r.length;u++)i.push(r[u]);s&&i.push(s),c&&i.push(c)}return i.length>0?i:void 0}},I0={name:"htmlTag",lookup(n){let{htmlTag:i}=n,r;const s=i||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(r=s.getAttribute("lang")),r}},eb={name:"path",lookup(n){let{lookupFromPathIndex:i}=n;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof i=="number"?i:0]?.replace("/",""):void 0}},tb={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:i}=n;const r=typeof i=="number"?i+1:1,s=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[r]}};let Bg=!1;try{document.cookie,Bg=!0}catch{}const qg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Bg||qg.splice(1,1);const ab=()=>({order:qg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class Yg{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(i,r)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=i,this.options=$0(r,this.options||{},ab()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=c=>c.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(Q0),this.addDetector(Z0),this.addDetector(J0),this.addDetector(W0),this.addDetector(P0),this.addDetector(I0),this.addDetector(eb),this.addDetector(tb),this.addDetector(F0)}addDetector(i){return this.detectors[i.name]=i,this}detect(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return i.forEach(s=>{if(this.detectors[s]){let c=this.detectors[s].lookup(this.options);c&&typeof c=="string"&&(c=[c]),c&&(r=r.concat(c))}}),r=r.filter(s=>s!=null&&!K0(s)).map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(i)>-1||r.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(i,this.options)}))}}Yg.type="languageDetector";const nb={"nav.home":"Home","nav.studio":"Studio","nav.docs":"Docs","nav.login":"Login","nav.logout":"Logout","header.status.connected":"Connected","header.status.disconnected":"Disconnected","header.status.reconnecting":"Reconnecting","footer.copyright":"GitHub · @Context4AI {{year}}. All rights reserved.","footer.copyright_compact":"@Context4AI {{year}}. All rights reserved.","footer.tagline":"Knowledge Factory","footer.theme.dark":"Dark","footer.theme.light":"Light","footer.theme.system":"System","studio.sidebar.sources":"Sources","studio.sidebar.modeling":"Modeling","studio.sidebar.brain":"Brain","studio.sidebar.discovery":"Discovery","studio.sidebar.sharing":"Sharing","studio.sidebar.collaboration":"Collaboration","studio.sidebar.settings":"Settings","placeholder.coming":"Coming in {{version}}","page.login.title":"Login","page.login.description":"Authentication and user management.","page.docs.title":"Docs","page.docs.description":"Public documentation portal.","page.sources.title":"Sources","page.sources.description":"Add code repositories, documents, and other input materials for your brain to index.","page.modeling.title":"Modeling","page.modeling.description":"Model indexed content with AI — only what stands up to scrutiny gets written to the knowledge graph.","page.brain.title":"Brain","page.brain.description":"All modeled knowledge lives here — browse, search, analyze, and use it anytime.","page.discovery.title":"Discovery","page.discovery.description":"Explore knowledge curated by others and add what's useful to your own brain.","page.sharing.title":"Sharing","page.sharing.description":"Package and export knowledge from your brain for others and AI to use directly.","page.collaboration.title":"Collaboration","page.collaboration.description":"Stay in sync with other brains — get notified on updates, no manual transfer needed.","page.settings.title":"Settings","page.settings.description":"Manage workspace members and configuration.","page.code_setup.title":"Code Setup","page.code_setup.description":"Repository selection and configuration for code modeling.","page.code_compile.title":"Code Compile","page.code_compile.description":"Compilation progress tracking for code modeling.","page.code_review.title":"Code Review","page.code_review.description":"Review and approve modeling results.","page.code_result.title":"Code Result","page.code_result.description":"View final modeling results and generated knowledge graph.","home.hero.title":"Context For AI","home.hero.description":"Transform code repositories and business documents into structured knowledge graphs.","home.hero.cta.studio":"Enter Studio","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"The page you're looking for doesn't exist.","notfound.back":"Back to Home","sources.menu.add_client":"Add Client","sources.menu.online":"online","sources.menu.offline":"offline","sources.library.default_cloud_name":"Personal Cloud","sources.library.rename":"Rename","sources.library.rename_placeholder":"Enter library name","sources.header.daemon_status":"{{online}}/{{total}} online","sources.header.all_offline":"All offline","sources.actions.new_folder":"New Folder","sources.folder.name_placeholder":"Enter folder name","sources.actions.import_repo":"Import Repository","sources.actions.rename":"Rename","sources.actions.move_to":"Move to...","sources.actions.delete":"Delete","sources.filter.all":"All","sources.filter.indexed":"Indexed","sources.filter.not_indexed":"Not Indexed","sources.status.none":"None","sources.status.indexed":"Indexed","sources.status.stale":"Index outdated","sources.status.go_index":"Index","sources.type.code":"Code","sources.type.doc":"Document","sources.empty.cloud.title":"Your personal knowledge input zone","sources.empty.cloud.description":"Create folders to organize your documents and materials. These are visible only to you and will serve as the foundation for building your digital brain.","sources.empty.daemon.title":"Connect your local code assets","sources.empty.daemon.description":"Import local code repositories. The system will automatically extract code structures and technical documents, transforming them into structured knowledge.","sources.empty.indexed.title":"Knowledge not yet indexed","sources.empty.indexed.description":"Select sources and complete indexing. They will be transformed into structured summaries, providing material for your future speculations.","sources.empty.folder.title":"This folder is empty","sources.empty.folder.daemon_description":"You can add or edit documents locally, and they will appear here after the next sync.","sources.safety.notice.repo":"In local mode, your code has absolute privacy. Source code never leaves your computer. The system only extracts structured summaries for knowledge modeling (function signatures, dependencies, etc.).","sources.safety.notice.dir":"The system extracts document content and summaries for knowledge modeling. Although unsafe text is filtered, please ensure sensitive data is not included in indexing or modeling.","sources.import.title":"Import Repository","sources.import.step.select":"Select Repository","sources.import.step.version":"Version Selection","sources.import.step.confirm":"Confirm Import","sources.import.daemon_offline":"Client {{name}} is not connected. Please start the local Daemon and connect to the server before importing.","sources.import.view_guide":"View Connection Guide","sources.import.select_root":"Select repository root directory","sources.import.current_path":"Current path","sources.import.not_git":"This directory is not a Git repository. Please select a directory containing .git.","sources.import.branch":"Branch","sources.import.commit":"Commit","sources.import.branch_warning":"Currently based on {{branch}} branch HEAD","sources.import.uncommitted_warning":"Uncommitted changes will not be collected","sources.import.recognized":"Recognized {{packages}} packages and {{docs}} documents","sources.import.no_packages":"No package structure detected. Will be imported as a single-package repository.","sources.import.confirm_heading":"About to import the following repository to {{name}}:","sources.import.packages":"Packages","sources.import.documents":"Documents","sources.import.loading_repo":"Loading repository info...","sources.import.loading_repo_slow":"Large repositories (>10 GB) may take 5–10 seconds...","sources.import.importing":"Importing...","sources.import.error_title":"Import Failed","sources.import.success":"Import complete","sources.add_client.title":"Connect Local Knowledge Source","sources.add_client.description":"Start a client (Daemon) on your local computer to mount local code repositories as input material into your digital brain.","sources.add_client.step1":"Install Daemon","sources.add_client.step2":"Start Daemon","sources.add_client.step3":"Wait for connection","sources.add_client.step3_desc":"This page will update automatically once connected.","sources.add_client.waiting":"Waiting for new client connection...","sources.add_client.detected":"New client detected","sources.add_client.machine_name":"Machine ID","sources.add_client.os":"Operating system","sources.add_client.daemon_version":"Daemon version","sources.add_client.client_name":"Client name","sources.add_client.confirm":"Confirm Add","sources.add_client.reconnected":"Client {{name}} has reconnected","sources.add_client.go_to":"Go to {{name}}","sources.detail.tab.original":"Original","sources.detail.tab.overview":"Overview","sources.detail.tab.digest":"Digest","sources.detail.tab.modeling":"Modeling Result","sources.detail.digest_placeholder":"Structured summary will be available here after indexing is complete.","sources.detail.modeling_placeholder":"Knowledge entities derived from this source will appear here after modeling in the speculation zone.","sources.detail.type":"Type","sources.detail.origin":"Origin","sources.detail.origin.upload":"Upload","sources.detail.origin.local":"Local file","sources.detail.path":"Path","sources.detail.status":"Status","sources.detail.repo":"Repository","sources.detail.branch":"Branch","sources.detail.commit":"Commit","sources.detail.tech_stack":"Tech stack","sources.detail.original_code_placeholder":"Package overview will be available after indexing.","sources.detail.original_doc_placeholder":"Document content will be available after upload.","sources.detail.dependencies":"Dependencies","sources.delete.confirm_title":"Confirm Delete","sources.delete.resource":"Are you sure you want to delete {{name}}?","sources.delete.resource_impact":"The following data will be permanently deleted: original content, structured digest (if any).","sources.delete.session_warning":"If your personal speculation zone is using this source, related candidate speculations will be affected.","sources.delete.entity_safe":"Formal knowledge already merged into the brain will not be affected.","sources.delete.folder":"Are you sure you want to delete folder {{name}}?","sources.delete.folder_impact":"All resources inside will be recursively deleted: {{folders}} sub-folders, {{sources}} sources.","sources.delete.folder_contents":"Contains {{folders}} sub-folders, {{sources}} sources.","sources.delete.folder_impact_generic":"All sub-folders and resources inside will be recursively deleted.","sources.delete.irreversible":"This action cannot be undone.","sources.delete.repo":"Are you sure you want to remove repository {{name}} from {{library}}?","sources.delete.repo_impact":"Will delete: {{packages}} package index records, {{docs}} document index records.","sources.delete.repo_contents":"Contains {{packages}} packages, {{docs}} documents.","sources.delete.indexed_hint":"{{indexed}}/{{total}} have been indexed; their index data will be deleted.","sources.delete.repo_impact_generic":"All package and document index records will be deleted.","sources.delete.local_safe":"Local files will not be affected.","sources.delete.client":"Are you sure you want to delete client {{name}}?","sources.delete.client_impact":"All imported repository records and related index data under this client will be deleted.","sources.delete.client_reregister":"This client will need to re-register on next connection.","sources.error.name_conflict":'An item named "{{name}}" already exists in this directory.',"sources.move.current":"Current","sources.move.target":"Move to","sources.breadcrumb.sources":"Sources","common.cancel":"Cancel","common.confirm":"Confirm","common.back":"Back","common.next":"Next","common.previous":"Previous","common.items":"{{count}} items","common.loading":"Loading...","sources.import.no_entries":"No entries found","sources.import.allowed_dirs":"Client authorized directories","sources.import.allowed_dirs_tooltip_restrict":"Restrict to specific directories:","sources.import.allowed_dirs_tooltip_all":"Or allow all directories (default):","sources.import.wildcard_home":"Home","sources.import.wildcard_path_placeholder":"Enter a directory path…","sources.import.wildcard_go":"Go","sources.import.wildcard_goto":"Go to","sources.import.wildcard_go_title":"Go to Directory","sources.import.wildcard_path_not_found":"Path does not exist on the remote machine","sources.import.already_imported":"Imported","sources.import.dir_title":"Import Directory","sources.import.dir_step.select":"Select Directory","sources.import.dir_step.scan":"Scan","sources.import.dir_step.confirm":"Confirm Import","sources.import.dir_confirm_heading":"About to import the following directory to {{name}}:","sources.import.dir_name":"Directory Name","sources.import.dir_path":"Directory Path","sources.import.dir_files":"Files","sources.import.dir_subdirs":"Subdirectories","sources.import.dir_git_repos":"Repositories (skipped)","sources.import.dir_git_hint":"Git repositories inside the directory will not be expanded for indexing. Import them separately if needed.","sources.import.dir_scanning":"Scanning directory contents...","sources.import.dir_scan_complete":"Scan complete","sources.import.dir_scan_error":"Failed to scan directory","sources.import.dir_scan_retry":"Retry","sources.import.dir_code_packages":"Code Packages","sources.import.dir_code_packages_tip":"Supported: package.json, pyproject.toml, setup.py, go.mod, Cargo.toml, pom.xml, build.gradle","sources.import.dir_doc_files":"Documents","sources.import.dir_doc_files_tip":"Supported: Markdown (.md)","sources.import.dir_total_files":"Total Files","sources.import.dir_total_dirs":"Directories","sources.import.dir_git_skip_hint":"Git repos are skipped. Use 'Import Repository' instead.","sources.actions.upload":"Upload","sources.actions.upload_md":"Markdown Document","sources.actions.upload_doc":"Document","sources.actions.add":"Add","sources.actions.add_folder":"Folder","sources.actions.add_web":"Web Page","sources.actions.add_feishu":"Feishu Document","sources.actions.import_dir":"Import Directory","sources.actions.import_repo_url":"Import Repository","sources.upgrade.title":"Feature Upgrading","sources.upgrade.description":"This feature will be available in version 0.5.x. Stay tuned.","sources.upload.title":"Upload Documents","sources.upload.drop_hint":"Click to select or drag files here","sources.upload.supported_formats":"Supported: .md, .doc, .docx, .pdf, .ppt, .pptx, .txt (max 5MB each, up to 10 files)","sources.upload.file_too_large":'"{{name}}" exceeds 5MB limit',"sources.upload.too_many_files":"Maximum 10 files allowed, please re-select","sources.upload.unsupported_type":'"{{name}}" is not a supported file type',"sources.upload.uploading":"Uploading...","sources.upload.success":"Uploaded {{count}} documents","sources.upload.selected":"{{count}} files selected","sources.upload.remove":"Remove"},lb={"nav.home":"首页","nav.studio":"工作台","nav.docs":"文档","nav.login":"登录","nav.logout":"退出登录","header.status.connected":"已连接","header.status.disconnected":"已断开","header.status.reconnecting":"重连中","footer.copyright":"GitHub · @Context4AI {{year}}. 版权所有","footer.copyright_compact":"@Context4AI {{year}}. 版权所有","footer.tagline":"知识工厂","footer.theme.dark":"暗色","footer.theme.light":"亮色","footer.theme.system":"跟随系统","studio.sidebar.sources":"知识索引","studio.sidebar.modeling":"知识建模","studio.sidebar.brain":"知识大脑","studio.sidebar.discovery":"发现知识","studio.sidebar.sharing":"分享知识","studio.sidebar.collaboration":"知识协同","studio.sidebar.settings":"设置","placeholder.coming":"计划在 {{version}} 版本实现","page.login.title":"登录","page.login.description":"身份验证与用户管理。","page.docs.title":"文档","page.docs.description":"公开文档门户。","page.sources.title":"知识索引","page.sources.description":"添加代码仓库、文档等输入材料,让大脑完成初步索引。","page.modeling.title":"知识建模","page.modeling.description":"和 AI 一起对索引内容建模,只有经得起推敲的才写入知识图谱。","page.brain.title":"知识大脑","page.brain.description":"建模完成的全部知识都在这里——浏览、搜索、分析,随时调用。","page.discovery.title":"发现知识","page.discovery.description":"看看别人整理好的知识,发现有用的一键补充到自己的大脑。","page.sharing.title":"分享知识","page.sharing.description":"把大脑中的知识打包输出,让别人和 AI 都能直接使用。","page.collaboration.title":"知识协同","page.collaboration.description":"和其他大脑保持同步,知识更新时自动通知,不用手动搬运。","page.settings.title":"设置","page.settings.description":"管理大脑的成员和配置。","page.code_setup.title":"代码设置","page.code_setup.description":"代码建模的仓库选择与配置。","page.code_compile.title":"代码编译","page.code_compile.description":"代码建模的编译进度追踪。","page.code_review.title":"代码审查","page.code_review.description":"审查并确认建模结果。","page.code_result.title":"代码结果","page.code_result.description":"查看最终建模结果与生成的知识图谱。","home.hero.title":"Context For AI","home.hero.description":"将代码仓库和业务文档转化为结构化知识图谱。","home.hero.cta.studio":"进入工作台","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"您访问的页面不存在。","notfound.back":"返回首页","sources.menu.add_client":"添加客户端","sources.menu.online":"在线","sources.menu.offline":"离线","sources.library.default_cloud_name":"个人云","sources.library.rename":"重命名","sources.library.rename_placeholder":"输入名称","sources.header.daemon_status":"{{online}}/{{total}} 在线","sources.header.all_offline":"全部离线","sources.actions.new_folder":"新文件夹","sources.folder.name_placeholder":"输入文件夹名称","sources.actions.import_repo":"导入仓库","sources.actions.rename":"重命名","sources.actions.move_to":"移动到...","sources.actions.delete":"删除","sources.filter.all":"全部","sources.filter.indexed":"已索引","sources.filter.not_indexed":"未索引","sources.status.none":"未索引","sources.status.indexed":"已索引","sources.status.stale":"有新变更未更新索引","sources.status.go_index":"去索引","sources.type.code":"代码","sources.type.doc":"文档","sources.empty.cloud.title":"这里是你专属的知识输入区","sources.empty.cloud.description":"创建文件夹来整理你的文档和材料。这些内容仅你个人可见,将成为后续推演、构建数字大脑的基础。","sources.empty.daemon.title":"连接你的本地代码资产","sources.empty.daemon.description":"导入本地代码仓库,系统会自动提取代码结构与技术文档,将其转化为结构化知识。","sources.empty.indexed.title":"这些知识尚未被索引","sources.empty.indexed.description":"选择资源并完成索引后,它们将转化为结构化摘要,为你后续的推演提供素材。","sources.empty.folder.title":"当前文件夹还没有内容","sources.empty.folder.daemon_description":"你可以在本地进行文档新增、编辑后查看。","sources.safety.notice.repo":"在本地模式下,你的代码保有绝对隐私,源代码永远不会离开你的电脑,系统仅提取用于知识建模的结构化摘要(函数签名、依赖关系等)。","sources.safety.notice.dir":"系统会提取用于知识建模的文档内容及摘要,尽管会过滤不安全的文本内容,但请确保敏感数据不要参与索引及建模。","sources.import.title":"导入代码仓库","sources.import.step.select":"选择仓库","sources.import.step.version":"版本选择","sources.import.step.confirm":"确认导入","sources.import.daemon_offline":"客户端 {{name}} 未连接,请先启动本地 Daemon 并连接到服务器后再导入仓库。","sources.import.view_guide":"查看连接指引","sources.import.select_root":"选择仓库根目录","sources.import.current_path":"当前路径","sources.import.not_git":"该目录不是 Git 仓库,请选择包含 .git 的目录。","sources.import.branch":"分支","sources.import.commit":"提交","sources.import.branch_warning":"当前基于 {{branch}} 分支的 HEAD","sources.import.uncommitted_warning":"未提交的修改不会被采集","sources.import.recognized":"已识别 {{packages}} 个包和 {{docs}} 篇文档","sources.import.no_packages":"未识别到包结构,将作为单包仓库导入。","sources.import.confirm_heading":"即将导入以下仓库到 {{name}}:","sources.import.packages":"包数","sources.import.documents":"文档","sources.import.loading_repo":"正在加载仓库信息...","sources.import.loading_repo_slow":"大型仓库(>10 GB)可能需要 5~10 秒...","sources.import.importing":"导入中...","sources.import.error_title":"导入失败","sources.import.success":"导入完成","sources.add_client.title":"接入本地知识源","sources.add_client.description":"在本地计算机上启动客户端 (Daemon),即可将本地代码仓库作为输入材料,挂载到你的数字大脑中。","sources.add_client.step1":"安装 Daemon","sources.add_client.step2":"启动 Daemon","sources.add_client.step3":"等待连接","sources.add_client.step3_desc":"连接成功后,本页面将自动更新。","sources.add_client.waiting":"等待新的客户端连接...","sources.add_client.detected":"检测到新的本地客户端","sources.add_client.machine_name":"机器标识","sources.add_client.os":"操作系统","sources.add_client.daemon_version":"Daemon 版本","sources.add_client.client_name":"客户端名称","sources.add_client.confirm":"确认添加","sources.add_client.reconnected":"客户端 {{name}} 已重新连接","sources.add_client.go_to":"前往 {{name}}","sources.detail.tab.original":"原文","sources.detail.tab.overview":"概览","sources.detail.tab.digest":"摘要","sources.detail.tab.modeling":"建模结果","sources.detail.digest_placeholder":"完成索引后,即可在此查看结构化摘要。","sources.detail.modeling_placeholder":"在推演区完成建模后,此处将展示由该源产生的知识实体。","sources.detail.type":"类型","sources.detail.origin":"来源","sources.detail.origin.upload":"直接上传","sources.detail.origin.local":"本地文件","sources.detail.path":"路径","sources.detail.status":"状态","sources.detail.repo":"仓库","sources.detail.branch":"分支","sources.detail.commit":"提交","sources.detail.tech_stack":"技术栈","sources.detail.original_code_placeholder":"完成索引后即可查看包概览。","sources.detail.original_doc_placeholder":"文档内容将在上传后展示。","sources.detail.dependencies":"依赖","sources.delete.confirm_title":"确认删除","sources.delete.resource":"确定要删除 {{name}}?","sources.delete.resource_impact":"以下数据将被永久删除:原文内容、结构化摘要(如有)。","sources.delete.session_warning":"如果你的个人推演区正在使用此知识源,相关的候选推演将受到影响。","sources.delete.entity_safe":"已汇入大脑的正式知识不受影响。","sources.delete.folder":"确定要删除文件夹 {{name}}?","sources.delete.folder_impact":"文件夹内的所有资源将被递归删除:{{folders}} 个子文件夹、{{sources}} 个知识源。","sources.delete.folder_contents":"包含 {{folders}} 个子文件夹、{{sources}} 个知识源。","sources.delete.folder_impact_generic":"文件夹内的所有子文件夹和知识源将被递归删除。","sources.delete.irreversible":"此操作不可撤销。","sources.delete.repo":"确定要从 {{library}} 中移除仓库 {{name}}?","sources.delete.repo_impact":"将删除:{{packages}} 个包的索引记录、{{docs}} 篇文档的索引记录。","sources.delete.repo_contents":"包含 {{packages}} 个包、{{docs}} 个文档。","sources.delete.indexed_hint":"其中 {{indexed}}/{{total}} 个已建立索引,索引数据将被删除。","sources.delete.repo_impact_generic":"所有包和文档的索引记录将被删除。","sources.delete.local_safe":"本地文件不受影响。","sources.delete.client":"确定要删除客户端 {{name}}?","sources.delete.client_impact":"该客户端下的所有已导入仓库记录和相关索引数据将被删除。","sources.delete.client_reregister":"该客户端下次连接时将触发重新注册。","sources.error.name_conflict":'该目录下已存在同名项"{{name}}"。',"sources.move.current":"当前位置","sources.move.target":"移动到","sources.breadcrumb.sources":"知识索引","common.cancel":"取消","common.confirm":"确认","common.back":"返回","common.next":"下一步","common.previous":"上一步","common.items":"{{count}} 项","common.loading":"加载中...","sources.import.no_entries":"未找到任何条目","sources.import.allowed_dirs":"客户端授权目录","sources.import.allowed_dirs_tooltip_restrict":"通过参数设定有权限的目录:","sources.import.allowed_dirs_tooltip_all":"或默认允许全部目录:","sources.import.wildcard_home":"主目录","sources.import.wildcard_path_placeholder":"输入目录路径…","sources.import.wildcard_go":"前往","sources.import.wildcard_goto":"前往","sources.import.wildcard_go_title":"前往目录","sources.import.wildcard_path_not_found":"该路径在远程机器上不存在","sources.import.already_imported":"已导入","sources.import.dir_title":"导入目录","sources.import.dir_step.select":"选择目录","sources.import.dir_step.scan":"扫描","sources.import.dir_step.confirm":"确认导入","sources.import.dir_confirm_heading":"即将导入以下目录到 {{name}}:","sources.import.dir_name":"目录名","sources.import.dir_path":"目录路径","sources.import.dir_files":"文件数","sources.import.dir_subdirs":"子目录数","sources.import.dir_git_repos":"仓库(已跳过)","sources.import.dir_git_hint":"目录内的 Git 仓库不会被展开索引,如需索引请单独导入仓库。","sources.import.dir_scanning":"正在扫描目录内容...","sources.import.dir_scan_complete":"扫描完成","sources.import.dir_scan_error":"目录扫描失败","sources.import.dir_scan_retry":"重试","sources.import.dir_code_packages":"代码包","sources.import.dir_code_packages_tip":"支持:package.json、pyproject.toml、setup.py、go.mod、Cargo.toml、pom.xml、build.gradle","sources.import.dir_doc_files":"文档","sources.import.dir_doc_files_tip":"支持:Markdown (.md)","sources.import.dir_total_files":"文件总数","sources.import.dir_total_dirs":"目录","sources.import.dir_git_skip_hint":"Git 仓库将被跳过,建议单独使用「导入仓库」。","sources.actions.upload":"上传","sources.actions.upload_md":"Markdown 文档","sources.actions.upload_doc":"文档","sources.actions.add":"新增","sources.actions.add_folder":"文件夹","sources.actions.add_web":"网页","sources.actions.add_feishu":"飞书文档","sources.actions.import_dir":"导入目录","sources.actions.import_repo_url":"导入仓库","sources.upgrade.title":"功能升级中","sources.upgrade.description":"此功能将在 0.5.x 版本中推出,敬请期待。","sources.upload.title":"上传文档","sources.upload.drop_hint":"点击选择文件或拖拽至此","sources.upload.supported_formats":"支持格式:.md, .doc, .docx, .pdf, .ppt, .pptx, .txt(每个最大 5MB,最多 10 个)","sources.upload.file_too_large":'"{{name}}" 超过 5MB 限制',"sources.upload.too_many_files":"最多上传 10 个文件,请重新选择","sources.upload.unsupported_type":'"{{name}}" 不是支持的文件类型',"sources.upload.uploading":"上传中...","sources.upload.success":"已上传 {{count}} 个文档","sources.upload.selected":"已选择 {{count}} 个文件","sources.upload.remove":"移除"};Ft.use(Yg).use(M0).init({resources:{en:{translation:nb},zh:{translation:lb}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var ku={exports:{}},mr={},Uu={exports:{}},Hu={};var Dp;function ib(){return Dp||(Dp=1,(function(n){function i(M,W){var ue=M.length;M.push(W);e:for(;0<ue;){var oe=ue-1>>>1,Ce=M[oe];if(0<c(Ce,W))M[oe]=W,M[ue]=Ce,ue=oe;else break e}}function r(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var W=M[0],ue=M.pop();if(ue!==W){M[0]=ue;e:for(var oe=0,Ce=M.length,E=Ce>>>1;oe<E;){var Y=2*(oe+1)-1,I=M[Y],le=Y+1,be=M[le];if(0>c(I,ue))le<Ce&&0>c(be,I)?(M[oe]=be,M[le]=ue,oe=le):(M[oe]=I,M[Y]=ue,oe=Y);else if(le<Ce&&0>c(be,ue))M[oe]=be,M[le]=ue,oe=le;else break e}}return W}function c(M,W){var ue=M.sortIndex-W.sortIndex;return ue!==0?ue:M.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var g=[],m=[],b=1,x=null,_=3,j=!1,w=!1,D=!1,A=!1,Q=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function Z(M){for(var W=r(m);W!==null;){if(W.callback===null)s(m);else if(W.startTime<=M)s(m),W.sortIndex=W.expirationTime,i(g,W);else break;W=r(m)}}function K(M){if(D=!1,Z(M),!w)if(r(g)!==null)w=!0,ae||(ae=!0,se());else{var W=r(m);W!==null&&ce(K,W.startTime-M)}}var ae=!1,P=-1,R=5,U=-1;function $(){return A?!0:!(n.unstable_now()-U<R)}function de(){if(A=!1,ae){var M=n.unstable_now();U=M;var W=!0;try{e:{w=!1,D&&(D=!1,J(P),P=-1),j=!0;var ue=_;try{t:{for(Z(M),x=r(g);x!==null&&!(x.expirationTime>M&&$());){var oe=x.callback;if(typeof oe=="function"){x.callback=null,_=x.priorityLevel;var Ce=oe(x.expirationTime<=M);if(M=n.unstable_now(),typeof Ce=="function"){x.callback=Ce,Z(M),W=!0;break t}x===r(g)&&s(g),Z(M)}else s(g);x=r(g)}if(x!==null)W=!0;else{var E=r(m);E!==null&&ce(K,E.startTime-M),W=!1}}break e}finally{x=null,_=ue,j=!1}W=void 0}}finally{W?se():ae=!1}}}var se;if(typeof G=="function")se=function(){G(de)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,te=ve.port2;ve.port1.onmessage=de,se=function(){te.postMessage(null)}}else se=function(){Q(de,0)};function ce(M,W){P=Q(function(){M(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(M){switch(_){case 1:case 2:case 3:var W=3;break;default:W=_}var ue=_;_=W;try{return M()}finally{_=ue}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ue=_;_=M;try{return W()}finally{_=ue}},n.unstable_scheduleCallback=function(M,W,ue){var oe=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?oe+ue:oe):ue=oe,M){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=ue+Ce,M={id:b++,callback:W,priorityLevel:M,startTime:ue,expirationTime:Ce,sortIndex:-1},ue>oe?(M.sortIndex=ue,i(m,M),r(g)===null&&M===r(m)&&(D?(J(P),P=-1):D=!0,ce(K,ue-oe))):(M.sortIndex=Ce,i(g,M),w||j||(w=!0,ae||(ae=!0,se()))),M},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(M){var W=_;return function(){var ue=_;_=W;try{return M.apply(this,arguments)}finally{_=ue}}}})(Hu)),Hu}var Mp;function rb(){return Mp||(Mp=1,Uu.exports=ib()),Uu.exports}var Bu={exports:{}},$t={};var Ap;function sb(){if(Ap)return $t;Ap=1;var n=ho();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(g,m,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:x==null?null:""+x,children:g,containerInfo:m,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,$t.createPortal=function(g,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return u(g,m,null,b)},$t.flushSync=function(g){var m=h.T,b=s.p;try{if(h.T=null,s.p=2,g)return g()}finally{h.T=m,s.p=b,s.d.f()}},$t.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(g,m))},$t.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},$t.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var b=m.as,x=p(b,m.crossOrigin),_=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?s.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:_,fetchPriority:j}):b==="script"&&s.d.X(g,{crossOrigin:x,integrity:_,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},$t.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=p(m.as,m.crossOrigin);s.d.M(g,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(g)},$t.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,x=p(b,m.crossOrigin);s.d.L(g,b,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},$t.preloadModule=function(g,m){if(typeof g=="string")if(m){var b=p(m.as,m.crossOrigin);s.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(g)},$t.requestFormReset=function(g){s.d.r(g)},$t.unstable_batchedUpdates=function(g,m){return g(m)},$t.useFormState=function(g,m,b){return h.H.useFormState(g,m,b)},$t.useFormStatus=function(){return h.H.useHostTransitionStatus()},$t.version="19.2.4",$t}var Lp;function ob(){if(Lp)return Bu.exports;Lp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Bu.exports=sb(),Bu.exports}var kp;function cb(){if(kp)return mr;kp=1;var n=rb(),i=ho(),r=ob();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(u(e)!==e)throw Error(s(188))}function m(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var d=o.alternate;if(d===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===d.child){for(d=o.child;d;){if(d===a)return g(o),e;if(d===l)return g(o),t;d=d.sibling}throw Error(s(188))}if(a.return!==l.return)a=o,l=d;else{for(var y=!1,S=o.child;S;){if(S===a){y=!0,a=o,l=d;break}if(S===l){y=!0,l=o,a=d;break}S=S.sibling}if(!y){for(S=d.child;S;){if(S===a){y=!0,a=d,l=o;break}if(S===l){y=!0,l=d,a=o;break}S=S.sibling}if(!y)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,_=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),G=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case Q:return"Profiler";case A:return"StrictMode";case K:return"Suspense";case ae:return"SuspenseList";case U:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case G:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var ce=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},oe=[],Ce=-1;function E(e){return{current:e}}function Y(e){0>Ce||(e.current=oe[Ce],oe[Ce]=null,Ce--)}function I(e,t){Ce++,oe[Ce]=e.current,e.current=t}var le=E(null),be=E(null),je=E(null),Te=E(null);function ut(e,t){switch(I(je,t),I(be,e),I(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Tm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Tm(t),e=Om(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(le),I(le,e)}function fe(){Y(le),Y(be),Y(je)}function zt(e){e.memoizedState!==null&&I(Te,e);var t=le.current,a=Om(t,e.type);t!==a&&(I(be,e),I(le,a))}function Yt(e){be.current===e&&(Y(le),Y(be)),Te.current===e&&(Y(Te),or._currentValue=ue)}var it,We;function ht(e){if(it===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);it=t&&t[1]||"",We=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+it+e+We}var Mt=!1;function Aa(e,t){if(!e||Mt)return"";Mt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(q){var H=q}Reflect.construct(e,[],F)}else{try{F.call()}catch(q){H=q}e.call(F.prototype)}}else{try{throw Error()}catch(q){H=q}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(q){if(q&&H&&typeof q.stack=="string")return[q.stack,H.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),y=d[0],S=d[1];if(y&&S){var N=y.split(`
|
|
4
|
+
`),k=S.split(`
|
|
5
|
+
`);for(o=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;o<k.length&&!k[o].includes("DetermineComponentFrameRoot");)o++;if(l===N.length||o===k.length)for(l=N.length-1,o=k.length-1;1<=l&&0<=o&&N[l]!==k[o];)o--;for(;1<=l&&0<=o;l--,o--)if(N[l]!==k[o]){if(l!==1||o!==1)do if(l--,o--,0>o||N[l]!==k[o]){var V=`
|
|
6
|
+
`+N[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=o);break}}}finally{Mt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ht(a):""}function Jt(e,t){switch(e.tag){case 26:case 27:case 5:return ht(e.type);case 16:return ht("Lazy");case 13:return e.child!==t&&t!==null?ht("Suspense Fallback"):ht("Suspense");case 19:return ht("SuspenseList");case 0:case 15:return Aa(e.type,!1);case 11:return Aa(e.type.render,!1);case 1:return Aa(e.type,!0);case 31:return ht("Activity");default:return""}}function Vt(e){try{var t="",a=null;do t+=Jt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var ya=Object.prototype.hasOwnProperty,ia=n.unstable_scheduleCallback,en=n.unstable_cancelCallback,tl=n.unstable_shouldYield,Nn=n.unstable_requestPaint,At=n.unstable_now,xa=n.unstable_getCurrentPriorityLevel,La=n.unstable_ImmediatePriority,al=n.unstable_UserBlockingPriority,Ga=n.unstable_NormalPriority,ra=n.unstable_LowPriority,Wt=n.unstable_IdlePriority,zl=n.log,ji=n.unstable_setDisableYieldValue,ka=null,Lt=null;function St(e){if(typeof zl=="function"&&ji(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(ka,e)}catch{}}var Tt=Math.clz32?Math.clz32:Ee,Tl=Math.log,re=Math.LN2;function Ee(e){return e>>>=0,e===0?32:31-(Tl(e)/re|0)|0}var Ze=256,dt=262144,Pe=4194304;function Pt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function tn(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~d,l!==0?o=Pt(l):(y&=S,y!==0?o=Pt(y):a||(a=S&~e,a!==0&&(o=Pt(a))))):(S=l&~d,S!==0?o=Pt(S):y!==0?o=Pt(y):a||(a=l&~e,a!==0&&(o=Pt(a)))),o===0?0:t!==0&&t!==o&&(t&d)===0&&(d=o&-o,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:o}function va(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ni(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nl(){var e=Pe;return Pe<<=1,(Pe&62914560)===0&&(Pe=4194304),e}function wn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function $a(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ur(e,t,a,l,o,d){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,N=e.expirationTimes,k=e.hiddenUpdates;for(a=y&~a;0<a;){var V=31-Tt(a),F=1<<V;S[V]=0,N[V]=-1;var H=k[V];if(H!==null)for(k[V]=null,V=0;V<H.length;V++){var q=H[V];q!==null&&(q.lane&=-536870913)}a&=~F}l!==0&&Hr(e,l,0),d!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function Hr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Tt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Br(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Tt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function C(e,t){var a=t&-t;return a=(a&42)!==0?1:T(a),(a&(e.suspendedLanes|t))!==0?0:a}function T(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function B(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ee(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:ep(e.type))}function ne(e,t){var a=W.p;try{return W.p=e,t()}finally{W.p=a}}var pe=Math.random().toString(36).slice(2),ie="__reactFiber$"+pe,he="__reactProps$"+pe,me="__reactContainer$"+pe,Se="__reactEvents$"+pe,Ne="__reactListeners$"+pe,xe="__reactHandles$"+pe,$e="__reactResources$"+pe,ke="__reactMarker$"+pe;function at(e){delete e[ie],delete e[he],delete e[Se],delete e[Ne],delete e[xe]}function rt(e){var t=e[ie];if(t)return t;for(var a=e.parentNode;a;){if(t=a[me]||a[ie]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Hm(e);e!==null;){if(a=e[ie])return a;e=Hm(e)}return t}e=a,a=e.parentNode}return null}function mt(e){if(e=e[ie]||e[me]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ge(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Ct(e){var t=e[$e];return t||(t=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[ke]=!0}var En=new Set,Ua={};function Ot(e,t){Ka(e,t),Ka(e+"Capture",t)}function Ka(e,t){for(Ua[e]=t,e=0;e<t.length;e++)En.add(t[e])}var ll=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Xa={},il={};function Ol(e){return ya.call(il,e)?!0:ya.call(Xa,e)?!1:ll.test(e)?il[e]=!0:(Xa[e]=!0,!1)}function Ue(e,t,a){if(Ol(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function xt(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Gt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function _t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function st(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dl(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(y){a=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ml(e){if(!e._valueTracker){var t=st(e)?"checked":"value";e._valueTracker=Dl(e,t,""+e[t])}}function qr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=st(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Yr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Vy=/[\n"\\]/g;function ba(e){return e.replace(Vy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function jo(e,t,a,l,o,d,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_t(t)):e.value!==""+_t(t)&&(e.value=""+_t(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?No(e,y,_t(t)):a!=null?No(e,y,_t(a)):l!=null&&e.removeAttribute("value"),o==null&&d!=null&&(e.defaultChecked=!!d),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+_t(S):e.removeAttribute("name")}function jd(e,t,a,l,o,d,y,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Ml(e);return}a=a!=null?""+_t(a):"",t=t!=null?""+_t(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Ml(e)}function No(e,t,a){t==="number"&&Yr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Al(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+_t(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Nd(e,t,a){if(t!=null&&(t=""+_t(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+_t(a):""}function wd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(ce(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=_t(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Ml(e)}function Ll(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Gy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ed(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Gy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Cd(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Ed(e,o,l)}else for(var d in t)t.hasOwnProperty(d)&&Ed(e,d,t[d])}function wo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $y=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ky=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Vr(e){return Ky.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function an(){}var Eo=null;function Co(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kl=null,Ul=null;function Rd(e){var t=mt(e);if(t&&(e=t.stateNode)){var a=e[he]||null;e:switch(e=t.stateNode,t.type){case"input":if(jo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ba(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[he]||null;if(!o)throw Error(s(90));jo(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&qr(l)}break e;case"textarea":Nd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Al(e,!!a.multiple,t,!1)}}}var Ro=!1;function zd(e,t,a){if(Ro)return e(t,a);Ro=!0;try{var l=e(t);return l}finally{if(Ro=!1,(kl!==null||Ul!==null)&&(zs(),kl&&(t=kl,e=Ul,Ul=kl=null,Rd(t),e)))for(t=0;t<e.length;t++)Rd(e[t])}}function wi(e,t){var a=e.stateNode;if(a===null)return null;var l=a[he]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zo=!1;if(nn)try{var Ei={};Object.defineProperty(Ei,"passive",{get:function(){zo=!0}}),window.addEventListener("test",Ei,Ei),window.removeEventListener("test",Ei,Ei)}catch{zo=!1}var Cn=null,To=null,Gr=null;function Td(){if(Gr)return Gr;var e,t=To,a=t.length,l,o="value"in Cn?Cn.value:Cn.textContent,d=o.length;for(e=0;e<a&&t[e]===o[e];e++);var y=a-e;for(l=1;l<=y&&t[a-l]===o[d-l];l++);return Gr=o.slice(e,1<l?1-l:void 0)}function $r(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Kr(){return!0}function Od(){return!1}function It(e){function t(a,l,o,d,y){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Kr:Od,this.isPropagationStopped=Od,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Kr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Kr)},persist:function(){},isPersistent:Kr}),t}var rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xr=It(rl),Ci=x({},rl,{view:0,detail:0}),Xy=It(Ci),Oo,Do,Ri,Qr=x({},Ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ao,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ri&&(Ri&&e.type==="mousemove"?(Oo=e.screenX-Ri.screenX,Do=e.screenY-Ri.screenY):Do=Oo=0,Ri=e),Oo)},movementY:function(e){return"movementY"in e?e.movementY:Do}}),Dd=It(Qr),Qy=x({},Qr,{dataTransfer:0}),Zy=It(Qy),Fy=x({},Ci,{relatedTarget:0}),Mo=It(Fy),Jy=x({},rl,{animationName:0,elapsedTime:0,pseudoElement:0}),Wy=It(Jy),Py=x({},rl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Iy=It(Py),ex=x({},rl,{data:0}),Md=It(ex),tx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ax={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nx[e])?!!t[e]:!1}function Ao(){return lx}var ix=x({},Ci,{key:function(e){if(e.key){var t=tx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$r(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ax[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ao,charCode:function(e){return e.type==="keypress"?$r(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$r(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rx=It(ix),sx=x({},Qr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ad=It(sx),ox=x({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ao}),cx=It(ox),ux=x({},rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),dx=It(ux),fx=x({},Qr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),hx=It(fx),mx=x({},rl,{newState:0,oldState:0}),px=It(mx),gx=[9,13,27,32],Lo=nn&&"CompositionEvent"in window,zi=null;nn&&"documentMode"in document&&(zi=document.documentMode);var yx=nn&&"TextEvent"in window&&!zi,Ld=nn&&(!Lo||zi&&8<zi&&11>=zi),kd=" ",Ud=!1;function Hd(e,t){switch(e){case"keyup":return gx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hl=!1;function xx(e,t){switch(e){case"compositionend":return Bd(t);case"keypress":return t.which!==32?null:(Ud=!0,kd);case"textInput":return e=t.data,e===kd&&Ud?null:e;default:return null}}function vx(e,t){if(Hl)return e==="compositionend"||!Lo&&Hd(e,t)?(e=Td(),Gr=To=Cn=null,Hl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ld&&t.locale!=="ko"?null:t.data;default:return null}}var bx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bx[e.type]:t==="textarea"}function Yd(e,t,a,l){kl?Ul?Ul.push(l):Ul=[l]:kl=l,t=ks(t,"onChange"),0<t.length&&(a=new Xr("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Ti=null,Oi=null;function Sx(e){Nm(e,0)}function Zr(e){var t=Ge(e);if(qr(t))return e}function Vd(e,t){if(e==="change")return t}var Gd=!1;if(nn){var ko;if(nn){var Uo="oninput"in document;if(!Uo){var $d=document.createElement("div");$d.setAttribute("oninput","return;"),Uo=typeof $d.oninput=="function"}ko=Uo}else ko=!1;Gd=ko&&(!document.documentMode||9<document.documentMode)}function Kd(){Ti&&(Ti.detachEvent("onpropertychange",Xd),Oi=Ti=null)}function Xd(e){if(e.propertyName==="value"&&Zr(Oi)){var t=[];Yd(t,Oi,e,Co(e)),zd(Sx,t)}}function _x(e,t,a){e==="focusin"?(Kd(),Ti=t,Oi=a,Ti.attachEvent("onpropertychange",Xd)):e==="focusout"&&Kd()}function jx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zr(Oi)}function Nx(e,t){if(e==="click")return Zr(t)}function wx(e,t){if(e==="input"||e==="change")return Zr(t)}function Ex(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sa=typeof Object.is=="function"?Object.is:Ex;function Di(e,t){if(sa(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!ya.call(t,o)||!sa(e[o],t[o]))return!1}return!0}function Qd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zd(e,t){var a=Qd(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Qd(a)}}function Fd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Yr(e.document)}return t}function Ho(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Cx=nn&&"documentMode"in document&&11>=document.documentMode,Bl=null,Bo=null,Mi=null,qo=!1;function Wd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;qo||Bl==null||Bl!==Yr(l)||(l=Bl,"selectionStart"in l&&Ho(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Mi&&Di(Mi,l)||(Mi=l,l=ks(Bo,"onSelect"),0<l.length&&(t=new Xr("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Bl)))}function sl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ql={animationend:sl("Animation","AnimationEnd"),animationiteration:sl("Animation","AnimationIteration"),animationstart:sl("Animation","AnimationStart"),transitionrun:sl("Transition","TransitionRun"),transitionstart:sl("Transition","TransitionStart"),transitioncancel:sl("Transition","TransitionCancel"),transitionend:sl("Transition","TransitionEnd")},Yo={},Pd={};nn&&(Pd=document.createElement("div").style,"AnimationEvent"in window||(delete ql.animationend.animation,delete ql.animationiteration.animation,delete ql.animationstart.animation),"TransitionEvent"in window||delete ql.transitionend.transition);function ol(e){if(Yo[e])return Yo[e];if(!ql[e])return e;var t=ql[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Pd)return Yo[e]=t[a];return e}var Id=ol("animationend"),ef=ol("animationiteration"),tf=ol("animationstart"),Rx=ol("transitionrun"),zx=ol("transitionstart"),Tx=ol("transitioncancel"),af=ol("transitionend"),nf=new Map,Vo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vo.push("scrollEnd");function Ha(e,t){nf.set(e,t),Ot(t,[e])}var Fr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Sa=[],Yl=0,Go=0;function Jr(){for(var e=Yl,t=Go=Yl=0;t<e;){var a=Sa[t];Sa[t++]=null;var l=Sa[t];Sa[t++]=null;var o=Sa[t];Sa[t++]=null;var d=Sa[t];if(Sa[t++]=null,l!==null&&o!==null){var y=l.pending;y===null?o.next=o:(o.next=y.next,y.next=o),l.pending=o}d!==0&&lf(a,o,d)}}function Wr(e,t,a,l){Sa[Yl++]=e,Sa[Yl++]=t,Sa[Yl++]=a,Sa[Yl++]=l,Go|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function $o(e,t,a,l){return Wr(e,t,a,l),Pr(e)}function cl(e,t){return Wr(e,null,null,t),Pr(e)}function lf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,d=e.return;d!==null;)d.childLanes|=a,l=d.alternate,l!==null&&(l.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(o=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,o&&t!==null&&(o=31-Tt(a),e=d.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),d):null}function Pr(e){if(50<tr)throw tr=0,Ic=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Vl={};function Ox(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oa(e,t,a,l){return new Ox(e,t,a,l)}function Ko(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ln(e,t){var a=e.alternate;return a===null?(a=oa(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function rf(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ir(e,t,a,l,o,d){var y=0;if(l=e,typeof e=="function")Ko(e)&&(y=1);else if(typeof e=="string")y=kv(e,a,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case U:return e=oa(31,a,t,o),e.elementType=U,e.lanes=d,e;case D:return ul(a.children,o,d,t);case A:y=8,o|=24;break;case Q:return e=oa(12,a,t,o|2),e.elementType=Q,e.lanes=d,e;case K:return e=oa(13,a,t,o),e.elementType=K,e.lanes=d,e;case ae:return e=oa(19,a,t,o),e.elementType=ae,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:y=10;break e;case J:y=9;break e;case Z:y=11;break e;case P:y=14;break e;case R:y=16,l=null;break e}y=29,a=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=oa(y,a,t,o),t.elementType=e,t.type=l,t.lanes=d,t}function ul(e,t,a,l){return e=oa(7,e,l,t),e.lanes=a,e}function Xo(e,t,a){return e=oa(6,e,null,t),e.lanes=a,e}function sf(e){var t=oa(18,null,null,0);return t.stateNode=e,t}function Qo(e,t,a){return t=oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var of=new WeakMap;function _a(e,t){if(typeof e=="object"&&e!==null){var a=of.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Vt(t)},of.set(e,t),t)}return{value:e,source:t,stack:Vt(t)}}var Gl=[],$l=0,es=null,Ai=0,ja=[],Na=0,Rn=null,Qa=1,Za="";function rn(e,t){Gl[$l++]=Ai,Gl[$l++]=es,es=e,Ai=t}function cf(e,t,a){ja[Na++]=Qa,ja[Na++]=Za,ja[Na++]=Rn,Rn=e;var l=Qa;e=Za;var o=32-Tt(l)-1;l&=~(1<<o),a+=1;var d=32-Tt(t)+o;if(30<d){var y=o-o%5;d=(l&(1<<y)-1).toString(32),l>>=y,o-=y,Qa=1<<32-Tt(t)+o|a<<o|l,Za=d+e}else Qa=1<<d|a<<o|l,Za=e}function Zo(e){e.return!==null&&(rn(e,1),cf(e,1,0))}function Fo(e){for(;e===es;)es=Gl[--$l],Gl[$l]=null,Ai=Gl[--$l],Gl[$l]=null;for(;e===Rn;)Rn=ja[--Na],ja[Na]=null,Za=ja[--Na],ja[Na]=null,Qa=ja[--Na],ja[Na]=null}function uf(e,t){ja[Na++]=Qa,ja[Na++]=Za,ja[Na++]=Rn,Qa=t.id,Za=t.overflow,Rn=e}var kt=null,ot=null,Ve=!1,zn=null,wa=!1,Jo=Error(s(519));function Tn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Li(_a(t,e)),Jo}function df(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[ie]=e,t[he]=l,a){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(a=0;a<nr.length;a++)Be(nr[a],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),jd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),wd(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Rm(t.textContent,a)?(l.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),l.onScroll!=null&&Be("scroll",t),l.onScrollEnd!=null&&Be("scrollend",t),l.onClick!=null&&(t.onclick=an),t=!0):t=!1,t||Tn(e,!0)}function ff(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:wa=!1;return;case 27:case 3:wa=!0;return;default:kt=kt.return}}function Kl(e){if(e!==kt)return!1;if(!Ve)return ff(e),Ve=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||mu(e.type,e.memoizedProps)),a=!a),a&&ot&&Tn(e),ff(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ot=Um(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ot=Um(e)}else t===27?(t=ot,$n(e.type)?(e=vu,vu=null,ot=e):ot=t):ot=kt?Ca(e.stateNode.nextSibling):null;return!0}function dl(){ot=kt=null,Ve=!1}function Wo(){var e=zn;return e!==null&&(na===null?na=e:na.push.apply(na,e),zn=null),e}function Li(e){zn===null?zn=[e]:zn.push(e)}var Po=E(null),fl=null,sn=null;function On(e,t,a){I(Po,t._currentValue),t._currentValue=a}function on(e){e._currentValue=Po.current,Y(Po)}function Io(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function ec(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var d=o.dependencies;if(d!==null){var y=o.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=o;for(var N=0;N<t.length;N++)if(S.context===t[N]){d.lanes|=a,S=d.alternate,S!==null&&(S.lanes|=a),Io(d.return,a,e),l||(y=null);break e}d=S.next}}else if(o.tag===18){if(y=o.return,y===null)throw Error(s(341));y.lanes|=a,d=y.alternate,d!==null&&(d.lanes|=a),Io(y,a,e),y=null}else y=o.child;if(y!==null)y.return=o;else for(y=o;y!==null;){if(y===e){y=null;break}if(o=y.sibling,o!==null){o.return=y.return,y=o;break}y=y.return}o=y}}function Xl(e,t,a,l){e=null;for(var o=t,d=!1;o!==null;){if(!d){if((o.flags&524288)!==0)d=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var y=o.alternate;if(y===null)throw Error(s(387));if(y=y.memoizedProps,y!==null){var S=o.type;sa(o.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(o===Te.current){if(y=o.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(or):e=[or])}o=o.return}e!==null&&ec(t,e,a,l),t.flags|=262144}function ts(e){for(e=e.firstContext;e!==null;){if(!sa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hl(e){fl=e,sn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ut(e){return hf(fl,e)}function as(e,t){return fl===null&&hl(e),hf(e,t)}function hf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},sn===null){if(e===null)throw Error(s(308));sn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sn=sn.next=t;return a}var Dx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Mx=n.unstable_scheduleCallback,Ax=n.unstable_NormalPriority,jt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tc(){return{controller:new Dx,data:new Map,refCount:0}}function ki(e){e.refCount--,e.refCount===0&&Mx(Ax,function(){e.controller.abort()})}var Ui=null,ac=0,Ql=0,Zl=null;function Lx(e,t){if(Ui===null){var a=Ui=[];ac=0,Ql=iu(),Zl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return ac++,t.then(mf,mf),t}function mf(){if(--ac===0&&Ui!==null){Zl!==null&&(Zl.status="fulfilled");var e=Ui;Ui=null,Ql=0,Zl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function kx(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var pf=M.S;M.S=function(e,t){Ph=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Lx(e,t),pf!==null&&pf(e,t)};var ml=E(null);function nc(){var e=ml.current;return e!==null?e:nt.pooledCache}function ns(e,t){t===null?I(ml,ml.current):I(ml,t.pool)}function gf(){var e=nc();return e===null?null:{parent:jt._currentValue,pool:e}}var Fl=Error(s(460)),lc=Error(s(474)),ls=Error(s(542)),is={then:function(){}};function yf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(an,an),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bf(e),e;default:if(typeof t.status=="string")t.then(an,an);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bf(e),e}throw gl=t,Fl}}function pl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(gl=a,Fl):a}}var gl=null;function vf(){if(gl===null)throw Error(s(459));var e=gl;return gl=null,e}function bf(e){if(e===Fl||e===ls)throw Error(s(483))}var Jl=null,Hi=0;function rs(e){var t=Hi;return Hi+=1,Jl===null&&(Jl=[]),xf(Jl,e,t)}function Bi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ss(e,t){throw t.$$typeof===_?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Sf(e){function t(O,z){if(e){var L=O.deletions;L===null?(O.deletions=[z],O.flags|=16):L.push(z)}}function a(O,z){if(!e)return null;for(;z!==null;)t(O,z),z=z.sibling;return null}function l(O){for(var z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function o(O,z){return O=ln(O,z),O.index=0,O.sibling=null,O}function d(O,z,L){return O.index=L,e?(L=O.alternate,L!==null?(L=L.index,L<z?(O.flags|=67108866,z):L):(O.flags|=67108866,z)):(O.flags|=1048576,z)}function y(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function S(O,z,L,X){return z===null||z.tag!==6?(z=Xo(L,O.mode,X),z.return=O,z):(z=o(z,L),z.return=O,z)}function N(O,z,L,X){var _e=L.type;return _e===D?V(O,z,L.props.children,X,L.key):z!==null&&(z.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===R&&pl(_e)===z.type)?(z=o(z,L.props),Bi(z,L),z.return=O,z):(z=Ir(L.type,L.key,L.props,null,O.mode,X),Bi(z,L),z.return=O,z)}function k(O,z,L,X){return z===null||z.tag!==4||z.stateNode.containerInfo!==L.containerInfo||z.stateNode.implementation!==L.implementation?(z=Qo(L,O.mode,X),z.return=O,z):(z=o(z,L.children||[]),z.return=O,z)}function V(O,z,L,X,_e){return z===null||z.tag!==7?(z=ul(L,O.mode,X,_e),z.return=O,z):(z=o(z,L),z.return=O,z)}function F(O,z,L){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Xo(""+z,O.mode,L),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return L=Ir(z.type,z.key,z.props,null,O.mode,L),Bi(L,z),L.return=O,L;case w:return z=Qo(z,O.mode,L),z.return=O,z;case R:return z=pl(z),F(O,z,L)}if(ce(z)||se(z))return z=ul(z,O.mode,L,null),z.return=O,z;if(typeof z.then=="function")return F(O,rs(z),L);if(z.$$typeof===G)return F(O,as(O,z),L);ss(O,z)}return null}function H(O,z,L,X){var _e=z!==null?z.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return _e!==null?null:S(O,z,""+L,X);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case j:return L.key===_e?N(O,z,L,X):null;case w:return L.key===_e?k(O,z,L,X):null;case R:return L=pl(L),H(O,z,L,X)}if(ce(L)||se(L))return _e!==null?null:V(O,z,L,X,null);if(typeof L.then=="function")return H(O,z,rs(L),X);if(L.$$typeof===G)return H(O,z,as(O,L),X);ss(O,L)}return null}function q(O,z,L,X,_e){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return O=O.get(L)||null,S(z,O,""+X,_e);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case j:return O=O.get(X.key===null?L:X.key)||null,N(z,O,X,_e);case w:return O=O.get(X.key===null?L:X.key)||null,k(z,O,X,_e);case R:return X=pl(X),q(O,z,L,X,_e)}if(ce(X)||se(X))return O=O.get(L)||null,V(z,O,X,_e,null);if(typeof X.then=="function")return q(O,z,L,rs(X),_e);if(X.$$typeof===G)return q(O,z,L,as(z,X),_e);ss(z,X)}return null}function ge(O,z,L,X){for(var _e=null,Ke=null,ye=z,Ae=z=0,Ye=null;ye!==null&&Ae<L.length;Ae++){ye.index>Ae?(Ye=ye,ye=null):Ye=ye.sibling;var Xe=H(O,ye,L[Ae],X);if(Xe===null){ye===null&&(ye=Ye);break}e&&ye&&Xe.alternate===null&&t(O,ye),z=d(Xe,z,Ae),Ke===null?_e=Xe:Ke.sibling=Xe,Ke=Xe,ye=Ye}if(Ae===L.length)return a(O,ye),Ve&&rn(O,Ae),_e;if(ye===null){for(;Ae<L.length;Ae++)ye=F(O,L[Ae],X),ye!==null&&(z=d(ye,z,Ae),Ke===null?_e=ye:Ke.sibling=ye,Ke=ye);return Ve&&rn(O,Ae),_e}for(ye=l(ye);Ae<L.length;Ae++)Ye=q(ye,O,Ae,L[Ae],X),Ye!==null&&(e&&Ye.alternate!==null&&ye.delete(Ye.key===null?Ae:Ye.key),z=d(Ye,z,Ae),Ke===null?_e=Ye:Ke.sibling=Ye,Ke=Ye);return e&&ye.forEach(function(Fn){return t(O,Fn)}),Ve&&rn(O,Ae),_e}function we(O,z,L,X){if(L==null)throw Error(s(151));for(var _e=null,Ke=null,ye=z,Ae=z=0,Ye=null,Xe=L.next();ye!==null&&!Xe.done;Ae++,Xe=L.next()){ye.index>Ae?(Ye=ye,ye=null):Ye=ye.sibling;var Fn=H(O,ye,Xe.value,X);if(Fn===null){ye===null&&(ye=Ye);break}e&&ye&&Fn.alternate===null&&t(O,ye),z=d(Fn,z,Ae),Ke===null?_e=Fn:Ke.sibling=Fn,Ke=Fn,ye=Ye}if(Xe.done)return a(O,ye),Ve&&rn(O,Ae),_e;if(ye===null){for(;!Xe.done;Ae++,Xe=L.next())Xe=F(O,Xe.value,X),Xe!==null&&(z=d(Xe,z,Ae),Ke===null?_e=Xe:Ke.sibling=Xe,Ke=Xe);return Ve&&rn(O,Ae),_e}for(ye=l(ye);!Xe.done;Ae++,Xe=L.next())Xe=q(ye,O,Ae,Xe.value,X),Xe!==null&&(e&&Xe.alternate!==null&&ye.delete(Xe.key===null?Ae:Xe.key),z=d(Xe,z,Ae),Ke===null?_e=Xe:Ke.sibling=Xe,Ke=Xe);return e&&ye.forEach(function(Qv){return t(O,Qv)}),Ve&&rn(O,Ae),_e}function tt(O,z,L,X){if(typeof L=="object"&&L!==null&&L.type===D&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case j:e:{for(var _e=L.key;z!==null;){if(z.key===_e){if(_e=L.type,_e===D){if(z.tag===7){a(O,z.sibling),X=o(z,L.props.children),X.return=O,O=X;break e}}else if(z.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===R&&pl(_e)===z.type){a(O,z.sibling),X=o(z,L.props),Bi(X,L),X.return=O,O=X;break e}a(O,z);break}else t(O,z);z=z.sibling}L.type===D?(X=ul(L.props.children,O.mode,X,L.key),X.return=O,O=X):(X=Ir(L.type,L.key,L.props,null,O.mode,X),Bi(X,L),X.return=O,O=X)}return y(O);case w:e:{for(_e=L.key;z!==null;){if(z.key===_e)if(z.tag===4&&z.stateNode.containerInfo===L.containerInfo&&z.stateNode.implementation===L.implementation){a(O,z.sibling),X=o(z,L.children||[]),X.return=O,O=X;break e}else{a(O,z);break}else t(O,z);z=z.sibling}X=Qo(L,O.mode,X),X.return=O,O=X}return y(O);case R:return L=pl(L),tt(O,z,L,X)}if(ce(L))return ge(O,z,L,X);if(se(L)){if(_e=se(L),typeof _e!="function")throw Error(s(150));return L=_e.call(L),we(O,z,L,X)}if(typeof L.then=="function")return tt(O,z,rs(L),X);if(L.$$typeof===G)return tt(O,z,as(O,L),X);ss(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,z!==null&&z.tag===6?(a(O,z.sibling),X=o(z,L),X.return=O,O=X):(a(O,z),X=Xo(L,O.mode,X),X.return=O,O=X),y(O)):a(O,z)}return function(O,z,L,X){try{Hi=0;var _e=tt(O,z,L,X);return Jl=null,_e}catch(ye){if(ye===Fl||ye===ls)throw ye;var Ke=oa(29,ye,null,O.mode);return Ke.lanes=X,Ke.return=O,Ke}}}var yl=Sf(!0),_f=Sf(!1),Dn=!1;function ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Mn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function An(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Qe&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Pr(e),lf(e,null,a),t}return Wr(e,l,t,a),Pr(e)}function qi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Br(e,a)}}function sc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?o=d=y:d=d.next=y,a=a.next}while(a!==null);d===null?o=d=t:d=d.next=t}else o=d=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var oc=!1;function Yi(){if(oc){var e=Zl;if(e!==null)throw e}}function Vi(e,t,a,l){oc=!1;var o=e.updateQueue;Dn=!1;var d=o.firstBaseUpdate,y=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var N=S,k=N.next;N.next=null,y===null?d=k:y.next=k,y=N;var V=e.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==y&&(S===null?V.firstBaseUpdate=k:S.next=k,V.lastBaseUpdate=N))}if(d!==null){var F=o.baseState;y=0,V=k=N=null,S=d;do{var H=S.lane&-536870913,q=H!==S.lane;if(q?(qe&H)===H:(l&H)===H){H!==0&&H===Ql&&(oc=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ge=e,we=S;H=t;var tt=a;switch(we.tag){case 1:if(ge=we.payload,typeof ge=="function"){F=ge.call(tt,F,H);break e}F=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=we.payload,H=typeof ge=="function"?ge.call(tt,F,H):ge,H==null)break e;F=x({},F,H);break e;case 2:Dn=!0}}H=S.callback,H!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[H]:q.push(H))}else q={lane:H,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(k=V=q,N=F):V=V.next=q,y|=H;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;q=S,S=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);V===null&&(N=F),o.baseState=N,o.firstBaseUpdate=k,o.lastBaseUpdate=V,d===null&&(o.shared.lanes=0),Bn|=y,e.lanes=y,e.memoizedState=F}}function jf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Nf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)jf(a[e],t)}var Wl=E(null),os=E(0);function wf(e,t){e=yn,I(os,e),I(Wl,t),yn=e|t.baseLanes}function cc(){I(os,yn),I(Wl,Wl.current)}function uc(){yn=os.current,Y(Wl),Y(os)}var ca=E(null),Ea=null;function Ln(e){var t=e.alternate;I(vt,vt.current&1),I(ca,e),Ea===null&&(t===null||Wl.current!==null||t.memoizedState!==null)&&(Ea=e)}function dc(e){I(vt,vt.current),I(ca,e),Ea===null&&(Ea=e)}function Ef(e){e.tag===22?(I(vt,vt.current),I(ca,e),Ea===null&&(Ea=e)):kn()}function kn(){I(vt,vt.current),I(ca,ca.current)}function ua(e){Y(ca),Ea===e&&(Ea=null),Y(vt)}var vt=E(0);function cs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||yu(a)||xu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cn=0,Me=null,Ie=null,Nt=null,us=!1,Pl=!1,xl=!1,ds=0,Gi=0,Il=null,Ux=0;function pt(){throw Error(s(321))}function fc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!sa(e[a],t[a]))return!1;return!0}function hc(e,t,a,l,o,d){return cn=d,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?ch:Rc,xl=!1,d=a(l,o),xl=!1,Pl&&(d=Rf(t,a,l,o)),Cf(e),d}function Cf(e){M.H=Xi;var t=Ie!==null&&Ie.next!==null;if(cn=0,Nt=Ie=Me=null,us=!1,Gi=0,Il=null,t)throw Error(s(300));e===null||wt||(e=e.dependencies,e!==null&&ts(e)&&(wt=!0))}function Rf(e,t,a,l){Me=e;var o=0;do{if(Pl&&(Il=null),Gi=0,Pl=!1,25<=o)throw Error(s(301));if(o+=1,Nt=Ie=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}M.H=uh,d=t(a,l)}while(Pl);return d}function Hx(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?$i(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Me.flags|=1024),t}function mc(){var e=ds!==0;return ds=0,e}function pc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function gc(e){if(us){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}us=!1}cn=0,Nt=Ie=Me=null,Pl=!1,Gi=ds=0,Il=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Me.memoizedState=Nt=e:Nt=Nt.next=e,Nt}function bt(){if(Ie===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=Nt===null?Me.memoizedState:Nt.next;if(t!==null)Nt=t,Ie=e;else{if(e===null)throw Me.alternate===null?Error(s(467)):Error(s(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},Nt===null?Me.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function fs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $i(e){var t=Gi;return Gi+=1,Il===null&&(Il=[]),e=xf(Il,e,t),t=Me,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?ch:Rc),e}function hs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $i(e);if(e.$$typeof===G)return Ut(e)}throw Error(s(438,String(e)))}function yc(e){var t=null,a=Me.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Me.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=fs(),Me.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=$;return t.index++,a}function un(e,t){return typeof t=="function"?t(e):t}function ms(e){var t=bt();return xc(t,Ie,e)}function xc(e,t,a){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var o=e.baseQueue,d=l.pending;if(d!==null){if(o!==null){var y=o.next;o.next=d.next,d.next=y}t.baseQueue=o=d,l.pending=null}if(d=e.baseState,o===null)e.memoizedState=d;else{t=o.next;var S=y=null,N=null,k=t,V=!1;do{var F=k.lane&-536870913;if(F!==k.lane?(qe&F)===F:(cn&F)===F){var H=k.revertLane;if(H===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),F===Ql&&(V=!0);else if((cn&H)===H){k=k.next,H===Ql&&(V=!0);continue}else F={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},N===null?(S=N=F,y=d):N=N.next=F,Me.lanes|=H,Bn|=H;F=k.action,xl&&a(d,F),d=k.hasEagerState?k.eagerState:a(d,F)}else H={lane:F,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},N===null?(S=N=H,y=d):N=N.next=H,Me.lanes|=F,Bn|=F;k=k.next}while(k!==null&&k!==t);if(N===null?y=d:N.next=S,!sa(d,e.memoizedState)&&(wt=!0,V&&(a=Zl,a!==null)))throw a;e.memoizedState=d,e.baseState=y,e.baseQueue=N,l.lastRenderedState=d}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function vc(e){var t=bt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,d=t.memoizedState;if(o!==null){a.pending=null;var y=o=o.next;do d=e(d,y.action),y=y.next;while(y!==o);sa(d,t.memoizedState)||(wt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function zf(e,t,a){var l=Me,o=bt(),d=Ve;if(d){if(a===void 0)throw Error(s(407));a=a()}else a=t();var y=!sa((Ie||o).memoizedState,a);if(y&&(o.memoizedState=a,wt=!0),o=o.queue,_c(Df.bind(null,l,o,e),[e]),o.getSnapshot!==t||y||Nt!==null&&Nt.memoizedState.tag&1){if(l.flags|=2048,ei(9,{destroy:void 0},Of.bind(null,l,o,a,t),null),nt===null)throw Error(s(349));d||(cn&127)!==0||Tf(l,t,a)}return a}function Tf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Me.updateQueue,t===null?(t=fs(),Me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Of(e,t,a,l){t.value=a,t.getSnapshot=l,Mf(t)&&Af(e)}function Df(e,t,a){return a(function(){Mf(t)&&Af(e)})}function Mf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!sa(e,a)}catch{return!0}}function Af(e){var t=cl(e,2);t!==null&&la(t,e,2)}function bc(e){var t=Qt();if(typeof e=="function"){var a=e;if(e=a(),xl){St(!0);try{a()}finally{St(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:e},t}function Lf(e,t,a,l){return e.baseState=a,xc(e,Ie,typeof l=="function"?l:un)}function Bx(e,t,a,l,o){if(ys(e))throw Error(s(485));if(e=t.action,e!==null){var d={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};M.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,kf(t,d)):(d.next=a.next,t.pending=a.next=d)}}function kf(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var d=M.T,y={};M.T=y;try{var S=a(o,l),N=M.S;N!==null&&N(y,S),Uf(e,t,S)}catch(k){Sc(e,t,k)}finally{d!==null&&y.types!==null&&(d.types=y.types),M.T=d}}else try{d=a(o,l),Uf(e,t,d)}catch(k){Sc(e,t,k)}}function Uf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Hf(e,t,l)},function(l){return Sc(e,t,l)}):Hf(e,t,a)}function Hf(e,t,a){t.status="fulfilled",t.value=a,Bf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,kf(e,a)))}function Sc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Bf(t),t=t.next;while(t!==l)}e.action=null}function Bf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qf(e,t){return t}function Yf(e,t){if(Ve){var a=nt.formState;if(a!==null){e:{var l=Me;if(Ve){if(ot){t:{for(var o=ot,d=wa;o.nodeType!==8;){if(!d){o=null;break t}if(o=Ca(o.nextSibling),o===null){o=null;break t}}d=o.data,o=d==="F!"||d==="F"?o:null}if(o){ot=Ca(o.nextSibling),l=o.data==="F!";break e}}Tn(l)}l=!1}l&&(t=a[0])}}return a=Qt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qf,lastRenderedState:t},a.queue=l,a=rh.bind(null,Me,l),l.dispatch=a,l=bc(!1),d=Cc.bind(null,Me,!1,l.queue),l=Qt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Bx.bind(null,Me,o,d,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function Vf(e){var t=bt();return Gf(t,Ie,e)}function Gf(e,t,a){if(t=xc(e,t,qf)[0],e=ms(un)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=$i(t)}catch(y){throw y===Fl?ls:y}else l=t;t=bt();var o=t.queue,d=o.dispatch;return a!==t.memoizedState&&(Me.flags|=2048,ei(9,{destroy:void 0},qx.bind(null,o,a),null)),[l,d,e]}function qx(e,t){e.action=t}function $f(e){var t=bt(),a=Ie;if(a!==null)return Gf(t,a,e);bt(),t=t.memoizedState,a=bt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function ei(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Me.updateQueue,t===null&&(t=fs(),Me.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Kf(){return bt().memoizedState}function ps(e,t,a,l){var o=Qt();Me.flags|=e,o.memoizedState=ei(1|t,{destroy:void 0},a,l===void 0?null:l)}function gs(e,t,a,l){var o=bt();l=l===void 0?null:l;var d=o.memoizedState.inst;Ie!==null&&l!==null&&fc(l,Ie.memoizedState.deps)?o.memoizedState=ei(t,d,a,l):(Me.flags|=e,o.memoizedState=ei(1|t,d,a,l))}function Xf(e,t){ps(8390656,8,e,t)}function _c(e,t){gs(2048,8,e,t)}function Yx(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=fs(),Me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Qf(e){var t=bt().memoizedState;return Yx({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Zf(e,t){return gs(4,2,e,t)}function Ff(e,t){return gs(4,4,e,t)}function Jf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wf(e,t,a){a=a!=null?a.concat([e]):null,gs(4,4,Jf.bind(null,t,e),a)}function jc(){}function Pf(e,t){var a=bt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&fc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function If(e,t){var a=bt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&fc(t,l[1]))return l[0];if(l=e(),xl){St(!0);try{e()}finally{St(!1)}}return a.memoizedState=[l,t],l}function Nc(e,t,a){return a===void 0||(cn&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=em(),Me.lanes|=e,Bn|=e,a)}function eh(e,t,a,l){return sa(a,t)?a:Wl.current!==null?(e=Nc(e,a,l),sa(e,t)||(wt=!0),e):(cn&42)===0||(cn&1073741824)!==0&&(qe&261930)===0?(wt=!0,e.memoizedState=a):(e=em(),Me.lanes|=e,Bn|=e,t)}function th(e,t,a,l,o){var d=W.p;W.p=d!==0&&8>d?d:8;var y=M.T,S={};M.T=S,Cc(e,!1,t,a);try{var N=o(),k=M.S;if(k!==null&&k(S,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var V=kx(N,l);Ki(e,t,V,ha(e))}else Ki(e,t,l,ha(e))}catch(F){Ki(e,t,{then:function(){},status:"rejected",reason:F},ha())}finally{W.p=d,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function Vx(){}function wc(e,t,a,l){if(e.tag!==5)throw Error(s(476));var o=ah(e).queue;th(e,o,t,ue,a===null?Vx:function(){return nh(e),a(l)})}function ah(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:ue},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nh(e){var t=ah(e);t.next===null&&(t=e.alternate.memoizedState),Ki(e,t.next.queue,{},ha())}function Ec(){return Ut(or)}function lh(){return bt().memoizedState}function ih(){return bt().memoizedState}function Gx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ha();e=Mn(a);var l=An(t,e,a);l!==null&&(la(l,t,a),qi(l,t,a)),t={cache:tc()},e.payload=t;return}t=t.return}}function $x(e,t,a){var l=ha();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ys(e)?sh(t,a):(a=$o(e,t,a,l),a!==null&&(la(a,e,l),oh(a,t,l)))}function rh(e,t,a){var l=ha();Ki(e,t,a,l)}function Ki(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ys(e))sh(t,o);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,S=d(y,a);if(o.hasEagerState=!0,o.eagerState=S,sa(S,y))return Wr(e,t,o,0),nt===null&&Jr(),!1}catch{}if(a=$o(e,t,o,l),a!==null)return la(a,e,l),oh(a,t,l),!0}return!1}function Cc(e,t,a,l){if(l={lane:2,revertLane:iu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ys(e)){if(t)throw Error(s(479))}else t=$o(e,a,l,2),t!==null&&la(t,e,2)}function ys(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function sh(e,t){Pl=us=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function oh(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Br(e,a)}}var Xi={readContext:Ut,use:hs,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};Xi.useEffectEvent=pt;var ch={readContext:Ut,use:hs,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Xf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ps(4194308,4,Jf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var a=Qt();t=t===void 0?null:t;var l=e();if(xl){St(!0);try{e()}finally{St(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Qt();if(a!==void 0){var o=a(t);if(xl){St(!0);try{a(t)}finally{St(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=$x.bind(null,Me,e),[l.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=bc(e);var t=e.queue,a=rh.bind(null,Me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:jc,useDeferredValue:function(e,t){var a=Qt();return Nc(a,e,t)},useTransition:function(){var e=bc(!1);return e=th.bind(null,Me,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Me,o=Qt();if(Ve){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),nt===null)throw Error(s(349));(qe&127)!==0||Tf(l,t,a)}o.memoizedState=a;var d={value:a,getSnapshot:t};return o.queue=d,Xf(Df.bind(null,l,d,e),[e]),l.flags|=2048,ei(9,{destroy:void 0},Of.bind(null,l,d,a,t),null),a},useId:function(){var e=Qt(),t=nt.identifierPrefix;if(Ve){var a=Za,l=Qa;a=(l&~(1<<32-Tt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ds++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ux++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ec,useFormState:Yf,useActionState:Yf,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Cc.bind(null,Me,!0,a),a.dispatch=t,[e,t]},useMemoCache:yc,useCacheRefresh:function(){return Qt().memoizedState=Gx.bind(null,Me)},useEffectEvent:function(e){var t=Qt(),a={impl:e};return t.memoizedState=a,function(){if((Qe&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Rc={readContext:Ut,use:hs,useCallback:Pf,useContext:Ut,useEffect:_c,useImperativeHandle:Wf,useInsertionEffect:Zf,useLayoutEffect:Ff,useMemo:If,useReducer:ms,useRef:Kf,useState:function(){return ms(un)},useDebugValue:jc,useDeferredValue:function(e,t){var a=bt();return eh(a,Ie.memoizedState,e,t)},useTransition:function(){var e=ms(un)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:$i(e),t]},useSyncExternalStore:zf,useId:lh,useHostTransitionStatus:Ec,useFormState:Vf,useActionState:Vf,useOptimistic:function(e,t){var a=bt();return Lf(a,Ie,e,t)},useMemoCache:yc,useCacheRefresh:ih};Rc.useEffectEvent=Qf;var uh={readContext:Ut,use:hs,useCallback:Pf,useContext:Ut,useEffect:_c,useImperativeHandle:Wf,useInsertionEffect:Zf,useLayoutEffect:Ff,useMemo:If,useReducer:vc,useRef:Kf,useState:function(){return vc(un)},useDebugValue:jc,useDeferredValue:function(e,t){var a=bt();return Ie===null?Nc(a,e,t):eh(a,Ie.memoizedState,e,t)},useTransition:function(){var e=vc(un)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:$i(e),t]},useSyncExternalStore:zf,useId:lh,useHostTransitionStatus:Ec,useFormState:$f,useActionState:$f,useOptimistic:function(e,t){var a=bt();return Ie!==null?Lf(a,Ie,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:yc,useCacheRefresh:ih};uh.useEffectEvent=Qf;function zc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Tc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=ha(),o=Mn(l);o.payload=t,a!=null&&(o.callback=a),t=An(e,o,l),t!==null&&(la(t,e,l),qi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=ha(),o=Mn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=An(e,o,l),t!==null&&(la(t,e,l),qi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ha(),l=Mn(a);l.tag=2,t!=null&&(l.callback=t),t=An(e,l,a),t!==null&&(la(t,e,a),qi(t,e,a))}};function dh(e,t,a,l,o,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,y):t.prototype&&t.prototype.isPureReactComponent?!Di(a,l)||!Di(o,d):!0}function fh(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Tc.enqueueReplaceState(t,t.state,null)}function vl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function hh(e){Fr(e)}function mh(e){console.error(e)}function ph(e){Fr(e)}function xs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function gh(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Oc(e,t,a){return a=Mn(a),a.tag=3,a.payload={element:null},a.callback=function(){xs(e,t)},a}function yh(e){return e=Mn(e),e.tag=3,e}function xh(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var d=l.value;e.payload=function(){return o(d)},e.callback=function(){gh(t,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){gh(t,a,l),typeof o!="function"&&(qn===null?qn=new Set([this]):qn.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function Kx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Xl(t,a,o,!0),a=ca.current,a!==null){switch(a.tag){case 31:case 13:return Ea===null?Ts():a.alternate===null&>===0&&(gt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===is?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),au(e,l,o)),!1;case 22:return a.flags|=65536,l===is?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),au(e,l,o)),!1}throw Error(s(435,a.tag))}return au(e,l,o),Ts(),!1}if(Ve)return t=ca.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Jo&&(e=Error(s(422),{cause:l}),Li(_a(e,a)))):(l!==Jo&&(t=Error(s(423),{cause:l}),Li(_a(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=_a(l,a),o=Oc(e.stateNode,l,o),sc(e,o),gt!==4&&(gt=2)),!1;var d=Error(s(520),{cause:l});if(d=_a(d,a),er===null?er=[d]:er.push(d),gt!==4&&(gt=2),t===null)return!0;l=_a(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Oc(a.stateNode,l,e),sc(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(qn===null||!qn.has(d))))return a.flags|=65536,o&=-o,a.lanes|=o,o=yh(o),xh(o,e,a,l),sc(a,o),!1}a=a.return}while(a!==null);return!1}var Dc=Error(s(461)),wt=!1;function Ht(e,t,a,l){t.child=e===null?_f(t,null,a,l):yl(t,e.child,a,l)}function vh(e,t,a,l,o){a=a.render;var d=t.ref;if("ref"in l){var y={};for(var S in l)S!=="ref"&&(y[S]=l[S])}else y=l;return hl(t),l=hc(e,t,a,y,d,o),S=mc(),e!==null&&!wt?(pc(e,t,o),dn(e,t,o)):(Ve&&S&&Zo(t),t.flags|=1,Ht(e,t,l,o),t.child)}function bh(e,t,a,l,o){if(e===null){var d=a.type;return typeof d=="function"&&!Ko(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,Sh(e,t,d,l,o)):(e=Ir(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!qc(e,o)){var y=d.memoizedProps;if(a=a.compare,a=a!==null?a:Di,a(y,l)&&e.ref===t.ref)return dn(e,t,o)}return t.flags|=1,e=ln(d,l),e.ref=t.ref,e.return=t,t.child=e}function Sh(e,t,a,l,o){if(e!==null){var d=e.memoizedProps;if(Di(d,l)&&e.ref===t.ref)if(wt=!1,t.pendingProps=l=d,qc(e,o))(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,dn(e,t,o)}return Mc(e,t,a,l,o)}function _h(e,t,a,l){var o=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~d}else l=0,t.child=null;return jh(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ns(t,d!==null?d.cachePool:null),d!==null?wf(t,d):cc(),Ef(t);else return l=t.lanes=536870912,jh(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(ns(t,d.cachePool),wf(t,d),kn(),t.memoizedState=null):(e!==null&&ns(t,null),cc(),kn());return Ht(e,t,o,a),t.child}function Qi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function jh(e,t,a,l,o){var d=nc();return d=d===null?null:{parent:jt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&ns(t,null),cc(),Ef(t),e!==null&&Xl(e,t,l,!0),t.childLanes=o,null}function vs(e,t){return t=Ss({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Nh(e,t,a){return yl(t,e.child,null,a),e=vs(t,t.pendingProps),e.flags|=2,ua(t),t.memoizedState=null,e}function Xx(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=vs(t,l),t.lanes=536870912,Qi(null,e);if(dc(t),(e=ot)?(e=km(e,wa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Qa,overflow:Za}:null,retryLane:536870912,hydrationErrors:null},a=sf(e),a.return=t,t.child=a,kt=t,ot=null)):e=null,e===null)throw Tn(t);return t.lanes=536870912,null}return vs(t,l)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(dc(t),o)if(t.flags&256)t.flags&=-257,t=Nh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(wt||Xl(e,t,a,!1),o=(a&e.childLanes)!==0,wt||o){if(l=nt,l!==null&&(y=C(l,a),y!==0&&y!==d.retryLane))throw d.retryLane=y,cl(e,y),la(l,e,y),Dc;Ts(),t=Nh(e,t,a)}else e=d.treeContext,ot=Ca(y.nextSibling),kt=t,Ve=!0,zn=null,wa=!1,e!==null&&uf(t,e),t=vs(t,l),t.flags|=4096;return t}return e=ln(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function bs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Mc(e,t,a,l,o){return hl(t),a=hc(e,t,a,l,void 0,o),l=mc(),e!==null&&!wt?(pc(e,t,o),dn(e,t,o)):(Ve&&l&&Zo(t),t.flags|=1,Ht(e,t,a,o),t.child)}function wh(e,t,a,l,o,d){return hl(t),t.updateQueue=null,a=Rf(t,l,a,o),Cf(e),l=mc(),e!==null&&!wt?(pc(e,t,d),dn(e,t,d)):(Ve&&l&&Zo(t),t.flags|=1,Ht(e,t,a,d),t.child)}function Eh(e,t,a,l,o){if(hl(t),t.stateNode===null){var d=Vl,y=a.contextType;typeof y=="object"&&y!==null&&(d=Ut(y)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Tc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},ic(t),y=a.contextType,d.context=typeof y=="object"&&y!==null?Ut(y):Vl,d.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(zc(t,a,y,l),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&Tc.enqueueReplaceState(d,d.state,null),Vi(t,l,d,o),Yi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var S=t.memoizedProps,N=vl(a,S);d.props=N;var k=d.context,V=a.contextType;y=Vl,typeof V=="object"&&V!==null&&(y=Ut(V));var F=a.getDerivedStateFromProps;V=typeof F=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,V||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||k!==y)&&fh(t,d,l,y),Dn=!1;var H=t.memoizedState;d.state=H,Vi(t,l,d,o),Yi(),k=t.memoizedState,S||H!==k||Dn?(typeof F=="function"&&(zc(t,a,F,l),k=t.memoizedState),(N=Dn||dh(t,a,N,l,H,k,y))?(V||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=k),d.props=l,d.state=k,d.context=y,l=N):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,rc(e,t),y=t.memoizedProps,V=vl(a,y),d.props=V,F=t.pendingProps,H=d.context,k=a.contextType,N=Vl,typeof k=="object"&&k!==null&&(N=Ut(k)),S=a.getDerivedStateFromProps,(k=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==F||H!==N)&&fh(t,d,l,N),Dn=!1,H=t.memoizedState,d.state=H,Vi(t,l,d,o),Yi();var q=t.memoizedState;y!==F||H!==q||Dn||e!==null&&e.dependencies!==null&&ts(e.dependencies)?(typeof S=="function"&&(zc(t,a,S,l),q=t.memoizedState),(V=Dn||dh(t,a,V,l,H,q,N)||e!==null&&e.dependencies!==null&&ts(e.dependencies))?(k||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,q,N),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,q,N)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=q),d.props=l,d.state=q,d.context=N,l=V):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,bs(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=yl(t,e.child,null,o),t.child=yl(t,null,a,o)):Ht(e,t,a,o),t.memoizedState=d.state,e=t.child):e=dn(e,t,o),e}function Ch(e,t,a,l){return dl(),t.flags|=256,Ht(e,t,a,l),t.child}var Ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lc(e){return{baseLanes:e,cachePool:gf()}}function kc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=fa),e}function Rh(e,t,a){var l=t.pendingProps,o=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(vt.current&2)!==0),y&&(o=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(o?Ln(t):kn(),(e=ot)?(e=km(e,wa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Qa,overflow:Za}:null,retryLane:536870912,hydrationErrors:null},a=sf(e),a.return=t,t.child=a,kt=t,ot=null)):e=null,e===null)throw Tn(t);return xu(e)?t.lanes=32:t.lanes=536870912,null}var S=l.children;return l=l.fallback,o?(kn(),o=t.mode,S=Ss({mode:"hidden",children:S},o),l=ul(l,o,a,null),S.return=t,l.return=t,S.sibling=l,t.child=S,l=t.child,l.memoizedState=Lc(a),l.childLanes=kc(e,y,a),t.memoizedState=Ac,Qi(null,l)):(Ln(t),Uc(t,S))}var N=e.memoizedState;if(N!==null&&(S=N.dehydrated,S!==null)){if(d)t.flags&256?(Ln(t),t.flags&=-257,t=Hc(e,t,a)):t.memoizedState!==null?(kn(),t.child=e.child,t.flags|=128,t=null):(kn(),S=l.fallback,o=t.mode,l=Ss({mode:"visible",children:l.children},o),S=ul(S,o,a,null),S.flags|=2,l.return=t,S.return=t,l.sibling=S,t.child=l,yl(t,e.child,null,a),l=t.child,l.memoizedState=Lc(a),l.childLanes=kc(e,y,a),t.memoizedState=Ac,t=Qi(null,l));else if(Ln(t),xu(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var k=y.dgst;y=k,l=Error(s(419)),l.stack="",l.digest=y,Li({value:l,source:null,stack:null}),t=Hc(e,t,a)}else if(wt||Xl(e,t,a,!1),y=(a&e.childLanes)!==0,wt||y){if(y=nt,y!==null&&(l=C(y,a),l!==0&&l!==N.retryLane))throw N.retryLane=l,cl(e,l),la(y,e,l),Dc;yu(S)||Ts(),t=Hc(e,t,a)}else yu(S)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,ot=Ca(S.nextSibling),kt=t,Ve=!0,zn=null,wa=!1,e!==null&&uf(t,e),t=Uc(t,l.children),t.flags|=4096);return t}return o?(kn(),S=l.fallback,o=t.mode,N=e.child,k=N.sibling,l=ln(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,k!==null?S=ln(k,S):(S=ul(S,o,a,null),S.flags|=2),S.return=t,l.return=t,l.sibling=S,t.child=l,Qi(null,l),l=t.child,S=e.child.memoizedState,S===null?S=Lc(a):(o=S.cachePool,o!==null?(N=jt._currentValue,o=o.parent!==N?{parent:N,pool:N}:o):o=gf(),S={baseLanes:S.baseLanes|a,cachePool:o}),l.memoizedState=S,l.childLanes=kc(e,y,a),t.memoizedState=Ac,Qi(e.child,l)):(Ln(t),a=e.child,e=a.sibling,a=ln(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function Uc(e,t){return t=Ss({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ss(e,t){return e=oa(22,e,null,t),e.lanes=0,e}function Hc(e,t,a){return yl(t,e.child,null,a),e=Uc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zh(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Io(e.return,t,a)}function Bc(e,t,a,l,o,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=a,y.tailMode=o,y.treeForkCount=d)}function Th(e,t,a){var l=t.pendingProps,o=l.revealOrder,d=l.tail;l=l.children;var y=vt.current,S=(y&2)!==0;if(S?(y=y&1|2,t.flags|=128):y&=1,I(vt,y),Ht(e,t,l,a),l=Ve?Ai:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zh(e,a,t);else if(e.tag===19)zh(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&cs(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Bc(t,!1,o,a,d,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&cs(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Bc(t,!0,a,null,d,l);break;case"together":Bc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function dn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Bn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Xl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=ln(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ln(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function qc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ts(e)))}function Qx(e,t,a){switch(t.tag){case 3:ut(t,t.stateNode.containerInfo),On(t,jt,e.memoizedState.cache),dl();break;case 27:case 5:zt(t);break;case 4:ut(t,t.stateNode.containerInfo);break;case 10:On(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,dc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ln(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Rh(e,t,a):(Ln(t),e=dn(e,t,a),e!==null?e.sibling:null);Ln(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Xl(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Th(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),I(vt,vt.current),l)break;return null;case 22:return t.lanes=0,_h(e,t,a,t.pendingProps);case 24:On(t,jt,e.memoizedState.cache)}return dn(e,t,a)}function Oh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)wt=!0;else{if(!qc(e,a)&&(t.flags&128)===0)return wt=!1,Qx(e,t,a);wt=(e.flags&131072)!==0}else wt=!1,Ve&&(t.flags&1048576)!==0&&cf(t,Ai,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=pl(t.elementType),t.type=e,typeof e=="function")Ko(e)?(l=vl(e,l),t.tag=1,t=Eh(null,t,e,l,a)):(t.tag=0,t=Mc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===Z){t.tag=11,t=vh(null,t,e,l,a);break e}else if(o===P){t.tag=14,t=bh(null,t,e,l,a);break e}}throw t=te(e)||e,Error(s(306,t,""))}}return t;case 0:return Mc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=vl(l,t.pendingProps),Eh(e,t,l,o,a);case 3:e:{if(ut(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var d=t.memoizedState;o=d.element,rc(e,t),Vi(t,l,null,a);var y=t.memoizedState;if(l=y.cache,On(t,jt,l),l!==d.cache&&ec(t,[jt],a,!0),Yi(),l=y.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Ch(e,t,l,a);break e}else if(l!==o){o=_a(Error(s(424)),t),Li(o),t=Ch(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ot=Ca(e.firstChild),kt=t,Ve=!0,zn=null,wa=!0,a=_f(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(dl(),l===o){t=dn(e,t,a);break e}Ht(e,t,l,a)}t=t.child}return t;case 26:return bs(e,t),e===null?(a=Vm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ve||(a=t.type,e=t.pendingProps,l=Us(je.current).createElement(a),l[ie]=t,l[he]=e,Bt(l,a,e),lt(l),t.stateNode=l):t.memoizedState=Vm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return zt(t),e===null&&Ve&&(l=t.stateNode=Bm(t.type,t.pendingProps,je.current),kt=t,wa=!0,o=ot,$n(t.type)?(vu=o,ot=Ca(l.firstChild)):ot=o),Ht(e,t,t.pendingProps.children,a),bs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((o=l=ot)&&(l=jv(l,t.type,t.pendingProps,wa),l!==null?(t.stateNode=l,kt=t,ot=Ca(l.firstChild),wa=!1,o=!0):o=!1),o||Tn(t)),zt(t),o=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,l=d.children,mu(o,d)?l=null:y!==null&&mu(o,y)&&(t.flags|=32),t.memoizedState!==null&&(o=hc(e,t,Hx,null,null,a),or._currentValue=o),bs(e,t),Ht(e,t,l,a),t.child;case 6:return e===null&&Ve&&((e=a=ot)&&(a=Nv(a,t.pendingProps,wa),a!==null?(t.stateNode=a,kt=t,ot=null,e=!0):e=!1),e||Tn(t)),null;case 13:return Rh(e,t,a);case 4:return ut(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=yl(t,null,l,a):Ht(e,t,l,a),t.child;case 11:return vh(e,t,t.type,t.pendingProps,a);case 7:return Ht(e,t,t.pendingProps,a),t.child;case 8:return Ht(e,t,t.pendingProps.children,a),t.child;case 12:return Ht(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,On(t,t.type,l.value),Ht(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,hl(t),o=Ut(o),l=l(o),t.flags|=1,Ht(e,t,l,a),t.child;case 14:return bh(e,t,t.type,t.pendingProps,a);case 15:return Sh(e,t,t.type,t.pendingProps,a);case 19:return Th(e,t,a);case 31:return Xx(e,t,a);case 22:return _h(e,t,a,t.pendingProps);case 24:return hl(t),l=Ut(jt),e===null?(o=nc(),o===null&&(o=nt,d=tc(),o.pooledCache=d,d.refCount++,d!==null&&(o.pooledCacheLanes|=a),o=d),t.memoizedState={parent:l,cache:o},ic(t),On(t,jt,o)):((e.lanes&a)!==0&&(rc(e,t),Vi(t,null,null,a),Yi()),o=e.memoizedState,d=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),On(t,jt,l)):(l=d.cache,On(t,jt,l),l!==o.cache&&ec(t,[jt],a,!0))),Ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function fn(e){e.flags|=4}function Yc(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(lm())e.flags|=8192;else throw gl=is,lc}else e.flags&=-16777217}function Dh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qm(t))if(lm())e.flags|=8192;else throw gl=is,lc}function _s(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nl():536870912,e.lanes|=t,li|=t)}function Zi(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Zx(e,t,a){var l=t.pendingProps;switch(Fo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),on(jt),fe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Kl(t)?fn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Wo())),ct(t),null;case 26:var o=t.type,d=t.memoizedState;return e===null?(fn(t),d!==null?(ct(t),Dh(t,d)):(ct(t),Yc(t,o,null,l,a))):d?d!==e.memoizedState?(fn(t),ct(t),Dh(t,d)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&fn(t),ct(t),Yc(t,o,e,l,a)),null;case 27:if(Yt(t),a=je.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&fn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return ct(t),null}e=le.current,Kl(t)?df(t):(e=Bm(o,l,a),t.stateNode=e,fn(t))}return ct(t),null;case 5:if(Yt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&fn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return ct(t),null}if(d=le.current,Kl(t))df(t);else{var y=Us(je.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?y.createElement(o,{is:l.is}):y.createElement(o)}}d[ie]=t,d[he]=l;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=d;e:switch(Bt(d,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&fn(t)}}return ct(t),Yc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&fn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=je.current,Kl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=kt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[ie]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Rm(e.nodeValue,a)),e||Tn(t,!0)}else e=Us(e).createTextNode(l),e[ie]=t,t.stateNode=e}return ct(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Kl(t),a!==null){if(e===null){if(!l)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[ie]=t}else dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else a=Wo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ua(t),t):(ua(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ct(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Kl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[ie]=t}else dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),o=!1}else o=Wo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(ua(t),t):(ua(t),null)}return ua(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),_s(t,t.updateQueue),ct(t),null);case 4:return fe(),e===null&&cu(t.stateNode.containerInfo),ct(t),null;case 10:return on(t.type),ct(t),null;case 19:if(Y(vt),l=t.memoizedState,l===null)return ct(t),null;if(o=(t.flags&128)!==0,d=l.rendering,d===null)if(o)Zi(l,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=cs(e),d!==null){for(t.flags|=128,Zi(l,!1),e=d.updateQueue,t.updateQueue=e,_s(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)rf(a,e),a=a.sibling;return I(vt,vt.current&1|2),Ve&&rn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&At()>Cs&&(t.flags|=128,o=!0,Zi(l,!1),t.lanes=4194304)}else{if(!o)if(e=cs(d),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,_s(t,e),Zi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!Ve)return ct(t),null}else 2*At()-l.renderingStartTime>Cs&&a!==536870912&&(t.flags|=128,o=!0,Zi(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=At(),e.sibling=null,a=vt.current,I(vt,o?a&1|2:a&1),Ve&&rn(t,l.treeForkCount),e):(ct(t),null);case 22:case 23:return ua(t),uc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),a=t.updateQueue,a!==null&&_s(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&Y(ml),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),on(jt),ct(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Fx(e,t){switch(Fo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return on(jt),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Yt(t),null;case 31:if(t.memoizedState!==null){if(ua(t),t.alternate===null)throw Error(s(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ua(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(vt),null;case 4:return fe(),null;case 10:return on(t.type),null;case 22:case 23:return ua(t),uc(),e!==null&&Y(ml),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return on(jt),null;case 25:return null;default:return null}}function Mh(e,t){switch(Fo(t),t.tag){case 3:on(jt),fe();break;case 26:case 27:case 5:Yt(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&ua(t);break;case 13:ua(t);break;case 19:Y(vt);break;case 10:on(t.type);break;case 22:case 23:ua(t),uc(),e!==null&&Y(ml);break;case 24:on(jt)}}function Fi(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var d=a.create,y=a.inst;l=d(),y.destroy=l}a=a.next}while(a!==o)}}catch(S){Je(t,t.return,S)}}function Un(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var d=o.next;l=d;do{if((l.tag&e)===e){var y=l.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,o=t;var N=a,k=S;try{k()}catch(V){Je(o,N,V)}}}l=l.next}while(l!==d)}}catch(V){Je(t,t.return,V)}}function Ah(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Nf(t,a)}catch(l){Je(e,e.return,l)}}}function Lh(e,t,a){a.props=vl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Je(e,t,l)}}function Ji(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Je(e,t,o)}}function Fa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Je(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Je(e,t,o)}else a.current=null}function kh(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Je(e,e.return,o)}}function Vc(e,t,a){try{var l=e.stateNode;yv(l,e.type,a,t),l[he]=t}catch(o){Je(e,e.return,o)}}function Uh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$n(e.type)||e.tag===4}function Gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$n(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=an));else if(l!==4&&(l===27&&$n(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,a),e=e.sibling;e!==null;)$c(e,t,a),e=e.sibling}function js(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&$n(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(js(e,t,a),e=e.sibling;e!==null;)js(e,t,a),e=e.sibling}function Hh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Bt(t,l,a),t[ie]=e,t[he]=a}catch(d){Je(e,e.return,d)}}var hn=!1,Et=!1,Kc=!1,Bh=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function Jx(e,t){if(e=e.containerInfo,fu=$s,e=Jd(e),Ho(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var y=0,S=-1,N=-1,k=0,V=0,F=e,H=null;t:for(;;){for(var q;F!==a||o!==0&&F.nodeType!==3||(S=y+o),F!==d||l!==0&&F.nodeType!==3||(N=y+l),F.nodeType===3&&(y+=F.nodeValue.length),(q=F.firstChild)!==null;)H=F,F=q;for(;;){if(F===e)break t;if(H===a&&++k===o&&(S=y),H===d&&++V===l&&(N=y),(q=F.nextSibling)!==null)break;F=H,H=F.parentNode}F=q}a=S===-1||N===-1?null:{start:S,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(hu={focusedElem:e,selectionRange:a},$s=!1,Dt=t;Dt!==null;)if(t=Dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Dt=e;else for(;Dt!==null;){switch(t=Dt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,o=d.memoizedProps,d=d.memoizedState,l=a.stateNode;try{var ge=vl(a.type,o);e=l.getSnapshotBeforeUpdate(ge,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(we){Je(a,a.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)gu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":gu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Dt=e;break}Dt=t.return}}function qh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:pn(e,a),l&4&&Fi(5,a);break;case 1:if(pn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Je(a,a.return,y)}else{var o=vl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Je(a,a.return,y)}}l&64&&Ah(a),l&512&&Ji(a,a.return);break;case 3:if(pn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Nf(e,t)}catch(y){Je(a,a.return,y)}}break;case 27:t===null&&l&4&&Hh(a);case 26:case 5:pn(e,a),t===null&&l&4&&kh(a),l&512&&Ji(a,a.return);break;case 12:pn(e,a);break;case 31:pn(e,a),l&4&&Gh(e,a);break;case 13:pn(e,a),l&4&&$h(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=iv.bind(null,a),wv(e,a))));break;case 22:if(l=a.memoizedState!==null||hn,!l){t=t!==null&&t.memoizedState!==null||Et,o=hn;var d=Et;hn=l,(Et=t)&&!d?gn(e,a,(a.subtreeFlags&8772)!==0):pn(e,a),hn=o,Et=d}break;case 30:break;default:pn(e,a)}}function Yh(e){var t=e.alternate;t!==null&&(e.alternate=null,Yh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&at(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ft=null,ea=!1;function mn(e,t,a){for(a=a.child;a!==null;)Vh(e,t,a),a=a.sibling}function Vh(e,t,a){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(ka,a)}catch{}switch(a.tag){case 26:Et||Fa(a,t),mn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Et||Fa(a,t);var l=ft,o=ea;$n(a.type)&&(ft=a.stateNode,ea=!1),mn(e,t,a),ir(a.stateNode),ft=l,ea=o;break;case 5:Et||Fa(a,t);case 6:if(l=ft,o=ea,ft=null,mn(e,t,a),ft=l,ea=o,ft!==null)if(ea)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(a.stateNode)}catch(d){Je(a,t,d)}else try{ft.removeChild(a.stateNode)}catch(d){Je(a,t,d)}break;case 18:ft!==null&&(ea?(e=ft,Am(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),fi(e)):Am(ft,a.stateNode));break;case 4:l=ft,o=ea,ft=a.stateNode.containerInfo,ea=!0,mn(e,t,a),ft=l,ea=o;break;case 0:case 11:case 14:case 15:Un(2,a,t),Et||Un(4,a,t),mn(e,t,a);break;case 1:Et||(Fa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Lh(a,t,l)),mn(e,t,a);break;case 21:mn(e,t,a);break;case 22:Et=(l=Et)||a.memoizedState!==null,mn(e,t,a),Et=l;break;default:mn(e,t,a)}}function Gh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{fi(e)}catch(a){Je(t,t.return,a)}}}function $h(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{fi(e)}catch(a){Je(t,t.return,a)}}function Wx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Bh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Bh),t;default:throw Error(s(435,e.tag))}}function Ns(e,t){var a=Wx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=rv.bind(null,e,l);l.then(o,o)}})}function ta(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],d=e,y=t,S=y;e:for(;S!==null;){switch(S.tag){case 27:if($n(S.type)){ft=S.stateNode,ea=!1;break e}break;case 5:ft=S.stateNode,ea=!1;break e;case 3:case 4:ft=S.stateNode.containerInfo,ea=!0;break e}S=S.return}if(ft===null)throw Error(s(160));Vh(d,y,o),ft=null,ea=!1,d=o.alternate,d!==null&&(d.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Kh(t,e),t=t.sibling}var Ba=null;function Kh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ta(t,e),aa(e),l&4&&(Un(3,e,e.return),Fi(3,e),Un(5,e,e.return));break;case 1:ta(t,e),aa(e),l&512&&(Et||a===null||Fa(a,a.return)),l&64&&hn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=Ba;if(ta(t,e),aa(e),l&512&&(Et||a===null||Fa(a,a.return)),l&4){var d=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":d=o.getElementsByTagName("title")[0],(!d||d[ke]||d[ie]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=o.createElement(l),o.head.insertBefore(d,o.querySelector("head > title"))),Bt(d,l,a),d[ie]=e,lt(d),l=d;break e;case"link":var y=Km("link","href",o).get(l+(a.href||""));if(y){for(var S=0;S<y.length;S++)if(d=y[S],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(S,1);break t}}d=o.createElement(l),Bt(d,l,a),o.head.appendChild(d);break;case"meta":if(y=Km("meta","content",o).get(l+(a.content||""))){for(S=0;S<y.length;S++)if(d=y[S],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(S,1);break t}}d=o.createElement(l),Bt(d,l,a),o.head.appendChild(d);break;default:throw Error(s(468,l))}d[ie]=e,lt(d),l=d}e.stateNode=l}else Xm(o,e.type,e.stateNode);else e.stateNode=$m(o,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?Xm(o,e.type,e.stateNode):$m(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,a.memoizedProps)}break;case 27:ta(t,e),aa(e),l&512&&(Et||a===null||Fa(a,a.return)),a!==null&&l&4&&Vc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ta(t,e),aa(e),l&512&&(Et||a===null||Fa(a,a.return)),e.flags&32){o=e.stateNode;try{Ll(o,"")}catch(ge){Je(e,e.return,ge)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Vc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(Kc=!0);break;case 6:if(ta(t,e),aa(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ge){Je(e,e.return,ge)}}break;case 3:if(qs=null,o=Ba,Ba=Hs(t.containerInfo),ta(t,e),Ba=o,aa(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{fi(t.containerInfo)}catch(ge){Je(e,e.return,ge)}Kc&&(Kc=!1,Xh(e));break;case 4:l=Ba,Ba=Hs(e.stateNode.containerInfo),ta(t,e),aa(e),Ba=l;break;case 12:ta(t,e),aa(e);break;case 31:ta(t,e),aa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ns(e,l)));break;case 13:ta(t,e),aa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Es=At()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ns(e,l)));break;case 22:o=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,k=hn,V=Et;if(hn=k||o,Et=V||N,ta(t,e),Et=V,hn=k,aa(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||N||hn||Et||bl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){N=a=t;try{if(d=N.stateNode,o)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=N.stateNode;var F=N.memoizedProps.style,H=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(ge){Je(N,N.return,ge)}}}else if(t.tag===6){if(a===null){N=t;try{N.stateNode.nodeValue=o?"":N.memoizedProps}catch(ge){Je(N,N.return,ge)}}}else if(t.tag===18){if(a===null){N=t;try{var q=N.stateNode;o?Lm(q,!0):Lm(N.stateNode,!1)}catch(ge){Je(N,N.return,ge)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Ns(e,a))));break;case 19:ta(t,e),aa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ns(e,l)));break;case 30:break;case 21:break;default:ta(t,e),aa(e)}}function aa(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Uh(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,d=Gc(e);js(e,d,o);break;case 5:var y=a.stateNode;a.flags&32&&(Ll(y,""),a.flags&=-33);var S=Gc(e);js(e,S,y);break;case 3:case 4:var N=a.stateNode.containerInfo,k=Gc(e);$c(e,k,N);break;default:throw Error(s(161))}}catch(V){Je(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qh(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Un(4,t,t.return),bl(t);break;case 1:Fa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Lh(t,t.return,a),bl(t);break;case 27:ir(t.stateNode);case 26:case 5:Fa(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}e=e.sibling}}function gn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:gn(o,d,a),Fi(4,d);break;case 1:if(gn(o,d,a),l=d,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(k){Je(l,l.return,k)}if(l=d,o=l.updateQueue,o!==null){var S=l.stateNode;try{var N=o.shared.hiddenCallbacks;if(N!==null)for(o.shared.hiddenCallbacks=null,o=0;o<N.length;o++)jf(N[o],S)}catch(k){Je(l,l.return,k)}}a&&y&64&&Ah(d),Ji(d,d.return);break;case 27:Hh(d);case 26:case 5:gn(o,d,a),a&&l===null&&y&4&&kh(d),Ji(d,d.return);break;case 12:gn(o,d,a);break;case 31:gn(o,d,a),a&&y&4&&Gh(o,d);break;case 13:gn(o,d,a),a&&y&4&&$h(o,d);break;case 22:d.memoizedState===null&&gn(o,d,a),Ji(d,d.return);break;case 30:break;default:gn(o,d,a)}t=t.sibling}}function Xc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ki(a))}function Qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ki(e))}function qa(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qh(e,t,a,l),t=t.sibling}function Qh(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:qa(e,t,a,l),o&2048&&Fi(9,t);break;case 1:qa(e,t,a,l);break;case 3:qa(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ki(e)));break;case 12:if(o&2048){qa(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,S=d.onPostCommit;typeof S=="function"&&S(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Je(t,t.return,N)}}else qa(e,t,a,l);break;case 31:qa(e,t,a,l);break;case 13:qa(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?qa(e,t,a,l):Wi(e,t):d._visibility&2?qa(e,t,a,l):(d._visibility|=2,ti(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Xc(y,t);break;case 24:qa(e,t,a,l),o&2048&&Qc(t.alternate,t);break;default:qa(e,t,a,l)}}function ti(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,S=a,N=l,k=y.flags;switch(y.tag){case 0:case 11:case 15:ti(d,y,S,N,o),Fi(8,y);break;case 23:break;case 22:var V=y.stateNode;y.memoizedState!==null?V._visibility&2?ti(d,y,S,N,o):Wi(d,y):(V._visibility|=2,ti(d,y,S,N,o)),o&&k&2048&&Xc(y.alternate,y);break;case 24:ti(d,y,S,N,o),o&&k&2048&&Qc(y.alternate,y);break;default:ti(d,y,S,N,o)}t=t.sibling}}function Wi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Wi(a,l),o&2048&&Xc(l.alternate,l);break;case 24:Wi(a,l),o&2048&&Qc(l.alternate,l);break;default:Wi(a,l)}t=t.sibling}}var Pi=8192;function ai(e,t,a){if(e.subtreeFlags&Pi)for(e=e.child;e!==null;)Zh(e,t,a),e=e.sibling}function Zh(e,t,a){switch(e.tag){case 26:ai(e,t,a),e.flags&Pi&&e.memoizedState!==null&&Uv(a,Ba,e.memoizedState,e.memoizedProps);break;case 5:ai(e,t,a);break;case 3:case 4:var l=Ba;Ba=Hs(e.stateNode.containerInfo),ai(e,t,a),Ba=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Pi,Pi=16777216,ai(e,t,a),Pi=l):ai(e,t,a));break;default:ai(e,t,a)}}function Fh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ii(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Dt=l,Wh(l,e)}Fh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Jh(e),e=e.sibling}function Jh(e){switch(e.tag){case 0:case 11:case 15:Ii(e),e.flags&2048&&Un(9,e,e.return);break;case 3:Ii(e);break;case 12:Ii(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ws(e)):Ii(e);break;default:Ii(e)}}function ws(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Dt=l,Wh(l,e)}Fh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Un(8,t,t.return),ws(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ws(t));break;default:ws(t)}e=e.sibling}}function Wh(e,t){for(;Dt!==null;){var a=Dt;switch(a.tag){case 0:case 11:case 15:Un(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ki(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Dt=l;else e:for(a=e;Dt!==null;){l=Dt;var o=l.sibling,d=l.return;if(Yh(l),l===a){Dt=null;break e}if(o!==null){o.return=d,Dt=o;break e}Dt=d}}}var Px={getCacheForType:function(e){var t=Ut(jt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ut(jt).controller.signal}},Ix=typeof WeakMap=="function"?WeakMap:Map,Qe=0,nt=null,He=null,qe=0,Fe=0,da=null,Hn=!1,ni=!1,Zc=!1,yn=0,gt=0,Bn=0,Sl=0,Fc=0,fa=0,li=0,er=null,na=null,Jc=!1,Es=0,Ph=0,Cs=1/0,Rs=null,qn=null,Rt=0,Yn=null,ii=null,xn=0,Wc=0,Pc=null,Ih=null,tr=0,Ic=null;function ha(){return(Qe&2)!==0&&qe!==0?qe&-qe:M.T!==null?iu():ee()}function em(){if(fa===0)if((qe&536870912)===0||Ve){var e=dt;dt<<=1,(dt&3932160)===0&&(dt=262144),fa=e}else fa=536870912;return e=ca.current,e!==null&&(e.flags|=32),fa}function la(e,t,a){(e===nt&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(ri(e,0),Vn(e,qe,fa,!1)),$a(e,a),((Qe&2)===0||e!==nt)&&(e===nt&&((Qe&2)===0&&(Sl|=a),gt===4&&Vn(e,qe,fa,!1)),Ja(e))}function tm(e,t,a){if((Qe&6)!==0)throw Error(s(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||va(e,t),o=l?av(e,t):tu(e,t,!0),d=l;do{if(o===0){ni&&!l&&Vn(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!ev(a)){o=tu(e,t,!1),d=!1;continue}if(o===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var S=e;o=er;var N=S.current.memoizedState.isDehydrated;if(N&&(ri(S,y).flags|=256),y=tu(S,y,!1),y!==2){if(Zc&&!N){S.errorRecoveryDisabledLanes|=d,Sl|=d,o=4;break e}d=na,na=o,d!==null&&(na===null?na=d:na.push.apply(na,d))}o=y}if(d=!1,o!==2)continue}}if(o===1){ri(e,0),Vn(e,t,0,!0);break}e:{switch(l=e,d=o,d){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Vn(l,t,fa,!Hn);break e;case 2:na=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=Es+300-At(),10<o)){if(Vn(l,t,fa,!Hn),tn(l,0,!0)!==0)break e;xn=t,l.timeoutHandle=Dm(am.bind(null,l,a,na,Rs,Jc,t,fa,Sl,li,Hn,d,"Throttled",-0,0),o);break e}am(l,a,na,Rs,Jc,t,fa,Sl,li,Hn,d,null,-0,0)}}break}while(!0);Ja(e)}function am(e,t,a,l,o,d,y,S,N,k,V,F,H,q){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:an},Zh(t,d,F);var ge=(d&62914560)===d?Es-At():(d&4194048)===d?Ph-At():0;if(ge=Hv(F,ge),ge!==null){xn=d,e.cancelPendingCommit=ge(um.bind(null,e,t,d,a,l,o,y,S,N,V,F,null,H,q)),Vn(e,d,y,!k);return}}um(e,t,d,a,l,o,y,S,N)}function ev(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],d=o.getSnapshot;o=o.value;try{if(!sa(d(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vn(e,t,a,l){t&=~Fc,t&=~Sl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var d=31-Tt(o),y=1<<d;l[d]=-1,o&=~y}a!==0&&Hr(e,a,t)}function zs(){return(Qe&6)===0?(ar(0),!1):!0}function eu(){if(He!==null){if(Fe===0)var e=He.return;else e=He,sn=fl=null,gc(e),Jl=null,Hi=0,e=He;for(;e!==null;)Mh(e.alternate,e),e=e.return;He=null}}function ri(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,bv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),xn=0,eu(),nt=e,He=a=ln(e.current,null),qe=t,Fe=0,da=null,Hn=!1,ni=va(e,t),Zc=!1,li=fa=Fc=Sl=Bn=gt=0,na=er=null,Jc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Tt(l),d=1<<o;t|=e[o],l&=~d}return yn=t,Jr(),a}function nm(e,t){Me=null,M.H=Xi,t===Fl||t===ls?(t=vf(),Fe=3):t===lc?(t=vf(),Fe=4):Fe=t===Dc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,da=t,He===null&&(gt=1,xs(e,_a(t,e.current)))}function lm(){var e=ca.current;return e===null?!0:(qe&4194048)===qe?Ea===null:(qe&62914560)===qe||(qe&536870912)!==0?e===Ea:!1}function im(){var e=M.H;return M.H=Xi,e===null?Xi:e}function rm(){var e=M.A;return M.A=Px,e}function Ts(){gt=4,Hn||(qe&4194048)!==qe&&ca.current!==null||(ni=!0),(Bn&134217727)===0&&(Sl&134217727)===0||nt===null||Vn(nt,qe,fa,!1)}function tu(e,t,a){var l=Qe;Qe|=2;var o=im(),d=rm();(nt!==e||qe!==t)&&(Rs=null,ri(e,t)),t=!1;var y=gt;e:do try{if(Fe!==0&&He!==null){var S=He,N=da;switch(Fe){case 8:eu(),y=6;break e;case 3:case 2:case 9:case 6:ca.current===null&&(t=!0);var k=Fe;if(Fe=0,da=null,si(e,S,N,k),a&&ni){y=0;break e}break;default:k=Fe,Fe=0,da=null,si(e,S,N,k)}}tv(),y=gt;break}catch(V){nm(e,V)}while(!0);return t&&e.shellSuspendCounter++,sn=fl=null,Qe=l,M.H=o,M.A=d,He===null&&(nt=null,qe=0,Jr()),y}function tv(){for(;He!==null;)sm(He)}function av(e,t){var a=Qe;Qe|=2;var l=im(),o=rm();nt!==e||qe!==t?(Rs=null,Cs=At()+500,ri(e,t)):ni=va(e,t);e:do try{if(Fe!==0&&He!==null){t=He;var d=da;t:switch(Fe){case 1:Fe=0,da=null,si(e,t,d,1);break;case 2:case 9:if(yf(d)){Fe=0,da=null,om(t);break}t=function(){Fe!==2&&Fe!==9||nt!==e||(Fe=7),Ja(e)},d.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:yf(d)?(Fe=0,da=null,om(t)):(Fe=0,da=null,si(e,t,d,7));break;case 5:var y=null;switch(He.tag){case 26:y=He.memoizedState;case 5:case 27:var S=He;if(y?Qm(y):S.stateNode.complete){Fe=0,da=null;var N=S.sibling;if(N!==null)He=N;else{var k=S.return;k!==null?(He=k,Os(k)):He=null}break t}}Fe=0,da=null,si(e,t,d,5);break;case 6:Fe=0,da=null,si(e,t,d,6);break;case 8:eu(),gt=6;break e;default:throw Error(s(462))}}nv();break}catch(V){nm(e,V)}while(!0);return sn=fl=null,M.H=l,M.A=o,Qe=a,He!==null?0:(nt=null,qe=0,Jr(),gt)}function nv(){for(;He!==null&&!tl();)sm(He)}function sm(e){var t=Oh(e.alternate,e,yn);e.memoizedProps=e.pendingProps,t===null?Os(e):He=t}function om(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wh(a,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=wh(a,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:gc(t);default:Mh(a,t),t=He=rf(t,yn),t=Oh(a,t,yn)}e.memoizedProps=e.pendingProps,t===null?Os(e):He=t}function si(e,t,a,l){sn=fl=null,gc(t),Jl=null,Hi=0;var o=t.return;try{if(Kx(e,o,t,a,qe)){gt=1,xs(e,_a(a,e.current)),He=null;return}}catch(d){if(o!==null)throw He=o,d;gt=1,xs(e,_a(a,e.current)),He=null;return}t.flags&32768?(Ve||l===1?e=!0:ni||(qe&536870912)!==0?e=!1:(Hn=e=!0,(l===2||l===9||l===3||l===6)&&(l=ca.current,l!==null&&l.tag===13&&(l.flags|=16384))),cm(t,e)):Os(t)}function Os(e){var t=e;do{if((t.flags&32768)!==0){cm(t,Hn);return}e=t.return;var a=Zx(t.alternate,t,yn);if(a!==null){He=a;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);gt===0&&(gt=5)}function cm(e,t){do{var a=Fx(e.alternate,e);if(a!==null){a.flags&=32767,He=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=a}while(e!==null);gt=6,He=null}function um(e,t,a,l,o,d,y,S,N){e.cancelPendingCommit=null;do Ds();while(Rt!==0);if((Qe&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(d=t.lanes|t.childLanes,d|=Go,Ur(e,a,d,y,S,N),e===nt&&(He=nt=null,qe=0),ii=t,Yn=e,xn=a,Wc=d,Pc=o,Ih=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,sv(Ga,function(){return pm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,o=W.p,W.p=2,y=Qe,Qe|=4;try{Jx(e,t,a)}finally{Qe=y,W.p=o,M.T=l}}Rt=1,dm(),fm(),hm()}}function dm(){if(Rt===1){Rt=0;var e=Yn,t=ii,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var l=W.p;W.p=2;var o=Qe;Qe|=4;try{Kh(t,e);var d=hu,y=Jd(e.containerInfo),S=d.focusedElem,N=d.selectionRange;if(y!==S&&S&&S.ownerDocument&&Fd(S.ownerDocument.documentElement,S)){if(N!==null&&Ho(S)){var k=N.start,V=N.end;if(V===void 0&&(V=k),"selectionStart"in S)S.selectionStart=k,S.selectionEnd=Math.min(V,S.value.length);else{var F=S.ownerDocument||document,H=F&&F.defaultView||window;if(H.getSelection){var q=H.getSelection(),ge=S.textContent.length,we=Math.min(N.start,ge),tt=N.end===void 0?we:Math.min(N.end,ge);!q.extend&&we>tt&&(y=tt,tt=we,we=y);var O=Zd(S,we),z=Zd(S,tt);if(O&&z&&(q.rangeCount!==1||q.anchorNode!==O.node||q.anchorOffset!==O.offset||q.focusNode!==z.node||q.focusOffset!==z.offset)){var L=F.createRange();L.setStart(O.node,O.offset),q.removeAllRanges(),we>tt?(q.addRange(L),q.extend(z.node,z.offset)):(L.setEnd(z.node,z.offset),q.addRange(L))}}}}for(F=[],q=S;q=q.parentNode;)q.nodeType===1&&F.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<F.length;S++){var X=F[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}$s=!!fu,hu=fu=null}finally{Qe=o,W.p=l,M.T=a}}e.current=t,Rt=2}}function fm(){if(Rt===2){Rt=0;var e=Yn,t=ii,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var l=W.p;W.p=2;var o=Qe;Qe|=4;try{qh(e,t.alternate,t)}finally{Qe=o,W.p=l,M.T=a}}Rt=3}}function hm(){if(Rt===4||Rt===3){Rt=0,Nn();var e=Yn,t=ii,a=xn,l=Ih;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,ii=Yn=null,mm(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(qn=null),B(a),t=t.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(ka,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=M.T,o=W.p,W.p=2,M.T=null;try{for(var d=e.onRecoverableError,y=0;y<l.length;y++){var S=l[y];d(S.value,{componentStack:S.stack})}}finally{M.T=t,W.p=o}}(xn&3)!==0&&Ds(),Ja(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Ic?tr++:(tr=0,Ic=e):tr=0,ar(0)}}function mm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ki(t)))}function Ds(){return dm(),fm(),hm(),pm()}function pm(){if(Rt!==5)return!1;var e=Yn,t=Wc;Wc=0;var a=B(xn),l=M.T,o=W.p;try{W.p=32>a?32:a,M.T=null,a=Pc,Pc=null;var d=Yn,y=xn;if(Rt=0,ii=Yn=null,xn=0,(Qe&6)!==0)throw Error(s(331));var S=Qe;if(Qe|=4,Jh(d.current),Qh(d,d.current,y,a),Qe=S,ar(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(ka,d)}catch{}return!0}finally{W.p=o,M.T=l,mm(e,t)}}function gm(e,t,a){t=_a(a,t),t=Oc(e.stateNode,t,2),e=An(e,t,2),e!==null&&($a(e,2),Ja(e))}function Je(e,t,a){if(e.tag===3)gm(e,e,a);else for(;t!==null;){if(t.tag===3){gm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(qn===null||!qn.has(l))){e=_a(a,e),a=yh(2),l=An(t,a,2),l!==null&&(xh(a,l,t,e),$a(l,2),Ja(l));break}}t=t.return}}function au(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ix;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Zc=!0,o.add(a),e=lv.bind(null,e,t,a),t.then(e,e))}function lv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,nt===e&&(qe&a)===a&&(gt===4||gt===3&&(qe&62914560)===qe&&300>At()-Es?(Qe&2)===0&&ri(e,0):Fc|=a,li===qe&&(li=0)),Ja(e)}function ym(e,t){t===0&&(t=nl()),e=cl(e,t),e!==null&&($a(e,t),Ja(e))}function iv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),ym(e,a)}function rv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(t),ym(e,a)}function sv(e,t){return ia(e,t)}var Ms=null,oi=null,nu=!1,As=!1,lu=!1,Gn=0;function Ja(e){e!==oi&&e.next===null&&(oi===null?Ms=oi=e:oi=oi.next=e),As=!0,nu||(nu=!0,cv())}function ar(e,t){if(!lu&&As){lu=!0;do for(var a=!1,l=Ms;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var d=0;else{var y=l.suspendedLanes,S=l.pingedLanes;d=(1<<31-Tt(42|e)+1)-1,d&=o&~(y&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Sm(l,d))}else d=qe,d=tn(l,l===nt?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||va(l,d)||(a=!0,Sm(l,d));l=l.next}while(a);lu=!1}}function ov(){xm()}function xm(){As=nu=!1;var e=0;Gn!==0&&vv()&&(e=Gn);for(var t=At(),a=null,l=Ms;l!==null;){var o=l.next,d=vm(l,t);d===0?(l.next=null,a===null?Ms=o:a.next=o,o===null&&(oi=a)):(a=l,(e!==0||(d&3)!==0)&&(As=!0)),l=o}Rt!==0&&Rt!==5||ar(e),Gn!==0&&(Gn=0)}function vm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Tt(d),S=1<<y,N=o[y];N===-1?((S&a)===0||(S&l)!==0)&&(o[y]=Ni(S,t)):N<=t&&(e.expiredLanes|=S),d&=~S}if(t=nt,a=qe,a=tn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&en(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||va(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&en(l),B(a)){case 2:case 8:a=al;break;case 32:a=Ga;break;case 268435456:a=Wt;break;default:a=Ga}return l=bm.bind(null,e),a=ia(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&en(l),e.callbackPriority=2,e.callbackNode=null,2}function bm(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ds()&&e.callbackNode!==a)return null;var l=qe;return l=tn(e,e===nt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(tm(e,l,t),vm(e,At()),e.callbackNode!=null&&e.callbackNode===a?bm.bind(null,e):null)}function Sm(e,t){if(Ds())return null;tm(e,t,!0)}function cv(){Sv(function(){(Qe&6)!==0?ia(La,ov):xm()})}function iu(){if(Gn===0){var e=Ql;e===0&&(e=Ze,Ze<<=1,(Ze&261888)===0&&(Ze=256)),Gn=e}return Gn}function _m(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vr(""+e)}function jm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function uv(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var d=_m((o[he]||null).action),y=l.submitter;y&&(t=(t=y[he]||null)?_m(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var S=new Xr("action","action",null,l,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Gn!==0){var N=y?jm(o,y):new FormData(o);wc(a,{pending:!0,data:N,method:o.method,action:d},null,N)}}else typeof d=="function"&&(S.preventDefault(),N=y?jm(o,y):new FormData(o),wc(a,{pending:!0,data:N,method:o.method,action:d},d,N))},currentTarget:o}]})}}for(var ru=0;ru<Vo.length;ru++){var su=Vo[ru],dv=su.toLowerCase(),fv=su[0].toUpperCase()+su.slice(1);Ha(dv,"on"+fv)}Ha(Id,"onAnimationEnd"),Ha(ef,"onAnimationIteration"),Ha(tf,"onAnimationStart"),Ha("dblclick","onDoubleClick"),Ha("focusin","onFocus"),Ha("focusout","onBlur"),Ha(Rx,"onTransitionRun"),Ha(zx,"onTransitionStart"),Ha(Tx,"onTransitionCancel"),Ha(af,"onTransitionEnd"),Ka("onMouseEnter",["mouseout","mouseover"]),Ka("onMouseLeave",["mouseout","mouseover"]),Ka("onPointerEnter",["pointerout","pointerover"]),Ka("onPointerLeave",["pointerout","pointerover"]),Ot("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ot("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ot("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ot("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),hv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nr));function Nm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var y=l.length-1;0<=y;y--){var S=l[y],N=S.instance,k=S.currentTarget;if(S=S.listener,N!==d&&o.isPropagationStopped())break e;d=S,o.currentTarget=k;try{d(o)}catch(V){Fr(V)}o.currentTarget=null,d=N}else for(y=0;y<l.length;y++){if(S=l[y],N=S.instance,k=S.currentTarget,S=S.listener,N!==d&&o.isPropagationStopped())break e;d=S,o.currentTarget=k;try{d(o)}catch(V){Fr(V)}o.currentTarget=null,d=N}}}}function Be(e,t){var a=t[Se];a===void 0&&(a=t[Se]=new Set);var l=e+"__bubble";a.has(l)||(wm(t,e,2,!1),a.add(l))}function ou(e,t,a){var l=0;t&&(l|=4),wm(a,e,l,t)}var Ls="_reactListening"+Math.random().toString(36).slice(2);function cu(e){if(!e[Ls]){e[Ls]=!0,En.forEach(function(a){a!=="selectionchange"&&(hv.has(a)||ou(a,!1,e),ou(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ls]||(t[Ls]=!0,ou("selectionchange",!1,t))}}function wm(e,t,a,l){switch(ep(t)){case 2:var o=Yv;break;case 8:o=Vv;break;default:o=Nu}a=o.bind(null,t,a,e),o=void 0,!zo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function uu(e,t,a,l,o){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var S=l.stateNode.containerInfo;if(S===o)break;if(y===4)for(y=l.return;y!==null;){var N=y.tag;if((N===3||N===4)&&y.stateNode.containerInfo===o)return;y=y.return}for(;S!==null;){if(y=rt(S),y===null)return;if(N=y.tag,N===5||N===6||N===26||N===27){l=d=y;continue e}S=S.parentNode}}l=l.return}zd(function(){var k=d,V=Co(a),F=[];e:{var H=nf.get(e);if(H!==void 0){var q=Xr,ge=e;switch(e){case"keypress":if($r(a)===0)break e;case"keydown":case"keyup":q=rx;break;case"focusin":ge="focus",q=Mo;break;case"focusout":ge="blur",q=Mo;break;case"beforeblur":case"afterblur":q=Mo;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Dd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Zy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=cx;break;case Id:case ef:case tf:q=Wy;break;case af:q=dx;break;case"scroll":case"scrollend":q=Xy;break;case"wheel":q=hx;break;case"copy":case"cut":case"paste":q=Iy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Ad;break;case"toggle":case"beforetoggle":q=px}var we=(t&4)!==0,tt=!we&&(e==="scroll"||e==="scrollend"),O=we?H!==null?H+"Capture":null:H;we=[];for(var z=k,L;z!==null;){var X=z;if(L=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||L===null||O===null||(X=wi(z,O),X!=null&&we.push(lr(z,X,L))),tt)break;z=z.return}0<we.length&&(H=new q(H,ge,null,a,V),F.push({event:H,listeners:we}))}}if((t&7)===0){e:{if(H=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",H&&a!==Eo&&(ge=a.relatedTarget||a.fromElement)&&(rt(ge)||ge[me]))break e;if((q||H)&&(H=V.window===V?V:(H=V.ownerDocument)?H.defaultView||H.parentWindow:window,q?(ge=a.relatedTarget||a.toElement,q=k,ge=ge?rt(ge):null,ge!==null&&(tt=u(ge),we=ge.tag,ge!==tt||we!==5&&we!==27&&we!==6)&&(ge=null)):(q=null,ge=k),q!==ge)){if(we=Dd,X="onMouseLeave",O="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(we=Ad,X="onPointerLeave",O="onPointerEnter",z="pointer"),tt=q==null?H:Ge(q),L=ge==null?H:Ge(ge),H=new we(X,z+"leave",q,a,V),H.target=tt,H.relatedTarget=L,X=null,rt(V)===k&&(we=new we(O,z+"enter",ge,a,V),we.target=L,we.relatedTarget=tt,X=we),tt=X,q&&ge)t:{for(we=mv,O=q,z=ge,L=0,X=O;X;X=we(X))L++;X=0;for(var _e=z;_e;_e=we(_e))X++;for(;0<L-X;)O=we(O),L--;for(;0<X-L;)z=we(z),X--;for(;L--;){if(O===z||z!==null&&O===z.alternate){we=O;break t}O=we(O),z=we(z)}we=null}else we=null;q!==null&&Em(F,H,q,we,!1),ge!==null&&tt!==null&&Em(F,tt,ge,we,!0)}}e:{if(H=k?Ge(k):window,q=H.nodeName&&H.nodeName.toLowerCase(),q==="select"||q==="input"&&H.type==="file")var Ke=Vd;else if(qd(H))if(Gd)Ke=wx;else{Ke=jx;var ye=_x}else q=H.nodeName,!q||q.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?k&&wo(k.elementType)&&(Ke=Vd):Ke=Nx;if(Ke&&(Ke=Ke(e,k))){Yd(F,Ke,a,V);break e}ye&&ye(e,H,k),e==="focusout"&&k&&H.type==="number"&&k.memoizedProps.value!=null&&No(H,"number",H.value)}switch(ye=k?Ge(k):window,e){case"focusin":(qd(ye)||ye.contentEditable==="true")&&(Bl=ye,Bo=k,Mi=null);break;case"focusout":Mi=Bo=Bl=null;break;case"mousedown":qo=!0;break;case"contextmenu":case"mouseup":case"dragend":qo=!1,Wd(F,a,V);break;case"selectionchange":if(Cx)break;case"keydown":case"keyup":Wd(F,a,V)}var Ae;if(Lo)e:{switch(e){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Hl?Hd(e,a)&&(Ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ye="onCompositionStart");Ye&&(Ld&&a.locale!=="ko"&&(Hl||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Hl&&(Ae=Td()):(Cn=V,To="value"in Cn?Cn.value:Cn.textContent,Hl=!0)),ye=ks(k,Ye),0<ye.length&&(Ye=new Md(Ye,e,null,a,V),F.push({event:Ye,listeners:ye}),Ae?Ye.data=Ae:(Ae=Bd(a),Ae!==null&&(Ye.data=Ae)))),(Ae=yx?xx(e,a):vx(e,a))&&(Ye=ks(k,"onBeforeInput"),0<Ye.length&&(ye=new Md("onBeforeInput","beforeinput",null,a,V),F.push({event:ye,listeners:Ye}),ye.data=Ae)),uv(F,e,k,a,V)}Nm(F,t)})}function lr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ks(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,d=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||d===null||(o=wi(e,a),o!=null&&l.unshift(lr(e,o,d)),o=wi(e,t),o!=null&&l.push(lr(e,o,d))),e.tag===3)return l;e=e.return}return[]}function mv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Em(e,t,a,l,o){for(var d=t._reactName,y=[];a!==null&&a!==l;){var S=a,N=S.alternate,k=S.stateNode;if(S=S.tag,N!==null&&N===l)break;S!==5&&S!==26&&S!==27||k===null||(N=k,o?(k=wi(a,d),k!=null&&y.unshift(lr(a,k,N))):o||(k=wi(a,d),k!=null&&y.push(lr(a,k,N)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var pv=/\r\n?/g,gv=/\u0000|\uFFFD/g;function Cm(e){return(typeof e=="string"?e:""+e).replace(pv,`
|
|
9
|
+
`).replace(gv,"")}function Rm(e,t){return t=Cm(t),Cm(e)===t}function et(e,t,a,l,o,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ll(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ll(e,""+l);break;case"className":xt(e,"class",l);break;case"tabIndex":xt(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":xt(e,a,l);break;case"style":Cd(e,l,d);break;case"data":if(t!=="object"){xt(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Vr(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&et(e,t,"name",o.name,o,null),et(e,t,"formEncType",o.formEncType,o,null),et(e,t,"formMethod",o.formMethod,o,null),et(e,t,"formTarget",o.formTarget,o,null)):(et(e,t,"encType",o.encType,o,null),et(e,t,"method",o.method,o,null),et(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Vr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=an);break;case"onScroll":l!=null&&Be("scroll",e);break;case"onScrollEnd":l!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Vr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Be("beforetoggle",e),Be("toggle",e),Ue(e,"popover",l);break;case"xlinkActuate":Gt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ue(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=$y.get(a)||a,Ue(e,a,l))}}function du(e,t,a,l,o,d){switch(a){case"style":Cd(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Ll(e,l):(typeof l=="number"||typeof l=="bigint")&&Ll(e,""+l);break;case"onScroll":l!=null&&Be("scroll",e);break;case"onScrollEnd":l!=null&&Be("scrollend",e);break;case"onClick":l!=null&&(e.onclick=an);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ua.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),d=e[he]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,o),typeof l=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Ue(e,a,l)}}}function Bt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var l=!1,o=!1,d;for(d in a)if(a.hasOwnProperty(d)){var y=a[d];if(y!=null)switch(d){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:et(e,t,d,y,a,null)}}o&&et(e,t,"srcSet",a.srcSet,a,null),l&&et(e,t,"src",a.src,a,null);return;case"input":Be("invalid",e);var S=d=y=o=null,N=null,k=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":o=V;break;case"type":y=V;break;case"checked":N=V;break;case"defaultChecked":k=V;break;case"value":d=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,t));break;default:et(e,t,l,V,a,null)}}jd(e,d,S,N,k,y,o,!1);return;case"select":Be("invalid",e),l=y=d=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":d=S;break;case"defaultValue":y=S;break;case"multiple":l=S;default:et(e,t,o,S,a,null)}t=d,a=y,e.multiple=!!l,t!=null?Al(e,!!l,t,!1):a!=null&&Al(e,!!l,a,!0);return;case"textarea":Be("invalid",e),d=o=l=null;for(y in a)if(a.hasOwnProperty(y)&&(S=a[y],S!=null))switch(y){case"value":l=S;break;case"defaultValue":o=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:et(e,t,y,S,a,null)}wd(e,l,o,d);return;case"option":for(N in a)a.hasOwnProperty(N)&&(l=a[N],l!=null)&&(N==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":et(e,t,N,l,a,null));return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(l=0;l<nr.length;l++)Be(nr[l],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(k in a)if(a.hasOwnProperty(k)&&(l=a[k],l!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:et(e,t,k,l,a,null)}return;default:if(wo(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&du(e,t,V,l,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(l=a[S],l!=null&&et(e,t,S,l,a,null))}function yv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,d=null,y=null,S=null,N=null,k=null,V=null;for(q in a){var F=a[q];if(a.hasOwnProperty(q)&&F!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":N=F;default:l.hasOwnProperty(q)||et(e,t,q,null,l,F)}}for(var H in l){var q=l[H];if(F=a[H],l.hasOwnProperty(H)&&(q!=null||F!=null))switch(H){case"type":d=q;break;case"name":o=q;break;case"checked":k=q;break;case"defaultChecked":V=q;break;case"value":y=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:q!==F&&et(e,t,H,q,l,F)}}jo(e,y,S,N,k,V,d,o);return;case"select":q=y=S=H=null;for(d in a)if(N=a[d],a.hasOwnProperty(d)&&N!=null)switch(d){case"value":break;case"multiple":q=N;default:l.hasOwnProperty(d)||et(e,t,d,null,l,N)}for(o in l)if(d=l[o],N=a[o],l.hasOwnProperty(o)&&(d!=null||N!=null))switch(o){case"value":H=d;break;case"defaultValue":S=d;break;case"multiple":y=d;default:d!==N&&et(e,t,o,d,l,N)}t=S,a=y,l=q,H!=null?Al(e,!!a,H,!1):!!l!=!!a&&(t!=null?Al(e,!!a,t,!0):Al(e,!!a,a?[]:"",!1));return;case"textarea":q=H=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:et(e,t,S,null,l,o)}for(y in l)if(o=l[y],d=a[y],l.hasOwnProperty(y)&&(o!=null||d!=null))switch(y){case"value":H=o;break;case"defaultValue":q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==d&&et(e,t,y,o,l,d)}Nd(e,H,q);return;case"option":for(var ge in a)H=a[ge],a.hasOwnProperty(ge)&&H!=null&&!l.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:et(e,t,ge,null,l,H));for(N in l)H=l[N],q=a[N],l.hasOwnProperty(N)&&H!==q&&(H!=null||q!=null)&&(N==="selected"?e.selected=H&&typeof H!="function"&&typeof H!="symbol":et(e,t,N,H,l,q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in a)H=a[we],a.hasOwnProperty(we)&&H!=null&&!l.hasOwnProperty(we)&&et(e,t,we,null,l,H);for(k in l)if(H=l[k],q=a[k],l.hasOwnProperty(k)&&H!==q&&(H!=null||q!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,t));break;default:et(e,t,k,H,l,q)}return;default:if(wo(t)){for(var tt in a)H=a[tt],a.hasOwnProperty(tt)&&H!==void 0&&!l.hasOwnProperty(tt)&&du(e,t,tt,void 0,l,H);for(V in l)H=l[V],q=a[V],!l.hasOwnProperty(V)||H===q||H===void 0&&q===void 0||du(e,t,V,H,l,q);return}}for(var O in a)H=a[O],a.hasOwnProperty(O)&&H!=null&&!l.hasOwnProperty(O)&&et(e,t,O,null,l,H);for(F in l)H=l[F],q=a[F],!l.hasOwnProperty(F)||H===q||H==null&&q==null||et(e,t,F,H,l,q)}function zm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],d=o.transferSize,y=o.initiatorType,S=o.duration;if(d&&S&&zm(y)){for(y=0,S=o.responseEnd,l+=1;l<a.length;l++){var N=a[l],k=N.startTime;if(k>S)break;var V=N.transferSize,F=N.initiatorType;V&&zm(F)&&(N=N.responseEnd,y+=V*(N<S?1:(S-k)/(N-k)))}if(--l,t+=8*(d+y)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var fu=null,hu=null;function Us(e){return e.nodeType===9?e:e.ownerDocument}function Tm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Om(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function mu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var pu=null;function vv(){var e=window.event;return e&&e.type==="popstate"?e===pu?!1:(pu=e,!0):(pu=null,!1)}var Dm=typeof setTimeout=="function"?setTimeout:void 0,bv=typeof clearTimeout=="function"?clearTimeout:void 0,Mm=typeof Promise=="function"?Promise:void 0,Sv=typeof queueMicrotask=="function"?queueMicrotask:typeof Mm<"u"?function(e){return Mm.resolve(null).then(e).catch(_v)}:Dm;function _v(e){setTimeout(function(){throw e})}function $n(e){return e==="head"}function Am(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),fi(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ir(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ir(a);for(var d=a.firstChild;d;){var y=d.nextSibling,S=d.nodeName;d[ke]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=y}}else a==="body"&&ir(e.ownerDocument.body);a=o}while(a);fi(t)}function Lm(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function gu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":gu(a),at(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function jv(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ke])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ca(e.nextSibling),e===null)break}return null}function Nv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ca(e.nextSibling),e===null))return null;return e}function km(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ca(e.nextSibling),e===null))return null;return e}function yu(e){return e.data==="$?"||e.data==="$~"}function xu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function wv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ca(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var vu=null;function Um(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ca(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Hm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Bm(e,t,a){switch(t=Us(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function ir(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);at(e)}var Ra=new Map,qm=new Set;function Hs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vn=W.d;W.d={f:Ev,r:Cv,D:Rv,C:zv,L:Tv,m:Ov,X:Mv,S:Dv,M:Av};function Ev(){var e=vn.f(),t=zs();return e||t}function Cv(e){var t=mt(e);t!==null&&t.tag===5&&t.type==="form"?nh(t):vn.r(e)}var ci=typeof document>"u"?null:document;function Ym(e,t,a){var l=ci;if(l&&typeof t=="string"&&t){var o=ba(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),qm.has(o)||(qm.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Bt(t,"link",e),lt(t),l.head.appendChild(t)))}}function Rv(e){vn.D(e),Ym("dns-prefetch",e,null)}function zv(e,t){vn.C(e,t),Ym("preconnect",e,t)}function Tv(e,t,a){vn.L(e,t,a);var l=ci;if(l&&e&&t){var o='link[rel="preload"][as="'+ba(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+ba(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+ba(a.imageSizes)+'"]')):o+='[href="'+ba(e)+'"]';var d=o;switch(t){case"style":d=ui(e);break;case"script":d=di(e)}Ra.has(d)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ra.set(d,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(rr(d))||t==="script"&&l.querySelector(sr(d))||(t=l.createElement("link"),Bt(t,"link",e),lt(t),l.head.appendChild(t)))}}function Ov(e,t){vn.m(e,t);var a=ci;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+ba(l)+'"][href="'+ba(e)+'"]',d=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=di(e)}if(!Ra.has(d)&&(e=x({rel:"modulepreload",href:e},t),Ra.set(d,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(sr(d)))return}l=a.createElement("link"),Bt(l,"link",e),lt(l),a.head.appendChild(l)}}}function Dv(e,t,a){vn.S(e,t,a);var l=ci;if(l&&e){var o=Ct(l).hoistableStyles,d=ui(e);t=t||"default";var y=o.get(d);if(!y){var S={loading:0,preload:null};if(y=l.querySelector(rr(d)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ra.get(d))&&bu(e,a);var N=y=l.createElement("link");lt(N),Bt(N,"link",e),N._p=new Promise(function(k,V){N.onload=k,N.onerror=V}),N.addEventListener("load",function(){S.loading|=1}),N.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Bs(y,t,l)}y={type:"stylesheet",instance:y,count:1,state:S},o.set(d,y)}}}function Mv(e,t){vn.X(e,t);var a=ci;if(a&&e){var l=Ct(a).hoistableScripts,o=di(e),d=l.get(o);d||(d=a.querySelector(sr(o)),d||(e=x({src:e,async:!0},t),(t=Ra.get(o))&&Su(e,t),d=a.createElement("script"),lt(d),Bt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(o,d))}}function Av(e,t){vn.M(e,t);var a=ci;if(a&&e){var l=Ct(a).hoistableScripts,o=di(e),d=l.get(o);d||(d=a.querySelector(sr(o)),d||(e=x({src:e,async:!0,type:"module"},t),(t=Ra.get(o))&&Su(e,t),d=a.createElement("script"),lt(d),Bt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(o,d))}}function Vm(e,t,a,l){var o=(o=je.current)?Hs(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ui(a.href),a=Ct(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ui(a.href);var d=Ct(o).hoistableStyles,y=d.get(e);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=o.querySelector(rr(e)))&&!d._p&&(y.instance=d,y.state.loading=5),Ra.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ra.set(e,a),d||Lv(o,e,a,y.state))),t&&l===null)throw Error(s(528,""));return y}if(t&&l!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=di(a),a=Ct(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function ui(e){return'href="'+ba(e)+'"'}function rr(e){return'link[rel="stylesheet"]['+e+"]"}function Gm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Lv(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Bt(t,"link",a),lt(t),e.head.appendChild(t))}function di(e){return'[src="'+ba(e)+'"]'}function sr(e){return"script[async]"+e}function $m(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ba(a.href)+'"]');if(l)return t.instance=l,lt(l),l;var o=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),lt(l),Bt(l,"style",o),Bs(l,a.precedence,e),t.instance=l;case"stylesheet":o=ui(a.href);var d=e.querySelector(rr(o));if(d)return t.state.loading|=4,t.instance=d,lt(d),d;l=Gm(a),(o=Ra.get(o))&&bu(l,o),d=(e.ownerDocument||e).createElement("link"),lt(d);var y=d;return y._p=new Promise(function(S,N){y.onload=S,y.onerror=N}),Bt(d,"link",l),t.state.loading|=4,Bs(d,a.precedence,e),t.instance=d;case"script":return d=di(a.src),(o=e.querySelector(sr(d)))?(t.instance=o,lt(o),o):(l=a,(o=Ra.get(d))&&(l=x({},a),Su(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),lt(o),Bt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Bs(l,a.precedence,e));return t.instance}function Bs(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,d=o,y=0;y<l.length;y++){var S=l[y];if(S.dataset.precedence===t)d=S;else if(d!==o)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function bu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Su(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qs=null;function Km(e,t,a){if(qs===null){var l=new Map,o=qs=new Map;o.set(a,l)}else o=qs,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var d=a[o];if(!(d[ke]||d[ie]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var S=l.get(y);S?S.push(d):l.set(y,[d])}}return l}function Xm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function kv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Qm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Uv(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=ui(l.href),d=t.querySelector(rr(o));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ys.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,lt(d);return}d=t.ownerDocument||t,l=Gm(l),(o=Ra.get(o))&&bu(l,o),d=d.createElement("link"),lt(d);var y=d;y._p=new Promise(function(S,N){y.onload=S,y.onerror=N}),Bt(d,"link",l),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ys.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var _u=0;function Hv(e,t){return e.stylesheets&&e.count===0&&Gs(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Gs(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&_u===0&&(_u=62500*xv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gs(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>_u?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Ys(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vs=null;function Gs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vs=new Map,t.forEach(Bv,e),Vs=null,Ys.call(e))}function Bv(e,t){if(!(t.state.loading&4)){var a=Vs.get(e);if(a)var l=a.get(null);else{a=new Map,Vs.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<o.length;d++){var y=o[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),l=y)}l&&a.set(null,l)}o=t.instance,y=o.getAttribute("data-precedence"),d=a.get(y)||l,d===l&&a.set(null,o),a.set(y,o),this.count++,l=Ys.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),d?d.parentNode.insertBefore(o,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var or={$$typeof:G,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function qv(e,t,a,l,o,d,y,S,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.hiddenUpdates=wn(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Zm(e,t,a,l,o,d,y,S,N,k,V,F){return e=new qv(e,t,a,y,N,k,V,F,S),t=1,d===!0&&(t|=24),d=oa(3,null,null,t),e.current=d,d.stateNode=e,t=tc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},ic(d),e}function Fm(e){return e?(e=Vl,e):Vl}function Jm(e,t,a,l,o,d){o=Fm(o),l.context===null?l.context=o:l.pendingContext=o,l=Mn(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=An(e,l,t),a!==null&&(la(a,e,t),qi(a,e,t))}function Wm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ju(e,t){Wm(e,t),(e=e.alternate)&&Wm(e,t)}function Pm(e){if(e.tag===13||e.tag===31){var t=cl(e,67108864);t!==null&&la(t,e,67108864),ju(e,67108864)}}function Im(e){if(e.tag===13||e.tag===31){var t=ha();t=T(t);var a=cl(e,t);a!==null&&la(a,e,t),ju(e,t)}}var $s=!0;function Yv(e,t,a,l){var o=M.T;M.T=null;var d=W.p;try{W.p=2,Nu(e,t,a,l)}finally{W.p=d,M.T=o}}function Vv(e,t,a,l){var o=M.T;M.T=null;var d=W.p;try{W.p=8,Nu(e,t,a,l)}finally{W.p=d,M.T=o}}function Nu(e,t,a,l){if($s){var o=wu(l);if(o===null)uu(e,t,l,Ks,a),tp(e,l);else if($v(o,e,t,a,l))l.stopPropagation();else if(tp(e,l),t&4&&-1<Gv.indexOf(e)){for(;o!==null;){var d=mt(o);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=Pt(d.pendingLanes);if(y!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var N=1<<31-Tt(y);S.entanglements[1]|=N,y&=~N}Ja(d),(Qe&6)===0&&(Cs=At()+500,ar(0))}}break;case 31:case 13:S=cl(d,2),S!==null&&la(S,d,2),zs(),ju(d,2)}if(d=wu(l),d===null&&uu(e,t,l,Ks,a),d===o)break;o=d}o!==null&&l.stopPropagation()}else uu(e,t,l,null,a)}}function wu(e){return e=Co(e),Eu(e)}var Ks=null;function Eu(e){if(Ks=null,e=rt(e),e!==null){var t=u(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ks=e,null}function ep(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(xa()){case La:return 2;case al:return 8;case Ga:case ra:return 32;case Wt:return 268435456;default:return 32}default:return 32}}var Cu=!1,Kn=null,Xn=null,Qn=null,cr=new Map,ur=new Map,Zn=[],Gv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function tp(e,t){switch(e){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":cr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ur.delete(t.pointerId)}}function dr(e,t,a,l,o,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:d,targetContainers:[o]},t!==null&&(t=mt(t),t!==null&&Pm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function $v(e,t,a,l,o){switch(t){case"focusin":return Kn=dr(Kn,e,t,a,l,o),!0;case"dragenter":return Xn=dr(Xn,e,t,a,l,o),!0;case"mouseover":return Qn=dr(Qn,e,t,a,l,o),!0;case"pointerover":var d=o.pointerId;return cr.set(d,dr(cr.get(d)||null,e,t,a,l,o)),!0;case"gotpointercapture":return d=o.pointerId,ur.set(d,dr(ur.get(d)||null,e,t,a,l,o)),!0}return!1}function ap(e){var t=rt(e.target);if(t!==null){var a=u(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,ne(e.priority,function(){Im(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,ne(e.priority,function(){Im(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=wu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Eo=l,a.target.dispatchEvent(l),Eo=null}else return t=mt(a),t!==null&&Pm(t),e.blockedOn=a,!1;t.shift()}return!0}function np(e,t,a){Xs(e)&&a.delete(t)}function Kv(){Cu=!1,Kn!==null&&Xs(Kn)&&(Kn=null),Xn!==null&&Xs(Xn)&&(Xn=null),Qn!==null&&Xs(Qn)&&(Qn=null),cr.forEach(np),ur.forEach(np)}function Qs(e,t){e.blockedOn===t&&(e.blockedOn=null,Cu||(Cu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Kv)))}var Zs=null;function lp(e){Zs!==e&&(Zs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Zs===e&&(Zs=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Eu(l||a)===null)continue;break}var d=mt(a);d!==null&&(e.splice(t,3),t-=3,wc(d,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function fi(e){function t(N){return Qs(N,e)}Kn!==null&&Qs(Kn,e),Xn!==null&&Qs(Xn,e),Qn!==null&&Qs(Qn,e),cr.forEach(t),ur.forEach(t);for(var a=0;a<Zn.length;a++){var l=Zn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Zn.length&&(a=Zn[0],a.blockedOn===null);)ap(a),a.blockedOn===null&&Zn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],d=a[l+1],y=o[he]||null;if(typeof d=="function")y||lp(a);else if(y){var S=null;if(d&&d.hasAttribute("formAction")){if(o=d,y=d[he]||null)S=y.formAction;else if(Eu(o)!==null)continue}else S=y.action;typeof S=="function"?a[l+1]=S:(a.splice(l,3),l-=3),lp(a)}}}function ip(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return o=y})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Ru(e){this._internalRoot=e}Fs.prototype.render=Ru.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=ha();Jm(a,l,e,t,null,null)},Fs.prototype.unmount=Ru.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jm(e.current,2,null,e,null,null),zs(),t[me]=null}};function Fs(e){this._internalRoot=e}Fs.prototype.unstable_scheduleHydration=function(e){if(e){var t=ee();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Zn.length&&t!==0&&t<Zn[a].priority;a++);Zn.splice(a,0,e),a===0&&ap(e)}};var rp=i.version;if(rp!=="19.2.4")throw Error(s(527,rp,"19.2.4"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=m(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Xv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Js=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Js.isDisabled&&Js.supportsFiber)try{ka=Js.inject(Xv),Lt=Js}catch{}}return mr.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,l="",o=hh,d=mh,y=ph;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Zm(e,1,!1,null,null,a,l,null,o,d,y,ip),e[me]=t.current,cu(e),new Ru(t)},mr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var l=!1,o="",d=hh,y=mh,S=ph,N=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(N=a.formState)),t=Zm(e,1,!0,t,a??null,l,o,N,d,y,S,ip),t.context=Fm(null),a=t.current,l=ha(),l=T(l),o=Mn(l),o.callback=null,An(a,o,l),a=l,t.current.lanes=a,$a(t,a),Ja(t),e[me]=t.current,cu(e),new Fs(t)},mr.version="19.2.4",mr}var Up;function ub(){if(Up)return ku.exports;Up=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),ku.exports=cb(),ku.exports}var db=ub();var Vg=n=>{throw TypeError(n)},fb=(n,i,r)=>i.has(n)||Vg("Cannot "+r),qu=(n,i,r)=>(fb(n,i,"read from private field"),r?r.call(n):i.get(n)),hb=(n,i,r)=>i.has(n)?Vg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),Hp="popstate";function Bp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function mb(n={}){function i(s,c){let u=c.state?.masked,{pathname:h,search:p,hash:g}=u||s.location;return Er("",{pathname:h,search:p,hash:g},c.state&&c.state.usr||null,c.state&&c.state.key||"default",u?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function r(s,c){return typeof c=="string"?c:Pa(c)}return gb(i,r,null,n)}function Le(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function yt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function pb(){return Math.random().toString(36).substring(2,10)}function qp(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Er(n,i,r=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?jn(i):i,state:r,key:i&&i.key||s||pb(),unstable_mask:c}}function Pa({pathname:n="/",search:i="",hash:r=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function jn(n){let i={};if(n){let r=n.indexOf("#");r>=0&&(i.hash=n.substring(r),n=n.substring(0,r));let s=n.indexOf("?");s>=0&&(i.search=n.substring(s),n=n.substring(0,s)),n&&(i.pathname=n)}return i}function gb(n,i,r,s={}){let{window:c=document.defaultView,v5Compat:u=!1}=s,h=c.history,p="POP",g=null,m=b();m==null&&(m=0,h.replaceState({...h.state,idx:m},""));function b(){return(h.state||{idx:null}).idx}function x(){p="POP";let A=b(),Q=A==null?null:A-m;m=A,g&&g({action:p,location:D.location,delta:Q})}function _(A,Q){p="PUSH";let J=Bp(A)?A:Er(D.location,A,Q);m=b()+1;let G=qp(J,m),Z=D.createHref(J.unstable_mask||J);try{h.pushState(G,"",Z)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;c.location.assign(Z)}u&&g&&g({action:p,location:D.location,delta:1})}function j(A,Q){p="REPLACE";let J=Bp(A)?A:Er(D.location,A,Q);m=b();let G=qp(J,m),Z=D.createHref(J.unstable_mask||J);h.replaceState(G,"",Z),u&&g&&g({action:p,location:D.location,delta:0})}function w(A){return Gg(A)}let D={get action(){return p},get location(){return n(c,h)},listen(A){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(Hp,x),g=A,()=>{c.removeEventListener(Hp,x),g=null}},createHref(A){return i(c,A)},createURL:w,encodeLocation(A){let Q=w(A);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:_,replace:j,go(A){return h.go(A)}};return D}function Gg(n,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Le(r,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Pa(n);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=r+s),new URL(s,r)}var xr,Yp=class{constructor(n){if(hb(this,xr,new Map),n)for(let[i,r]of n)this.set(i,r)}get(n){if(qu(this,xr).has(n))return qu(this,xr).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){qu(this,xr).set(n,i)}};xr=new WeakMap;var yb=new Set(["lazy","caseSensitive","path","id","index","children"]);function xb(n){return yb.has(n)}var vb=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function bb(n){return vb.has(n)}function Sb(n){return n.index===!0}function Cr(n,i,r=[],s={},c=!1){return n.map((u,h)=>{let p=[...r,String(h)],g=typeof u.id=="string"?u.id:p.join("-");if(Le(u.index!==!0||!u.children,"Cannot specify children on an index route"),Le(c||!s[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),Sb(u)){let m={...u,id:g};return s[g]=Vp(m,i(m)),m}else{let m={...u,id:g,children:void 0};return s[g]=Vp(m,i(m)),u.children&&(m.children=Cr(u.children,i,p,s,c)),m}})}function Vp(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function Jn(n,i,r="/"){return vr(n,i,r,!1)}function vr(n,i,r,s){let c=typeof i=="string"?jn(i):i,u=Oa(c.pathname||"/",r);if(u==null)return null;let h=$g(n);jb(h);let p=null;for(let g=0;p==null&&g<h.length;++g){let m=Ab(u);p=Db(h[g],m,s)}return p}function _b(n,i){let{route:r,pathname:s,params:c}=n;return{id:r.id,pathname:s,params:c,data:i[r.id],loaderData:i[r.id],handle:r.handle}}function $g(n,i=[],r=[],s="",c=!1){let u=(h,p,g=c,m)=>{let b={relativePath:m===void 0?h.path||"":m,caseSensitive:h.caseSensitive===!0,childrenIndex:p,route:h};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&g)return;Le(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let x=Ya([s,b.relativePath]),_=r.concat(b);h.children&&h.children.length>0&&(Le(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),$g(h.children,i,_,x,g)),!(h.path==null&&!h.index)&&i.push({path:x,score:Tb(x,h.index),routesMeta:_})};return n.forEach((h,p)=>{if(h.path===""||!h.path?.includes("?"))u(h,p);else for(let g of Kg(h.path))u(h,p,!0,g)}),i}function Kg(n){let i=n.split("/");if(i.length===0)return[];let[r,...s]=i,c=r.endsWith("?"),u=r.replace(/\?$/,"");if(s.length===0)return c?[u,""]:[u];let h=Kg(s.join("/")),p=[];return p.push(...h.map(g=>g===""?u:[u,g].join("/"))),c&&p.push(...h),p.map(g=>n.startsWith("/")&&g===""?"/":g)}function jb(n){n.sort((i,r)=>i.score!==r.score?r.score-i.score:Ob(i.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var Nb=/^:[\w-]+$/,wb=3,Eb=2,Cb=1,Rb=10,zb=-2,Gp=n=>n==="*";function Tb(n,i){let r=n.split("/"),s=r.length;return r.some(Gp)&&(s+=zb),i&&(s+=Eb),r.filter(c=>!Gp(c)).reduce((c,u)=>c+(Nb.test(u)?wb:u===""?Cb:Rb),s)}function Ob(n,i){return n.length===i.length&&n.slice(0,-1).every((s,c)=>s===i[c])?n[n.length-1]-i[i.length-1]:0}function Db(n,i,r=!1){let{routesMeta:s}=n,c={},u="/",h=[];for(let p=0;p<s.length;++p){let g=s[p],m=p===s.length-1,b=u==="/"?i:i.slice(u.length)||"/",x=co({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},b),_=g.route;if(!x&&m&&r&&!s[s.length-1].route.index&&(x=co({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!x)return null;Object.assign(c,x.params),h.push({params:c,pathname:Ya([u,x.pathname]),pathnameBase:Ub(Ya([u,x.pathnameBase])),route:_}),x.pathnameBase!=="/"&&(u=Ya([u,x.pathnameBase]))}return h}function co(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=Mb(n.path,n.caseSensitive,n.end),c=i.match(r);if(!c)return null;let u=c[0],h=u.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:s.reduce((m,{paramName:b,isOptional:x},_)=>{if(b==="*"){let w=p[_]||"";h=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const j=p[_];return x&&!j?m[b]=void 0:m[b]=(j||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:h,pattern:n}}function Mb(n,i=!1,r=!0){yt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let s=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,p,g,m,b)=>{if(s.push({paramName:p,isOptional:g!=null}),g){let x=b.charAt(m+h.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(s.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),s]}function Ab(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return yt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function Oa(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,s=n.charAt(r);return s&&s!=="/"?null:n.slice(r)||"/"}function Lb({basename:n,pathname:i}){return i==="/"?n:Ya([n,i])}var Xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dd=n=>Xg.test(n);function kb(n,i="/"){let{pathname:r,search:s="",hash:c=""}=typeof n=="string"?jn(n):n,u;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?u=$p(r.substring(1),"/"):u=$p(r,i)):u=i,{pathname:u,search:Hb(s),hash:Bb(c)}}function $p(n,i){let r=i.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function Yu(n,i,r,s){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Qg(n){return n.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function mo(n){let i=Qg(n);return i.map((r,s)=>s===i.length-1?r.pathname:r.pathnameBase)}function Tr(n,i,r,s=!1){let c;typeof n=="string"?c=jn(n):(c={...n},Le(!c.pathname||!c.pathname.includes("?"),Yu("?","pathname","search",c)),Le(!c.pathname||!c.pathname.includes("#"),Yu("#","pathname","hash",c)),Le(!c.search||!c.search.includes("#"),Yu("#","search","hash",c)));let u=n===""||c.pathname==="",h=u?"/":c.pathname,p;if(h==null)p=r;else{let x=i.length-1;if(!s&&h.startsWith("..")){let _=h.split("/");for(;_[0]==="..";)_.shift(),x-=1;c.pathname=_.join("/")}p=x>=0?i[x]:"/"}let g=kb(c,p),m=h&&h!=="/"&&h.endsWith("/"),b=(u||h===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(m||b)&&(g.pathname+="/"),g}var Ya=n=>n.join("/").replace(/\/\/+/g,"/"),Ub=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Hb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Bb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Or=class{constructor(n,i,r,s=!1){this.status=n,this.statusText=i||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Rr(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Dr(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Zg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fg(n,i){let r=n;if(typeof r!="string"||!Xg.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let s=r,c=!1;if(Zg)try{let u=new URL(window.location.href),h=r.startsWith("//")?new URL(u.protocol+r):new URL(r),p=Oa(h.pathname,i);h.origin===u.origin&&p!=null?r=p+h.search+h.hash:c=!0}catch{yt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:r}}var Pn=Symbol("Uninstrumented");function qb(n,i){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:i.id,index:i.index,path:i.path,instrument(u){let h=Object.keys(r);for(let p of h)u[p]&&r[p].push(u[p])}}));let s={};if(typeof i.lazy=="function"&&r.lazy.length>0){let c=yi(r.lazy,i.lazy,()=>{});c&&(s.lazy=c)}if(typeof i.lazy=="object"){let c=i.lazy;["middleware","loader","action"].forEach(u=>{let h=c[u],p=r[`lazy.${u}`];if(typeof h=="function"&&p.length>0){let g=yi(p,h,()=>{});g&&(s.lazy=Object.assign(s.lazy||{},{[u]:g}))}})}return["loader","action"].forEach(c=>{let u=i[c];if(typeof u=="function"&&r[c].length>0){let h=u[Pn]??u,p=yi(r[c],h,(...g)=>Kp(g[0]));p&&(c==="loader"&&h.hydrate===!0&&(p.hydrate=!0),p[Pn]=h,s[c]=p)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let u=c[Pn]??c,h=yi(r.middleware,u,(...p)=>Kp(p[0]));return h?(h[Pn]=u,h):c})),s}function Yb(n,i){let r={navigate:[],fetch:[]};if(i.forEach(s=>s({instrument(c){let u=Object.keys(c);for(let h of u)c[h]&&r[h].push(c[h])}})),r.navigate.length>0){let s=n.navigate[Pn]??n.navigate,c=yi(r.navigate,s,(...u)=>{let[h,p]=u;return{to:typeof h=="number"||typeof h=="string"?h:h?Pa(h):".",...Xp(n,p??{})}});c&&(c[Pn]=s,n.navigate=c)}if(r.fetch.length>0){let s=n.fetch[Pn]??n.fetch,c=yi(r.fetch,s,(...u)=>{let[h,,p,g]=u;return{href:p??".",fetcherKey:h,...Xp(n,g??{})}});c&&(c[Pn]=s,n.fetch=c)}return n}function yi(n,i,r){return n.length===0?null:async(...s)=>{let c=await Jg(n,r(...s),()=>i(...s),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Jg(n,i,r,s){let c=n[s],u;if(c){let h,p=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=Jg(n,i,r,s-1),u=await h,Le(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await c(p,i)}catch(g){console.error("An instrumentation function threw an error:",g)}h||await p(),await h}else try{u={type:"success",value:await r()}}catch(h){u={type:"error",value:h}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Kp(n){let{request:i,context:r,params:s,unstable_pattern:c}=n;return{request:Vb(i),params:{...s},unstable_pattern:c,context:Gb(r)}}function Xp(n,i){return{currentUrl:Pa(n.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function Vb(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function Gb(n){if(Kb(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var $b=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Kb(n){if(n===null||typeof n!="object")return!1;const i=Object.getPrototypeOf(n);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===$b}var Wg=["POST","PUT","PATCH","DELETE"],Xb=new Set(Wg),Qb=["GET",...Wg],Zb=new Set(Qb),Pg=new Set([301,302,303,307,308]),Fb=new Set([307,308]),Vu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Jb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},pr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Wb=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Ig="remix-router-transitions",ey=Symbol("ResetLoaderData");function Pb(n){const i=n.window?n.window:typeof window<"u"?window:void 0,r=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";Le(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=n.hydrationRouteProperties||[],c=n.mapRouteProperties||Wb,u=c;if(n.unstable_instrumentations){let C=n.unstable_instrumentations;u=T=>({...c(T),...qb(C.map(B=>B.route).filter(Boolean),T)})}let h={},p=Cr(n.routes,u,void 0,h),g,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let b=n.dataStrategy||n1,x={...n.future},_=null,j=new Set,w=null,D=null,A=null,Q=n.hydrationData!=null,J=Jn(p,n.history.location,m),G=!1,Z=null,K,ae;if(J==null&&!n.patchRoutesOnNavigation){let C=za(404,{pathname:n.history.location.pathname}),{matches:T,route:B}=Ps(p);K=!0,ae=!K,J=T,Z={[B.id]:C}}else if(J&&!n.hydrationData&&wn(J,p,n.history.location.pathname).active&&(J=null),J)if(J.some(C=>C.route.lazy))K=!1,ae=!K;else if(!J.some(C=>fd(C.route)))K=!0,ae=!K;else{let C=n.hydrationData?n.hydrationData.loaderData:null,T=n.hydrationData?n.hydrationData.errors:null,B=J;if(T){let ee=J.findIndex(ne=>T[ne.route.id]!==void 0);B=B.slice(0,ee+1)}ae=!1,K=B.every(ee=>{let ne=ty(ee.route,C,T);return ae=ae||ne.renderFallback,!ne.shouldLoad})}else{K=!1,ae=!K,J=[];let C=wn(null,p,n.history.location.pathname);C.active&&C.matches&&(G=!0,J=C.matches)}let P,R={historyAction:n.history.action,location:n.history.location,matches:J,initialized:K,renderFallback:ae,navigation:Vu,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||Z,fetchers:new Map,blockers:new Map},U="POP",$=null,de=!1,se,ve=!1,te=new Map,ce=null,M=!1,W=!1,ue=new Set,oe=new Map,Ce=0,E=-1,Y=new Map,I=new Set,le=new Map,be=new Map,je=new Set,Te=new Map,ut,fe=null;function zt(){if(_=n.history.listen(({action:C,location:T,delta:B})=>{if(ut){ut(),ut=void 0;return}yt(Te.size===0||B!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ee=Pe({currentLocation:R.location,nextLocation:T,historyAction:C});if(ee&&B!=null){let ne=new Promise(pe=>{ut=pe});n.history.go(B*-1),dt(ee,{state:"blocked",location:T,proceed(){dt(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),ne.then(()=>n.history.go(B))},reset(){let pe=new Map(R.blockers);pe.set(ee,pr),We({blockers:pe})}}),$?.resolve(),$=null;return}return Jt(C,T)}),r){S1(i,te);let C=()=>_1(i,te);i.addEventListener("pagehide",C),ce=()=>i.removeEventListener("pagehide",C)}return R.initialized||Jt("POP",R.location,{initialHydration:!0}),P}function Yt(){_&&_(),ce&&ce(),j.clear(),se&&se.abort(),R.fetchers.forEach((C,T)=>ka(T)),R.blockers.forEach((C,T)=>Ze(T))}function it(C){return j.add(C),()=>j.delete(C)}function We(C,T={}){C.matches&&(C.matches=C.matches.map(ne=>{let pe=h[ne.route.id],ie=ne.route;return ie.element!==pe.element||ie.errorElement!==pe.errorElement||ie.hydrateFallbackElement!==pe.hydrateFallbackElement?{...ne,route:pe}:ne})),R={...R,...C};let B=[],ee=[];R.fetchers.forEach((ne,pe)=>{ne.state==="idle"&&(je.has(pe)?B.push(pe):ee.push(pe))}),je.forEach(ne=>{!R.fetchers.has(ne)&&!oe.has(ne)&&B.push(ne)}),[...j].forEach(ne=>ne(R,{deletedFetchers:B,newErrors:C.errors??null,viewTransitionOpts:T.viewTransitionOpts,flushSync:T.flushSync===!0})),B.forEach(ne=>ka(ne)),ee.forEach(ne=>R.fetchers.delete(ne))}function ht(C,T,{flushSync:B}={}){let ee=R.actionData!=null&&R.navigation.formMethod!=null&&Kt(R.navigation.formMethod)&&R.navigation.state==="loading"&&C.state?._isRedirect!==!0,ne;T.actionData?Object.keys(T.actionData).length>0?ne=T.actionData:ne=null:ee?ne=R.actionData:ne=null;let pe=T.loaderData?ag(R.loaderData,T.loaderData,T.matches||[],T.errors):R.loaderData,ie=R.blockers;ie.size>0&&(ie=new Map(ie),ie.forEach((Ne,xe)=>ie.set(xe,pr)));let he=M?!1:nl(C,T.matches||R.matches),me=de===!0||R.navigation.formMethod!=null&&Kt(R.navigation.formMethod)&&C.state?._isRedirect!==!0;g&&(p=g,g=void 0),M||U==="POP"||(U==="PUSH"?n.history.push(C,C.state):U==="REPLACE"&&n.history.replace(C,C.state));let Se;if(U==="POP"){let Ne=te.get(R.location.pathname);Ne&&Ne.has(C.pathname)?Se={currentLocation:R.location,nextLocation:C}:te.has(C.pathname)&&(Se={currentLocation:C,nextLocation:R.location})}else if(ve){let Ne=te.get(R.location.pathname);Ne?Ne.add(C.pathname):(Ne=new Set([C.pathname]),te.set(R.location.pathname,Ne)),Se={currentLocation:R.location,nextLocation:C}}We({...T,actionData:ne,loaderData:pe,historyAction:U,location:C,initialized:!0,renderFallback:!1,navigation:Vu,revalidation:"idle",restoreScrollPosition:he,preventScrollReset:me,blockers:ie},{viewTransitionOpts:Se,flushSync:B===!0}),U="POP",de=!1,ve=!1,M=!1,W=!1,$?.resolve(),$=null,fe?.resolve(),fe=null}async function Mt(C,T){if($?.resolve(),$=null,typeof C=="number"){$||($=rg());let at=$.promise;return n.history.go(C),at}let B=ed(R.location,R.matches,m,C,T?.fromRouteId,T?.relative),{path:ee,submission:ne,error:pe}=Qp(!1,B,T),ie;T?.unstable_mask&&(ie={pathname:"",search:"",hash:"",...typeof T.unstable_mask=="string"?jn(T.unstable_mask):{...R.location.unstable_mask,...T.unstable_mask}});let he=R.location,me=Er(he,ee,T&&T.state,void 0,ie);me={...me,...n.history.encodeLocation(me)};let Se=T&&T.replace!=null?T.replace:void 0,Ne="PUSH";Se===!0?Ne="REPLACE":Se===!1||ne!=null&&Kt(ne.formMethod)&&ne.formAction===R.location.pathname+R.location.search&&(Ne="REPLACE");let xe=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,$e=(T&&T.flushSync)===!0,ke=Pe({currentLocation:he,nextLocation:me,historyAction:Ne});if(ke){dt(ke,{state:"blocked",location:me,proceed(){dt(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),Mt(C,T)},reset(){let at=new Map(R.blockers);at.set(ke,pr),We({blockers:at})}});return}await Jt(Ne,me,{submission:ne,pendingError:pe,preventScrollReset:xe,replace:T&&T.replace,enableViewTransition:T&&T.viewTransition,flushSync:$e,callSiteDefaultShouldRevalidate:T&&T.unstable_defaultShouldRevalidate})}function Aa(){fe||(fe=rg()),Ga(),We({revalidation:"loading"});let C=fe.promise;return R.navigation.state==="submitting"?C:R.navigation.state==="idle"?(Jt(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),C):(Jt(U||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:ve===!0}),C)}async function Jt(C,T,B){se&&se.abort(),se=null,U=C,M=(B&&B.startUninterruptedRevalidation)===!0,Ni(R.location,R.matches),de=(B&&B.preventScrollReset)===!0,ve=(B&&B.enableViewTransition)===!0;let ee=g||p,ne=B&&B.overrideNavigation,pe=B?.initialHydration&&R.matches&&R.matches.length>0&&!G?R.matches:Jn(ee,T,m),ie=(B&&B.flushSync)===!0;if(pe&&R.initialized&&!W&&d1(R.location,T)&&!(B&&B.submission&&Kt(B.submission.formMethod))){ht(T,{matches:pe},{flushSync:ie});return}let he=wn(pe,ee,T.pathname);if(he.active&&he.matches&&(pe=he.matches),!pe){let{error:rt,notFoundMatches:mt,route:Ge}=Pt(T.pathname);ht(T,{matches:mt,loaderData:{},errors:{[Ge.id]:rt}},{flushSync:ie});return}se=new AbortController;let me=pi(n.history,T,se.signal,B&&B.submission),Se=n.getContext?await n.getContext():new Yp,Ne;if(B&&B.pendingError)Ne=[Wn(pe).route.id,{type:"error",error:B.pendingError}];else if(B&&B.submission&&Kt(B.submission.formMethod)){let rt=await Vt(me,T,B.submission,pe,Se,he.active,B&&B.initialHydration===!0,{replace:B.replace,flushSync:ie});if(rt.shortCircuited)return;if(rt.pendingActionResult){let[mt,Ge]=rt.pendingActionResult;if(ma(Ge)&&Rr(Ge.error)&&Ge.error.status===404){se=null,ht(T,{matches:rt.matches,loaderData:{},errors:{[mt]:Ge.error}});return}}pe=rt.matches||pe,Ne=rt.pendingActionResult,ne=Gu(T,B.submission),ie=!1,he.active=!1,me=pi(n.history,me.url,me.signal)}let{shortCircuited:xe,matches:$e,loaderData:ke,errors:at}=await ya(me,T,pe,Se,he.active,ne,B&&B.submission,B&&B.fetcherSubmission,B&&B.replace,B&&B.initialHydration===!0,ie,Ne,B&&B.callSiteDefaultShouldRevalidate);xe||(se=null,ht(T,{matches:$e||pe,...ng(Ne),loaderData:ke,errors:at}))}async function Vt(C,T,B,ee,ne,pe,ie,he={}){Ga();let me=v1(T,B);if(We({navigation:me},{flushSync:he.flushSync===!0}),pe){let xe=await $a(ee,T.pathname,C.signal);if(xe.type==="aborted")return{shortCircuited:!0};if(xe.type==="error"){if(xe.partialMatches.length===0){let{matches:ke,route:at}=Ps(p);return{matches:ke,pendingActionResult:[at.id,{type:"error",error:xe.error}]}}let $e=Wn(xe.partialMatches).route.id;return{matches:xe.partialMatches,pendingActionResult:[$e,{type:"error",error:xe.error}]}}else if(xe.matches)ee=xe.matches;else{let{notFoundMatches:$e,error:ke,route:at}=Pt(T.pathname);return{matches:$e,pendingActionResult:[at.id,{type:"error",error:ke}]}}}let Se,Ne=no(ee,T);if(!Ne.route.action&&!Ne.route.lazy)Se={type:"error",error:za(405,{method:C.method,pathname:T.pathname,routeId:Ne.route.id})};else{let xe=xi(u,h,C,ee,Ne,ie?[]:s,ne),$e=await La(C,xe,ne,null);if(Se=$e[Ne.route.id],!Se){for(let ke of ee)if($e[ke.route.id]){Se=$e[ke.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(jl(Se)){let xe;return he&&he.replace!=null?xe=he.replace:xe=Ip(Se.response.headers.get("Location"),new URL(C.url),m,n.history)===R.location.pathname+R.location.search,await xa(C,Se,!0,{submission:B,replace:xe}),{shortCircuited:!0}}if(ma(Se)){let xe=Wn(ee,Ne.route.id);return(he&&he.replace)!==!0&&(U="PUSH"),{matches:ee,pendingActionResult:[xe.route.id,Se,Ne.route.id]}}return{matches:ee,pendingActionResult:[Ne.route.id,Se]}}async function ya(C,T,B,ee,ne,pe,ie,he,me,Se,Ne,xe,$e){let ke=pe||Gu(T,ie),at=ie||he||ig(ke),rt=!M&&!Se;if(ne){if(rt){let xt=ia(xe);We({navigation:ke,...xt!==void 0?{actionData:xt}:{}},{flushSync:Ne})}let Ue=await $a(B,T.pathname,C.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){if(Ue.partialMatches.length===0){let{matches:Gt,route:_t}=Ps(p);return{matches:Gt,loaderData:{},errors:{[_t.id]:Ue.error}}}let xt=Wn(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,loaderData:{},errors:{[xt]:Ue.error}}}else if(Ue.matches)B=Ue.matches;else{let{error:xt,notFoundMatches:Gt,route:_t}=Pt(T.pathname);return{matches:Gt,loaderData:{},errors:{[_t.id]:xt}}}}let mt=g||p,{dsMatches:Ge,revalidatingFetchers:Ct}=Zp(C,ee,u,h,n.history,R,B,at,T,Se?[]:s,Se===!0,W,ue,je,le,I,mt,m,n.patchRoutesOnNavigation!=null,xe,$e);if(E=++Ce,!n.dataStrategy&&!Ge.some(Ue=>Ue.shouldLoad)&&!Ge.some(Ue=>Ue.route.middleware&&Ue.route.middleware.length>0)&&Ct.length===0){let Ue=Tl();return ht(T,{matches:B,loaderData:{},errors:xe&&ma(xe[1])?{[xe[0]]:xe[1].error}:null,...ng(xe),...Ue?{fetchers:new Map(R.fetchers)}:{}},{flushSync:Ne}),{shortCircuited:!0}}if(rt){let Ue={};if(!ne){Ue.navigation=ke;let xt=ia(xe);xt!==void 0&&(Ue.actionData=xt)}Ct.length>0&&(Ue.fetchers=en(Ct)),We(Ue,{flushSync:Ne})}Ct.forEach(Ue=>{St(Ue.key),Ue.controller&&oe.set(Ue.key,Ue.controller)});let lt=()=>Ct.forEach(Ue=>St(Ue.key));se&&se.signal.addEventListener("abort",lt);let{loaderResults:En,fetcherResults:Ua}=await al(Ge,Ct,C,ee);if(C.signal.aborted)return{shortCircuited:!0};se&&se.signal.removeEventListener("abort",lt),Ct.forEach(Ue=>oe.delete(Ue.key));let Ot=Is(En);if(Ot)return await xa(C,Ot.result,!0,{replace:me}),{shortCircuited:!0};if(Ot=Is(Ua),Ot)return I.add(Ot.key),await xa(C,Ot.result,!0,{replace:me}),{shortCircuited:!0};let{loaderData:Ka,errors:ll}=tg(R,B,En,xe,Ct,Ua);Se&&R.errors&&(ll={...R.errors,...ll});let Xa=Tl(),il=re(E),Ol=Xa||il||Ct.length>0;return{matches:B,loaderData:Ka,errors:ll,...Ol?{fetchers:new Map(R.fetchers)}:{}}}function ia(C){if(C&&!ma(C[1]))return{[C[0]]:C[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function en(C){return C.forEach(T=>{let B=R.fetchers.get(T.key),ee=gr(void 0,B?B.data:void 0);R.fetchers.set(T.key,ee)}),new Map(R.fetchers)}async function tl(C,T,B,ee){St(C);let ne=(ee&&ee.flushSync)===!0,pe=g||p,ie=ed(R.location,R.matches,m,B,T,ee?.relative),he=Jn(pe,ie,m),me=wn(he,pe,ie);if(me.active&&me.matches&&(he=me.matches),!he){Wt(C,T,za(404,{pathname:ie}),{flushSync:ne});return}let{path:Se,submission:Ne,error:xe}=Qp(!0,ie,ee);if(xe){Wt(C,T,xe,{flushSync:ne});return}let $e=n.getContext?await n.getContext():new Yp,ke=(ee&&ee.preventScrollReset)===!0;if(Ne&&Kt(Ne.formMethod)){await Nn(C,T,Se,he,$e,me.active,ne,ke,Ne,ee&&ee.unstable_defaultShouldRevalidate);return}le.set(C,{routeId:T,path:Se}),await At(C,T,Se,he,$e,me.active,ne,ke,Ne)}async function Nn(C,T,B,ee,ne,pe,ie,he,me,Se){Ga(),le.delete(C);let Ne=R.fetchers.get(C);ra(C,b1(me,Ne),{flushSync:ie});let xe=new AbortController,$e=pi(n.history,B,xe.signal,me);if(pe){let st=await $a(ee,new URL($e.url).pathname,$e.signal,C);if(st.type==="aborted")return;if(st.type==="error"){Wt(C,T,st.error,{flushSync:ie});return}else if(st.matches)ee=st.matches;else{Wt(C,T,za(404,{pathname:B}),{flushSync:ie});return}}let ke=no(ee,B);if(!ke.route.action&&!ke.route.lazy){let st=za(405,{method:me.formMethod,pathname:B,routeId:T});Wt(C,T,st,{flushSync:ie});return}oe.set(C,xe);let at=Ce,rt=xi(u,h,$e,ee,ke,s,ne),mt=await La($e,rt,ne,C),Ge=mt[ke.route.id];if(!Ge){for(let st of rt)if(mt[st.route.id]){Ge=mt[st.route.id];break}}if($e.signal.aborted){oe.get(C)===xe&&oe.delete(C);return}if(je.has(C)){if(jl(Ge)||ma(Ge)){ra(C,bn(void 0));return}}else{if(jl(Ge))if(oe.delete(C),E>at){ra(C,bn(void 0));return}else return I.add(C),ra(C,gr(me)),xa($e,Ge,!1,{fetcherSubmission:me,preventScrollReset:he});if(ma(Ge)){Wt(C,T,Ge.error);return}}let Ct=R.navigation.location||R.location,lt=pi(n.history,Ct,xe.signal),En=g||p,Ua=R.navigation.state!=="idle"?Jn(En,R.navigation.location,m):R.matches;Le(Ua,"Didn't find any matches after fetcher action");let Ot=++Ce;Y.set(C,Ot);let Ka=gr(me,Ge.data);R.fetchers.set(C,Ka);let{dsMatches:ll,revalidatingFetchers:Xa}=Zp(lt,ne,u,h,n.history,R,Ua,me,Ct,s,!1,W,ue,je,le,I,En,m,n.patchRoutesOnNavigation!=null,[ke.route.id,Ge],Se);Xa.filter(st=>st.key!==C).forEach(st=>{let Dl=st.key,Ml=R.fetchers.get(Dl),qr=gr(void 0,Ml?Ml.data:void 0);R.fetchers.set(Dl,qr),St(Dl),st.controller&&oe.set(Dl,st.controller)}),We({fetchers:new Map(R.fetchers)});let il=()=>Xa.forEach(st=>St(st.key));xe.signal.addEventListener("abort",il);let{loaderResults:Ol,fetcherResults:Ue}=await al(ll,Xa,lt,ne);if(xe.signal.aborted)return;if(xe.signal.removeEventListener("abort",il),Y.delete(C),oe.delete(C),Xa.forEach(st=>oe.delete(st.key)),R.fetchers.has(C)){let st=bn(Ge.data);R.fetchers.set(C,st)}let xt=Is(Ol);if(xt)return xa(lt,xt.result,!1,{preventScrollReset:he});if(xt=Is(Ue),xt)return I.add(xt.key),xa(lt,xt.result,!1,{preventScrollReset:he});let{loaderData:Gt,errors:_t}=tg(R,Ua,Ol,void 0,Xa,Ue);re(Ot),R.navigation.state==="loading"&&Ot>E?(Le(U,"Expected pending action"),se&&se.abort(),ht(R.navigation.location,{matches:Ua,loaderData:Gt,errors:_t,fetchers:new Map(R.fetchers)})):(We({errors:_t,loaderData:ag(R.loaderData,Gt,Ua,_t),fetchers:new Map(R.fetchers)}),W=!1)}async function At(C,T,B,ee,ne,pe,ie,he,me){let Se=R.fetchers.get(C);ra(C,gr(me,Se?Se.data:void 0),{flushSync:ie});let Ne=new AbortController,xe=pi(n.history,B,Ne.signal);if(pe){let Ge=await $a(ee,new URL(xe.url).pathname,xe.signal,C);if(Ge.type==="aborted")return;if(Ge.type==="error"){Wt(C,T,Ge.error,{flushSync:ie});return}else if(Ge.matches)ee=Ge.matches;else{Wt(C,T,za(404,{pathname:B}),{flushSync:ie});return}}let $e=no(ee,B);oe.set(C,Ne);let ke=Ce,at=xi(u,h,xe,ee,$e,s,ne),mt=(await La(xe,at,ne,C))[$e.route.id];if(oe.get(C)===Ne&&oe.delete(C),!xe.signal.aborted){if(je.has(C)){ra(C,bn(void 0));return}if(jl(mt))if(E>ke){ra(C,bn(void 0));return}else{I.add(C),await xa(xe,mt,!1,{preventScrollReset:he});return}if(ma(mt)){Wt(C,T,mt.error);return}ra(C,bn(mt.data))}}async function xa(C,T,B,{submission:ee,fetcherSubmission:ne,preventScrollReset:pe,replace:ie}={}){B||($?.resolve(),$=null),T.response.headers.has("X-Remix-Revalidate")&&(W=!0);let he=T.response.headers.get("Location");Le(he,"Expected a Location header on the redirect Response"),he=Ip(he,new URL(C.url),m,n.history);let me=Er(R.location,he,{_isRedirect:!0});if(r){let at=!1;if(T.response.headers.has("X-Remix-Reload-Document"))at=!0;else if(dd(he)){const rt=Gg(he,!0);at=rt.origin!==i.location.origin||Oa(rt.pathname,m)==null}if(at){ie?i.location.replace(he):i.location.assign(he);return}}se=null;let Se=ie===!0||T.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ne,formAction:xe,formEncType:$e}=R.navigation;!ee&&!ne&&Ne&&xe&&$e&&(ee=ig(R.navigation));let ke=ee||ne;if(Fb.has(T.response.status)&&ke&&Kt(ke.formMethod))await Jt(Se,me,{submission:{...ke,formAction:he},preventScrollReset:pe||de,enableViewTransition:B?ve:void 0});else{let at=Gu(me,ee);await Jt(Se,me,{overrideNavigation:at,fetcherSubmission:ne,preventScrollReset:pe||de,enableViewTransition:B?ve:void 0})}}async function La(C,T,B,ee){let ne,pe={};try{ne=await i1(b,C,T,ee,B,!1)}catch(ie){return T.filter(he=>he.shouldLoad).forEach(he=>{pe[he.route.id]={type:"error",error:ie}}),pe}if(C.signal.aborted)return pe;if(!Kt(C.method))for(let ie of T){if(ne[ie.route.id]?.type==="error")break;!ne.hasOwnProperty(ie.route.id)&&!R.loaderData.hasOwnProperty(ie.route.id)&&(!R.errors||!R.errors.hasOwnProperty(ie.route.id))&&ie.shouldCallHandler()&&(ne[ie.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ie.route.id}`)})}for(let[ie,he]of Object.entries(ne))if(p1(he)){let me=he.result;pe[ie]={type:"redirect",response:c1(me,C,ie,T,m)}}else pe[ie]=await o1(he);return pe}async function al(C,T,B,ee){let ne=La(B,C,ee,null),pe=Promise.all(T.map(async me=>{if(me.matches&&me.match&&me.request&&me.controller){let Ne=(await La(me.request,me.matches,ee,me.key))[me.match.route.id];return{[me.key]:Ne}}else return Promise.resolve({[me.key]:{type:"error",error:za(404,{pathname:me.path})}})})),ie=await ne,he=(await pe).reduce((me,Se)=>Object.assign(me,Se),{});return{loaderResults:ie,fetcherResults:he}}function Ga(){W=!0,le.forEach((C,T)=>{oe.has(T)&&ue.add(T),St(T)})}function ra(C,T,B={}){R.fetchers.set(C,T),We({fetchers:new Map(R.fetchers)},{flushSync:(B&&B.flushSync)===!0})}function Wt(C,T,B,ee={}){let ne=Wn(R.matches,T);ka(C),We({errors:{[ne.route.id]:B},fetchers:new Map(R.fetchers)},{flushSync:(ee&&ee.flushSync)===!0})}function zl(C){return be.set(C,(be.get(C)||0)+1),je.has(C)&&je.delete(C),R.fetchers.get(C)||Jb}function ji(C,T){St(C,T?.reason),ra(C,bn(null))}function ka(C){let T=R.fetchers.get(C);oe.has(C)&&!(T&&T.state==="loading"&&Y.has(C))&&St(C),le.delete(C),Y.delete(C),I.delete(C),je.delete(C),ue.delete(C),R.fetchers.delete(C)}function Lt(C){let T=(be.get(C)||0)-1;T<=0?(be.delete(C),je.add(C)):be.set(C,T),We({fetchers:new Map(R.fetchers)})}function St(C,T){let B=oe.get(C);B&&(B.abort(T),oe.delete(C))}function Tt(C){for(let T of C){let B=zl(T),ee=bn(B.data);R.fetchers.set(T,ee)}}function Tl(){let C=[],T=!1;for(let B of I){let ee=R.fetchers.get(B);Le(ee,`Expected fetcher: ${B}`),ee.state==="loading"&&(I.delete(B),C.push(B),T=!0)}return Tt(C),T}function re(C){let T=[];for(let[B,ee]of Y)if(ee<C){let ne=R.fetchers.get(B);Le(ne,`Expected fetcher: ${B}`),ne.state==="loading"&&(St(B),Y.delete(B),T.push(B))}return Tt(T),T.length>0}function Ee(C,T){let B=R.blockers.get(C)||pr;return Te.get(C)!==T&&Te.set(C,T),B}function Ze(C){R.blockers.delete(C),Te.delete(C)}function dt(C,T){let B=R.blockers.get(C)||pr;Le(B.state==="unblocked"&&T.state==="blocked"||B.state==="blocked"&&T.state==="blocked"||B.state==="blocked"&&T.state==="proceeding"||B.state==="blocked"&&T.state==="unblocked"||B.state==="proceeding"&&T.state==="unblocked",`Invalid blocker state transition: ${B.state} -> ${T.state}`);let ee=new Map(R.blockers);ee.set(C,T),We({blockers:ee})}function Pe({currentLocation:C,nextLocation:T,historyAction:B}){if(Te.size===0)return;Te.size>1&&yt(!1,"A router only supports one blocker at a time");let ee=Array.from(Te.entries()),[ne,pe]=ee[ee.length-1],ie=R.blockers.get(ne);if(!(ie&&ie.state==="proceeding")&&pe({currentLocation:C,nextLocation:T,historyAction:B}))return ne}function Pt(C){let T=za(404,{pathname:C}),B=g||p,{matches:ee,route:ne}=Ps(B);return{notFoundMatches:ee,route:ne,error:T}}function tn(C,T,B){if(w=C,A=T,D=B||null,!Q&&R.navigation===Vu){Q=!0;let ee=nl(R.location,R.matches);ee!=null&&We({restoreScrollPosition:ee})}return()=>{w=null,A=null,D=null}}function va(C,T){return D&&D(C,T.map(ee=>_b(ee,R.loaderData)))||C.key}function Ni(C,T){if(w&&A){let B=va(C,T);w[B]=A()}}function nl(C,T){if(w){let B=va(C,T),ee=w[B];if(typeof ee=="number")return ee}return null}function wn(C,T,B){if(n.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:vr(T,B,m,!0)}}else return{active:!0,matches:vr(T,B,m,!0)||[]};return{active:!1,matches:null}}async function $a(C,T,B,ee){if(!n.patchRoutesOnNavigation)return{type:"success",matches:C};let ne=C;for(;;){let pe=g==null,ie=g||p,he=h;try{await n.patchRoutesOnNavigation({signal:B,path:T,matches:ne,fetcherKey:ee,patch:(Ne,xe)=>{B.aborted||Fp(Ne,xe,ie,he,u,!1)}})}catch(Ne){return{type:"error",error:Ne,partialMatches:ne}}finally{pe&&!B.aborted&&(p=[...p])}if(B.aborted)return{type:"aborted"};let me=Jn(ie,T,m),Se=null;if(me){if(Object.keys(me[0].params).length===0)return{type:"success",matches:me};if(Se=vr(ie,T,m,!0),!(Se&&ne.length<Se.length&&Ur(ne,Se.slice(0,ne.length))))return{type:"success",matches:me}}if(Se||(Se=vr(ie,T,m,!0)),!Se||Ur(ne,Se))return{type:"success",matches:null};ne=Se}}function Ur(C,T){return C.length===T.length&&C.every((B,ee)=>B.route.id===T[ee].route.id)}function Hr(C){h={},g=Cr(C,u,void 0,h)}function Br(C,T,B=!1){let ee=g==null;Fp(C,T,g||p,h,u,B),ee&&(p=[...p],We({}))}return P={get basename(){return m},get future(){return x},get state(){return R},get routes(){return p},get window(){return i},initialize:zt,subscribe:it,enableScrollRestoration:tn,navigate:Mt,fetch:tl,revalidate:Aa,createHref:C=>n.history.createHref(C),encodeLocation:C=>n.history.encodeLocation(C),getFetcher:zl,resetFetcher:ji,deleteFetcher:Lt,dispose:Yt,getBlocker:Ee,deleteBlocker:Ze,patchRoutes:Br,_internalFetchControllers:oe,_internalSetRoutes:Hr,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){We(C)}},n.unstable_instrumentations&&(P=Yb(P,n.unstable_instrumentations.map(C=>C.router).filter(Boolean))),P}function Ib(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function ed(n,i,r,s,c,u){let h,p;if(c){h=[];for(let m of i)if(h.push(m),m.route.id===c){p=m;break}}else h=i,p=i[i.length-1];let g=Tr(s||".",mo(h),Oa(n.pathname,r)||n.pathname,u==="path");if(s==null&&(g.search=n.search,g.hash=n.hash),(s==null||s===""||s===".")&&p){let m=md(g.search);if(p.route.index&&!m)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!p.route.index&&m){let b=new URLSearchParams(g.search),x=b.getAll("index");b.delete("index"),x.filter(j=>j).forEach(j=>b.append("index",j));let _=b.toString();g.search=_?`?${_}`:""}}return r!=="/"&&(g.pathname=Lb({basename:r,pathname:g.pathname})),Pa(g)}function Qp(n,i,r){if(!r||!Ib(r))return{path:i};if(r.formMethod&&!x1(r.formMethod))return{path:i,error:za(405,{method:r.formMethod})};let s=()=>({path:i,error:za(400,{type:"invalid-body"})}),u=(r.formMethod||"get").toUpperCase(),h=sy(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Kt(u))return s();let x=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((_,[j,w])=>`${_}${j}=${w}
|
|
10
|
+
`,""):String(r.body);return{path:i,submission:{formMethod:u,formAction:h,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Kt(u))return s();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:u,formAction:h,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return s()}}}Le(typeof FormData=="function","FormData is not available in this environment");let p,g;if(r.formData)p=ad(r.formData),g=r.formData;else if(r.body instanceof FormData)p=ad(r.body),g=r.body;else if(r.body instanceof URLSearchParams)p=r.body,g=eg(p);else if(r.body==null)p=new URLSearchParams,g=new FormData;else try{p=new URLSearchParams(r.body),g=eg(p)}catch{return s()}let m={formMethod:u,formAction:h,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Kt(m.formMethod))return{path:i,submission:m};let b=jn(i);return n&&b.search&&md(b.search)&&p.append("index",""),b.search=`?${p}`,{path:Pa(b),submission:m}}function Zp(n,i,r,s,c,u,h,p,g,m,b,x,_,j,w,D,A,Q,J,G,Z){let K=G?ma(G[1])?G[1].error:G[1].data:void 0,ae=c.createURL(u.location),P=c.createURL(g),R;if(b&&u.errors){let ce=Object.keys(u.errors)[0];R=h.findIndex(M=>M.route.id===ce)}else if(G&&ma(G[1])){let ce=G[0];R=h.findIndex(M=>M.route.id===ce)-1}let U=G?G[1].statusCode:void 0,$=U&&U>=400,de={currentUrl:ae,currentParams:u.matches[0]?.params||{},nextUrl:P,nextParams:h[0].params,...p,actionResult:K,actionStatus:U},se=Dr(h),ve=h.map((ce,M)=>{let{route:W}=ce,ue=null;if(R!=null&&M>R)ue=!1;else if(W.lazy)ue=!0;else if(!fd(W))ue=!1;else if(b){let{shouldLoad:Y}=ty(W,u.loaderData,u.errors);ue=Y}else e1(u.loaderData,u.matches[M],ce)&&(ue=!0);if(ue!==null)return td(r,s,n,se,ce,m,i,ue);let oe=!1;typeof Z=="boolean"?oe=Z:$?oe=!1:(x||ae.pathname+ae.search===P.pathname+P.search||ae.search!==P.search||t1(u.matches[M],ce))&&(oe=!0);let Ce={...de,defaultShouldRevalidate:oe},E=jr(ce,Ce);return td(r,s,n,se,ce,m,i,E,Ce,Z)}),te=[];return w.forEach((ce,M)=>{if(b||!h.some(le=>le.route.id===ce.routeId)||j.has(M))return;let W=u.fetchers.get(M),ue=W&&W.state!=="idle"&&W.data===void 0,oe=Jn(A,ce.path,Q);if(!oe){if(J&&ue)return;te.push({key:M,routeId:ce.routeId,path:ce.path,matches:null,match:null,request:null,controller:null});return}if(D.has(M))return;let Ce=no(oe,ce.path),E=new AbortController,Y=pi(c,ce.path,E.signal),I=null;if(_.has(M))_.delete(M),I=xi(r,s,Y,oe,Ce,m,i);else if(ue)x&&(I=xi(r,s,Y,oe,Ce,m,i));else{let le;typeof Z=="boolean"?le=Z:$?le=!1:le=x;let be={...de,defaultShouldRevalidate:le};jr(Ce,be)&&(I=xi(r,s,Y,oe,Ce,m,i,be))}I&&te.push({key:M,routeId:ce.routeId,path:ce.path,matches:I,match:Ce,request:Y,controller:E})}),{dsMatches:ve,revalidatingFetchers:te}}function fd(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function ty(n,i,r){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!fd(n))return{shouldLoad:!1,renderFallback:!1};let s=i!=null&&n.id in i,c=r!=null&&r[n.id]!==void 0;if(!s&&c)return{shouldLoad:!1,renderFallback:!1};if(typeof n.loader=="function"&&n.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let u=!s&&!c;return{shouldLoad:u,renderFallback:u}}function e1(n,i,r){let s=!i||r.route.id!==i.route.id,c=!n.hasOwnProperty(r.route.id);return s||c}function t1(n,i){let r=n.route.path;return n.pathname!==i.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==i.params["*"]}function jr(n,i){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function Fp(n,i,r,s,c,u){let h;if(n){let m=s[n];Le(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),h=m.children}else h=r;let p=[],g=[];if(i.forEach(m=>{let b=h.find(x=>ay(m,x));b?g.push({existingRoute:b,newRoute:m}):p.push(m)}),p.length>0){let m=Cr(p,c,[n||"_","patch",String(h?.length||"0")],s);h.push(...m)}if(u&&g.length>0)for(let m=0;m<g.length;m++){let{existingRoute:b,newRoute:x}=g[m],_=b,[j]=Cr([x],c,[],{},!0);Object.assign(_,{element:j.element?j.element:_.element,errorElement:j.errorElement?j.errorElement:_.errorElement,hydrateFallbackElement:j.hydrateFallbackElement?j.hydrateFallbackElement:_.hydrateFallbackElement})}}function ay(n,i){return"id"in n&&"id"in i&&n.id===i.id?!0:n.index===i.index&&n.path===i.path&&n.caseSensitive===i.caseSensitive?(!n.children||n.children.length===0)&&(!i.children||i.children.length===0)?!0:n.children?.every((r,s)=>i.children?.some(c=>ay(r,c)))??!1:!1}var Jp=new WeakMap,ny=({key:n,route:i,manifest:r,mapRouteProperties:s})=>{let c=r[i.id];if(Le(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let u=c.lazy[n];if(!u)return;let h=Jp.get(c);h||(h={},Jp.set(c,h));let p=h[n];if(p)return p;let g=(async()=>{let m=xb(n),x=c[n]!==void 0&&n!=="hasErrorBoundary";if(m)yt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(x)yt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let _=await u();_!=null&&(Object.assign(c,{[n]:_}),Object.assign(c,s(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(_=>_===void 0)&&(c.lazy=void 0))})();return h[n]=g,g},Wp=new WeakMap;function a1(n,i,r,s,c){let u=r[n.id];if(Le(u,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let b=Wp.get(u);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let x=(async()=>{Le(typeof n.lazy=="function","No lazy route function found");let _=await n.lazy(),j={};for(let w in _){let D=_[w];if(D===void 0)continue;let A=bb(w),J=u[w]!==void 0&&w!=="hasErrorBoundary";A?yt(!A,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):J?yt(!J,`Route "${u.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):j[w]=D}Object.assign(u,j),Object.assign(u,{...s(u),lazy:void 0})})();return Wp.set(u,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let h=Object.keys(n.lazy),p=[],g;for(let b of h){if(c&&c.includes(b))continue;let x=ny({key:b,route:n,manifest:r,mapRouteProperties:s});x&&(p.push(x),b===i&&(g=x))}let m=p.length>0?Promise.all(p).then(()=>{}):void 0;return m?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:g}}async function Pp(n){let i=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(i.map(c=>c.resolve()))).forEach((c,u)=>{r[i[u].route.id]=c}),r}async function n1(n){return n.matches.some(i=>i.route.middleware)?ly(n,()=>Pp(n)):Pp(n)}function ly(n,i){return l1(n,i,s=>{if(y1(s))throw s;return s},h1,r);function r(s,c,u){if(u)return Promise.resolve(Object.assign(u.value,{[c]:{type:"error",result:s}}));{let{matches:h}=n,p=Math.min(Math.max(h.findIndex(m=>m.route.id===c),0),Math.max(h.findIndex(m=>m.shouldCallHandler()),0)),g=Wn(h,h[p].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:s}})}}}async function l1(n,i,r,s,c){let{matches:u,request:h,params:p,context:g,unstable_pattern:m}=n,b=u.flatMap(_=>_.route.middleware?_.route.middleware.map(j=>[_.route.id,j]):[]);return await iy({request:h,params:p,context:g,unstable_pattern:m},b,i,r,s,c)}async function iy(n,i,r,s,c,u,h=0){let{request:p}=n;if(p.signal.aborted)throw p.signal.reason??new Error(`Request aborted: ${p.method} ${p.url}`);let g=i[h];if(!g)return await r();let[m,b]=g,x,_=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await iy(n,i,r,s,c,u,h+1)},x.value}catch(j){return x={value:await u(j,m,x)},x.value}};try{let j=await b(n,_),w=j!=null?s(j):void 0;return c(w)?w:x?w??x.value:(x={value:await _()},x.value)}catch(j){return await u(j,m,x)}}function ry(n,i,r,s,c){let u=ny({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),h=a1(s.route,Kt(r.method)?"action":"loader",i,n,c);return{middleware:u,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function td(n,i,r,s,c,u,h,p,g=null,m){let b=!1,x=ry(n,i,r,c,u);return{...c,_lazyPromises:x,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(_){return b=!0,g?typeof m=="boolean"?jr(c,{...g,defaultShouldRevalidate:m}):typeof _=="boolean"?jr(c,{...g,defaultShouldRevalidate:_}):jr(c,g):p},resolve(_){let{lazy:j,loader:w,middleware:D}=c.route,A=b||p||_&&!Kt(r.method)&&(j||w),Q=D&&D.length>0&&!w&&!j;return A&&(Kt(r.method)||!Q)?r1({request:r,unstable_pattern:s,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:_,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function xi(n,i,r,s,c,u,h,p=null){return s.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:ry(n,i,r,g,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:td(n,i,r,Dr(s),g,u,h,!0,p))}async function i1(n,i,r,s,c,u){r.some(m=>m._lazyPromises?.middleware)&&await Promise.all(r.map(m=>m._lazyPromises?.middleware));let h={request:i,unstable_pattern:Dr(r),params:r[0].params,context:c,matches:r},g=await n({...h,fetcherKey:s,runClientMiddleware:m=>{let b=h;return ly(b,()=>m({...b,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return g}async function r1({request:n,unstable_pattern:i,match:r,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:u,scopedContext:h}){let p,g,m=Kt(n.method),b=m?"action":"loader",x=_=>{let j,w=new Promise((Q,J)=>j=J);g=()=>j(),n.signal.addEventListener("abort",g);let D=Q=>typeof _!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${r.route.id}]`)):_({request:n,unstable_pattern:i,params:r.params,context:h},...Q!==void 0?[Q]:[]),A=(async()=>{try{return{type:"data",result:await(u?u(J=>D(J)):D())}}catch(Q){return{type:"error",result:Q}}})();return Promise.race([A,w])};try{let _=m?r.route.action:r.route.loader;if(s||c)if(_){let j,[w]=await Promise.all([x(_).catch(D=>{j=D}),s,c]);if(j!==void 0)throw j;p=w}else{await s;let j=m?r.route.action:r.route.loader;if(j)[p]=await Promise.all([x(j),c]);else if(b==="action"){let w=new URL(n.url),D=w.pathname+w.search;throw za(405,{method:n.method,pathname:D,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(_)p=await x(_);else{let j=new URL(n.url),w=j.pathname+j.search;throw za(404,{pathname:w})}}catch(_){return{type:"error",result:_}}finally{g&&n.signal.removeEventListener("abort",g)}return p}async function s1(n){let i=n.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?n.body==null?null:n.json():n.text()}async function o1(n){let{result:i,type:r}=n;if(hd(i)){let s;try{s=await s1(i)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new Or(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return r==="error"?lg(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:f1(i),statusCode:Rr(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:Rr(i)?i.status:void 0}:lg(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function c1(n,i,r,s,c){let u=n.headers.get("Location");if(Le(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!dd(u)){let h=s.slice(0,s.findIndex(p=>p.route.id===r)+1);u=ed(new URL(i.url),h,c,u),n.headers.set("Location",u)}return n}function Ip(n,i,r,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(dd(n)){let u=n,h=u.startsWith("//")?new URL(i.protocol+u):new URL(u);if(c.includes(h.protocol))throw new Error("Invalid redirect location");let p=Oa(h.pathname,r)!=null;if(h.origin===i.origin&&p)return h.pathname+h.search+h.hash}try{let u=s.createURL(n);if(c.includes(u.protocol))throw new Error("Invalid redirect location")}catch{}return n}function pi(n,i,r,s){let c=n.createURL(sy(i)).toString(),u={signal:r};if(s&&Kt(s.formMethod)){let{formMethod:h,formEncType:p}=s;u.method=h.toUpperCase(),p==="application/json"?(u.headers=new Headers({"Content-Type":p}),u.body=JSON.stringify(s.json)):p==="text/plain"?u.body=s.text:p==="application/x-www-form-urlencoded"&&s.formData?u.body=ad(s.formData):u.body=s.formData}return new Request(c,u)}function ad(n){let i=new URLSearchParams;for(let[r,s]of n.entries())i.append(r,typeof s=="string"?s:s.name);return i}function eg(n){let i=new FormData;for(let[r,s]of n.entries())i.append(r,s);return i}function u1(n,i,r,s=!1,c=!1){let u={},h=null,p,g=!1,m={},b=r&&ma(r[1])?r[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in i))return;let _=x.route.id,j=i[_];if(Le(!jl(j),"Cannot handle redirect results in processLoaderData"),ma(j)){let w=j.error;if(b!==void 0&&(w=b,b=void 0),h=h||{},c)h[_]=w;else{let D=Wn(n,_);h[D.route.id]==null&&(h[D.route.id]=w)}s||(u[_]=ey),g||(g=!0,p=Rr(j.error)?j.error.status:500),j.headers&&(m[_]=j.headers)}else u[_]=j.data,j.statusCode&&j.statusCode!==200&&!g&&(p=j.statusCode),j.headers&&(m[_]=j.headers)}),b!==void 0&&r&&(h={[r[0]]:b},r[2]&&(u[r[2]]=void 0)),{loaderData:u,errors:h,statusCode:p||200,loaderHeaders:m}}function tg(n,i,r,s,c,u){let{loaderData:h,errors:p}=u1(i,r,s);return c.filter(g=>!g.matches||g.matches.some(m=>m.shouldLoad)).forEach(g=>{let{key:m,match:b,controller:x}=g;if(x&&x.signal.aborted)return;let _=u[m];if(Le(_,"Did not find corresponding fetcher result"),ma(_)){let j=Wn(n.matches,b?.route.id);p&&p[j.route.id]||(p={...p,[j.route.id]:_.error}),n.fetchers.delete(m)}else if(jl(_))Le(!1,"Unhandled fetcher revalidation redirect");else{let j=bn(_.data);n.fetchers.set(m,j)}}),{loaderData:h,errors:p}}function ag(n,i,r,s){let c=Object.entries(i).filter(([,u])=>u!==ey).reduce((u,[h,p])=>(u[h]=p,u),{});for(let u of r){let h=u.route.id;if(!i.hasOwnProperty(h)&&n.hasOwnProperty(h)&&u.route.loader&&(c[h]=n[h]),s&&s.hasOwnProperty(h))break}return c}function ng(n){return n?ma(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Wn(n,i){return(i?n.slice(0,n.findIndex(s=>s.route.id===i)+1):[...n]).reverse().find(s=>s.route.hasErrorBoundary===!0)||n[0]}function Ps(n){let i=n.length===1?n[0]:n.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function za(n,{pathname:i,routeId:r,method:s,type:c,message:u}={}){let h="Unknown Server Error",p="Unknown @remix-run/router error";return n===400?(h="Bad Request",s&&i&&r?p=`You made a ${s} request to "${i}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:c==="invalid-body"&&(p="Unable to encode submission body")):n===403?(h="Forbidden",p=`Route "${r}" does not match URL "${i}"`):n===404?(h="Not Found",p=`No route matches URL "${i}"`):n===405&&(h="Method Not Allowed",s&&i&&r?p=`You made a ${s.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:s&&(p=`Invalid request method "${s.toUpperCase()}"`)),new Or(n||500,h,new Error(p),!0)}function Is(n){let i=Object.entries(n);for(let r=i.length-1;r>=0;r--){let[s,c]=i[r];if(jl(c))return{key:s,result:c}}}function sy(n){let i=typeof n=="string"?jn(n):n;return Pa({...i,hash:""})}function d1(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function f1(n){return new Or(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function h1(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,r])=>typeof i=="string"&&m1(r))}function m1(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function p1(n){return hd(n.result)&&Pg.has(n.result.status)}function ma(n){return n.type==="error"}function jl(n){return(n&&n.type)==="redirect"}function lg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function hd(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function g1(n){return Pg.has(n)}function y1(n){return hd(n)&&g1(n.status)&&n.headers.has("Location")}function x1(n){return Zb.has(n.toUpperCase())}function Kt(n){return Xb.has(n.toUpperCase())}function md(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function no(n,i){let r=typeof i=="string"?jn(i).search:i.search;if(n[n.length-1].route.index&&md(r||""))return n[n.length-1];let s=Qg(n);return s[s.length-1]}function ig(n){let{formMethod:i,formAction:r,formEncType:s,text:c,formData:u,json:h}=n;if(!(!i||!r||!s)){if(c!=null)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:void 0,text:c};if(u!=null)return{formMethod:i,formAction:r,formEncType:s,formData:u,json:void 0,text:void 0};if(h!==void 0)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:h,text:void 0}}}function Gu(n,i){return i?{state:"loading",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function v1(n,i){return{state:"submitting",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function gr(n,i){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function b1(n,i){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i?i.data:void 0}}function bn(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function S1(n,i){try{let r=n.sessionStorage.getItem(Ig);if(r){let s=JSON.parse(r);for(let[c,u]of Object.entries(s||{}))u&&Array.isArray(u)&&i.set(c,new Set(u||[]))}}catch{}}function _1(n,i){if(i.size>0){let r={};for(let[s,c]of i)r[s]=[...c];try{n.sessionStorage.setItem(Ig,JSON.stringify(r))}catch(s){yt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function rg(){let n,i,r=new Promise((s,c)=>{n=async u=>{s(u);try{await r}catch{}},i=async u=>{c(u);try{await r}catch{}}});return{promise:r,resolve:n,reject:i}}var Cl=v.createContext(null);Cl.displayName="DataRouter";var Mr=v.createContext(null);Mr.displayName="DataRouterState";var oy=v.createContext(!1);function j1(){return v.useContext(oy)}var pd=v.createContext({isTransitioning:!1});pd.displayName="ViewTransition";var cy=v.createContext(new Map);cy.displayName="Fetchers";var N1=v.createContext(null);N1.displayName="Await";var ga=v.createContext(null);ga.displayName="Navigation";var po=v.createContext(null);po.displayName="Location";var Da=v.createContext({outlet:null,matches:[],isDataRoute:!1});Da.displayName="Route";var gd=v.createContext(null);gd.displayName="RouteError";var uy="REACT_ROUTER_ERROR",w1="REDIRECT",E1="ROUTE_ERROR_RESPONSE";function C1(n){if(n.startsWith(`${uy}:${w1}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function R1(n){if(n.startsWith(`${uy}:${E1}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Or(i.status,i.statusText,i.data)}catch{}}function z1(n,{relative:i}={}){Le(Si(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=v.useContext(ga),{hash:c,pathname:u,search:h}=Ar(n,{relative:i}),p=u;return r!=="/"&&(p=u==="/"?r:Ya([r,u])),s.createHref({pathname:p,search:h,hash:c})}function Si(){return v.useContext(po)!=null}function Va(){return Le(Si(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(po).location}var dy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fy(n){v.useContext(ga).static||v.useLayoutEffect(n)}function el(){let{isDataRoute:n}=v.useContext(Da);return n?$1():T1()}function T1(){Le(Si(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(Cl),{basename:i,navigator:r}=v.useContext(ga),{matches:s}=v.useContext(Da),{pathname:c}=Va(),u=JSON.stringify(mo(s)),h=v.useRef(!1);return fy(()=>{h.current=!0}),v.useCallback((g,m={})=>{if(yt(h.current,dy),!h.current)return;if(typeof g=="number"){r.go(g);return}let b=Tr(g,JSON.parse(u),c,m.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:Ya([i,b.pathname])),(m.replace?r.replace:r.push)(b,m.state,m)},[i,r,u,c,n])}var O1=v.createContext(null);function D1(n){let i=v.useContext(Da).outlet;return v.useMemo(()=>i&&v.createElement(O1.Provider,{value:n},i),[i,n])}function go(){let{matches:n}=v.useContext(Da),i=n[n.length-1];return i?i.params:{}}function Ar(n,{relative:i}={}){let{matches:r}=v.useContext(Da),{pathname:s}=Va(),c=JSON.stringify(mo(r));return v.useMemo(()=>Tr(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function M1(n,i,r){Le(Si(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(ga),{matches:c}=v.useContext(Da),u=c[c.length-1],h=u?u.params:{},p=u?u.pathname:"/",g=u?u.pathnameBase:"/",m=u&&u.route;{let A=m&&m.path||"";my(p,!m||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
+
|
|
12
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=Va(),x;x=b;let _=x.pathname||"/",j=_;if(g!=="/"){let A=g.replace(/^\//,"").split("/");j="/"+_.replace(/^\//,"").split("/").slice(A.length).join("/")}let w=Jn(n,{pathname:j});return yt(m||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),yt(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),H1(w&&w.map(A=>Object.assign({},A,{params:Object.assign({},h,A.params),pathname:Ya([g,s.encodeLocation?s.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?g:Ya([g,s.encodeLocation?s.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,r)}function A1(){let n=G1(),i=Rr(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},u={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},i),r?v.createElement("pre",{style:c},r):null,h)}var L1=v.createElement(A1,null),hy=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=R1(n.digest);r&&(n=r)}let i=n!==void 0?v.createElement(Da.Provider,{value:this.props.routeContext},v.createElement(gd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?v.createElement(k1,{error:n},i):i}};hy.contextType=oy;var $u=new WeakMap;function k1({children:n,error:i}){let{basename:r}=v.useContext(ga);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=C1(i.digest);if(s){let c=$u.get(i);if(c)throw c;let u=Fg(s.location,r);if(Zg&&!$u.get(i))if(u.isExternal||s.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:s.replace}));throw $u.set(i,h),h}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function U1({routeContext:n,match:i,children:r}){let s=v.useContext(Cl);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(Da.Provider,{value:n},r)}function H1(n,i=[],r){let s=r?.state;if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(i.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let c=n,u=s?.errors;if(u!=null){let b=c.findIndex(x=>x.route.id&&u?.[x.route.id]!==void 0);Le(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),c=c.slice(0,Math.min(c.length,b+1))}let h=!1,p=-1;if(r&&s){h=s.renderFallback;for(let b=0;b<c.length;b++){let x=c[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(p=b),x.route.id){let{loaderData:_,errors:j}=s,w=x.route.loader&&!_.hasOwnProperty(x.route.id)&&(!j||j[x.route.id]===void 0);if(x.route.lazy||w){r.isStatic&&(h=!0),p>=0?c=c.slice(0,p+1):c=[c[0]];break}}}}let g=r?.onError,m=s&&g?(b,x)=>{g(b,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:Dr(s.matches),errorInfo:x})}:void 0;return c.reduceRight((b,x,_)=>{let j,w=!1,D=null,A=null;s&&(j=u&&x.route.id?u[x.route.id]:void 0,D=x.route.errorElement||L1,h&&(p<0&&_===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,A=null):p===_&&(w=!0,A=x.route.hydrateFallbackElement||null)));let Q=i.concat(c.slice(0,_+1)),J=()=>{let G;return j?G=D:w?G=A:x.route.Component?G=v.createElement(x.route.Component,null):x.route.element?G=x.route.element:G=b,v.createElement(U1,{match:x,routeContext:{outlet:b,matches:Q,isDataRoute:s!=null},children:G})};return s&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?v.createElement(hy,{location:s.location,revalidation:s.revalidation,component:D,error:j,children:J(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:m}):J()},null)}function yd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B1(n){let i=v.useContext(Cl);return Le(i,yd(n)),i}function q1(n){let i=v.useContext(Mr);return Le(i,yd(n)),i}function Y1(n){let i=v.useContext(Da);return Le(i,yd(n)),i}function xd(n){let i=Y1(n),r=i.matches[i.matches.length-1];return Le(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function V1(){return xd("useRouteId")}function G1(){let n=v.useContext(gd),i=q1("useRouteError"),r=xd("useRouteError");return n!==void 0?n:i.errors?.[r]}function $1(){let{router:n}=B1("useNavigate"),i=xd("useNavigate"),r=v.useRef(!1);return fy(()=>{r.current=!0}),v.useCallback(async(c,u={})=>{yt(r.current,dy),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...u}))},[n,i])}var sg={};function my(n,i,r){!i&&!sg[n]&&(sg[n]=!0,yt(!1,r))}var og={};function cg(n,i){!n&&!og[i]&&(og[i]=!0,console.warn(i))}var K1="useOptimistic",ug=S0[K1],X1=()=>{};function Q1(n){return ug?ug(n):[n,X1]}function Z1(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&yt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:v.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&yt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:v.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&yt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:v.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var F1=["HydrateFallback","hydrateFallbackElement"],J1=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",i(r))}})}};function W1({router:n,flushSync:i,onError:r,unstable_useTransitions:s}){s=j1()||s;let[u,h]=v.useState(n.state),[p,g]=Q1(u),[m,b]=v.useState(),[x,_]=v.useState({isTransitioning:!1}),[j,w]=v.useState(),[D,A]=v.useState(),[Q,J]=v.useState(),G=v.useRef(new Map),Z=v.useCallback((R,{deletedFetchers:U,newErrors:$,flushSync:de,viewTransitionOpts:se})=>{$&&r&&Object.values($).forEach(te=>r(te,{location:R.location,params:R.matches[0]?.params??{},unstable_pattern:Dr(R.matches)})),R.fetchers.forEach((te,ce)=>{te.data!==void 0&&G.current.set(ce,te.data)}),U.forEach(te=>G.current.delete(te)),cg(de===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ve=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(cg(se==null||ve,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!se||!ve){i&&de?i(()=>h(R)):s===!1?h(R):v.startTransition(()=>{s===!0&&g(te=>dg(te,R)),h(R)});return}if(i&&de){i(()=>{D&&(j?.resolve(),D.skipTransition()),_({isTransitioning:!0,flushSync:!0,currentLocation:se.currentLocation,nextLocation:se.nextLocation})});let te=n.window.document.startViewTransition(()=>{i(()=>h(R))});te.finished.finally(()=>{i(()=>{w(void 0),A(void 0),b(void 0),_({isTransitioning:!1})})}),i(()=>A(te));return}D?(j?.resolve(),D.skipTransition(),J({state:R,currentLocation:se.currentLocation,nextLocation:se.nextLocation})):(b(R),_({isTransitioning:!0,flushSync:!1,currentLocation:se.currentLocation,nextLocation:se.nextLocation}))},[n.window,i,D,j,s,g,r]);v.useLayoutEffect(()=>n.subscribe(Z),[n,Z]),v.useEffect(()=>{x.isTransitioning&&!x.flushSync&&w(new J1)},[x]),v.useEffect(()=>{if(j&&m&&n.window){let R=m,U=j.promise,$=n.window.document.startViewTransition(async()=>{s===!1?h(R):v.startTransition(()=>{s===!0&&g(de=>dg(de,R)),h(R)}),await U});$.finished.finally(()=>{w(void 0),A(void 0),b(void 0),_({isTransitioning:!1})}),A($)}},[m,j,n.window,s,g]),v.useEffect(()=>{j&&m&&p.location.key===m.location.key&&j.resolve()},[j,D,p.location,m]),v.useEffect(()=>{!x.isTransitioning&&Q&&(b(Q.state),_({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}),J(void 0))},[x.isTransitioning,Q]);let K=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,U,$)=>n.navigate(R,{state:U,preventScrollReset:$?.preventScrollReset}),replace:(R,U,$)=>n.navigate(R,{replace:!0,state:U,preventScrollReset:$?.preventScrollReset})}),[n]),ae=n.basename||"/",P=v.useMemo(()=>({router:n,navigator:K,static:!1,basename:ae,onError:r}),[n,K,ae,r]);return v.createElement(v.Fragment,null,v.createElement(Cl.Provider,{value:P},v.createElement(Mr.Provider,{value:p},v.createElement(cy.Provider,{value:G.current},v.createElement(pd.Provider,{value:x},v.createElement(eS,{basename:ae,location:p.location,navigationType:p.historyAction,navigator:K,unstable_useTransitions:s},v.createElement(P1,{routes:n.routes,future:n.future,state:p,isStatic:!1,onError:r})))))),null)}function dg(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var P1=v.memo(I1);function I1({routes:n,future:i,state:r,isStatic:s,onError:c}){return M1(n,void 0,{state:r,isStatic:s,onError:c})}function fg({to:n,replace:i,state:r,relative:s}){Le(Si(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=v.useContext(ga);yt(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=v.useContext(Da),{pathname:h}=Va(),p=el(),g=Tr(n,mo(u),h,s==="path"),m=JSON.stringify(g);return v.useEffect(()=>{p(JSON.parse(m),{replace:i,state:r,relative:s})},[p,m,s,i,r]),null}function py(n){return D1(n.context)}function eS({basename:n="/",children:i=null,location:r,navigationType:s="POP",navigator:c,static:u=!1,unstable_useTransitions:h}){Le(!Si(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),g=v.useMemo(()=>({basename:p,navigator:c,static:u,unstable_useTransitions:h,future:{}}),[p,c,u,h]);typeof r=="string"&&(r=jn(r));let{pathname:m="/",search:b="",hash:x="",state:_=null,key:j="default",unstable_mask:w}=r,D=v.useMemo(()=>{let A=Oa(m,p);return A==null?null:{location:{pathname:A,search:b,hash:x,state:_,key:j,unstable_mask:w},navigationType:s}},[p,m,b,x,_,j,s,w]);return yt(D!=null,`<Router basename="${p}"> is not able to match the URL "${m}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:v.createElement(ga.Provider,{value:g},v.createElement(po.Provider,{children:i,value:D}))}var lo="get",io="application/x-www-form-urlencoded";function yo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function tS(n){return yo(n)&&n.tagName.toLowerCase()==="button"}function aS(n){return yo(n)&&n.tagName.toLowerCase()==="form"}function nS(n){return yo(n)&&n.tagName.toLowerCase()==="input"}function lS(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function iS(n,i){return n.button===0&&(!i||i==="_self")&&!lS(n)}function nd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,r)=>{let s=n[r];return i.concat(Array.isArray(s)?s.map(c=>[r,c]):[[r,s]])},[]))}function rS(n,i){let r=nd(n);return i&&i.forEach((s,c)=>{r.has(c)||i.getAll(c).forEach(u=>{r.append(c,u)})}),r}var eo=null;function sS(){if(eo===null)try{new FormData(document.createElement("form"),0),eo=!1}catch{eo=!0}return eo}var oS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ku(n){return n!=null&&!oS.has(n)?(yt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${io}"`),null):n}function cS(n,i){let r,s,c,u,h;if(aS(n)){let p=n.getAttribute("action");s=p?Oa(p,i):null,r=n.getAttribute("method")||lo,c=Ku(n.getAttribute("enctype"))||io,u=new FormData(n)}else if(tS(n)||nS(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||p.getAttribute("action");if(s=g?Oa(g,i):null,r=n.getAttribute("formmethod")||p.getAttribute("method")||lo,c=Ku(n.getAttribute("formenctype"))||Ku(p.getAttribute("enctype"))||io,u=new FormData(p,n),!sS()){let{name:m,type:b,value:x}=n;if(b==="image"){let _=m?`${m}.`:"";u.append(`${_}x`,"0"),u.append(`${_}y`,"0")}else m&&u.append(m,x)}}else{if(yo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=lo,s=null,c=io,h=n}return u&&c==="text/plain"&&(h=u,u=void 0),{action:s,method:r.toLowerCase(),encType:c,formData:u,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vd(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function uS(n,i,r,s){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:i&&Oa(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function dS(n,i){if(n.id in i)return i[n.id];try{let r=await import(n.module);return i[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fS(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function hS(n,i,r){let s=await Promise.all(n.map(async c=>{let u=i.routes[c.route.id];if(u){let h=await dS(u,r);return h.links?h.links():[]}return[]}));return yS(s.flat(1).filter(fS).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function hg(n,i,r,s,c,u){let h=(g,m)=>r[m]?g.route.id!==r[m].route.id:!0,p=(g,m)=>r[m].pathname!==g.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==g.params["*"];return u==="assets"?i.filter((g,m)=>h(g,m)||p(g,m)):u==="data"?i.filter((g,m)=>{let b=s.routes[g.route.id];if(!b||!b.hasLoader)return!1;if(h(g,m)||p(g,m))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function mS(n,i,{includeHydrateFallback:r}={}){return pS(n.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let u=[c.module];return c.clientActionModule&&(u=u.concat(c.clientActionModule)),c.clientLoaderModule&&(u=u.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(u=u.concat(c.hydrateFallbackModule)),c.imports&&(u=u.concat(c.imports)),u}).flat(1))}function pS(n){return[...new Set(n)]}function gS(n){let i={},r=Object.keys(n).sort();for(let s of r)i[s]=n[s];return i}function yS(n,i){let r=new Set;return new Set(i),n.reduce((s,c)=>{let u=JSON.stringify(gS(c));return r.has(u)||(r.add(u),s.push({key:u,link:c})),s},[])}function gy(){let n=v.useContext(Cl);return vd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function xS(){let n=v.useContext(Mr);return vd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var bd=v.createContext(void 0);bd.displayName="FrameworkContext";function yy(){let n=v.useContext(bd);return vd(n,"You must render this element inside a <HydratedRouter> element"),n}function vS(n,i){let r=v.useContext(bd),[s,c]=v.useState(!1),[u,h]=v.useState(!1),{onFocus:p,onBlur:g,onMouseEnter:m,onMouseLeave:b,onTouchStart:x}=i,_=v.useRef(null);v.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let D=Q=>{Q.forEach(J=>{h(J.isIntersecting)})},A=new IntersectionObserver(D,{threshold:.5});return _.current&&A.observe(_.current),()=>{A.disconnect()}}},[n]),v.useEffect(()=>{if(s){let D=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(D)}}},[s]);let j=()=>{c(!0)},w=()=>{c(!1),h(!1)};return r?n!=="intent"?[u,_,{}]:[u,_,{onFocus:yr(p,j),onBlur:yr(g,w),onMouseEnter:yr(m,j),onMouseLeave:yr(b,w),onTouchStart:yr(x,j)}]:[!1,_,{}]}function yr(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function bS({page:n,...i}){let{router:r}=gy(),s=v.useMemo(()=>Jn(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?v.createElement(_S,{page:n,matches:s,...i}):null}function SS(n){let{manifest:i,routeModules:r}=yy(),[s,c]=v.useState([]);return v.useEffect(()=>{let u=!1;return hS(n,i,r).then(h=>{u||c(h)}),()=>{u=!0}},[n,i,r]),s}function _S({page:n,matches:i,...r}){let s=Va(),{future:c,manifest:u,routeModules:h}=yy(),{basename:p}=gy(),{loaderData:g,matches:m}=xS(),b=v.useMemo(()=>hg(n,i,m,u,s,"data"),[n,i,m,u,s]),x=v.useMemo(()=>hg(n,i,m,u,s,"assets"),[n,i,m,u,s]),_=v.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let D=new Set,A=!1;if(i.forEach(J=>{let G=u.routes[J.route.id];!G||!G.hasLoader||(!b.some(Z=>Z.route.id===J.route.id)&&J.route.id in g&&h[J.route.id]?.shouldRevalidate||G.hasClientLoader?A=!0:D.add(J.route.id))}),D.size===0)return[];let Q=uS(n,p,c.unstable_trailingSlashAwareDataRequests,"data");return A&&D.size>0&&Q.searchParams.set("_routes",i.filter(J=>D.has(J.route.id)).map(J=>J.route.id).join(",")),[Q.pathname+Q.search]},[p,c.unstable_trailingSlashAwareDataRequests,g,s,u,b,i,n,h]),j=v.useMemo(()=>mS(x,u),[x,u]),w=SS(x);return v.createElement(v.Fragment,null,_.map(D=>v.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...r})),j.map(D=>v.createElement("link",{key:D,rel:"modulepreload",href:D,...r})),w.map(({key:D,link:A})=>v.createElement("link",{key:D,nonce:r.nonce,...A,crossOrigin:A.crossOrigin??r.crossOrigin})))}function jS(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var NS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{NS&&(window.__reactRouterVersion="7.13.1")}catch{}function wS(n,i){return Pb({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:mb({window:i?.window}),hydrationData:ES(),routes:n,mapRouteProperties:Z1,hydrationRouteProperties:F1,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function ES(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:CS(n.errors)}),n}function CS(n){if(!n)return null;let i=Object.entries(n),r={};for(let[s,c]of i)if(c&&c.__type==="RouteErrorResponse")r[s]=new Or(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let u=window[c.__subType];if(typeof u=="function")try{let h=new u(c.message);h.stack="",r[s]=h}catch{}}if(r[s]==null){let u=new Error(c.message);u.stack="",r[s]=u}}else r[s]=c;return r}var xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pa=v.forwardRef(function({onClick:i,discover:r="render",prefetch:s="none",relative:c,reloadDocument:u,replace:h,unstable_mask:p,state:g,target:m,to:b,preventScrollReset:x,viewTransition:_,unstable_defaultShouldRevalidate:j,...w},D){let{basename:A,navigator:Q,unstable_useTransitions:J}=v.useContext(ga),G=typeof b=="string"&&xy.test(b),Z=Fg(b,A);b=Z.to;let K=z1(b,{relative:c}),ae=Va(),P=null;if(p){let ce=Tr(p,[],ae.unstable_mask?ae.unstable_mask.pathname:"/",!0);A!=="/"&&(ce.pathname=ce.pathname==="/"?A:Ya([A,ce.pathname])),P=Q.createHref(ce)}let[R,U,$]=vS(s,w),de=TS(b,{replace:h,unstable_mask:p,state:g,target:m,preventScrollReset:x,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:j,unstable_useTransitions:J});function se(ce){i&&i(ce),ce.defaultPrevented||de(ce)}let ve=!(Z.isExternal||u),te=v.createElement("a",{...w,...$,href:(ve?P:void 0)||Z.absoluteURL||K,onClick:ve?se:i,ref:jS(D,U),target:m,"data-discover":!G&&r==="render"?"true":void 0});return R&&!G?v.createElement(v.Fragment,null,te,v.createElement(bS,{page:K})):te});pa.displayName="Link";var zr=v.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:s="",end:c=!1,style:u,to:h,viewTransition:p,children:g,...m},b){let x=Ar(h,{relative:m.relative}),_=Va(),j=v.useContext(Mr),{navigator:w,basename:D}=v.useContext(ga),A=j!=null&&LS(x)&&p===!0,Q=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,J=_.pathname,G=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;r||(J=J.toLowerCase(),G=G?G.toLowerCase():null,Q=Q.toLowerCase()),G&&D&&(G=Oa(G,D)||G);const Z=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let K=J===Q||!c&&J.startsWith(Q)&&J.charAt(Z)==="/",ae=G!=null&&(G===Q||!c&&G.startsWith(Q)&&G.charAt(Q.length)==="/"),P={isActive:K,isPending:ae,isTransitioning:A},R=K?i:void 0,U;typeof s=="function"?U=s(P):U=[s,K?"active":null,ae?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let $=typeof u=="function"?u(P):u;return v.createElement(pa,{...m,"aria-current":R,className:U,ref:b,style:$,to:h,viewTransition:p},typeof g=="function"?g(P):g)});zr.displayName="NavLink";var RS=v.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:s,replace:c,state:u,method:h=lo,action:p,onSubmit:g,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_,...j},w)=>{let{unstable_useTransitions:D}=v.useContext(ga),A=MS(),Q=AS(p,{relative:m}),J=h.toLowerCase()==="get"?"get":"post",G=typeof p=="string"&&xy.test(p),Z=K=>{if(g&&g(K),K.defaultPrevented)return;K.preventDefault();let ae=K.nativeEvent.submitter,P=ae?.getAttribute("formmethod")||h,R=()=>A(ae||K.currentTarget,{fetcherKey:i,method:P,navigate:r,replace:c,state:u,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_});D&&r!==!1?v.startTransition(()=>R()):R()};return v.createElement("form",{ref:w,method:J,action:Q,onSubmit:s?g:Z,...j,"data-discover":!G&&n==="render"?"true":void 0})});RS.displayName="Form";function zS(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vy(n){let i=v.useContext(Cl);return Le(i,zS(n)),i}function TS(n,{target:i,replace:r,unstable_mask:s,state:c,preventScrollReset:u,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:m}={}){let b=el(),x=Va(),_=Ar(n,{relative:h});return v.useCallback(j=>{if(iS(j,i)){j.preventDefault();let w=r!==void 0?r:Pa(x)===Pa(_),D=()=>b(n,{replace:w,unstable_mask:s,state:c,preventScrollReset:u,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g});m?v.startTransition(()=>D()):D()}},[x,b,_,r,s,c,i,n,u,h,p,g,m])}function by(n){yt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=v.useRef(nd(n)),r=v.useRef(!1),s=Va(),c=v.useMemo(()=>rS(s.search,r.current?null:i.current),[s.search]),u=el(),h=v.useCallback((p,g)=>{const m=nd(typeof p=="function"?p(new URLSearchParams(c)):p);r.current=!0,u("?"+m,g)},[u,c]);return[c,h]}var OS=0,DS=()=>`__${String(++OS)}__`;function MS(){let{router:n}=vy("useSubmit"),{basename:i}=v.useContext(ga),r=V1(),s=n.fetch,c=n.navigate;return v.useCallback(async(u,h={})=>{let{action:p,method:g,encType:m,formData:b,body:x}=cS(u,i);if(h.navigate===!1){let _=h.fetcherKey||DS();await s(_,r,h.action||p,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:x,formMethod:h.method||g,formEncType:h.encType||m,flushSync:h.flushSync})}else await c(h.action||p,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:x,formMethod:h.method||g,formEncType:h.encType||m,replace:h.replace,state:h.state,fromRouteId:r,flushSync:h.flushSync,viewTransition:h.viewTransition})},[s,c,i,r])}function AS(n,{relative:i}={}){let{basename:r}=v.useContext(ga),s=v.useContext(Da);Le(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),u={...Ar(n||".",{relative:i})},h=Va();if(n==null){u.search=h.search;let p=new URLSearchParams(u.search),g=p.getAll("index");if(g.some(b=>b==="")){p.delete("index"),g.filter(x=>x).forEach(x=>p.append("index",x));let b=p.toString();u.search=b?`?${b}`:""}}return(!n||n===".")&&c.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Ya([r,u.pathname])),Pa(u)}function LS(n,{relative:i}={}){let r=v.useContext(pd);Le(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=vy("useViewTransitionState"),c=Ar(n,{relative:i});if(!r.isTransitioning)return!1;let u=Oa(r.currentLocation.pathname,s)||r.currentLocation.pathname,h=Oa(r.nextLocation.pathname,s)||r.nextLocation.pathname;return co(c.pathname,h)!=null||co(c.pathname,u)!=null}const mg=n=>{let i;const r=new Set,s=(m,b)=>{const x=typeof m=="function"?m(i):m;if(!Object.is(x,i)){const _=i;i=b??(typeof x!="object"||x===null)?x:Object.assign({},i,x),r.forEach(j=>j(i,_))}},c=()=>i,p={setState:s,getState:c,getInitialState:()=>g,subscribe:m=>(r.add(m),()=>r.delete(m))},g=i=n(s,c,p);return p},kS=(n=>n?mg(n):mg),US=n=>n;function HS(n,i=US){const r=gi.useSyncExternalStore(n.subscribe,gi.useCallback(()=>i(n.getState()),[n,i]),gi.useCallback(()=>i(n.getInitialState()),[n,i]));return gi.useDebugValue(r),r}const pg=n=>{const i=kS(n),r=s=>HS(i,s);return Object.assign(r,i),r},xo=(n=>n?pg(n):pg),BS="/api/v1";class br extends Error{constructor(i,r,s){super(s),this.status=i,this.code=r,this.name="ApiError"}}async function to(n,i,r,s){let c=`${BS}${i}`;if(s){const p=new URLSearchParams(s).toString();p&&(c+=`?${p}`)}const u={method:n,headers:{"Content-Type":"application/json"}};r!==void 0&&(u.body=JSON.stringify(r));const h=await fetch(c,u);if(!h.ok){let p="UNKNOWN",g=h.statusText;try{const m=await h.json();m.code&&(p=m.code),m.message&&(g=m.message)}catch{}throw new br(h.status,p,g)}return h.json()}const qt={get(n,i){return to("GET",n,void 0,i)},post(n,i){return to("POST",n,i)},put(n,i){return to("PUT",n,i)},delete(n){return to("DELETE",n)}},qS=3e4,YS=1e3,VS=3e4;class GS{ws=null;url="";handlers=new Map;statusHandlers=new Set;heartbeatTimer=null;reconnectTimer=null;reconnectAttempt=0;intentionalClose=!1;_status="disconnected";get status(){return this._status}setStatus(i){this._status=i;for(const r of this.statusHandlers)r(i)}onStatusChange(i){return this.statusHandlers.add(i),()=>{this.statusHandlers.delete(i)}}connect(i){this.url=i,this.intentionalClose=!1,this.reconnectAttempt=0,this.open()}disconnect(){this.intentionalClose=!0,this.clearTimers(),this.ws&&(this.ws.close(),this.ws=null),this.setStatus("disconnected")}on(i,r){let s=this.handlers.get(i);return s||(s=new Set,this.handlers.set(i,s)),s.add(r),()=>{s.delete(r),s.size===0&&this.handlers.delete(i)}}send(i,r){if(this.ws?.readyState!==WebSocket.OPEN)return;const s={event:i,payload:r,timestamp:Date.now()};this.ws.send(JSON.stringify(s))}open(){this.setStatus("connecting");const i=new WebSocket(this.url);i.onopen=()=>{this.reconnectAttempt=0,this.setStatus("connected"),this.startHeartbeat()},i.onmessage=r=>{try{const s=JSON.parse(String(r.data));if(s.event==="pong")return;const c=this.handlers.get(s.event);if(c)for(const u of c)u(s.payload)}catch{}},i.onclose=()=>{this.stopHeartbeat(),this.intentionalClose||(this.setStatus("reconnecting"),this.scheduleReconnect())},i.onerror=()=>{},this.ws=i}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({event:"ping",payload:null,timestamp:Date.now()}))},qS)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const i=Math.min(YS*2**this.reconnectAttempt,VS);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},i)}clearTimers(){this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const Ia=new GS,wl="lib_cloud_default",Xt=xo((n,i)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{n({loading:!0,error:null});try{const r=await qt.get("/libraries");n({libraries:r,loading:!1})}catch(r){n({error:r instanceof Error?r.message:"Failed to load libraries",loading:!1})}},createLibrary:async r=>{const s=await qt.post("/libraries",r);return n(c=>({libraries:[...c.libraries,s]})),s},deleteLibrary:async r=>{await qt.delete(`/libraries/${r}`),n(s=>({libraries:s.libraries.filter(c=>c.id!==r)}))},updateLibraryName:async(r,s)=>{const c=await qt.put(`/libraries/${r}`,{name:s});n(u=>({libraries:u.libraries.map(h=>h.id===r?c:h)}))},_updateLibraryOnline:(r,s)=>{n(c=>({libraries:c.libraries.map(u=>u.id===r?{...u,is_online:s}:u)}))},_refreshLibrary:async r=>{try{const s=await qt.get(`/libraries/${r}`);n(c=>({libraries:c.libraries.map(u=>u.id===r?s:u)}))}catch{i().fetchLibraries()}}})),Lr=n=>{const i=n.libraries.filter(s=>s.type==="cloud").sort((s,c)=>s.created_at.localeCompare(c.created_at)),r=n.libraries.filter(s=>s.type==="daemon").sort((s,c)=>s.name.localeCompare(c.name));return[...i,...r]},$S=n=>n.libraries.filter(i=>i.type==="daemon");Ia.on("ws:daemon:status",n=>{const i=n;i.lib_id&&Xt.getState()._updateLibraryOnline(i.lib_id,i.is_online),Xt.getState().fetchLibraries()});Ia.on("ws:daemon:connected",n=>{const i=n;i.lib_id&&Xt.getState()._updateLibraryOnline(i.lib_id,!0),Xt.getState().fetchLibraries()});Ia.on("ws:library:updated",n=>{const i=n;Xt.getState()._refreshLibrary(i.library_id)});const Sy=(...n)=>n.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();const KS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const XS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,s)=>s?s.toUpperCase():r.toLowerCase());const gg=n=>{const i=XS(n);return i.charAt(0).toUpperCase()+i.slice(1)};var QS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ZS=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const FS=v.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:c="",children:u,iconNode:h,...p},g)=>v.createElement("svg",{ref:g,...QS,width:i,height:i,stroke:n,strokeWidth:s?Number(r)*24/Number(i):r,className:Sy("lucide",c),...!u&&!ZS(p)&&{"aria-hidden":"true"},...p},[...h.map(([m,b])=>v.createElement(m,b)),...Array.isArray(u)?u:[u]]));const De=(n,i)=>{const r=v.forwardRef(({className:s,...c},u)=>v.createElement(FS,{ref:u,iconNode:i,className:Sy(`lucide-${KS(gg(n))}`,`lucide-${n}`,s),...c}));return r.displayName=gg(n),r};const JS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_y=De("arrow-right",JS);const WS=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],yg=De("arrow-up-right",WS);const PS=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],IS=De("boxes",PS);const e2=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],t2=De("brain",e2);const a2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vi=De("check",a2);const n2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],vo=De("chevron-down",n2);const l2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_n=De("chevron-right",l2);const i2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Sd=De("circle-alert",i2);const r2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],xg=De("copy",r2);const s2=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],o2=De("database",s2);const c2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],u2=De("file-spreadsheet",c2);const d2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],In=De("file-text",d2);const f2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],jy=De("file",f2);const h2=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],m2=De("files",h2);const p2=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],_d=De("folder-git-2",p2);const g2=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],y2=De("folder-input",g2);const x2=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],v2=De("folder-open",x2);const b2=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ny=De("folder-plus",b2);const S2=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ta=De("folder",S2);const _2=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],uo=De("git-branch",_2);const j2=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],ld=De("git-commit-horizontal",j2);const N2=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],id=De("github",N2);const w2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],E2=De("globe",w2);const C2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],R2=De("info",C2);const z2=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],T2=De("list-filter",z2);const O2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Zt=De("loader-circle",O2);const D2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],M2=De("menu",D2);const A2=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],L2=De("monitor",A2);const k2=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],U2=De("moon",k2);const H2=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],bi=De("package",H2);const B2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],q2=De("panel-left",B2);const Y2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],rd=De("pencil",Y2);const V2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wy=De("plus",V2);const G2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],$2=De("refresh-cw",G2);const K2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],X2=De("search",K2);const Q2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Z2=De("settings",Q2);const F2=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],J2=De("share-2",F2);const W2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],P2=De("sparkles",W2);const I2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],e4=De("sun",I2);const t4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ey=De("trash-2",t4);const a4=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],sd=De("upload",a4);const n4=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],l4=De("users",n4);const i4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bo=De("x",i4),El=xo(n=>({status:"disconnected",onlineCount:0,connections:[],setStatus:i=>n({status:i}),fetchDaemonStatus:async()=>{try{const i=await qt.get("/daemons/status");n({onlineCount:i.online_count,connections:i.connections})}catch{}}})),r4=n=>n==="connecting"?"disconnected":n;Ia.onStatusChange(n=>{El.getState().setStatus(r4(n))});Ia.on("ws:daemon:connected",n=>{const i=n;El.setState(r=>{if(r.connections.some(h=>h.machine_id===i.machine_id))return r;const c={machine_id:i.machine_id};i.lib_id&&(c.lib_id=i.lib_id);const u=[...r.connections,c];return{connections:u,onlineCount:u.length}})});Ia.on("ws:daemon:status",n=>{const i=n;El.setState(r=>{if(i.is_online){if(r.connections.some(p=>p.machine_id===i.machine_id))return r;const u={machine_id:i.machine_id};i.lib_id&&(u.lib_id=i.lib_id);const h=[...r.connections,u];return{connections:h,onlineCount:h.length}}const s=r.connections.filter(c=>c.machine_id!==i.machine_id);return{connections:s,onlineCount:s.length}})});const vg=n=>Symbol.iterator in n,bg=n=>"entries"in n,Sg=(n,i)=>{const r=n instanceof Map?n:new Map(n.entries()),s=i instanceof Map?i:new Map(i.entries());if(r.size!==s.size)return!1;for(const[c,u]of r)if(!s.has(c)||!Object.is(u,s.get(c)))return!1;return!0},s4=(n,i)=>{const r=n[Symbol.iterator](),s=i[Symbol.iterator]();let c=r.next(),u=s.next();for(;!c.done&&!u.done;){if(!Object.is(c.value,u.value))return!1;c=r.next(),u=s.next()}return!!c.done&&!!u.done};function o4(n,i){return Object.is(n,i)?!0:typeof n!="object"||n===null||typeof i!="object"||i===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(i)?!1:vg(n)&&vg(i)?bg(n)&&bg(i)?Sg(n,i):s4(n,i):Sg({entries:()=>Object.entries(n)},{entries:()=>Object.entries(i)})}function _i(n){const i=gi.useRef(void 0);return r=>{const s=n(r);return o4(i.current,s)?i.current:i.current=s}}function od(){const{t:n}=Re(),i=El(h=>h.onlineCount),r=El(h=>h.connections.length);if(Xt(_i($S)).length===0)return null;const c=i>0,u=c?n("sources.header.daemon_status",{online:i,total:r}):n("sources.header.all_offline");return f.jsxs("div",{className:"group relative flex items-center",title:u,children:[f.jsx("span",{className:`inline-block h-[7px] w-[7px] rounded-full ${c?"bg-c4a-success":"bg-c4a-error"}`}),f.jsx("span",{className:"pointer-events-none absolute right-full mr-2 hidden whitespace-nowrap rounded bg-c4a-bg-elevated px-2 py-1 font-mono text-xs text-c4a-text-secondary shadow-c4a-md group-hover:block",children:u})]})}const _g=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function c4(){const{t:n}=Re(),[i,r]=v.useState(!1);return f.jsxs("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:[f.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[f.jsxs(pa,{to:"/",className:"flex items-center gap-2 text-c4a-text-primary",children:[f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),f.jsx("span",{className:"hidden font-mono text-sm font-semibold uppercase tracking-tight md:inline",children:"Context4AI"})]}),f.jsxs("div",{className:"hidden items-center gap-6 md:flex",children:[f.jsx("nav",{className:"flex items-center gap-4",children:_g.map(({to:s,labelKey:c})=>f.jsx(zr,{to:s,end:s==="/",className:({isActive:u})=>`font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${u?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(od,{}),f.jsx(pa,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")})]})]}),f.jsx("button",{onClick:()=>r(!i),className:"text-c4a-text-secondary md:hidden",children:i?f.jsx(bo,{size:20}):f.jsx(M2,{size:20})})]}),i&&f.jsxs("div",{className:"border-t border-c4a-border-subtle bg-c4a-bg-surface px-4 pb-4 pt-2 md:hidden",children:[f.jsx("nav",{className:"flex flex-col gap-2",children:_g.map(({to:s,labelKey:c})=>f.jsx(zr,{to:s,end:s==="/",onClick:()=>r(!1),className:({isActive:u})=>`block py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${u?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),f.jsx("div",{className:"mt-2 border-t border-c4a-border-subtle pt-2",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(od,{}),f.jsx(pa,{to:"/login",onClick:()=>r(!1),className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")})]})})]})]})}function u4(n){return n==="system"&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n==="system"?"dark":n}function Cy(n){if(typeof window>"u")return;const i=u4(n);document.documentElement.setAttribute("data-theme",i),localStorage.setItem("theme",n)}function d4(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const Ry=xo(n=>({theme:d4(),setTheme:i=>{Cy(i),n({theme:i})}}));let jg=!1;function f4(){if(jg||typeof window>"u")return;jg=!0;const n=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const{theme:r}=Ry.getState();r==="system"&&Cy("system")};n.addEventListener("change",i)}f4();const h4=[{mode:"light",icon:e4,labelKey:"footer.theme.light"},{mode:"dark",icon:U2,labelKey:"footer.theme.dark"},{mode:"system",icon:L2,labelKey:"footer.theme.system"}];function zy(){const{t:n}=Re(),{theme:i,setTheme:r}=Ry();return f.jsx("div",{className:"flex items-center gap-1",children:h4.map(({mode:s,icon:c,labelKey:u})=>f.jsx("button",{onClick:()=>r(s),title:n(u),className:`cursor-pointer rounded p-1.5 transition-colors duration-150 ${i===s?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:f.jsx(c,{size:14})},s))})}function Ty(){const{i18n:n}=Re(),i=()=>{const r=n.language==="en"?"zh":"en";n.changeLanguage(r)};return f.jsx("button",{onClick:i,className:"cursor-pointer rounded px-2 py-1 font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-secondary hover:bg-c4a-bg-hover",children:n.language==="en"?"CN":"EN"})}function Oy({compact:n}){const{t:i}=Re(),r=new Date().getFullYear(),s=n?"footer.copyright_compact":"footer.copyright";return f.jsx("p",{className:"font-mono text-[11px] text-c4a-text-muted",children:i(s,{year:r})})}const m4="_brandIcon_1c7st_1",p4="_iconPulse_1c7st_35",Ng={brandIcon:m4,iconPulse:p4};function g4({variant:n}){const{t:i}=Re(),r=n==="studio"?"bg-c4a-bg-surface":"bg-c4a-bg-base";return f.jsx("footer",{className:`border-t border-c4a-border-subtle ${r} px-4 py-4`,children:f.jsxs("div",{className:"flex items-end justify-between gap-4",children:[f.jsxs("div",{className:"hidden items-center gap-3 md:flex",children:[f.jsx("div",{className:Ng.brandIcon,children:f.jsx("span",{className:Ng.iconPulse,children:"C4A"})}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-primary",children:"Context4AI"}),f.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-c4a-text-muted",children:i("footer.tagline")})]})]}),f.jsxs("div",{className:"ml-auto flex flex-col items-end gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(zy,{}),f.jsx(Ty,{})]}),f.jsx(Oy,{})]})]})})}function y4(){return f.jsxs("div",{className:"flex min-h-screen flex-col",children:[f.jsx(c4,{}),f.jsx("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:f.jsx(py,{})}),f.jsx(g4,{})]})}function x4({onToggleSidebar:n}){const{t:i}=Re();return f.jsx("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-surface/95 backdrop-blur-sm",children:f.jsxs("div",{className:"relative flex h-14 items-center justify-between px-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[n&&f.jsx("button",{onClick:n,className:"text-c4a-text-secondary transition-colors duration-150 hover:text-c4a-text-primary md:hidden",children:f.jsx(q2,{size:20})}),f.jsxs(pa,{to:"/",className:"hidden items-center gap-2 text-c4a-text-primary md:flex",children:[f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),f.jsx("span",{className:"font-mono text-sm font-semibold uppercase tracking-tight",children:"Context4AI"})]})]}),f.jsx(pa,{to:"/",className:"absolute left-1/2 flex -translate-x-1/2 items-center gap-2 text-c4a-text-primary md:hidden",children:f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"})}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(od,{}),f.jsx(pa,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:i("nav.login")})]})]})})}const v4=n=>`flex items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${n?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,b4=[{to:"/studio/modeling",icon:IS,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:t2,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:X2,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:J2,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:l4,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:Z2,i18nKey:"studio.sidebar.settings"}];function wg({onNavigate:n}){const{t:i}=Re(),r=Va(),s=el(),c=Xt(_i(Lr)),u=r.pathname.startsWith("/studio/sources")||r.pathname.startsWith("/studio/source/"),[h,p]=v.useState(u);v.useEffect(()=>{u&&p(!0)},[u]);const g=m=>m.id===wl?i("sources.library.default_cloud_name"):m.name;return f.jsxs("aside",{className:"flex h-full w-[220px] shrink-0 flex-col border-r border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxs("nav",{className:"flex flex-col gap-1",children:[f.jsxs("div",{className:"group/sources",children:[f.jsxs("button",{onClick:()=>p(m=>!m),className:`flex w-full cursor-pointer items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${u?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[f.jsx(o2,{size:14}),i("studio.sidebar.sources"),f.jsx("span",{role:"button",tabIndex:0,onClick:m=>{m.stopPropagation(),s("/studio/sources/add-client"),n?.()},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.stopPropagation(),s("/studio/sources/add-client"),n?.())},className:"rounded p-0.5 text-c4a-text-muted opacity-0 transition-all hover:bg-c4a-bg-hover max-md:opacity-100 group-hover/sources:opacity-100 group-hover/sources:text-c4a-accent",title:i("sources.menu.add_client"),children:f.jsx(wy,{size:12})}),f.jsx("span",{className:"ml-auto shrink-0",children:h?f.jsx(vo,{size:12}):f.jsx(_n,{size:12})})]}),h&&f.jsx("div",{className:"mt-0.5 flex flex-col gap-0.5",children:c.map(m=>{const b=g(m);return f.jsxs(zr,{to:`/studio/sources/${m.id}`,onClick:n,className:({isActive:x})=>`flex items-center gap-2 rounded py-1.5 pl-8 pr-3 font-mono text-xs tracking-tight transition-colors duration-150 ${x?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,children:[f.jsx("span",{className:"truncate",children:b}),m.type==="daemon"&&f.jsx("span",{className:`ml-auto h-[7px] w-[7px] shrink-0 rounded-full ${m.is_online?"bg-c4a-success":"bg-c4a-error"}`})]},m.id)})})]}),b4.map(({to:m,icon:b,i18nKey:x})=>f.jsxs(zr,{to:m,onClick:n,className:({isActive:_})=>v4(_),children:[f.jsx(b,{size:14}),i(x)]},m))]}),f.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(zy,{}),f.jsx(Ty,{})]}),f.jsx(Oy,{compact:!0})]})]})}function S4(){const[n,i]=v.useState(!1);return v.useEffect(()=>{Xt.getState().fetchLibraries(),El.getState().fetchDaemonStatus()},[]),v.useEffect(()=>Ia.onStatusChange(r=>{r==="connected"&&(Xt.getState().fetchLibraries(),El.getState().fetchDaemonStatus())}),[]),f.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[f.jsx(x4,{onToggleSidebar:()=>i(!n)}),f.jsxs("div",{className:"flex min-h-0 flex-1",children:[f.jsx("div",{className:"hidden md:block",children:f.jsx(wg,{})}),n&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 top-14 z-30 bg-black/40 md:hidden",onClick:()=>i(!1)}),f.jsx("div",{className:"fixed bottom-0 left-0 top-14 z-30 md:hidden",children:f.jsx(wg,{onNavigate:()=>i(!1)})})]}),f.jsx("main",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden",children:f.jsx(py,{})})]})]})}function _4(){const{t:n}=Re();return f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center py-20 text-center",children:[f.jsx("h1",{className:"font-mono text-4xl font-bold uppercase tracking-wide text-c4a-text-primary md:text-5xl",children:n("home.hero.title")}),f.jsx("p",{className:"mt-6 max-w-lg text-base text-c4a-text-secondary",children:n("home.hero.description")}),f.jsxs("div",{className:"mt-10 flex items-center gap-4",children:[f.jsxs(pa,{to:"/studio",className:"flex items-center gap-2 rounded bg-c4a-accent px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-white transition-colors duration-150 hover:bg-c4a-accent-hover",children:[n("home.hero.cta.studio"),f.jsx(_y,{size:14})]}),f.jsx("a",{href:"https://github.com/context4ai/c4a",target:"_blank",rel:"noopener noreferrer",className:"rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("home.hero.cta.github")})]})]})}function Ma({title:n,version:i,description:r}){const{t:s}=Re();return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxs("div",{className:"max-w-md text-center",children:[f.jsx("h2",{className:"font-mono text-2xl font-bold uppercase text-c4a-text-primary",children:n}),i&&f.jsx("span",{className:"mt-3 inline-block rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-1 font-mono text-xs uppercase text-c4a-accent",children:s("placeholder.coming",{version:i})}),f.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:r})]})})}function j4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.login.title"),version:"0.5.0",description:n("page.login.description")})}function N4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.docs.title"),version:"0.4.13",description:n("page.docs.description")})}function w4(){const{t:n}=Re();return f.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center bg-c4a-bg-base p-8 text-center",children:[f.jsx("h1",{className:"font-mono text-6xl font-bold text-c4a-accent",children:n("notfound.title")}),f.jsx("p",{className:"mt-4 text-base text-c4a-text-secondary",children:n("notfound.description")}),f.jsx(pa,{to:"/",className:"mt-8 rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("notfound.back")})]})}function E4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.modeling.title"),version:"0.4.16",description:n("page.modeling.description")})}function C4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.brain.title"),version:"0.4.18",description:n("page.brain.description")})}function R4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.discovery.title"),version:"0.6.x",description:n("page.discovery.description")})}function z4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.sharing.title"),version:"0.4.39",description:n("page.sharing.description")})}function T4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.collaboration.title"),version:"0.5.x",description:n("page.collaboration.description")})}function O4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.settings.title"),version:"0.5.x",description:n("page.settings.description")})}function D4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.code_setup.title"),version:"0.4.13",description:n("page.code_setup.description")})}function M4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.code_compile.title"),version:"0.4.13",description:n("page.code_compile.description")})}function A4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.code_review.title"),version:"0.4.14",description:n("page.code_review.description")})}function L4(){const{t:n}=Re();return f.jsx(Ma,{title:n("page.code_result.title"),version:"0.4.14",description:n("page.code_result.description")})}const So=(n,i)=>{for(const r of n){if(r.path===i)return r;if(r.children){const s=So(r.children,i);if(s)return s}}return null},k4=(n,i)=>i===""?n:So(n,i)?.children??[],Dy=(n,i)=>{if(!i)return[];const r=i.split("/"),s=[];let c="";for(const u of r){c=c?`${c}/${u}`:u;const h=So(n,c);h&&s.push(h)}return s},_o=xo(n=>({rootSources:[],currentRoot:null,loading:!1,error:null,total:0,limit:100,offset:0,filter:"all",fetchRootSources:async({library_id:i,limit:r,offset:s})=>{n({loading:!0,error:null});try{const c={library_id:i};r!==void 0&&(c.limit=String(r)),s!==void 0&&(c.offset=String(s));const u=await qt.get("/sources",c);n({rootSources:u.items,total:u.total,limit:u.limit,offset:u.offset,loading:!1})}catch(c){n({error:c instanceof Error?c.message:"Failed to load sources",loading:!1})}},fetchRootSource:async i=>{const r=await qt.get(`/sources/${i}`);return n({currentRoot:r}),r},createSource:async i=>await qt.post("/sources",i),addTreeNode:async(i,r)=>{const s=await qt.post(`/sources/${i}/tree`,r);return n(c=>({rootSources:c.rootSources.map(u=>u.id===i?s:u),currentRoot:c.currentRoot?.id===i?s:c.currentRoot})),s},updateSource:async(i,r)=>{const s=await qt.put(`/sources/${i}`,r);n(c=>({rootSources:c.rootSources.map(u=>u.id===i?s:u),currentRoot:c.currentRoot?.id===i?s:c.currentRoot}))},deleteSource:async i=>{await qt.delete(`/sources/${i}`),n(r=>({rootSources:r.rootSources.filter(s=>s.id!==i),currentRoot:r.currentRoot?.id===i?null:r.currentRoot}))},deleteTreeNode:async(i,r)=>{const s=await qt.delete(`/sources/${i}/tree?path=${encodeURIComponent(r)}`);return n(c=>({rootSources:c.rootSources.map(u=>u.id===i?s:u),currentRoot:c.currentRoot?.id===i?s:c.currentRoot})),s},uploadDoc:async i=>await qt.post("/sources/upload",i),setFilter:i=>n({filter:i}),clearSources:()=>n({rootSources:[],currentRoot:null,total:0,offset:0})}));function kr({segments:n}){const{t:i}=Re(),r=v.useRef(null),s=v.useRef(null),[c,u]=v.useState(0),h=[{label:i("sources.breadcrumb.sources")},...n],p=Math.max(0,h.length-3);v.useEffect(()=>{const m=r.current,b=s.current;if(!m||!b)return;const x=()=>{const j=m.clientWidth,w=Array.from(b.children);if(w.length===0)return;const D=w.map(P=>P.offsetWidth),A=4;if(D.reduce((P,R)=>P+R,0)+A*(D.length-1)<=j){u(0);return}const J=20,G=(D[0]??0)+(D[1]??0)+A,Z=D[D.length-1]??0,K=G+A+J+A+Z;let ae=p;for(let P=1;P<=p;P++){let R=0;for(let U=2+P;U<D.length-1;U++)R+=D[U]+A;if(K+R<=j){ae=P;break}}u(ae)};x();const _=new ResizeObserver(x);return _.observe(m),()=>_.disconnect()},[p,n,i]);const g=(()=>{if(c===0||h.length<=3)return h;const m=h.slice(0,2),b=h[h.length-1],x=h.slice(2+c,h.length-1);return[...m,{label:"…"},...x,b]})();return f.jsxs("div",{ref:r,className:"relative min-w-0 overflow-hidden",children:[f.jsx("nav",{className:"flex min-h-8 items-center gap-1 font-mono text-xs text-c4a-text-muted",children:g.map((m,b)=>{const x=b===g.length-1;return f.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[b>0&&f.jsx(_n,{size:12,className:"shrink-0 text-c4a-text-muted"}),m.to&&!x?f.jsx(pa,{to:m.to,className:"cursor-pointer whitespace-nowrap transition-colors hover:text-c4a-text-primary",children:m.label}):f.jsx("span",{className:`whitespace-nowrap ${x?"text-c4a-text-primary":""}`,children:m.label})]},b)})}),f.jsx("div",{ref:s,"aria-hidden":!0,className:"pointer-events-none invisible absolute left-0 top-0 flex h-0 items-center gap-1 overflow-visible whitespace-nowrap font-mono text-xs",children:h.map((m,b)=>f.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[b>0&&f.jsx(_n,{size:12}),f.jsx("span",{className:"whitespace-nowrap",children:m.label})]},b))})]})}const U4=["all","indexed","not_indexed"];function H4({value:n,onChange:i}){const{t:r}=Re(),[s,c]=v.useState(!1),u=v.useRef(null),h=v.useRef(null),p={all:r("sources.filter.all"),indexed:r("sources.filter.indexed"),not_indexed:r("sources.filter.not_indexed")},g=v.useCallback(x=>{u.current&&!u.current.contains(x.target)&&c(!1)},[]);v.useEffect(()=>{if(s)return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[s,g]);const m=v.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null),c(!0)},[]),b=v.useCallback(()=>{h.current=setTimeout(()=>c(!1),150)},[]);return f.jsxs("div",{ref:u,className:"relative",onMouseEnter:m,onMouseLeave:b,children:[f.jsxs("button",{className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsx(T2,{size:12}),f.jsx("span",{className:"hidden sm:inline",children:p[n]}),f.jsx(vo,{size:12,className:"hidden transition-transform sm:block"})]}),s&&f.jsx("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[120px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg",children:U4.map(x=>f.jsxs("button",{onClick:()=>{i(x),c(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary ${x===n?"text-c4a-accent":"text-c4a-text-secondary"}`,children:[f.jsx(vi,{size:12,className:x===n?"opacity-100":"opacity-0"}),p[x]]},x))})]})}function My({currentName:n,onConfirm:i,onCancel:r,error:s}){const[c,u]=v.useState(n),h=v.useRef(null);v.useEffect(()=>{h.current?.select()},[]);const p=v.useCallback(()=>{const m=c.trim();m&&m!==n?i(m):r()},[c,n,i,r]),g=v.useCallback(m=>{m.key==="Enter"?(m.preventDefault(),p()):m.key==="Escape"&&r()},[p,r]);return f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("input",{ref:h,value:c,onChange:m=>u(m.target.value),onKeyDown:g,onBlur:p,className:"min-w-0 flex-1 rounded border border-c4a-accent bg-c4a-bg-surface px-2 py-1 text-sm text-c4a-text-primary outline-none",autoFocus:!0}),f.jsx("button",{onClick:m=>{m.stopPropagation(),p()},className:"rounded p-0.5 text-c4a-success hover:bg-c4a-bg-hover",children:f.jsx(vi,{size:14})}),f.jsx("button",{onClick:m=>{m.stopPropagation(),r()},className:"rounded p-0.5 text-c4a-error hover:bg-c4a-bg-hover",children:f.jsx(bo,{size:14})}),s&&f.jsx("span",{className:"ml-1 text-xs text-c4a-error",children:s})]})}const B4=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),q4=new Set([".ts",".tsx",".md"]),Y4=new Set([".md",".doc",".docx",".pdf",".ppt",".pptx",".txt"]),V4=new Set([".md",".txt"]),G4=5*1024*1024,$4=10;function cd(n){const i=n.lastIndexOf(".");return i>=0?n.slice(i).toLowerCase():""}function Ay(n){const i=n.includes("/")?n.split("/").pop():n;if(B4.has(i.toLowerCase()))return!0;const r=cd(i);return q4.has(r)}const K4=n=>{const i=new Date(n);if(Number.isNaN(i.getTime()))return"";const r=c=>String(c).padStart(2,"0"),s=`${r(i.getMonth()+1)}-${r(i.getDate())} ${r(i.getHours())}:${r(i.getMinutes())}`;return i.getFullYear()===new Date().getFullYear()?s:`${i.getFullYear()}-${s}`},Eg={none:"bg-c4a-text-muted/40",indexed:"bg-c4a-success",stale:"bg-c4a-warning"};function X4({source:n,isDaemonLibrary:i}){const{t:r}=Re(),s=n.kind==="source",c=s&&(n.source_type==="code"||Ay(n.name)),u=c?"text-c4a-accent":"text-c4a-text-muted";let h;if(n.kind==="folder"?h=i?f.jsx(v2,{size:16,className:`shrink-0 ${u}`}):f.jsx(Ta,{size:16,className:`shrink-0 ${u}`}):n.source_type==="code"?h=f.jsx(bi,{size:16,className:`shrink-0 ${u}`}):h=f.jsx(In,{size:16,className:`shrink-0 ${u}`}),!s||!c)return f.jsx(f.Fragment,{children:h});const p=Eg[n.index_status]??Eg.none,g=r(`sources.status.${n.index_status}`);return f.jsxs("span",{className:"group/dot relative shrink-0",children:[h,f.jsx("span",{className:`absolute -right-[2px] -top-[2px] block h-[5px] w-[5px] rounded-full ${p}`}),f.jsx("span",{className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-1.5 -translate-x-1/2 whitespace-nowrap rounded bg-c4a-bg-elevated px-2 py-1 font-mono text-[10px] text-c4a-text-secondary opacity-0 shadow-lg transition-opacity group-hover/dot:opacity-100",children:g})]})}function Cg({source:n,displayName:i,childCount:r,isDaemonLibrary:s,isRepoRoot:c,onClick:u,onRename:h,onDelete:p}){const{t:g}=Re(),[m,b]=v.useState(!1),[x,_]=v.useState(null),j=v.useCallback(async Z=>{if(!h)return;const K=await h(Z);K?_(K):(b(!1),_(null))},[h]),w=v.useCallback(()=>{b(!1),_(null)},[]),D=!c&&h,A=p,Q=n.updated_at||n.created_at,J=n.kind==="source"&&n.source_type!=="code"&&!Ay(n.name),G=!J;return f.jsxs("div",{className:`group flex items-center gap-3 rounded py-2 pl-3 pr-5 transition-colors ${G?"cursor-pointer hover:bg-c4a-bg-hover":"cursor-default"}`,onClick:m||!G?void 0:u,children:[f.jsx(X4,{source:n,isDaemonLibrary:s??!1}),m?f.jsx("div",{className:"min-w-0 flex-1",onClick:Z=>Z.stopPropagation(),children:f.jsx(My,{currentName:n.name,onConfirm:j,onCancel:w,error:x})}):f.jsx("span",{className:`min-w-0 flex-1 truncate text-sm ${J?"text-c4a-text-muted":"text-c4a-text-primary"}`,children:i??n.name}),f.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n.kind==="folder"&&r!==void 0&&f.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:g("common.items",{count:r})}),Q&&f.jsx("span",{className:"hidden font-mono text-[11px] text-c4a-text-muted lg:inline",children:K4(Q)})]}),(D||A)&&f.jsxs("div",{className:"flex items-center gap-1 md:opacity-0 md:transition-opacity md:group-hover:opacity-100",children:[D&&f.jsx("button",{title:g("sources.actions.rename"),onClick:Z=>{Z.stopPropagation(),b(!0)},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(rd,{size:14})}),A&&f.jsx("button",{title:g("sources.actions.delete"),onClick:Z=>{Z.stopPropagation(),p()},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(Ey,{size:14})})]})]})}function Rl({children:n,onClose:i,className:r="",overlayClass:s="bg-black/50",closeOnOverlay:c=!0,closeOnEsc:u=!0,disableClose:h=!1}){const p=v.useRef(null);v.useEffect(()=>{if(!u)return;const m=b=>{b.key==="Escape"&&!h&&i()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i,u,h]);const g=v.useCallback(m=>{c&&!h&&p.current&&!p.current.contains(m.target)&&i()},[i,c,h]);return f.jsx("div",{className:`fixed inset-0 z-50 flex items-center justify-center ${s}`,onClick:g,children:f.jsx("div",{ref:p,className:r,children:n})})}function Rg({target:n,onConfirm:i,onCancel:r}){const{t:s}=Re();return f.jsxs(Rl,{onClose:r,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.delete.confirm_title")}),f.jsxs("div",{className:"mt-4 space-y-3 text-sm text-c4a-text-secondary",children:[n.type==="resource"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.resource",{name:n.name})}),f.jsx("p",{children:s("sources.delete.resource_impact")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.session_warning")}),f.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="folder"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.folder",{name:n.name})}),n.folderCount!==void 0&&n.sourceCount!==void 0?f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.folder_contents",{folders:n.folderCount,sources:n.sourceCount})}),n.indexedCount!==void 0&&n.indexedCount>0&&f.jsx("p",{children:s("sources.delete.indexed_hint",{indexed:n.indexedCount,total:n.sourceCount})})]}):f.jsx("p",{children:s("sources.delete.folder_impact_generic")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")})]}),n.type==="repo"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.repo",{name:n.name,library:n.libraryName})}),n.packageCount!==void 0&&n.docCount!==void 0?f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.repo_contents",{packages:n.packageCount,docs:n.docCount})}),n.indexedCount!==void 0&&n.indexedCount>0&&f.jsx("p",{children:s("sources.delete.indexed_hint",{indexed:n.indexedCount,total:n.packageCount+n.docCount})})]}):f.jsx("p",{children:s("sources.delete.repo_impact_generic")}),f.jsx("p",{children:s("sources.delete.local_safe")}),f.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="client"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.client",{name:n.name})}),f.jsx("p",{children:s("sources.delete.client_impact")}),f.jsx("p",{children:s("sources.delete.local_safe")}),f.jsx("p",{children:s("sources.delete.entity_safe")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")}),f.jsx("p",{className:"text-c4a-text-muted",children:s("sources.delete.client_reregister")})]})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsx("button",{onClick:r,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:s("common.cancel")}),f.jsx("button",{onClick:i,className:"rounded bg-c4a-error px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-error/80",children:s("common.confirm")})]})]})}function Q4({onConfirm:n,onCancel:i,error:r}){const{t:s}=Re(),[c,u]=v.useState(""),h=v.useRef(null);v.useEffect(()=>{h.current?.focus()},[]);const p=v.useCallback(()=>{const m=c.trim();m&&n(m)},[c,n]),g=v.useCallback(m=>{m.key==="Enter"&&(m.preventDefault(),p())},[p]);return f.jsxs(Rl,{onClose:i,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Ny,{size:16,className:"shrink-0 text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.actions.new_folder")})]}),f.jsxs("div",{className:"mt-4",children:[f.jsx("input",{ref:h,value:c,onChange:m=>u(m.target.value),onKeyDown:g,placeholder:s("sources.folder.name_placeholder"),className:"w-full rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-2 text-sm text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent",autoFocus:!0}),r&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:r})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsx("button",{onClick:i,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:s("common.cancel")}),f.jsx("button",{onClick:p,disabled:!c.trim(),className:"rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:s("common.confirm")})]})]})}function Xu({label:n,icon:i,items:r,alignRight:s}){const[c,u]=v.useState(!1),h=v.useRef(null),p=v.useRef(null),g=v.useCallback(x=>{h.current&&!h.current.contains(x.target)&&u(!1)},[]);v.useEffect(()=>{if(c)return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[c,g]);const m=v.useCallback(()=>{p.current&&(clearTimeout(p.current),p.current=null),u(!0)},[]),b=v.useCallback(()=>{p.current=setTimeout(()=>u(!1),150)},[]);return f.jsxs("div",{ref:h,className:"relative",onMouseEnter:m,onMouseLeave:b,children:[f.jsxs("button",{className:`flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary ${n?"p-1 sm:px-2 sm:py-1":"p-1"}`,children:[i,n&&f.jsx("span",{className:"hidden sm:inline",children:n}),n&&f.jsx(vo,{size:12,className:"hidden transition-transform sm:block"})]}),c&&f.jsx("div",{className:`absolute top-full z-20 mt-1 min-w-[160px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg ${s?"right-0":"left-0"}`,children:r.map(x=>f.jsxs("button",{onClick:()=>{x.onClick(),u(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[x.icon,x.label]},x.label))})]})}function Z4({onClose:n}){const{t:i}=Re();return f.jsxs(Rl,{onClose:n,closeOnEsc:!1,className:"w-full max-w-sm rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(P2,{size:18,className:"text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:i("sources.upgrade.title")})]}),f.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:i("sources.upgrade.description")}),f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsx("button",{onClick:n,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("common.confirm")})})]})}function F4(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}function J4({onConfirm:n,onCancel:i,error:r,uploading:s}){const{t:c}=Re(),[u,h]=v.useState([]),[p,g]=v.useState(null),[m,b]=v.useState(!1),x=v.useRef(null),_=v.useCallback(Z=>{g(null);for(const K of Z){const ae=cd(K.name);if(!Y4.has(ae)){g(c("sources.upload.unsupported_type",{name:K.name}));return}if(K.size>G4){g(c("sources.upload.file_too_large",{name:K.name}));return}}h(K=>{const ae=new Map(K.map(R=>[R.name,R]));for(const R of Z)ae.set(R.name,{name:R.name,size:R.size,file:R});const P=Array.from(ae.values());return P.length>$4?(g(c("sources.upload.too_many_files")),K):P})},[c]),j=v.useCallback(Z=>{const K=Z.target.files;!K||K.length===0||(_(Array.from(K)),Z.target.value="")},[_]),w=v.useCallback(Z=>{h(K=>K.filter((ae,P)=>P!==Z)),g(null)},[]),D=v.useCallback(Z=>{Z.preventDefault(),b(!1);const K=Z.dataTransfer?.files;!K||K.length===0||_(Array.from(K))},[_]),A=v.useCallback(Z=>{Z.preventDefault(),b(!0)},[]),Q=v.useCallback(Z=>{Z.preventDefault(),b(!1)},[]),J=v.useCallback(async()=>{if(u.length===0)return;const Z=await Promise.all(u.map(K=>new Promise((ae,P)=>{const R=cd(K.name),U=V4.has(R),$=new FileReader;$.onerror=()=>P($.error),U?($.onload=()=>ae({name:K.name,content:$.result,encoding:"utf-8"}),$.readAsText(K.file)):($.onload=()=>{const de=$.result,se=de.slice(de.indexOf(",")+1);ae({name:K.name,content:se,encoding:"base64"})},$.readAsDataURL(K.file))})));n(Z)},[u,n]),G=r||p;return f.jsxs(Rl,{onClose:i,disableClose:s??!1,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(sd,{size:16,className:"shrink-0 text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:c("sources.upload.title")})]}),f.jsxs("div",{className:"mt-4",children:[f.jsx("input",{ref:x,type:"file",accept:".md,.doc,.docx,.pdf,.ppt,.pptx,.txt",multiple:!0,onChange:j,className:"hidden"}),f.jsxs("button",{type:"button",onClick:()=>x.current?.click(),onDrop:D,onDragOver:A,onDragLeave:Q,disabled:s,className:`flex w-full flex-col items-center justify-center rounded border-2 border-dashed px-4 py-8 transition-colors ${m?"border-c4a-accent bg-c4a-accent/5":"border-c4a-border-default hover:border-c4a-accent/50"} ${s?"cursor-not-allowed opacity-40":"cursor-pointer"}`,children:[f.jsx(sd,{size:24,className:"text-c4a-text-muted"}),f.jsx("p",{className:"mt-2 text-sm text-c4a-text-secondary",children:c("sources.upload.drop_hint")}),f.jsx("p",{className:"mt-1 text-[10px] text-c4a-text-muted",children:c("sources.upload.supported_formats")})]})]}),u.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"text-xs text-c4a-text-muted",children:c("sources.upload.selected",{count:u.length})}),f.jsx("div",{className:"mt-1 max-h-40 space-y-1 overflow-y-auto c4a-scrollbar",children:u.map((Z,K)=>f.jsxs("div",{className:"flex items-center gap-2 rounded bg-c4a-bg-surface px-2 py-1",children:[f.jsx(In,{size:12,className:"shrink-0 text-c4a-text-muted"}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-c4a-text-primary",children:Z.name}),f.jsx("span",{className:"shrink-0 text-[10px] text-c4a-text-muted",children:F4(Z.size)}),!s&&f.jsx("button",{type:"button",onClick:()=>w(K),className:"shrink-0 text-c4a-text-muted transition-colors hover:text-c4a-text-primary",title:c("sources.upload.remove"),children:f.jsx(bo,{size:12})})]},`${Z.name}-${K}`))})]}),G&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:G}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsx("button",{onClick:i,disabled:s,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:opacity-40",children:c("common.cancel")}),f.jsxs("button",{onClick:J,disabled:u.length===0||s,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[s&&f.jsx(Zt,{size:12,className:"animate-spin"}),c(s?"sources.upload.uploading":"common.confirm")]})]})]})}function W4({pathLabel:n,loading:i,onNavigateUp:r,children:s}){return f.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),f.jsx("div",{className:"c4a-scrollbar flex min-h-0 flex-1 flex-col overflow-y-auto",children:i?f.jsx("div",{className:"flex flex-1 items-center justify-center py-8",children:f.jsx(Zt,{size:14,className:"animate-spin text-c4a-text-muted"})}):f.jsxs(f.Fragment,{children:[r&&f.jsxs("button",{onClick:r,className:"flex w-full cursor-pointer items-center gap-3 rounded pl-3 pr-5 py-2 text-left text-sm text-c4a-text-primary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ta,{size:16,className:"shrink-0 text-c4a-text-muted"}),f.jsx("span",{children:".."})]}),s]})})]})}function P4({library:n,onNewFolder:i,onImportRepo:r,onImportDir:s,onUpgrade:c}){const{t:u}=Re(),h=n.type==="daemon";return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxs("div",{className:"max-w-2xl text-center",children:[f.jsx("h3",{className:"font-mono text-lg font-bold uppercase text-c4a-text-primary",children:u(h?"sources.empty.daemon.title":"sources.empty.cloud.title")}),f.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:u(h?"sources.empty.daemon.description":"sources.empty.cloud.description")}),f.jsx("div",{className:"mt-6 flex justify-center gap-3",children:h?f.jsxs(f.Fragment,{children:[s&&f.jsx("button",{onClick:s,disabled:!n.is_online,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:opacity-40",children:u("sources.actions.import_dir")}),r&&f.jsx("button",{onClick:r,disabled:!n.is_online,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:u("sources.actions.import_repo")})]}):f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:i,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:u("sources.actions.new_folder")}),c&&f.jsx("button",{onClick:c,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover",children:u("sources.actions.import_repo_url")})]})})]})})}function I4(){const{t:n}=Re();return f.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6 text-center",children:[f.jsx("h4",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:n("sources.empty.indexed.title")}),f.jsx("p",{className:"mt-2 text-xs text-c4a-text-secondary",children:n("sources.empty.indexed.description")})]})}const Qu=n=>{let i=0,r=0,s=0,c=0,u=0;const h=p=>{for(const g of p.children??[])g.kind==="folder"?(i++,h(g)):g.kind==="source"&&(r++,g.source_type==="code"?s++:c++,(g.index_status==="indexed"||g.index_status==="stale")&&u++)};return h(n),{folders:i,sources:r,codeSources:s,docSources:c,indexedSources:u}};function e_(){const{t:n}=Re(),i=el(),{libId:r}=go(),[s,c]=by(),u=s.get("rootId")||null,h=s.get("path")||"",g=Xt(_i(Lr)).find(re=>re.id===r),m=Xt(re=>re.updateLibraryName),b=Xt(re=>re.deleteLibrary),{rootSources:x,currentRoot:_,loading:j,filter:w,fetchRootSources:D,fetchRootSource:A,createSource:Q,addTreeNode:J,updateSource:G,deleteSource:Z,deleteTreeNode:K,uploadDoc:ae,setFilter:P}=_o(),[R,U]=v.useState(!1),[$,de]=v.useState(null),[se,ve]=v.useState(null),[te,ce]=v.useState(null),[M,W]=v.useState(null),[ue,oe]=v.useState(!1),[Ce,E]=v.useState(!1),[Y,I]=v.useState(null),[le,be]=v.useState(!1),[je,Te]=v.useState(!1),[ut,fe]=v.useState(null),[zt,Yt]=v.useState(!1);v.useEffect(()=>{r&&D({library_id:r})},[r,D]),v.useEffect(()=>{u&&A(u)},[u,A]);const it=u!==null,We=v.useMemo(()=>it?_?[...k4(_.tree,h)].sort((Ze,dt)=>Ze.kind!==dt.kind?Ze.kind==="folder"?-1:1:Ze.name.localeCompare(dt.name)).map(Ze=>({type:"node",root:_,node:Ze})):[]:[...x].sort((dt,Pe)=>dt.kind!==Pe.kind?dt.kind==="folder"?-1:1:new Date(Pe.created_at).getTime()-new Date(dt.created_at).getTime()).map(dt=>({type:"root",root:dt,node:null})),[it,x,_,h]),ht=v.useMemo(()=>w==="all"?We:We.filter(re=>re.type==="root"||!re.node||re.node.kind==="folder"?!0:w==="indexed"?re.node.index_status==="indexed":re.node.index_status==="none"||!re.node.index_status),[We,w]),Mt=g?.type==="daemon",Aa=g?.type==="cloud",Jt=Mt&&!it,Vt=v.useMemo(()=>{if(!g)return[];const re=[{label:g.id===wl?n("sources.library.default_cloud_name"):g.name,to:`/studio/sources/${g.id}`}];return it&&_&&(re.push({label:_.name,to:`/studio/sources/${g.id}?rootId=${_.id}`}),h&&Dy(_.tree,h).forEach(Ze=>{re.push({label:Ze.name,to:`/studio/sources/${g.id}?rootId=${_.id}&path=${encodeURIComponent(Ze.path)}`})})),re},[g,it,_,h,n]),ya=v.useCallback(async re=>{if(r)try{it&&u?await J(u,{parent_path:h,kind:"folder",name:re}):(await Q({library_id:r,kind:"folder",name:re}),D({library_id:r})),U(!1),de(null)}catch(Ee){Ee instanceof br&&Ee.status===409&&de(n("sources.error.name_conflict",{name:re}))}},[r,it,u,h,Q,J,D,n]),ia=v.useCallback(re=>{r&&(re.type==="root"?re.root.kind==="source"?i(`/studio/source/${re.root.id}`):c({rootId:re.root.id}):re.node&&(re.node.kind==="folder"?c({rootId:re.root.id,path:re.node.path}):i(`/studio/source/${re.root.id}?path=${encodeURIComponent(re.node.path)}`)))},[r,i,c]),en=v.useCallback(()=>{if(!(!u||!r))if(h){const re=h.split("/");re.pop();const Ee=re.join("/");c(Ee?{rootId:u,path:Ee}:{rootId:u})}else c({})},[u,r,h,c]),tl=v.useCallback(async(re,Ee)=>{try{return await G(re,{name:Ee}),D({library_id:r}),null}catch(Ze){return Ze instanceof br&&Ze.status===409?n("sources.error.name_conflict",{name:Ee}):null}},[r,G,D,n]),Nn=v.useCallback(re=>{if(re.type==="root"){ce(re.root.id),W(null);const Ee=re.root.tree.length>0?Qu({children:re.root.tree}):void 0;ve(Mt?{type:"repo",name:re.root.name,libraryName:g.name,...Ee?{packageCount:Ee.codeSources,docCount:Ee.docSources,indexedCount:Ee.indexedSources}:{}}:{type:re.root.kind==="folder"?"folder":"resource",name:re.root.name,...re.root.kind==="folder"&&Ee?{folderCount:Ee.folders,sourceCount:Ee.sources,indexedCount:Ee.indexedSources}:{}})}else if(re.node)if(ce(re.root.id),W(re.node.path),re.node.kind==="folder"){const Ee=Qu(re.node);ve({type:"folder",name:re.node.name,folderCount:Ee.folders,sourceCount:Ee.sources,indexedCount:Ee.indexedSources})}else ve({type:"resource",name:re.node.name})},[Mt,g]),At=v.useCallback(async()=>{if(!(!te||!r)){try{M?await K(te,M):(await Z(te),D({library_id:r}))}catch{}ve(null),ce(null),W(null)}},[te,M,r,Z,K,D]),xa=v.useCallback(()=>{r&&i(`/studio/sources/import/${r}`)},[r,i]),La=v.useCallback(()=>{r&&i(`/studio/sources/import-dir/${r}`)},[r,i]),al=v.useCallback(async re=>{if(r){be(!0),I(null);try{const Ee={library_id:r,files:re.map(Ze=>{const dt={file_name:Ze.name,content:Ze.content};return Ze.encoding&&(dt.encoding=Ze.encoding),dt})};it&&u&&(Ee.root_source_id=u,Ee.parent_path=h),await ae(Ee),it&&u?A(u):D({library_id:r}),E(!1)}catch(Ee){Ee instanceof br&&Ee.status===409?I(n("sources.error.name_conflict",{name:re[0]?.name??""})):Ee instanceof br&&I(Ee.message)}finally{be(!1)}}},[r,it,u,h,ae,D,A,n]),Ga=g?.id===wl,ra=v.useCallback(async re=>{if(r)try{await m(r,re),Te(!1),fe(null)}catch(Ee){const Ze=Ee instanceof Error?Ee.message:String(Ee);fe(Ze)}},[r,m]),Wt=v.useCallback(()=>{Te(!1),fe(null)},[]),zl=v.useCallback(async()=>{if(r){try{await b(r),i("/studio/sources/add-client")}catch{}Yt(!1)}},[r,b,i]),ji=v.useCallback(()=>{Yt(!1)},[]);if(!g)return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})});const ka=x.length===0&&w==="all"&&!j&&!it,Lt=ht.filter(re=>re.type==="node"&&re.node?.kind==="source").length===0&&w==="indexed"&&!j,St=!Jt,Tt=Aa,Tl=Jt;return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("div",{className:"min-w-0 flex-1",children:je?f.jsx(My,{currentName:g.name,onConfirm:ra,onCancel:Wt,error:ut}):f.jsx(kr,{segments:Vt})}),f.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Tt&&f.jsxs(f.Fragment,{children:[f.jsx(Xu,{label:n("sources.actions.upload"),icon:f.jsx(sd,{size:14}),items:[{label:n("sources.actions.upload_doc"),icon:f.jsx(In,{size:14}),onClick:()=>E(!0)}]}),f.jsx(Xu,{label:n("sources.actions.add"),icon:f.jsx(wy,{size:14}),items:[{label:n("sources.actions.add_folder"),icon:f.jsx(Ny,{size:14}),onClick:()=>U(!0)},{label:n("sources.actions.add_web"),icon:f.jsx(E2,{size:14}),onClick:()=>oe(!0)},{label:n("sources.actions.add_feishu"),icon:f.jsx(u2,{size:14}),onClick:()=>oe(!0)}]}),f.jsxs("button",{onClick:()=>oe(!0),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsx(yg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo_url")})]})]}),Tl&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:La,disabled:!g.is_online,title:g.is_online?void 0:n("sources.import.daemon_offline",{name:g.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40 sm:px-2 sm:py-1",children:[f.jsx(y2,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_dir")})]}),f.jsxs("button",{onClick:xa,disabled:!g.is_online,title:g.is_online?void 0:n("sources.import.daemon_offline",{name:g.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40 sm:px-2 sm:py-1",children:[f.jsx(yg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo")})]}),f.jsx(Xu,{label:"",icon:f.jsx(rd,{size:14}),alignRight:!0,items:[{label:n("sources.library.rename"),icon:f.jsx(rd,{size:14}),onClick:()=>Te(!0)},...Ga?[]:[{label:n("sources.actions.delete"),icon:f.jsx(Ey,{size:14}),onClick:()=>Yt(!0)}]]})]}),St&&f.jsx(H4,{value:w,onChange:P})]})]}),ka?f.jsx(P4,{library:g,onNewFolder:()=>U(!0),...Mt?{onImportRepo:xa,onImportDir:La}:{},...Aa?{onUpgrade:()=>oe(!0)}:{}}):f.jsx(W4,{pathLabel:Vt.map(re=>re.label).join(" / "),loading:j,onNavigateUp:it?en:void 0,children:ht.length===0?Lt?f.jsx(I4,{}):it?null:f.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:n("common.items",{count:0})}):f.jsx("div",{className:"flex flex-col gap-0.5",children:ht.map(re=>{if(re.type==="root"){const Pe=re.root,Pt=Mt,tn=Pt?Pe.metadata?.local_path:void 0,va=Pe.tree.length>0?Qu({children:Pe.tree}):void 0,Ni=va?va.folders+va.sources:0;return f.jsx(Cg,{source:{id:Pe.id,library_id:Pe.library_id,owner_id:Pe.owner_id,path:"",kind:Pe.kind,source_type:Pe.source_type,name:Pe.name,content_hash:Pe.content_hash,metadata:Pe.metadata,index_status:Pe.index_status,created_at:Pe.created_at,updated_at:Pe.updated_at},...typeof tn=="string"?{displayName:tn}:{},...Pe.kind==="folder"?{childCount:Ni}:{},isDaemonLibrary:Mt??!1,isRepoRoot:Pt,onClick:()=>ia(re),onRename:nl=>tl(Pe.id,nl),onDelete:()=>Nn(re)},Pe.id)}const Ee=re.node,Ze=`${re.root.id}:${Ee.path}`,dt=Ee.kind==="folder"?Ee.children?.length??0:void 0;return f.jsx(Cg,{source:{id:re.root.id,library_id:re.root.library_id,owner_id:re.root.owner_id,path:Ee.path,kind:Ee.kind,source_type:Ee.source_type??null,name:Ee.name,content_hash:null,metadata:Ee.metadata??null,index_status:Ee.index_status??"none",created_at:re.root.created_at,updated_at:re.root.updated_at},...dt!==void 0?{childCount:dt}:{},isDaemonLibrary:Mt??!1,onClick:()=>ia(re),...Aa?{onDelete:()=>Nn(re)}:{}},Ze)})})}),R&&f.jsx(Q4,{onConfirm:ya,onCancel:()=>{U(!1),de(null)},error:$}),Ce&&f.jsx(J4,{onConfirm:al,onCancel:()=>{E(!1),I(null)},error:Y,uploading:le}),ue&&f.jsx(Z4,{onClose:()=>oe(!1)}),se&&f.jsx(Rg,{target:se,onConfirm:At,onCancel:()=>{ve(null),ce(null),W(null)}}),zt&&g&&f.jsx(Rg,{target:{type:"client",name:g.name},onConfirm:zl,onCancel:ji})]})}function Nr({active:n,current:i}){return f.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${i?"border-c4a-accent bg-c4a-accent":n?"border-c4a-accent bg-transparent":"border-c4a-border-default bg-transparent"}`})}function ud(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function Ly({libraryName:n}){const{t:i}=Re();return f.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[f.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:n})}),f.jsx(pa,{to:"/studio/sources/add-client",className:"mt-4 inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("sources.import.view_guide")})]})}function ky({step:n,totalSteps:i,importing:r,stepBusy:s,canProceed:c,safetyNoticeKey:u,confirmLabelKey:h,onPrev:p,onNext:g,onImport:m}){const{t:b}=Re();return f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-4 sm:mt-6",children:[f.jsx("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-c4a-text-muted line-clamp-1 sm:line-clamp-none",title:b(u),onClick:x=>x.currentTarget.classList.toggle("line-clamp-1"),children:b(u)}),f.jsxs("div",{className:"flex shrink-0 gap-2",children:[n>1&&f.jsx("button",{onClick:p,disabled:r||s,className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover disabled:opacity-40",children:b("common.previous")}),n<i?f.jsx("button",{onClick:g,disabled:!c||s,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:b("common.next")}):f.jsxs("button",{onClick:m,disabled:r||s||!c,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[r&&f.jsx(Zt,{size:12,className:"animate-spin"}),b(r?"sources.import.importing":h)]})]})]})}function Uy(n,i){const r=v.useCallback(async(h,p)=>{if(!n)throw new Error("No library");const g=await qt.post(`/libraries/${n}/rpc`,{method:h,params:p});if(g.error){const m=g.error;throw new Error(m.message??JSON.stringify(g.error))}return g.result??g},[n]),[s,c]=v.useState([]);v.useEffect(()=>{if(!n)return;let h=!1;return(async()=>{try{const p=await qt.get("/sources",{library_id:n,limit:"500"});if(h)return;const g=p.items.map(m=>{const b=m.metadata;return typeof b?.local_path=="string"?b.local_path:null}).filter(m=>m!==null);c(g)}catch{}})(),()=>{h=!0}},[n]);const u=v.useMemo(()=>{const h=i?.config;return!h||!Array.isArray(h.allowed_paths)?[]:h.allowed_paths},[i]);return{rpc:r,importedPaths:s,allowedPaths:u}}function Hy(){const{t:n}=Re(),[i,r]=v.useState(!1),[s,c]=v.useState(null),u=v.useRef(),h=v.useRef(),p=window.location.host,g=`c4a-daemon --server ${p} --allow <dir1> <dir2>`,m=`c4a-daemon --server ${p}`,b=v.useCallback((j,w)=>{navigator.clipboard.writeText(j),c(w),clearTimeout(u.current),u.current=setTimeout(()=>c(null),1500)},[]),x=v.useCallback(()=>{clearTimeout(h.current),r(!0)},[]),_=v.useCallback(()=>{h.current=setTimeout(()=>r(!1),150)},[]);return f.jsxs("span",{className:"relative",onMouseEnter:x,onMouseLeave:_,children:[f.jsx(Sd,{size:12,className:"text-c4a-warning"}),i&&f.jsxs("span",{className:"absolute left-full top-1/2 z-10 ml-2 -translate-y-1/2 rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-2 shadow-lg",onMouseEnter:x,onMouseLeave:_,children:[f.jsx("span",{className:"block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_restrict")}),f.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:g}),f.jsx("button",{onClick:()=>b(g,0),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===0?f.jsx(vi,{size:10}):f.jsx(xg,{size:10})})]}),f.jsx("span",{className:"mt-2 block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_all")}),f.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:m}),f.jsx("button",{onClick:()=>b(m,1),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===1?f.jsx(vi,{size:10}):f.jsx(xg,{size:10})})]})]})]})}function By({open:n,onClose:i,rpc:r,onNavigate:s,defaultPath:c}){const{t:u}=Re(),[h,p]=v.useState(c??""),[g,m]=v.useState(null),[b,x]=v.useState(!1),_=v.useRef(null);v.useEffect(()=>{c&&!h&&p(c)},[c]);const j=v.useCallback(async()=>{const D=h.trim();if(D){x(!0),m(null);try{(await r("fs/exists",{path:D})).exists?(s(D),p(c??""),m(null),i()):m(u("sources.import.wildcard_path_not_found"))}catch(A){m(A instanceof Error?A.message:String(A))}finally{x(!1)}}},[h,r,u,s,i]),w=v.useCallback(()=>{p(c??""),m(null),i()},[i,c]);return n?f.jsxs(Rl,{onClose:w,closeOnOverlay:!1,closeOnEsc:!1,overlayClass:"bg-black/40",className:"w-full max-w-md rounded-lg border border-c4a-border-default bg-c4a-bg-surface p-5 shadow-xl",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"font-mono text-sm font-medium text-c4a-text-primary",children:u("sources.import.wildcard_go_title")}),f.jsx("button",{onClick:w,className:"rounded p-1 text-c4a-text-muted transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-secondary",children:f.jsx(bo,{size:14})})]}),f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("input",{ref:_,type:"text",value:h,onChange:D=>{p(D.target.value),m(null)},onKeyDown:D=>{D.key==="Enter"&&j()},placeholder:u("sources.import.wildcard_path_placeholder"),autoFocus:!0,className:"flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent"}),f.jsxs("button",{onClick:j,disabled:b||!h.trim(),className:"flex shrink-0 items-center gap-1.5 rounded bg-c4a-accent px-3 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[b?f.jsx(Zt,{size:12,className:"animate-spin"}):f.jsx(_y,{size:12}),u("sources.import.wildcard_go")]})]}),g&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:g})]}):null}function qy(n){const i=n.match(/^[\w.-]+@([\w.-]+):([\w./-]+?)(?:\.git)?$/);if(i){const r=i[1],s=i[2];return{slug:s,repoUrl:`https://${r}/${s}`,host:r}}try{const r=new URL(n),s=r.hostname,c=r.pathname.replace(/^\//,"").replace(/\.git$/,"");return c?{slug:c,repoUrl:`https://${s}/${c}`,host:s}:null}catch{return null}}function t_(n,i){return`${n}/tree/${encodeURIComponent(i)}`}function a_(n,i){return`${n}/commit/${i}`}function Yy({rpc:n,allowedPaths:i,importedPaths:r,onNavigateUpExtra:s}){const c=!!i&&i.length>0,u=c&&i.length===1&&i[0]==="*",[h,p]=v.useState(c),[g,m]=v.useState(c&&!u?"":"/"),[b,x]=v.useState([]),[_,j]=v.useState(!1),[w,D]=v.useState(null),[A,Q]=v.useState(null);v.useEffect(()=>{if(c&&!u)return;let U=!1;return(async()=>{try{const $=await n("fs/homeDir",{});U||Q($.home_dir)}catch{U||Q("/")}})(),()=>{U=!0}},[c,u,n]);const[J,G]=v.useState(!1),Z=v.useCallback(async U=>{j(!0),D(null);try{const $=await n("fs/listTree",{path:U,depth:1});x($.entries||[]),m(U),p(!1)}catch($){const de=$ instanceof Error?$.message:String($);D(de)}finally{j(!1)}},[n]);v.useEffect(()=>{c&&!u||A!==null&&Z(A)},[A,c,u,Z]);const K=v.useMemo(()=>new Set(r??[]),[r]),ae=v.useCallback(()=>{if(c&&!u&&i.some(de=>de===g)){p(!0),m(""),x([]),D(null),s?.();return}const U=g.split("/").slice(0,-1).join("/")||"/";s?.(),Z(U)},[c,u,i,g,Z,s]),P=v.useMemo(()=>b.filter(U=>U.type==="directory"),[b]),R=v.useMemo(()=>b.filter(U=>U.type==="file"),[b]);return{atRoot:h,currentPath:g,entries:b,loading:_,error:w,homeDir:A,goToOpen:J,hasAllowedPaths:c,isWildcard:u,importedSet:K,dirs:P,files:R,loadTree:Z,handleNavigateUp:ae,setGoToOpen:G}}function n_({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:u}=Re(),[h,p]=v.useState(null),{atRoot:g,currentPath:m,entries:b,loading:x,error:_,homeDir:j,goToOpen:w,isWildcard:D,importedSet:A,dirs:Q,files:J,loadTree:G,handleNavigateUp:Z,setGoToOpen:K}=Yy({rpc:n,allowedPaths:s??[],importedPaths:c??[],onNavigateUpExtra:()=>p(null)}),[ae,P]=v.useState(null),[R,U]=v.useState(!1);v.useEffect(()=>{if(!i){P(null),U(!1);return}P(null),U(!0);let te=!1;return(async()=>{try{const ce=await n("fs/repoStatus",{path:i});te||(P({branch:ce.branch,hash:ce.head_hash,remoteUrl:ce.remote_url}),U(!1))}catch{te||(P(null),U(!1))}})(),()=>{te=!0}},[i,n]);const $=v.useMemo(()=>ae?.remoteUrl?qy(ae.remoteUrl):null,[ae?.remoteUrl]),de=v.useCallback(te=>{if(te.type==="directory")if(te.is_git_repo){if(A.has(te.path))return;p(null),r(te.path,te.name)}else p(te.path),G(te.path)},[r,G,A]),se=v.useMemo(()=>Q.sort((te,ce)=>te.is_git_repo&&!ce.is_git_repo?-1:!te.is_git_repo&&ce.is_git_repo?1:te.name.localeCompare(ce.name)),[Q]),ve=v.useMemo(()=>J.sort((te,ce)=>te.name.localeCompare(ce.name)),[J]);return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[g?f.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsx("span",{children:u("sources.import.allowed_dirs")}),f.jsx(Hy,{})]}):f.jsx("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:m}),i&&R?f.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs text-c4a-accent",children:[f.jsx(Zt,{size:12,className:"animate-spin"}),f.jsx("span",{children:u("common.loading")})]}):i&&ae?f.jsxs("div",{className:"flex min-w-0 shrink items-center gap-1.5 font-mono text-xs leading-none text-c4a-accent flex-wrap",children:[$?f.jsxs("a",{href:$.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 truncate hover:underline",title:$.repoUrl,children:[f.jsx(id,{size:12,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:$.slug})]}):f.jsxs("span",{className:"flex items-center gap-1 truncate",children:[f.jsx(id,{size:12,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:i.split("/").pop()||i})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),$?f.jsxs("a",{href:t_($.repoUrl,ae.branch),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",children:[f.jsx(uo,{size:10,className:"shrink-0"}),f.jsx("span",{children:ae.branch})]}):f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx(uo,{size:10,className:"shrink-0"}),f.jsx("span",{children:ae.branch})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),$?f.jsx("a",{href:a_($.repoUrl,ae.hash),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:ae.hash.slice(0,7)}):f.jsx("span",{children:ae.hash.slice(0,7)})]}):!i&&D&&g?f.jsx("button",{onClick:()=>K(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:u("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),g?D?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:j&&f.jsxs("button",{onClick:()=>G(j),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ta,{size:14,className:"shrink-0"}),f.jsxs("span",{className:"truncate",children:[j,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",u("sources.import.wildcard_home"),")"]})]}),f.jsx(_n,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:s.map(te=>f.jsxs("button",{onClick:()=>G(te),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ta,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:te}),f.jsx(_n,{size:12,className:"shrink-0 text-c4a-text-muted"})]},te))}):_&&!x?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:_}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[x&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Zt,{size:14,className:"animate-spin text-c4a-text-muted"})}),m!=="/"&&f.jsxs("button",{onClick:Z,disabled:x,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(Ta,{size:14}),f.jsx("span",{children:".."})]}),se.map(te=>{const ce=te.is_git_repo&&A.has(te.path),M=te.is_git_repo?_d:Ta;return f.jsxs("div",{className:`flex w-full items-center rounded pl-2 pr-4 text-left text-sm transition-colors ${ce?"cursor-not-allowed text-c4a-accent/60":i===te.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-accent/10 hover:text-c4a-accent"}`,children:[f.jsxs("button",{onClick:()=>de(te),disabled:ce||x,className:"flex flex-1 items-center gap-2 px-2 py-1.5",children:[f.jsx(M,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate text-left",children:te.name}),ce&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:u("sources.import.already_imported")})]}),!ce&&f.jsx("button",{onClick:W=>{W.stopPropagation(),G(te.path)},disabled:x,className:"shrink-0 rounded p-1.5 text-c4a-text-muted transition-colors hover:bg-c4a-accent/10 hover:text-c4a-accent disabled:pointer-events-none",title:te.path,children:f.jsx(_n,{size:12})})]},te.path)}),ve.map(te=>f.jsxs("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsx(jy,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:te.name})]},te.path)),b.length===0&&!x&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:u("sources.import.no_entries")})]}),h&&!i&&f.jsx("p",{className:"mt-3 text-xs text-c4a-warning",children:u("sources.import.not_git")}),f.jsx(By,{open:w,onClose:()=>K(!1),rpc:n,onNavigate:G,defaultPath:j??void 0})]})}function zg({value:n,options:i,onChange:r,icon:s,maxHeight:c="max-h-60"}){const[u,h]=v.useState(!1),p=v.useRef(null),g=v.useRef(null),m=v.useCallback(j=>{p.current&&!p.current.contains(j.target)&&h(!1)},[]);v.useEffect(()=>{if(u)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[u,m]);const b=v.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),h(!0)},[]),x=v.useCallback(()=>{g.current=setTimeout(()=>h(!1),150)},[]),_=i.find(j=>j.value===n);return f.jsxs("div",{ref:p,className:"relative",onMouseEnter:b,onMouseLeave:x,children:[f.jsxs("button",{onClick:()=>h(j=>!j),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[s,f.jsx("span",{className:"max-w-[200px] truncate",children:_?.label??n}),f.jsx(vo,{size:12,className:`shrink-0 transition-transform ${u?"rotate-180":""}`})]}),u&&f.jsx("div",{className:`absolute left-0 top-full z-20 mt-1 min-w-[180px] max-w-[360px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg ${c} c4a-scrollbar overflow-y-auto`,children:i.map(j=>f.jsxs("button",{onClick:()=>{r(j.value),h(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors hover:bg-c4a-bg-hover ${j.value===n?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[f.jsx(vi,{size:12,className:`shrink-0 ${j.value===n?"opacity-100":"opacity-0"}`}),f.jsx("span",{className:"truncate",children:j.label})]},j.value))})]})}const l_=/\.md$/i,Zu=100,i_=(n,i)=>{const r=n.toLowerCase();try{if(r.endsWith("package.json")){const s=JSON.parse(i);if(typeof s.name=="string"&&s.name.trim())return s.name.trim()}if(r.endsWith("pyproject.toml"))return i.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(r.endsWith("go.mod"))return i.match(/^\s*module\s+([^\s]+)\s*$/m)?.[1]??null;if(r.endsWith("cargo.toml"))return i.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(r.endsWith("pom.xml"))return i.match(/<artifactId>([^<]+)<\/artifactId>/)?.[1]?.trim()??null;if(r.endsWith("build.gradle"))return i.match(/rootProject\.name\s*=\s*["']([^"']+)["']/)?.[1]??null}catch{return null}return null};function r_({rpc:n,repoPath:i,onReady:r,onBusyChange:s}){const{t:c}=Re(),[u,h]=v.useState(""),[p,g]=v.useState([]),[m,b]=v.useState(""),[x,_]=v.useState([]),[j,w]=v.useState(!1),[D,A]=v.useState(!0),[Q,J]=v.useState(!1),[G,Z]=v.useState(!1),[K,ae]=v.useState([]),[P,R]=v.useState([]),[,U]=v.useState([]),[$,de]=v.useState(),se=v.useMemo(()=>$?qy($):null,[$]),[ve,te]=v.useState("packages"),[ce,M]=v.useState(Zu),W=v.useRef(null),ue=v.useRef(null);v.useEffect(()=>{if(!D){J(!1);return}const fe=setTimeout(()=>J(!0),2e3);return()=>clearTimeout(fe)},[D]),v.useEffect(()=>{M(Zu),ue.current?.scrollTo(0,0)},[ve]),v.useEffect(()=>{const fe=W.current;if(!fe)return;const zt=ve==="packages"?K.length:P.length;if(ce>=zt)return;const Yt=new IntersectionObserver(it=>{it[0]?.isIntersecting&&M(We=>Math.min(We+Zu,zt))},{root:ue.current,threshold:.1});return Yt.observe(fe),()=>Yt.disconnect()},[ve,ce,K.length,P.length]);const oe=v.useCallback(async(fe,zt)=>{Z(!0),s?.(!0);try{const Yt=await n("fs/repoScan",{path:i,hash:fe}),it=Yt.files||[],We=Yt.manifests||[];U(it);const ht=[];for(const Vt of We){const ya=Vt.path.split("/"),ia=ya.slice(0,-1).join("/")||".",en=ya.length===1||Vt.path==="package.json",tl=ia==="."?i.split("/").pop()||"root":ya[ya.length-2]||ia,Nn=i_(Vt.path,Vt.content);ht.push({name:Nn||tl,path:ia,isRoot:en})}const Mt=it.filter(Vt=>l_.test(Vt.path)).map(Vt=>Vt.path);R(Mt),ae(ht);const Aa=zt?.branch??u,Jt=zt?.isDirty??j;r({branch:Aa,commit:fe,isDirty:Jt,repoFiles:it,packages:ht,mdFiles:Mt,repoFileContents:We})}catch{}finally{Z(!1),s?.(!1)}},[n,i,u,j,r,s]);v.useEffect(()=>{(async()=>{A(!0),s?.(!0);try{const fe=await n("fs/repoStatus",{path:i});h(fe.branch),g(fe.branches||[fe.branch]),b(fe.head_hash),w(fe.is_dirty),de(fe.remote_url),_(fe.commits||[{hash:fe.head_hash,message:"HEAD"}]),await oe(fe.head_hash,{branch:fe.branch,isDirty:fe.is_dirty})}catch{}finally{A(!1),s?.(!1)}})()},[i]),v.useEffect(()=>{r({branch:u,commit:m,isDirty:j,packages:K,mdFiles:P,repoFileContents:[]})},[u,m,j]);const Ce=v.useCallback(async fe=>{h(fe);try{const zt=await n("fs/repoStatus",{path:i});b(zt.head_hash),await oe(zt.head_hash)}catch{}},[i,n,oe]),E=u&&u!=="main"&&u!=="master",Y=i.split("/").pop()||i;if(D)return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center",children:[f.jsx(Zt,{size:20,className:"animate-spin text-c4a-accent"}),Q&&f.jsx("p",{className:"mt-3 font-mono text-xs text-c4a-accent",children:c("sources.import.loading_repo_slow")})]});const I=p.map(fe=>({value:fe,label:fe})),le=x.map(fe=>({value:fe.hash,label:`${fe.hash.slice(0,7)} ${fe.message!=="HEAD"?`— ${fe.message.slice(0,50)}`:""}`.trim()})),be=x.length<=1,je=ve==="packages"?K:P,Te=je.slice(0,ce),ut=ce<je.length;return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[f.jsxs("div",{className:"shrink-0",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:[f.jsx("span",{className:"flex items-center gap-1.5",children:se?f.jsxs("a",{href:se.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 font-mono text-sm font-bold text-c4a-accent hover:underline",children:[f.jsx(id,{size:14,className:"shrink-0"}),Y]}):f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:Y})}),f.jsx("span",{className:"hidden font-mono text-xs text-c4a-text-muted sm:inline",children:i}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[f.jsx(zg,{value:u,options:I,onChange:Ce,icon:f.jsx(uo,{size:12})}),be?f.jsxs("span",{className:"hidden items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs text-c4a-text-muted sm:flex",children:[f.jsx(ld,{size:12}),m.slice(0,7)]}):f.jsx("div",{className:"hidden sm:block",children:f.jsx(zg,{value:m,options:le,onChange:fe=>{b(fe),oe(fe)},icon:f.jsx(ld,{size:12})})})]})]}),(E||j)&&f.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1",children:[E&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-info",children:[f.jsx(R2,{size:12}),c("sources.import.branch_warning",{branch:u})]}),j&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-warning",children:[f.jsx(Sd,{size:12}),c("sources.import.uncommitted_warning")]})]})]}),f.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface",children:[f.jsxs("div",{className:"flex shrink-0 items-center justify-between px-4 py-3",children:[f.jsx("p",{className:"hidden font-mono text-xs text-c4a-text-primary sm:block",children:G?f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Zt,{size:12,className:"animate-spin text-c4a-text-muted"}),f.jsx("span",{className:"text-c4a-text-muted",children:"Analyzing repository..."})]}):K.length>0?c("sources.import.recognized",{packages:K.length,docs:P.length}):c("sources.import.no_packages")}),!G&&(K.length>0||P.length>0)&&f.jsxs("div",{className:"flex rounded border border-c4a-border-subtle",children:[f.jsxs("button",{onClick:()=>te("packages"),className:`flex items-center gap-1 px-2.5 py-1 text-xs transition-colors ${ve==="packages"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(bi,{size:13}),f.jsx("span",{className:"font-mono",children:K.length})]}),f.jsxs("button",{onClick:()=>te("docs"),className:`flex items-center gap-1 border-l border-c4a-border-subtle px-2.5 py-1 text-xs transition-colors ${ve==="docs"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(In,{size:13}),f.jsx("span",{className:"font-mono",children:P.length})]})]})]}),f.jsx("hr",{className:"border-c4a-border-subtle"}),f.jsx("div",{ref:ue,className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto px-2 py-1",children:G?f.jsx("div",{className:"flex items-center justify-center py-8",children:f.jsx(Zt,{size:14,className:"animate-spin text-c4a-text-muted"})}):je.length===0?f.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:ve==="packages"?c("sources.import.no_packages"):"—"}):f.jsxs(f.Fragment,{children:[ve==="packages"?Te.map(fe=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(bi,{size:14,className:"shrink-0 text-c4a-accent"}),f.jsx("span",{className:"text-c4a-text-primary",children:fe.name}),f.jsx("span",{className:"hidden truncate text-c4a-text-muted sm:inline",children:fe.path}),fe.isRoot&&f.jsx("span",{className:"rounded bg-c4a-bg-active px-1 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:"root"})]},fe.path)):Te.map(fe=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(In,{size:14,className:"shrink-0 text-c4a-text-secondary"}),f.jsx("span",{className:"truncate text-c4a-text-primary",children:fe})]},fe)),ut&&f.jsx("div",{ref:W,className:"h-4"})]})})]})]})}function Sn({icon:n,label:i,value:r,tooltip:s,size:c="sm"}){const u=c==="sm";return f.jsxs("div",{className:"group/stat relative rounded border border-c4a-border-subtle bg-c4a-bg-base p-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-c4a-text-muted",children:[n,f.jsx("span",{className:"font-mono text-[10px] uppercase",children:i})]}),f.jsx("p",{className:`mt-1 font-mono font-bold text-c4a-text-primary ${u?"text-sm truncate":"text-lg"}`,title:u?String(r):void 0,children:r}),s&&f.jsx("div",{className:"pointer-events-none absolute bottom-full left-0 z-30 mb-1.5 hidden w-max max-w-[260px] rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-1.5 text-[11px] leading-relaxed text-c4a-text-secondary shadow-c4a-lg group-hover/stat:block",children:s})]})}function s_({importState:n,libraryName:i,importing:r}){const{t:s}=Re(),c=n.repoName||n.repoPath.split("/").pop()||"";return f.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[f.jsx("p",{className:"text-sm text-c4a-text-secondary",children:s("sources.import.confirm_heading",{name:i})}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-1",children:[f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:c}),f.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:n.repoPath})]}),f.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-4",children:[f.jsx(Sn,{icon:f.jsx(uo,{size:14}),label:s("sources.import.branch"),value:n.branch}),f.jsx(Sn,{icon:f.jsx(ld,{size:14}),label:s("sources.import.commit"),value:n.commit.slice(0,7)}),f.jsx(Sn,{icon:f.jsx(bi,{size:14}),label:s("sources.import.packages"),value:String(n.packages.length),tooltip:s("sources.import.dir_code_packages_tip")}),f.jsx(Sn,{icon:f.jsx(In,{size:14}),label:s("sources.import.documents"),value:String(n.mdFiles.length),tooltip:s("sources.import.dir_doc_files_tip")})]}),r&&f.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsx(Zt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:s("sources.import.importing")})]})]})}function o_(){const{t:n}=Re(),i=el(),{libId:r}=go(),c=Xt(_i(Lr)).find(U=>U.id===r),u=_o(U=>U.createSource),[h,p]=v.useState(1),[g,m]=v.useState(!1),[b,x]=v.useState(null),[_,j]=v.useState(!1),[w,D]=v.useState({repoPath:"",repoName:"",branch:"",branches:[],commit:"",commits:[],isDirty:!1,repoFiles:[],packages:[],mdFiles:[],repoFileContents:[]}),A=c?.is_online??!1,{rpc:Q,importedPaths:J,allowedPaths:G}=Uy(r,c),Z=v.useCallback((U,$)=>{D(de=>({...de,repoPath:U,repoName:$}))},[]),K=v.useCallback(U=>{D($=>({...$,...U}))},[]),ae=v.useCallback(async()=>{if(r){m(!0);try{const U=await u({library_id:r,repo_name:w.repoName,repo_root_path:w.repoPath,repo_branch:w.branch,repo_commit:w.commit,repo_files:w.repoFiles.map(de=>de.path),repo_file_contents:w.repoFileContents}),$=Array.isArray(U)?U[0]:U;$?.id?i(`/studio/sources/${r}?rootId=${$.id}`):i(`/studio/sources/${r}`)}catch(U){const $=U instanceof Error?U.message:String(U);x($),m(!1)}}},[r,w,u,i]),P=v.useMemo(()=>h===1?!!w.repoPath:h===2?!!w.commit:!0,[h,w]),R=v.useMemo(()=>c?[{label:c.id===wl?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.title")}]:[],[c,n]);return c?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsx("div",{className:"shrink-0",children:f.jsx(kr,{segments:R})}),f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsx(Nr,{active:h>=1,current:h===1}),f.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.select")}),f.jsx(ud,{}),f.jsx(Nr,{active:h>=2,current:h===2}),f.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.version")}),f.jsx(ud,{}),f.jsx(Nr,{active:h>=3,current:h===3}),f.jsx("span",{className:h===3?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.confirm")})]}),f.jsx("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:A?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(n_,{rpc:Q,selectedPath:w.repoPath,onSelect:Z,allowedPaths:G,importedPaths:J}),h===2&&f.jsx(r_,{rpc:Q,repoPath:w.repoPath,onReady:K,onBusyChange:j}),h===3&&f.jsx(s_,{importState:w,libraryName:c.name,importing:g})]}):f.jsx(Ly,{libraryName:c.name})}),A&&f.jsx(ky,{step:h,totalSteps:3,importing:g,stepBusy:_,canProceed:P,safetyNoticeKey:"sources.safety.notice.repo",confirmLabelKey:"sources.import.step.confirm",onPrev:()=>p(U=>U-1),onNext:()=>p(U=>U+1),onImport:ae}),b&&f.jsxs(Rl,{onClose:()=>x(null),className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-error",children:n("sources.import.error_title")}),f.jsx("p",{className:"mt-3 whitespace-pre-wrap break-all text-sm text-c4a-text-secondary",children:b}),f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsx("button",{onClick:()=>x(null),className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("common.confirm")})})]})]}):f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}const Tg=(n,i)=>{let r=0,s=0,c=0;const u=[],h=p=>{for(const g of p)if(g.type==="directory")s++,g.is_git_repo&&c++,g.children&&h(g.children);else if(r++,/\.md$/i.test(g.name)){const m=g.path.startsWith(i)?g.path.slice(i.length).replace(/^\//,""):g.name;u.push(m)}};return h(n),{files:r,dirs:s,gitRepos:c,mdFiles:u}};function c_({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:u}=Re(),{atRoot:h,currentPath:p,entries:g,loading:m,error:b,homeDir:x,goToOpen:_,isWildcard:j,importedSet:w,dirs:D,files:A,loadTree:Q,handleNavigateUp:J,setGoToOpen:G}=Yy({rpc:n,allowedPaths:s??[],importedPaths:c??[]}),Z=v.useCallback(R=>{if(R.type!=="directory"||w.has(R.path))return;const U=Tg(R.children||[],R.path);r(R.path,R.name,U),Q(R.path)},[r,Q,w]);v.useEffect(()=>{if(p&&!h&&g.length>=0&&!m){const R=p.split("/").pop()||p,U=Tg(g,p);r(p,R,U)}},[p,h,g,m,r]);const K=v.useMemo(()=>i?i.split("/").pop()||i:"",[i]),ae=v.useMemo(()=>D.sort((R,U)=>R.is_git_repo&&!U.is_git_repo?-1:!R.is_git_repo&&U.is_git_repo?1:R.name.localeCompare(U.name)),[D]),P=v.useMemo(()=>A.sort((R,U)=>R.name.localeCompare(U.name)),[A]);return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h?f.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsx("span",{children:u("sources.import.allowed_dirs")}),f.jsx(Hy,{})]}):f.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:p}),i?f.jsxs("p",{className:"flex shrink-0 items-center gap-2 font-mono text-xs text-c4a-accent",children:[f.jsx(Ta,{size:12}),f.jsx("span",{children:K})]}):j&&h?f.jsx("button",{onClick:()=>G(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:u("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),h?j?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:x&&f.jsxs("button",{onClick:()=>Q(x),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ta,{size:14,className:"shrink-0"}),f.jsxs("span",{className:"truncate",children:[x,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",u("sources.import.wildcard_home"),")"]})]}),f.jsx(_n,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:s.map(R=>f.jsxs("button",{onClick:()=>Q(R),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ta,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:R}),f.jsx(_n,{size:12,className:"shrink-0 text-c4a-text-muted"})]},R))}):b&&!m?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:b}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[m&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Zt,{size:14,className:"animate-spin text-c4a-text-muted"})}),p!=="/"&&f.jsxs("button",{onClick:J,disabled:m,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(Ta,{size:14}),f.jsx("span",{children:".."})]}),ae.map(R=>{const U=w.has(R.path),$=R.is_git_repo?_d:Ta;return f.jsxs("button",{onClick:()=>Z(R),disabled:U||m,className:`flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm transition-colors ${U?"cursor-not-allowed text-c4a-accent/60":i===R.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[f.jsx($,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:R.name}),U&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:u("sources.import.already_imported")}),f.jsx(_n,{size:12,className:"shrink-0 text-c4a-text-muted"})]},R.path)}),P.map(R=>f.jsxs("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsx(jy,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:R.name})]},R.path)),g.length===0&&!m&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:u("sources.import.no_entries")})]}),f.jsx(By,{open:_,onClose:()=>G(!1),rpc:n,onNavigate:Q,defaultPath:x??void 0})]})}const u_=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),d_=n=>{let i=0,r=0,s=0,c=0,u=0;const h=new Set;for(const p of n)if(p.type==="directory")r++,p.is_git_repo&&u++;else{i++,p.path.toLowerCase().endsWith(".md")&&c++;const m=p.path.split("/").pop();if(m&&u_.has(m.toLowerCase())){const b=p.path.split("/").slice(0,-1).join("/");n.some(_=>_.type==="directory"&&_.is_git_repo&&(b===_.path||b.startsWith(`${_.path}/`)))||h.add(b)}}return s=h.size,{totalFiles:i,totalDirs:r,codePackages:s,docFiles:c,gitRepos:u}};function f_({dirPath:n,rpc:i,importing:r,onScanComplete:s,onBusyChange:c}){const{t:u}=Re(),[h,p]=v.useState(!1),[g,m]=v.useState(null),[b,x]=v.useState(null),_=v.useCallback(async()=>{p(!0),c?.(!0),m(null),x(null);try{const j=await i("fs/dirScan",{path:n}),w=j.entries||[],D=j.manifests||[],A=d_(w);x(A),s(w,A,D)}catch(j){const w=j instanceof Error?j.message:String(j);m(w)}finally{p(!1),c?.(!1)}},[n,i,s,c]);return v.useEffect(()=>{_()},[_]),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[f.jsx("p",{className:"shrink-0 font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("div",{className:"mt-3 shrink-0 border-t border-c4a-border-subtle"}),f.jsxs("div",{className:"c4a-scrollbar min-h-0 flex-1 overflow-y-auto",children:[h&&f.jsxs("div",{className:"mt-6 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-4",children:[f.jsx(Zt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:u("sources.import.dir_scanning")})]}),g&&f.jsxs("div",{className:"mt-6",children:[f.jsxs("p",{className:"flex items-start gap-2 text-xs text-c4a-error",children:[f.jsx(Sd,{size:14,className:"mt-0.5 shrink-0"}),u("sources.import.dir_scan_error")]}),f.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:g}),f.jsxs("button",{onClick:_,className:"mt-3 flex items-center gap-1.5 rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx($2,{size:12}),u("sources.import.dir_scan_retry")]})]}),b&&!h&&!g&&f.jsxs("div",{className:"mt-6 space-y-3",children:[f.jsxs("p",{className:"font-mono text-sm uppercase text-c4a-accent",children:[u("sources.import.dir_scan_complete"),"!"]}),f.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[f.jsx(Sn,{icon:f.jsx(In,{size:14}),label:u("sources.import.dir_doc_files"),value:b.docFiles,tooltip:u("sources.import.dir_doc_files_tip"),size:"lg"}),f.jsx(Sn,{icon:f.jsx(bi,{size:14}),label:u("sources.import.dir_code_packages"),value:b.codePackages,tooltip:u("sources.import.dir_code_packages_tip"),size:"lg"}),b.gitRepos>0&&f.jsx(Sn,{icon:f.jsx(_d,{size:14}),label:u("sources.import.dir_git_repos"),value:b.gitRepos,size:"lg"}),f.jsx(Sn,{icon:f.jsx(Ta,{size:14}),label:u("sources.import.dir_total_dirs"),value:b.totalDirs,size:"lg"}),f.jsx(Sn,{icon:f.jsx(m2,{size:14}),label:u("sources.import.dir_total_files"),value:b.totalFiles,size:"lg"})]}),b.gitRepos>0&&f.jsx("p",{className:"text-xs text-c4a-warning",children:u("sources.import.dir_git_skip_hint",{count:b.gitRepos})})]}),r&&f.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsx(Zt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:u("sources.import.importing")})]})]})]})}function h_(){const{t:n}=Re(),i=el(),{libId:r}=go(),c=Xt(_i(Lr)).find(U=>U.id===r),u=_o(U=>U.createSource),[h,p]=v.useState(1),[g,m]=v.useState(!1),[b,x]=v.useState(null),[_,j]=v.useState(!1),[w,D]=v.useState({dirPath:"",dirName:"",fileCount:0,subDirCount:0,gitRepoCount:0,mdFiles:[],scanEntries:[],scanStats:null,manifests:[]}),A=c?.is_online??!1,{rpc:Q,importedPaths:J,allowedPaths:G}=Uy(r,c),Z=v.useCallback((U,$,de)=>{D(se=>({...se,dirPath:U,dirName:$,fileCount:de.files,subDirCount:de.dirs,gitRepoCount:de.gitRepos,mdFiles:de.mdFiles}))},[]),K=v.useCallback((U,$,de)=>{D(se=>({...se,scanEntries:U,scanStats:$,manifests:de}))},[]),ae=v.useCallback(async()=>{if(r){m(!0);try{const U=await u({library_id:r,dir_files:w.scanEntries,dir_name:w.dirName,dir_path:w.dirPath,dir_file_contents:w.manifests}),$=Array.isArray(U)?U[0]:U;$?.id?i(`/studio/sources/${r}?rootId=${$.id}`):i(`/studio/sources/${r}`)}catch(U){const $=U instanceof Error?U.message:String(U);x($),m(!1)}}},[r,w,u,i]),P=v.useMemo(()=>h===1?!!w.dirPath:h===2?w.scanEntries.length>0:!0,[h,w]),R=v.useMemo(()=>c?[{label:c.id===wl?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.dir_title")}]:[],[c,n]);return c?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsx("div",{className:"shrink-0",children:f.jsx(kr,{segments:R})}),f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsx(Nr,{active:h>=1,current:h===1}),f.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.select")}),f.jsx(ud,{}),f.jsx(Nr,{active:h>=2,current:h===2}),f.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.confirm")})]}),f.jsx("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:A?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(c_,{rpc:Q,selectedPath:w.dirPath,onSelect:Z,allowedPaths:G,importedPaths:J}),h===2&&f.jsx(f_,{dirPath:w.dirPath,rpc:Q,importing:g,onScanComplete:K,onBusyChange:j})]}):f.jsx(Ly,{libraryName:c.name})}),A&&f.jsx(ky,{step:h,totalSteps:2,importing:g,stepBusy:_,canProceed:P,safetyNoticeKey:"sources.safety.notice.dir",confirmLabelKey:"sources.import.dir_step.confirm",onPrev:()=>p(U=>U-1),onNext:()=>p(U=>U+1),onImport:ae}),b&&f.jsxs(Rl,{onClose:()=>x(null),className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-error",children:n("sources.import.error_title")}),f.jsx("p",{className:"mt-3 whitespace-pre-wrap break-all text-sm text-c4a-text-secondary",children:b}),f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsx("button",{onClick:()=>x(null),className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("common.confirm")})})]})]}):f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}function m_(){const{t:n}=Re(),i=el(),r=Xt(_=>_.createLibrary),[s,c]=v.useState("waiting"),[u,h]=v.useState(null),[p,g]=v.useState(""),[m,b]=v.useState(!1);v.useEffect(()=>Ia.on("ws:daemon:connected",j=>{const w=j;h(w),g(w.machine_id),c(w.needs_registration?"new_client":"reconnected")}),[]),v.useEffect(()=>{let _=!1;return(async()=>{try{const j=await qt.get("/daemons/pending");if(_||j.pending.length===0)return;const w=j.pending[0];h({machine_id:w.machine_id,needs_registration:!0}),g(w.machine_id),c("new_client")}catch{}})(),()=>{_=!0}},[]);const x=v.useCallback(async()=>{if(u){b(!0);try{const _=await r({type:"daemon",name:p||u.machine_id,config:{machine_id:u.machine_id,os:u.os||"",daemon_version:u.daemon_version||""}});i(`/studio/sources/${_.id}`)}catch{b(!1)}}},[u,p,r,i]);return f.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsx(kr,{segments:[{label:n("sources.add_client.title")}]}),f.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:n("sources.add_client.description")}),f.jsx("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:f.jsxs("ol",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["1. ",n("sources.add_client.step1")]}),f.jsx("pre",{className:"mt-1 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:"npm install -g @c4a/daemon"})]}),f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["2. ",n("sources.add_client.step2")]}),f.jsx("pre",{className:"mt-1 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:`c4a-daemon --server ${window.location.host}`})]}),f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["3. ",n("sources.add_client.step3")]}),f.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:n("sources.add_client.step3_desc")})]})]})}),f.jsxs("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:[s==="waiting"&&f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Zt,{size:16,className:"animate-spin text-c4a-warning"}),f.jsx("span",{className:"text-sm text-c4a-warning",children:n("sources.add_client.waiting")})]}),s==="new_client"&&u&&f.jsxs("div",{className:"space-y-4",children:[f.jsx("h3",{className:"font-mono text-sm font-bold text-c4a-accent",children:n("sources.add_client.detected")}),f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsx(Fu,{label:n("sources.add_client.machine_name"),value:u.machine_id}),u.os&&f.jsx(Fu,{label:n("sources.add_client.os"),value:u.os}),u.daemon_version&&f.jsx(Fu,{label:n("sources.add_client.daemon_version"),value:u.daemon_version})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n("sources.add_client.client_name")}),f.jsx("input",{value:p,onChange:_=>g(_.target.value),className:"min-w-0 flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent"})]}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsx("button",{onClick:()=>i("/studio/sources"),className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:n("common.cancel")}),f.jsxs("button",{onClick:x,disabled:m||!p.trim(),className:"flex items-center gap-1.5 rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-50",children:[m&&f.jsx(Zt,{size:12,className:"animate-spin"}),n("sources.add_client.confirm")]})]})]}),s==="reconnected"&&u&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(vi,{size:16,className:"text-c4a-success"}),f.jsx("span",{className:"text-sm text-c4a-text-primary",children:n("sources.add_client.reconnected",{name:u.machine_id})})]}),u.lib_id&&f.jsx(pa,{to:`/studio/sources/${u.lib_id}`,className:"inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.add_client.go_to",{name:u.machine_id})})]})]})]})}function Fu({label:n,value:i}){return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("span",{className:"font-mono text-xs text-c4a-text-primary",children:i})]})}function p_(){const{t:n}=Re(),{sourceUuid:i}=go(),[r]=by(),s=r.get("path")||"",{currentRoot:c,loading:u,fetchRootSource:h}=_o(),p=Xt(_i(Lr)),[g,m]=v.useState("original");v.useEffect(()=>{i&&h(i)},[i,h]);const b=v.useMemo(()=>c?s?So(c.tree,s):c.kind==="source"?{path:"",kind:c.kind,source_type:c.source_type,name:c.name,metadata:c.metadata,index_status:c.index_status}:null:null,[c,s]),x=p.find(G=>G.id===c?.library_id),_=b?.metadata,j=_?Object.fromEntries(Object.entries(_).map(([G,Z])=>[G,String(Z??"")])):null,w=b?.source_type==="code",D=b?.name??c?.name??"",A=b?.source_type??null,Q=v.useMemo(()=>{if(!c||!x)return[];const G=c.kind==="source"&&!s,Z=[{label:x.id===wl?n("sources.library.default_cloud_name"):x.name,to:`/studio/sources/${x.id}`},{label:c.name,...G?{}:{to:`/studio/sources/${x.id}?rootId=${c.id}`}}];if(s){const K=Dy(c.tree,s);for(let ae=0;ae<K.length-1;ae++){const P=K[ae];Z.push({label:P.name,to:`/studio/sources/${x.id}?rootId=${c.id}&path=${encodeURIComponent(P.path)}`})}K.length>0&&Z.push({label:K[K.length-1].name})}return Z},[c,x,s,n]),J=[{key:"original",label:n(w?"sources.detail.tab.overview":"sources.detail.tab.original")},{key:"digest",label:n("sources.detail.tab.digest")},{key:"modeling",label:n("sources.detail.tab.modeling")}];return u||!c||!b?f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})}):f.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsx(kr,{segments:Q}),f.jsxs("div",{className:"mt-4 flex flex-wrap items-baseline gap-x-6 gap-y-2",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[w?f.jsx(bi,{size:20,className:"shrink-0 text-c4a-accent"}):f.jsx(In,{size:20,className:"shrink-0 text-c4a-accent"}),f.jsx("h1",{className:"min-w-0 break-all font-mono text-xl font-bold leading-none text-c4a-text-primary",children:D})]}),f.jsxs("div",{className:"flex flex-wrap items-baseline gap-4 text-xs text-c4a-text-muted",children:[f.jsxs("span",{children:[n("sources.detail.type"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:n(A==="code"?"sources.type.code":"sources.type.doc")})]}),w&&j?.relative_path&&f.jsxs("span",{children:[n("sources.detail.path"),":"," ",f.jsx("span",{className:"font-mono text-c4a-text-secondary",children:j.relative_path})]}),!w&&f.jsxs("span",{children:[n("sources.detail.origin"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:x?.type==="daemon"?n("sources.detail.origin.local"):n("sources.detail.origin.upload")})]}),f.jsxs("span",{children:[n("sources.detail.status"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:n(`sources.status.${b.index_status??"none"}`)})]})]})]}),w&&j&&f.jsx("div",{className:"mt-4 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:f.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-xs md:grid-cols-4",children:[j.repo_name&&f.jsx(ao,{label:n("sources.detail.repo"),value:j.repo_name}),j.pinned_branch&&f.jsx(ao,{label:n("sources.detail.branch"),value:j.pinned_branch}),j.pinned_hash&&f.jsx(ao,{label:n("sources.detail.commit"),value:j.pinned_hash.slice(0,7)}),j.tech_stack&&f.jsx(ao,{label:n("sources.detail.tech_stack"),value:j.tech_stack})]})}),f.jsx("div",{className:"mt-3 flex border-b border-c4a-border-subtle",children:J.map(G=>f.jsx("button",{onClick:()=>m(G.key),className:`border-b-2 px-4 py-2 font-mono text-xs uppercase transition-colors ${g===G.key?"border-c4a-accent text-c4a-accent":"border-transparent text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:G.label},G.key))}),f.jsxs("div",{className:"mt-4 flex-1",children:[g==="original"&&f.jsx(g_,{node:b,isCode:w}),g==="digest"&&f.jsx(Og,{message:n("sources.detail.digest_placeholder")}),g==="modeling"&&f.jsx(Og,{message:n("sources.detail.modeling_placeholder")})]})]})}function ao({label:n,value:i}){return f.jsxs("div",{children:[f.jsx("span",{className:"text-c4a-text-muted",children:n}),f.jsx("p",{className:"mt-0.5 font-mono text-c4a-text-primary",children:i})]})}function g_({node:n,isCode:i}){const{t:r}=Re(),s=n.metadata;return i?f.jsxs("div",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[!!s?.description&&f.jsx("p",{children:String(s.description)}),!!s?.dependencies&&f.jsxs("div",{children:[f.jsx("h4",{className:"font-mono text-xs font-bold uppercase text-c4a-text-primary",children:r("sources.detail.dependencies")}),f.jsx("div",{className:"mt-2 rounded bg-c4a-bg-surface p-3 font-mono text-xs",children:Object.entries(s.dependencies).map(([c,u])=>f.jsxs("div",{className:"flex justify-between py-0.5",children:[f.jsx("span",{className:"text-c4a-text-primary",children:c}),f.jsx("span",{className:"text-c4a-text-muted",children:u})]},c))})]}),!s?.description&&!s?.dependencies&&f.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_code_placeholder")})]}):f.jsx("div",{className:"prose prose-invert max-w-none text-sm text-c4a-text-secondary",children:f.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_doc_placeholder")})})}function Og({message:n}){return f.jsx("div",{className:"flex items-center justify-center rounded border border-dashed border-c4a-border-subtle p-12",children:f.jsx("p",{className:"text-center text-sm text-c4a-text-muted",children:n})})}const y_=wS([{element:f.jsx(y4,{}),children:[{path:"/",element:f.jsx(_4,{})},{path:"/login",element:f.jsx(j4,{})},{path:"/docs",element:f.jsx(N4,{})}]},{path:"/studio",element:f.jsx(S4,{}),children:[{index:!0,element:f.jsx(fg,{to:"/studio/sources",replace:!0})},{path:"sources",element:f.jsx(fg,{to:`/studio/sources/${wl}`,replace:!0})},{path:"sources/add-client",element:f.jsx(m_,{})},{path:"sources/import/:libId",element:f.jsx(o_,{})},{path:"sources/import-dir/:libId",element:f.jsx(h_,{})},{path:"sources/:libId",element:f.jsx(e_,{})},{path:"source/:sourceUuid",element:f.jsx(p_,{})},{path:"modeling",element:f.jsx(E4,{})},{path:"modeling/code/setup",element:f.jsx(D4,{})},{path:"modeling/code/compile",element:f.jsx(M4,{})},{path:"modeling/code/review",element:f.jsx(A4,{})},{path:"modeling/code/result",element:f.jsx(L4,{})},{path:"brain",element:f.jsx(C4,{})},{path:"discovery",element:f.jsx(R4,{})},{path:"sharing",element:f.jsx(z4,{})},{path:"collaboration",element:f.jsx(T4,{})},{path:"settings",element:f.jsx(O4,{})}]},{path:"*",element:f.jsx(w4,{})}]);function x_(){return v.useEffect(()=>{const i=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return Ia.connect(i),()=>{Ia.disconnect()}},[]),f.jsx(W1,{router:y_})}db.createRoot(document.getElementById("root")).render(f.jsx(v.StrictMode,{children:f.jsx(x_,{})}));
|