@c4a/server-cli 0.4.11 → 0.4.12-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/index.js +795 -3402
  2. package/package.json +1 -1
  3. package/serve.js +3223 -4193
  4. package/web/assets/index--UyZtsHr.js +238 -0
  5. package/web/assets/index-15FuETM5.js +238 -0
  6. package/web/assets/index-1O90ZcBt.js +238 -0
  7. package/web/assets/index-2ZaXHlEm.js +12 -0
  8. package/web/assets/index-5SgaIe6K.js +238 -0
  9. package/web/assets/index-69TE-Dt9.js +238 -0
  10. package/web/assets/index-6qWMAJjW.js +12 -0
  11. package/web/assets/index-8bavzcKH.js +238 -0
  12. package/web/assets/index-B2JcVRax.js +238 -0
  13. package/web/assets/index-B3a1j3cz.js +238 -0
  14. package/web/assets/index-B6EqO_Cg.js +12 -0
  15. package/web/assets/index-B7OJ5sV_.js +238 -0
  16. package/web/assets/index-B9YWtkC-.js +12 -0
  17. package/web/assets/index-BD162a_1.js +238 -0
  18. package/web/assets/index-BF50bkqY.css +1 -0
  19. package/web/assets/index-BPMcNaXa.css +1 -0
  20. package/web/assets/index-BPlwhwPb.css +1 -0
  21. package/web/assets/index-BW9aouHt.js +238 -0
  22. package/web/assets/index-BbZvxZvZ.css +1 -0
  23. package/web/assets/index-BkYFml7g.css +1 -0
  24. package/web/assets/index-Bnn0CunM.js +238 -0
  25. package/web/assets/index-BosC7CbW.css +1 -0
  26. package/web/assets/index-BrJa-9jA.css +1 -0
  27. package/web/assets/index-C63Z-8cw.js +238 -0
  28. package/web/assets/index-C6ydhyiL.js +238 -0
  29. package/web/assets/index-CAXoXe3-.css +1 -0
  30. package/web/assets/index-CDG7D9Wo.css +1 -0
  31. package/web/assets/index-CNruo9jb.js +238 -0
  32. package/web/assets/index-CUGq5bZG.js +12 -0
  33. package/web/assets/index-CVB_F0xd.js +238 -0
  34. package/web/assets/index-CVct6UjO.css +1 -0
  35. package/web/assets/index-CX2QKHgP.js +12 -0
  36. package/web/assets/index-Cok56quU.css +1 -0
  37. package/web/assets/index-Ct-X2M8U.js +12 -0
  38. package/web/assets/index-CtnVCeI7.css +1 -0
  39. package/web/assets/index-Cu6ttPtz.js +12 -0
  40. package/web/assets/index-CvTLDILA.css +1 -0
  41. package/web/assets/index-D0x9zuj2.js +238 -0
  42. package/web/assets/index-D3-qG0Hp.js +238 -0
  43. package/web/assets/index-D3UsEQTE.css +1 -0
  44. package/web/assets/index-D5WvCk3U.js +238 -0
  45. package/web/assets/index-D6QqUdMz.css +1 -0
  46. package/web/assets/index-D7EkgIsu.js +12 -0
  47. package/web/assets/index-DB_YWOXK.js +12 -0
  48. package/web/assets/index-DBaysFVi.css +1 -0
  49. package/web/assets/index-DGYdHfUt.js +238 -0
  50. package/web/assets/index-DIzfj2PR.css +1 -0
  51. package/web/assets/index-DJiYLRIW.css +1 -0
  52. package/web/assets/index-DQcztEye.js +238 -0
  53. package/web/assets/index-DSnxWXVs.css +1 -0
  54. package/web/assets/index-DX1UQEJF.css +1 -0
  55. package/web/assets/index-DgtV8nwc.js +238 -0
  56. package/web/assets/index-DqdyIshw.js +12 -0
  57. package/web/assets/index-DyF2kEj9.js +238 -0
  58. package/web/assets/index-H6Rs5Fbq.js +12 -0
  59. package/web/assets/index-O5LI2GNV.js +238 -0
  60. package/web/assets/index-SnFvyzm_.css +1 -0
  61. package/web/assets/index-bnfl0N-T.css +1 -0
  62. package/web/assets/index-cMgxghVE.css +1 -0
  63. package/web/assets/index-dDuVahj-.js +12 -0
  64. package/web/assets/index-fG23cf-l.js +238 -0
  65. package/web/assets/index-it-5oMch.css +1 -0
  66. package/web/assets/index-yq497d-W.js +12 -0
  67. package/web/index.html +2 -2
@@ -0,0 +1,12 @@
1
+ function Gv(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 d=Object.getOwnPropertyDescriptor(s,c);d&&Object.defineProperty(n,c,d.get?d:{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 d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function r(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function s(c){if(c.ep)return;c.ep=!0;const d=r(c);fetch(c.href,d)}})();function $v(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ru={exports:{}},cr={};var ip;function Kv(){if(ip)return cr;ip=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(s,c,d){var h=null;if(d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),"key"in c){d={};for(var p in c)p!=="key"&&(d[p]=c[p])}else d=c;return c=d.ref,{$$typeof:n,type:s,key:h,ref:c!==void 0?c:null,props:d}}return cr.Fragment=i,cr.jsx=r,cr.jsxs=r,cr}var rp;function Xv(){return rp||(rp=1,Ru.exports=Kv()),Ru.exports}var f=Xv();const ze=n=>typeof n=="string",ur=()=>{let n,i;const r=new Promise((s,c)=>{n=s,i=c});return r.resolve=n,r.reject=i,r},sp=n=>n==null?"":""+n,Qv=(n,i,r)=>{n.forEach(s=>{i[s]&&(r[s]=i[s])})},Zv=/###/g,op=n=>n&&n.indexOf("###")>-1?n.replace(Zv,"."):n,cp=n=>!n||ze(n),vr=(n,i,r)=>{const s=ze(i)?i.split("."):i;let c=0;for(;c<s.length-1;){if(cp(n))return{};const d=op(s[c]);!n[d]&&r&&(n[d]=new r),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++c}return cp(n)?{}:{obj:n,k:op(s[c])}},up=(n,i,r)=>{const{obj:s,k:c}=vr(n,i,Object);if(s!==void 0||i.length===1){s[c]=r;return}let d=i[i.length-1],h=i.slice(0,i.length-1),p=vr(n,h,Object);for(;p.obj===void 0&&h.length;)d=`${h[h.length-1]}.${d}`,h=h.slice(0,h.length-1),p=vr(n,h,Object),p?.obj&&typeof p.obj[`${p.k}.${d}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${d}`]=r},Fv=(n,i,r,s)=>{const{obj:c,k:d}=vr(n,i,Object);c[d]=c[d]||[],c[d].push(r)},io=(n,i)=>{const{obj:r,k:s}=vr(n,i);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},Jv=(n,i,r)=>{const s=io(n,r);return s!==void 0?s:io(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},Sl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Wv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Pv=n=>ze(n)?n.replace(/[&<>"'\/]/g,i=>Wv[i]):n;class Iv{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 e0=[" ",",","?","!",";"],t0=new Iv(20),a0=(n,i,r)=>{i=i||"",r=r||"";const s=e0.filter(h=>i.indexOf(h)<0&&r.indexOf(h)<0);if(s.length===0)return!0;const c=t0.getRegExp(`(${s.map(h=>h==="?"?"\\?":h).join("|")})`);let d=!c.test(n);if(!d){const h=n.indexOf(r);h>0&&!c.test(n.substring(0,h))&&(d=!0)}return d},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 d=0;d<s.length;){if(!c||typeof c!="object")return;let h,p="";for(let g=d;g<s.length;++g)if(g!==d&&(p+=r),p+=s[g],h=c[p],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&g<s.length-1)continue;d+=g-d+1;break}c=h}return c},_r=n=>n?.replace("_","-"),n0={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 ro{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||n0,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 ro(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new ro(this.logger,i)}}var Wa=new ro;class uo{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,d])=>{for(let h=0;h<d;h++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,d])=>{for(let h=0;h<d;h++)c.apply(c,[i,...r])})}}class dp extends uo{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 d=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)&&d?p.push(...s.split(d)):p.push(s)));const g=io(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,d)}addResource(i,r,s,c,d={silent:!1}){const h=d.keySeparator!==void 0?d.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),up(this.data,p,c),d.silent||this.emit("added",i,r,s,c)}addResources(i,r,s,c={silent:!1}){for(const d in s)(ze(s[d])||Array.isArray(s[d]))&&this.addResource(i,r,d,s[d],{silent:!0});c.silent||this.emit("added",i,r,s)}addResourceBundle(i,r,s,c,d,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=io(this.data,p)||{};h.skipCopy||(s=JSON.parse(JSON.stringify(s))),c?Dg(g,s,d):g={...g,...s},up(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(d=>{i=this.processors[d]?.process(i,r,s,c)??i}),i}};const Ag=Symbol("i18next/PATH_KEY");function l0(){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(l0());return r.join(i?.keySeparator??".")}const fp={},zu=n=>!ze(n)&&typeof n!="boolean"&&typeof n!="number";class so extends uo{constructor(i,r={}){super(),Qv(["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 d=zu(c.res);return!(s.returnObjects===!1&&d)}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 d=r.ns||this.options.defaultNS||[];const h=s&&i.indexOf(s)>-1,p=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!a0(i,s,c);if(h&&!p){const g=i.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:i,namespaces:ze(d)?[d]:d};const m=i.split(s);(s!==c||s===c&&this.options.ns.indexOf(m[0])>-1)&&(d=m.shift()),i=m.join(c)}return{key:i,namespaces:ze(d)?[d]:d}}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 d=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 _?d?{res:`${m}${b}${p}`,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(c)}:`${m}${b}${p}`:d?{res:p,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(c)}:p;const j=this.resolve(i,c);let R=j?.res;const D=j?.usedKey||p,k=j?.exactUsedKey||p,W=["[object Number]","[object Function]","[object RegExp]"],V=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,Q=!this.i18nFormat||this.i18nFormat.handleAsObject,re=c.count!==void 0&&!ze(c.count),ae=so.hasDefaultValue(c),P=re?this.pluralResolver.getSuffix(x,c.count,c):"",Y=c.ordinal&&re?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",N=re&&!c.ordinal&&c.count===0,K=N&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${P}`]||c[`defaultValue${Y}`]||c.defaultValue;let X=R;Q&&!R&&ae&&(X=K);const de=zu(X),ie=Object.prototype.toString.apply(X);if(Q&&X&&de&&W.indexOf(ie)<0&&!(ze(V)&&Array.isArray(X))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const I=this.options.returnedObjectHandler?this.options.returnedObjectHandler(D,X,{...c,ns:g}):`key '${p} (${this.language})' returned an object instead of string.`;return d?(j.res=I,j.usedParams=this.getUsedParamsDetails(c),j):I}if(h){const I=Array.isArray(X),le=I?[]:{},me=I?k:D;for(const M in X)if(Object.prototype.hasOwnProperty.call(X,M)){const J=`${me}${h}${M}`;ae&&!R?le[M]=this.translate(J,{...c,defaultValue:zu(K)?K[M]:void 0,joinArrays:!1,ns:g}):le[M]=this.translate(J,{...c,joinArrays:!1,ns:g}),le[M]===J&&(le[M]=X[M])}R=le}}else if(Q&&ze(V)&&Array.isArray(R))R=R.join(V),R&&(R=this.extendTranslation(R,i,c,s));else{let I=!1,le=!1;!this.isValidLookup(R)&&ae&&(I=!0,R=K),this.isValidLookup(R)||(le=!0,R=p);const M=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&le?void 0:R,J=ae&&K!==R&&this.options.updateMissing;if(le||I||J){if(this.logger.log(J?"updateKey":"missingKey",x,m,p,J?K:R),h){const w=this.resolve(p,{...c,keySeparator:!1});w&&w.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 $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let w=0;w<$.length;w++)ue.push($[w]);else this.options.saveMissingTo==="all"?ue=this.languageUtils.toResolveHierarchy(c.lng||this.language):ue.push(c.lng||this.language);const fe=(w,B,ee)=>{const se=ae&&ee!==R?ee:M;this.options.missingKeyHandler?this.options.missingKeyHandler(w,m,B,se,J,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(w,m,B,se,J,c),this.emit("missingKey",w,m,B,R)};this.options.saveMissing&&(this.options.saveMissingPlurals&&re?ue.forEach(w=>{const B=this.pluralResolver.getSuffixes(w,c);N&&c[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(ee=>{fe([w],p+ee,c[`defaultValue${ee}`]||K)})}):fe(ue,p,K))}R=this.extendTranslation(R,i,c,j,s),le&&R===p&&this.options.appendNamespaceToMissingKey&&(R=`${m}${b}${p}`),(le||I)&&this.options.parseMissingKeyHandler&&(R=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${b}${p}`:p,I?R:void 0,c))}return d?(j.res=R,j.usedParams=this.getUsedParamsDetails(c),j):R}extendTranslation(i,r,s,c,d){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)=>d?.[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,d,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,R=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(k=>{this.isValidLookup(s)||(p=k,!fp[`${D[0]}-${k}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(fp[`${D[0]}-${k}`]=!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(W=>{if(this.isValidLookup(s))return;h=W;const V=[b];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(V,b,W,k,r);else{let re;_&&(re=this.pluralResolver.getSuffix(W,r.count,r));const ae=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(_&&(r.ordinal&&re.indexOf(P)===0&&V.push(b+re.replace(P,this.options.pluralSeparator)),V.push(b+re),j&&V.push(b+ae)),R){const Y=`${b}${this.options.contextSeparator||"_"}${r.context}`;V.push(Y),_&&(r.ordinal&&re.indexOf(P)===0&&V.push(Y+re.replace(P,this.options.pluralSeparator)),V.push(Y+re),j&&V.push(Y+ae))}}let Q;for(;Q=V.pop();)this.isValidLookup(s)||(d=Q,s=this.getResource(W,k,Q,r))}))})}),{res:s,usedKey:c,exactUsedKey:d,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 d of r)delete c[d]}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 hp{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wa.create("languageUtils")}getScriptPartFromCode(i){if(i=_r(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=_r(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 d=this.getLanguagePartFromCode(s);if(this.isSupportedCode(d))return r=d;r=this.options.supportedLngs.find(h=>{if(h===d)return h;if(!(h.indexOf("-")<0&&d.indexOf("-")<0)&&(h.indexOf("-")>0&&d.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===d||h.indexOf(d)===0&&d.length>1))return h})}),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=[],d=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"&&d(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(i))):ze(i)&&d(this.formatLanguageCode(i)),s.forEach(h=>{c.indexOf(h)<0&&d(this.formatLanguageCode(h))}),c}}const mp={zero:0,one:1,two:2,few:3,many:4,other:5},pp={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class i0{constructor(i,r={}){this.languageUtils=i,this.options=r,this.logger=Wa.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const s=_r(i==="dev"?"en":i),c=r.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:s,type:c});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];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!"),pp;if(!i.match(/-|_/))return pp;const g=this.languageUtils.getLanguagePartFromCode(i);h=this.getRule(g,r)}return this.pluralRulesCache[d]=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,d)=>mp[c]-mp[d]).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 gp=(n,i,r,s=".",c=!0)=>{let d=Jv(n,i,r);return!d&&c&&ze(r)&&(d=Ju(n,r,s),d===void 0&&(d=Ju(i,r,s))),d},Tu=n=>n.replace(/\$/g,"$$$$");class yp{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:d,prefixEscaped:h,suffix:p,suffixEscaped:g,formatSeparator:m,unescapeSuffix:b,unescapePrefix:x,nestingPrefix:_,nestingPrefixEscaped:j,nestingSuffix:R,nestingSuffixEscaped:D,nestingOptionsSeparator:k,maxReplaces:W,alwaysFormat:V}=i.interpolation;this.escape=r!==void 0?r:Pv,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=d?Sl(d):h||"{{",this.suffix=p?Sl(p):g||"}}",this.formatSeparator=m||",",this.unescapePrefix=b?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=_?Sl(_):j||Sl("$t("),this.nestingSuffix=R?Sl(R):D||Sl(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=W||1e3,this.alwaysFormat=V!==void 0?V:!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 d,h,p;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=j=>{if(j.indexOf(this.formatSeparator)<0){const W=gp(r,g,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,s,{...c,...r,interpolationkey:j}):W}const R=j.split(this.formatSeparator),D=R.shift().trim(),k=R.join(this.formatSeparator).trim();return this.format(gp(r,g,D,this.options.keySeparator,this.options.ignoreJSONStructure),k,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=>Tu(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?Tu(this.escape(j)):Tu(j)}].forEach(j=>{for(p=0;d=j.regex.exec(i);){const R=d[1].trim();if(h=m(R),h===void 0)if(typeof b=="function"){const k=b(i,d,c);h=ze(k)?k:""}else if(c&&Object.prototype.hasOwnProperty.call(c,R))h="";else if(x){h=d[0];continue}else this.logger.warn(`missed to pass in variable ${R} for interpolating ${i}`),h="";else!ze(h)&&!this.useRawValueToEscape&&(h=sp(h));const D=j.safeValue(h);if(i=i.replace(d[0],D),x?(j.regex.lastIndex+=h.length,j.regex.lastIndex-=d[0].length):j.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),i}nest(i,r,s={}){let c,d,h;const p=(g,m)=>{const b=this.nestingOptionsSeparator;if(g.indexOf(b)<0)return g;const x=g.split(new RegExp(`${Sl(b)}[ ]*{`));let _=`{${x[1]}`;g=x[0],_=this.interpolate(_,h);const j=_.match(/'/g),R=_.match(/"/g);((j?.length??0)%2===0&&!R||(R?.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)),d=r(p.call(this,c[1].trim(),h),h),d&&c[0]===i&&!ze(d))return d;ze(d)||(d=sp(d)),d||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${i}`),d=""),g.length&&(d=g.reduce((b,x)=>this.format(b,x,s.lng,{...s,interpolationkey:c[1].trim()}),d.trim())),i=i.replace(c[0],d),this.regexp.lastIndex=0}return i}}const r0=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}},xp=n=>{const i={};return(r,s,c)=>{let d=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(d={...d,[c.interpolationkey]:void 0});const h=s+JSON.stringify(d);let p=i[h];return p||(p=n(_r(s),c),i[h]=p),p(r)}},s0=n=>(i,r,s)=>n(_r(r),s)(i);class o0{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?xp:s0;this.formats={number:s((c,d)=>{const h=new Intl.NumberFormat(c,{...d});return p=>h.format(p)}),currency:s((c,d)=>{const h=new Intl.NumberFormat(c,{...d,style:"currency"});return p=>h.format(p)}),datetime:s((c,d)=>{const h=new Intl.DateTimeFormat(c,{...d});return p=>h.format(p)}),relativetime:s((c,d)=>{const h=new Intl.RelativeTimeFormat(c,{...d});return p=>h.format(p,d.range||"day")}),list:s((c,d)=>{const h=new Intl.ListFormat(c,{...d});return p=>h.format(p)})}}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=xp(r)}format(i,r,s,c={}){const d=r.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(p=>p.indexOf(")")>-1)){const p=d.findIndex(g=>g.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,p)].join(this.formatSeparator)}return d.reduce((p,g)=>{const{formatName:m,formatOptions:b}=r0(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 c0=(n,i)=>{n.pending[i]!==void 0&&(delete n.pending[i],n.pendingCount--)};class u0 extends uo{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 d={},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),d[_]===void 0&&(d[_]=!0),g[x]===void 0&&(g[x]=!0)))}),b||(p[m]=!0)}),(Object.keys(d).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(d),pending:Object.keys(h),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}loaded(i,r,s){const c=i.split("|"),d=c[0],h=c[1];r&&this.emit("failedLoading",d,h,r),!r&&s&&this.store.addResourceBundle(d,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=>{Fv(g.loaded,[d],h),c0(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,d=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:d,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,d*2,h)},d);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 d=this.queueLoad(i,r,s,c);if(!d.toLoad.length)return d.pending.length||c(),null;d.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],d=s[1];this.read(c,d,"read",void 0,void 0,(h,p)=>{h&&this.logger.warn(`${r}loading namespace ${d} for language ${c} failed`,h),!h&&p&&this.logger.log(`${r}loaded namespace ${d} for language ${c}`,p),this.loaded(i,h,p)})}saveMissing(i,r,s,c,d,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:d},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 Ou=()=>({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}),vp=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),Fs=()=>{},d0=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})},Lg="__i18next_supportNoticeShown",f0=()=>typeof globalThis<"u"&&!!globalThis[Lg],h0=()=>{typeof globalThis<"u"&&(globalThis[Lg]=!0)},m0=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 br extends uo{constructor(i={},r){if(super(),this.options=vp(i),this.services={},this.logger=Wa,this.modules={external:[]},d0(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=Ou();this.options={...s,...this.options,...vp(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&&!m0(this)&&!f0()&&(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 💙"),h0());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=o0;const b=new hp(this.options);this.store=new dp(this.options.resources,this.options);const x=this.services;x.logger=Wa,x.resourceStore=this.store,x.languageUtils=b,x.pluralResolver=new i0(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 yp(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new u0(c(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(j,...R)=>{this.emit(j,...R)}),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 so(this.services,this.options),this.translator.on("*",(j,...R)=>{this.emit(j,...R)}),this.modules.external.forEach(j=>{j.init&&j.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Fs),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=ur(),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=Fs){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 d=[],h=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(m=>{m!=="cimode"&&d.indexOf(m)<0&&d.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(d,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(p)})}else s(null)}reloadResources(i,r,s){const c=ur();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=Fs),this.services.backendConnector.reload(i,r,d=>{c.resolve(),s(d)}),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=ur();this.emit("languageChanging",i);const c=p=>{this.language=p,this.languages=this.services.languageUtils.toResolveHierarchy(p),this.resolvedLanguage=void 0,this.setResolvedLanguage(p)},d=(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=>{d(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=(d,h,...p)=>{let g;typeof h!="object"?g=this.options.overloadTranslationOptionHandler([d,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(d)?b=d.map(x=>(typeof x=="function"&&(x=Wu(x,{...this.options,...h})),`${g.keyPrefix}${m}${x}`)):(typeof d=="function"&&(d=Wu(d,{...this.options,...h})),b=g.keyPrefix?`${g.keyPrefix}${m}${d}`:d),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,d=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(d,i)))}loadNamespaces(i,r){const s=ur();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=ur();ze(i)&&(i=[i]);const c=this.options.preload||[],d=i.filter(h=>c.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return d.length?(this.options.preload=c.concat(d),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 d=c.getTextInfo();if(d&&d.direction)return d.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 hp(Ou());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 br(i,r);return s.createInstance=br.createInstance,s}cloneInstance(i={},r=Fs){const s=i.forkResourceStore;s&&delete i.forkResourceStore;const c={...this.options,...i,isClone:!0},d=new br(c);if((i.debug!==void 0||i.prefix!==void 0)&&(d.logger=d.logger.clone(i)),["store","services","language"].forEach(p=>{d[p]=this[p]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},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),{});d.store=new dp(p,c),d.services.resourceStore=d.store}if(i.interpolation){const g={...Ou().interpolation,...this.options.interpolation,...i.interpolation},m={...c,interpolation:g};d.services.interpolator=new yp(m)}return d.translator=new so(d.services,c),d.translator.on("*",(p,...g)=>{d.emit(p,...g)}),d.init(c,r),d.translator.options=c,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ft=br.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 Du={exports:{}},Oe={};var bp;function p0(){if(bp)return Oe;bp=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"),d=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(w){return w===null||typeof w!="object"?null:(w=_&&w[_]||w["@@iterator"],typeof w=="function"?w:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,k={};function W(w,B,ee){this.props=w,this.context=B,this.refs=k,this.updater=ee||R}W.prototype.isReactComponent={},W.prototype.setState=function(w,B){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,B,"setState")},W.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function V(){}V.prototype=W.prototype;function Q(w,B,ee){this.props=w,this.context=B,this.refs=k,this.updater=ee||R}var re=Q.prototype=new V;re.constructor=Q,D(re,W.prototype),re.isPureReactComponent=!0;var ae=Array.isArray;function P(){}var Y={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function K(w,B,ee){var se=ee.ref;return{$$typeof:n,type:w,key:B,ref:se!==void 0?se:null,props:ee}}function X(w,B){return K(w.type,B,w.props)}function de(w){return typeof w=="object"&&w!==null&&w.$$typeof===n}function ie(w){var B={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(ee){return B[ee]})}var I=/\/+/g;function le(w,B){return typeof w=="object"&&w!==null&&w.key!=null?ie(""+w.key):B.toString(36)}function me(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(P,P):(w.status="pending",w.then(function(B){w.status==="pending"&&(w.status="fulfilled",w.value=B)},function(B){w.status==="pending"&&(w.status="rejected",w.reason=B)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function M(w,B,ee,se,Se){var Ne=typeof w;(Ne==="undefined"||Ne==="boolean")&&(w=null);var Te=!1;if(w===null)Te=!0;else switch(Ne){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(w.$$typeof){case n:case i:Te=!0;break;case b:return Te=w._init,M(Te(w._payload),B,ee,se,Se)}}if(Te)return Se=Se(w),Te=se===""?"."+le(w,0):se,ae(Se)?(ee="",Te!=null&&(ee=Te.replace(I,"$&/")+"/"),M(Se,B,ee,"",function(Tt){return Tt})):Se!=null&&(de(Se)&&(Se=X(Se,ee+(Se.key==null||w&&w.key===Se.key?"":(""+Se.key).replace(I,"$&/")+"/")+Te)),B.push(Se)),1;Te=0;var ut=se===""?".":se+":";if(ae(w))for(var he=0;he<w.length;he++)se=w[he],Ne=ut+le(se,he),Te+=M(se,B,ee,Ne,Se);else if(he=j(w),typeof he=="function")for(w=he.call(w),he=0;!(se=w.next()).done;)se=se.value,Ne=ut+le(se,he++),Te+=M(se,B,ee,Ne,Se);else if(Ne==="object"){if(typeof w.then=="function")return M(me(w),B,ee,se,Se);throw B=String(w),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Te}function J(w,B,ee){if(w==null)return w;var se=[],Se=0;return M(w,se,"","",function(Ne){return B.call(ee,Ne,Se++)}),se}function ue(w){if(w._status===-1){var B=w._result;B=B(),B.then(function(ee){(w._status===0||w._status===-1)&&(w._status=1,w._result=ee)},function(ee){(w._status===0||w._status===-1)&&(w._status=2,w._result=ee)}),w._status===-1&&(w._status=0,w._result=B)}if(w._status===1)return w._result.default;throw w._result}var $=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},fe={map:J,forEach:function(w,B,ee){J(w,function(){B.apply(this,arguments)},ee)},count:function(w){var B=0;return J(w,function(){B++}),B},toArray:function(w){return J(w,function(B){return B})||[]},only:function(w){if(!de(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return Oe.Activity=x,Oe.Children=fe,Oe.Component=W,Oe.Fragment=r,Oe.Profiler=c,Oe.PureComponent=Q,Oe.StrictMode=s,Oe.Suspense=g,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(w){return Y.H.useMemoCache(w)}},Oe.cache=function(w){return function(){return w.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(w,B,ee){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var se=D({},w.props),Se=w.key;if(B!=null)for(Ne in B.key!==void 0&&(Se=""+B.key),B)!N.call(B,Ne)||Ne==="key"||Ne==="__self"||Ne==="__source"||Ne==="ref"&&B.ref===void 0||(se[Ne]=B[Ne]);var Ne=arguments.length-2;if(Ne===1)se.children=ee;else if(1<Ne){for(var Te=Array(Ne),ut=0;ut<Ne;ut++)Te[ut]=arguments[ut+2];se.children=Te}return K(w.type,Se,se)},Oe.createContext=function(w){return w={$$typeof:h,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:d,_context:w},w},Oe.createElement=function(w,B,ee){var se,Se={},Ne=null;if(B!=null)for(se in B.key!==void 0&&(Ne=""+B.key),B)N.call(B,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(Se[se]=B[se]);var Te=arguments.length-2;if(Te===1)Se.children=ee;else if(1<Te){for(var ut=Array(Te),he=0;he<Te;he++)ut[he]=arguments[he+2];Se.children=ut}if(w&&w.defaultProps)for(se in Te=w.defaultProps,Te)Se[se]===void 0&&(Se[se]=Te[se]);return K(w,Ne,Se)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(w){return{$$typeof:p,render:w}},Oe.isValidElement=de,Oe.lazy=function(w){return{$$typeof:b,_payload:{_status:-1,_result:w},_init:ue}},Oe.memo=function(w,B){return{$$typeof:m,type:w,compare:B===void 0?null:B}},Oe.startTransition=function(w){var B=Y.T,ee={};Y.T=ee;try{var se=w(),Se=Y.S;Se!==null&&Se(ee,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(P,$)}catch(Ne){$(Ne)}finally{B!==null&&ee.types!==null&&(B.types=ee.types),Y.T=B}},Oe.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},Oe.use=function(w){return Y.H.use(w)},Oe.useActionState=function(w,B,ee){return Y.H.useActionState(w,B,ee)},Oe.useCallback=function(w,B){return Y.H.useCallback(w,B)},Oe.useContext=function(w){return Y.H.useContext(w)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(w,B){return Y.H.useDeferredValue(w,B)},Oe.useEffect=function(w,B){return Y.H.useEffect(w,B)},Oe.useEffectEvent=function(w){return Y.H.useEffectEvent(w)},Oe.useId=function(){return Y.H.useId()},Oe.useImperativeHandle=function(w,B,ee){return Y.H.useImperativeHandle(w,B,ee)},Oe.useInsertionEffect=function(w,B){return Y.H.useInsertionEffect(w,B)},Oe.useLayoutEffect=function(w,B){return Y.H.useLayoutEffect(w,B)},Oe.useMemo=function(w,B){return Y.H.useMemo(w,B)},Oe.useOptimistic=function(w,B){return Y.H.useOptimistic(w,B)},Oe.useReducer=function(w,B,ee){return Y.H.useReducer(w,B,ee)},Oe.useRef=function(w){return Y.H.useRef(w)},Oe.useState=function(w){return Y.H.useState(w)},Oe.useSyncExternalStore=function(w,B,ee){return Y.H.useSyncExternalStore(w,B,ee)},Oe.useTransition=function(){return Y.H.useTransition()},Oe.version="19.2.4",Oe}var Sp;function fo(){return Sp||(Sp=1,Du.exports=p0()),Du.exports}var v=fo();const hi=$v(v),g0=Gv({__proto__:null,default:hi},[v]),y0=(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);jl(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},_p={},kg=(n,i,r,s)=>{jl(r)&&_p[r]||(jl(r)&&(_p[r]=new Date),y0(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))},jp=(n,i,r,s)=>{if(jl(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))},x0=(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}}),jl=n=>typeof n=="string",v0=n=>typeof n=="object"&&n!==null,b0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,S0={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},_0=n=>S0[n],j0=n=>n.replace(b0,_0);let Iu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:j0,transDefaultProps:void 0};const N0=(n={})=>{Iu={...Iu,...n}},w0=()=>Iu;let Hg;const E0=n=>{Hg=n},C0=()=>Hg,R0={type:"3rdParty",init(n){N0(n.options.react),E0(n)}},z0=v.createContext();class T0{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Mu={exports:{}},Au={};var Np;function O0(){if(Np)return Au;Np=1;var n=fo();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,d=n.useLayoutEffect,h=n.useDebugValue;function p(x,_){var j=_(),R=s({inst:{value:j,getSnapshot:_}}),D=R[0].inst,k=R[1];return d(function(){D.value=j,D.getSnapshot=_,g(D)&&k({inst:D})},[x,j,_]),c(function(){return g(D)&&k({inst:D}),x(function(){g(D)&&k({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 Au.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,Au}var wp;function D0(){return wp||(wp=1,Mu.exports=O0()),Mu.exports}var M0=D0();const A0=(n,i)=>jl(i)?i:v0(i)&&jl(i.defaultValue)?i.defaultValue:Array.isArray(n)?n[n.length-1]:n,L0={t:A0,ready:!1},k0=()=>()=>{},Ce=(n,i={})=>{const{i18n:r}=i,{i18n:s,defaultNS:c}=v.useContext(z0)||{},d=r||s||C0();d&&!d.reportNamespaces&&(d.reportNamespaces=new T0),d||kg(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=v.useMemo(()=>({...w0(),...d?.options?.react,...i}),[d,i]),{useSuspense:p,keyPrefix:g}=h,m=c||d?.options?.defaultNS,b=jl(m)?[m]:m||["translation"],x=v.useMemo(()=>b,b);d?.reportNamespaces?.addUsedNamespaces?.(x);const _=v.useRef(0),j=v.useCallback(K=>{if(!d)return k0;const{bindI18n:X,bindI18nStore:de}=h,ie=()=>{_.current+=1,K()};return X&&d.on(X,ie),de&&d.store.on(de,ie),()=>{X&&X.split(" ").forEach(I=>d.off(I,ie)),de&&de.split(" ").forEach(I=>d.store.off(I,ie))}},[d,h]),R=v.useRef(),D=v.useCallback(()=>{if(!d)return L0;const K=!!(d.isInitialized||d.initializedStoreOnce)&&x.every(me=>x0(me,d,h)),X=i.lng||d.language,de=_.current,ie=R.current;if(ie&&ie.ready===K&&ie.lng===X&&ie.keyPrefix===g&&ie.revision===de)return ie;const le={t:d.getFixedT(X,h.nsMode==="fallback"?x:x[0],g),ready:K,lng:X,keyPrefix:g,revision:de};return R.current=le,le},[d,x,g,h,i.lng]),[k,W]=v.useState(0),{t:V,ready:Q}=M0.useSyncExternalStore(j,D,D);v.useEffect(()=>{if(d&&!Q&&!p){const K=()=>W(X=>X+1);i.lng?jp(d,i.lng,x,K):Pu(d,x,K)}},[d,i.lng,x,Q,p,k]);const re=d||{},ae=v.useRef(null),P=v.useRef(),Y=K=>{const X=Object.getOwnPropertyDescriptors(K);X.__original&&delete X.__original;const de=Object.create(Object.getPrototypeOf(K),X);if(!Object.prototype.hasOwnProperty.call(de,"__original"))try{Object.defineProperty(de,"__original",{value:K,writable:!1,enumerable:!1,configurable:!1})}catch{}return de},N=v.useMemo(()=>{const K=re,X=K?.language;let de=K;K&&(ae.current&&ae.current.__original===K?P.current!==X?(de=Y(K),ae.current=de,P.current=X):de=ae.current:(de=Y(K),ae.current=de,P.current=X));const ie=[V,de,Q];return ie.t=V,ie.i18n=de,ie.ready=Q,ie},[V,re,Q,re.resolvedLanguage,re.language,re.languages]);if(d&&p&&!Q)throw new Promise(K=>{const X=()=>K();i.lng?jp(d,i.lng,x,X):Pu(d,x,X)});return N},{slice:U0,forEach:H0}=[];function B0(n){return H0.call(U0.call(arguments,1),i=>{if(i)for(const r in i)n[r]===void 0&&(n[r]=i[r])}),n}function q0(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 Ep=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Y0=function(n,i){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},c=encodeURIComponent(i);let d=`${n}=${c}`;if(s.maxAge>0){const h=s.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");d+=`; Max-Age=${Math.floor(h)}`}if(s.domain){if(!Ep.test(s.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${s.domain}`}if(s.path){if(!Ep.test(s.path))throw new TypeError("option path is invalid");d+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(d+="; HttpOnly"),s.secure&&(d+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(d+="; Partitioned"),d},Cp={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=Y0(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 V0={name:"cookie",lookup(n){let{lookupCookie:i}=n;if(i&&typeof document<"u")return Cp.read(i)||void 0},cacheUserLanguage(n,i){let{lookupCookie:r,cookieMinutes:s,cookieDomain:c,cookieOptions:d}=i;r&&typeof document<"u"&&Cp.create(r,n,s,c,d)}},G0={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 d=s.substring(1).split("&");for(let h=0;h<d.length;h++){const p=d[h].indexOf("=");p>0&&d[h].substring(0,p)===i&&(r=d[h].substring(p+1))}}return r}},$0={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 d=c.substring(1);if(i){const h=d.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 ui=null;const Rp=()=>{if(ui!==null)return ui;try{if(ui=typeof window<"u"&&window.localStorage!==null,!ui)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{ui=!1}return ui};var K0={name:"localStorage",lookup(n){let{lookupLocalStorage:i}=n;if(i&&Rp())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupLocalStorage:r}=i;r&&Rp()&&window.localStorage.setItem(r,n)}};let di=null;const zp=()=>{if(di!==null)return di;try{if(di=typeof window<"u"&&window.sessionStorage!==null,!di)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{di=!1}return di};var X0={name:"sessionStorage",lookup(n){let{lookupSessionStorage:i}=n;if(i&&zp())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupSessionStorage:r}=i;r&&zp()&&window.sessionStorage.setItem(r,n)}},Q0={name:"navigator",lookup(n){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:s,language:c}=navigator;if(r)for(let d=0;d<r.length;d++)i.push(r[d]);s&&i.push(s),c&&i.push(c)}return i.length>0?i:void 0}},Z0={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}},F0={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}},J0={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 W0=()=>({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=B0(r,this.options||{},W0()),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(V0),this.addDetector(G0),this.addDetector(K0),this.addDetector(X0),this.addDetector(Q0),this.addDetector(Z0),this.addDetector(F0),this.addDetector(J0),this.addDetector($0)}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&&!q0(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 P0={"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.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_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_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"},I0={"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.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_impact_generic":"文件夹内的所有子文件夹和知识源将被递归删除。","sources.delete.irreversible":"此操作不可撤销。","sources.delete.repo":"确定要从 {{library}} 中移除仓库 {{name}}?","sources.delete.repo_impact":"将删除:{{packages}} 个包的索引记录、{{docs}} 篇文档的索引记录。","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(R0).init({resources:{en:{translation:P0},zh:{translation:I0}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var Lu={exports:{}},dr={},ku={exports:{}},Uu={};var Tp;function eb(){return Tp||(Tp=1,(function(n){function i(M,J){var ue=M.length;M.push(J);e:for(;0<ue;){var $=ue-1>>>1,fe=M[$];if(0<c(fe,J))M[$]=J,M[ue]=fe,ue=$;else break e}}function r(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var J=M[0],ue=M.pop();if(ue!==J){M[0]=ue;e:for(var $=0,fe=M.length,w=fe>>>1;$<w;){var B=2*($+1)-1,ee=M[B],se=B+1,Se=M[se];if(0>c(ee,ue))se<fe&&0>c(Se,ee)?(M[$]=Se,M[se]=ue,$=se):(M[$]=ee,M[B]=ue,$=B);else if(se<fe&&0>c(Se,ue))M[$]=Se,M[se]=ue,$=se;else break e}}return J}function c(M,J){var ue=M.sortIndex-J.sortIndex;return ue!==0?ue:M.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var g=[],m=[],b=1,x=null,_=3,j=!1,R=!1,D=!1,k=!1,W=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function re(M){for(var J=r(m);J!==null;){if(J.callback===null)s(m);else if(J.startTime<=M)s(m),J.sortIndex=J.expirationTime,i(g,J);else break;J=r(m)}}function ae(M){if(D=!1,re(M),!R)if(r(g)!==null)R=!0,P||(P=!0,ie());else{var J=r(m);J!==null&&me(ae,J.startTime-M)}}var P=!1,Y=-1,N=5,K=-1;function X(){return k?!0:!(n.unstable_now()-K<N)}function de(){if(k=!1,P){var M=n.unstable_now();K=M;var J=!0;try{e:{R=!1,D&&(D=!1,V(Y),Y=-1),j=!0;var ue=_;try{t:{for(re(M),x=r(g);x!==null&&!(x.expirationTime>M&&X());){var $=x.callback;if(typeof $=="function"){x.callback=null,_=x.priorityLevel;var fe=$(x.expirationTime<=M);if(M=n.unstable_now(),typeof fe=="function"){x.callback=fe,re(M),J=!0;break t}x===r(g)&&s(g),re(M)}else s(g);x=r(g)}if(x!==null)J=!0;else{var w=r(m);w!==null&&me(ae,w.startTime-M),J=!1}}break e}finally{x=null,_=ue,j=!1}J=void 0}}finally{J?ie():P=!1}}}var ie;if(typeof Q=="function")ie=function(){Q(de)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,le=I.port2;I.port1.onmessage=de,ie=function(){le.postMessage(null)}}else ie=function(){W(de,0)};function me(M,J){Y=W(function(){M(n.unstable_now())},J)}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"):N=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 J=3;break;default:J=_}var ue=_;_=J;try{return M()}finally{_=ue}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(M,J){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ue=_;_=M;try{return J()}finally{_=ue}},n.unstable_scheduleCallback=function(M,J,ue){var $=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?$+ue:$):ue=$,M){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ue+fe,M={id:b++,callback:J,priorityLevel:M,startTime:ue,expirationTime:fe,sortIndex:-1},ue>$?(M.sortIndex=ue,i(m,M),r(g)===null&&M===r(m)&&(D?(V(Y),Y=-1):D=!0,me(ae,ue-$))):(M.sortIndex=fe,i(g,M),R||j||(R=!0,P||(P=!0,ie()))),M},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(M){var J=_;return function(){var ue=_;_=J;try{return M.apply(this,arguments)}finally{_=ue}}}})(Uu)),Uu}var Op;function tb(){return Op||(Op=1,ku.exports=eb()),ku.exports}var Hu={exports:{}},$t={};var Dp;function ab(){if(Dp)return $t;Dp=1;var n=fo();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 d(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 d(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 Mp;function nb(){if(Mp)return Hu.exports;Mp=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(),Hu.exports=ab(),Hu.exports}var Ap;function lb(){if(Ap)return dr;Ap=1;var n=tb(),i=fo(),r=nb();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 d(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(d(e)!==e)throw Error(s(188))}function m(e){var t=e.alternate;if(!t){if(t=d(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 u=o.alternate;if(u===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return g(o),e;if(u===l)return g(o),t;u=u.sibling}throw Error(s(188))}if(a.return!==l.return)a=o,l=u;else{for(var y=!1,S=o.child;S;){if(S===a){y=!0,a=o,l=u;break}if(S===l){y=!0,l=o,a=u;break}S=S.sibling}if(!y){for(S=u.child;S;){if(S===a){y=!0,a=u,l=o;break}if(S===l){y=!0,l=u,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"),R=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case W:return"Profiler";case k:return"StrictMode";case ae:return"Suspense";case P:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case Q:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case re:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var me=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},$=[],fe=-1;function w(e){return{current:e}}function B(e){0>fe||(e.current=$[fe],$[fe]=null,fe--)}function ee(e,t){fe++,$[fe]=e.current,e.current=t}var se=w(null),Se=w(null),Ne=w(null),Te=w(null);function ut(e,t){switch(ee(Ne,t),ee(Se,e),ee(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rm(t),e=zm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(se),ee(se,e)}function he(){B(se),B(Se),B(Ne)}function Tt(e){e.memoizedState!==null&&ee(Te,e);var t=se.current,a=zm(t,e.type);t!==a&&(ee(Se,e),ee(se,a))}function Yt(e){Se.current===e&&(B(se),B(Se)),Te.current===e&&(B(Te),ir._currentValue=ue)}var it,Je;function ft(e){if(it===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);it=t&&t[1]||"",Je=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+it+e+Je}var At=!1;function Aa(e,t){if(!e||At)return"";At=!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 U=q}Reflect.construct(e,[],F)}else{try{F.call()}catch(q){U=q}e.call(F.prototype)}}else{try{throw Error()}catch(q){U=q}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(q){if(q&&U&&typeof q.stack=="string")return[q.stack,U.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 u=l.DetermineComponentFrameRoot(),y=u[0],S=u[1];if(y&&S){var E=y.split(`
4
+ `),L=S.split(`
5
+ `);for(o=l=0;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;for(;o<L.length&&!L[o].includes("DetermineComponentFrameRoot");)o++;if(l===E.length||o===L.length)for(l=E.length-1,o=L.length-1;1<=l&&0<=o&&E[l]!==L[o];)o--;for(;1<=l&&0<=o;l--,o--)if(E[l]!==L[o]){if(l!==1||o!==1)do if(l--,o--,0>o||E[l]!==L[o]){var G=`
6
+ `+E[l].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=l&&0<=o);break}}}finally{At=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ft(a):""}function Jt(e,t){switch(e.tag){case 26:case 27:case 5:return ft(e.type);case 16:return ft("Lazy");case 13:return e.child!==t&&t!==null?ft("Suspense Fallback"):ft("Suspense");case 19:return ft("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 ft("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,ra=n.unstable_scheduleCallback,en=n.unstable_cancelCallback,el=n.unstable_shouldYield,jn=n.unstable_requestPaint,Lt=n.unstable_now,xa=n.unstable_getCurrentPriorityLevel,La=n.unstable_ImmediatePriority,tl=n.unstable_UserBlockingPriority,Ga=n.unstable_NormalPriority,sa=n.unstable_LowPriority,Wt=n.unstable_IdlePriority,El=n.log,bi=n.unstable_setDisableYieldValue,ka=null,kt=null;function St(e){if(typeof El=="function"&&bi(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(ka,e)}catch{}}var Ot=Math.clz32?Math.clz32:Re,Cl=Math.log,ce=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Cl(e)/ce|0)|0}var tt=256,yt=262144,We=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,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~u,l!==0?o=Pt(l):(y&=S,y!==0?o=Pt(y):a||(a=S&~e,a!==0&&(o=Pt(a))))):(S=l&~u,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&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function va(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Si(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 al(){var e=We;return We<<=1,(We&62914560)===0&&(We=4194304),e}function Nn(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 Lr(e,t,a,l,o,u){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,E=e.expirationTimes,L=e.hiddenUpdates;for(a=y&~a;0<a;){var G=31-Ot(a),F=1<<G;S[G]=0,E[G]=-1;var U=L[G];if(U!==null)for(L[G]=null,G=0;G<U.length;G++){var q=U[G];q!==null&&(q.lane&=-536870913)}a&=~F}l!==0&&kr(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function kr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ot(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Ur(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Ot(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 H(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function te(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Pm(e.type))}function ne(e,t){var a=J.p;try{return J.p=e,t()}finally{J.p=a}}var ye=Math.random().toString(36).slice(2),oe="__reactFiber$"+ye,pe="__reactProps$"+ye,ge="__reactContainer$"+ye,_e="__reactEvents$"+ye,we="__reactListeners$"+ye,be="__reactHandles$"+ye,$e="__reactResources$"+ye,ke="__reactMarker$"+ye;function at(e){delete e[oe],delete e[pe],delete e[_e],delete e[we],delete e[be]}function rt(e){var t=e[oe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ge]||a[oe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=km(e);e!==null;){if(a=e[oe])return a;e=km(e)}return t}e=a,a=e.parentNode}return null}function ht(e){if(e=e[oe]||e[ge]){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 wn=new Set,Ua={};function Dt(e,t){Ka(e,t),Ka(e+"Capture",t)}function Ka(e,t){for(Ua[e]=t,e=0;e<t.length;e++)wn.add(t[e])}var nl=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={},ll={};function Rl(e){return ya.call(ll,e)?!0:ya.call(Xa,e)?!1:nl.test(e)?ll[e]=!0:(Xa[e]=!0,!1)}function Ue(e,t,a){if(Rl(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 zl(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,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(y){a=""+y,u.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 Tl(e){if(!e._valueTracker){var t=st(e)?"checked":"value";e._valueTracker=zl(e,t,""+e[t])}}function Hr(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 Br(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 Uy=/[\n"\\]/g;function ba(e){return e.replace(Uy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _o(e,t,a,l,o,u,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?jo(e,y,_t(t)):a!=null?jo(e,y,_t(a)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),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 Sd(e,t,a,l,o,u,y,S){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Tl(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),Tl(e)}function jo(e,t,a){t==="number"&&Br(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ol(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 _d(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 jd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(me(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),Tl(e)}function Dl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Hy=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 Nd(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||Hy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function wd(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&&Nd(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&Nd(e,u,t[u])}function No(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 By=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"]]),qy=/^[\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 qr(e){return qy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function an(){}var wo=null;function Eo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ml=null,Al=null;function Ed(e){var t=ht(e);if(t&&(e=t.stateNode)){var a=e[pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(_o(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[pe]||null;if(!o)throw Error(s(90));_o(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&&Hr(l)}break e;case"textarea":_d(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Ol(e,!!a.multiple,t,!1)}}}var Co=!1;function Cd(e,t,a){if(Co)return e(t,a);Co=!0;try{var l=e(t);return l}finally{if(Co=!1,(Ml!==null||Al!==null)&&(Cs(),Ml&&(t=Ml,e=Al,Al=Ml=null,Ed(t),e)))for(t=0;t<e.length;t++)Ed(e[t])}}function _i(e,t){var a=e.stateNode;if(a===null)return null;var l=a[pe]||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"),Ro=!1;if(nn)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){Ro=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{Ro=!1}var En=null,zo=null,Yr=null;function Rd(){if(Yr)return Yr;var e,t=zo,a=t.length,l,o="value"in En?En.value:En.textContent,u=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[u-l];l++);return Yr=o.slice(e,1<l?1-l:void 0)}function Vr(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 Gr(){return!0}function zd(){return!1}function It(e){function t(a,l,o,u,y){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(u):u[S]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Gr:zd,this.isPropagationStopped=zd,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=Gr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Gr)},persist:function(){},isPersistent:Gr}),t}var il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$r=It(il),Ni=x({},il,{view:0,detail:0}),Yy=It(Ni),To,Oo,wi,Kr=x({},Ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mo,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!==wi&&(wi&&e.type==="mousemove"?(To=e.screenX-wi.screenX,Oo=e.screenY-wi.screenY):Oo=To=0,wi=e),To)},movementY:function(e){return"movementY"in e?e.movementY:Oo}}),Td=It(Kr),Vy=x({},Kr,{dataTransfer:0}),Gy=It(Vy),$y=x({},Ni,{relatedTarget:0}),Do=It($y),Ky=x({},il,{animationName:0,elapsedTime:0,pseudoElement:0}),Xy=It(Ky),Qy=x({},il,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zy=It(Qy),Fy=x({},il,{data:0}),Od=It(Fy),Jy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wy={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"},Py={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Py[e])?!!t[e]:!1}function Mo(){return Iy}var ex=x({},Ni,{key:function(e){if(e.key){var t=Jy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mo,charCode:function(e){return e.type==="keypress"?Vr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tx=It(ex),ax=x({},Kr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dd=It(ax),nx=x({},Ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mo}),lx=It(nx),ix=x({},il,{propertyName:0,elapsedTime:0,pseudoElement:0}),rx=It(ix),sx=x({},Kr,{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}),ox=It(sx),cx=x({},il,{newState:0,oldState:0}),ux=It(cx),dx=[9,13,27,32],Ao=nn&&"CompositionEvent"in window,Ei=null;nn&&"documentMode"in document&&(Ei=document.documentMode);var fx=nn&&"TextEvent"in window&&!Ei,Md=nn&&(!Ao||Ei&&8<Ei&&11>=Ei),Ad=" ",Ld=!1;function kd(e,t){switch(e){case"keyup":return dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ud(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ll=!1;function hx(e,t){switch(e){case"compositionend":return Ud(t);case"keypress":return t.which!==32?null:(Ld=!0,Ad);case"textInput":return e=t.data,e===Ad&&Ld?null:e;default:return null}}function mx(e,t){if(Ll)return e==="compositionend"||!Ao&&kd(e,t)?(e=Rd(),Yr=zo=En=null,Ll=!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 Md&&t.locale!=="ko"?null:t.data;default:return null}}var px={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 Hd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!px[e.type]:t==="textarea"}function Bd(e,t,a,l){Ml?Al?Al.push(l):Al=[l]:Ml=l,t=As(t,"onChange"),0<t.length&&(a=new $r("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Ci=null,Ri=null;function gx(e){_m(e,0)}function Xr(e){var t=Ge(e);if(Hr(t))return e}function qd(e,t){if(e==="change")return t}var Yd=!1;if(nn){var Lo;if(nn){var ko="oninput"in document;if(!ko){var Vd=document.createElement("div");Vd.setAttribute("oninput","return;"),ko=typeof Vd.oninput=="function"}Lo=ko}else Lo=!1;Yd=Lo&&(!document.documentMode||9<document.documentMode)}function Gd(){Ci&&(Ci.detachEvent("onpropertychange",$d),Ri=Ci=null)}function $d(e){if(e.propertyName==="value"&&Xr(Ri)){var t=[];Bd(t,Ri,e,Eo(e)),Cd(gx,t)}}function yx(e,t,a){e==="focusin"?(Gd(),Ci=t,Ri=a,Ci.attachEvent("onpropertychange",$d)):e==="focusout"&&Gd()}function xx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xr(Ri)}function vx(e,t){if(e==="click")return Xr(t)}function bx(e,t){if(e==="input"||e==="change")return Xr(t)}function Sx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oa=typeof Object.is=="function"?Object.is:Sx;function zi(e,t){if(oa(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)||!oa(e[o],t[o]))return!1}return!0}function Kd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xd(e,t){var a=Kd(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=Kd(a)}}function Qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Br(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=Br(e.document)}return t}function Uo(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 _x=nn&&"documentMode"in document&&11>=document.documentMode,kl=null,Ho=null,Ti=null,Bo=!1;function Fd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Bo||kl==null||kl!==Br(l)||(l=kl,"selectionStart"in l&&Uo(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}),Ti&&zi(Ti,l)||(Ti=l,l=As(Ho,"onSelect"),0<l.length&&(t=new $r("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=kl)))}function rl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ul={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionrun:rl("Transition","TransitionRun"),transitionstart:rl("Transition","TransitionStart"),transitioncancel:rl("Transition","TransitionCancel"),transitionend:rl("Transition","TransitionEnd")},qo={},Jd={};nn&&(Jd=document.createElement("div").style,"AnimationEvent"in window||(delete Ul.animationend.animation,delete Ul.animationiteration.animation,delete Ul.animationstart.animation),"TransitionEvent"in window||delete Ul.transitionend.transition);function sl(e){if(qo[e])return qo[e];if(!Ul[e])return e;var t=Ul[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Jd)return qo[e]=t[a];return e}var Wd=sl("animationend"),Pd=sl("animationiteration"),Id=sl("animationstart"),jx=sl("transitionrun"),Nx=sl("transitionstart"),wx=sl("transitioncancel"),ef=sl("transitionend"),tf=new Map,Yo="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(" ");Yo.push("scrollEnd");function Ha(e,t){tf.set(e,t),Dt(t,[e])}var Qr=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=[],Hl=0,Vo=0;function Zr(){for(var e=Hl,t=Vo=Hl=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 u=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}u!==0&&af(a,o,u)}}function Fr(e,t,a,l){Sa[Hl++]=e,Sa[Hl++]=t,Sa[Hl++]=a,Sa[Hl++]=l,Vo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Go(e,t,a,l){return Fr(e,t,a,l),Jr(e)}function ol(e,t){return Fr(e,null,null,t),Jr(e)}function af(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Ot(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function Jr(e){if(50<Pi)throw Pi=0,Pc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Bl={};function Ex(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 ca(e,t,a,l){return new Ex(e,t,a,l)}function $o(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ln(e,t){var a=e.alternate;return a===null?(a=ca(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 nf(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 Wr(e,t,a,l,o,u){var y=0;if(l=e,typeof e=="function")$o(e)&&(y=1);else if(typeof e=="string")y=Ov(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=ca(31,a,t,o),e.elementType=K,e.lanes=u,e;case D:return cl(a.children,o,u,t);case k:y=8,o|=24;break;case W:return e=ca(12,a,t,o|2),e.elementType=W,e.lanes=u,e;case ae:return e=ca(13,a,t,o),e.elementType=ae,e.lanes=u,e;case P:return e=ca(19,a,t,o),e.elementType=P,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:y=10;break e;case V:y=9;break e;case re:y=11;break e;case Y:y=14;break e;case N:y=16,l=null;break e}y=29,a=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=ca(y,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function cl(e,t,a,l){return e=ca(7,e,l,t),e.lanes=a,e}function Ko(e,t,a){return e=ca(6,e,null,t),e.lanes=a,e}function lf(e){var t=ca(18,null,null,0);return t.stateNode=e,t}function Xo(e,t,a){return t=ca(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rf=new WeakMap;function _a(e,t){if(typeof e=="object"&&e!==null){var a=rf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Vt(t)},rf.set(e,t),t)}return{value:e,source:t,stack:Vt(t)}}var ql=[],Yl=0,Pr=null,Oi=0,ja=[],Na=0,Cn=null,Qa=1,Za="";function rn(e,t){ql[Yl++]=Oi,ql[Yl++]=Pr,Pr=e,Oi=t}function sf(e,t,a){ja[Na++]=Qa,ja[Na++]=Za,ja[Na++]=Cn,Cn=e;var l=Qa;e=Za;var o=32-Ot(l)-1;l&=~(1<<o),a+=1;var u=32-Ot(t)+o;if(30<u){var y=o-o%5;u=(l&(1<<y)-1).toString(32),l>>=y,o-=y,Qa=1<<32-Ot(t)+o|a<<o|l,Za=u+e}else Qa=1<<u|a<<o|l,Za=e}function Qo(e){e.return!==null&&(rn(e,1),sf(e,1,0))}function Zo(e){for(;e===Pr;)Pr=ql[--Yl],ql[Yl]=null,Oi=ql[--Yl],ql[Yl]=null;for(;e===Cn;)Cn=ja[--Na],ja[Na]=null,Za=ja[--Na],ja[Na]=null,Qa=ja[--Na],ja[Na]=null}function of(e,t){ja[Na++]=Qa,ja[Na++]=Za,ja[Na++]=Cn,Qa=t.id,Za=t.overflow,Cn=e}var Ut=null,ot=null,Ve=!1,Rn=null,wa=!1,Fo=Error(s(519));function zn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Di(_a(t,e)),Fo}function cf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[oe]=e,t[pe]=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<er.length;a++)Be(er[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),Sd(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),jd(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||Em(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||zn(e,!0)}function uf(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:wa=!1;return;case 27:case 3:wa=!0;return;default:Ut=Ut.return}}function Vl(e){if(e!==Ut)return!1;if(!Ve)return uf(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")||hu(e.type,e.memoizedProps)),a=!a),a&&ot&&zn(e),uf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ot=Lm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ot=Lm(e)}else t===27?(t=ot,Gn(e.type)?(e=xu,xu=null,ot=e):ot=t):ot=Ut?Ca(e.stateNode.nextSibling):null;return!0}function ul(){ot=Ut=null,Ve=!1}function Jo(){var e=Rn;return e!==null&&(na===null?na=e:na.push.apply(na,e),Rn=null),e}function Di(e){Rn===null?Rn=[e]:Rn.push(e)}var Wo=w(null),dl=null,sn=null;function Tn(e,t,a){ee(Wo,t._currentValue),t._currentValue=a}function on(e){e._currentValue=Wo.current,B(Wo)}function Po(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 Io(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var y=o.child;u=u.firstContext;e:for(;u!==null;){var S=u;u=o;for(var E=0;E<t.length;E++)if(S.context===t[E]){u.lanes|=a,S=u.alternate,S!==null&&(S.lanes|=a),Po(u.return,a,e),l||(y=null);break e}u=S.next}}else if(o.tag===18){if(y=o.return,y===null)throw Error(s(341));y.lanes|=a,u=y.alternate,u!==null&&(u.lanes|=a),Po(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 Gl(e,t,a,l){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!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;oa(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(ir):e=[ir])}o=o.return}e!==null&&Io(t,e,a,l),t.flags|=262144}function Ir(e){for(e=e.firstContext;e!==null;){if(!oa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fl(e){dl=e,sn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return df(dl,e)}function es(e,t){return dl===null&&fl(e),df(e,t)}function df(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 Cx=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()})}},Rx=n.unstable_scheduleCallback,zx=n.unstable_NormalPriority,jt={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ec(){return{controller:new Cx,data:new Map,refCount:0}}function Mi(e){e.refCount--,e.refCount===0&&Rx(zx,function(){e.controller.abort()})}var Ai=null,tc=0,$l=0,Kl=null;function Tx(e,t){if(Ai===null){var a=Ai=[];tc=0,$l=lu(),Kl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return tc++,t.then(ff,ff),t}function ff(){if(--tc===0&&Ai!==null){Kl!==null&&(Kl.status="fulfilled");var e=Ai;Ai=null,$l=0,Kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ox(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 hf=M.S;M.S=function(e,t){Jh=Lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Tx(e,t),hf!==null&&hf(e,t)};var hl=w(null);function ac(){var e=hl.current;return e!==null?e:nt.pooledCache}function ts(e,t){t===null?ee(hl,hl.current):ee(hl,t.pool)}function mf(){var e=ac();return e===null?null:{parent:jt._currentValue,pool:e}}var Xl=Error(s(460)),nc=Error(s(474)),as=Error(s(542)),ns={then:function(){}};function pf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gf(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,xf(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,xf(e),e}throw pl=t,Xl}}function ml(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(pl=a,Xl):a}}var pl=null;function yf(){if(pl===null)throw Error(s(459));var e=pl;return pl=null,e}function xf(e){if(e===Xl||e===as)throw Error(s(483))}var Ql=null,Li=0;function ls(e){var t=Li;return Li+=1,Ql===null&&(Ql=[]),gf(Ql,e,t)}function ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function is(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 vf(e){function t(O,z){if(e){var A=O.deletions;A===null?(O.deletions=[z],O.flags|=16):A.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 u(O,z,A){return O.index=A,e?(A=O.alternate,A!==null?(A=A.index,A<z?(O.flags|=67108866,z):A):(O.flags|=67108866,z)):(O.flags|=1048576,z)}function y(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function S(O,z,A,Z){return z===null||z.tag!==6?(z=Ko(A,O.mode,Z),z.return=O,z):(z=o(z,A),z.return=O,z)}function E(O,z,A,Z){var je=A.type;return je===D?G(O,z,A.props.children,Z,A.key):z!==null&&(z.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===N&&ml(je)===z.type)?(z=o(z,A.props),ki(z,A),z.return=O,z):(z=Wr(A.type,A.key,A.props,null,O.mode,Z),ki(z,A),z.return=O,z)}function L(O,z,A,Z){return z===null||z.tag!==4||z.stateNode.containerInfo!==A.containerInfo||z.stateNode.implementation!==A.implementation?(z=Xo(A,O.mode,Z),z.return=O,z):(z=o(z,A.children||[]),z.return=O,z)}function G(O,z,A,Z,je){return z===null||z.tag!==7?(z=cl(A,O.mode,Z,je),z.return=O,z):(z=o(z,A),z.return=O,z)}function F(O,z,A){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Ko(""+z,O.mode,A),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return A=Wr(z.type,z.key,z.props,null,O.mode,A),ki(A,z),A.return=O,A;case R:return z=Xo(z,O.mode,A),z.return=O,z;case N:return z=ml(z),F(O,z,A)}if(me(z)||ie(z))return z=cl(z,O.mode,A,null),z.return=O,z;if(typeof z.then=="function")return F(O,ls(z),A);if(z.$$typeof===Q)return F(O,es(O,z),A);is(O,z)}return null}function U(O,z,A,Z){var je=z!==null?z.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return je!==null?null:S(O,z,""+A,Z);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case j:return A.key===je?E(O,z,A,Z):null;case R:return A.key===je?L(O,z,A,Z):null;case N:return A=ml(A),U(O,z,A,Z)}if(me(A)||ie(A))return je!==null?null:G(O,z,A,Z,null);if(typeof A.then=="function")return U(O,z,ls(A),Z);if(A.$$typeof===Q)return U(O,z,es(O,A),Z);is(O,A)}return null}function q(O,z,A,Z,je){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return O=O.get(A)||null,S(z,O,""+Z,je);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case j:return O=O.get(Z.key===null?A:Z.key)||null,E(z,O,Z,je);case R:return O=O.get(Z.key===null?A:Z.key)||null,L(z,O,Z,je);case N:return Z=ml(Z),q(O,z,A,Z,je)}if(me(Z)||ie(Z))return O=O.get(A)||null,G(z,O,Z,je,null);if(typeof Z.then=="function")return q(O,z,A,ls(Z),je);if(Z.$$typeof===Q)return q(O,z,A,es(z,Z),je);is(z,Z)}return null}function xe(O,z,A,Z){for(var je=null,Ke=null,ve=z,Ae=z=0,Ye=null;ve!==null&&Ae<A.length;Ae++){ve.index>Ae?(Ye=ve,ve=null):Ye=ve.sibling;var Xe=U(O,ve,A[Ae],Z);if(Xe===null){ve===null&&(ve=Ye);break}e&&ve&&Xe.alternate===null&&t(O,ve),z=u(Xe,z,Ae),Ke===null?je=Xe:Ke.sibling=Xe,Ke=Xe,ve=Ye}if(Ae===A.length)return a(O,ve),Ve&&rn(O,Ae),je;if(ve===null){for(;Ae<A.length;Ae++)ve=F(O,A[Ae],Z),ve!==null&&(z=u(ve,z,Ae),Ke===null?je=ve:Ke.sibling=ve,Ke=ve);return Ve&&rn(O,Ae),je}for(ve=l(ve);Ae<A.length;Ae++)Ye=q(ve,O,Ae,A[Ae],Z),Ye!==null&&(e&&Ye.alternate!==null&&ve.delete(Ye.key===null?Ae:Ye.key),z=u(Ye,z,Ae),Ke===null?je=Ye:Ke.sibling=Ye,Ke=Ye);return e&&ve.forEach(function(Zn){return t(O,Zn)}),Ve&&rn(O,Ae),je}function Ee(O,z,A,Z){if(A==null)throw Error(s(151));for(var je=null,Ke=null,ve=z,Ae=z=0,Ye=null,Xe=A.next();ve!==null&&!Xe.done;Ae++,Xe=A.next()){ve.index>Ae?(Ye=ve,ve=null):Ye=ve.sibling;var Zn=U(O,ve,Xe.value,Z);if(Zn===null){ve===null&&(ve=Ye);break}e&&ve&&Zn.alternate===null&&t(O,ve),z=u(Zn,z,Ae),Ke===null?je=Zn:Ke.sibling=Zn,Ke=Zn,ve=Ye}if(Xe.done)return a(O,ve),Ve&&rn(O,Ae),je;if(ve===null){for(;!Xe.done;Ae++,Xe=A.next())Xe=F(O,Xe.value,Z),Xe!==null&&(z=u(Xe,z,Ae),Ke===null?je=Xe:Ke.sibling=Xe,Ke=Xe);return Ve&&rn(O,Ae),je}for(ve=l(ve);!Xe.done;Ae++,Xe=A.next())Xe=q(ve,O,Ae,Xe.value,Z),Xe!==null&&(e&&Xe.alternate!==null&&ve.delete(Xe.key===null?Ae:Xe.key),z=u(Xe,z,Ae),Ke===null?je=Xe:Ke.sibling=Xe,Ke=Xe);return e&&ve.forEach(function(Vv){return t(O,Vv)}),Ve&&rn(O,Ae),je}function et(O,z,A,Z){if(typeof A=="object"&&A!==null&&A.type===D&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case j:e:{for(var je=A.key;z!==null;){if(z.key===je){if(je=A.type,je===D){if(z.tag===7){a(O,z.sibling),Z=o(z,A.props.children),Z.return=O,O=Z;break e}}else if(z.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===N&&ml(je)===z.type){a(O,z.sibling),Z=o(z,A.props),ki(Z,A),Z.return=O,O=Z;break e}a(O,z);break}else t(O,z);z=z.sibling}A.type===D?(Z=cl(A.props.children,O.mode,Z,A.key),Z.return=O,O=Z):(Z=Wr(A.type,A.key,A.props,null,O.mode,Z),ki(Z,A),Z.return=O,O=Z)}return y(O);case R:e:{for(je=A.key;z!==null;){if(z.key===je)if(z.tag===4&&z.stateNode.containerInfo===A.containerInfo&&z.stateNode.implementation===A.implementation){a(O,z.sibling),Z=o(z,A.children||[]),Z.return=O,O=Z;break e}else{a(O,z);break}else t(O,z);z=z.sibling}Z=Xo(A,O.mode,Z),Z.return=O,O=Z}return y(O);case N:return A=ml(A),et(O,z,A,Z)}if(me(A))return xe(O,z,A,Z);if(ie(A)){if(je=ie(A),typeof je!="function")throw Error(s(150));return A=je.call(A),Ee(O,z,A,Z)}if(typeof A.then=="function")return et(O,z,ls(A),Z);if(A.$$typeof===Q)return et(O,z,es(O,A),Z);is(O,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,z!==null&&z.tag===6?(a(O,z.sibling),Z=o(z,A),Z.return=O,O=Z):(a(O,z),Z=Ko(A,O.mode,Z),Z.return=O,O=Z),y(O)):a(O,z)}return function(O,z,A,Z){try{Li=0;var je=et(O,z,A,Z);return Ql=null,je}catch(ve){if(ve===Xl||ve===as)throw ve;var Ke=ca(29,ve,null,O.mode);return Ke.lanes=Z,Ke.return=O,Ke}}}var gl=vf(!0),bf=vf(!1),On=!1;function lc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ic(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 Dn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mn(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=Jr(e),af(e,null,a),t}return Fr(e,l,t,a),Jr(e)}function Ui(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,Ur(e,a)}}function rc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=y:u=u.next=y,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,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 sc=!1;function Hi(){if(sc){var e=Kl;if(e!==null)throw e}}function Bi(e,t,a,l){sc=!1;var o=e.updateQueue;On=!1;var u=o.firstBaseUpdate,y=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var E=S,L=E.next;E.next=null,y===null?u=L:y.next=L,y=E;var G=e.alternate;G!==null&&(G=G.updateQueue,S=G.lastBaseUpdate,S!==y&&(S===null?G.firstBaseUpdate=L:S.next=L,G.lastBaseUpdate=E))}if(u!==null){var F=o.baseState;y=0,G=L=E=null,S=u;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(qe&U)===U:(l&U)===U){U!==0&&U===$l&&(sc=!0),G!==null&&(G=G.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var xe=e,Ee=S;U=t;var et=a;switch(Ee.tag){case 1:if(xe=Ee.payload,typeof xe=="function"){F=xe.call(et,F,U);break e}F=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ee.payload,U=typeof xe=="function"?xe.call(et,F,U):xe,U==null)break e;F=x({},F,U);break e;case 2:On=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},G===null?(L=G=q,E=F):G=G.next=q,y|=U;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);G===null&&(E=F),o.baseState=E,o.firstBaseUpdate=L,o.lastBaseUpdate=G,u===null&&(o.shared.lanes=0),Hn|=y,e.lanes=y,e.memoizedState=F}}function Sf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function _f(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Sf(a[e],t)}var Zl=w(null),rs=w(0);function jf(e,t){e=yn,ee(rs,e),ee(Zl,t),yn=e|t.baseLanes}function oc(){ee(rs,yn),ee(Zl,Zl.current)}function cc(){yn=rs.current,B(Zl),B(rs)}var ua=w(null),Ea=null;function An(e){var t=e.alternate;ee(vt,vt.current&1),ee(ua,e),Ea===null&&(t===null||Zl.current!==null||t.memoizedState!==null)&&(Ea=e)}function uc(e){ee(vt,vt.current),ee(ua,e),Ea===null&&(Ea=e)}function Nf(e){e.tag===22?(ee(vt,vt.current),ee(ua,e),Ea===null&&(Ea=e)):Ln()}function Ln(){ee(vt,vt.current),ee(ua,ua.current)}function da(e){B(ua),Ea===e&&(Ea=null),B(vt)}var vt=w(0);function ss(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||gu(a)||yu(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,Pe=null,Nt=null,os=!1,Fl=!1,yl=!1,cs=0,qi=0,Jl=null,Dx=0;function mt(){throw Error(s(321))}function dc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!oa(e[a],t[a]))return!1;return!0}function fc(e,t,a,l,o,u){return cn=u,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?sh:Cc,yl=!1,u=a(l,o),yl=!1,Fl&&(u=Ef(t,a,l,o)),wf(e),u}function wf(e){M.H=Gi;var t=Pe!==null&&Pe.next!==null;if(cn=0,Nt=Pe=Me=null,os=!1,qi=0,Jl=null,t)throw Error(s(300));e===null||wt||(e=e.dependencies,e!==null&&Ir(e)&&(wt=!0))}function Ef(e,t,a,l){Me=e;var o=0;do{if(Fl&&(Jl=null),qi=0,Fl=!1,25<=o)throw Error(s(301));if(o+=1,Nt=Pe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}M.H=oh,u=t(a,l)}while(Fl);return u}function Mx(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?Yi(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(Me.flags|=1024),t}function hc(){var e=cs!==0;return cs=0,e}function mc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function pc(e){if(os){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}os=!1}cn=0,Nt=Pe=Me=null,Fl=!1,qi=cs=0,Jl=null}function Zt(){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(Pe===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=Nt===null?Me.memoizedState:Nt.next;if(t!==null)Nt=t,Pe=e;else{if(e===null)throw Me.alternate===null?Error(s(467)):Error(s(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Nt===null?Me.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function us(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yi(e){var t=qi;return qi+=1,Jl===null&&(Jl=[]),e=gf(Jl,e,t),t=Me,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?sh:Cc),e}function ds(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Yi(e);if(e.$$typeof===Q)return Ht(e)}throw Error(s(438,String(e)))}function gc(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=us(),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]=X;return t.index++,a}function un(e,t){return typeof t=="function"?t(e):t}function fs(e){var t=bt();return yc(t,Pe,e)}function yc(e,t,a){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var o=e.baseQueue,u=l.pending;if(u!==null){if(o!==null){var y=o.next;o.next=u.next,u.next=y}t.baseQueue=o=u,l.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var S=y=null,E=null,L=t,G=!1;do{var F=L.lane&-536870913;if(F!==L.lane?(qe&F)===F:(cn&F)===F){var U=L.revertLane;if(U===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),F===$l&&(G=!0);else if((cn&U)===U){L=L.next,U===$l&&(G=!0);continue}else F={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},E===null?(S=E=F,y=u):E=E.next=F,Me.lanes|=U,Hn|=U;F=L.action,yl&&a(u,F),u=L.hasEagerState?L.eagerState:a(u,F)}else U={lane:F,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},E===null?(S=E=U,y=u):E=E.next=U,Me.lanes|=F,Hn|=F;L=L.next}while(L!==null&&L!==t);if(E===null?y=u:E.next=S,!oa(u,e.memoizedState)&&(wt=!0,G&&(a=Kl,a!==null)))throw a;e.memoizedState=u,e.baseState=y,e.baseQueue=E,l.lastRenderedState=u}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function xc(e){var t=bt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var y=o=o.next;do u=e(u,y.action),y=y.next;while(y!==o);oa(u,t.memoizedState)||(wt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Cf(e,t,a){var l=Me,o=bt(),u=Ve;if(u){if(a===void 0)throw Error(s(407));a=a()}else a=t();var y=!oa((Pe||o).memoizedState,a);if(y&&(o.memoizedState=a,wt=!0),o=o.queue,Sc(Tf.bind(null,l,o,e),[e]),o.getSnapshot!==t||y||Nt!==null&&Nt.memoizedState.tag&1){if(l.flags|=2048,Wl(9,{destroy:void 0},zf.bind(null,l,o,a,t),null),nt===null)throw Error(s(349));u||(cn&127)!==0||Rf(l,t,a)}return a}function Rf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Me.updateQueue,t===null?(t=us(),Me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function zf(e,t,a,l){t.value=a,t.getSnapshot=l,Of(t)&&Df(e)}function Tf(e,t,a){return a(function(){Of(t)&&Df(e)})}function Of(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!oa(e,a)}catch{return!0}}function Df(e){var t=ol(e,2);t!==null&&la(t,e,2)}function vc(e){var t=Zt();if(typeof e=="function"){var a=e;if(e=a(),yl){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 Mf(e,t,a,l){return e.baseState=a,yc(e,Pe,typeof l=="function"?l:un)}function Ax(e,t,a,l,o){if(ps(e))throw Error(s(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};M.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Af(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Af(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=M.T,y={};M.T=y;try{var S=a(o,l),E=M.S;E!==null&&E(y,S),Lf(e,t,S)}catch(L){bc(e,t,L)}finally{u!==null&&y.types!==null&&(u.types=y.types),M.T=u}}else try{u=a(o,l),Lf(e,t,u)}catch(L){bc(e,t,L)}}function Lf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){kf(e,t,l)},function(l){return bc(e,t,l)}):kf(e,t,a)}function kf(e,t,a){t.status="fulfilled",t.value=a,Uf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Af(e,a)))}function bc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Uf(t),t=t.next;while(t!==l)}e.action=null}function Uf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hf(e,t){return t}function Bf(e,t){if(Ve){var a=nt.formState;if(a!==null){e:{var l=Me;if(Ve){if(ot){t:{for(var o=ot,u=wa;o.nodeType!==8;){if(!u){o=null;break t}if(o=Ca(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){ot=Ca(o.nextSibling),l=o.data==="F!";break e}}zn(l)}l=!1}l&&(t=a[0])}}return a=Zt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hf,lastRenderedState:t},a.queue=l,a=lh.bind(null,Me,l),l.dispatch=a,l=vc(!1),u=Ec.bind(null,Me,!1,l.queue),l=Zt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Ax.bind(null,Me,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function qf(e){var t=bt();return Yf(t,Pe,e)}function Yf(e,t,a){if(t=yc(e,t,Hf)[0],e=fs(un)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Yi(t)}catch(y){throw y===Xl?as:y}else l=t;t=bt();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Me.flags|=2048,Wl(9,{destroy:void 0},Lx.bind(null,o,a),null)),[l,u,e]}function Lx(e,t){e.action=t}function Vf(e){var t=bt(),a=Pe;if(a!==null)return Yf(t,a,e);bt(),t=t.memoizedState,a=bt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Wl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Me.updateQueue,t===null&&(t=us(),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 Gf(){return bt().memoizedState}function hs(e,t,a,l){var o=Zt();Me.flags|=e,o.memoizedState=Wl(1|t,{destroy:void 0},a,l===void 0?null:l)}function ms(e,t,a,l){var o=bt();l=l===void 0?null:l;var u=o.memoizedState.inst;Pe!==null&&l!==null&&dc(l,Pe.memoizedState.deps)?o.memoizedState=Wl(t,u,a,l):(Me.flags|=e,o.memoizedState=Wl(1|t,u,a,l))}function $f(e,t){hs(8390656,8,e,t)}function Sc(e,t){ms(2048,8,e,t)}function kx(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=us(),Me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Kf(e){var t=bt().memoizedState;return kx({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Xf(e,t){return ms(4,2,e,t)}function Qf(e,t){return ms(4,4,e,t)}function Zf(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 Ff(e,t,a){a=a!=null?a.concat([e]):null,ms(4,4,Zf.bind(null,t,e),a)}function _c(){}function Jf(e,t){var a=bt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&dc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Wf(e,t){var a=bt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&dc(t,l[1]))return l[0];if(l=e(),yl){St(!0);try{e()}finally{St(!1)}}return a.memoizedState=[l,t],l}function jc(e,t,a){return a===void 0||(cn&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ph(),Me.lanes|=e,Hn|=e,a)}function Pf(e,t,a,l){return oa(a,t)?a:Zl.current!==null?(e=jc(e,a,l),oa(e,t)||(wt=!0),e):(cn&42)===0||(cn&1073741824)!==0&&(qe&261930)===0?(wt=!0,e.memoizedState=a):(e=Ph(),Me.lanes|=e,Hn|=e,t)}function If(e,t,a,l,o){var u=J.p;J.p=u!==0&&8>u?u:8;var y=M.T,S={};M.T=S,Ec(e,!1,t,a);try{var E=o(),L=M.S;if(L!==null&&L(S,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var G=Ox(E,l);Vi(e,t,G,ma(e))}else Vi(e,t,l,ma(e))}catch(F){Vi(e,t,{then:function(){},status:"rejected",reason:F},ma())}finally{J.p=u,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function Ux(){}function Nc(e,t,a,l){if(e.tag!==5)throw Error(s(476));var o=eh(e).queue;If(e,o,t,ue,a===null?Ux:function(){return th(e),a(l)})}function eh(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 th(e){var t=eh(e);t.next===null&&(t=e.alternate.memoizedState),Vi(e,t.next.queue,{},ma())}function wc(){return Ht(ir)}function ah(){return bt().memoizedState}function nh(){return bt().memoizedState}function Hx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ma();e=Dn(a);var l=Mn(t,e,a);l!==null&&(la(l,t,a),Ui(l,t,a)),t={cache:ec()},e.payload=t;return}t=t.return}}function Bx(e,t,a){var l=ma();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ps(e)?ih(t,a):(a=Go(e,t,a,l),a!==null&&(la(a,e,l),rh(a,t,l)))}function lh(e,t,a){var l=ma();Vi(e,t,a,l)}function Vi(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ps(e))ih(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,S=u(y,a);if(o.hasEagerState=!0,o.eagerState=S,oa(S,y))return Fr(e,t,o,0),nt===null&&Zr(),!1}catch{}if(a=Go(e,t,o,l),a!==null)return la(a,e,l),rh(a,t,l),!0}return!1}function Ec(e,t,a,l){if(l={lane:2,revertLane:lu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ps(e)){if(t)throw Error(s(479))}else t=Go(e,a,l,2),t!==null&&la(t,e,2)}function ps(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function ih(e,t){Fl=os=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function rh(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ur(e,a)}}var Gi={readContext:Ht,use:ds,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};Gi.useEffectEvent=mt;var sh={readContext:Ht,use:ds,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:$f,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,hs(4194308,4,Zf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return hs(4194308,4,e,t)},useInsertionEffect:function(e,t){hs(4,2,e,t)},useMemo:function(e,t){var a=Zt();t=t===void 0?null:t;var l=e();if(yl){St(!0);try{e()}finally{St(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Zt();if(a!==void 0){var o=a(t);if(yl){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=Bx.bind(null,Me,e),[l.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=vc(e);var t=e.queue,a=lh.bind(null,Me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:_c,useDeferredValue:function(e,t){var a=Zt();return jc(a,e,t)},useTransition:function(){var e=vc(!1);return e=If.bind(null,Me,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Me,o=Zt();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||Rf(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,$f(Tf.bind(null,l,u,e),[e]),l.flags|=2048,Wl(9,{destroy:void 0},zf.bind(null,l,u,a,t),null),a},useId:function(){var e=Zt(),t=nt.identifierPrefix;if(Ve){var a=Za,l=Qa;a=(l&~(1<<32-Ot(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=cs++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Dx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wc,useFormState:Bf,useActionState:Bf,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ec.bind(null,Me,!0,a),a.dispatch=t,[e,t]},useMemoCache:gc,useCacheRefresh:function(){return Zt().memoizedState=Hx.bind(null,Me)},useEffectEvent:function(e){var t=Zt(),a={impl:e};return t.memoizedState=a,function(){if((Qe&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Cc={readContext:Ht,use:ds,useCallback:Jf,useContext:Ht,useEffect:Sc,useImperativeHandle:Ff,useInsertionEffect:Xf,useLayoutEffect:Qf,useMemo:Wf,useReducer:fs,useRef:Gf,useState:function(){return fs(un)},useDebugValue:_c,useDeferredValue:function(e,t){var a=bt();return Pf(a,Pe.memoizedState,e,t)},useTransition:function(){var e=fs(un)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Yi(e),t]},useSyncExternalStore:Cf,useId:ah,useHostTransitionStatus:wc,useFormState:qf,useActionState:qf,useOptimistic:function(e,t){var a=bt();return Mf(a,Pe,e,t)},useMemoCache:gc,useCacheRefresh:nh};Cc.useEffectEvent=Kf;var oh={readContext:Ht,use:ds,useCallback:Jf,useContext:Ht,useEffect:Sc,useImperativeHandle:Ff,useInsertionEffect:Xf,useLayoutEffect:Qf,useMemo:Wf,useReducer:xc,useRef:Gf,useState:function(){return xc(un)},useDebugValue:_c,useDeferredValue:function(e,t){var a=bt();return Pe===null?jc(a,e,t):Pf(a,Pe.memoizedState,e,t)},useTransition:function(){var e=xc(un)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Yi(e),t]},useSyncExternalStore:Cf,useId:ah,useHostTransitionStatus:wc,useFormState:Vf,useActionState:Vf,useOptimistic:function(e,t){var a=bt();return Pe!==null?Mf(a,Pe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:gc,useCacheRefresh:nh};oh.useEffectEvent=Kf;function Rc(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 zc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=ma(),o=Dn(l);o.payload=t,a!=null&&(o.callback=a),t=Mn(e,o,l),t!==null&&(la(t,e,l),Ui(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=ma(),o=Dn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Mn(e,o,l),t!==null&&(la(t,e,l),Ui(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ma(),l=Dn(a);l.tag=2,t!=null&&(l.callback=t),t=Mn(e,l,a),t!==null&&(la(t,e,a),Ui(t,e,a))}};function ch(e,t,a,l,o,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,y):t.prototype&&t.prototype.isPureReactComponent?!zi(a,l)||!zi(o,u):!0}function uh(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&&zc.enqueueReplaceState(t,t.state,null)}function xl(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 dh(e){Qr(e)}function fh(e){console.error(e)}function hh(e){Qr(e)}function gs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function mh(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 Tc(e,t,a){return a=Dn(a),a.tag=3,a.payload={element:null},a.callback=function(){gs(e,t)},a}function ph(e){return e=Dn(e),e.tag=3,e}function gh(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=l.value;e.payload=function(){return o(u)},e.callback=function(){mh(t,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){mh(t,a,l),typeof o!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function qx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Gl(t,a,o,!0),a=ua.current,a!==null){switch(a.tag){case 31:case 13:return Ea===null?Rs():a.alternate===null&&pt===0&&(pt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===ns?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),tu(e,l,o)),!1;case 22:return a.flags|=65536,l===ns?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)),tu(e,l,o)),!1}throw Error(s(435,a.tag))}return tu(e,l,o),Rs(),!1}if(Ve)return t=ua.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Fo&&(e=Error(s(422),{cause:l}),Di(_a(e,a)))):(l!==Fo&&(t=Error(s(423),{cause:l}),Di(_a(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=_a(l,a),o=Tc(e.stateNode,l,o),rc(e,o),pt!==4&&(pt=2)),!1;var u=Error(s(520),{cause:l});if(u=_a(u,a),Wi===null?Wi=[u]:Wi.push(u),pt!==4&&(pt=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=Tc(a.stateNode,l,e),rc(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Bn===null||!Bn.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=ph(o),gh(o,e,a,l),rc(a,o),!1}a=a.return}while(a!==null);return!1}var Oc=Error(s(461)),wt=!1;function Bt(e,t,a,l){t.child=e===null?bf(t,null,a,l):gl(t,e.child,a,l)}function yh(e,t,a,l,o){a=a.render;var u=t.ref;if("ref"in l){var y={};for(var S in l)S!=="ref"&&(y[S]=l[S])}else y=l;return fl(t),l=fc(e,t,a,y,u,o),S=hc(),e!==null&&!wt?(mc(e,t,o),dn(e,t,o)):(Ve&&S&&Qo(t),t.flags|=1,Bt(e,t,l,o),t.child)}function xh(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!$o(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,vh(e,t,u,l,o)):(e=Wr(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Bc(e,o)){var y=u.memoizedProps;if(a=a.compare,a=a!==null?a:zi,a(y,l)&&e.ref===t.ref)return dn(e,t,o)}return t.flags|=1,e=ln(u,l),e.ref=t.ref,e.return=t,t.child=e}function vh(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(zi(u,l)&&e.ref===t.ref)if(wt=!1,t.pendingProps=l=u,Bc(e,o))(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,dn(e,t,o)}return Dc(e,t,a,l,o)}function bh(e,t,a,l){var o=l.children,u=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(u=u!==null?u.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&~u}else l=0,t.child=null;return Sh(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ts(t,u!==null?u.cachePool:null),u!==null?jf(t,u):oc(),Nf(t);else return l=t.lanes=536870912,Sh(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(ts(t,u.cachePool),jf(t,u),Ln(),t.memoizedState=null):(e!==null&&ts(t,null),oc(),Ln());return Bt(e,t,o,a),t.child}function $i(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sh(e,t,a,l,o){var u=ac();return u=u===null?null:{parent:jt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&ts(t,null),oc(),Nf(t),e!==null&&Gl(e,t,l,!0),t.childLanes=o,null}function ys(e,t){return t=vs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _h(e,t,a){return gl(t,e.child,null,a),e=ys(t,t.pendingProps),e.flags|=2,da(t),t.memoizedState=null,e}function Yx(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=ys(t,l),t.lanes=536870912,$i(null,e);if(uc(t),(e=ot)?(e=Am(e,wa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cn!==null?{id:Qa,overflow:Za}:null,retryLane:536870912,hydrationErrors:null},a=lf(e),a.return=t,t.child=a,Ut=t,ot=null)):e=null,e===null)throw zn(t);return t.lanes=536870912,null}return ys(t,l)}var u=e.memoizedState;if(u!==null){var y=u.dehydrated;if(uc(t),o)if(t.flags&256)t.flags&=-257,t=_h(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||Gl(e,t,a,!1),o=(a&e.childLanes)!==0,wt||o){if(l=nt,l!==null&&(y=C(l,a),y!==0&&y!==u.retryLane))throw u.retryLane=y,ol(e,y),la(l,e,y),Oc;Rs(),t=_h(e,t,a)}else e=u.treeContext,ot=Ca(y.nextSibling),Ut=t,Ve=!0,Rn=null,wa=!1,e!==null&&of(t,e),t=ys(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 xs(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 Dc(e,t,a,l,o){return fl(t),a=fc(e,t,a,l,void 0,o),l=hc(),e!==null&&!wt?(mc(e,t,o),dn(e,t,o)):(Ve&&l&&Qo(t),t.flags|=1,Bt(e,t,a,o),t.child)}function jh(e,t,a,l,o,u){return fl(t),t.updateQueue=null,a=Ef(t,l,a,o),wf(e),l=hc(),e!==null&&!wt?(mc(e,t,u),dn(e,t,u)):(Ve&&l&&Qo(t),t.flags|=1,Bt(e,t,a,u),t.child)}function Nh(e,t,a,l,o){if(fl(t),t.stateNode===null){var u=Bl,y=a.contextType;typeof y=="object"&&y!==null&&(u=Ht(y)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=zc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},lc(t),y=a.contextType,u.context=typeof y=="object"&&y!==null?Ht(y):Bl,u.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Rc(t,a,y,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&zc.enqueueReplaceState(u,u.state,null),Bi(t,l,u,o),Hi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var S=t.memoizedProps,E=xl(a,S);u.props=E;var L=u.context,G=a.contextType;y=Bl,typeof G=="object"&&G!==null&&(y=Ht(G));var F=a.getDerivedStateFromProps;G=typeof F=="function"||typeof u.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(S||L!==y)&&uh(t,u,l,y),On=!1;var U=t.memoizedState;u.state=U,Bi(t,l,u,o),Hi(),L=t.memoizedState,S||U!==L||On?(typeof F=="function"&&(Rc(t,a,F,l),L=t.memoizedState),(E=On||ch(t,a,E,l,U,L,y))?(G||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=L),u.props=l,u.state=L,u.context=y,l=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,ic(e,t),y=t.memoizedProps,G=xl(a,y),u.props=G,F=t.pendingProps,U=u.context,L=a.contextType,E=Bl,typeof L=="object"&&L!==null&&(E=Ht(L)),S=a.getDerivedStateFromProps,(L=typeof S=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==F||U!==E)&&uh(t,u,l,E),On=!1,U=t.memoizedState,u.state=U,Bi(t,l,u,o),Hi();var q=t.memoizedState;y!==F||U!==q||On||e!==null&&e.dependencies!==null&&Ir(e.dependencies)?(typeof S=="function"&&(Rc(t,a,S,l),q=t.memoizedState),(G=On||ch(t,a,G,l,U,q,E)||e!==null&&e.dependencies!==null&&Ir(e.dependencies))?(L||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,q,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,q,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=q),u.props=l,u.state=q,u.context=E,l=G):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,xs(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=gl(t,e.child,null,o),t.child=gl(t,null,a,o)):Bt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=dn(e,t,o),e}function wh(e,t,a,l){return ul(),t.flags|=256,Bt(e,t,a,l),t.child}var Mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ac(e){return{baseLanes:e,cachePool:mf()}}function Lc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ha),e}function Eh(e,t,a){var l=t.pendingProps,o=!1,u=(t.flags&128)!==0,y;if((y=u)||(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?An(t):Ln(),(e=ot)?(e=Am(e,wa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cn!==null?{id:Qa,overflow:Za}:null,retryLane:536870912,hydrationErrors:null},a=lf(e),a.return=t,t.child=a,Ut=t,ot=null)):e=null,e===null)throw zn(t);return yu(e)?t.lanes=32:t.lanes=536870912,null}var S=l.children;return l=l.fallback,o?(Ln(),o=t.mode,S=vs({mode:"hidden",children:S},o),l=cl(l,o,a,null),S.return=t,l.return=t,S.sibling=l,t.child=S,l=t.child,l.memoizedState=Ac(a),l.childLanes=Lc(e,y,a),t.memoizedState=Mc,$i(null,l)):(An(t),kc(t,S))}var E=e.memoizedState;if(E!==null&&(S=E.dehydrated,S!==null)){if(u)t.flags&256?(An(t),t.flags&=-257,t=Uc(e,t,a)):t.memoizedState!==null?(Ln(),t.child=e.child,t.flags|=128,t=null):(Ln(),S=l.fallback,o=t.mode,l=vs({mode:"visible",children:l.children},o),S=cl(S,o,a,null),S.flags|=2,l.return=t,S.return=t,l.sibling=S,t.child=l,gl(t,e.child,null,a),l=t.child,l.memoizedState=Ac(a),l.childLanes=Lc(e,y,a),t.memoizedState=Mc,t=$i(null,l));else if(An(t),yu(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var L=y.dgst;y=L,l=Error(s(419)),l.stack="",l.digest=y,Di({value:l,source:null,stack:null}),t=Uc(e,t,a)}else if(wt||Gl(e,t,a,!1),y=(a&e.childLanes)!==0,wt||y){if(y=nt,y!==null&&(l=C(y,a),l!==0&&l!==E.retryLane))throw E.retryLane=l,ol(e,l),la(y,e,l),Oc;gu(S)||Rs(),t=Uc(e,t,a)}else gu(S)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,ot=Ca(S.nextSibling),Ut=t,Ve=!0,Rn=null,wa=!1,e!==null&&of(t,e),t=kc(t,l.children),t.flags|=4096);return t}return o?(Ln(),S=l.fallback,o=t.mode,E=e.child,L=E.sibling,l=ln(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,L!==null?S=ln(L,S):(S=cl(S,o,a,null),S.flags|=2),S.return=t,l.return=t,l.sibling=S,t.child=l,$i(null,l),l=t.child,S=e.child.memoizedState,S===null?S=Ac(a):(o=S.cachePool,o!==null?(E=jt._currentValue,o=o.parent!==E?{parent:E,pool:E}:o):o=mf(),S={baseLanes:S.baseLanes|a,cachePool:o}),l.memoizedState=S,l.childLanes=Lc(e,y,a),t.memoizedState=Mc,$i(e.child,l)):(An(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 kc(e,t){return t=vs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vs(e,t){return e=ca(22,e,null,t),e.lanes=0,e}function Uc(e,t,a){return gl(t,e.child,null,a),e=kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ch(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Po(e.return,t,a)}function Hc(e,t,a,l,o,u){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:u}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=a,y.tailMode=o,y.treeForkCount=u)}function Rh(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var y=vt.current,S=(y&2)!==0;if(S?(y=y&1|2,t.flags|=128):y&=1,ee(vt,y),Bt(e,t,l,a),l=Ve?Oi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ch(e,a,t);else if(e.tag===19)Ch(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&&ss(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Hc(t,!1,o,a,u,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&&ss(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Hc(t,!0,a,null,u,l);break;case"together":Hc(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),Hn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Gl(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 Bc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ir(e)))}function Vx(e,t,a){switch(t.tag){case 3:ut(t,t.stateNode.containerInfo),Tn(t,jt,e.memoizedState.cache),ul();break;case 27:case 5:Tt(t);break;case 4:ut(t,t.stateNode.containerInfo);break;case 10:Tn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(An(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Eh(e,t,a):(An(t),e=dn(e,t,a),e!==null?e.sibling:null);An(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Gl(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Rh(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ee(vt,vt.current),l)break;return null;case 22:return t.lanes=0,bh(e,t,a,t.pendingProps);case 24:Tn(t,jt,e.memoizedState.cache)}return dn(e,t,a)}function zh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)wt=!0;else{if(!Bc(e,a)&&(t.flags&128)===0)return wt=!1,Vx(e,t,a);wt=(e.flags&131072)!==0}else wt=!1,Ve&&(t.flags&1048576)!==0&&sf(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ml(t.elementType),t.type=e,typeof e=="function")$o(e)?(l=xl(e,l),t.tag=1,t=Nh(null,t,e,l,a)):(t.tag=0,t=Dc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===re){t.tag=11,t=yh(null,t,e,l,a);break e}else if(o===Y){t.tag=14,t=xh(null,t,e,l,a);break e}}throw t=le(e)||e,Error(s(306,t,""))}}return t;case 0:return Dc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=xl(l,t.pendingProps),Nh(e,t,l,o,a);case 3:e:{if(ut(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,ic(e,t),Bi(t,l,null,a);var y=t.memoizedState;if(l=y.cache,Tn(t,jt,l),l!==u.cache&&Io(t,[jt],a,!0),Hi(),l=y.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=wh(e,t,l,a);break e}else if(l!==o){o=_a(Error(s(424)),t),Di(o),t=wh(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),Ut=t,Ve=!0,Rn=null,wa=!0,a=bf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ul(),l===o){t=dn(e,t,a);break e}Bt(e,t,l,a)}t=t.child}return t;case 26:return xs(e,t),e===null?(a=qm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ve||(a=t.type,e=t.pendingProps,l=Ls(Ne.current).createElement(a),l[oe]=t,l[pe]=e,qt(l,a,e),lt(l),t.stateNode=l):t.memoizedState=qm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Tt(t),e===null&&Ve&&(l=t.stateNode=Um(t.type,t.pendingProps,Ne.current),Ut=t,wa=!0,o=ot,Gn(t.type)?(xu=o,ot=Ca(l.firstChild)):ot=o),Bt(e,t,t.pendingProps.children,a),xs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((o=l=ot)&&(l=xv(l,t.type,t.pendingProps,wa),l!==null?(t.stateNode=l,Ut=t,ot=Ca(l.firstChild),wa=!1,o=!0):o=!1),o||zn(t)),Tt(t),o=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,l=u.children,hu(o,u)?l=null:y!==null&&hu(o,y)&&(t.flags|=32),t.memoizedState!==null&&(o=fc(e,t,Mx,null,null,a),ir._currentValue=o),xs(e,t),Bt(e,t,l,a),t.child;case 6:return e===null&&Ve&&((e=a=ot)&&(a=vv(a,t.pendingProps,wa),a!==null?(t.stateNode=a,Ut=t,ot=null,e=!0):e=!1),e||zn(t)),null;case 13:return Eh(e,t,a);case 4:return ut(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=gl(t,null,l,a):Bt(e,t,l,a),t.child;case 11:return yh(e,t,t.type,t.pendingProps,a);case 7:return Bt(e,t,t.pendingProps,a),t.child;case 8:return Bt(e,t,t.pendingProps.children,a),t.child;case 12:return Bt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Tn(t,t.type,l.value),Bt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,fl(t),o=Ht(o),l=l(o),t.flags|=1,Bt(e,t,l,a),t.child;case 14:return xh(e,t,t.type,t.pendingProps,a);case 15:return vh(e,t,t.type,t.pendingProps,a);case 19:return Rh(e,t,a);case 31:return Yx(e,t,a);case 22:return bh(e,t,a,t.pendingProps);case 24:return fl(t),l=Ht(jt),e===null?(o=ac(),o===null&&(o=nt,u=ec(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},lc(t),Tn(t,jt,o)):((e.lanes&a)!==0&&(ic(e,t),Bi(t,null,null,a),Hi()),o=e.memoizedState,u=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Tn(t,jt,l)):(l=u.cache,Tn(t,jt,l),l!==o.cache&&Io(t,[jt],a,!0))),Bt(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 qc(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(am())e.flags|=8192;else throw pl=ns,nc}else e.flags&=-16777217}function Th(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Km(t))if(am())e.flags|=8192;else throw pl=ns,nc}function bs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?al():536870912,e.lanes|=t,ti|=t)}function Ki(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 Gx(e,t,a){var l=t.pendingProps;switch(Zo(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),he(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Vl(t)?fn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Jo())),ct(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(fn(t),u!==null?(ct(t),Th(t,u)):(ct(t),qc(t,o,null,l,a))):u?u!==e.memoizedState?(fn(t),ct(t),Th(t,u)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&fn(t),ct(t),qc(t,o,e,l,a)),null;case 27:if(Yt(t),a=Ne.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=se.current,Vl(t)?cf(t):(e=Um(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(u=se.current,Vl(t))cf(t);else{var y=Ls(Ne.current);switch(u){case 1:u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=y.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?y.createElement(o,{is:l.is}):y.createElement(o)}}u[oe]=t,u[pe]=l;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)u.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=u;e:switch(qt(u,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),qc(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=Ne.current,Vl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=Ut,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[oe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Em(e.nodeValue,a)),e||zn(t,!0)}else e=Ls(e).createTextNode(l),e[oe]=t,t.stateNode=e}return ct(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Vl(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[oe]=t}else ul(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else a=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(da(t),t):(da(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=Vl(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[oe]=t}else ul(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),o=!1}else o=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(da(t),t):(da(t),null)}return da(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),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),bs(t,t.updateQueue),ct(t),null);case 4:return he(),e===null&&ou(t.stateNode.containerInfo),ct(t),null;case 10:return on(t.type),ct(t),null;case 19:if(B(vt),l=t.memoizedState,l===null)return ct(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)Ki(l,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ss(e),u!==null){for(t.flags|=128,Ki(l,!1),e=u.updateQueue,t.updateQueue=e,bs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)nf(a,e),a=a.sibling;return ee(vt,vt.current&1|2),Ve&&rn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Lt()>ws&&(t.flags|=128,o=!0,Ki(l,!1),t.lanes=4194304)}else{if(!o)if(e=ss(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,bs(t,e),Ki(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ve)return ct(t),null}else 2*Lt()-l.renderingStartTime>ws&&a!==536870912&&(t.flags|=128,o=!0,Ki(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Lt(),e.sibling=null,a=vt.current,ee(vt,o?a&1|2:a&1),Ve&&rn(t,l.treeForkCount),e):(ct(t),null);case 22:case 23:return da(t),cc(),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&&bs(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&&B(hl),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 $x(e,t){switch(Zo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return on(jt),he(),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(da(t),t.alternate===null)throw Error(s(340));ul()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ul()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(vt),null;case 4:return he(),null;case 10:return on(t.type),null;case 22:case 23:return da(t),cc(),e!==null&&B(hl),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 Oh(e,t){switch(Zo(t),t.tag){case 3:on(jt),he();break;case 26:case 27:case 5:Yt(t);break;case 4:he();break;case 31:t.memoizedState!==null&&da(t);break;case 13:da(t);break;case 19:B(vt);break;case 10:on(t.type);break;case 22:case 23:da(t),cc(),e!==null&&B(hl);break;case 24:on(jt)}}function Xi(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 u=a.create,y=a.inst;l=u(),y.destroy=l}a=a.next}while(a!==o)}}catch(S){Fe(t,t.return,S)}}function kn(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var u=o.next;l=u;do{if((l.tag&e)===e){var y=l.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,o=t;var E=a,L=S;try{L()}catch(G){Fe(o,E,G)}}}l=l.next}while(l!==u)}}catch(G){Fe(t,t.return,G)}}function Dh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{_f(t,a)}catch(l){Fe(e,e.return,l)}}}function Mh(e,t,a){a.props=xl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Fe(e,t,l)}}function Qi(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){Fe(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){Fe(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){Fe(e,t,o)}else a.current=null}function Ah(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){Fe(e,e.return,o)}}function Yc(e,t,a){try{var l=e.stateNode;fv(l,e.type,a,t),l[pe]=t}catch(o){Fe(e,e.return,o)}}function Lh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gn(e.type)||e.tag===4}function Vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lh(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&&Gn(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 Gc(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&&Gn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,a),e=e.sibling;e!==null;)Gc(e,t,a),e=e.sibling}function Ss(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&&Gn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ss(e,t,a),e=e.sibling;e!==null;)Ss(e,t,a),e=e.sibling}function kh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);qt(t,l,a),t[oe]=e,t[pe]=a}catch(u){Fe(e,e.return,u)}}var hn=!1,Et=!1,$c=!1,Uh=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function Kx(e,t){if(e=e.containerInfo,du=Vs,e=Zd(e),Uo(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,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var y=0,S=-1,E=-1,L=0,G=0,F=e,U=null;t:for(;;){for(var q;F!==a||o!==0&&F.nodeType!==3||(S=y+o),F!==u||l!==0&&F.nodeType!==3||(E=y+l),F.nodeType===3&&(y+=F.nodeValue.length),(q=F.firstChild)!==null;)U=F,F=q;for(;;){if(F===e)break t;if(U===a&&++L===o&&(S=y),U===u&&++G===l&&(E=y),(q=F.nextSibling)!==null)break;F=U,U=F.parentNode}F=q}a=S===-1||E===-1?null:{start:S,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(fu={focusedElem:e,selectionRange:a},Vs=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,u=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&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var xe=xl(a.type,o);e=l.getSnapshotBeforeUpdate(xe,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Fe(a,a.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)pu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pu(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,Mt=e;break}Mt=t.return}}function Hh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:pn(e,a),l&4&&Xi(5,a);break;case 1:if(pn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Fe(a,a.return,y)}else{var o=xl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Fe(a,a.return,y)}}l&64&&Dh(a),l&512&&Qi(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{_f(e,t)}catch(y){Fe(a,a.return,y)}}break;case 27:t===null&&l&4&&kh(a);case 26:case 5:pn(e,a),t===null&&l&4&&Ah(a),l&512&&Qi(a,a.return);break;case 12:pn(e,a);break;case 31:pn(e,a),l&4&&Yh(e,a);break;case 13:pn(e,a),l&4&&Vh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ev.bind(null,a),bv(e,a))));break;case 22:if(l=a.memoizedState!==null||hn,!l){t=t!==null&&t.memoizedState!==null||Et,o=hn;var u=Et;hn=l,(Et=t)&&!u?gn(e,a,(a.subtreeFlags&8772)!==0):pn(e,a),hn=o,Et=u}break;case 30:break;default:pn(e,a)}}function Bh(e){var t=e.alternate;t!==null&&(e.alternate=null,Bh(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 dt=null,ea=!1;function mn(e,t,a){for(a=a.child;a!==null;)qh(e,t,a),a=a.sibling}function qh(e,t,a){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.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=dt,o=ea;Gn(a.type)&&(dt=a.stateNode,ea=!1),mn(e,t,a),ar(a.stateNode),dt=l,ea=o;break;case 5:Et||Fa(a,t);case 6:if(l=dt,o=ea,dt=null,mn(e,t,a),dt=l,ea=o,dt!==null)if(ea)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(a.stateNode)}catch(u){Fe(a,t,u)}else try{dt.removeChild(a.stateNode)}catch(u){Fe(a,t,u)}break;case 18:dt!==null&&(ea?(e=dt,Dm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ci(e)):Dm(dt,a.stateNode));break;case 4:l=dt,o=ea,dt=a.stateNode.containerInfo,ea=!0,mn(e,t,a),dt=l,ea=o;break;case 0:case 11:case 14:case 15:kn(2,a,t),Et||kn(4,a,t),mn(e,t,a);break;case 1:Et||(Fa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Mh(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 Yh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ci(e)}catch(a){Fe(t,t.return,a)}}}function Vh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ci(e)}catch(a){Fe(t,t.return,a)}}function Xx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Uh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Uh),t;default:throw Error(s(435,e.tag))}}function _s(e,t){var a=Xx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=tv.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],u=e,y=t,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(Gn(S.type)){dt=S.stateNode,ea=!1;break e}break;case 5:dt=S.stateNode,ea=!1;break e;case 3:case 4:dt=S.stateNode.containerInfo,ea=!0;break e}S=S.return}if(dt===null)throw Error(s(160));qh(u,y,o),dt=null,ea=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Gh(t,e),t=t.sibling}var Ba=null;function Gh(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&&(kn(3,e,e.return),Xi(3,e),kn(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 u=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":u=o.getElementsByTagName("title")[0],(!u||u[ke]||u[oe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),qt(u,l,a),u[oe]=e,lt(u),l=u;break e;case"link":var y=Gm("link","href",o).get(l+(a.href||""));if(y){for(var S=0;S<y.length;S++)if(u=y[S],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(S,1);break t}}u=o.createElement(l),qt(u,l,a),o.head.appendChild(u);break;case"meta":if(y=Gm("meta","content",o).get(l+(a.content||""))){for(S=0;S<y.length;S++)if(u=y[S],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(S,1);break t}}u=o.createElement(l),qt(u,l,a),o.head.appendChild(u);break;default:throw Error(s(468,l))}u[oe]=e,lt(u),l=u}e.stateNode=l}else $m(o,e.type,e.stateNode);else e.stateNode=Vm(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?$m(o,e.type,e.stateNode):Vm(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Yc(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&&Yc(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{Dl(o,"")}catch(xe){Fe(e,e.return,xe)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Yc(e,o,a!==null?a.memoizedProps:o)),l&1024&&($c=!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(xe){Fe(e,e.return,xe)}}break;case 3:if(Hs=null,o=Ba,Ba=ks(t.containerInfo),ta(t,e),Ba=o,aa(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ci(t.containerInfo)}catch(xe){Fe(e,e.return,xe)}$c&&($c=!1,$h(e));break;case 4:l=Ba,Ba=ks(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,_s(e,l)));break;case 13:ta(t,e),aa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ns=Lt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,_s(e,l)));break;case 22:o=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,L=hn,G=Et;if(hn=L||o,Et=G||E,ta(t,e),Et=G,hn=L,aa(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||E||hn||Et||vl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(u=E.stateNode,o)y=u.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=E.stateNode;var F=E.memoizedProps.style,U=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(xe){Fe(E,E.return,xe)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(xe){Fe(E,E.return,xe)}}}else if(t.tag===18){if(a===null){E=t;try{var q=E.stateNode;o?Mm(q,!0):Mm(E.stateNode,!1)}catch(xe){Fe(E,E.return,xe)}}}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,_s(e,a))));break;case 19:ta(t,e),aa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,_s(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(Lh(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,u=Vc(e);Ss(e,u,o);break;case 5:var y=a.stateNode;a.flags&32&&(Dl(y,""),a.flags&=-33);var S=Vc(e);Ss(e,S,y);break;case 3:case 4:var E=a.stateNode.containerInfo,L=Vc(e);Gc(e,L,E);break;default:throw Error(s(161))}}catch(G){Fe(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $h(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$h(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;)Hh(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:kn(4,t,t.return),vl(t);break;case 1:Fa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Mh(t,t.return,a),vl(t);break;case 27:ar(t.stateNode);case 26:case 5:Fa(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(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,u=t,y=u.flags;switch(u.tag){case 0:case 11:case 15:gn(o,u,a),Xi(4,u);break;case 1:if(gn(o,u,a),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(L){Fe(l,l.return,L)}if(l=u,o=l.updateQueue,o!==null){var S=l.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)Sf(E[o],S)}catch(L){Fe(l,l.return,L)}}a&&y&64&&Dh(u),Qi(u,u.return);break;case 27:kh(u);case 26:case 5:gn(o,u,a),a&&l===null&&y&4&&Ah(u),Qi(u,u.return);break;case 12:gn(o,u,a);break;case 31:gn(o,u,a),a&&y&4&&Yh(o,u);break;case 13:gn(o,u,a),a&&y&4&&Vh(o,u);break;case 22:u.memoizedState===null&&gn(o,u,a),Qi(u,u.return);break;case 30:break;default:gn(o,u,a)}t=t.sibling}}function Kc(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&&Mi(a))}function Xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mi(e))}function qa(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kh(e,t,a,l),t=t.sibling}function Kh(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:qa(e,t,a,l),o&2048&&Xi(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&&Mi(e)));break;case 12:if(o&2048){qa(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,y=u.id,S=u.onPostCommit;typeof S=="function"&&S(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Fe(t,t.return,E)}}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:u=t.stateNode,y=t.alternate,t.memoizedState!==null?u._visibility&2?qa(e,t,a,l):Zi(e,t):u._visibility&2?qa(e,t,a,l):(u._visibility|=2,Pl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Kc(y,t);break;case 24:qa(e,t,a,l),o&2048&&Xc(t.alternate,t);break;default:qa(e,t,a,l)}}function Pl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,y=t,S=a,E=l,L=y.flags;switch(y.tag){case 0:case 11:case 15:Pl(u,y,S,E,o),Xi(8,y);break;case 23:break;case 22:var G=y.stateNode;y.memoizedState!==null?G._visibility&2?Pl(u,y,S,E,o):Zi(u,y):(G._visibility|=2,Pl(u,y,S,E,o)),o&&L&2048&&Kc(y.alternate,y);break;case 24:Pl(u,y,S,E,o),o&&L&2048&&Xc(y.alternate,y);break;default:Pl(u,y,S,E,o)}t=t.sibling}}function Zi(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:Zi(a,l),o&2048&&Kc(l.alternate,l);break;case 24:Zi(a,l),o&2048&&Xc(l.alternate,l);break;default:Zi(a,l)}t=t.sibling}}var Fi=8192;function Il(e,t,a){if(e.subtreeFlags&Fi)for(e=e.child;e!==null;)Xh(e,t,a),e=e.sibling}function Xh(e,t,a){switch(e.tag){case 26:Il(e,t,a),e.flags&Fi&&e.memoizedState!==null&&Dv(a,Ba,e.memoizedState,e.memoizedProps);break;case 5:Il(e,t,a);break;case 3:case 4:var l=Ba;Ba=ks(e.stateNode.containerInfo),Il(e,t,a),Ba=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Fi,Fi=16777216,Il(e,t,a),Fi=l):Il(e,t,a));break;default:Il(e,t,a)}}function Qh(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 Ji(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];Mt=l,Fh(l,e)}Qh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zh(e),e=e.sibling}function Zh(e){switch(e.tag){case 0:case 11:case 15:Ji(e),e.flags&2048&&kn(9,e,e.return);break;case 3:Ji(e);break;case 12:Ji(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,js(e)):Ji(e);break;default:Ji(e)}}function js(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];Mt=l,Fh(l,e)}Qh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:kn(8,t,t.return),js(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,js(t));break;default:js(t)}e=e.sibling}}function Fh(e,t){for(;Mt!==null;){var a=Mt;switch(a.tag){case 0:case 11:case 15:kn(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:Mi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Mt=l;else e:for(a=e;Mt!==null;){l=Mt;var o=l.sibling,u=l.return;if(Bh(l),l===a){Mt=null;break e}if(o!==null){o.return=u,Mt=o;break e}Mt=u}}}var Qx={getCacheForType:function(e){var t=Ht(jt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ht(jt).controller.signal}},Zx=typeof WeakMap=="function"?WeakMap:Map,Qe=0,nt=null,He=null,qe=0,Ze=0,fa=null,Un=!1,ei=!1,Qc=!1,yn=0,pt=0,Hn=0,bl=0,Zc=0,ha=0,ti=0,Wi=null,na=null,Fc=!1,Ns=0,Jh=0,ws=1/0,Es=null,Bn=null,Rt=0,qn=null,ai=null,xn=0,Jc=0,Wc=null,Wh=null,Pi=0,Pc=null;function ma(){return(Qe&2)!==0&&qe!==0?qe&-qe:M.T!==null?lu():te()}function Ph(){if(ha===0)if((qe&536870912)===0||Ve){var e=yt;yt<<=1,(yt&3932160)===0&&(yt=262144),ha=e}else ha=536870912;return e=ua.current,e!==null&&(e.flags|=32),ha}function la(e,t,a){(e===nt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(ni(e,0),Yn(e,qe,ha,!1)),$a(e,a),((Qe&2)===0||e!==nt)&&(e===nt&&((Qe&2)===0&&(bl|=a),pt===4&&Yn(e,qe,ha,!1)),Ja(e))}function Ih(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?Wx(e,t):eu(e,t,!0),u=l;do{if(o===0){ei&&!l&&Yn(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Fx(a)){o=eu(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)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=Wi;var E=S.current.memoizedState.isDehydrated;if(E&&(ni(S,y).flags|=256),y=eu(S,y,!1),y!==2){if(Qc&&!E){S.errorRecoveryDisabledLanes|=u,bl|=u,o=4;break e}u=na,na=o,u!==null&&(na===null?na=u:na.push.apply(na,u))}o=y}if(u=!1,o!==2)continue}}if(o===1){ni(e,0),Yn(e,t,0,!0);break}e:{switch(l=e,u=o,u){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Yn(l,t,ha,!Un);break e;case 2:na=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=Ns+300-Lt(),10<o)){if(Yn(l,t,ha,!Un),tn(l,0,!0)!==0)break e;xn=t,l.timeoutHandle=Tm(em.bind(null,l,a,na,Es,Fc,t,ha,bl,ti,Un,u,"Throttled",-0,0),o);break e}em(l,a,na,Es,Fc,t,ha,bl,ti,Un,u,null,-0,0)}}break}while(!0);Ja(e)}function em(e,t,a,l,o,u,y,S,E,L,G,F,U,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},Xh(t,u,F);var xe=(u&62914560)===u?Ns-Lt():(u&4194048)===u?Jh-Lt():0;if(xe=Mv(F,xe),xe!==null){xn=u,e.cancelPendingCommit=xe(om.bind(null,e,t,u,a,l,o,y,S,E,G,F,null,U,q)),Yn(e,u,y,!L);return}}om(e,t,u,a,l,o,y,S,E)}function Fx(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],u=o.getSnapshot;o=o.value;try{if(!oa(u(),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 Yn(e,t,a,l){t&=~Zc,t&=~bl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-Ot(o),y=1<<u;l[u]=-1,o&=~y}a!==0&&kr(e,a,t)}function Cs(){return(Qe&6)===0?(Ii(0),!1):!0}function Ic(){if(He!==null){if(Ze===0)var e=He.return;else e=He,sn=dl=null,pc(e),Ql=null,Li=0,e=He;for(;e!==null;)Oh(e.alternate,e),e=e.return;He=null}}function ni(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,pv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),xn=0,Ic(),nt=e,He=a=ln(e.current,null),qe=t,Ze=0,fa=null,Un=!1,ei=va(e,t),Qc=!1,ti=ha=Zc=bl=Hn=pt=0,na=Wi=null,Fc=!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-Ot(l),u=1<<o;t|=e[o],l&=~u}return yn=t,Zr(),a}function tm(e,t){Me=null,M.H=Gi,t===Xl||t===as?(t=yf(),Ze=3):t===nc?(t=yf(),Ze=4):Ze=t===Oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fa=t,He===null&&(pt=1,gs(e,_a(t,e.current)))}function am(){var e=ua.current;return e===null?!0:(qe&4194048)===qe?Ea===null:(qe&62914560)===qe||(qe&536870912)!==0?e===Ea:!1}function nm(){var e=M.H;return M.H=Gi,e===null?Gi:e}function lm(){var e=M.A;return M.A=Qx,e}function Rs(){pt=4,Un||(qe&4194048)!==qe&&ua.current!==null||(ei=!0),(Hn&134217727)===0&&(bl&134217727)===0||nt===null||Yn(nt,qe,ha,!1)}function eu(e,t,a){var l=Qe;Qe|=2;var o=nm(),u=lm();(nt!==e||qe!==t)&&(Es=null,ni(e,t)),t=!1;var y=pt;e:do try{if(Ze!==0&&He!==null){var S=He,E=fa;switch(Ze){case 8:Ic(),y=6;break e;case 3:case 2:case 9:case 6:ua.current===null&&(t=!0);var L=Ze;if(Ze=0,fa=null,li(e,S,E,L),a&&ei){y=0;break e}break;default:L=Ze,Ze=0,fa=null,li(e,S,E,L)}}Jx(),y=pt;break}catch(G){tm(e,G)}while(!0);return t&&e.shellSuspendCounter++,sn=dl=null,Qe=l,M.H=o,M.A=u,He===null&&(nt=null,qe=0,Zr()),y}function Jx(){for(;He!==null;)im(He)}function Wx(e,t){var a=Qe;Qe|=2;var l=nm(),o=lm();nt!==e||qe!==t?(Es=null,ws=Lt()+500,ni(e,t)):ei=va(e,t);e:do try{if(Ze!==0&&He!==null){t=He;var u=fa;t:switch(Ze){case 1:Ze=0,fa=null,li(e,t,u,1);break;case 2:case 9:if(pf(u)){Ze=0,fa=null,rm(t);break}t=function(){Ze!==2&&Ze!==9||nt!==e||(Ze=7),Ja(e)},u.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:pf(u)?(Ze=0,fa=null,rm(t)):(Ze=0,fa=null,li(e,t,u,7));break;case 5:var y=null;switch(He.tag){case 26:y=He.memoizedState;case 5:case 27:var S=He;if(y?Km(y):S.stateNode.complete){Ze=0,fa=null;var E=S.sibling;if(E!==null)He=E;else{var L=S.return;L!==null?(He=L,zs(L)):He=null}break t}}Ze=0,fa=null,li(e,t,u,5);break;case 6:Ze=0,fa=null,li(e,t,u,6);break;case 8:Ic(),pt=6;break e;default:throw Error(s(462))}}Px();break}catch(G){tm(e,G)}while(!0);return sn=dl=null,M.H=l,M.A=o,Qe=a,He!==null?0:(nt=null,qe=0,Zr(),pt)}function Px(){for(;He!==null&&!el();)im(He)}function im(e){var t=zh(e.alternate,e,yn);e.memoizedProps=e.pendingProps,t===null?zs(e):He=t}function rm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=jh(a,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=jh(a,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:pc(t);default:Oh(a,t),t=He=nf(t,yn),t=zh(a,t,yn)}e.memoizedProps=e.pendingProps,t===null?zs(e):He=t}function li(e,t,a,l){sn=dl=null,pc(t),Ql=null,Li=0;var o=t.return;try{if(qx(e,o,t,a,qe)){pt=1,gs(e,_a(a,e.current)),He=null;return}}catch(u){if(o!==null)throw He=o,u;pt=1,gs(e,_a(a,e.current)),He=null;return}t.flags&32768?(Ve||l===1?e=!0:ei||(qe&536870912)!==0?e=!1:(Un=e=!0,(l===2||l===9||l===3||l===6)&&(l=ua.current,l!==null&&l.tag===13&&(l.flags|=16384))),sm(t,e)):zs(t)}function zs(e){var t=e;do{if((t.flags&32768)!==0){sm(t,Un);return}e=t.return;var a=Gx(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);pt===0&&(pt=5)}function sm(e,t){do{var a=$x(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);pt=6,He=null}function om(e,t,a,l,o,u,y,S,E){e.cancelPendingCommit=null;do Ts();while(Rt!==0);if((Qe&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(u=t.lanes|t.childLanes,u|=Vo,Lr(e,a,u,y,S,E),e===nt&&(He=nt=null,qe=0),ai=t,qn=e,xn=a,Jc=u,Wc=o,Wh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,av(Ga,function(){return hm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,o=J.p,J.p=2,y=Qe,Qe|=4;try{Kx(e,t,a)}finally{Qe=y,J.p=o,M.T=l}}Rt=1,cm(),um(),dm()}}function cm(){if(Rt===1){Rt=0;var e=qn,t=ai,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var l=J.p;J.p=2;var o=Qe;Qe|=4;try{Gh(t,e);var u=fu,y=Zd(e.containerInfo),S=u.focusedElem,E=u.selectionRange;if(y!==S&&S&&S.ownerDocument&&Qd(S.ownerDocument.documentElement,S)){if(E!==null&&Uo(S)){var L=E.start,G=E.end;if(G===void 0&&(G=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(G,S.value.length);else{var F=S.ownerDocument||document,U=F&&F.defaultView||window;if(U.getSelection){var q=U.getSelection(),xe=S.textContent.length,Ee=Math.min(E.start,xe),et=E.end===void 0?Ee:Math.min(E.end,xe);!q.extend&&Ee>et&&(y=et,et=Ee,Ee=y);var O=Xd(S,Ee),z=Xd(S,et);if(O&&z&&(q.rangeCount!==1||q.anchorNode!==O.node||q.anchorOffset!==O.offset||q.focusNode!==z.node||q.focusOffset!==z.offset)){var A=F.createRange();A.setStart(O.node,O.offset),q.removeAllRanges(),Ee>et?(q.addRange(A),q.extend(z.node,z.offset)):(A.setEnd(z.node,z.offset),q.addRange(A))}}}}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 Z=F[S];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}Vs=!!du,fu=du=null}finally{Qe=o,J.p=l,M.T=a}}e.current=t,Rt=2}}function um(){if(Rt===2){Rt=0;var e=qn,t=ai,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var l=J.p;J.p=2;var o=Qe;Qe|=4;try{Hh(e,t.alternate,t)}finally{Qe=o,J.p=l,M.T=a}}Rt=3}}function dm(){if(Rt===4||Rt===3){Rt=0,jn();var e=qn,t=ai,a=xn,l=Wh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,ai=qn=null,fm(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Bn=null),H(a),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(ka,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=M.T,o=J.p,J.p=2,M.T=null;try{for(var u=e.onRecoverableError,y=0;y<l.length;y++){var S=l[y];u(S.value,{componentStack:S.stack})}}finally{M.T=t,J.p=o}}(xn&3)!==0&&Ts(),Ja(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Pc?Pi++:(Pi=0,Pc=e):Pi=0,Ii(0)}}function fm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Mi(t)))}function Ts(){return cm(),um(),dm(),hm()}function hm(){if(Rt!==5)return!1;var e=qn,t=Jc;Jc=0;var a=H(xn),l=M.T,o=J.p;try{J.p=32>a?32:a,M.T=null,a=Wc,Wc=null;var u=qn,y=xn;if(Rt=0,ai=qn=null,xn=0,(Qe&6)!==0)throw Error(s(331));var S=Qe;if(Qe|=4,Zh(u.current),Kh(u,u.current,y,a),Qe=S,Ii(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(ka,u)}catch{}return!0}finally{J.p=o,M.T=l,fm(e,t)}}function mm(e,t,a){t=_a(a,t),t=Tc(e.stateNode,t,2),e=Mn(e,t,2),e!==null&&($a(e,2),Ja(e))}function Fe(e,t,a){if(e.tag===3)mm(e,e,a);else for(;t!==null;){if(t.tag===3){mm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Bn===null||!Bn.has(l))){e=_a(a,e),a=ph(2),l=Mn(t,a,2),l!==null&&(gh(a,l,t,e),$a(l,2),Ja(l));break}}t=t.return}}function tu(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Zx;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)||(Qc=!0,o.add(a),e=Ix.bind(null,e,t,a),t.then(e,e))}function Ix(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&&(pt===4||pt===3&&(qe&62914560)===qe&&300>Lt()-Ns?(Qe&2)===0&&ni(e,0):Zc|=a,ti===qe&&(ti=0)),Ja(e)}function pm(e,t){t===0&&(t=al()),e=ol(e,t),e!==null&&($a(e,t),Ja(e))}function ev(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),pm(e,a)}function tv(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),pm(e,a)}function av(e,t){return ra(e,t)}var Os=null,ii=null,au=!1,Ds=!1,nu=!1,Vn=0;function Ja(e){e!==ii&&e.next===null&&(ii===null?Os=ii=e:ii=ii.next=e),Ds=!0,au||(au=!0,lv())}function Ii(e,t){if(!nu&&Ds){nu=!0;do for(var a=!1,l=Os;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var y=l.suspendedLanes,S=l.pingedLanes;u=(1<<31-Ot(42|e)+1)-1,u&=o&~(y&~S),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,vm(l,u))}else u=qe,u=tn(l,l===nt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||va(l,u)||(a=!0,vm(l,u));l=l.next}while(a);nu=!1}}function nv(){gm()}function gm(){Ds=au=!1;var e=0;Vn!==0&&mv()&&(e=Vn);for(var t=Lt(),a=null,l=Os;l!==null;){var o=l.next,u=ym(l,t);u===0?(l.next=null,a===null?Os=o:a.next=o,o===null&&(ii=a)):(a=l,(e!==0||(u&3)!==0)&&(Ds=!0)),l=o}Rt!==0&&Rt!==5||Ii(e),Vn!==0&&(Vn=0)}function ym(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-Ot(u),S=1<<y,E=o[y];E===-1?((S&a)===0||(S&l)!==0)&&(o[y]=Si(S,t)):E<=t&&(e.expiredLanes|=S),u&=~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&&(Ze===2||Ze===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),H(a)){case 2:case 8:a=tl;break;case 32:a=Ga;break;case 268435456:a=Wt;break;default:a=Ga}return l=xm.bind(null,e),a=ra(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&en(l),e.callbackPriority=2,e.callbackNode=null,2}function xm(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ts()&&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:(Ih(e,l,t),ym(e,Lt()),e.callbackNode!=null&&e.callbackNode===a?xm.bind(null,e):null)}function vm(e,t){if(Ts())return null;Ih(e,t,!0)}function lv(){gv(function(){(Qe&6)!==0?ra(La,nv):gm()})}function lu(){if(Vn===0){var e=$l;e===0&&(e=tt,tt<<=1,(tt&261888)===0&&(tt=256)),Vn=e}return Vn}function bm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:qr(""+e)}function Sm(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 iv(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=bm((o[pe]||null).action),y=l.submitter;y&&(t=(t=y[pe]||null)?bm(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var S=new $r("action","action",null,l,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Vn!==0){var E=y?Sm(o,y):new FormData(o);Nc(a,{pending:!0,data:E,method:o.method,action:u},null,E)}}else typeof u=="function"&&(S.preventDefault(),E=y?Sm(o,y):new FormData(o),Nc(a,{pending:!0,data:E,method:o.method,action:u},u,E))},currentTarget:o}]})}}for(var iu=0;iu<Yo.length;iu++){var ru=Yo[iu],rv=ru.toLowerCase(),sv=ru[0].toUpperCase()+ru.slice(1);Ha(rv,"on"+sv)}Ha(Wd,"onAnimationEnd"),Ha(Pd,"onAnimationIteration"),Ha(Id,"onAnimationStart"),Ha("dblclick","onDoubleClick"),Ha("focusin","onFocus"),Ha("focusout","onBlur"),Ha(jx,"onTransitionRun"),Ha(Nx,"onTransitionStart"),Ha(wx,"onTransitionCancel"),Ha(ef,"onTransitionEnd"),Ka("onMouseEnter",["mouseout","mouseover"]),Ka("onMouseLeave",["mouseout","mouseover"]),Ka("onPointerEnter",["pointerout","pointerover"]),Ka("onPointerLeave",["pointerout","pointerover"]),Dt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var er="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(" "),ov=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(er));function _m(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 u=void 0;if(t)for(var y=l.length-1;0<=y;y--){var S=l[y],E=S.instance,L=S.currentTarget;if(S=S.listener,E!==u&&o.isPropagationStopped())break e;u=S,o.currentTarget=L;try{u(o)}catch(G){Qr(G)}o.currentTarget=null,u=E}else for(y=0;y<l.length;y++){if(S=l[y],E=S.instance,L=S.currentTarget,S=S.listener,E!==u&&o.isPropagationStopped())break e;u=S,o.currentTarget=L;try{u(o)}catch(G){Qr(G)}o.currentTarget=null,u=E}}}}function Be(e,t){var a=t[_e];a===void 0&&(a=t[_e]=new Set);var l=e+"__bubble";a.has(l)||(jm(t,e,2,!1),a.add(l))}function su(e,t,a){var l=0;t&&(l|=4),jm(a,e,l,t)}var Ms="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[Ms]){e[Ms]=!0,wn.forEach(function(a){a!=="selectionchange"&&(ov.has(a)||su(a,!1,e),su(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ms]||(t[Ms]=!0,su("selectionchange",!1,t))}}function jm(e,t,a,l){switch(Pm(t)){case 2:var o=kv;break;case 8:o=Uv;break;default:o=ju}a=o.bind(null,t,a,e),o=void 0,!Ro||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 cu(e,t,a,l,o){var u=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 E=y.tag;if((E===3||E===4)&&y.stateNode.containerInfo===o)return;y=y.return}for(;S!==null;){if(y=rt(S),y===null)return;if(E=y.tag,E===5||E===6||E===26||E===27){l=u=y;continue e}S=S.parentNode}}l=l.return}Cd(function(){var L=u,G=Eo(a),F=[];e:{var U=tf.get(e);if(U!==void 0){var q=$r,xe=e;switch(e){case"keypress":if(Vr(a)===0)break e;case"keydown":case"keyup":q=tx;break;case"focusin":xe="focus",q=Do;break;case"focusout":xe="blur",q=Do;break;case"beforeblur":case"afterblur":q=Do;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=Td;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Gy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=lx;break;case Wd:case Pd:case Id:q=Xy;break;case ef:q=rx;break;case"scroll":case"scrollend":q=Yy;break;case"wheel":q=ox;break;case"copy":case"cut":case"paste":q=Zy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Dd;break;case"toggle":case"beforetoggle":q=ux}var Ee=(t&4)!==0,et=!Ee&&(e==="scroll"||e==="scrollend"),O=Ee?U!==null?U+"Capture":null:U;Ee=[];for(var z=L,A;z!==null;){var Z=z;if(A=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||A===null||O===null||(Z=_i(z,O),Z!=null&&Ee.push(tr(z,Z,A))),et)break;z=z.return}0<Ee.length&&(U=new q(U,xe,null,a,G),F.push({event:U,listeners:Ee}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",U&&a!==wo&&(xe=a.relatedTarget||a.fromElement)&&(rt(xe)||xe[ge]))break e;if((q||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,q?(xe=a.relatedTarget||a.toElement,q=L,xe=xe?rt(xe):null,xe!==null&&(et=d(xe),Ee=xe.tag,xe!==et||Ee!==5&&Ee!==27&&Ee!==6)&&(xe=null)):(q=null,xe=L),q!==xe)){if(Ee=Td,Z="onMouseLeave",O="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=Dd,Z="onPointerLeave",O="onPointerEnter",z="pointer"),et=q==null?U:Ge(q),A=xe==null?U:Ge(xe),U=new Ee(Z,z+"leave",q,a,G),U.target=et,U.relatedTarget=A,Z=null,rt(G)===L&&(Ee=new Ee(O,z+"enter",xe,a,G),Ee.target=A,Ee.relatedTarget=et,Z=Ee),et=Z,q&&xe)t:{for(Ee=cv,O=q,z=xe,A=0,Z=O;Z;Z=Ee(Z))A++;Z=0;for(var je=z;je;je=Ee(je))Z++;for(;0<A-Z;)O=Ee(O),A--;for(;0<Z-A;)z=Ee(z),Z--;for(;A--;){if(O===z||z!==null&&O===z.alternate){Ee=O;break t}O=Ee(O),z=Ee(z)}Ee=null}else Ee=null;q!==null&&Nm(F,U,q,Ee,!1),xe!==null&&et!==null&&Nm(F,et,xe,Ee,!0)}}e:{if(U=L?Ge(L):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var Ke=qd;else if(Hd(U))if(Yd)Ke=bx;else{Ke=xx;var ve=yx}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&No(L.elementType)&&(Ke=qd):Ke=vx;if(Ke&&(Ke=Ke(e,L))){Bd(F,Ke,a,G);break e}ve&&ve(e,U,L),e==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&jo(U,"number",U.value)}switch(ve=L?Ge(L):window,e){case"focusin":(Hd(ve)||ve.contentEditable==="true")&&(kl=ve,Ho=L,Ti=null);break;case"focusout":Ti=Ho=kl=null;break;case"mousedown":Bo=!0;break;case"contextmenu":case"mouseup":case"dragend":Bo=!1,Fd(F,a,G);break;case"selectionchange":if(_x)break;case"keydown":case"keyup":Fd(F,a,G)}var Ae;if(Ao)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 Ll?kd(e,a)&&(Ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ye="onCompositionStart");Ye&&(Md&&a.locale!=="ko"&&(Ll||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Ll&&(Ae=Rd()):(En=G,zo="value"in En?En.value:En.textContent,Ll=!0)),ve=As(L,Ye),0<ve.length&&(Ye=new Od(Ye,e,null,a,G),F.push({event:Ye,listeners:ve}),Ae?Ye.data=Ae:(Ae=Ud(a),Ae!==null&&(Ye.data=Ae)))),(Ae=fx?hx(e,a):mx(e,a))&&(Ye=As(L,"onBeforeInput"),0<Ye.length&&(ve=new Od("onBeforeInput","beforeinput",null,a,G),F.push({event:ve,listeners:Ye}),ve.data=Ae)),iv(F,e,L,a,G)}_m(F,t)})}function tr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function As(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=_i(e,a),o!=null&&l.unshift(tr(e,o,u)),o=_i(e,t),o!=null&&l.push(tr(e,o,u))),e.tag===3)return l;e=e.return}return[]}function cv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nm(e,t,a,l,o){for(var u=t._reactName,y=[];a!==null&&a!==l;){var S=a,E=S.alternate,L=S.stateNode;if(S=S.tag,E!==null&&E===l)break;S!==5&&S!==26&&S!==27||L===null||(E=L,o?(L=_i(a,u),L!=null&&y.unshift(tr(a,L,E))):o||(L=_i(a,u),L!=null&&y.push(tr(a,L,E)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var uv=/\r\n?/g,dv=/\u0000|\uFFFD/g;function wm(e){return(typeof e=="string"?e:""+e).replace(uv,`
9
+ `).replace(dv,"")}function Em(e,t){return t=wm(t),wm(e)===t}function Ie(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Dl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Dl(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":wd(e,l,u);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=qr(""+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 u=="function"&&(a==="formAction"?(t!=="input"&&Ie(e,t,"name",o.name,o,null),Ie(e,t,"formEncType",o.formEncType,o,null),Ie(e,t,"formMethod",o.formMethod,o,null),Ie(e,t,"formTarget",o.formTarget,o,null)):(Ie(e,t,"encType",o.encType,o,null),Ie(e,t,"method",o.method,o,null),Ie(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=qr(""+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=qr(""+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=By.get(a)||a,Ue(e,a,l))}}function uu(e,t,a,l,o,u){switch(a){case"style":wd(e,l,u);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"?Dl(e,l):(typeof l=="number"||typeof l=="bigint")&&Dl(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),u=e[pe]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof l=="function")){typeof u!="function"&&u!==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 qt(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,u;for(u in a)if(a.hasOwnProperty(u)){var y=a[u];if(y!=null)switch(u){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ie(e,t,u,y,a,null)}}o&&Ie(e,t,"srcSet",a.srcSet,a,null),l&&Ie(e,t,"src",a.src,a,null);return;case"input":Be("invalid",e);var S=u=y=o=null,E=null,L=null;for(l in a)if(a.hasOwnProperty(l)){var G=a[l];if(G!=null)switch(l){case"name":o=G;break;case"type":y=G;break;case"checked":E=G;break;case"defaultChecked":L=G;break;case"value":u=G;break;case"defaultValue":S=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,t));break;default:Ie(e,t,l,G,a,null)}}Sd(e,u,S,E,L,y,o,!1);return;case"select":Be("invalid",e),l=y=u=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":u=S;break;case"defaultValue":y=S;break;case"multiple":l=S;default:Ie(e,t,o,S,a,null)}t=u,a=y,e.multiple=!!l,t!=null?Ol(e,!!l,t,!1):a!=null&&Ol(e,!!l,a,!0);return;case"textarea":Be("invalid",e),u=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":u=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:Ie(e,t,y,S,a,null)}jd(e,l,o,u);return;case"option":for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ie(e,t,E,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<er.length;l++)Be(er[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(L in a)if(a.hasOwnProperty(L)&&(l=a[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ie(e,t,L,l,a,null)}return;default:if(No(t)){for(G in a)a.hasOwnProperty(G)&&(l=a[G],l!==void 0&&uu(e,t,G,l,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(l=a[S],l!=null&&Ie(e,t,S,l,a,null))}function fv(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,u=null,y=null,S=null,E=null,L=null,G=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":E=F;default:l.hasOwnProperty(q)||Ie(e,t,q,null,l,F)}}for(var U in l){var q=l[U];if(F=a[U],l.hasOwnProperty(U)&&(q!=null||F!=null))switch(U){case"type":u=q;break;case"name":o=q;break;case"checked":L=q;break;case"defaultChecked":G=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&&Ie(e,t,U,q,l,F)}}_o(e,y,S,E,L,G,u,o);return;case"select":q=y=S=U=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":q=E;default:l.hasOwnProperty(u)||Ie(e,t,u,null,l,E)}for(o in l)if(u=l[o],E=a[o],l.hasOwnProperty(o)&&(u!=null||E!=null))switch(o){case"value":U=u;break;case"defaultValue":S=u;break;case"multiple":y=u;default:u!==E&&Ie(e,t,o,u,l,E)}t=S,a=y,l=q,U!=null?Ol(e,!!a,U,!1):!!l!=!!a&&(t!=null?Ol(e,!!a,t,!0):Ol(e,!!a,a?[]:"",!1));return;case"textarea":q=U=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:Ie(e,t,S,null,l,o)}for(y in l)if(o=l[y],u=a[y],l.hasOwnProperty(y)&&(o!=null||u!=null))switch(y){case"value":U=o;break;case"defaultValue":q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==u&&Ie(e,t,y,o,l,u)}_d(e,U,q);return;case"option":for(var xe in a)U=a[xe],a.hasOwnProperty(xe)&&U!=null&&!l.hasOwnProperty(xe)&&(xe==="selected"?e.selected=!1:Ie(e,t,xe,null,l,U));for(E in l)U=l[E],q=a[E],l.hasOwnProperty(E)&&U!==q&&(U!=null||q!=null)&&(E==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":Ie(e,t,E,U,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 Ee in a)U=a[Ee],a.hasOwnProperty(Ee)&&U!=null&&!l.hasOwnProperty(Ee)&&Ie(e,t,Ee,null,l,U);for(L in l)if(U=l[L],q=a[L],l.hasOwnProperty(L)&&U!==q&&(U!=null||q!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:Ie(e,t,L,U,l,q)}return;default:if(No(t)){for(var et in a)U=a[et],a.hasOwnProperty(et)&&U!==void 0&&!l.hasOwnProperty(et)&&uu(e,t,et,void 0,l,U);for(G in l)U=l[G],q=a[G],!l.hasOwnProperty(G)||U===q||U===void 0&&q===void 0||uu(e,t,G,U,l,q);return}}for(var O in a)U=a[O],a.hasOwnProperty(O)&&U!=null&&!l.hasOwnProperty(O)&&Ie(e,t,O,null,l,U);for(F in l)U=l[F],q=a[F],!l.hasOwnProperty(F)||U===q||U==null&&q==null||Ie(e,t,F,U,l,q)}function Cm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hv(){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],u=o.transferSize,y=o.initiatorType,S=o.duration;if(u&&S&&Cm(y)){for(y=0,S=o.responseEnd,l+=1;l<a.length;l++){var E=a[l],L=E.startTime;if(L>S)break;var G=E.transferSize,F=E.initiatorType;G&&Cm(F)&&(E=E.responseEnd,y+=G*(E<S?1:(S-L)/(E-L)))}if(--l,t+=8*(u+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 du=null,fu=null;function Ls(e){return e.nodeType===9?e:e.ownerDocument}function Rm(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 zm(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 hu(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 mu=null;function mv(){var e=window.event;return e&&e.type==="popstate"?e===mu?!1:(mu=e,!0):(mu=null,!1)}var Tm=typeof setTimeout=="function"?setTimeout:void 0,pv=typeof clearTimeout=="function"?clearTimeout:void 0,Om=typeof Promise=="function"?Promise:void 0,gv=typeof queueMicrotask=="function"?queueMicrotask:typeof Om<"u"?function(e){return Om.resolve(null).then(e).catch(yv)}:Tm;function yv(e){setTimeout(function(){throw e})}function Gn(e){return e==="head"}function Dm(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),ci(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ar(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ar(a);for(var u=a.firstChild;u;){var y=u.nextSibling,S=u.nodeName;u[ke]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=y}}else a==="body"&&ar(e.ownerDocument.body);a=o}while(a);ci(t)}function Mm(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 pu(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":pu(a),at(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function xv(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(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==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(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ca(e.nextSibling),e===null)break}return null}function vv(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 Am(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 gu(e){return e.data==="$?"||e.data==="$~"}function yu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function bv(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 xu=null;function Lm(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 km(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 Um(e,t,a){switch(t=Ls(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 ar(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);at(e)}var Ra=new Map,Hm=new Set;function ks(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vn=J.d;J.d={f:Sv,r:_v,D:jv,C:Nv,L:wv,m:Ev,X:Rv,S:Cv,M:zv};function Sv(){var e=vn.f(),t=Cs();return e||t}function _v(e){var t=ht(e);t!==null&&t.tag===5&&t.type==="form"?th(t):vn.r(e)}var ri=typeof document>"u"?null:document;function Bm(e,t,a){var l=ri;if(l&&typeof t=="string"&&t){var o=ba(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Hm.has(o)||(Hm.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),qt(t,"link",e),lt(t),l.head.appendChild(t)))}}function jv(e){vn.D(e),Bm("dns-prefetch",e,null)}function Nv(e,t){vn.C(e,t),Bm("preconnect",e,t)}function wv(e,t,a){vn.L(e,t,a);var l=ri;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 u=o;switch(t){case"style":u=si(e);break;case"script":u=oi(e)}Ra.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ra.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(nr(u))||t==="script"&&l.querySelector(lr(u))||(t=l.createElement("link"),qt(t,"link",e),lt(t),l.head.appendChild(t)))}}function Ev(e,t){vn.m(e,t);var a=ri;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+ba(l)+'"][href="'+ba(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=oi(e)}if(!Ra.has(u)&&(e=x({rel:"modulepreload",href:e},t),Ra.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(lr(u)))return}l=a.createElement("link"),qt(l,"link",e),lt(l),a.head.appendChild(l)}}}function Cv(e,t,a){vn.S(e,t,a);var l=ri;if(l&&e){var o=Ct(l).hoistableStyles,u=si(e);t=t||"default";var y=o.get(u);if(!y){var S={loading:0,preload:null};if(y=l.querySelector(nr(u)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ra.get(u))&&vu(e,a);var E=y=l.createElement("link");lt(E),qt(E,"link",e),E._p=new Promise(function(L,G){E.onload=L,E.onerror=G}),E.addEventListener("load",function(){S.loading|=1}),E.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Us(y,t,l)}y={type:"stylesheet",instance:y,count:1,state:S},o.set(u,y)}}}function Rv(e,t){vn.X(e,t);var a=ri;if(a&&e){var l=Ct(a).hoistableScripts,o=oi(e),u=l.get(o);u||(u=a.querySelector(lr(o)),u||(e=x({src:e,async:!0},t),(t=Ra.get(o))&&bu(e,t),u=a.createElement("script"),lt(u),qt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function zv(e,t){vn.M(e,t);var a=ri;if(a&&e){var l=Ct(a).hoistableScripts,o=oi(e),u=l.get(o);u||(u=a.querySelector(lr(o)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Ra.get(o))&&bu(e,t),u=a.createElement("script"),lt(u),qt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function qm(e,t,a,l){var o=(o=Ne.current)?ks(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=si(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=si(a.href);var u=Ct(o).hoistableStyles,y=u.get(e);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=o.querySelector(nr(e)))&&!u._p&&(y.instance=u,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),u||Tv(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=oi(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 si(e){return'href="'+ba(e)+'"'}function nr(e){return'link[rel="stylesheet"]['+e+"]"}function Ym(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Tv(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}),qt(t,"link",a),lt(t),e.head.appendChild(t))}function oi(e){return'[src="'+ba(e)+'"]'}function lr(e){return"script[async]"+e}function Vm(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),qt(l,"style",o),Us(l,a.precedence,e),t.instance=l;case"stylesheet":o=si(a.href);var u=e.querySelector(nr(o));if(u)return t.state.loading|=4,t.instance=u,lt(u),u;l=Ym(a),(o=Ra.get(o))&&vu(l,o),u=(e.ownerDocument||e).createElement("link"),lt(u);var y=u;return y._p=new Promise(function(S,E){y.onload=S,y.onerror=E}),qt(u,"link",l),t.state.loading|=4,Us(u,a.precedence,e),t.instance=u;case"script":return u=oi(a.src),(o=e.querySelector(lr(u)))?(t.instance=o,lt(o),o):(l=a,(o=Ra.get(u))&&(l=x({},a),bu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),lt(o),qt(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,Us(l,a.precedence,e));return t.instance}function Us(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,u=o,y=0;y<l.length;y++){var S=l[y];if(S.dataset.precedence===t)u=S;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function vu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Hs=null;function Gm(e,t,a){if(Hs===null){var l=new Map,o=Hs=new Map;o.set(a,l)}else o=Hs,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 u=a[o];if(!(u[ke]||u[oe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var S=l.get(y);S?S.push(u):l.set(y,[u])}}return l}function $m(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ov(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 Km(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dv(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=si(l.href),u=t.querySelector(nr(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Bs.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,lt(u);return}u=t.ownerDocument||t,l=Ym(l),(o=Ra.get(o))&&vu(l,o),u=u.createElement("link"),lt(u);var y=u;y._p=new Promise(function(S,E){y.onload=S,y.onerror=E}),qt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Bs.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Su=0;function Mv(e,t){return e.stylesheets&&e.count===0&&Ys(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ys(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Su===0&&(Su=62500*hv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ys(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Su?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Bs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ys(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var qs=null;function Ys(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,qs=new Map,t.forEach(Av,e),qs=null,Bs.call(e))}function Av(e,t){if(!(t.state.loading&4)){var a=qs.get(e);if(a)var l=a.get(null);else{a=new Map,qs.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var y=o[u];(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"),u=a.get(y)||l,u===l&&a.set(null,o),a.set(y,o),this.count++,l=Bs.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ir={$$typeof:Q,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function Lv(e,t,a,l,o,u,y,S,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nn(0),this.hiddenUpdates=Nn(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Xm(e,t,a,l,o,u,y,S,E,L,G,F){return e=new Lv(e,t,a,y,E,L,G,F,S),t=1,u===!0&&(t|=24),u=ca(3,null,null,t),e.current=u,u.stateNode=e,t=ec(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},lc(u),e}function Qm(e){return e?(e=Bl,e):Bl}function Zm(e,t,a,l,o,u){o=Qm(o),l.context===null?l.context=o:l.pendingContext=o,l=Dn(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=Mn(e,l,t),a!==null&&(la(a,e,t),Ui(a,e,t))}function Fm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function _u(e,t){Fm(e,t),(e=e.alternate)&&Fm(e,t)}function Jm(e){if(e.tag===13||e.tag===31){var t=ol(e,67108864);t!==null&&la(t,e,67108864),_u(e,67108864)}}function Wm(e){if(e.tag===13||e.tag===31){var t=ma();t=T(t);var a=ol(e,t);a!==null&&la(a,e,t),_u(e,t)}}var Vs=!0;function kv(e,t,a,l){var o=M.T;M.T=null;var u=J.p;try{J.p=2,ju(e,t,a,l)}finally{J.p=u,M.T=o}}function Uv(e,t,a,l){var o=M.T;M.T=null;var u=J.p;try{J.p=8,ju(e,t,a,l)}finally{J.p=u,M.T=o}}function ju(e,t,a,l){if(Vs){var o=Nu(l);if(o===null)cu(e,t,l,Gs,a),Im(e,l);else if(Bv(o,e,t,a,l))l.stopPropagation();else if(Im(e,l),t&4&&-1<Hv.indexOf(e)){for(;o!==null;){var u=ht(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=Pt(u.pendingLanes);if(y!==0){var S=u;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var E=1<<31-Ot(y);S.entanglements[1]|=E,y&=~E}Ja(u),(Qe&6)===0&&(ws=Lt()+500,Ii(0))}}break;case 31:case 13:S=ol(u,2),S!==null&&la(S,u,2),Cs(),_u(u,2)}if(u=Nu(l),u===null&&cu(e,t,l,Gs,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else cu(e,t,l,null,a)}}function Nu(e){return e=Eo(e),wu(e)}var Gs=null;function wu(e){if(Gs=null,e=rt(e),e!==null){var t=d(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 Gs=e,null}function Pm(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 tl:return 8;case Ga:case sa:return 32;case Wt:return 268435456;default:return 32}default:return 32}}var Eu=!1,$n=null,Kn=null,Xn=null,rr=new Map,sr=new Map,Qn=[],Hv="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 Im(e,t){switch(e){case"focusin":case"focusout":$n=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":rr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sr.delete(t.pointerId)}}function or(e,t,a,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=ht(t),t!==null&&Jm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Bv(e,t,a,l,o){switch(t){case"focusin":return $n=or($n,e,t,a,l,o),!0;case"dragenter":return Kn=or(Kn,e,t,a,l,o),!0;case"mouseover":return Xn=or(Xn,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return rr.set(u,or(rr.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,sr.set(u,or(sr.get(u)||null,e,t,a,l,o)),!0}return!1}function ep(e){var t=rt(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,ne(e.priority,function(){Wm(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,ne(e.priority,function(){Wm(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 $s(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Nu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);wo=l,a.target.dispatchEvent(l),wo=null}else return t=ht(a),t!==null&&Jm(t),e.blockedOn=a,!1;t.shift()}return!0}function tp(e,t,a){$s(e)&&a.delete(t)}function qv(){Eu=!1,$n!==null&&$s($n)&&($n=null),Kn!==null&&$s(Kn)&&(Kn=null),Xn!==null&&$s(Xn)&&(Xn=null),rr.forEach(tp),sr.forEach(tp)}function Ks(e,t){e.blockedOn===t&&(e.blockedOn=null,Eu||(Eu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,qv)))}var Xs=null;function ap(e){Xs!==e&&(Xs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Xs===e&&(Xs=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(wu(l||a)===null)continue;break}var u=ht(a);u!==null&&(e.splice(t,3),t-=3,Nc(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function ci(e){function t(E){return Ks(E,e)}$n!==null&&Ks($n,e),Kn!==null&&Ks(Kn,e),Xn!==null&&Ks(Xn,e),rr.forEach(t),sr.forEach(t);for(var a=0;a<Qn.length;a++){var l=Qn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Qn.length&&(a=Qn[0],a.blockedOn===null);)ep(a),a.blockedOn===null&&Qn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],u=a[l+1],y=o[pe]||null;if(typeof u=="function")y||ap(a);else if(y){var S=null;if(u&&u.hasAttribute("formAction")){if(o=u,y=u[pe]||null)S=y.formAction;else if(wu(o)!==null)continue}else S=y.action;typeof S=="function"?a[l+1]=S:(a.splice(l,3),l-=3),ap(a)}}}function np(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.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 u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.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 Cu(e){this._internalRoot=e}Qs.prototype.render=Cu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=ma();Zm(a,l,e,t,null,null)},Qs.prototype.unmount=Cu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zm(e.current,2,null,e,null,null),Cs(),t[ge]=null}};function Qs(e){this._internalRoot=e}Qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=te();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Qn.length&&t!==0&&t<Qn[a].priority;a++);Qn.splice(a,0,e),a===0&&ep(e)}};var lp=i.version;if(lp!=="19.2.4")throw Error(s(527,lp,"19.2.4"));J.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 Yv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zs.isDisabled&&Zs.supportsFiber)try{ka=Zs.inject(Yv),kt=Zs}catch{}}return dr.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,l="",o=dh,u=fh,y=hh;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&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Xm(e,1,!1,null,null,a,l,null,o,u,y,np),e[ge]=t.current,ou(e),new Cu(t)},dr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var l=!1,o="",u=dh,y=fh,S=hh,E=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=Xm(e,1,!0,t,a??null,l,o,E,u,y,S,np),t.context=Qm(null),a=t.current,l=ma(),l=T(l),o=Dn(l),o.callback=null,Mn(a,o,l),a=l,t.current.lanes=a,$a(t,a),Ja(t),e[ge]=t.current,ou(e),new Qs(t)},dr.version="19.2.4",dr}var Lp;function ib(){if(Lp)return Lu.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(),Lu.exports=lb(),Lu.exports}var rb=ib();var Vg=n=>{throw TypeError(n)},sb=(n,i,r)=>i.has(n)||Vg("Cannot "+r),Bu=(n,i,r)=>(sb(n,i,"read from private field"),r?r.call(n):i.get(n)),ob=(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),kp="popstate";function Up(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function cb(n={}){function i(s,c){let d=c.state?.masked,{pathname:h,search:p,hash:g}=d||s.location;return jr("",{pathname:h,search:p,hash:g},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{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 db(i,r,null,n)}function Le(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function gt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function ub(){return Math.random().toString(36).substring(2,10)}function Hp(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 jr(n,i,r=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?_n(i):i,state:r,key:i&&i.key||s||ub(),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 _n(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 db(n,i,r,s={}){let{window:c=document.defaultView,v5Compat:d=!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 k=b(),W=k==null?null:k-m;m=k,g&&g({action:p,location:D.location,delta:W})}function _(k,W){p="PUSH";let V=Up(k)?k:jr(D.location,k,W);m=b()+1;let Q=Hp(V,m),re=D.createHref(V.unstable_mask||V);try{h.pushState(Q,"",re)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;c.location.assign(re)}d&&g&&g({action:p,location:D.location,delta:1})}function j(k,W){p="REPLACE";let V=Up(k)?k:jr(D.location,k,W);m=b();let Q=Hp(V,m),re=D.createHref(V.unstable_mask||V);h.replaceState(Q,"",re),d&&g&&g({action:p,location:D.location,delta:0})}function R(k){return Gg(k)}let D={get action(){return p},get location(){return n(c,h)},listen(k){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(kp,x),g=k,()=>{c.removeEventListener(kp,x),g=null}},createHref(k){return i(c,k)},createURL:R,encodeLocation(k){let W=R(k);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:_,replace:j,go(k){return h.go(k)}};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 gr,Bp=class{constructor(n){if(ob(this,gr,new Map),n)for(let[i,r]of n)this.set(i,r)}get(n){if(Bu(this,gr).has(n))return Bu(this,gr).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Bu(this,gr).set(n,i)}};gr=new WeakMap;var fb=new Set(["lazy","caseSensitive","path","id","index","children"]);function hb(n){return fb.has(n)}var mb=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function pb(n){return mb.has(n)}function gb(n){return n.index===!0}function Nr(n,i,r=[],s={},c=!1){return n.map((d,h)=>{let p=[...r,String(h)],g=typeof d.id=="string"?d.id:p.join("-");if(Le(d.index!==!0||!d.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`),gb(d)){let m={...d,id:g};return s[g]=qp(m,i(m)),m}else{let m={...d,id:g,children:void 0};return s[g]=qp(m,i(m)),d.children&&(m.children=Nr(d.children,i,p,s,c)),m}})}function qp(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function Fn(n,i,r="/"){return yr(n,i,r,!1)}function yr(n,i,r,s){let c=typeof i=="string"?_n(i):i,d=Oa(c.pathname||"/",r);if(d==null)return null;let h=$g(n);xb(h);let p=null;for(let g=0;p==null&&g<h.length;++g){let m=zb(d);p=Cb(h[g],m,s)}return p}function yb(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 d=(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:wb(x,h.index),routesMeta:_})};return n.forEach((h,p)=>{if(h.path===""||!h.path?.includes("?"))d(h,p);else for(let g of Kg(h.path))d(h,p,!0,g)}),i}function Kg(n){let i=n.split("/");if(i.length===0)return[];let[r,...s]=i,c=r.endsWith("?"),d=r.replace(/\?$/,"");if(s.length===0)return c?[d,""]:[d];let h=Kg(s.join("/")),p=[];return p.push(...h.map(g=>g===""?d:[d,g].join("/"))),c&&p.push(...h),p.map(g=>n.startsWith("/")&&g===""?"/":g)}function xb(n){n.sort((i,r)=>i.score!==r.score?r.score-i.score:Eb(i.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var vb=/^:[\w-]+$/,bb=3,Sb=2,_b=1,jb=10,Nb=-2,Yp=n=>n==="*";function wb(n,i){let r=n.split("/"),s=r.length;return r.some(Yp)&&(s+=Nb),i&&(s+=Sb),r.filter(c=>!Yp(c)).reduce((c,d)=>c+(vb.test(d)?bb:d===""?_b:jb),s)}function Eb(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 Cb(n,i,r=!1){let{routesMeta:s}=n,c={},d="/",h=[];for(let p=0;p<s.length;++p){let g=s[p],m=p===s.length-1,b=d==="/"?i:i.slice(d.length)||"/",x=oo({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},b),_=g.route;if(!x&&m&&r&&!s[s.length-1].route.index&&(x=oo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!x)return null;Object.assign(c,x.params),h.push({params:c,pathname:Ya([d,x.pathname]),pathnameBase:Db(Ya([d,x.pathnameBase])),route:_}),x.pathnameBase!=="/"&&(d=Ya([d,x.pathnameBase]))}return h}function oo(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=Rb(n.path,n.caseSensitive,n.end),c=i.match(r);if(!c)return null;let d=c[0],h=d.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:s.reduce((m,{paramName:b,isOptional:x},_)=>{if(b==="*"){let R=p[_]||"";h=d.slice(0,d.length-R.length).replace(/(.)\/+$/,"$1")}const j=p[_];return x&&!j?m[b]=void 0:m[b]=(j||"").replace(/%2F/g,"/"),m},{}),pathname:d,pathnameBase:h,pattern:n}}function Rb(n,i=!1,r=!0){gt(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 zb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return gt(!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 Tb({basename:n,pathname:i}){return i==="/"?n:Ya([n,i])}var Xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cd=n=>Xg.test(n);function Ob(n,i="/"){let{pathname:r,search:s="",hash:c=""}=typeof n=="string"?_n(n):n,d;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?d=Vp(r.substring(1),"/"):d=Vp(r,i)):d=i,{pathname:d,search:Mb(s),hash:Ab(c)}}function Vp(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 qu(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 ho(n){let i=Qg(n);return i.map((r,s)=>s===i.length-1?r.pathname:r.pathnameBase)}function Rr(n,i,r,s=!1){let c;typeof n=="string"?c=_n(n):(c={...n},Le(!c.pathname||!c.pathname.includes("?"),qu("?","pathname","search",c)),Le(!c.pathname||!c.pathname.includes("#"),qu("#","pathname","hash",c)),Le(!c.search||!c.search.includes("#"),qu("#","search","hash",c)));let d=n===""||c.pathname==="",h=d?"/":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=Ob(c,p),m=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(m||b)&&(g.pathname+="/"),g}var Ya=n=>n.join("/").replace(/\/\/+/g,"/"),Db=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Mb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Ab=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,zr=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 wr(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Tr(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 d=new URL(window.location.href),h=r.startsWith("//")?new URL(d.protocol+r):new URL(r),p=Oa(h.pathname,i);h.origin===d.origin&&p!=null?r=p+h.search+h.hash:c=!0}catch{gt(!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 Wn=Symbol("Uninstrumented");function Lb(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(d){let h=Object.keys(r);for(let p of h)d[p]&&r[p].push(d[p])}}));let s={};if(typeof i.lazy=="function"&&r.lazy.length>0){let c=mi(r.lazy,i.lazy,()=>{});c&&(s.lazy=c)}if(typeof i.lazy=="object"){let c=i.lazy;["middleware","loader","action"].forEach(d=>{let h=c[d],p=r[`lazy.${d}`];if(typeof h=="function"&&p.length>0){let g=mi(p,h,()=>{});g&&(s.lazy=Object.assign(s.lazy||{},{[d]:g}))}})}return["loader","action"].forEach(c=>{let d=i[c];if(typeof d=="function"&&r[c].length>0){let h=d[Wn]??d,p=mi(r[c],h,(...g)=>Gp(g[0]));p&&(c==="loader"&&h.hydrate===!0&&(p.hydrate=!0),p[Wn]=h,s[c]=p)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let d=c[Wn]??c,h=mi(r.middleware,d,(...p)=>Gp(p[0]));return h?(h[Wn]=d,h):c})),s}function kb(n,i){let r={navigate:[],fetch:[]};if(i.forEach(s=>s({instrument(c){let d=Object.keys(c);for(let h of d)c[h]&&r[h].push(c[h])}})),r.navigate.length>0){let s=n.navigate[Wn]??n.navigate,c=mi(r.navigate,s,(...d)=>{let[h,p]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?Pa(h):".",...$p(n,p??{})}});c&&(c[Wn]=s,n.navigate=c)}if(r.fetch.length>0){let s=n.fetch[Wn]??n.fetch,c=mi(r.fetch,s,(...d)=>{let[h,,p,g]=d;return{href:p??".",fetcherKey:h,...$p(n,g??{})}});c&&(c[Wn]=s,n.fetch=c)}return n}function mi(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],d;if(c){let h,p=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=Jg(n,i,r,s-1),d=await h,Le(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.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{d={type:"success",value:await r()}}catch(h){d={type:"error",value:h}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Gp(n){let{request:i,context:r,params:s,unstable_pattern:c}=n;return{request:Ub(i),params:{...s},unstable_pattern:c,context:Hb(r)}}function $p(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 Ub(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function Hb(n){if(qb(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var Bb=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qb(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")===Bb}var Wg=["POST","PUT","PATCH","DELETE"],Yb=new Set(Wg),Vb=["GET",...Wg],Gb=new Set(Vb),Pg=new Set([301,302,303,307,308]),$b=new Set([307,308]),Yu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Kb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xb=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Ig="remix-router-transitions",ey=Symbol("ResetLoaderData");function Qb(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||Xb,d=c;if(n.unstable_instrumentations){let C=n.unstable_instrumentations;d=T=>({...c(T),...Lb(C.map(H=>H.route).filter(Boolean),T)})}let h={},p=Nr(n.routes,d,void 0,h),g,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let b=n.dataStrategy||Pb,x={...n.future},_=null,j=new Set,R=null,D=null,k=null,W=n.hydrationData!=null,V=Fn(p,n.history.location,m),Q=!1,re=null,ae,P;if(V==null&&!n.patchRoutesOnNavigation){let C=za(404,{pathname:n.history.location.pathname}),{matches:T,route:H}=Js(p);ae=!0,P=!ae,V=T,re={[H.id]:C}}else if(V&&!n.hydrationData&&Nn(V,p,n.history.location.pathname).active&&(V=null),V)if(V.some(C=>C.route.lazy))ae=!1,P=!ae;else if(!V.some(C=>ud(C.route)))ae=!0,P=!ae;else{let C=n.hydrationData?n.hydrationData.loaderData:null,T=n.hydrationData?n.hydrationData.errors:null,H=V;if(T){let te=V.findIndex(ne=>T[ne.route.id]!==void 0);H=H.slice(0,te+1)}P=!1,ae=H.every(te=>{let ne=ty(te.route,C,T);return P=P||ne.renderFallback,!ne.shouldLoad})}else{ae=!1,P=!ae,V=[];let C=Nn(null,p,n.history.location.pathname);C.active&&C.matches&&(Q=!0,V=C.matches)}let Y,N={historyAction:n.history.action,location:n.history.location,matches:V,initialized:ae,renderFallback:P,navigation:Yu,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||re,fetchers:new Map,blockers:new Map},K="POP",X=null,de=!1,ie,I=!1,le=new Map,me=null,M=!1,J=!1,ue=new Set,$=new Map,fe=0,w=-1,B=new Map,ee=new Set,se=new Map,Se=new Map,Ne=new Set,Te=new Map,ut,he=null;function Tt(){if(_=n.history.listen(({action:C,location:T,delta:H})=>{if(ut){ut(),ut=void 0;return}gt(Te.size===0||H!=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 te=We({currentLocation:N.location,nextLocation:T,historyAction:C});if(te&&H!=null){let ne=new Promise(ye=>{ut=ye});n.history.go(H*-1),yt(te,{state:"blocked",location:T,proceed(){yt(te,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),ne.then(()=>n.history.go(H))},reset(){let ye=new Map(N.blockers);ye.set(te,fr),Je({blockers:ye})}}),X?.resolve(),X=null;return}return Jt(C,T)}),r){g1(i,le);let C=()=>y1(i,le);i.addEventListener("pagehide",C),me=()=>i.removeEventListener("pagehide",C)}return N.initialized||Jt("POP",N.location,{initialHydration:!0}),Y}function Yt(){_&&_(),me&&me(),j.clear(),ie&&ie.abort(),N.fetchers.forEach((C,T)=>ka(T)),N.blockers.forEach((C,T)=>tt(T))}function it(C){return j.add(C),()=>j.delete(C)}function Je(C,T={}){C.matches&&(C.matches=C.matches.map(ne=>{let ye=h[ne.route.id],oe=ne.route;return oe.element!==ye.element||oe.errorElement!==ye.errorElement||oe.hydrateFallbackElement!==ye.hydrateFallbackElement?{...ne,route:ye}:ne})),N={...N,...C};let H=[],te=[];N.fetchers.forEach((ne,ye)=>{ne.state==="idle"&&(Ne.has(ye)?H.push(ye):te.push(ye))}),Ne.forEach(ne=>{!N.fetchers.has(ne)&&!$.has(ne)&&H.push(ne)}),[...j].forEach(ne=>ne(N,{deletedFetchers:H,newErrors:C.errors??null,viewTransitionOpts:T.viewTransitionOpts,flushSync:T.flushSync===!0})),H.forEach(ne=>ka(ne)),te.forEach(ne=>N.fetchers.delete(ne))}function ft(C,T,{flushSync:H}={}){let te=N.actionData!=null&&N.navigation.formMethod!=null&&Kt(N.navigation.formMethod)&&N.navigation.state==="loading"&&C.state?._isRedirect!==!0,ne;T.actionData?Object.keys(T.actionData).length>0?ne=T.actionData:ne=null:te?ne=N.actionData:ne=null;let ye=T.loaderData?eg(N.loaderData,T.loaderData,T.matches||[],T.errors):N.loaderData,oe=N.blockers;oe.size>0&&(oe=new Map(oe),oe.forEach((we,be)=>oe.set(be,fr)));let pe=M?!1:al(C,T.matches||N.matches),ge=de===!0||N.navigation.formMethod!=null&&Kt(N.navigation.formMethod)&&C.state?._isRedirect!==!0;g&&(p=g,g=void 0),M||K==="POP"||(K==="PUSH"?n.history.push(C,C.state):K==="REPLACE"&&n.history.replace(C,C.state));let _e;if(K==="POP"){let we=le.get(N.location.pathname);we&&we.has(C.pathname)?_e={currentLocation:N.location,nextLocation:C}:le.has(C.pathname)&&(_e={currentLocation:C,nextLocation:N.location})}else if(I){let we=le.get(N.location.pathname);we?we.add(C.pathname):(we=new Set([C.pathname]),le.set(N.location.pathname,we)),_e={currentLocation:N.location,nextLocation:C}}Je({...T,actionData:ne,loaderData:ye,historyAction:K,location:C,initialized:!0,renderFallback:!1,navigation:Yu,revalidation:"idle",restoreScrollPosition:pe,preventScrollReset:ge,blockers:oe},{viewTransitionOpts:_e,flushSync:H===!0}),K="POP",de=!1,I=!1,M=!1,J=!1,X?.resolve(),X=null,he?.resolve(),he=null}async function At(C,T){if(X?.resolve(),X=null,typeof C=="number"){X||(X=lg());let at=X.promise;return n.history.go(C),at}let H=ed(N.location,N.matches,m,C,T?.fromRouteId,T?.relative),{path:te,submission:ne,error:ye}=Kp(!1,H,T),oe;T?.unstable_mask&&(oe={pathname:"",search:"",hash:"",...typeof T.unstable_mask=="string"?_n(T.unstable_mask):{...N.location.unstable_mask,...T.unstable_mask}});let pe=N.location,ge=jr(pe,te,T&&T.state,void 0,oe);ge={...ge,...n.history.encodeLocation(ge)};let _e=T&&T.replace!=null?T.replace:void 0,we="PUSH";_e===!0?we="REPLACE":_e===!1||ne!=null&&Kt(ne.formMethod)&&ne.formAction===N.location.pathname+N.location.search&&(we="REPLACE");let be=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,$e=(T&&T.flushSync)===!0,ke=We({currentLocation:pe,nextLocation:ge,historyAction:we});if(ke){yt(ke,{state:"blocked",location:ge,proceed(){yt(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),At(C,T)},reset(){let at=new Map(N.blockers);at.set(ke,fr),Je({blockers:at})}});return}await Jt(we,ge,{submission:ne,pendingError:ye,preventScrollReset:be,replace:T&&T.replace,enableViewTransition:T&&T.viewTransition,flushSync:$e,callSiteDefaultShouldRevalidate:T&&T.unstable_defaultShouldRevalidate})}function Aa(){he||(he=lg()),Ga(),Je({revalidation:"loading"});let C=he.promise;return N.navigation.state==="submitting"?C:N.navigation.state==="idle"?(Jt(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),C):(Jt(K||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:I===!0}),C)}async function Jt(C,T,H){ie&&ie.abort(),ie=null,K=C,M=(H&&H.startUninterruptedRevalidation)===!0,Si(N.location,N.matches),de=(H&&H.preventScrollReset)===!0,I=(H&&H.enableViewTransition)===!0;let te=g||p,ne=H&&H.overrideNavigation,ye=H?.initialHydration&&N.matches&&N.matches.length>0&&!Q?N.matches:Fn(te,T,m),oe=(H&&H.flushSync)===!0;if(ye&&N.initialized&&!J&&r1(N.location,T)&&!(H&&H.submission&&Kt(H.submission.formMethod))){ft(T,{matches:ye},{flushSync:oe});return}let pe=Nn(ye,te,T.pathname);if(pe.active&&pe.matches&&(ye=pe.matches),!ye){let{error:rt,notFoundMatches:ht,route:Ge}=Pt(T.pathname);ft(T,{matches:ht,loaderData:{},errors:{[Ge.id]:rt}},{flushSync:oe});return}ie=new AbortController;let ge=fi(n.history,T,ie.signal,H&&H.submission),_e=n.getContext?await n.getContext():new Bp,we;if(H&&H.pendingError)we=[Jn(ye).route.id,{type:"error",error:H.pendingError}];else if(H&&H.submission&&Kt(H.submission.formMethod)){let rt=await Vt(ge,T,H.submission,ye,_e,pe.active,H&&H.initialHydration===!0,{replace:H.replace,flushSync:oe});if(rt.shortCircuited)return;if(rt.pendingActionResult){let[ht,Ge]=rt.pendingActionResult;if(pa(Ge)&&wr(Ge.error)&&Ge.error.status===404){ie=null,ft(T,{matches:rt.matches,loaderData:{},errors:{[ht]:Ge.error}});return}}ye=rt.matches||ye,we=rt.pendingActionResult,ne=Vu(T,H.submission),oe=!1,pe.active=!1,ge=fi(n.history,ge.url,ge.signal)}let{shortCircuited:be,matches:$e,loaderData:ke,errors:at}=await ya(ge,T,ye,_e,pe.active,ne,H&&H.submission,H&&H.fetcherSubmission,H&&H.replace,H&&H.initialHydration===!0,oe,we,H&&H.callSiteDefaultShouldRevalidate);be||(ie=null,ft(T,{matches:$e||ye,...tg(we),loaderData:ke,errors:at}))}async function Vt(C,T,H,te,ne,ye,oe,pe={}){Ga();let ge=m1(T,H);if(Je({navigation:ge},{flushSync:pe.flushSync===!0}),ye){let be=await $a(te,T.pathname,C.signal);if(be.type==="aborted")return{shortCircuited:!0};if(be.type==="error"){if(be.partialMatches.length===0){let{matches:ke,route:at}=Js(p);return{matches:ke,pendingActionResult:[at.id,{type:"error",error:be.error}]}}let $e=Jn(be.partialMatches).route.id;return{matches:be.partialMatches,pendingActionResult:[$e,{type:"error",error:be.error}]}}else if(be.matches)te=be.matches;else{let{notFoundMatches:$e,error:ke,route:at}=Pt(T.pathname);return{matches:$e,pendingActionResult:[at.id,{type:"error",error:ke}]}}}let _e,we=ao(te,T);if(!we.route.action&&!we.route.lazy)_e={type:"error",error:za(405,{method:C.method,pathname:T.pathname,routeId:we.route.id})};else{let be=pi(d,h,C,te,we,oe?[]:s,ne),$e=await La(C,be,ne,null);if(_e=$e[we.route.id],!_e){for(let ke of te)if($e[ke.route.id]){_e=$e[ke.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(_l(_e)){let be;return pe&&pe.replace!=null?be=pe.replace:be=Wp(_e.response.headers.get("Location"),new URL(C.url),m,n.history)===N.location.pathname+N.location.search,await xa(C,_e,!0,{submission:H,replace:be}),{shortCircuited:!0}}if(pa(_e)){let be=Jn(te,we.route.id);return(pe&&pe.replace)!==!0&&(K="PUSH"),{matches:te,pendingActionResult:[be.route.id,_e,we.route.id]}}return{matches:te,pendingActionResult:[we.route.id,_e]}}async function ya(C,T,H,te,ne,ye,oe,pe,ge,_e,we,be,$e){let ke=ye||Vu(T,oe),at=oe||pe||ng(ke),rt=!M&&!_e;if(ne){if(rt){let xt=ra(be);Je({navigation:ke,...xt!==void 0?{actionData:xt}:{}},{flushSync:we})}let Ue=await $a(H,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}=Js(p);return{matches:Gt,loaderData:{},errors:{[_t.id]:Ue.error}}}let xt=Jn(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,loaderData:{},errors:{[xt]:Ue.error}}}else if(Ue.matches)H=Ue.matches;else{let{error:xt,notFoundMatches:Gt,route:_t}=Pt(T.pathname);return{matches:Gt,loaderData:{},errors:{[_t.id]:xt}}}}let ht=g||p,{dsMatches:Ge,revalidatingFetchers:Ct}=Xp(C,te,d,h,n.history,N,H,at,T,_e?[]:s,_e===!0,J,ue,Ne,se,ee,ht,m,n.patchRoutesOnNavigation!=null,be,$e);if(w=++fe,!n.dataStrategy&&!Ge.some(Ue=>Ue.shouldLoad)&&!Ge.some(Ue=>Ue.route.middleware&&Ue.route.middleware.length>0)&&Ct.length===0){let Ue=Cl();return ft(T,{matches:H,loaderData:{},errors:be&&pa(be[1])?{[be[0]]:be[1].error}:null,...tg(be),...Ue?{fetchers:new Map(N.fetchers)}:{}},{flushSync:we}),{shortCircuited:!0}}if(rt){let Ue={};if(!ne){Ue.navigation=ke;let xt=ra(be);xt!==void 0&&(Ue.actionData=xt)}Ct.length>0&&(Ue.fetchers=en(Ct)),Je(Ue,{flushSync:we})}Ct.forEach(Ue=>{St(Ue.key),Ue.controller&&$.set(Ue.key,Ue.controller)});let lt=()=>Ct.forEach(Ue=>St(Ue.key));ie&&ie.signal.addEventListener("abort",lt);let{loaderResults:wn,fetcherResults:Ua}=await tl(Ge,Ct,C,te);if(C.signal.aborted)return{shortCircuited:!0};ie&&ie.signal.removeEventListener("abort",lt),Ct.forEach(Ue=>$.delete(Ue.key));let Dt=Ws(wn);if(Dt)return await xa(C,Dt.result,!0,{replace:ge}),{shortCircuited:!0};if(Dt=Ws(Ua),Dt)return ee.add(Dt.key),await xa(C,Dt.result,!0,{replace:ge}),{shortCircuited:!0};let{loaderData:Ka,errors:nl}=Ip(N,H,wn,be,Ct,Ua);_e&&N.errors&&(nl={...N.errors,...nl});let Xa=Cl(),ll=ce(w),Rl=Xa||ll||Ct.length>0;return{matches:H,loaderData:Ka,errors:nl,...Rl?{fetchers:new Map(N.fetchers)}:{}}}function ra(C){if(C&&!pa(C[1]))return{[C[0]]:C[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function en(C){return C.forEach(T=>{let H=N.fetchers.get(T.key),te=hr(void 0,H?H.data:void 0);N.fetchers.set(T.key,te)}),new Map(N.fetchers)}async function el(C,T,H,te){St(C);let ne=(te&&te.flushSync)===!0,ye=g||p,oe=ed(N.location,N.matches,m,H,T,te?.relative),pe=Fn(ye,oe,m),ge=Nn(pe,ye,oe);if(ge.active&&ge.matches&&(pe=ge.matches),!pe){Wt(C,T,za(404,{pathname:oe}),{flushSync:ne});return}let{path:_e,submission:we,error:be}=Kp(!0,oe,te);if(be){Wt(C,T,be,{flushSync:ne});return}let $e=n.getContext?await n.getContext():new Bp,ke=(te&&te.preventScrollReset)===!0;if(we&&Kt(we.formMethod)){await jn(C,T,_e,pe,$e,ge.active,ne,ke,we,te&&te.unstable_defaultShouldRevalidate);return}se.set(C,{routeId:T,path:_e}),await Lt(C,T,_e,pe,$e,ge.active,ne,ke,we)}async function jn(C,T,H,te,ne,ye,oe,pe,ge,_e){Ga(),se.delete(C);let we=N.fetchers.get(C);sa(C,p1(ge,we),{flushSync:oe});let be=new AbortController,$e=fi(n.history,H,be.signal,ge);if(ye){let st=await $a(te,new URL($e.url).pathname,$e.signal,C);if(st.type==="aborted")return;if(st.type==="error"){Wt(C,T,st.error,{flushSync:oe});return}else if(st.matches)te=st.matches;else{Wt(C,T,za(404,{pathname:H}),{flushSync:oe});return}}let ke=ao(te,H);if(!ke.route.action&&!ke.route.lazy){let st=za(405,{method:ge.formMethod,pathname:H,routeId:T});Wt(C,T,st,{flushSync:oe});return}$.set(C,be);let at=fe,rt=pi(d,h,$e,te,ke,s,ne),ht=await La($e,rt,ne,C),Ge=ht[ke.route.id];if(!Ge){for(let st of rt)if(ht[st.route.id]){Ge=ht[st.route.id];break}}if($e.signal.aborted){$.get(C)===be&&$.delete(C);return}if(Ne.has(C)){if(_l(Ge)||pa(Ge)){sa(C,bn(void 0));return}}else{if(_l(Ge))if($.delete(C),w>at){sa(C,bn(void 0));return}else return ee.add(C),sa(C,hr(ge)),xa($e,Ge,!1,{fetcherSubmission:ge,preventScrollReset:pe});if(pa(Ge)){Wt(C,T,Ge.error);return}}let Ct=N.navigation.location||N.location,lt=fi(n.history,Ct,be.signal),wn=g||p,Ua=N.navigation.state!=="idle"?Fn(wn,N.navigation.location,m):N.matches;Le(Ua,"Didn't find any matches after fetcher action");let Dt=++fe;B.set(C,Dt);let Ka=hr(ge,Ge.data);N.fetchers.set(C,Ka);let{dsMatches:nl,revalidatingFetchers:Xa}=Xp(lt,ne,d,h,n.history,N,Ua,ge,Ct,s,!1,J,ue,Ne,se,ee,wn,m,n.patchRoutesOnNavigation!=null,[ke.route.id,Ge],_e);Xa.filter(st=>st.key!==C).forEach(st=>{let zl=st.key,Tl=N.fetchers.get(zl),Hr=hr(void 0,Tl?Tl.data:void 0);N.fetchers.set(zl,Hr),St(zl),st.controller&&$.set(zl,st.controller)}),Je({fetchers:new Map(N.fetchers)});let ll=()=>Xa.forEach(st=>St(st.key));be.signal.addEventListener("abort",ll);let{loaderResults:Rl,fetcherResults:Ue}=await tl(nl,Xa,lt,ne);if(be.signal.aborted)return;if(be.signal.removeEventListener("abort",ll),B.delete(C),$.delete(C),Xa.forEach(st=>$.delete(st.key)),N.fetchers.has(C)){let st=bn(Ge.data);N.fetchers.set(C,st)}let xt=Ws(Rl);if(xt)return xa(lt,xt.result,!1,{preventScrollReset:pe});if(xt=Ws(Ue),xt)return ee.add(xt.key),xa(lt,xt.result,!1,{preventScrollReset:pe});let{loaderData:Gt,errors:_t}=Ip(N,Ua,Rl,void 0,Xa,Ue);ce(Dt),N.navigation.state==="loading"&&Dt>w?(Le(K,"Expected pending action"),ie&&ie.abort(),ft(N.navigation.location,{matches:Ua,loaderData:Gt,errors:_t,fetchers:new Map(N.fetchers)})):(Je({errors:_t,loaderData:eg(N.loaderData,Gt,Ua,_t),fetchers:new Map(N.fetchers)}),J=!1)}async function Lt(C,T,H,te,ne,ye,oe,pe,ge){let _e=N.fetchers.get(C);sa(C,hr(ge,_e?_e.data:void 0),{flushSync:oe});let we=new AbortController,be=fi(n.history,H,we.signal);if(ye){let Ge=await $a(te,new URL(be.url).pathname,be.signal,C);if(Ge.type==="aborted")return;if(Ge.type==="error"){Wt(C,T,Ge.error,{flushSync:oe});return}else if(Ge.matches)te=Ge.matches;else{Wt(C,T,za(404,{pathname:H}),{flushSync:oe});return}}let $e=ao(te,H);$.set(C,we);let ke=fe,at=pi(d,h,be,te,$e,s,ne),ht=(await La(be,at,ne,C))[$e.route.id];if($.get(C)===we&&$.delete(C),!be.signal.aborted){if(Ne.has(C)){sa(C,bn(void 0));return}if(_l(ht))if(w>ke){sa(C,bn(void 0));return}else{ee.add(C),await xa(be,ht,!1,{preventScrollReset:pe});return}if(pa(ht)){Wt(C,T,ht.error);return}sa(C,bn(ht.data))}}async function xa(C,T,H,{submission:te,fetcherSubmission:ne,preventScrollReset:ye,replace:oe}={}){H||(X?.resolve(),X=null),T.response.headers.has("X-Remix-Revalidate")&&(J=!0);let pe=T.response.headers.get("Location");Le(pe,"Expected a Location header on the redirect Response"),pe=Wp(pe,new URL(C.url),m,n.history);let ge=jr(N.location,pe,{_isRedirect:!0});if(r){let at=!1;if(T.response.headers.has("X-Remix-Reload-Document"))at=!0;else if(cd(pe)){const rt=Gg(pe,!0);at=rt.origin!==i.location.origin||Oa(rt.pathname,m)==null}if(at){oe?i.location.replace(pe):i.location.assign(pe);return}}ie=null;let _e=oe===!0||T.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:we,formAction:be,formEncType:$e}=N.navigation;!te&&!ne&&we&&be&&$e&&(te=ng(N.navigation));let ke=te||ne;if($b.has(T.response.status)&&ke&&Kt(ke.formMethod))await Jt(_e,ge,{submission:{...ke,formAction:pe},preventScrollReset:ye||de,enableViewTransition:H?I:void 0});else{let at=Vu(ge,te);await Jt(_e,ge,{overrideNavigation:at,fetcherSubmission:ne,preventScrollReset:ye||de,enableViewTransition:H?I:void 0})}}async function La(C,T,H,te){let ne,ye={};try{ne=await e1(b,C,T,te,H,!1)}catch(oe){return T.filter(pe=>pe.shouldLoad).forEach(pe=>{ye[pe.route.id]={type:"error",error:oe}}),ye}if(C.signal.aborted)return ye;if(!Kt(C.method))for(let oe of T){if(ne[oe.route.id]?.type==="error")break;!ne.hasOwnProperty(oe.route.id)&&!N.loaderData.hasOwnProperty(oe.route.id)&&(!N.errors||!N.errors.hasOwnProperty(oe.route.id))&&oe.shouldCallHandler()&&(ne[oe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${oe.route.id}`)})}for(let[oe,pe]of Object.entries(ne))if(u1(pe)){let ge=pe.result;ye[oe]={type:"redirect",response:l1(ge,C,oe,T,m)}}else ye[oe]=await n1(pe);return ye}async function tl(C,T,H,te){let ne=La(H,C,te,null),ye=Promise.all(T.map(async ge=>{if(ge.matches&&ge.match&&ge.request&&ge.controller){let we=(await La(ge.request,ge.matches,te,ge.key))[ge.match.route.id];return{[ge.key]:we}}else return Promise.resolve({[ge.key]:{type:"error",error:za(404,{pathname:ge.path})}})})),oe=await ne,pe=(await ye).reduce((ge,_e)=>Object.assign(ge,_e),{});return{loaderResults:oe,fetcherResults:pe}}function Ga(){J=!0,se.forEach((C,T)=>{$.has(T)&&ue.add(T),St(T)})}function sa(C,T,H={}){N.fetchers.set(C,T),Je({fetchers:new Map(N.fetchers)},{flushSync:(H&&H.flushSync)===!0})}function Wt(C,T,H,te={}){let ne=Jn(N.matches,T);ka(C),Je({errors:{[ne.route.id]:H},fetchers:new Map(N.fetchers)},{flushSync:(te&&te.flushSync)===!0})}function El(C){return Se.set(C,(Se.get(C)||0)+1),Ne.has(C)&&Ne.delete(C),N.fetchers.get(C)||Kb}function bi(C,T){St(C,T?.reason),sa(C,bn(null))}function ka(C){let T=N.fetchers.get(C);$.has(C)&&!(T&&T.state==="loading"&&B.has(C))&&St(C),se.delete(C),B.delete(C),ee.delete(C),Ne.delete(C),ue.delete(C),N.fetchers.delete(C)}function kt(C){let T=(Se.get(C)||0)-1;T<=0?(Se.delete(C),Ne.add(C)):Se.set(C,T),Je({fetchers:new Map(N.fetchers)})}function St(C,T){let H=$.get(C);H&&(H.abort(T),$.delete(C))}function Ot(C){for(let T of C){let H=El(T),te=bn(H.data);N.fetchers.set(T,te)}}function Cl(){let C=[],T=!1;for(let H of ee){let te=N.fetchers.get(H);Le(te,`Expected fetcher: ${H}`),te.state==="loading"&&(ee.delete(H),C.push(H),T=!0)}return Ot(C),T}function ce(C){let T=[];for(let[H,te]of B)if(te<C){let ne=N.fetchers.get(H);Le(ne,`Expected fetcher: ${H}`),ne.state==="loading"&&(St(H),B.delete(H),T.push(H))}return Ot(T),T.length>0}function Re(C,T){let H=N.blockers.get(C)||fr;return Te.get(C)!==T&&Te.set(C,T),H}function tt(C){N.blockers.delete(C),Te.delete(C)}function yt(C,T){let H=N.blockers.get(C)||fr;Le(H.state==="unblocked"&&T.state==="blocked"||H.state==="blocked"&&T.state==="blocked"||H.state==="blocked"&&T.state==="proceeding"||H.state==="blocked"&&T.state==="unblocked"||H.state==="proceeding"&&T.state==="unblocked",`Invalid blocker state transition: ${H.state} -> ${T.state}`);let te=new Map(N.blockers);te.set(C,T),Je({blockers:te})}function We({currentLocation:C,nextLocation:T,historyAction:H}){if(Te.size===0)return;Te.size>1&&gt(!1,"A router only supports one blocker at a time");let te=Array.from(Te.entries()),[ne,ye]=te[te.length-1],oe=N.blockers.get(ne);if(!(oe&&oe.state==="proceeding")&&ye({currentLocation:C,nextLocation:T,historyAction:H}))return ne}function Pt(C){let T=za(404,{pathname:C}),H=g||p,{matches:te,route:ne}=Js(H);return{notFoundMatches:te,route:ne,error:T}}function tn(C,T,H){if(R=C,k=T,D=H||null,!W&&N.navigation===Yu){W=!0;let te=al(N.location,N.matches);te!=null&&Je({restoreScrollPosition:te})}return()=>{R=null,k=null,D=null}}function va(C,T){return D&&D(C,T.map(te=>yb(te,N.loaderData)))||C.key}function Si(C,T){if(R&&k){let H=va(C,T);R[H]=k()}}function al(C,T){if(R){let H=va(C,T),te=R[H];if(typeof te=="number")return te}return null}function Nn(C,T,H){if(n.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:yr(T,H,m,!0)}}else return{active:!0,matches:yr(T,H,m,!0)||[]};return{active:!1,matches:null}}async function $a(C,T,H,te){if(!n.patchRoutesOnNavigation)return{type:"success",matches:C};let ne=C;for(;;){let ye=g==null,oe=g||p,pe=h;try{await n.patchRoutesOnNavigation({signal:H,path:T,matches:ne,fetcherKey:te,patch:(we,be)=>{H.aborted||Qp(we,be,oe,pe,d,!1)}})}catch(we){return{type:"error",error:we,partialMatches:ne}}finally{ye&&!H.aborted&&(p=[...p])}if(H.aborted)return{type:"aborted"};let ge=Fn(oe,T,m),_e=null;if(ge){if(Object.keys(ge[0].params).length===0)return{type:"success",matches:ge};if(_e=yr(oe,T,m,!0),!(_e&&ne.length<_e.length&&Lr(ne,_e.slice(0,ne.length))))return{type:"success",matches:ge}}if(_e||(_e=yr(oe,T,m,!0)),!_e||Lr(ne,_e))return{type:"success",matches:null};ne=_e}}function Lr(C,T){return C.length===T.length&&C.every((H,te)=>H.route.id===T[te].route.id)}function kr(C){h={},g=Nr(C,d,void 0,h)}function Ur(C,T,H=!1){let te=g==null;Qp(C,T,g||p,h,d,H),te&&(p=[...p],Je({}))}return Y={get basename(){return m},get future(){return x},get state(){return N},get routes(){return p},get window(){return i},initialize:Tt,subscribe:it,enableScrollRestoration:tn,navigate:At,fetch:el,revalidate:Aa,createHref:C=>n.history.createHref(C),encodeLocation:C=>n.history.encodeLocation(C),getFetcher:El,resetFetcher:bi,deleteFetcher:kt,dispose:Yt,getBlocker:Re,deleteBlocker:tt,patchRoutes:Ur,_internalFetchControllers:$,_internalSetRoutes:kr,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){Je(C)}},n.unstable_instrumentations&&(Y=kb(Y,n.unstable_instrumentations.map(C=>C.router).filter(Boolean))),Y}function Zb(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function ed(n,i,r,s,c,d){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=Rr(s||".",ho(h),Oa(n.pathname,r)||n.pathname,d==="path");if(s==null&&(g.search=n.search,g.hash=n.hash),(s==null||s===""||s===".")&&p){let m=fd(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=Tb({basename:r,pathname:g.pathname})),Pa(g)}function Kp(n,i,r){if(!r||!Zb(r))return{path:i};if(r.formMethod&&!h1(r.formMethod))return{path:i,error:za(405,{method:r.formMethod})};let s=()=>({path:i,error:za(400,{type:"invalid-body"})}),d=(r.formMethod||"get").toUpperCase(),h=sy(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Kt(d))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,R])=>`${_}${j}=${R}
10
+ `,""):String(r.body);return{path:i,submission:{formMethod:d,formAction:h,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Kt(d))return s();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:d,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=Pp(p);else if(r.body==null)p=new URLSearchParams,g=new FormData;else try{p=new URLSearchParams(r.body),g=Pp(p)}catch{return s()}let m={formMethod:d,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=_n(i);return n&&b.search&&fd(b.search)&&p.append("index",""),b.search=`?${p}`,{path:Pa(b),submission:m}}function Xp(n,i,r,s,c,d,h,p,g,m,b,x,_,j,R,D,k,W,V,Q,re){let ae=Q?pa(Q[1])?Q[1].error:Q[1].data:void 0,P=c.createURL(d.location),Y=c.createURL(g),N;if(b&&d.errors){let me=Object.keys(d.errors)[0];N=h.findIndex(M=>M.route.id===me)}else if(Q&&pa(Q[1])){let me=Q[0];N=h.findIndex(M=>M.route.id===me)-1}let K=Q?Q[1].statusCode:void 0,X=K&&K>=400,de={currentUrl:P,currentParams:d.matches[0]?.params||{},nextUrl:Y,nextParams:h[0].params,...p,actionResult:ae,actionStatus:K},ie=Tr(h),I=h.map((me,M)=>{let{route:J}=me,ue=null;if(N!=null&&M>N)ue=!1;else if(J.lazy)ue=!0;else if(!ud(J))ue=!1;else if(b){let{shouldLoad:B}=ty(J,d.loaderData,d.errors);ue=B}else Fb(d.loaderData,d.matches[M],me)&&(ue=!0);if(ue!==null)return td(r,s,n,ie,me,m,i,ue);let $=!1;typeof re=="boolean"?$=re:X?$=!1:(x||P.pathname+P.search===Y.pathname+Y.search||P.search!==Y.search||Jb(d.matches[M],me))&&($=!0);let fe={...de,defaultShouldRevalidate:$},w=Sr(me,fe);return td(r,s,n,ie,me,m,i,w,fe,re)}),le=[];return R.forEach((me,M)=>{if(b||!h.some(se=>se.route.id===me.routeId)||j.has(M))return;let J=d.fetchers.get(M),ue=J&&J.state!=="idle"&&J.data===void 0,$=Fn(k,me.path,W);if(!$){if(V&&ue)return;le.push({key:M,routeId:me.routeId,path:me.path,matches:null,match:null,request:null,controller:null});return}if(D.has(M))return;let fe=ao($,me.path),w=new AbortController,B=fi(c,me.path,w.signal),ee=null;if(_.has(M))_.delete(M),ee=pi(r,s,B,$,fe,m,i);else if(ue)x&&(ee=pi(r,s,B,$,fe,m,i));else{let se;typeof re=="boolean"?se=re:X?se=!1:se=x;let Se={...de,defaultShouldRevalidate:se};Sr(fe,Se)&&(ee=pi(r,s,B,$,fe,m,i,Se))}ee&&le.push({key:M,routeId:me.routeId,path:me.path,matches:ee,match:fe,request:B,controller:w})}),{dsMatches:I,revalidatingFetchers:le}}function ud(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(!ud(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 d=!s&&!c;return{shouldLoad:d,renderFallback:d}}function Fb(n,i,r){let s=!i||r.route.id!==i.route.id,c=!n.hasOwnProperty(r.route.id);return s||c}function Jb(n,i){let r=n.route.path;return n.pathname!==i.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==i.params["*"]}function Sr(n,i){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function Qp(n,i,r,s,c,d){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=Nr(p,c,[n||"_","patch",String(h?.length||"0")],s);h.push(...m)}if(d&&g.length>0)for(let m=0;m<g.length;m++){let{existingRoute:b,newRoute:x}=g[m],_=b,[j]=Nr([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 Zp=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 d=c.lazy[n];if(!d)return;let h=Zp.get(c);h||(h={},Zp.set(c,h));let p=h[n];if(p)return p;let g=(async()=>{let m=hb(n),x=c[n]!==void 0&&n!=="hasErrorBoundary";if(m)gt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(x)gt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let _=await d();_!=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},Fp=new WeakMap;function Wb(n,i,r,s,c){let d=r[n.id];if(Le(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let b=Fp.get(d);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 R in _){let D=_[R];if(D===void 0)continue;let k=pb(R),V=d[R]!==void 0&&R!=="hasErrorBoundary";k?gt(!k,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):V?gt(!V,`Route "${d.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):j[R]=D}Object.assign(d,j),Object.assign(d,{...s(d),lazy:void 0})})();return Fp.set(d,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 Jp(n){let i=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(i.map(c=>c.resolve()))).forEach((c,d)=>{r[i[d].route.id]=c}),r}async function Pb(n){return n.matches.some(i=>i.route.middleware)?ly(n,()=>Jp(n)):Jp(n)}function ly(n,i){return Ib(n,i,s=>{if(f1(s))throw s;return s},o1,r);function r(s,c,d){if(d)return Promise.resolve(Object.assign(d.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=Jn(h,h[p].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:s}})}}}async function Ib(n,i,r,s,c){let{matches:d,request:h,params:p,context:g,unstable_pattern:m}=n,b=d.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,d,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,d,h+1)},x.value}catch(j){return x={value:await d(j,m,x)},x.value}};try{let j=await b(n,_),R=j!=null?s(j):void 0;return c(R)?R:x?R??x.value:(x={value:await _()},x.value)}catch(j){return await d(j,m,x)}}function ry(n,i,r,s,c){let d=ny({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),h=Wb(s.route,Kt(r.method)?"action":"loader",i,n,c);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function td(n,i,r,s,c,d,h,p,g=null,m){let b=!1,x=ry(n,i,r,c,d);return{...c,_lazyPromises:x,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(_){return b=!0,g?typeof m=="boolean"?Sr(c,{...g,defaultShouldRevalidate:m}):typeof _=="boolean"?Sr(c,{...g,defaultShouldRevalidate:_}):Sr(c,g):p},resolve(_){let{lazy:j,loader:R,middleware:D}=c.route,k=b||p||_&&!Kt(r.method)&&(j||R),W=D&&D.length>0&&!R&&!j;return k&&(Kt(r.method)||!W)?t1({request:r,unstable_pattern:s,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:_,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function pi(n,i,r,s,c,d,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,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:td(n,i,r,Tr(s),g,d,h,!0,p))}async function e1(n,i,r,s,c,d){r.some(m=>m._lazyPromises?.middleware)&&await Promise.all(r.map(m=>m._lazyPromises?.middleware));let h={request:i,unstable_pattern:Tr(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 t1({request:n,unstable_pattern:i,match:r,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:d,scopedContext:h}){let p,g,m=Kt(n.method),b=m?"action":"loader",x=_=>{let j,R=new Promise((W,V)=>j=V);g=()=>j(),n.signal.addEventListener("abort",g);let D=W=>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},...W!==void 0?[W]:[]),k=(async()=>{try{return{type:"data",result:await(d?d(V=>D(V)):D())}}catch(W){return{type:"error",result:W}}})();return Promise.race([k,R])};try{let _=m?r.route.action:r.route.loader;if(s||c)if(_){let j,[R]=await Promise.all([x(_).catch(D=>{j=D}),s,c]);if(j!==void 0)throw j;p=R}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 R=new URL(n.url),D=R.pathname+R.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),R=j.pathname+j.search;throw za(404,{pathname:R})}}catch(_){return{type:"error",result:_}}finally{g&&n.signal.removeEventListener("abort",g)}return p}async function a1(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 n1(n){let{result:i,type:r}=n;if(dd(i)){let s;try{s=await a1(i)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new zr(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return r==="error"?ag(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:s1(i),statusCode:wr(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:wr(i)?i.status:void 0}:ag(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 l1(n,i,r,s,c){let d=n.headers.get("Location");if(Le(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!cd(d)){let h=s.slice(0,s.findIndex(p=>p.route.id===r)+1);d=ed(new URL(i.url),h,c,d),n.headers.set("Location",d)}return n}function Wp(n,i,r,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(cd(n)){let d=n,h=d.startsWith("//")?new URL(i.protocol+d):new URL(d);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 d=s.createURL(n);if(c.includes(d.protocol))throw new Error("Invalid redirect location")}catch{}return n}function fi(n,i,r,s){let c=n.createURL(sy(i)).toString(),d={signal:r};if(s&&Kt(s.formMethod)){let{formMethod:h,formEncType:p}=s;d.method=h.toUpperCase(),p==="application/json"?(d.headers=new Headers({"Content-Type":p}),d.body=JSON.stringify(s.json)):p==="text/plain"?d.body=s.text:p==="application/x-www-form-urlencoded"&&s.formData?d.body=ad(s.formData):d.body=s.formData}return new Request(c,d)}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 Pp(n){let i=new FormData;for(let[r,s]of n.entries())i.append(r,s);return i}function i1(n,i,r,s=!1,c=!1){let d={},h=null,p,g=!1,m={},b=r&&pa(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(!_l(j),"Cannot handle redirect results in processLoaderData"),pa(j)){let R=j.error;if(b!==void 0&&(R=b,b=void 0),h=h||{},c)h[_]=R;else{let D=Jn(n,_);h[D.route.id]==null&&(h[D.route.id]=R)}s||(d[_]=ey),g||(g=!0,p=wr(j.error)?j.error.status:500),j.headers&&(m[_]=j.headers)}else d[_]=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]&&(d[r[2]]=void 0)),{loaderData:d,errors:h,statusCode:p||200,loaderHeaders:m}}function Ip(n,i,r,s,c,d){let{loaderData:h,errors:p}=i1(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 _=d[m];if(Le(_,"Did not find corresponding fetcher result"),pa(_)){let j=Jn(n.matches,b?.route.id);p&&p[j.route.id]||(p={...p,[j.route.id]:_.error}),n.fetchers.delete(m)}else if(_l(_))Le(!1,"Unhandled fetcher revalidation redirect");else{let j=bn(_.data);n.fetchers.set(m,j)}}),{loaderData:h,errors:p}}function eg(n,i,r,s){let c=Object.entries(i).filter(([,d])=>d!==ey).reduce((d,[h,p])=>(d[h]=p,d),{});for(let d of r){let h=d.route.id;if(!i.hasOwnProperty(h)&&n.hasOwnProperty(h)&&d.route.loader&&(c[h]=n[h]),s&&s.hasOwnProperty(h))break}return c}function tg(n){return n?pa(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Jn(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 Js(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:d}={}){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 zr(n||500,h,new Error(p),!0)}function Ws(n){let i=Object.entries(n);for(let r=i.length-1;r>=0;r--){let[s,c]=i[r];if(_l(c))return{key:s,result:c}}}function sy(n){let i=typeof n=="string"?_n(n):n;return Pa({...i,hash:""})}function r1(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function s1(n){return new zr(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function o1(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,r])=>typeof i=="string"&&c1(r))}function c1(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function u1(n){return dd(n.result)&&Pg.has(n.result.status)}function pa(n){return n.type==="error"}function _l(n){return(n&&n.type)==="redirect"}function ag(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function dd(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function d1(n){return Pg.has(n)}function f1(n){return dd(n)&&d1(n.status)&&n.headers.has("Location")}function h1(n){return Gb.has(n.toUpperCase())}function Kt(n){return Yb.has(n.toUpperCase())}function fd(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function ao(n,i){let r=typeof i=="string"?_n(i).search:i.search;if(n[n.length-1].route.index&&fd(r||""))return n[n.length-1];let s=Qg(n);return s[s.length-1]}function ng(n){let{formMethod:i,formAction:r,formEncType:s,text:c,formData:d,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(d!=null)return{formMethod:i,formAction:r,formEncType:s,formData:d,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 Vu(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 m1(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 hr(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 p1(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 g1(n,i){try{let r=n.sessionStorage.getItem(Ig);if(r){let s=JSON.parse(r);for(let[c,d]of Object.entries(s||{}))d&&Array.isArray(d)&&i.set(c,new Set(d||[]))}}catch{}}function y1(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){gt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function lg(){let n,i,r=new Promise((s,c)=>{n=async d=>{s(d);try{await r}catch{}},i=async d=>{c(d);try{await r}catch{}}});return{promise:r,resolve:n,reject:i}}var wl=v.createContext(null);wl.displayName="DataRouter";var Or=v.createContext(null);Or.displayName="DataRouterState";var oy=v.createContext(!1);function x1(){return v.useContext(oy)}var hd=v.createContext({isTransitioning:!1});hd.displayName="ViewTransition";var cy=v.createContext(new Map);cy.displayName="Fetchers";var v1=v.createContext(null);v1.displayName="Await";var ga=v.createContext(null);ga.displayName="Navigation";var mo=v.createContext(null);mo.displayName="Location";var Da=v.createContext({outlet:null,matches:[],isDataRoute:!1});Da.displayName="Route";var md=v.createContext(null);md.displayName="RouteError";var uy="REACT_ROUTER_ERROR",b1="REDIRECT",S1="ROUTE_ERROR_RESPONSE";function _1(n){if(n.startsWith(`${uy}:${b1}:{`))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 j1(n){if(n.startsWith(`${uy}:${S1}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new zr(i.status,i.statusText,i.data)}catch{}}function N1(n,{relative:i}={}){Le(xi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=v.useContext(ga),{hash:c,pathname:d,search:h}=Dr(n,{relative:i}),p=d;return r!=="/"&&(p=d==="/"?r:Ya([r,d])),s.createHref({pathname:p,search:h,hash:c})}function xi(){return v.useContext(mo)!=null}function Va(){return Le(xi(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(mo).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 In(){let{isDataRoute:n}=v.useContext(Da);return n?B1():w1()}function w1(){Le(xi(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(wl),{basename:i,navigator:r}=v.useContext(ga),{matches:s}=v.useContext(Da),{pathname:c}=Va(),d=JSON.stringify(ho(s)),h=v.useRef(!1);return fy(()=>{h.current=!0}),v.useCallback((g,m={})=>{if(gt(h.current,dy),!h.current)return;if(typeof g=="number"){r.go(g);return}let b=Rr(g,JSON.parse(d),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,d,c,n])}var E1=v.createContext(null);function C1(n){let i=v.useContext(Da).outlet;return v.useMemo(()=>i&&v.createElement(E1.Provider,{value:n},i),[i,n])}function po(){let{matches:n}=v.useContext(Da),i=n[n.length-1];return i?i.params:{}}function Dr(n,{relative:i}={}){let{matches:r}=v.useContext(Da),{pathname:s}=Va(),c=JSON.stringify(ho(r));return v.useMemo(()=>Rr(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function R1(n,i,r){Le(xi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(ga),{matches:c}=v.useContext(Da),d=c[c.length-1],h=d?d.params:{},p=d?d.pathname:"/",g=d?d.pathnameBase:"/",m=d&&d.route;{let k=m&&m.path||"";my(p,!m||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${k}">) 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="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let b=Va(),x;x=b;let _=x.pathname||"/",j=_;if(g!=="/"){let k=g.replace(/^\//,"").split("/");j="/"+_.replace(/^\//,"").split("/").slice(k.length).join("/")}let R=Fn(n,{pathname:j});return gt(m||R!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),gt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.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.`),M1(R&&R.map(k=>Object.assign({},k,{params:Object.assign({},h,k.params),pathname:Ya([g,s.encodeLocation?s.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?g:Ya([g,s.encodeLocation?s.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),c,r)}function z1(){let n=H1(),i=wr(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},d={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:d},"ErrorBoundary")," or"," ",v.createElement("code",{style:d},"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 T1=v.createElement(z1,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=j1(n.digest);r&&(n=r)}let i=n!==void 0?v.createElement(Da.Provider,{value:this.props.routeContext},v.createElement(md.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?v.createElement(O1,{error:n},i):i}};hy.contextType=oy;var Gu=new WeakMap;function O1({children:n,error:i}){let{basename:r}=v.useContext(ga);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=_1(i.digest);if(s){let c=Gu.get(i);if(c)throw c;let d=Fg(s.location,r);if(Zg&&!Gu.get(i))if(d.isExternal||s.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw Gu.set(i,h),h}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function D1({routeContext:n,match:i,children:r}){let s=v.useContext(wl);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 M1(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,d=s?.errors;if(d!=null){let b=c.findIndex(x=>x.route.id&&d?.[x.route.id]!==void 0);Le(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).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,R=x.route.loader&&!_.hasOwnProperty(x.route.id)&&(!j||j[x.route.id]===void 0);if(x.route.lazy||R){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:Tr(s.matches),errorInfo:x})}:void 0;return c.reduceRight((b,x,_)=>{let j,R=!1,D=null,k=null;s&&(j=d&&x.route.id?d[x.route.id]:void 0,D=x.route.errorElement||T1,h&&(p<0&&_===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,k=null):p===_&&(R=!0,k=x.route.hydrateFallbackElement||null)));let W=i.concat(c.slice(0,_+1)),V=()=>{let Q;return j?Q=D:R?Q=k:x.route.Component?Q=v.createElement(x.route.Component,null):x.route.element?Q=x.route.element:Q=b,v.createElement(D1,{match:x,routeContext:{outlet:b,matches:W,isDataRoute:s!=null},children:Q})};return s&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?v.createElement(hy,{location:s.location,revalidation:s.revalidation,component:D,error:j,children:V(),routeContext:{outlet:null,matches:W,isDataRoute:!0},onError:m}):V()},null)}function pd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function A1(n){let i=v.useContext(wl);return Le(i,pd(n)),i}function L1(n){let i=v.useContext(Or);return Le(i,pd(n)),i}function k1(n){let i=v.useContext(Da);return Le(i,pd(n)),i}function gd(n){let i=k1(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 U1(){return gd("useRouteId")}function H1(){let n=v.useContext(md),i=L1("useRouteError"),r=gd("useRouteError");return n!==void 0?n:i.errors?.[r]}function B1(){let{router:n}=A1("useNavigate"),i=gd("useNavigate"),r=v.useRef(!1);return fy(()=>{r.current=!0}),v.useCallback(async(c,d={})=>{gt(r.current,dy),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...d}))},[n,i])}var ig={};function my(n,i,r){!i&&!ig[n]&&(ig[n]=!0,gt(!1,r))}var rg={};function sg(n,i){!n&&!rg[i]&&(rg[i]=!0,console.warn(i))}var q1="useOptimistic",og=g0[q1],Y1=()=>{};function V1(n){return og?og(n):[n,Y1]}function G1(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&gt(!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&&gt(!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&&gt(!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 $1=["HydrateFallback","hydrateFallbackElement"],K1=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 X1({router:n,flushSync:i,onError:r,unstable_useTransitions:s}){s=x1()||s;let[d,h]=v.useState(n.state),[p,g]=V1(d),[m,b]=v.useState(),[x,_]=v.useState({isTransitioning:!1}),[j,R]=v.useState(),[D,k]=v.useState(),[W,V]=v.useState(),Q=v.useRef(new Map),re=v.useCallback((N,{deletedFetchers:K,newErrors:X,flushSync:de,viewTransitionOpts:ie})=>{X&&r&&Object.values(X).forEach(le=>r(le,{location:N.location,params:N.matches[0]?.params??{},unstable_pattern:Tr(N.matches)})),N.fetchers.forEach((le,me)=>{le.data!==void 0&&Q.current.set(me,le.data)}),K.forEach(le=>Q.current.delete(le)),sg(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 I=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(sg(ie==null||I,"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."),!ie||!I){i&&de?i(()=>h(N)):s===!1?h(N):v.startTransition(()=>{s===!0&&g(le=>cg(le,N)),h(N)});return}if(i&&de){i(()=>{D&&(j?.resolve(),D.skipTransition()),_({isTransitioning:!0,flushSync:!0,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation})});let le=n.window.document.startViewTransition(()=>{i(()=>h(N))});le.finished.finally(()=>{i(()=>{R(void 0),k(void 0),b(void 0),_({isTransitioning:!1})})}),i(()=>k(le));return}D?(j?.resolve(),D.skipTransition(),V({state:N,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation})):(b(N),_({isTransitioning:!0,flushSync:!1,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation}))},[n.window,i,D,j,s,g,r]);v.useLayoutEffect(()=>n.subscribe(re),[n,re]),v.useEffect(()=>{x.isTransitioning&&!x.flushSync&&R(new K1)},[x]),v.useEffect(()=>{if(j&&m&&n.window){let N=m,K=j.promise,X=n.window.document.startViewTransition(async()=>{s===!1?h(N):v.startTransition(()=>{s===!0&&g(de=>cg(de,N)),h(N)}),await K});X.finished.finally(()=>{R(void 0),k(void 0),b(void 0),_({isTransitioning:!1})}),k(X)}},[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&&W&&(b(W.state),_({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}),V(void 0))},[x.isTransitioning,W]);let ae=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,K,X)=>n.navigate(N,{state:K,preventScrollReset:X?.preventScrollReset}),replace:(N,K,X)=>n.navigate(N,{replace:!0,state:K,preventScrollReset:X?.preventScrollReset})}),[n]),P=n.basename||"/",Y=v.useMemo(()=>({router:n,navigator:ae,static:!1,basename:P,onError:r}),[n,ae,P,r]);return v.createElement(v.Fragment,null,v.createElement(wl.Provider,{value:Y},v.createElement(Or.Provider,{value:p},v.createElement(cy.Provider,{value:Q.current},v.createElement(hd.Provider,{value:x},v.createElement(F1,{basename:P,location:p.location,navigationType:p.historyAction,navigator:ae,unstable_useTransitions:s},v.createElement(Q1,{routes:n.routes,future:n.future,state:p,isStatic:!1,onError:r})))))),null)}function cg(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 Q1=v.memo(Z1);function Z1({routes:n,future:i,state:r,isStatic:s,onError:c}){return R1(n,void 0,{state:r,isStatic:s,onError:c})}function ug({to:n,replace:i,state:r,relative:s}){Le(xi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=v.useContext(ga);gt(!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:d}=v.useContext(Da),{pathname:h}=Va(),p=In(),g=Rr(n,ho(d),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 C1(n.context)}function F1({basename:n="/",children:i=null,location:r,navigationType:s="POP",navigator:c,static:d=!1,unstable_useTransitions:h}){Le(!xi(),"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:d,unstable_useTransitions:h,future:{}}),[p,c,d,h]);typeof r=="string"&&(r=_n(r));let{pathname:m="/",search:b="",hash:x="",state:_=null,key:j="default",unstable_mask:R}=r,D=v.useMemo(()=>{let k=Oa(m,p);return k==null?null:{location:{pathname:k,search:b,hash:x,state:_,key:j,unstable_mask:R},navigationType:s}},[p,m,b,x,_,j,s,R]);return gt(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(mo.Provider,{children:i,value:D}))}var no="get",lo="application/x-www-form-urlencoded";function go(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function J1(n){return go(n)&&n.tagName.toLowerCase()==="button"}function W1(n){return go(n)&&n.tagName.toLowerCase()==="form"}function P1(n){return go(n)&&n.tagName.toLowerCase()==="input"}function I1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function e2(n,i){return n.button===0&&(!i||i==="_self")&&!I1(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 t2(n,i){let r=nd(n);return i&&i.forEach((s,c)=>{r.has(c)||i.getAll(c).forEach(d=>{r.append(c,d)})}),r}var Ps=null;function a2(){if(Ps===null)try{new FormData(document.createElement("form"),0),Ps=!1}catch{Ps=!0}return Ps}var n2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $u(n){return n!=null&&!n2.has(n)?(gt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lo}"`),null):n}function l2(n,i){let r,s,c,d,h;if(W1(n)){let p=n.getAttribute("action");s=p?Oa(p,i):null,r=n.getAttribute("method")||no,c=$u(n.getAttribute("enctype"))||lo,d=new FormData(n)}else if(J1(n)||P1(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")||no,c=$u(n.getAttribute("formenctype"))||$u(p.getAttribute("enctype"))||lo,d=new FormData(p,n),!a2()){let{name:m,type:b,value:x}=n;if(b==="image"){let _=m?`${m}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else m&&d.append(m,x)}}else{if(go(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=no,s=null,c=lo,h=n}return d&&c==="text/plain"&&(h=d,d=void 0),{action:s,method:r.toLowerCase(),encType:c,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function yd(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function i2(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 r2(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 s2(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 o2(n,i,r){let s=await Promise.all(n.map(async c=>{let d=i.routes[c.route.id];if(d){let h=await r2(d,r);return h.links?h.links():[]}return[]}));return f2(s.flat(1).filter(s2).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function dg(n,i,r,s,c,d){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 d==="assets"?i.filter((g,m)=>h(g,m)||p(g,m)):d==="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 c2(n,i,{includeHydrateFallback:r}={}){return u2(n.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function u2(n){return[...new Set(n)]}function d2(n){let i={},r=Object.keys(n).sort();for(let s of r)i[s]=n[s];return i}function f2(n,i){let r=new Set;return new Set(i),n.reduce((s,c)=>{let d=JSON.stringify(d2(c));return r.has(d)||(r.add(d),s.push({key:d,link:c})),s},[])}function gy(){let n=v.useContext(wl);return yd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function h2(){let n=v.useContext(Or);return yd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var xd=v.createContext(void 0);xd.displayName="FrameworkContext";function yy(){let n=v.useContext(xd);return yd(n,"You must render this element inside a <HydratedRouter> element"),n}function m2(n,i){let r=v.useContext(xd),[s,c]=v.useState(!1),[d,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=W=>{W.forEach(V=>{h(V.isIntersecting)})},k=new IntersectionObserver(D,{threshold:.5});return _.current&&k.observe(_.current),()=>{k.disconnect()}}},[n]),v.useEffect(()=>{if(s){let D=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(D)}}},[s]);let j=()=>{c(!0)},R=()=>{c(!1),h(!1)};return r?n!=="intent"?[d,_,{}]:[d,_,{onFocus:mr(p,j),onBlur:mr(g,R),onMouseEnter:mr(m,j),onMouseLeave:mr(b,R),onTouchStart:mr(x,j)}]:[!1,_,{}]}function mr(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function p2({page:n,...i}){let{router:r}=gy(),s=v.useMemo(()=>Fn(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?v.createElement(y2,{page:n,matches:s,...i}):null}function g2(n){let{manifest:i,routeModules:r}=yy(),[s,c]=v.useState([]);return v.useEffect(()=>{let d=!1;return o2(n,i,r).then(h=>{d||c(h)}),()=>{d=!0}},[n,i,r]),s}function y2({page:n,matches:i,...r}){let s=Va(),{future:c,manifest:d,routeModules:h}=yy(),{basename:p}=gy(),{loaderData:g,matches:m}=h2(),b=v.useMemo(()=>dg(n,i,m,d,s,"data"),[n,i,m,d,s]),x=v.useMemo(()=>dg(n,i,m,d,s,"assets"),[n,i,m,d,s]),_=v.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let D=new Set,k=!1;if(i.forEach(V=>{let Q=d.routes[V.route.id];!Q||!Q.hasLoader||(!b.some(re=>re.route.id===V.route.id)&&V.route.id in g&&h[V.route.id]?.shouldRevalidate||Q.hasClientLoader?k=!0:D.add(V.route.id))}),D.size===0)return[];let W=i2(n,p,c.unstable_trailingSlashAwareDataRequests,"data");return k&&D.size>0&&W.searchParams.set("_routes",i.filter(V=>D.has(V.route.id)).map(V=>V.route.id).join(",")),[W.pathname+W.search]},[p,c.unstable_trailingSlashAwareDataRequests,g,s,d,b,i,n,h]),j=v.useMemo(()=>c2(x,d),[x,d]),R=g2(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})),R.map(({key:D,link:k})=>v.createElement("link",{key:D,nonce:r.nonce,...k,crossOrigin:k.crossOrigin??r.crossOrigin})))}function x2(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var v2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{v2&&(window.__reactRouterVersion="7.13.1")}catch{}function b2(n,i){return Qb({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:cb({window:i?.window}),hydrationData:S2(),routes:n,mapRouteProperties:G1,hydrationRouteProperties:$1,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function S2(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:_2(n.errors)}),n}function _2(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 zr(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let d=window[c.__subType];if(typeof d=="function")try{let h=new d(c.message);h.stack="",r[s]=h}catch{}}if(r[s]==null){let d=new Error(c.message);d.stack="",r[s]=d}}else r[s]=c;return r}var xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ia=v.forwardRef(function({onClick:i,discover:r="render",prefetch:s="none",relative:c,reloadDocument:d,replace:h,unstable_mask:p,state:g,target:m,to:b,preventScrollReset:x,viewTransition:_,unstable_defaultShouldRevalidate:j,...R},D){let{basename:k,navigator:W,unstable_useTransitions:V}=v.useContext(ga),Q=typeof b=="string"&&xy.test(b),re=Fg(b,k);b=re.to;let ae=N1(b,{relative:c}),P=Va(),Y=null;if(p){let me=Rr(p,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);k!=="/"&&(me.pathname=me.pathname==="/"?k:Ya([k,me.pathname])),Y=W.createHref(me)}let[N,K,X]=m2(s,R),de=w2(b,{replace:h,unstable_mask:p,state:g,target:m,preventScrollReset:x,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:j,unstable_useTransitions:V});function ie(me){i&&i(me),me.defaultPrevented||de(me)}let I=!(re.isExternal||d),le=v.createElement("a",{...R,...X,href:(I?Y:void 0)||re.absoluteURL||ae,onClick:I?ie:i,ref:x2(D,K),target:m,"data-discover":!Q&&r==="render"?"true":void 0});return N&&!Q?v.createElement(v.Fragment,null,le,v.createElement(p2,{page:ae})):le});ia.displayName="Link";var Er=v.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:s="",end:c=!1,style:d,to:h,viewTransition:p,children:g,...m},b){let x=Dr(h,{relative:m.relative}),_=Va(),j=v.useContext(Or),{navigator:R,basename:D}=v.useContext(ga),k=j!=null&&T2(x)&&p===!0,W=R.encodeLocation?R.encodeLocation(x).pathname:x.pathname,V=_.pathname,Q=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;r||(V=V.toLowerCase(),Q=Q?Q.toLowerCase():null,W=W.toLowerCase()),Q&&D&&(Q=Oa(Q,D)||Q);const re=W!=="/"&&W.endsWith("/")?W.length-1:W.length;let ae=V===W||!c&&V.startsWith(W)&&V.charAt(re)==="/",P=Q!=null&&(Q===W||!c&&Q.startsWith(W)&&Q.charAt(W.length)==="/"),Y={isActive:ae,isPending:P,isTransitioning:k},N=ae?i:void 0,K;typeof s=="function"?K=s(Y):K=[s,ae?"active":null,P?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let X=typeof d=="function"?d(Y):d;return v.createElement(ia,{...m,"aria-current":N,className:K,ref:b,style:X,to:h,viewTransition:p},typeof g=="function"?g(Y):g)});Er.displayName="NavLink";var j2=v.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:s,replace:c,state:d,method:h=no,action:p,onSubmit:g,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_,...j},R)=>{let{unstable_useTransitions:D}=v.useContext(ga),k=R2(),W=z2(p,{relative:m}),V=h.toLowerCase()==="get"?"get":"post",Q=typeof p=="string"&&xy.test(p),re=ae=>{if(g&&g(ae),ae.defaultPrevented)return;ae.preventDefault();let P=ae.nativeEvent.submitter,Y=P?.getAttribute("formmethod")||h,N=()=>k(P||ae.currentTarget,{fetcherKey:i,method:Y,navigate:r,replace:c,state:d,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_});D&&r!==!1?v.startTransition(()=>N()):N()};return v.createElement("form",{ref:R,method:V,action:W,onSubmit:s?g:re,...j,"data-discover":!Q&&n==="render"?"true":void 0})});j2.displayName="Form";function N2(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(wl);return Le(i,N2(n)),i}function w2(n,{target:i,replace:r,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:m}={}){let b=In(),x=Va(),_=Dr(n,{relative:h});return v.useCallback(j=>{if(e2(j,i)){j.preventDefault();let R=r!==void 0?r:Pa(x)===Pa(_),D=()=>b(n,{replace:R,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g});m?v.startTransition(()=>D()):D()}},[x,b,_,r,s,c,i,n,d,h,p,g,m])}function by(n){gt(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(()=>t2(s.search,r.current?null:i.current),[s.search]),d=In(),h=v.useCallback((p,g)=>{const m=nd(typeof p=="function"?p(new URLSearchParams(c)):p);r.current=!0,d("?"+m,g)},[d,c]);return[c,h]}var E2=0,C2=()=>`__${String(++E2)}__`;function R2(){let{router:n}=vy("useSubmit"),{basename:i}=v.useContext(ga),r=U1(),s=n.fetch,c=n.navigate;return v.useCallback(async(d,h={})=>{let{action:p,method:g,encType:m,formData:b,body:x}=l2(d,i);if(h.navigate===!1){let _=h.fetcherKey||C2();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 z2(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),d={...Dr(n||".",{relative:i})},h=Va();if(n==null){d.search=h.search;let p=new URLSearchParams(d.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();d.search=b?`?${b}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(d.pathname=d.pathname==="/"?r:Ya([r,d.pathname])),Pa(d)}function T2(n,{relative:i}={}){let r=v.useContext(hd);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=Dr(n,{relative:i});if(!r.isTransitioning)return!1;let d=Oa(r.currentLocation.pathname,s)||r.currentLocation.pathname,h=Oa(r.nextLocation.pathname,s)||r.nextLocation.pathname;return oo(c.pathname,h)!=null||oo(c.pathname,d)!=null}const Sy=(...n)=>n.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();const O2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const D2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,s)=>s?s.toUpperCase():r.toLowerCase());const fg=n=>{const i=D2(n);return i.charAt(0).toUpperCase()+i.slice(1)};var M2={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 A2=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const L2=v.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:c="",children:d,iconNode:h,...p},g)=>v.createElement("svg",{ref:g,...M2,width:i,height:i,stroke:n,strokeWidth:s?Number(r)*24/Number(i):r,className:Sy("lucide",c),...!d&&!A2(p)&&{"aria-hidden":"true"},...p},[...h.map(([m,b])=>v.createElement(m,b)),...Array.isArray(d)?d:[d]]));const De=(n,i)=>{const r=v.forwardRef(({className:s,...c},d)=>v.createElement(L2,{ref:d,iconNode:i,className:Sy(`lucide-${O2(fg(n))}`,`lucide-${n}`,s),...c}));return r.displayName=fg(n),r};const k2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_y=De("arrow-right",k2);const U2=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],hg=De("arrow-up-right",U2);const H2=[["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"}]],B2=De("boxes",H2);const q2=[["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"}]],Y2=De("brain",q2);const V2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],gi=De("check",V2);const G2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yo=De("chevron-down",G2);const $2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Sn=De("chevron-right",$2);const K2=[["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"}]],vd=De("circle-alert",K2);const X2=[["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"}]],mg=De("copy",X2);const Q2=[["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"}]],Z2=De("database",Q2);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"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],J2=De("file-spreadsheet",F2);const W2=[["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"}]],Pn=De("file-text",W2);const P2=[["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",P2);const I2=[["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"}]],e4=De("files",I2);const t4=[["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"}]],bd=De("folder-git-2",t4);const a4=[["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"}]],n4=De("folder-input",a4);const l4=[["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"}]],i4=De("folder-open",l4);const r4=[["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",r4);const s4=[["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",s4);const o4=[["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"}]],co=De("git-branch",o4);const c4=[["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",c4);const u4=[["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",u4);const d4=[["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"}]],f4=De("globe",d4);const h4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],m4=De("info",h4);const p4=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],g4=De("list-filter",p4);const y4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Xt=De("loader-circle",y4);const x4=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],v4=De("menu",x4);const b4=[["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"}]],S4=De("monitor",b4);const _4=[["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"}]],j4=De("moon",_4);const N4=[["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"}]],yi=De("package",N4);const w4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],E4=De("panel-left",w4);const C4=[["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",C4);const R4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wy=De("plus",R4);const z4=[["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"}]],T4=De("refresh-cw",z4);const O4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],D4=De("search",O4);const M4=[["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"}]],A4=De("settings",M4);const L4=[["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"}]],k4=De("share-2",L4);const U4=[["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"}]],H4=De("sparkles",U4);const B4=[["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"}]],q4=De("sun",B4);const Y4=[["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",Y4);const V4=[["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",V4);const G4=[["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"}]],$4=De("users",G4);const K4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xo=De("x",K4),pg=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},X4=(n=>n?pg(n):pg),Q4=n=>n;function Z4(n,i=Q4){const r=hi.useSyncExternalStore(n.subscribe,hi.useCallback(()=>i(n.getState()),[n,i]),hi.useCallback(()=>i(n.getInitialState()),[n,i]));return hi.useDebugValue(r),r}const gg=n=>{const i=X4(n),r=s=>Z4(i,s);return Object.assign(r,i),r},vo=(n=>n?gg(n):gg),F4="/api/v1";class xr extends Error{constructor(i,r,s){super(s),this.status=i,this.code=r,this.name="ApiError"}}async function Is(n,i,r,s){let c=`${F4}${i}`;if(s){const p=new URLSearchParams(s).toString();p&&(c+=`?${p}`)}const d={method:n,headers:{"Content-Type":"application/json"}};r!==void 0&&(d.body=JSON.stringify(r));const h=await fetch(c,d);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 xr(h.status,p,g)}return h.json()}const zt={get(n,i){return Is("GET",n,void 0,i)},post(n,i){return Is("POST",n,i)},put(n,i){return Is("PUT",n,i)},delete(n){return Is("DELETE",n)}},J4=3e4,W4=1e3,P4=3e4;class I4{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 d of c)d(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()}))},J4)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const i=Math.min(W4*2**this.reconnectAttempt,P4);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 I4,Nl=vo(n=>({status:"disconnected",onlineCount:0,connections:[],setStatus:i=>n({status:i}),fetchDaemonStatus:async()=>{try{const i=await zt.get("/daemons/status");n({onlineCount:i.online_count,connections:i.connections})}catch{}}})),eS=n=>n==="connecting"?"disconnected":n;Ia.onStatusChange(n=>{Nl.getState().setStatus(eS(n))});Ia.on("ws:daemon:connected",n=>{const i=n;Nl.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 d=[...r.connections,c];return{connections:d,onlineCount:d.length}})});Ia.on("ws:daemon:status",n=>{const i=n;Nl.setState(r=>{if(i.is_online){if(r.connections.some(p=>p.machine_id===i.machine_id))return r;const d={machine_id:i.machine_id};i.lib_id&&(d.lib_id=i.lib_id);const h=[...r.connections,d];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 Cr="lib_cloud_default",Qt=vo((n,i)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{n({loading:!0,error:null});try{const r=await zt.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 zt.post("/libraries",r);return n(c=>({libraries:[...c.libraries,s]})),s},deleteLibrary:async r=>{await zt.delete(`/libraries/${r}`),n(s=>({libraries:s.libraries.filter(c=>c.id!==r)}))},updateLibraryName:async(r,s)=>{const c=await zt.put(`/libraries/${r}`,{name:s});n(d=>({libraries:d.libraries.map(h=>h.id===r?c:h)}))},_updateLibraryOnline:(r,s)=>{n(c=>({libraries:c.libraries.map(d=>d.id===r?{...d,is_online:s}:d)}))},_refreshLibrary:async r=>{try{const s=await zt.get(`/libraries/${r}`);n(c=>({libraries:c.libraries.map(d=>d.id===r?s:d)}))}catch{i().fetchLibraries()}}})),Mr=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]},tS=n=>n.libraries.filter(i=>i.type==="daemon");Ia.on("ws:daemon:status",n=>{const i=n;i.lib_id&&Qt.getState()._updateLibraryOnline(i.lib_id,i.is_online),Qt.getState().fetchLibraries()});Ia.on("ws:daemon:connected",n=>{const i=n;i.lib_id&&Qt.getState()._updateLibraryOnline(i.lib_id,!0),Qt.getState().fetchLibraries()});Ia.on("ws:library:updated",n=>{const i=n;Qt.getState()._refreshLibrary(i.library_id)});const yg=n=>Symbol.iterator in n,xg=n=>"entries"in n,vg=(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,d]of r)if(!s.has(c)||!Object.is(d,s.get(c)))return!1;return!0},aS=(n,i)=>{const r=n[Symbol.iterator](),s=i[Symbol.iterator]();let c=r.next(),d=s.next();for(;!c.done&&!d.done;){if(!Object.is(c.value,d.value))return!1;c=r.next(),d=s.next()}return!!c.done&&!!d.done};function nS(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:yg(n)&&yg(i)?xg(n)&&xg(i)?vg(n,i):aS(n,i):vg({entries:()=>Object.entries(n)},{entries:()=>Object.entries(i)})}function vi(n){const i=hi.useRef(void 0);return r=>{const s=n(r);return nS(i.current,s)?i.current:i.current=s}}function od(){const{t:n}=Ce(),i=Nl(h=>h.onlineCount),r=Nl(h=>h.connections.length);if(Qt(vi(tS)).length===0)return null;const c=i>0,d=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:d,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:d})]})}const bg=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function lS(){const{t:n}=Ce(),[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(ia,{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:bg.map(({to:s,labelKey:c})=>f.jsx(Er,{to:s,end:s==="/",className:({isActive:d})=>`font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"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(ia,{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(xo,{size:20}):f.jsx(v4,{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:bg.map(({to:s,labelKey:c})=>f.jsx(Er,{to:s,end:s==="/",onClick:()=>r(!1),className:({isActive:d})=>`block py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"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(ia,{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 iS(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=iS(n);document.documentElement.setAttribute("data-theme",i),localStorage.setItem("theme",n)}function rS(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const Ry=vo(n=>({theme:rS(),setTheme:i=>{Cy(i),n({theme:i})}}));let Sg=!1;function sS(){if(Sg||typeof window>"u")return;Sg=!0;const n=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const{theme:r}=Ry.getState();r==="system"&&Cy("system")};n.addEventListener("change",i)}sS();const oS=[{mode:"light",icon:q4,labelKey:"footer.theme.light"},{mode:"dark",icon:j4,labelKey:"footer.theme.dark"},{mode:"system",icon:S4,labelKey:"footer.theme.system"}];function zy(){const{t:n}=Ce(),{theme:i,setTheme:r}=Ry();return f.jsx("div",{className:"flex items-center gap-1",children:oS.map(({mode:s,icon:c,labelKey:d})=>f.jsx("button",{onClick:()=>r(s),title:n(d),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}=Ce(),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}=Ce(),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 cS="_brandIcon_1c7st_1",uS="_iconPulse_1c7st_35",_g={brandIcon:cS,iconPulse:uS};function dS({variant:n}){const{t:i}=Ce(),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:_g.brandIcon,children:f.jsx("span",{className:_g.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 fS(){return f.jsxs("div",{className:"flex min-h-screen flex-col",children:[f.jsx(lS,{}),f.jsx("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:f.jsx(py,{})}),f.jsx(dS,{})]})}function hS({onToggleSidebar:n}){const{t:i}=Ce();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(E4,{size:20})}),f.jsxs(ia,{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(ia,{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(ia,{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 mS="lib_cloud_default",pS=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"}`,gS=[{to:"/studio/modeling",icon:B2,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:Y2,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:D4,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:k4,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:$4,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:A4,i18nKey:"studio.sidebar.settings"}];function jg({onNavigate:n}){const{t:i}=Ce(),r=Va(),s=In(),c=Qt(vi(Mr)),d=r.pathname.startsWith("/studio/sources")||r.pathname.startsWith("/studio/source/"),[h,p]=v.useState(d);v.useEffect(()=>{d&&p(!0)},[d]);const g=m=>m.id===mS?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 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[f.jsx(Z2,{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(yo,{size:12}):f.jsx(Sn,{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(Er,{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)})})]}),gS.map(({to:m,icon:b,i18nKey:x})=>f.jsxs(Er,{to:m,onClick:n,className:({isActive:_})=>pS(_),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 yS(){const[n,i]=v.useState(!1);return v.useEffect(()=>{Qt.getState().fetchLibraries(),Nl.getState().fetchDaemonStatus()},[]),v.useEffect(()=>Ia.onStatusChange(r=>{r==="connected"&&(Qt.getState().fetchLibraries(),Nl.getState().fetchDaemonStatus())}),[]),f.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[f.jsx(hS,{onToggleSidebar:()=>i(!n)}),f.jsxs("div",{className:"flex min-h-0 flex-1",children:[f.jsx("div",{className:"hidden md:block",children:f.jsx(jg,{})}),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(jg,{onNavigate:()=>i(!1)})})]}),f.jsx("main",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden",children:f.jsx(py,{})})]})]})}function xS(){const{t:n}=Ce();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(ia,{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}=Ce();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 vS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.login.title"),version:"0.5.0",description:n("page.login.description")})}function bS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.docs.title"),version:"0.4.13",description:n("page.docs.description")})}function SS(){const{t:n}=Ce();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(ia,{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 _S(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.modeling.title"),version:"0.4.16",description:n("page.modeling.description")})}function jS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.brain.title"),version:"0.4.18",description:n("page.brain.description")})}function NS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.discovery.title"),version:"0.6.x",description:n("page.discovery.description")})}function wS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.sharing.title"),version:"0.4.39",description:n("page.sharing.description")})}function ES(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.collaboration.title"),version:"0.5.x",description:n("page.collaboration.description")})}function CS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.settings.title"),version:"0.5.x",description:n("page.settings.description")})}function RS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.code_setup.title"),version:"0.4.13",description:n("page.code_setup.description")})}function zS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.code_compile.title"),version:"0.4.13",description:n("page.code_compile.description")})}function TS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.code_review.title"),version:"0.4.14",description:n("page.code_review.description")})}function OS(){const{t:n}=Ce();return f.jsx(Ma,{title:n("page.code_result.title"),version:"0.4.14",description:n("page.code_result.description")})}const bo=(n,i)=>{for(const r of n){if(r.path===i)return r;if(r.children){const s=bo(r.children,i);if(s)return s}}return null},DS=(n,i)=>i===""?n:bo(n,i)?.children??[],Dy=(n,i)=>{if(!i)return[];const r=i.split("/"),s=[];let c="";for(const d of r){c=c?`${c}/${d}`:d;const h=bo(n,c);h&&s.push(h)}return s},So=vo(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 d=await zt.get("/sources",c);n({rootSources:d.items,total:d.total,limit:d.limit,offset:d.offset,loading:!1})}catch(c){n({error:c instanceof Error?c.message:"Failed to load sources",loading:!1})}},fetchRootSource:async i=>{const r=await zt.get(`/sources/${i}`);return n({currentRoot:r}),r},createSource:async i=>await zt.post("/sources",i),addTreeNode:async(i,r)=>{const s=await zt.post(`/sources/${i}/tree`,r);return n(c=>({rootSources:c.rootSources.map(d=>d.id===i?s:d),currentRoot:c.currentRoot?.id===i?s:c.currentRoot})),s},updateSource:async(i,r)=>{const s=await zt.put(`/sources/${i}`,r);n(c=>({rootSources:c.rootSources.map(d=>d.id===i?s:d),currentRoot:c.currentRoot?.id===i?s:c.currentRoot}))},deleteSource:async i=>{await zt.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 zt.delete(`/sources/${i}/tree?path=${encodeURIComponent(r)}`);return n(c=>({rootSources:c.rootSources.map(d=>d.id===i?s:d),currentRoot:c.currentRoot?.id===i?s:c.currentRoot})),s},uploadDoc:async i=>await zt.post("/sources/upload",i),setFilter:i=>n({filter:i}),clearSources:()=>n({rootSources:[],currentRoot:null,total:0,offset:0})}));function Ar({segments:n}){const{t:i}=Ce(),r=v.useRef(null),s=v.useRef(null),[c,d]=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,R=Array.from(b.children);if(R.length===0)return;const D=R.map(Y=>Y.offsetWidth),k=4;if(D.reduce((Y,N)=>Y+N,0)+k*(D.length-1)<=j){d(0);return}const V=20,Q=(D[0]??0)+(D[1]??0)+k,re=D[D.length-1]??0,ae=Q+k+V+k+re;let P=p;for(let Y=1;Y<=p;Y++){let N=0;for(let K=2+Y;K<D.length-1;K++)N+=D[K]+k;if(ae+N<=j){P=Y;break}}d(P)};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(Sn,{size:12,className:"shrink-0 text-c4a-text-muted"}),m.to&&!x?f.jsx(ia,{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(Sn,{size:12}),f.jsx("span",{className:"whitespace-nowrap",children:m.label})]},b))})]})}const MS=["all","indexed","not_indexed"];function AS({value:n,onChange:i}){const{t:r}=Ce(),[s,c]=v.useState(!1),d=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=>{d.current&&!d.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:d,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(g4,{size:12}),f.jsx("span",{className:"hidden sm:inline",children:p[n]}),f.jsx(yo,{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:MS.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(gi,{size:12,className:x===n?"opacity-100":"opacity-0"}),p[x]]},x))})]})}function My({currentName:n,onConfirm:i,onCancel:r,error:s}){const[c,d]=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=>d(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(gi,{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(xo,{size:14})}),s&&f.jsx("span",{className:"ml-1 text-xs text-c4a-error",children:s})]})}const LS=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}`},Ng={none:"bg-c4a-text-muted/60",indexed:"bg-c4a-success",stale:"bg-c4a-warning"};function kS({source:n,isDaemonLibrary:i}){const{t:r}=Ce(),s=n.kind==="source";let c;if(n.kind==="folder"?c=i?f.jsx(i4,{size:16,className:"shrink-0 text-c4a-text-muted"}):f.jsx(Ta,{size:16,className:"shrink-0 text-c4a-text-muted"}):n.source_type==="code"?c=f.jsx(yi,{size:16,className:"shrink-0 text-c4a-text-muted"}):c=f.jsx(Pn,{size:16,className:"shrink-0 text-c4a-text-muted"}),!s)return f.jsx(f.Fragment,{children:c});const d=Ng[n.index_status]??Ng.none,h=r(`sources.status.${n.index_status}`);return f.jsxs("span",{className:"group/dot relative shrink-0",children:[c,f.jsx("span",{className:`absolute -right-[2px] -top-[2px] block h-[6px] w-[6px] rounded-full ${d}`}),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:h})]})}function wg({source:n,displayName:i,childCount:r,isDaemonLibrary:s,isRepoRoot:c,onClick:d,onRename:h,onDelete:p}){const{t:g}=Ce(),[m,b]=v.useState(!1),[x,_]=v.useState(null),j=v.useCallback(async V=>{if(!h)return;const Q=await h(V);Q?_(Q):(b(!1),_(null))},[h]),R=v.useCallback(()=>{b(!1),_(null)},[]),D=!c&&h,k=p,W=n.updated_at||n.created_at;return f.jsxs("div",{className:"group flex items-center gap-3 rounded py-2 pl-3 pr-5 transition-colors hover:bg-c4a-bg-hover cursor-pointer",onClick:m?void 0:d,children:[f.jsx(kS,{source:n,isDaemonLibrary:s??!1}),m?f.jsx("div",{className:"min-w-0 flex-1",onClick:V=>V.stopPropagation(),children:f.jsx(My,{currentName:n.name,onConfirm:j,onCancel:R,error:x})}):f.jsx("span",{className:"min-w-0 flex-1 truncate text-sm 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})}),W&&f.jsx("span",{className:"hidden font-mono text-[11px] text-c4a-text-muted lg:inline",children:LS(W)})]}),(D||k)&&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:V=>{V.stopPropagation(),b(!0)},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(rd,{size:14})}),k&&f.jsx("button",{title:g("sources.actions.delete"),onClick:V=>{V.stopPropagation(),p()},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(Ey,{size:14})})]})]})}function Eg({target:n,onConfirm:i,onCancel:r}){const{t:s}=Ce(),c=v.useRef(null);v.useEffect(()=>{const h=p=>{p.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]);const d=v.useCallback(h=>{c.current&&!c.current.contains(h.target)&&r()},[r]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:d,children:f.jsxs("div",{ref:c,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})}),f.jsx("p",{children:n.folderCount!==void 0&&n.sourceCount!==void 0?s("sources.delete.folder_impact",{folders:n.folderCount,sources:n.sourceCount}):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})}),f.jsx("p",{children:n.packageCount!==void 0&&n.docCount!==void 0?s("sources.delete.repo_impact",{packages:n.packageCount,docs:n.docCount}):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 US({onConfirm:n,onCancel:i,error:r}){const{t:s}=Ce(),[c,d]=v.useState(""),h=v.useRef(null),p=v.useRef(null);v.useEffect(()=>{h.current?.focus()},[]),v.useEffect(()=>{const x=_=>{_.key==="Escape"&&i()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i]);const g=v.useCallback(x=>{p.current&&!p.current.contains(x.target)&&i()},[i]),m=v.useCallback(()=>{const x=c.trim();x&&n(x)},[c,n]),b=v.useCallback(x=>{x.key==="Enter"&&(x.preventDefault(),m())},[m]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:g,children:f.jsxs("div",{ref:p,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:x=>d(x.target.value),onKeyDown:b,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:m,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 Ku({label:n,icon:i,items:r,alignRight:s}){const[c,d]=v.useState(!1),h=v.useRef(null),p=v.useRef(null),g=v.useCallback(x=>{h.current&&!h.current.contains(x.target)&&d(!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),d(!0)},[]),b=v.useCallback(()=>{p.current=setTimeout(()=>d(!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(yo,{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(),d(!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 HS({onClose:n}){const{t:i}=Ce(),r=v.useRef(null),s=v.useCallback(c=>{r.current&&!r.current.contains(c.target)&&n()},[n]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:s,children:f.jsxs("div",{ref:r,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(H4,{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")})})]})})}const BS=new Set([".md",".doc",".docx",".pdf",".ppt",".pptx",".txt"]),qS=5*1024*1024,YS=10;function VS(n){const i=n.lastIndexOf(".");return i>=0?n.slice(i).toLowerCase():""}function GS(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}function $S({onConfirm:n,onCancel:i,error:r,uploading:s}){const{t:c}=Ce(),[d,h]=v.useState([]),[p,g]=v.useState(null),[m,b]=v.useState(!1),x=v.useRef(null),_=v.useRef(null);v.useEffect(()=>{const P=Y=>{Y.key==="Escape"&&!s&&i()};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[i,s]);const j=v.useCallback(P=>{!s&&_.current&&!_.current.contains(P.target)&&i()},[i,s]),R=v.useCallback(P=>{g(null);for(const Y of P){const N=VS(Y.name);if(!BS.has(N)){g(c("sources.upload.unsupported_type",{name:Y.name}));return}if(Y.size>qS){g(c("sources.upload.file_too_large",{name:Y.name}));return}}h(Y=>{const N=new Map(Y.map(X=>[X.name,X]));for(const X of P)N.set(X.name,{name:X.name,size:X.size,file:X});const K=Array.from(N.values());return K.length>YS?(g(c("sources.upload.too_many_files")),Y):K})},[c]),D=v.useCallback(P=>{const Y=P.target.files;!Y||Y.length===0||(R(Array.from(Y)),P.target.value="")},[R]),k=v.useCallback(P=>{h(Y=>Y.filter((N,K)=>K!==P)),g(null)},[]),W=v.useCallback(P=>{P.preventDefault(),b(!1);const Y=P.dataTransfer?.files;!Y||Y.length===0||R(Array.from(Y))},[R]),V=v.useCallback(P=>{P.preventDefault(),b(!0)},[]),Q=v.useCallback(P=>{P.preventDefault(),b(!1)},[]),re=v.useCallback(async()=>{if(d.length===0)return;const P=await Promise.all(d.map(Y=>new Promise((N,K)=>{const X=new FileReader;X.onload=()=>N({name:Y.name,content:X.result}),X.onerror=()=>K(X.error),X.readAsText(Y.file)})));n(P)},[d,n]),ae=r||p;return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:j,children:f.jsxs("div",{ref:_,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:D,className:"hidden"}),f.jsxs("button",{type:"button",onClick:()=>x.current?.click(),onDrop:W,onDragOver:V,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")})]})]}),d.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:d.length})}),f.jsx("div",{className:"mt-1 max-h-40 space-y-1 overflow-y-auto c4a-scrollbar",children:d.map((P,Y)=>f.jsxs("div",{className:"flex items-center gap-2 rounded bg-c4a-bg-surface px-2 py-1",children:[f.jsx(Pn,{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:P.name}),f.jsx("span",{className:"shrink-0 text-[10px] text-c4a-text-muted",children:GS(P.size)}),!s&&f.jsx("button",{type:"button",onClick:()=>k(Y),className:"shrink-0 text-c4a-text-muted transition-colors hover:text-c4a-text-primary",title:c("sources.upload.remove"),children:f.jsx(xo,{size:12})})]},`${P.name}-${Y}`))})]}),ae&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:ae}),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:re,disabled:d.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(Xt,{size:12,className:"animate-spin"}),c(s?"sources.upload.uploading":"common.confirm")]})]})]})})}function KS({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(Xt,{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 XS({library:n,onNewFolder:i,onImportRepo:r,onImportDir:s,onUpgrade:c}){const{t:d}=Ce(),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:d(h?"sources.empty.daemon.title":"sources.empty.cloud.title")}),f.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:d(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:d("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:d("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:d("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:d("sources.actions.import_repo_url")})]})})]})})}function QS(){const{t:n}=Ce();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 Xu=n=>{const i=n.children??[];return{folders:i.filter(r=>r.kind==="folder").length,sources:i.filter(r=>r.kind==="source").length,codeSources:i.filter(r=>r.kind==="source"&&r.source_type==="code").length,docSources:i.filter(r=>r.kind==="source"&&r.source_type==="doc").length}};function ZS(){const{t:n}=Ce(),i=In(),{libId:r}=po(),[s,c]=by(),d=s.get("rootId")||null,h=s.get("path")||"",g=Qt(vi(Mr)).find(ce=>ce.id===r),m=Qt(ce=>ce.updateLibraryName),b=Qt(ce=>ce.deleteLibrary),{rootSources:x,currentRoot:_,loading:j,filter:R,fetchRootSources:D,fetchRootSource:k,createSource:W,addTreeNode:V,updateSource:Q,deleteSource:re,deleteTreeNode:ae,uploadDoc:P,setFilter:Y}=So(),[N,K]=v.useState(!1),[X,de]=v.useState(null),[ie,I]=v.useState(null),[le,me]=v.useState(null),[M,J]=v.useState(null),[ue,$]=v.useState(!1),[fe,w]=v.useState(!1),[B,ee]=v.useState(null),[se,Se]=v.useState(!1),[Ne,Te]=v.useState(!1),[ut,he]=v.useState(null),[Tt,Yt]=v.useState(!1);v.useEffect(()=>{r&&D({library_id:r})},[r,D]),v.useEffect(()=>{d&&k(d)},[d,k]);const it=d!==null,Je=v.useMemo(()=>it?_?[...DS(_.tree,h)].sort((tt,yt)=>tt.kind!==yt.kind?tt.kind==="folder"?-1:1:tt.name.localeCompare(yt.name)).map(tt=>({type:"node",root:_,node:tt})):[]:[...x].sort((yt,We)=>yt.kind!==We.kind?yt.kind==="folder"?-1:1:new Date(We.created_at).getTime()-new Date(yt.created_at).getTime()).map(yt=>({type:"root",root:yt,node:null})),[it,x,_,h]),ft=v.useMemo(()=>R==="all"?Je:Je.filter(ce=>ce.type==="root"||!ce.node||ce.node.kind==="folder"?!0:R==="indexed"?ce.node.index_status==="indexed":ce.node.index_status==="none"||!ce.node.index_status),[Je,R]),At=g?.type==="daemon",Aa=g?.type==="cloud",Jt=At&&!it,Vt=v.useMemo(()=>{if(!g)return[];const ce=[{label:g.id===Cr?n("sources.library.default_cloud_name"):g.name,to:`/studio/sources/${g.id}`}];return it&&_&&(ce.push({label:_.name,to:`/studio/sources/${g.id}?rootId=${_.id}`}),h&&Dy(_.tree,h).forEach(tt=>{ce.push({label:tt.name,to:`/studio/sources/${g.id}?rootId=${_.id}&path=${encodeURIComponent(tt.path)}`})})),ce},[g,it,_,h,n]),ya=v.useCallback(async ce=>{if(r)try{it&&d?await V(d,{parent_path:h,kind:"folder",name:ce}):(await W({library_id:r,kind:"folder",name:ce}),D({library_id:r})),K(!1),de(null)}catch(Re){Re instanceof xr&&Re.status===409&&de(n("sources.error.name_conflict",{name:ce}))}},[r,it,d,h,W,V,D,n]),ra=v.useCallback(ce=>{r&&(ce.type==="root"?ce.root.kind==="source"?i(`/studio/source/${ce.root.id}`):c({rootId:ce.root.id}):ce.node&&(ce.node.kind==="folder"?c({rootId:ce.root.id,path:ce.node.path}):i(`/studio/source/${ce.root.id}?path=${encodeURIComponent(ce.node.path)}`)))},[r,i,c]),en=v.useCallback(()=>{if(!(!d||!r))if(h){const ce=h.split("/");ce.pop();const Re=ce.join("/");c(Re?{rootId:d,path:Re}:{rootId:d})}else c({})},[d,r,h,c]),el=v.useCallback(async(ce,Re)=>{try{return await Q(ce,{name:Re}),D({library_id:r}),null}catch(tt){return tt instanceof xr&&tt.status===409?n("sources.error.name_conflict",{name:Re}):null}},[r,Q,D,n]),jn=v.useCallback(ce=>{if(ce.type==="root"){me(ce.root.id),J(null);const Re=ce.root.tree.length>0?Xu({children:ce.root.tree}):void 0;I(At?{type:"repo",name:ce.root.name,libraryName:g.name,...Re?{packageCount:Re.codeSources,docCount:Re.docSources}:{}}:{type:ce.root.kind==="folder"?"folder":"resource",name:ce.root.name,...ce.root.kind==="folder"&&Re?{folderCount:Re.folders,sourceCount:Re.sources}:{}})}else if(ce.node)if(me(ce.root.id),J(ce.node.path),ce.node.kind==="folder"){const Re=Xu(ce.node);I({type:"folder",name:ce.node.name,folderCount:Re.folders,sourceCount:Re.sources})}else I({type:"resource",name:ce.node.name})},[At,g]),Lt=v.useCallback(async()=>{if(!(!le||!r)){try{M?await ae(le,M):(await re(le),D({library_id:r}))}catch{}I(null),me(null),J(null)}},[le,M,r,re,ae,D]),xa=v.useCallback(()=>{r&&i(`/studio/sources/import/${r}`)},[r,i]),La=v.useCallback(()=>{r&&i(`/studio/sources/import-dir/${r}`)},[r,i]),tl=v.useCallback(async ce=>{if(r){Se(!0),ee(null);try{const Re={library_id:r,files:ce.map(tt=>({file_name:tt.name,content:tt.content}))};it&&d&&(Re.root_source_id=d,Re.parent_path=h),await P(Re),it&&d?k(d):D({library_id:r}),w(!1)}catch(Re){Re instanceof xr&&Re.status===409?ee(n("sources.error.name_conflict",{name:ce[0]?.name??""})):Re instanceof xr&&ee(Re.message)}finally{Se(!1)}}},[r,it,d,h,P,D,k,n]),Ga=g?.id===Cr,sa=v.useCallback(async ce=>{if(r)try{await m(r,ce),Te(!1),he(null)}catch(Re){const tt=Re instanceof Error?Re.message:String(Re);he(tt)}},[r,m]),Wt=v.useCallback(()=>{Te(!1),he(null)},[]),El=v.useCallback(async()=>{if(r){try{await b(r),i("/studio/sources/add-client")}catch{}Yt(!1)}},[r,b,i]),bi=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&&R==="all"&&!j&&!it,kt=ft.filter(ce=>ce.type==="node"&&ce.node?.kind==="source").length===0&&R==="indexed"&&!j,St=!Jt,Ot=Aa,Cl=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:Ne?f.jsx(My,{currentName:g.name,onConfirm:sa,onCancel:Wt,error:ut}):f.jsx(Ar,{segments:Vt})}),f.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Ot&&f.jsxs(f.Fragment,{children:[f.jsx(Ku,{label:n("sources.actions.upload"),icon:f.jsx(sd,{size:14}),items:[{label:n("sources.actions.upload_doc"),icon:f.jsx(Pn,{size:14}),onClick:()=>w(!0)}]}),f.jsx(Ku,{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:()=>K(!0)},{label:n("sources.actions.add_web"),icon:f.jsx(f4,{size:14}),onClick:()=>$(!0)},{label:n("sources.actions.add_feishu"),icon:f.jsx(J2,{size:14}),onClick:()=>$(!0)}]}),f.jsxs("button",{onClick:()=>$(!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(hg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo_url")})]})]}),Cl&&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(n4,{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(hg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo")})]}),f.jsx(Ku,{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(AS,{value:R,onChange:Y})]})]}),ka?f.jsx(XS,{library:g,onNewFolder:()=>K(!0),...At?{onImportRepo:xa,onImportDir:La}:{},...Aa?{onUpgrade:()=>$(!0)}:{}}):f.jsx(KS,{pathLabel:Vt.map(ce=>ce.label).join(" / "),loading:j,onNavigateUp:it?en:void 0,children:ft.length===0?kt?f.jsx(QS,{}):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:ft.map(ce=>{if(ce.type==="root"){const We=ce.root,Pt=At,tn=Pt?We.metadata?.local_path:void 0,va=We.tree.length>0?Xu({children:We.tree}):void 0,Si=va?va.folders+va.sources:0;return f.jsx(wg,{source:{id:We.id,library_id:We.library_id,owner_id:We.owner_id,path:"",kind:We.kind,source_type:We.source_type,name:We.name,content_hash:We.content_hash,metadata:We.metadata,index_status:We.index_status,created_at:We.created_at,updated_at:We.updated_at},...typeof tn=="string"?{displayName:tn}:{},...We.kind==="folder"?{childCount:Si}:{},isDaemonLibrary:At??!1,isRepoRoot:Pt,onClick:()=>ra(ce),onRename:al=>el(We.id,al),onDelete:()=>jn(ce)},We.id)}const Re=ce.node,tt=`${ce.root.id}:${Re.path}`,yt=Re.kind==="folder"?Re.children?.length??0:void 0;return f.jsx(wg,{source:{id:ce.root.id,library_id:ce.root.library_id,owner_id:ce.root.owner_id,path:Re.path,kind:Re.kind,source_type:Re.source_type??null,name:Re.name,content_hash:null,metadata:Re.metadata??null,index_status:Re.index_status??"none",created_at:ce.root.created_at,updated_at:ce.root.updated_at},...yt!==void 0?{childCount:yt}:{},isDaemonLibrary:At??!1,onClick:()=>ra(ce),...Aa?{onDelete:()=>jn(ce)}:{}},tt)})})}),N&&f.jsx(US,{onConfirm:ya,onCancel:()=>{K(!1),de(null)},error:X}),fe&&f.jsx($S,{onConfirm:tl,onCancel:()=>{w(!1),ee(null)},error:B,uploading:se}),ue&&f.jsx(HS,{onClose:()=>$(!1)}),ie&&f.jsx(Eg,{target:ie,onConfirm:Lt,onCancel:()=>{I(null),me(null),J(null)}}),Tt&&g&&f.jsx(Eg,{target:{type:"client",name:g.name},onConfirm:El,onCancel:bi})]})}function Ay(){const{t:n}=Ce(),[i,r]=v.useState(!1),[s,c]=v.useState(null),d=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,R)=>{navigator.clipboard.writeText(j),c(R),clearTimeout(d.current),d.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(vd,{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(gi,{size:10}):f.jsx(mg,{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(gi,{size:10}):f.jsx(mg,{size:10})})]})]})]})}function Ly({open:n,onClose:i,rpc:r,onNavigate:s,defaultPath:c}){const{t:d}=Ce(),[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(d("sources.import.wildcard_path_not_found"))}catch(k){m(k instanceof Error?k.message:String(k))}finally{x(!1)}}},[h,r,d,s,i]),R=v.useCallback(()=>{p(c??""),m(null),i()},[i,c]);return n?f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:f.jsxs("div",{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:d("sources.import.wildcard_go_title")}),f.jsx("button",{onClick:R,className:"rounded p-1 text-c4a-text-muted transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-secondary",children:f.jsx(xo,{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:d("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(Xt,{size:12,className:"animate-spin"}):f.jsx(_y,{size:12}),d("sources.import.wildcard_go")]})]}),g&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:g})]})}):null}function ky(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 FS(n,i){return`${n}/tree/${encodeURIComponent(i)}`}function JS(n,i){return`${n}/commit/${i}`}function WS({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Ce(),h=!!s&&s.length>0,p=h&&s.length===1&&s[0]==="*",[g,m]=v.useState(h),[b,x]=v.useState(h&&!p?"":"/"),[_,j]=v.useState([]),[R,D]=v.useState(!1),[k,W]=v.useState(null),[V,Q]=v.useState(null);v.useEffect(()=>{if(h&&!p)return;let $=!1;return(async()=>{try{const fe=await n("fs/homeDir",{});$||Q(fe.home_dir)}catch{$||Q("/")}})(),()=>{$=!0}},[h,p,n]);const[re,ae]=v.useState(!1),P=v.useCallback(async $=>{D(!0),W(null);try{const fe=await n("fs/listTree",{path:$,depth:1});j(fe.entries||[]),x($),m(!1)}catch(fe){const w=fe instanceof Error?fe.message:String(fe);W(w)}finally{D(!1)}},[n]);v.useEffect(()=>{h&&!p||V!==null&&P(V)},[V]);const[Y,N]=v.useState(null),[K,X]=v.useState(null),[de,ie]=v.useState(!1);v.useEffect(()=>{if(!i){X(null),ie(!1);return}X(null),ie(!0);let $=!1;return(async()=>{try{const fe=await n("fs/repoStatus",{path:i});$||(X({branch:fe.branch,hash:fe.head_hash,remoteUrl:fe.remote_url}),ie(!1))}catch{$||(X(null),ie(!1))}})(),()=>{$=!0}},[i,n]);const I=v.useMemo(()=>K?.remoteUrl?ky(K.remoteUrl):null,[K?.remoteUrl]),le=v.useMemo(()=>new Set(c??[]),[c]),me=v.useCallback($=>{if($.type==="directory")if($.is_git_repo){if(le.has($.path))return;N(null),r($.path,$.name)}else N($.path),P($.path)},[r,P,le]),M=v.useCallback(()=>{if(h&&!p&&s.some(w=>w===b)){m(!0),x(""),j([]),W(null),N(null);return}const $=b.split("/").slice(0,-1).join("/")||"/";N(null),P($)},[b,P,h,p,s]),J=v.useMemo(()=>_.filter($=>$.type==="directory").sort(($,fe)=>$.is_git_repo&&!fe.is_git_repo?-1:!$.is_git_repo&&fe.is_git_repo?1:$.name.localeCompare(fe.name)),[_]),ue=v.useMemo(()=>_.filter($=>$.type==="file").sort(($,fe)=>$.name.localeCompare(fe.name)),[_]);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:d("sources.import.allowed_dirs")}),f.jsx(Ay,{})]}):f.jsx("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:b}),i&&de?f.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs text-c4a-accent",children:[f.jsx(Xt,{size:12,className:"animate-spin"}),f.jsx("span",{children:d("common.loading")})]}):i&&K?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:[I?f.jsxs("a",{href:I.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 truncate hover:underline",title:I.repoUrl,children:[f.jsx(id,{size:12,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:I.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:"/"}),I?f.jsxs("a",{href:FS(I.repoUrl,K.branch),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",children:[f.jsx(co,{size:10,className:"shrink-0"}),f.jsx("span",{children:K.branch})]}):f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx(co,{size:10,className:"shrink-0"}),f.jsx("span",{children:K.branch})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),I?f.jsx("a",{href:JS(I.repoUrl,K.hash),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:K.hash.slice(0,7)}):f.jsx("span",{children:K.hash.slice(0,7)})]}):!i&&p&&g?f.jsx("button",{onClick:()=>ae(!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:d("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),g?p?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:V&&f.jsxs("button",{onClick:()=>P(V),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:[V,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]})]}),f.jsx(Sn,{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($=>f.jsxs("button",{onClick:()=>P($),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:$}),f.jsx(Sn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},$))}):k&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:k}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[R&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Xt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:M,disabled: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 hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(Ta,{size:14}),f.jsx("span",{children:".."})]}),J.map($=>{const fe=$.is_git_repo&&le.has($.path),w=$.is_git_repo?bd:Ta;return f.jsxs("div",{className:`flex w-full items-center rounded pl-2 pr-4 text-left text-sm transition-colors ${fe?"cursor-not-allowed text-c4a-accent/60":i===$.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:()=>me($),disabled:fe||R,className:"flex flex-1 items-center gap-2 px-2 py-1.5",children:[f.jsx(w,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate text-left",children:$.name}),fe&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")})]}),!fe&&f.jsx("button",{onClick:B=>{B.stopPropagation(),P($.path)},disabled:R,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:$.path,children:f.jsx(Sn,{size:12})})]},$.path)}),ue.map($=>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:$.name})]},$.path)),_.length===0&&!R&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")})]}),Y&&!i&&f.jsx("p",{className:"mt-3 text-xs text-c4a-warning",children:d("sources.import.not_git")}),f.jsx(Ly,{open:re,onClose:()=>ae(!1),rpc:n,onNavigate:P,defaultPath:V??void 0})]})}function Cg({value:n,options:i,onChange:r,icon:s,maxHeight:c="max-h-60"}){const[d,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(d)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[d,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(yo,{size:12,className:`shrink-0 transition-transform ${d?"rotate-180":""}`})]}),d&&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(gi,{size:12,className:`shrink-0 ${j.value===n?"opacity-100":"opacity-0"}`}),f.jsx("span",{className:"truncate",children:j.label})]},j.value))})]})}const PS=/\.md$/i,Qu=100,IS=(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 e_({rpc:n,repoPath:i,onReady:r,onBusyChange:s}){const{t:c}=Ce(),[d,h]=v.useState(""),[p,g]=v.useState([]),[m,b]=v.useState(""),[x,_]=v.useState([]),[j,R]=v.useState(!1),[D,k]=v.useState(!0),[W,V]=v.useState(!1),[Q,re]=v.useState(!1),[ae,P]=v.useState([]),[Y,N]=v.useState([]),[,K]=v.useState([]),[X,de]=v.useState(),ie=v.useMemo(()=>X?ky(X):null,[X]),[I,le]=v.useState("packages"),[me,M]=v.useState(Qu),J=v.useRef(null),ue=v.useRef(null);v.useEffect(()=>{if(!D){V(!1);return}const he=setTimeout(()=>V(!0),2e3);return()=>clearTimeout(he)},[D]),v.useEffect(()=>{M(Qu),ue.current?.scrollTo(0,0)},[I]),v.useEffect(()=>{const he=J.current;if(!he)return;const Tt=I==="packages"?ae.length:Y.length;if(me>=Tt)return;const Yt=new IntersectionObserver(it=>{it[0]?.isIntersecting&&M(Je=>Math.min(Je+Qu,Tt))},{root:ue.current,threshold:.1});return Yt.observe(he),()=>Yt.disconnect()},[I,me,ae.length,Y.length]);const $=v.useCallback(async(he,Tt)=>{re(!0),s?.(!0);try{const Yt=await n("fs/repoScan",{path:i,hash:he}),it=Yt.files||[],Je=Yt.manifests||[];K(it);const ft=[];for(const Vt of Je){const ya=Vt.path.split("/"),ra=ya.slice(0,-1).join("/")||".",en=ya.length===1||Vt.path==="package.json",el=ra==="."?i.split("/").pop()||"root":ya[ya.length-2]||ra,jn=IS(Vt.path,Vt.content);ft.push({name:jn||el,path:ra,isRoot:en})}const At=it.filter(Vt=>PS.test(Vt.path)).map(Vt=>Vt.path);N(At),P(ft);const Aa=Tt?.branch??d,Jt=Tt?.isDirty??j;r({branch:Aa,commit:he,isDirty:Jt,repoFiles:it,packages:ft,mdFiles:At,repoFileContents:Je})}catch{}finally{re(!1),s?.(!1)}},[n,i,d,j,r,s]);v.useEffect(()=>{(async()=>{k(!0),s?.(!0);try{const he=await n("fs/repoStatus",{path:i});h(he.branch),g(he.branches||[he.branch]),b(he.head_hash),R(he.is_dirty),de(he.remote_url),_(he.commits||[{hash:he.head_hash,message:"HEAD"}]),await $(he.head_hash,{branch:he.branch,isDirty:he.is_dirty})}catch{}finally{k(!1),s?.(!1)}})()},[i]),v.useEffect(()=>{r({branch:d,commit:m,isDirty:j,packages:ae,mdFiles:Y,repoFileContents:[]})},[d,m,j]);const fe=v.useCallback(async he=>{h(he);try{const Tt=await n("fs/repoStatus",{path:i});b(Tt.head_hash),await $(Tt.head_hash)}catch{}},[i,n,$]),w=d&&d!=="main"&&d!=="master",B=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(Xt,{size:20,className:"animate-spin text-c4a-accent"}),W&&f.jsx("p",{className:"mt-3 font-mono text-xs text-c4a-accent",children:c("sources.import.loading_repo_slow")})]});const ee=p.map(he=>({value:he,label:he})),se=x.map(he=>({value:he.hash,label:`${he.hash.slice(0,7)} ${he.message!=="HEAD"?`— ${he.message.slice(0,50)}`:""}`.trim()})),Se=x.length<=1,Ne=I==="packages"?ae:Y,Te=Ne.slice(0,me),ut=me<Ne.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:ie?f.jsxs("a",{href:ie.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"}),B]}):f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:B})}),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(Cg,{value:d,options:ee,onChange:fe,icon:f.jsx(co,{size:12})}),Se?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(Cg,{value:m,options:se,onChange:he=>{b(he),$(he)},icon:f.jsx(ld,{size:12})})})]})]}),(w||j)&&f.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1",children:[w&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-info",children:[f.jsx(m4,{size:12}),c("sources.import.branch_warning",{branch:d})]}),j&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-warning",children:[f.jsx(vd,{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:Q?f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Xt,{size:12,className:"animate-spin text-c4a-text-muted"}),f.jsx("span",{className:"text-c4a-text-muted",children:"Analyzing repository..."})]}):ae.length>0?c("sources.import.recognized",{packages:ae.length,docs:Y.length}):c("sources.import.no_packages")}),!Q&&(ae.length>0||Y.length>0)&&f.jsxs("div",{className:"flex rounded border border-c4a-border-subtle",children:[f.jsxs("button",{onClick:()=>le("packages"),className:`flex items-center gap-1 px-2.5 py-1 text-xs transition-colors ${I==="packages"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(yi,{size:13}),f.jsx("span",{className:"font-mono",children:ae.length})]}),f.jsxs("button",{onClick:()=>le("docs"),className:`flex items-center gap-1 border-l border-c4a-border-subtle px-2.5 py-1 text-xs transition-colors ${I==="docs"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(Pn,{size:13}),f.jsx("span",{className:"font-mono",children:Y.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:Q?f.jsx("div",{className:"flex items-center justify-center py-8",children:f.jsx(Xt,{size:14,className:"animate-spin text-c4a-text-muted"})}):Ne.length===0?f.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:I==="packages"?c("sources.import.no_packages"):"—"}):f.jsxs(f.Fragment,{children:[I==="packages"?Te.map(he=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(yi,{size:14,className:"shrink-0 text-c4a-accent"}),f.jsx("span",{className:"text-c4a-text-primary",children:he.name}),f.jsx("span",{className:"hidden truncate text-c4a-text-muted sm:inline",children:he.path}),he.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"})]},he.path)):Te.map(he=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(Pn,{size:14,className:"shrink-0 text-c4a-text-secondary"}),f.jsx("span",{className:"truncate text-c4a-text-primary",children:he})]},he)),ut&&f.jsx("div",{ref:J,className:"h-4"})]})})]})]})}function t_({importState:n,libraryName:i,importing:r}){const{t:s}=Ce(),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(eo,{icon:f.jsx(co,{size:14}),label:s("sources.import.branch"),value:n.branch}),f.jsx(eo,{icon:f.jsx(ld,{size:14}),label:s("sources.import.commit"),value:n.commit.slice(0,7)}),f.jsx(eo,{icon:f.jsx(yi,{size:14}),label:s("sources.import.packages"),value:String(n.packages.length),tooltip:s("sources.import.dir_code_packages_tip")}),f.jsx(eo,{icon:f.jsx(Pn,{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(Xt,{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 eo({icon:n,label:i,value:r,tooltip:s}){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 truncate font-mono text-sm font-bold text-c4a-text-primary",title:r,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 a_(){const{t:n}=Ce(),i=In(),{libId:r}=po(),c=Qt(vi(Mr)).find(N=>N.id===r),d=So(N=>N.createSource),[h,p]=v.useState(1),[g,m]=v.useState(!1),[b,x]=v.useState(!1),[_,j]=v.useState({repoPath:"",repoName:"",branch:"",branches:[],commit:"",commits:[],isDirty:!1,repoFiles:[],packages:[],mdFiles:[],repoFileContents:[]}),R=c?.is_online??!1,[D,k]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const K=await zt.get("/sources",{library_id:r,limit:"500"});if(N)return;const X=K.items.map(de=>{const ie=de.metadata;return typeof ie?.local_path=="string"?ie.local_path:null}).filter(de=>de!==null);k(X)}catch{}})(),()=>{N=!0}},[r]);const W=v.useMemo(()=>{const N=c?.config;return!N||!Array.isArray(N.allowed_paths)?[]:N.allowed_paths},[c]),V=v.useCallback(async(N,K)=>{if(!r)throw new Error("No library");const X=await zt.post(`/libraries/${r}/rpc`,{method:N,params:K});if(X.error){const de=X.error;throw new Error(de.message??JSON.stringify(X.error))}return X.result??X},[r]),Q=v.useCallback((N,K)=>{j(X=>({...X,repoPath:N,repoName:K}))},[]),re=v.useCallback(N=>{j(K=>({...K,...N}))},[]),ae=v.useCallback(async()=>{if(r){m(!0);try{const N=await d({library_id:r,repo_name:_.repoName,repo_root_path:_.repoPath,repo_branch:_.branch,repo_commit:_.commit,repo_files:_.repoFiles.map(X=>X.path),repo_file_contents:_.repoFileContents}),K=Array.isArray(N)?N[0]:N;K?.id?i(`/studio/sources/${r}?rootId=${K.id}`):i(`/studio/sources/${r}`)}catch{m(!1)}}},[r,_,d,i]),P=v.useMemo(()=>h===1?!!_.repoPath:h===2?!!_.commit:!0,[h,_]),Y=v.useMemo(()=>c?[{label:c.id===Cr?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(Ar,{segments:Y})}),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(Zu,{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(Rg,{}),f.jsx(Zu,{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(Rg,{}),f.jsx(Zu,{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:R?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(WS,{rpc:V,selectedPath:_.repoPath,onSelect:Q,allowedPaths:W,importedPaths:D}),h===2&&f.jsx(e_,{rpc:V,repoPath:_.repoPath,onReady:re,onBusyChange:x}),h===3&&f.jsx(t_,{importState:_,libraryName:c.name,importing:g})]}):f.jsx(n_,{libraryName:c.name})}),R&&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:n("sources.safety.notice.repo"),onClick:N=>N.currentTarget.classList.toggle("line-clamp-1"),children:n("sources.safety.notice.repo")}),f.jsxs("div",{className:"flex shrink-0 gap-2",children:[h>1&&f.jsx("button",{onClick:()=>p(N=>N-1),disabled:g||b,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:n("common.previous")}),h<3?f.jsx("button",{onClick:()=>p(N=>N+1),disabled:!P||b,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:n("common.next")}):f.jsxs("button",{onClick:ae,disabled:g||b,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:[g&&f.jsx(Xt,{size:12,className:"animate-spin"}),n(g?"sources.import.importing":"sources.import.step.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 Zu({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 Rg(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function n_({libraryName:n}){const{t:i}=Ce();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(ia,{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")})]})}const zg=(n,i)=>{let r=0,s=0,c=0;const d=[],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;d.push(m)}};return h(n),{files:r,dirs:s,gitRepos:c,mdFiles:d}};function l_({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Ce(),h=!!s&&s.length>0,p=h&&s.length===1&&s[0]==="*",[g,m]=v.useState(h),[b,x]=v.useState(h&&!p?"":"/"),[_,j]=v.useState([]),[R,D]=v.useState(!1),[k,W]=v.useState(null),V=v.useMemo(()=>new Set(c??[]),[c]),[Q,re]=v.useState(null);v.useEffect(()=>{if(h&&!p)return;let I=!1;return(async()=>{try{const le=await n("fs/homeDir",{});I||re(le.home_dir)}catch{I||re("/")}})(),()=>{I=!0}},[h,p,n]);const[ae,P]=v.useState(!1),Y=v.useCallback(async I=>{D(!0),W(null);try{const le=await n("fs/listTree",{path:I,depth:1});j(le.entries||[]),x(I),m(!1)}catch(le){const me=le instanceof Error?le.message:String(le);W(me)}finally{D(!1)}},[n]);v.useEffect(()=>{h&&!p||Q!==null&&Y(Q)},[Q]);const N=v.useCallback(I=>{if(I.type!=="directory"||V.has(I.path))return;const le=zg(I.children||[],I.path);r(I.path,I.name,le),Y(I.path)},[r,Y,V]),K=v.useCallback(()=>{if(h&&!p&&s.some(me=>me===b)){m(!0),x(""),j([]),W(null);return}const I=b.split("/").slice(0,-1).join("/")||"/";Y(I)},[b,Y,h,p,s]);v.useEffect(()=>{if(b&&!g&&_.length>=0&&!R){const I=b.split("/").pop()||b,le=zg(_,b);r(b,I,le)}},[b,g,_,R]);const X=v.useMemo(()=>i?i.split("/").pop()||i:"",[i]),de=v.useMemo(()=>_.filter(I=>I.type==="directory").sort((I,le)=>I.is_git_repo&&!le.is_git_repo?-1:!I.is_git_repo&&le.is_git_repo?1:I.name.localeCompare(le.name)),[_]),ie=v.useMemo(()=>_.filter(I=>I.type==="file").sort((I,le)=>I.name.localeCompare(le.name)),[_]);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:[g?f.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsx("span",{children:d("sources.import.allowed_dirs")}),f.jsx(Ay,{})]}):f.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:b}),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:X})]}):p&&g?f.jsx("button",{onClick:()=>P(!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:d("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),g?p?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:Q&&f.jsxs("button",{onClick:()=>Y(Q),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:[Q,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]})]}),f.jsx(Sn,{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(I=>f.jsxs("button",{onClick:()=>Y(I),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:I}),f.jsx(Sn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},I))}):k&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:k}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[R&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Xt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:K,disabled: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 hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(Ta,{size:14}),f.jsx("span",{children:".."})]}),de.map(I=>{const le=V.has(I.path),me=I.is_git_repo?bd:Ta;return f.jsxs("button",{onClick:()=>N(I),disabled:le||R,className:`flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm transition-colors ${le?"cursor-not-allowed text-c4a-accent/60":i===I.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[f.jsx(me,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:I.name}),le&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")}),f.jsx(Sn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},I.path)}),ie.map(I=>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:I.name})]},I.path)),_.length===0&&!R&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")})]}),f.jsx(Ly,{open:ae,onClose:()=>P(!1),rpc:n,onNavigate:Y,defaultPath:Q??void 0})]})}const i_=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),r_=n=>{let i=0,r=0,s=0,c=0,d=0;const h=new Set;for(const p of n)if(p.type==="directory")r++,p.is_git_repo&&d++;else{i++,p.path.toLowerCase().endsWith(".md")&&c++;const m=p.path.split("/").pop();if(m&&i_.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:d}};function s_({dirPath:n,rpc:i,importing:r,onScanComplete:s,onBusyChange:c}){const{t:d}=Ce(),[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}),R=j.entries||[],D=j.manifests||[],k=r_(R);x(k),s(R,k,D)}catch(j){const R=j instanceof Error?j.message:String(j);m(R)}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(Xt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:d("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(vd,{size:14,className:"mt-0.5 shrink-0"}),d("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(T4,{size:12}),d("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:[d("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(pr,{icon:f.jsx(Pn,{size:14}),label:d("sources.import.dir_doc_files"),value:b.docFiles,tooltip:d("sources.import.dir_doc_files_tip")}),f.jsx(pr,{icon:f.jsx(yi,{size:14}),label:d("sources.import.dir_code_packages"),value:b.codePackages,tooltip:d("sources.import.dir_code_packages_tip")}),b.gitRepos>0&&f.jsx(pr,{icon:f.jsx(bd,{size:14}),label:d("sources.import.dir_git_repos"),value:b.gitRepos}),f.jsx(pr,{icon:f.jsx(Ta,{size:14}),label:d("sources.import.dir_total_dirs"),value:b.totalDirs}),f.jsx(pr,{icon:f.jsx(e4,{size:14}),label:d("sources.import.dir_total_files"),value:b.totalFiles})]}),b.gitRepos>0&&f.jsx("p",{className:"text-xs text-c4a-warning",children:d("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(Xt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:d("sources.import.importing")})]})]})]})}function pr({icon:n,label:i,value:r,tooltip:s}){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 text-lg font-bold text-c4a-text-primary",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 o_(){const{t:n}=Ce(),i=In(),{libId:r}=po(),c=Qt(vi(Mr)).find(N=>N.id===r),d=So(N=>N.createSource),[h,p]=v.useState(1),[g,m]=v.useState(!1),[b,x]=v.useState(!1),[_,j]=v.useState({dirPath:"",dirName:"",fileCount:0,subDirCount:0,gitRepoCount:0,mdFiles:[],scanEntries:[],scanStats:null,manifests:[]}),R=c?.is_online??!1,[D,k]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const K=await zt.get("/sources",{library_id:r,limit:"500"});if(N)return;const X=K.items.map(de=>{const ie=de.metadata;return typeof ie?.local_path=="string"?ie.local_path:null}).filter(de=>de!==null);k(X)}catch{}})(),()=>{N=!0}},[r]);const W=v.useMemo(()=>{const N=c?.config;return!N||!Array.isArray(N.allowed_paths)?[]:N.allowed_paths},[c]),V=v.useCallback(async(N,K)=>{if(!r)throw new Error("No library");const X=await zt.post(`/libraries/${r}/rpc`,{method:N,params:K});if(X.error){const de=X.error;throw new Error(de.message??JSON.stringify(X.error))}return X.result??X},[r]),Q=v.useCallback((N,K,X)=>{j(de=>({...de,dirPath:N,dirName:K,fileCount:X.files,subDirCount:X.dirs,gitRepoCount:X.gitRepos,mdFiles:X.mdFiles}))},[]),re=v.useCallback((N,K,X)=>{j(de=>({...de,scanEntries:N,scanStats:K,manifests:X}))},[]),ae=v.useCallback(async()=>{if(r){m(!0);try{const N=await d({library_id:r,dir_files:_.scanEntries,dir_name:_.dirName,dir_path:_.dirPath,dir_file_contents:_.manifests}),K=Array.isArray(N)?N[0]:N;K?.id?i(`/studio/sources/${r}?rootId=${K.id}`):i(`/studio/sources/${r}`)}catch{m(!1)}}},[r,_,d,i]),P=v.useMemo(()=>h===1?!!_.dirPath:h===2?_.scanEntries.length>0:!0,[h,_]),Y=v.useMemo(()=>c?[{label:c.id===Cr?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(Ar,{segments:Y})}),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(Tg,{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(c_,{}),f.jsx(Tg,{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:R?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(l_,{rpc:V,selectedPath:_.dirPath,onSelect:Q,allowedPaths:W,importedPaths:D}),h===2&&f.jsx(s_,{dirPath:_.dirPath,rpc:V,importing:g,onScanComplete:re,onBusyChange:x})]}):f.jsx(u_,{libraryName:c.name})}),R&&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:n("sources.safety.notice.dir"),onClick:N=>N.currentTarget.classList.toggle("line-clamp-1"),children:n("sources.safety.notice.dir")}),f.jsxs("div",{className:"flex shrink-0 gap-2",children:[h>1&&f.jsx("button",{onClick:()=>p(N=>N-1),disabled:g||b,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:n("common.previous")}),h<2?f.jsx("button",{onClick:()=>p(N=>N+1),disabled:!P||b,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:n("common.next")}):f.jsxs("button",{onClick:ae,disabled:g||b||!P,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:[g&&f.jsx(Xt,{size:12,className:"animate-spin"}),n(g?"sources.import.importing":"sources.import.dir_step.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 Tg({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 c_(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function u_({libraryName:n}){const{t:i}=Ce();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(ia,{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 d_(){const{t:n}=Ce(),i=In(),r=Qt(_=>_.createLibrary),[s,c]=v.useState("waiting"),[d,h]=v.useState(null),[p,g]=v.useState(""),[m,b]=v.useState(!1);v.useEffect(()=>Ia.on("ws:daemon:connected",j=>{const R=j;h(R),g(R.machine_id),c(R.needs_registration?"new_client":"reconnected")}),[]),v.useEffect(()=>{let _=!1;return(async()=>{try{const j=await zt.get("/daemons/pending");if(_||j.pending.length===0)return;const R=j.pending[0];h({machine_id:R.machine_id,needs_registration:!0}),g(R.machine_id),c("new_client")}catch{}})(),()=>{_=!0}},[]);const x=v.useCallback(async()=>{if(d){b(!0);try{const _=await r({type:"daemon",name:p||d.machine_id,config:{machine_id:d.machine_id,os:d.os||"",daemon_version:d.daemon_version||""}});i(`/studio/sources/${_.id}`)}catch{b(!1)}}},[d,p,r,i]);return f.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsx(Ar,{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(Xt,{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"&&d&&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:d.machine_id}),d.os&&f.jsx(Fu,{label:n("sources.add_client.os"),value:d.os}),d.daemon_version&&f.jsx(Fu,{label:n("sources.add_client.daemon_version"),value:d.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(Xt,{size:12,className:"animate-spin"}),n("sources.add_client.confirm")]})]})]}),s==="reconnected"&&d&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(gi,{size:16,className:"text-c4a-success"}),f.jsx("span",{className:"text-sm text-c4a-text-primary",children:n("sources.add_client.reconnected",{name:d.machine_id})})]}),d.lib_id&&f.jsx(ia,{to:`/studio/sources/${d.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:d.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 f_(){const{t:n}=Ce(),{sourceUuid:i}=po(),[r]=by(),s=r.get("path")||"",{currentRoot:c,loading:d,fetchRootSource:h}=So(),p=Qt(vi(Mr)),[g,m]=v.useState("original");v.useEffect(()=>{i&&h(i)},[i,h]);const b=v.useMemo(()=>c?s?bo(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(Q=>Q.id===c?.library_id),_=b?.metadata,j=_?Object.fromEntries(Object.entries(_).map(([Q,re])=>[Q,String(re??"")])):null,R=b?.source_type==="code",D=b?.name??c?.name??"",k=b?.source_type??null,W=v.useMemo(()=>{if(!c||!x)return[];const Q=c.kind==="source"&&!s,re=[{label:x.id===Cr?n("sources.library.default_cloud_name"):x.name,to:`/studio/sources/${x.id}`},{label:c.name,...Q?{}:{to:`/studio/sources/${x.id}?rootId=${c.id}`}}];if(s){const ae=Dy(c.tree,s);for(let P=0;P<ae.length-1;P++){const Y=ae[P];re.push({label:Y.name,to:`/studio/sources/${x.id}?rootId=${c.id}&path=${encodeURIComponent(Y.path)}`})}ae.length>0&&re.push({label:ae[ae.length-1].name})}return re},[c,x,s,n]),V=[{key:"original",label:n(R?"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 d||!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(Ar,{segments:W}),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:[R?f.jsx(yi,{size:20,className:"shrink-0 text-c4a-accent"}):f.jsx(Pn,{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(k==="code"?"sources.type.code":"sources.type.doc")})]}),R&&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})]}),!R&&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"}`)})]})]})]}),R&&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(to,{label:n("sources.detail.repo"),value:j.repo_name}),j.pinned_branch&&f.jsx(to,{label:n("sources.detail.branch"),value:j.pinned_branch}),j.pinned_hash&&f.jsx(to,{label:n("sources.detail.commit"),value:j.pinned_hash.slice(0,7)}),j.tech_stack&&f.jsx(to,{label:n("sources.detail.tech_stack"),value:j.tech_stack})]})}),f.jsx("div",{className:"mt-3 flex border-b border-c4a-border-subtle",children:V.map(Q=>f.jsx("button",{onClick:()=>m(Q.key),className:`border-b-2 px-4 py-2 font-mono text-xs uppercase transition-colors ${g===Q.key?"border-c4a-accent text-c4a-accent":"border-transparent text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:Q.label},Q.key))}),f.jsxs("div",{className:"mt-4 flex-1",children:[g==="original"&&f.jsx(h_,{node:b,isCode:R}),g==="digest"&&f.jsx(Og,{message:n("sources.detail.digest_placeholder")}),g==="modeling"&&f.jsx(Og,{message:n("sources.detail.modeling_placeholder")})]})]})}function to({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 h_({node:n,isCode:i}){const{t:r}=Ce(),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,d])=>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:d})]},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 m_="lib_cloud_default",p_=b2([{element:f.jsx(fS,{}),children:[{path:"/",element:f.jsx(xS,{})},{path:"/login",element:f.jsx(vS,{})},{path:"/docs",element:f.jsx(bS,{})}]},{path:"/studio",element:f.jsx(yS,{}),children:[{index:!0,element:f.jsx(ug,{to:"/studio/sources",replace:!0})},{path:"sources",element:f.jsx(ug,{to:`/studio/sources/${m_}`,replace:!0})},{path:"sources/add-client",element:f.jsx(d_,{})},{path:"sources/import/:libId",element:f.jsx(a_,{})},{path:"sources/import-dir/:libId",element:f.jsx(o_,{})},{path:"sources/:libId",element:f.jsx(ZS,{})},{path:"source/:sourceUuid",element:f.jsx(f_,{})},{path:"modeling",element:f.jsx(_S,{})},{path:"modeling/code/setup",element:f.jsx(RS,{})},{path:"modeling/code/compile",element:f.jsx(zS,{})},{path:"modeling/code/review",element:f.jsx(TS,{})},{path:"modeling/code/result",element:f.jsx(OS,{})},{path:"brain",element:f.jsx(jS,{})},{path:"discovery",element:f.jsx(NS,{})},{path:"sharing",element:f.jsx(wS,{})},{path:"collaboration",element:f.jsx(ES,{})},{path:"settings",element:f.jsx(CS,{})}]},{path:"*",element:f.jsx(SS,{})}]);function g_(){return v.useEffect(()=>{const i=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return Ia.connect(i),()=>{Ia.disconnect()}},[]),f.jsx(X1,{router:p_})}rb.createRoot(document.getElementById("root")).render(f.jsx(v.StrictMode,{children:f.jsx(g_,{})}));